From owner-dev-commits-src-all@freebsd.org Mon Jan 11 00:04:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47D8B4DF43D; Mon, 11 Jan 2021 00: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDYqM1bk5z4V1L; Mon, 11 Jan 2021 00: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 29B49115B8; Mon, 11 Jan 2021 00: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 10B04lAL016482; Mon, 11 Jan 2021 00: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 10B04l9W016481; Mon, 11 Jan 2021 00:04:47 GMT (envelope-from git) Date: Mon, 11 Jan 2021 00:04:47 GMT Message-Id: <202101110004.10B04l9W016481@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: 1f7661742de6 - main - cmp: use C99 bool for flags 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: 1f7661742de650bcb6b9124ee3da7e94c8650c4b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 00:04:47 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1f7661742de650bcb6b9124ee3da7e94c8650c4b commit 1f7661742de650bcb6b9124ee3da7e94c8650c4b Author: Ed Maste AuthorDate: 2021-01-11 00:02:55 +0000 Commit: Ed Maste CommitDate: 2021-01-11 00:02:55 +0000 cmp: use C99 bool for flags MFC after: 1 week Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28072 --- usr.bin/cmp/cmp.c | 27 ++++++++++++++------------- usr.bin/cmp/extern.h | 2 +- usr.bin/cmp/link.c | 1 + usr.bin/cmp/misc.c | 1 + 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index e1f9fb6823ef..c762f1346abf 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" -int lflag, sflag, xflag, zflag; +bool lflag, sflag, xflag, zflag; static const struct option long_opts[] = { @@ -77,7 +77,8 @@ main(int argc, char *argv[]) { struct stat sb1, sb2; off_t skip1, skip2; - int ch, fd1, fd2, oflag, special; + int ch, fd1, fd2, oflag; + bool special; const char *file1, *file2; oflag = O_RDONLY; @@ -87,18 +88,18 @@ main(int argc, char *argv[]) oflag |= O_NOFOLLOW; break; case 'l': /* print all differences */ - lflag = 1; + lflag = true; break; case 's': /* silent run */ - sflag = 1; - zflag = 1; + sflag = true; + zflag = true; break; case 'x': /* hex output */ - lflag = 1; - xflag = 1; + lflag = true; + xflag = true; break; case 'z': /* compare size first */ - zflag = 1; + zflag = true; break; case '?': default: @@ -120,9 +121,9 @@ main(int argc, char *argv[]) err(ERR_EXIT, "unable to limit rights on stderr"); /* Backward compatibility -- handle "-" meaning stdin. */ - special = 0; + special = false; if (strcmp(file1 = argv[0], "-") == 0) { - special = 1; + special = true; fd1 = STDIN_FILENO; file1 = "stdin"; } else if ((fd1 = open(file1, oflag, 0)) < 0 && errno != EMLINK) { @@ -135,7 +136,7 @@ main(int argc, char *argv[]) if (special) errx(ERR_EXIT, "standard input may only be specified once"); - special = 1; + special = true; fd2 = STDIN_FILENO; file2 = "stdin"; } else if ((fd2 = open(file2, oflag, 0)) < 0 && errno != EMLINK) { @@ -174,7 +175,7 @@ main(int argc, char *argv[]) exit(ERR_EXIT); } if (!S_ISREG(sb1.st_mode)) - special = 1; + special = true; else { if (fstat(fd2, &sb2)) { if (!sflag) @@ -183,7 +184,7 @@ main(int argc, char *argv[]) exit(ERR_EXIT); } if (!S_ISREG(sb2.st_mode)) - special = 1; + special = true; } } diff --git a/usr.bin/cmp/extern.h b/usr.bin/cmp/extern.h index 84507b1929dc..82c5ea42b175 100644 --- a/usr.bin/cmp/extern.h +++ b/usr.bin/cmp/extern.h @@ -44,4 +44,4 @@ void c_special(int, const char *, off_t, int, const char *, off_t); void diffmsg(const char *, const char *, off_t, off_t); void eofmsg(const char *); -extern int lflag, sflag, xflag, zflag; +extern bool lflag, sflag, xflag, zflag; diff --git a/usr.bin/cmp/link.c b/usr.bin/cmp/link.c index 3aecf4f10738..9193147e830e 100644 --- a/usr.bin/cmp/link.c +++ b/usr.bin/cmp/link.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/usr.bin/cmp/misc.c b/usr.bin/cmp/misc.c index a99ab4facb73..1e84f0d7a527 100644 --- a/usr.bin/cmp/misc.c +++ b/usr.bin/cmp/misc.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include From owner-dev-commits-src-all@freebsd.org Mon Jan 11 00:04:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 824D64DF48F; Mon, 11 Jan 2021 00:04: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDYqN2ZWsz4Tkd; Mon, 11 Jan 2021 00: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 4BACD113AE; Mon, 11 Jan 2021 00: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 10B04mkX016500; Mon, 11 Jan 2021 00: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 10B04m0I016499; Mon, 11 Jan 2021 00:04:48 GMT (envelope-from git) Date: Mon, 11 Jan 2021 00:04:48 GMT Message-Id: <202101110004.10B04m0I016499@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: 80445b7a3f73 - main - cmp: fix -s (silent) when used with skip offsets 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: 80445b7a3f738e0b0a33ee7a11905a275346a6de Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 00:04:48 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=80445b7a3f738e0b0a33ee7a11905a275346a6de commit 80445b7a3f738e0b0a33ee7a11905a275346a6de Author: Ed Maste AuthorDate: 2021-01-11 00:02:56 +0000 Commit: Ed Maste CommitDate: 2021-01-11 00:02:56 +0000 cmp: fix -s (silent) when used with skip offsets -s causes cmp to print nothing for differing files, for use when only the exit status is of interest. -z compares the file size first, for regular files, and fails the comparison early if they do not match. Prior to this change -s implied -z as an optimization, but this is not valid when file offsets are specified. Now, enable the -z optimization for -s only if both skip arguments are not provided / 0. Note that using -z with differing skip values will currently always fail. We may want to compare size1 - skip1 with size2 - skip2 instaead, and in any case the man page should be clarified. PR: 252542 Fixes: 3e6902efc802ab57fc4e9bf798f2d271b152e7f9 Reported by: William Ahern Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28071 --- usr.bin/cmp/cmp.c | 4 +++- usr.bin/cmp/tests/cmp_test2.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index c762f1346abf..47f9b671985c 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -92,7 +92,6 @@ main(int argc, char *argv[]) break; case 's': /* silent run */ sflag = true; - zflag = true; break; case 'x': /* hex output */ lflag = true; @@ -149,6 +148,9 @@ main(int argc, char *argv[]) skip1 = argc > 2 ? strtol(argv[2], NULL, 0) : 0; skip2 = argc == 4 ? strtol(argv[3], NULL, 0) : 0; + if (sflag && skip1 == 0 && skip2 == 0) + zflag = true; + if (fd1 == -1) { if (fd2 == -1) { c_link(file1, skip1, file2, skip2); diff --git a/usr.bin/cmp/tests/cmp_test2.sh b/usr.bin/cmp/tests/cmp_test2.sh index 2b0d66382d36..7f9801fc92bd 100755 --- a/usr.bin/cmp/tests/cmp_test2.sh +++ b/usr.bin/cmp/tests/cmp_test2.sh @@ -62,8 +62,22 @@ symlink_body() { atf_check -s not-exit:0 -o ignore -e ignore cmp -h a.lnk adup.lnk } +atf_test_case pr252542 +pr252542_head() +{ + atf_set "descr" "Test cmp(1) -s with file offset skips" +} +pr252542_body() +{ + echo -n '1234567890' > a + echo -n 'abc567890' > b + atf_check -s exit:0 cmp -s a b 4 3 + atf_check -s exit:1 -o ignore cmp -z a b 4 3 +} + atf_init_test_cases() { atf_add_test_case special atf_add_test_case symlink + atf_add_test_case pr252542 } From owner-dev-commits-src-all@freebsd.org Mon Jan 11 00:20:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E2714DF64F; Mon, 11 Jan 2021 00:20: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDZ8x3B9cz4VMm; Mon, 11 Jan 2021 00: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 5A05611B51; Mon, 11 Jan 2021 00: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 10B0K19n031678; Mon, 11 Jan 2021 00: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 10B0K1Iu031675; Mon, 11 Jan 2021 00:20:01 GMT (envelope-from git) Date: Mon, 11 Jan 2021 00:20:01 GMT Message-Id: <202101110020.10B0K1Iu031675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 685de460bc91 - main - Use static initializers for fib algo to shift initialization to ealier stage. This allows to register modules loaded at boot time. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 685de460bc91737331eaf475b0f517517b2ddbd0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 00:20:01 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=685de460bc91737331eaf475b0f517517b2ddbd0 commit 685de460bc91737331eaf475b0f517517b2ddbd0 Author: Alexander V. Chernikov AuthorDate: 2021-01-11 00:16:54 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-11 00:16:54 +0000 Use static initializers for fib algo to shift initialization to ealier stage. This allows to register modules loaded at boot time. Reported by: olivier --- sys/net/route/fib_algo.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c index 32bafbaca3d1..5e63535f3926 100644 --- a/sys/net/route/fib_algo.c +++ b/sys/net/route/fib_algo.c @@ -169,6 +169,7 @@ struct mtx fib_mtx; #define FIB_MOD_UNLOCK() mtx_unlock(&fib_mtx) #define FIB_MOD_LOCK_ASSERT() mtx_assert(&fib_mtx, MA_OWNED) +MTX_SYSINIT(fib_mtx, &fib_mtx, "algo list mutex", MTX_DEF); /* Algorithm has to be this percent better than the current to switch */ #define BEST_DIFF_PERCENT (5 * 256 / 100) @@ -219,7 +220,7 @@ SYSCTL_INT(_net_route_algo, OID_AUTO, debug_level, CTLFLAG_RW | CTLFLAG_RWTUN, /* List of all registered lookup algorithms */ -static TAILQ_HEAD(, fib_lookup_module) all_algo_list; +static TAILQ_HEAD(, fib_lookup_module) all_algo_list = TAILQ_HEAD_INITIALIZER(all_algo_list); /* List of all fib lookup instances in the vnet */ VNET_DEFINE_STATIC(TAILQ_HEAD(fib_data_head, fib_data), fib_data_list); @@ -1613,13 +1614,3 @@ vnet_fib_destroy(void) fib_error_clear(); FIB_MOD_UNLOCK(); } - -static void -fib_init(void) -{ - - mtx_init(&fib_mtx, "algo list mutex", NULL, MTX_DEF); - TAILQ_INIT(&all_algo_list); -} -SYSINIT(fib_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_SECOND, fib_init, NULL); - From owner-dev-commits-src-all@freebsd.org Mon Jan 11 01:17:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96D224C817C; Mon, 11 Jan 2021 01:17: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDbRb3bDxz4XGD; Mon, 11 Jan 2021 01:17: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 6E115125F1; Mon, 11 Jan 2021 01:17: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 10B1HlX7007683; Mon, 11 Jan 2021 01:17:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10B1HlbK007682; Mon, 11 Jan 2021 01:17:47 GMT (envelope-from git) Date: Mon, 11 Jan 2021 01:17:47 GMT Message-Id: <202101110117.10B1HlbK007682@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: ffd9daf078c6 - stable/12 - bsdcat, cpio, tar: derive version string from archive.h 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: ffd9daf078c67fd1b5805447e1ffa2031544d193 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 01:17:47 -0000 The branch stable/12 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=ffd9daf078c67fd1b5805447e1ffa2031544d193 commit ffd9daf078c67fd1b5805447e1ffa2031544d193 Author: Xin LI AuthorDate: 2020-12-29 21:38:47 +0000 Commit: Martin Matuska CommitDate: 2021-01-11 01:16:37 +0000 bsdcat,cpio,tar: derive version string from archive.h (cherry picked from commit 2ff66a915526b6509ca57f2046bc7b20b0de8a61) --- usr.bin/bsdcat/Makefile | 3 ++- usr.bin/cpio/Makefile | 3 ++- usr.bin/tar/Makefile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/bsdcat/Makefile b/usr.bin/bsdcat/Makefile index b9ce457a57f6..2e625cf553e5 100644 --- a/usr.bin/bsdcat/Makefile +++ b/usr.bin/bsdcat/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcat -BSDCAT_VERSION_STRING= 3.5.0 +BSDCAT_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cat SRCS= bsdcat.c cmdline.c diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile index d3dcb040a902..078963798afa 100644 --- a/usr.bin/cpio/Makefile +++ b/usr.bin/cpio/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio -BSDCPIO_VERSION_STRING= 3.5.0 +BSDCPIO_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index 09ad12ee3fa1..8b9b31169e72 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -4,7 +4,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PROG= bsdtar -BSDTAR_VERSION_STRING= 3.5.0 +BSDTAR_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ From owner-dev-commits-src-all@freebsd.org Mon Jan 11 01:19:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10BB04C86BB; Mon, 11 Jan 2021 01:19: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDbV601Qrz4XgY; Mon, 11 Jan 2021 01:19: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 E8189124AD; Mon, 11 Jan 2021 01:19: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 10B1Jvm1008119; Mon, 11 Jan 2021 01:19:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10B1Jv3H008118; Mon, 11 Jan 2021 01:19:57 GMT (envelope-from git) Date: Mon, 11 Jan 2021 01:19:57 GMT Message-Id: <202101110119.10B1Jv3H008118@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: 7e3d37d73d38 - stable/11 - bsdcat, cpio, tar: derive version string from archive.h 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: 7e3d37d73d382c6d36e4dcb36de79ac3f233be3e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 01:19:58 -0000 The branch stable/11 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=7e3d37d73d382c6d36e4dcb36de79ac3f233be3e commit 7e3d37d73d382c6d36e4dcb36de79ac3f233be3e Author: Xin LI AuthorDate: 2020-12-29 21:38:47 +0000 Commit: Martin Matuska CommitDate: 2021-01-11 01:19:25 +0000 bsdcat,cpio,tar: derive version string from archive.h (cherry picked from commit 2ff66a915526b6509ca57f2046bc7b20b0de8a61) --- usr.bin/bsdcat/Makefile | 3 ++- usr.bin/cpio/Makefile | 3 ++- usr.bin/tar/Makefile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/bsdcat/Makefile b/usr.bin/bsdcat/Makefile index 92ad8502c62e..2e13d108c45b 100644 --- a/usr.bin/bsdcat/Makefile +++ b/usr.bin/bsdcat/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcat -BSDCAT_VERSION_STRING= 3.5.0 +BSDCAT_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cat SRCS= bsdcat.c cmdline.c diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile index b5d53d14ee22..50d93c28aac0 100644 --- a/usr.bin/cpio/Makefile +++ b/usr.bin/cpio/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio -BSDCPIO_VERSION_STRING= 3.5.0 +BSDCPIO_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index c2c89652a87d..1e5cbc36015d 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -4,7 +4,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PROG= bsdtar -BSDTAR_VERSION_STRING= 3.5.0 +BSDTAR_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ From owner-dev-commits-src-all@freebsd.org Mon Jan 11 01:22:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 247774C86AD; Mon, 11 Jan 2021 01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDbXt0Zt9z4YFR; Mon, 11 Jan 2021 01:22: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 06DEB121F2; Mon, 11 Jan 2021 01: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 10B1MLh3019903; Mon, 11 Jan 2021 01: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 10B1ML2m019902; Mon, 11 Jan 2021 01:22:21 GMT (envelope-from git) Date: Mon, 11 Jan 2021 01:22:21 GMT Message-Id: <202101110122.10B1ML2m019902@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: 65ca6e859780 - stable/10 - bsdcat, cpio, tar: derive version string from archive.h 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/10 X-Git-Reftype: branch X-Git-Commit: 65ca6e859780da7c483ac4f811f599248c5c45c5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 01:22:22 -0000 The branch stable/10 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=65ca6e859780da7c483ac4f811f599248c5c45c5 commit 65ca6e859780da7c483ac4f811f599248c5c45c5 Author: Xin LI AuthorDate: 2020-12-29 21:38:47 +0000 Commit: Martin Matuska CommitDate: 2021-01-11 01:22:02 +0000 bsdcat,cpio,tar: derive version string from archive.h (cherry picked from commit 2ff66a915526b6509ca57f2046bc7b20b0de8a61) --- usr.bin/bsdcat/Makefile | 3 ++- usr.bin/cpio/Makefile | 3 ++- usr.bin/tar/Makefile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/bsdcat/Makefile b/usr.bin/bsdcat/Makefile index 992874f9eac4..c2864b7e7aba 100644 --- a/usr.bin/bsdcat/Makefile +++ b/usr.bin/bsdcat/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcat -BSDCAT_VERSION_STRING= 3.5.0 +BSDCAT_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cat SRCS= bsdcat.c cmdline.c diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile index 12211978fe83..ab2e6b74a897 100644 --- a/usr.bin/cpio/Makefile +++ b/usr.bin/cpio/Makefile @@ -6,7 +6,8 @@ LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive PROG= bsdcpio -BSDCPIO_VERSION_STRING= 3.5.0 +BSDCPIO_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index 78b74cb8455a..89f42289d88b 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -4,7 +4,8 @@ LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive PROG= bsdtar -BSDTAR_VERSION_STRING= 3.5.0 +BSDTAR_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ From owner-dev-commits-src-all@freebsd.org Mon Jan 11 01:26:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CBA6C4C8C55; Mon, 11 Jan 2021 01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDbdd4kTCz4Y0b; Mon, 11 Jan 2021 01: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 90D4912815; Mon, 11 Jan 2021 01: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 10B1QTVp020651; Mon, 11 Jan 2021 01: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 10B1QTCk020650; Mon, 11 Jan 2021 01:26:29 GMT (envelope-from git) Date: Mon, 11 Jan 2021 01:26:29 GMT Message-Id: <202101110126.10B1QTCk020650@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: 060bec6624fb - stable/12 - contrib/libarchive: Import libarchive 3.5.1 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: 060bec6624fb36120f21bb2c5db5e4e97f7cf38e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 01:26:29 -0000 The branch stable/12 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=060bec6624fb36120f21bb2c5db5e4e97f7cf38e commit 060bec6624fb36120f21bb2c5db5e4e97f7cf38e Author: Martin Matuska AuthorDate: 2020-12-27 23:34:06 +0000 Commit: Martin Matuska CommitDate: 2021-01-11 01:25:32 +0000 contrib/libarchive: Import libarchive 3.5.1 (cherry picked from commit 69a18c5826c9633a6d77e18f9f34e02c83d22717) --- contrib/libarchive/NEWS | 2 ++ contrib/libarchive/libarchive/archive.h | 4 ++-- contrib/libarchive/libarchive/archive_entry.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/libarchive/NEWS b/contrib/libarchive/NEWS index 598cf75166b1..47cebdd4b9b7 100644 --- a/contrib/libarchive/NEWS +++ b/contrib/libarchive/NEWS @@ -1,3 +1,5 @@ +Dec 26, 2020: libarchive 3.5.1 released + Dec 01, 2020: libarchive 3.5.0 released Oct 14, 2020: Support for system extended attributes diff --git a/contrib/libarchive/libarchive/archive.h b/contrib/libarchive/libarchive/archive.h index 7e55a926c740..55f0fad15730 100644 --- a/contrib/libarchive/libarchive/archive.h +++ b/contrib/libarchive/libarchive/archive.h @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3005000 +#define ARCHIVE_VERSION_NUMBER 3005001 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.5.0" +#define ARCHIVE_VERSION_ONLY_STRING "3.5.1" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); diff --git a/contrib/libarchive/libarchive/archive_entry.h b/contrib/libarchive/libarchive/archive_entry.h index 4b6cc257a63a..a1b9fe43fe22 100644 --- a/contrib/libarchive/libarchive/archive_entry.h +++ b/contrib/libarchive/libarchive/archive_entry.h @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3005000 +#define ARCHIVE_VERSION_NUMBER 3005001 /* * Note: archive_entry.h is for use outside of libarchive; the From owner-dev-commits-src-all@freebsd.org Mon Jan 11 01:29:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90B214C8C69; Mon, 11 Jan 2021 01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDbhZ3gvVz4Y8K; Mon, 11 Jan 2021 01: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 629F812079; Mon, 11 Jan 2021 01:29: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 10B1T2SB021128; Mon, 11 Jan 2021 01:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10B1T2un021127; Mon, 11 Jan 2021 01:29:02 GMT (envelope-from git) Date: Mon, 11 Jan 2021 01:29:02 GMT Message-Id: <202101110129.10B1T2un021127@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: a52a83deed5b - stable/11 - contrib/libarchive: Import libarchive 3.5.1 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: a52a83deed5b769a14e4a01f6859887eb1f245c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 01:29:02 -0000 The branch stable/11 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=a52a83deed5b769a14e4a01f6859887eb1f245c9 commit a52a83deed5b769a14e4a01f6859887eb1f245c9 Author: Martin Matuska AuthorDate: 2020-12-27 23:34:06 +0000 Commit: Martin Matuska CommitDate: 2021-01-11 01:28:43 +0000 contrib/libarchive: Import libarchive 3.5.1 (cherry picked from commit 69a18c5826c9633a6d77e18f9f34e02c83d22717) --- contrib/libarchive/NEWS | 2 ++ contrib/libarchive/libarchive/archive.h | 4 ++-- contrib/libarchive/libarchive/archive_entry.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/libarchive/NEWS b/contrib/libarchive/NEWS index 598cf75166b1..47cebdd4b9b7 100644 --- a/contrib/libarchive/NEWS +++ b/contrib/libarchive/NEWS @@ -1,3 +1,5 @@ +Dec 26, 2020: libarchive 3.5.1 released + Dec 01, 2020: libarchive 3.5.0 released Oct 14, 2020: Support for system extended attributes diff --git a/contrib/libarchive/libarchive/archive.h b/contrib/libarchive/libarchive/archive.h index 7e55a926c740..55f0fad15730 100644 --- a/contrib/libarchive/libarchive/archive.h +++ b/contrib/libarchive/libarchive/archive.h @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3005000 +#define ARCHIVE_VERSION_NUMBER 3005001 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.5.0" +#define ARCHIVE_VERSION_ONLY_STRING "3.5.1" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); diff --git a/contrib/libarchive/libarchive/archive_entry.h b/contrib/libarchive/libarchive/archive_entry.h index 4b6cc257a63a..a1b9fe43fe22 100644 --- a/contrib/libarchive/libarchive/archive_entry.h +++ b/contrib/libarchive/libarchive/archive_entry.h @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3005000 +#define ARCHIVE_VERSION_NUMBER 3005001 /* * Note: archive_entry.h is for use outside of libarchive; the From owner-dev-commits-src-all@freebsd.org Mon Jan 11 01:42:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96AF14C967B; Mon, 11 Jan 2021 01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDc0Q3t3Sz4ZCl; Mon, 11 Jan 2021 01: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 77B7212855; Mon, 11 Jan 2021 01: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 10B1gkRd046382; Mon, 11 Jan 2021 01: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 10B1gkxm046381; Mon, 11 Jan 2021 01:42:46 GMT (envelope-from git) Date: Mon, 11 Jan 2021 01:42:46 GMT Message-Id: <202101110142.10B1gkxm046381@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: 5f80b1e0ae5a - stable/10 - contrib/libarchive: Import libarchive 3.5.1 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/10 X-Git-Reftype: branch X-Git-Commit: 5f80b1e0ae5a78a18482d01f0b68622354ba35df Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 01:42:46 -0000 The branch stable/10 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=5f80b1e0ae5a78a18482d01f0b68622354ba35df commit 5f80b1e0ae5a78a18482d01f0b68622354ba35df Author: Martin Matuska AuthorDate: 2020-12-27 23:34:06 +0000 Commit: Martin Matuska CommitDate: 2021-01-11 01:34:58 +0000 contrib/libarchive: Import libarchive 3.5.1 (cherry picked from commit 69a18c5826c9633a6d77e18f9f34e02c83d22717) --- contrib/libarchive/NEWS | 2 ++ contrib/libarchive/libarchive/archive.h | 4 ++-- contrib/libarchive/libarchive/archive_entry.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/libarchive/NEWS b/contrib/libarchive/NEWS index 598cf75166b1..47cebdd4b9b7 100644 --- a/contrib/libarchive/NEWS +++ b/contrib/libarchive/NEWS @@ -1,3 +1,5 @@ +Dec 26, 2020: libarchive 3.5.1 released + Dec 01, 2020: libarchive 3.5.0 released Oct 14, 2020: Support for system extended attributes diff --git a/contrib/libarchive/libarchive/archive.h b/contrib/libarchive/libarchive/archive.h index 7e55a926c740..55f0fad15730 100644 --- a/contrib/libarchive/libarchive/archive.h +++ b/contrib/libarchive/libarchive/archive.h @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3005000 +#define ARCHIVE_VERSION_NUMBER 3005001 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.5.0" +#define ARCHIVE_VERSION_ONLY_STRING "3.5.1" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); diff --git a/contrib/libarchive/libarchive/archive_entry.h b/contrib/libarchive/libarchive/archive_entry.h index 4b6cc257a63a..a1b9fe43fe22 100644 --- a/contrib/libarchive/libarchive/archive_entry.h +++ b/contrib/libarchive/libarchive/archive_entry.h @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3005000 +#define ARCHIVE_VERSION_NUMBER 3005001 /* * Note: archive_entry.h is for use outside of libarchive; the From owner-dev-commits-src-all@freebsd.org Mon Jan 11 03:29:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91E444CB680; Mon, 11 Jan 2021 03:29: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDfM53Hbrz4fcT; Mon, 11 Jan 2021 03:29: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 63AEF13C6C; Mon, 11 Jan 2021 03:29: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 10B3T5Xa077751; Mon, 11 Jan 2021 03:29:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10B3T5H8077750; Mon, 11 Jan 2021 03:29:05 GMT (envelope-from git) Date: Mon, 11 Jan 2021 03:29:05 GMT Message-Id: <202101110329.10B3T5H8077750@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: af1878dac7b3 - main - pkgbase: Rename -acct package System Accounting Utilities 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: af1878dac7b338d7ce229c00776d8af69b357576 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 03:29:05 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=af1878dac7b338d7ce229c00776d8af69b357576 commit af1878dac7b338d7ce229c00776d8af69b357576 Author: Ed Maste AuthorDate: 2021-01-11 03:27:56 +0000 Commit: Ed Maste CommitDate: 2021-01-11 03:27:56 +0000 pkgbase: Rename -acct package System Accounting Utilities Man pages for these tools refer to 'system accounting'. --- 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 ee48bdb47534..febc70e6e4b9 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -2,8 +2,8 @@ # $FreeBSD$ # -acct_COMMENT= Accounting Utilties -acct_DESC= Accounting Utilties +acct_COMMENT= System Accounting Utilties +acct_DESC= System Accounting Utilties acpi_COMMENT= ACPI Utilities acpi_DESC= ACPI Utilities amd_COMMENT= AMD Utilities From owner-dev-commits-src-all@freebsd.org Mon Jan 11 05:54:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AE894CD69C; Mon, 11 Jan 2021 05:54:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDjZt262qz4kt3; Mon, 11 Jan 2021 05:54: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 2A62715471; Mon, 11 Jan 2021 05:54:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10B5sU1r070699; Mon, 11 Jan 2021 05:54:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10B5sUTt070698; Mon, 11 Jan 2021 05:54:30 GMT (envelope-from git) Date: Mon, 11 Jan 2021 05:54:30 GMT Message-Id: <202101110554.10B5sUTt070698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: c14e17a49cdd - main - dtrace tests: fix prototypes for gcc build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c14e17a49cdd72c8c05d12fbec631c409b14b9cb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 05:54:30 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=c14e17a49cdd72c8c05d12fbec631c409b14b9cb commit c14e17a49cdd72c8c05d12fbec631c409b14b9cb Author: Ryan Libby AuthorDate: 2021-01-11 05:53:15 +0000 Commit: Ryan Libby CommitDate: 2021-01-11 05:53:15 +0000 dtrace tests: fix prototypes for gcc build - quiet -Wstrict-prototypes - provide prototypes for weak aliases Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28036 --- .../cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c | 2 +- .../opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c | 2 +- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c | 5 +++-- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c index 965ad72278a1..ddbbae619aeb 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c @@ -41,7 +41,7 @@ f2(f func, int i) } int -main() +main(void) { f2(f1, 3); diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c index 7fe7b16d1d78..7786d58a4c65 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c @@ -66,7 +66,7 @@ fN2(f func, char *a, int i __unused) } int -main() +main(void) { /* * Avoid length of 1, 2, 4, or 8 bytes so DTrace will treat the data as diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c index 5680f2e177f6..d9b7f5a184a2 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c @@ -33,8 +33,7 @@ * leading underscores. */ -#pragma weak _go = go - +extern int _go(int); int go(int); int @@ -57,3 +56,5 @@ main(void) for (;;) getpid(); } + +#pragma weak _go = go diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c index 24a28420f3ef..49f486a460a3 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c @@ -33,14 +33,14 @@ * leading underscores. */ +extern int _go(int); + static int __unused go(int a) { return (a + 1); } -#pragma weak _go = go - static void handle(int sig __unused) { @@ -55,3 +55,5 @@ main(void) for (;;) getpid(); } + +#pragma weak _go = go From owner-dev-commits-src-all@freebsd.org Mon Jan 11 05:54:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CBE64CD709; Mon, 11 Jan 2021 05:54: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDjZv2fDcz4lJW; Mon, 11 Jan 2021 05:54: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 4C55D15472; Mon, 11 Jan 2021 05:54: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 10B5sVNN070722; Mon, 11 Jan 2021 05:54:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10B5sVSX070721; Mon, 11 Jan 2021 05:54:31 GMT (envelope-from git) Date: Mon, 11 Jan 2021 05:54:31 GMT Message-Id: <202101110554.10B5sVSX070721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: c86fa3b8d72f - main - pf: quiet -Wredundant-decls for pf_get_ruleset_number MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c86fa3b8d72f9f7221919753b304eec7f1a546cf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 05:54:31 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=c86fa3b8d72f9f7221919753b304eec7f1a546cf commit c86fa3b8d72f9f7221919753b304eec7f1a546cf Author: Ryan Libby AuthorDate: 2021-01-11 05:53:15 +0000 Commit: Ryan Libby CommitDate: 2021-01-11 05:53:15 +0000 pf: quiet -Wredundant-decls for pf_get_ruleset_number In e86bddea9fe62d5093a1942cf21950b3c5ca62e5 sys/netpfil/pf/pf.h grew a declaration of pf_get_ruleset_number. Now delete the old declaration from sys/net/pfvar.h. Reviewed by: kp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28081 --- sys/net/pfvar.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index c7df8ffd82c5..9c8c642a6ace 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1629,7 +1629,6 @@ VNET_DECLARE(struct pf_kanchor, pf_main_anchor); #define V_pf_main_anchor VNET(pf_main_anchor) #define pf_main_ruleset V_pf_main_anchor.ruleset -int pf_get_ruleset_number(u_int8_t); void pf_init_kruleset(struct pf_kruleset *); int pf_kanchor_setup(struct pf_krule *, const struct pf_kruleset *, const char *); From owner-dev-commits-src-all@freebsd.org Mon Jan 11 05:54:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 690E04CD473; Mon, 11 Jan 2021 05: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDjZw61nPz4kyY; Mon, 11 Jan 2021 05:54: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 72FAA15BA8; Mon, 11 Jan 2021 05:54: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 10B5sWcu070744; Mon, 11 Jan 2021 05:54:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10B5sW2q070743; Mon, 11 Jan 2021 05:54:32 GMT (envelope-from git) Date: Mon, 11 Jan 2021 05:54:32 GMT Message-Id: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 16079c7233be - main - hid: quiet -Wswitch MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16079c7233be8bd6c88e3421a70c7ca87cfea370 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 05:54:33 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=16079c7233be8bd6c88e3421a70c7ca87cfea370 commit 16079c7233be8bd6c88e3421a70c7ca87cfea370 Author: Ryan Libby AuthorDate: 2021-01-11 05:53:15 +0000 Commit: Ryan Libby CommitDate: 2021-01-11 05:53:15 +0000 hid: quiet -Wswitch Gcc builds complained that not all switch cases are handled. Add default cases to appease gcc. Reviewed by: hselasky (previous version), wulf Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28082 --- sys/dev/hid/hcons.c | 3 +++ sys/dev/hid/hgame.c | 4 ++++ sys/dev/hid/hpen.c | 3 +++ sys/dev/hid/ps4dshock.c | 13 +++++++++++++ 4 files changed, 23 insertions(+) diff --git a/sys/dev/hid/hcons.c b/sys/dev/hid/hcons.c index 559e84d468f3..33264116bc76 100644 --- a/sys/dev/hid/hcons.c +++ b/sys/dev/hid/hcons.c @@ -252,6 +252,9 @@ hcons_rel_volume_cb(HIDMAP_CB_ARGS) evdev_push_key(evdev, code, 1); evdev_push_key(evdev, code, 0); } + break; + default: + break; } return (0); diff --git a/sys/dev/hid/hgame.c b/sys/dev/hid/hgame.c index 099af092a4e5..545c72e76d93 100644 --- a/sys/dev/hid/hgame.c +++ b/sys/dev/hid/hgame.c @@ -126,6 +126,10 @@ hgame_dpad_cb(HIDMAP_CB_ARGS) sc->dpad_left = (data != 0); break; } + break; + + default: + break; } return (0); diff --git a/sys/dev/hid/hpen.c b/sys/dev/hid/hpen.c index 430461d87727..1d505e14089f 100644 --- a/sys/dev/hid/hpen.c +++ b/sys/dev/hid/hpen.c @@ -126,6 +126,9 @@ hpen_battery_strenght_cb(HIDMAP_CB_ARGS) case HIDMAP_CB_IS_RUNNING: data = ctx.data; /* TODO */ + break; + default: + break; } return (0); diff --git a/sys/dev/hid/ps4dshock.c b/sys/dev/hid/ps4dshock.c index e0448947853e..eec26f808997 100644 --- a/sys/dev/hid/ps4dshock.c +++ b/sys/dev/hid/ps4dshock.c @@ -808,6 +808,10 @@ ps4dshock_hat_switch_cb(HIDMAP_CB_ARGS) idx = MIN(nitems(hat_switch_map) - 1, (u_int)ctx.data); evdev_push_abs(evdev, ABS_HAT0X, hat_switch_map[idx].x); evdev_push_abs(evdev, ABS_HAT0Y, hat_switch_map[idx].y); + break; + + default: + break; } return (0); @@ -854,6 +858,9 @@ ps4dsacc_data_cb(HIDMAP_CB_ARGS) ((int64_t)ctx.data - calib->bias) * calib->sens_numer / calib->sens_denom); break; + + default: + break; } return (0); @@ -879,6 +886,9 @@ ps4dsacc_tstamp_cb(HIDMAP_CB_ARGS) sc->hw_tstamp = tstamp; evdev_push_msc(evdev, MSC_TIMESTAMP, sc->ev_tstamp); break; + + default: + break; } return (0); @@ -1020,6 +1030,9 @@ ps4dsmtp_final_cb(HIDMAP_CB_ARGS) evdev_sync(evdev); } break; + + default: + break; } /* Do execute callback at interrupt handler and detach */ From owner-dev-commits-src-all@freebsd.org Mon Jan 11 07:45:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF7254CFACB for ; Mon, 11 Jan 2021 07:45:25 +0000 (UTC) (envelope-from njm@njm.me.uk) Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) (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 4DDm2s3SBZz4qXs for ; Mon, 11 Jan 2021 07:45:24 +0000 (UTC) (envelope-from njm@njm.me.uk) Received: (qmail 36311 invoked from network); 11 Jan 2021 07:45:22 -0000 X-APM-Out-ID: 16103511223630 X-APM-Authkey: 18389/1(18389/1) 6 Received: from unknown (HELO meld.njm.me.uk) (86.158.98.186) by smtp001.apm-internet.net with SMTP; 11 Jan 2021 07:45:22 -0000 Received: from triton.njm.me.uk (triton.njm.me.uk [192.168.144.133]) by meld.njm.me.uk (8.16.1/8.16.1) with ESMTPS id 10B7jLrN016971 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Jan 2021 07:45:21 GMT (envelope-from njm@njm.me.uk) Received: from localhost (localhost [127.0.0.1]) by triton.njm.me.uk (8.16.1/8.16.1) with ESMTP id 10B7jKE5095944; Mon, 11 Jan 2021 07:45:21 GMT (envelope-from njm@njm.me.uk) Date: Mon, 11 Jan 2021 07:45:20 +0000 From: "N.J. Mann" To: Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: af1878dac7b3 - main - pkgbase: Rename -acct package System Accounting Utilities Message-ID: <62FD259BA7873753D7D603A3@triton.njm.me.uk> In-Reply-To: <202101110329.10B3T5H8077750@gitrepo.freebsd.org> References: <202101110329.10B3T5H8077750@gitrepo.freebsd.org> X-Mailer: Mulberry/4.0.8 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Rspamd-Queue-Id: 4DDm2s3SBZz4qXs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 07:45:25 -0000 Hi, On Monday, January 11, 2021 03:29:05 +0000 Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=af1878dac7b338d7ce229c00776d8af69b357576 > > commit af1878dac7b338d7ce229c00776d8af69b357576 > Author: Ed Maste > AuthorDate: 2021-01-11 03:27:56 +0000 > Commit: Ed Maste > CommitDate: 2021-01-11 03:27:56 +0000 > > pkgbase: Rename -acct package System Accounting Utilities > > Man pages for these tools refer to 'system accounting'. > --- > 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 ee48bdb47534..febc70e6e4b9 100644 > --- a/release/packages/Makefile.package > +++ b/release/packages/Makefile.package > @@ -2,8 +2,8 @@ > # $FreeBSD$ > # > > -acct_COMMENT= Accounting Utilties > -acct_DESC= Accounting Utilties > +acct_COMMENT= System Accounting Utilties > +acct_DESC= System Accounting Utilties Utilities has three 'i's. > acpi_COMMENT= ACPI Utilities > acpi_DESC= ACPI Utilities > amd_COMMENT= AMD Utilities Cheers, Nick. -- From owner-dev-commits-src-all@freebsd.org Mon Jan 11 13:44:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 232CF4D9C0A; Mon, 11 Jan 2021 13:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDw1B0YnXz3jMX; Mon, 11 Jan 2021 13:44: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 030D01BA8D; Mon, 11 Jan 2021 13:44: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 10BDiTju081888; Mon, 11 Jan 2021 13:44:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BDiT76081887; Mon, 11 Jan 2021 13:44:29 GMT (envelope-from git) Date: Mon, 11 Jan 2021 13:44:29 GMT Message-Id: <202101111344.10BDiT76081887@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: 8fc41ced9fe6 - main - pkgbase: correct typo in System Accounting Utilities 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: 8fc41ced9fe6a15091e268a702bd9159b18f0990 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 13:44:30 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8fc41ced9fe6a15091e268a702bd9159b18f0990 commit 8fc41ced9fe6a15091e268a702bd9159b18f0990 Author: Ed Maste AuthorDate: 2021-01-11 13:42:47 +0000 Commit: Ed Maste CommitDate: 2021-01-11 13:44:17 +0000 pkgbase: correct typo in System Accounting Utilities Reported by: avg, N. J. Mann --- 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 febc70e6e4b9..125732267008 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -2,8 +2,8 @@ # $FreeBSD$ # -acct_COMMENT= System Accounting Utilties -acct_DESC= System Accounting Utilties +acct_COMMENT= System Accounting Utilities +acct_DESC= System Accounting Utilities acpi_COMMENT= ACPI Utilities acpi_DESC= ACPI Utilities amd_COMMENT= AMD Utilities From owner-dev-commits-src-all@freebsd.org Mon Jan 11 14:53:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8340D4DBCB2; Mon, 11 Jan 2021 14:53: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDxYL3Hm4z3nsg; Mon, 11 Jan 2021 14:53: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 63CF01C25A; Mon, 11 Jan 2021 14:53: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 10BErwDx073695; Mon, 11 Jan 2021 14:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BErw5s073694; Mon, 11 Jan 2021 14:53:58 GMT (envelope-from git) Date: Mon, 11 Jan 2021 14:53:58 GMT Message-Id: <202101111453.10BErw5s073694@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: 44851ff2f65d - stable/12 - igmp: Avoid leaking mbuf when source validation fails 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: 44851ff2f65de3bdf3b3fa469a7bb5546e77e170 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 14:53:58 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=44851ff2f65de3bdf3b3fa469a7bb5546e77e170 commit 44851ff2f65de3bdf3b3fa469a7bb5546e77e170 Author: Mark Johnston AuthorDate: 2021-01-08 18:32:04 +0000 Commit: Mark Johnston CommitDate: 2021-01-11 14:41:55 +0000 igmp: Avoid leaking mbuf when source validation fails PR: 252504 Submitted by: Panagiotis Tsolakos (cherry picked from commit 501159696cb5204d94d03393e4bc5d82f2e348e6) --- sys/netinet/igmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 6f35f8156d23..a68a5a1ca9dd 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -1533,6 +1533,7 @@ igmp_input(struct mbuf **mp, int *offp, int proto) if (nsrc * sizeof(in_addr_t) > UINT16_MAX - iphlen - IGMP_V3_QUERY_MINLEN) { IGMPSTAT_INC(igps_rcv_tooshort); + m_freem(m); return (IPPROTO_DONE); } /* From owner-dev-commits-src-all@freebsd.org Mon Jan 11 14:53:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A706C4DBE97; Mon, 11 Jan 2021 14:53: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDxYM4K1gz3nwD; Mon, 11 Jan 2021 14:53: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 8769A1C800; Mon, 11 Jan 2021 14:53: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 10BErx4Y073716; Mon, 11 Jan 2021 14:53:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BErxde073715; Mon, 11 Jan 2021 14:53:59 GMT (envelope-from git) Date: Mon, 11 Jan 2021 14:53:59 GMT Message-Id: <202101111453.10BErxde073715@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: a0d7f3d90046 - stable/12 - safexcel: Stop using a stack buffer for the ring lock name 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: a0d7f3d9004675b0da39745a0e17747a8d55beb4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 14:53:59 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a0d7f3d9004675b0da39745a0e17747a8d55beb4 commit a0d7f3d9004675b0da39745a0e17747a8d55beb4 Author: Mark Johnston AuthorDate: 2021-01-08 18:32:04 +0000 Commit: Mark Johnston CommitDate: 2021-01-11 14:42:15 +0000 safexcel: Stop using a stack buffer for the ring lock name mtx_init() does not make a copy of the name so the buffer must be valid for the lifetime of the driver instance. Store each ring's lock's name in the ring structure. (cherry picked from commit 8ba6acbbe6995efcd12c375e1826d55e35a8bdc9) --- sys/dev/safexcel/safexcel.c | 6 +++--- sys/dev/safexcel/safexcel_var.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/safexcel/safexcel.c b/sys/dev/safexcel/safexcel.c index 9762a20e7c4d..079e9653bfb1 100644 --- a/sys/dev/safexcel/safexcel.c +++ b/sys/dev/safexcel/safexcel.c @@ -783,15 +783,15 @@ safexcel_init_rings(struct safexcel_softc *sc) { struct safexcel_cmd_descr *cdesc; struct safexcel_ring *ring; - char buf[32]; uint64_t atok; int i, j; for (i = 0; i < sc->sc_config.rings; i++) { ring = &sc->sc_ring[i]; - snprintf(buf, sizeof(buf), "safexcel_ring%d", i); - mtx_init(&ring->mtx, buf, NULL, MTX_DEF); + snprintf(ring->lockname, sizeof(ring->lockname), + "safexcel_ring%d", i); + mtx_init(&ring->mtx, ring->lockname, NULL, MTX_DEF); STAILQ_INIT(&ring->free_requests); STAILQ_INIT(&ring->ready_requests); STAILQ_INIT(&ring->queued_requests); diff --git a/sys/dev/safexcel/safexcel_var.h b/sys/dev/safexcel/safexcel_var.h index 4c6b9b73642a..b35ea8cead7b 100644 --- a/sys/dev/safexcel/safexcel_var.h +++ b/sys/dev/safexcel/safexcel_var.h @@ -392,6 +392,8 @@ struct safexcel_ring { struct safexcel_dma_mem dma_atok; bus_dma_tag_t data_dtag; + + char lockname[32]; }; struct safexcel_intr_handle { From owner-dev-commits-src-all@freebsd.org Mon Jan 11 14:54:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78FB84DBCBC; Mon, 11 Jan 2021 14:54: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDxYN60J6z3nwH; Mon, 11 Jan 2021 14:54: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 A56191C529; Mon, 11 Jan 2021 14:54: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 10BEs0e9073738; Mon, 11 Jan 2021 14:54:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BEs00Y073737; Mon, 11 Jan 2021 14:54:00 GMT (envelope-from git) Date: Mon, 11 Jan 2021 14:54:00 GMT Message-Id: <202101111454.10BEs00Y073737@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: e222e1ff8909 - stable/12 - safexcel: Fix a race around unblocking of crypto ops 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: e222e1ff890957ba6c62dfd2d2bf4cb22f87997a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 14:54:01 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e222e1ff890957ba6c62dfd2d2bf4cb22f87997a commit e222e1ff890957ba6c62dfd2d2bf4cb22f87997a Author: Mark Johnston AuthorDate: 2021-01-08 18:32:04 +0000 Commit: Mark Johnston CommitDate: 2021-01-11 14:43:00 +0000 safexcel: Fix a race around unblocking of crypto ops safexcel_ring_intr() could fail to observed that sc_blocked is set after completing all outstanding ops for a ring, in which case blocked ops would be deferred forever. Request structures are managed by individual rings, so move the "blocked" flag into the per-ring state block and use the ring lock to synchronize with safexcel_process(). Remove sc_mtx since it is now unused. (cherry picked from commit 092cf8d63f9fb9153c677f5793135926edc101d7) --- sys/dev/safexcel/safexcel.c | 27 +++++++++------------------ sys/dev/safexcel/safexcel_var.h | 4 ++-- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/sys/dev/safexcel/safexcel.c b/sys/dev/safexcel/safexcel.c index 079e9653bfb1..c1736fc5f080 100644 --- a/sys/dev/safexcel/safexcel.c +++ b/sys/dev/safexcel/safexcel.c @@ -160,8 +160,9 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) struct safexcel_res_descr *rdesc; struct safexcel_request *req; struct safexcel_ring *ring; - uint32_t error, i, ncdescs, nrdescs, nreqs; + uint32_t blocked, error, i, ncdescs, nrdescs, nreqs; + blocked = 0; ring = &sc->sc_ring[ringidx]; mtx_lock(&ring->mtx); @@ -231,6 +232,8 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) SAFEXCEL_HIA_RDR(sc, ringidx) + SAFEXCEL_HIA_xDR_PROC_COUNT, SAFEXCEL_xDR_PROC_xD_PKT(nreqs) | (sc->sc_config.rd_offset * nrdescs * sizeof(uint32_t))); + blocked = ring->blocked; + ring->blocked = 0; } out: if (!STAILQ_EMPTY(&ring->queued_requests)) { @@ -239,6 +242,9 @@ out: SAFEXCEL_HIA_CDR_THRESH_PKT_MODE | 1); } mtx_unlock(&ring->mtx); + + if (blocked) + crypto_unblock(sc->sc_cid, blocked); } static void @@ -248,7 +254,7 @@ safexcel_ring_intr(void *arg) struct safexcel_intr_handle *ih; uint32_t status, stat; int ring; - bool blocked, rdrpending; + bool rdrpending; ih = arg; sc = ih->sc; @@ -281,14 +287,6 @@ safexcel_ring_intr(void *arg) if (rdrpending) safexcel_rdr_intr(sc, ring); - - mtx_lock(&sc->sc_mtx); - blocked = sc->sc_blocked; - sc->sc_blocked = 0; - mtx_unlock(&sc->sc_mtx); - - if (blocked) - crypto_unblock(sc->sc_cid, blocked); } static int @@ -1100,8 +1098,6 @@ safexcel_alloc_dev_resources(struct safexcel_softc *sc) goto out; } - mtx_init(&sc->sc_mtx, "safexcel softc", NULL, MTX_DEF); - return (0); out: @@ -1118,8 +1114,6 @@ safexcel_free_dev_resources(struct safexcel_softc *sc) { int i; - mtx_destroy(&sc->sc_mtx); - for (i = 0; i < SAFEXCEL_MAX_RINGS && sc->sc_intr[i] != NULL; i++) bus_release_resource(sc->sc_dev, SYS_RES_IRQ, rman_get_rid(sc->sc_intr[i]), sc->sc_intr[i]); @@ -1163,7 +1157,6 @@ safexcel_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - sc->sc_blocked = 0; sc->sc_cid = -1; if (safexcel_alloc_dev_resources(sc)) @@ -2666,10 +2659,8 @@ safexcel_process(device_t dev, struct cryptop *crp, int hint) mtx_lock(&ring->mtx); req = safexcel_alloc_request(sc, ring); if (__predict_false(req == NULL)) { - mtx_lock(&sc->sc_mtx); + ring->blocked = CRYPTO_SYMQ; mtx_unlock(&ring->mtx); - sc->sc_blocked = CRYPTO_SYMQ; - mtx_unlock(&sc->sc_mtx); return (ERESTART); } diff --git a/sys/dev/safexcel/safexcel_var.h b/sys/dev/safexcel/safexcel_var.h index b35ea8cead7b..3ced5055545a 100644 --- a/sys/dev/safexcel/safexcel_var.h +++ b/sys/dev/safexcel/safexcel_var.h @@ -385,6 +385,8 @@ struct safexcel_ring { struct sglist *res_data; struct safexcel_res_descr_ring rdr; + int blocked; + struct safexcel_request *requests; STAILQ_HEAD(, safexcel_request) ready_requests; STAILQ_HEAD(, safexcel_request) queued_requests; @@ -413,9 +415,7 @@ struct safexcel_softc { struct safexcel_ring sc_ring[SAFEXCEL_MAX_RINGS]; int sc_ringidx; - struct mtx sc_mtx; - int sc_blocked; int32_t sc_cid; struct safexcel_reg_offsets sc_offsets; struct safexcel_config sc_config; From owner-dev-commits-src-all@freebsd.org Mon Jan 11 14:54:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6CB54DBCCC; Mon, 11 Jan 2021 14:54: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDxYQ0D3tz3nnN; Mon, 11 Jan 2021 14:54: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 D80711C7BB; Mon, 11 Jan 2021 14:54: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 10BEs1Ke073756; Mon, 11 Jan 2021 14:54:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BEs121073755; Mon, 11 Jan 2021 14:54:01 GMT (envelope-from git) Date: Mon, 11 Jan 2021 14:54:01 GMT Message-Id: <202101111454.10BEs121073755@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: ee01a1e7d862 - stable/12 - mpr, mps: Fix an off-by-one bug in the BTDH_MAPPING ioctl 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: ee01a1e7d862a5a33b43b8ae9da220d83f089c21 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 14:54:06 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ee01a1e7d862a5a33b43b8ae9da220d83f089c21 commit ee01a1e7d862a5a33b43b8ae9da220d83f089c21 Author: Mark Johnston AuthorDate: 2021-01-08 18:32:05 +0000 Commit: Mark Johnston CommitDate: 2021-01-11 14:43:17 +0000 mpr, mps: Fix an off-by-one bug in the BTDH_MAPPING ioctl The device mapping table contains sc->max_devices entries, so only indices in [0, sc->max_devices) are valid. Differential Revision: https://reviews.freebsd.org/D27964 (cherry picked from commit adc0dcc352bb9f5a67a054d95c6959ea5aa26d91) --- sys/dev/mpr/mpr_user.c | 2 +- sys/dev/mps/mps_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index 9bcc7f78da0f..1b2aa398b22b 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -2232,7 +2232,7 @@ mpr_user_btdh(struct mpr_softc *sc, mpr_btdh_mapping_t *data) if (bus != 0) return (EINVAL); - if (target > sc->max_devices) { + if (target >= sc->max_devices) { mpr_dprint(sc, MPR_XINFO, "Target ID is out of range " "for Bus/Target to DevHandle mapping."); return (EINVAL); diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c index 15ae463a1ad1..af1526c36d4c 100644 --- a/sys/dev/mps/mps_user.c +++ b/sys/dev/mps/mps_user.c @@ -2135,7 +2135,7 @@ mps_user_btdh(struct mps_softc *sc, mps_btdh_mapping_t *data) if (bus != 0) return (EINVAL); - if (target > sc->max_devices) { + if (target >= sc->max_devices) { mps_dprint(sc, MPS_FAULT, "Target ID is out of range " "for Bus/Target to DevHandle mapping."); return (EINVAL); From owner-dev-commits-src-all@freebsd.org Mon Jan 11 14:54:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06BF94DBB62; Mon, 11 Jan 2021 14:54: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDxYS4S6pz3nnc; Mon, 11 Jan 2021 14:54: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 0E7121C3B7; Mon, 11 Jan 2021 14:54: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 10BEs2GG073778; Mon, 11 Jan 2021 14:54:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BEs2VB073777; Mon, 11 Jan 2021 14:54:02 GMT (envelope-from git) Date: Mon, 11 Jan 2021 14:54:02 GMT Message-Id: <202101111454.10BEs2VB073777@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: ed6fa9d618bf - stable/12 - mpr, mps: Fix a stack buffer overflow in the user passthru ioctl 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: ed6fa9d618bff47dcd3fb000e5805e29d331578d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 14:54:08 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ed6fa9d618bff47dcd3fb000e5805e29d331578d commit ed6fa9d618bff47dcd3fb000e5805e29d331578d Author: Mark Johnston AuthorDate: 2021-01-08 18:32:04 +0000 Commit: Mark Johnston CommitDate: 2021-01-11 14:43:37 +0000 mpr, mps: Fix a stack buffer overflow in the user passthru ioctl Previously we copied in the request into a stack-allocated structure that could be smaller than the request size. Furthermore, we checked the request size only after doing the copyin. Fix this by allocating a buffer to hold the request, then copying the buffer's contents into a command descriptor. This is a bit heavy-handed but I expect the overhead will not be noticeable. The approach of coping the header in first is susceptible to TOCTOU problems. Reviewed by: imp Reported by: maxpl0it@protonmail.com Differential Revision: https://reviews.freebsd.org/D27963 (cherry picked from commit de828a91db29fb20440e0d92f3d3136b314a9584) --- sys/dev/mpr/mpr_user.c | 30 +++++++++++++++--------------- sys/dev/mps/mps_user.c | 32 ++++++++++++++++---------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index 1b2aa398b22b..3995d01154f7 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -737,11 +737,12 @@ RetFree: static int mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) { - MPI2_REQUEST_HEADER *hdr, tmphdr; + MPI2_REQUEST_HEADER *hdr, *tmphdr; MPI2_DEFAULT_REPLY *rpl; Mpi26NVMeEncapsulatedErrorReply_t *nvme_error_reply = NULL; Mpi26NVMeEncapsulatedRequest_t *nvme_encap_request = NULL; struct mpr_command *cm = NULL; + void *req = NULL; int i, err = 0, dir = 0, sz; uint8_t tool, function = 0; u_int sense_len; @@ -793,22 +794,21 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) data->ReplySize, data->PtrData, data->DataSize, data->PtrDataOut, data->DataOutSize, data->DataDirection); - /* - * copy in the header so we know what we're dealing with before we - * commit to allocating a command for it. - */ - err = copyin(PTRIN(data->PtrRequest), &tmphdr, data->RequestSize); - if (err != 0) - goto RetFreeUnlocked; - - if (data->RequestSize > (int)sc->reqframesz) { + if (data->RequestSize > sc->reqframesz) { err = EINVAL; goto RetFreeUnlocked; } - function = tmphdr.Function; + req = malloc(data->RequestSize, M_MPRUSER, M_WAITOK | M_ZERO); + tmphdr = (MPI2_REQUEST_HEADER *)req; + + err = copyin(PTRIN(data->PtrRequest), req, data->RequestSize); + if (err != 0) + goto RetFreeUnlocked; + + function = tmphdr->Function; mpr_dprint(sc, MPR_USER, "%s: Function %02X MsgFlags %02X\n", __func__, - function, tmphdr.MsgFlags); + function, tmphdr->MsgFlags); /* * Handle a passthru TM request. @@ -825,7 +825,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) /* Copy the header in. Only a small fixup is needed. */ task = (MPI2_SCSI_TASK_MANAGE_REQUEST *)cm->cm_req; - bcopy(&tmphdr, task, data->RequestSize); + memcpy(task, req, data->RequestSize); task->TaskMID = cm->cm_desc.Default.SMID; cm->cm_data = NULL; @@ -872,7 +872,6 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) mpr_lock(sc); cm = mpr_alloc_command(sc); - if (cm == NULL) { mpr_printf(sc, "%s: no mpr requests\n", __func__); err = ENOMEM; @@ -881,7 +880,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) mpr_unlock(sc); hdr = (MPI2_REQUEST_HEADER *)cm->cm_req; - bcopy(&tmphdr, hdr, data->RequestSize); + memcpy(hdr, req, data->RequestSize); /* * Do some checking to make sure the IOCTL request contains a valid @@ -1154,6 +1153,7 @@ RetFree: Ret: sc->mpr_flags &= ~MPR_FLAGS_BUSY; mpr_unlock(sc); + free(req, M_MPRUSER); return (err); } diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c index af1526c36d4c..ab4d1d2d86f3 100644 --- a/sys/dev/mps/mps_user.c +++ b/sys/dev/mps/mps_user.c @@ -677,7 +677,7 @@ mps_user_command(struct mps_softc *sc, struct mps_usr_command *cmd) mps_dprint(sc, MPS_USER, "%s: req %p %d rpl %p %d\n", __func__, cmd->req, cmd->req_len, cmd->rpl, cmd->rpl_len); - if (cmd->req_len > (int)sc->reqframesz) { + if (cmd->req_len > sc->reqframesz) { err = EINVAL; goto RetFreeUnlocked; } @@ -750,9 +750,10 @@ RetFree: static int mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) { - MPI2_REQUEST_HEADER *hdr, tmphdr; + MPI2_REQUEST_HEADER *hdr, *tmphdr; MPI2_DEFAULT_REPLY *rpl = NULL; struct mps_command *cm = NULL; + void *req = NULL; int err = 0, dir = 0, sz; uint8_t function = 0; u_int sense_len; @@ -804,22 +805,21 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) data->ReplySize, data->PtrData, data->DataSize, data->PtrDataOut, data->DataOutSize, data->DataDirection); - /* - * copy in the header so we know what we're dealing with before we - * commit to allocating a command for it. - */ - err = copyin(PTRIN(data->PtrRequest), &tmphdr, data->RequestSize); - if (err != 0) - goto RetFreeUnlocked; - - if (data->RequestSize > (int)sc->reqframesz) { + if (data->RequestSize > sc->reqframesz) { err = EINVAL; goto RetFreeUnlocked; } - function = tmphdr.Function; + req = malloc(data->RequestSize, M_MPSUSER, M_WAITOK | M_ZERO); + tmphdr = (MPI2_REQUEST_HEADER *)req; + + err = copyin(PTRIN(data->PtrRequest), req, data->RequestSize); + if (err != 0) + goto RetFreeUnlocked; + + function = tmphdr->Function; mps_dprint(sc, MPS_USER, "%s: Function %02X MsgFlags %02X\n", __func__, - function, tmphdr.MsgFlags); + function, tmphdr->MsgFlags); /* * Handle a passthru TM request. @@ -836,7 +836,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) /* Copy the header in. Only a small fixup is needed. */ task = (MPI2_SCSI_TASK_MANAGE_REQUEST *)cm->cm_req; - bcopy(&tmphdr, task, data->RequestSize); + memcpy(task, req, data->RequestSize); task->TaskMID = cm->cm_desc.Default.SMID; cm->cm_data = NULL; @@ -883,7 +883,6 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) mps_lock(sc); cm = mps_alloc_command(sc); - if (cm == NULL) { mps_printf(sc, "%s: no mps requests\n", __func__); err = ENOMEM; @@ -892,7 +891,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) mps_unlock(sc); hdr = (MPI2_REQUEST_HEADER *)cm->cm_req; - bcopy(&tmphdr, hdr, data->RequestSize); + memcpy(hdr, req, data->RequestSize); /* * Do some checking to make sure the IOCTL request contains a valid @@ -1059,6 +1058,7 @@ RetFreeUnlocked: Ret: sc->mps_flags &= ~MPS_FLAGS_BUSY; mps_unlock(sc); + free(req, M_MPSUSER); return (err); } From owner-dev-commits-src-all@freebsd.org Mon Jan 11 15:36:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E02E34DCD59; Mon, 11 Jan 2021 15:36: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDyTx61zXz3rFB; Mon, 11 Jan 2021 15:36: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 C1D281CE79; Mon, 11 Jan 2021 15:36: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 10BFa5X8026580; Mon, 11 Jan 2021 15:36:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BFa5qf026579; Mon, 11 Jan 2021 15:36:05 GMT (envelope-from git) Date: Mon, 11 Jan 2021 15:36:05 GMT Message-Id: <202101111536.10BFa5qf026579@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 5ed9deef6b1e - main - xen: update interface headers 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: 5ed9deef6b1e781931dc0195e4f9924a2d1ee189 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 15:36:05 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=5ed9deef6b1e781931dc0195e4f9924a2d1ee189 commit 5ed9deef6b1e781931dc0195e4f9924a2d1ee189 Author: Roger Pau Monné AuthorDate: 2020-12-30 11:31:12 +0000 Commit: Roger Pau Monné CommitDate: 2021-01-11 15:14:59 +0000 xen: update interface headers This is a verbatim copy of the public headers from Xen 4.14.1. No functional change intended. Sponsored by: Citrix Systems R&D --- sys/xen/interface/arch-arm.h | 92 +- sys/xen/interface/arch-arm/smccc.h | 66 ++ sys/xen/interface/arch-x86/cpufeatureset.h | 295 ++++++ sys/xen/interface/arch-x86/cpuid.h | 42 +- sys/xen/interface/arch-x86/hvm/.save.h.swp | Bin 0 -> 16384 bytes sys/xen/interface/arch-x86/hvm/save.h | 148 +-- sys/xen/interface/arch-x86/pmu.h | 13 +- sys/xen/interface/arch-x86/xen-mca.h | 73 +- sys/xen/interface/arch-x86/xen-x86_32.h | 70 +- sys/xen/interface/arch-x86/xen-x86_64.h | 101 +- sys/xen/interface/arch-x86/xen.h | 96 +- sys/xen/interface/arch-x86_32.h | 4 +- sys/xen/interface/arch-x86_64.h | 4 +- sys/xen/interface/argo.h | 255 ++++++ sys/xen/interface/device_tree_defs.h | 42 + sys/xen/interface/dom0_ops.h | 4 +- sys/xen/interface/domctl.h | 521 ++++++----- sys/xen/interface/elfnote.h | 9 +- sys/xen/interface/errno.h | 54 +- sys/xen/interface/event_channel.h | 7 +- sys/xen/interface/features.h | 16 +- sys/xen/interface/grant_table.h | 24 +- sys/xen/interface/hvm/dm_op.h | 480 ++++++++++ sys/xen/interface/hvm/e820.h | 5 +- sys/xen/interface/hvm/hvm_info_table.h | 10 +- sys/xen/interface/hvm/hvm_op.h | 359 +++----- sys/xen/interface/hvm/hvm_vcpu.h | 144 +++ sys/xen/interface/hvm/hvm_xs_strings.h | 7 + sys/xen/interface/hvm/ioreq.h | 18 +- sys/xen/interface/hvm/params.h | 164 +++- sys/xen/interface/hvm/pvdrivers.h | 6 +- sys/xen/interface/hvm/save.h | 45 +- sys/xen/interface/hypfs.h | 129 +++ sys/xen/interface/io/9pfs.h | 49 + sys/xen/interface/io/blkif.h | 112 ++- sys/xen/interface/io/cameraif.h | 1374 ++++++++++++++++++++++++++++ sys/xen/interface/io/console.h | 9 +- sys/xen/interface/io/displif.h | 872 ++++++++++++++++++ sys/xen/interface/io/fsif.h | 8 +- sys/xen/interface/io/kbdif.h | 498 +++++++++- sys/xen/interface/io/libxenvchan.h | 1 + sys/xen/interface/io/netif.h | 801 ++++++++++++++-- sys/xen/interface/io/protocols.h | 2 +- sys/xen/interface/io/pvcalls.h | 160 ++++ sys/xen/interface/io/ring.h | 222 ++++- sys/xen/interface/io/sndif.h | 1091 ++++++++++++++++++++++ sys/xen/interface/io/tpmif.h | 1 + sys/xen/interface/io/usbif.h | 6 +- sys/xen/interface/io/vscsiif.h | 77 +- sys/xen/interface/io/xs_wire.h | 10 +- sys/xen/interface/kexec.h | 28 +- sys/xen/interface/memory.h | 161 +++- sys/xen/interface/nmi.h | 4 +- sys/xen/interface/physdev.h | 10 +- sys/xen/interface/platform.h | 10 +- sys/xen/interface/pmu.h | 14 +- sys/xen/interface/sched.h | 29 +- sys/xen/interface/sysctl.h | 604 +++++++++--- sys/xen/interface/tmem.h | 22 +- sys/xen/interface/trace.h | 12 +- sys/xen/interface/vcpu.h | 26 +- sys/xen/interface/version.h | 25 +- sys/xen/interface/vm_event.h | 196 +++- sys/xen/interface/xen-compat.h | 15 +- sys/xen/interface/xen.h | 223 +++-- sys/xen/interface/xenoprof.h | 6 +- sys/xen/interface/xsm/flask_op.h | 6 +- 67 files changed, 8785 insertions(+), 1202 deletions(-) diff --git a/sys/xen/interface/arch-arm.h b/sys/xen/interface/arch-arm.h index 9a96401878f5..c365b1b39eaa 100644 --- a/sys/xen/interface/arch-arm.h +++ b/sys/xen/interface/arch-arm.h @@ -61,15 +61,15 @@ * * All memory which is shared with other entities in the system * (including the hypervisor and other guests) must reside in memory - * which is mapped as Normal Inner-cacheable. This applies to: + * which is mapped as Normal Inner Write-Back Outer Write-Back Inner-Shareable. + * This applies to: * - hypercall arguments passed via a pointer to guest memory. * - memory shared via the grant table mechanism (including PV I/O * rings etc). * - memory shared with the hypervisor (struct shared_info, struct * vcpu_info, the grant table, etc). * - * Any Inner cache allocation strategy (Write-Back, Write-Through etc) - * is acceptable. There is no restriction on the Outer-cacheability. + * Any cache allocation hints are acceptable. */ /* @@ -173,7 +173,7 @@ typedef union { type *p; unsigned long q; } \ __guest_handle_ ## name; \ typedef union { type *p; uint64_aligned_t q; } \ - __guest_handle_64_ ## name; + __guest_handle_64_ ## name /* * XEN_GUEST_HANDLE represents a guest pointer, when passed as a field @@ -195,11 +195,22 @@ _sxghr_tmp->q = 0; \ _sxghr_tmp->p = val; \ } while ( 0 ) -#ifdef __XEN_TOOLS__ -#define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) -#endif #define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val) +typedef uint64_t xen_pfn_t; +#define PRI_xen_pfn PRIx64 +#define PRIu_xen_pfn PRIu64 + +/* + * Maximum number of virtual CPUs in legacy multi-processor guests. + * Only one. All other VCPUS must use VCPUOP_register_vcpu_info. + */ +#define XEN_LEGACY_MAX_VCPUS 1 + +typedef uint64_t xen_ulong_t; +#define PRI_xen_ulong PRIx64 + +#if defined(__XEN__) || defined(__XEN_TOOLS__) #if defined(__GNUC__) && !defined(__STRICT_ANSI__) /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */ # define __DECL_REG(n64, n32) union { \ @@ -275,17 +286,6 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t); #undef __DECL_REG -typedef uint64_t xen_pfn_t; -#define PRI_xen_pfn PRIx64 - -/* Maximum number of virtual CPUs in legacy multi-processor guests. */ -/* Only one. All other VCPUS must use VCPUOP_register_vcpu_info */ -#define XEN_LEGACY_MAX_VCPUS 1 - -typedef uint64_t xen_ulong_t; -#define PRI_xen_ulong PRIx64 - -#if defined(__XEN__) || defined(__XEN_TOOLS__) struct vcpu_guest_context { #define _VGCF_online 0 #define VGCF_online (1<<_VGCF_online) @@ -293,7 +293,7 @@ struct vcpu_guest_context { struct vcpu_guest_core_regs user_regs; /* Core CPU registers */ - uint32_t sctlr; + uint64_t sctlr; uint64_t ttbcr, ttbr0, ttbr1; }; typedef struct vcpu_guest_context vcpu_guest_context_t; @@ -306,10 +306,16 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t); #define XEN_DOMCTL_CONFIG_GIC_NATIVE 0 #define XEN_DOMCTL_CONFIG_GIC_V2 1 #define XEN_DOMCTL_CONFIG_GIC_V3 2 + +#define XEN_DOMCTL_CONFIG_TEE_NONE 0 +#define XEN_DOMCTL_CONFIG_TEE_OPTEE 1 + struct xen_arch_domainconfig { /* IN/OUT */ uint8_t gic_version; /* IN */ + uint16_t tee_type; + /* IN */ uint32_t nr_spis; /* * OUT @@ -376,7 +382,7 @@ typedef uint64_t xen_callback_t; #define PSR_GUEST32_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC) #define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h) -#define SCTLR_GUEST_INIT 0x00c50078 +#define SCTLR_GUEST_INIT xen_mk_ullong(0x00c50078) /* * Virtual machine platform (memory layout, interrupts) @@ -394,38 +400,45 @@ typedef uint64_t xen_callback_t; */ /* vGIC v2 mappings */ -#define GUEST_GICD_BASE 0x03001000ULL -#define GUEST_GICD_SIZE 0x00001000ULL -#define GUEST_GICC_BASE 0x03002000ULL -#define GUEST_GICC_SIZE 0x00000100ULL +#define GUEST_GICD_BASE xen_mk_ullong(0x03001000) +#define GUEST_GICD_SIZE xen_mk_ullong(0x00001000) +#define GUEST_GICC_BASE xen_mk_ullong(0x03002000) +#define GUEST_GICC_SIZE xen_mk_ullong(0x00002000) /* vGIC v3 mappings */ -#define GUEST_GICV3_GICD_BASE 0x03001000ULL -#define GUEST_GICV3_GICD_SIZE 0x00010000ULL +#define GUEST_GICV3_GICD_BASE xen_mk_ullong(0x03001000) +#define GUEST_GICV3_GICD_SIZE xen_mk_ullong(0x00010000) -#define GUEST_GICV3_RDIST_STRIDE 0x20000ULL #define GUEST_GICV3_RDIST_REGIONS 1 -#define GUEST_GICV3_GICR0_BASE 0x03020000ULL /* vCPU0 - vCPU127 */ -#define GUEST_GICV3_GICR0_SIZE 0x01000000ULL +#define GUEST_GICV3_GICR0_BASE xen_mk_ullong(0x03020000) /* vCPU0..127 */ +#define GUEST_GICV3_GICR0_SIZE xen_mk_ullong(0x01000000) + +/* ACPI tables physical address */ +#define GUEST_ACPI_BASE xen_mk_ullong(0x20000000) +#define GUEST_ACPI_SIZE xen_mk_ullong(0x02000000) + +/* PL011 mappings */ +#define GUEST_PL011_BASE xen_mk_ullong(0x22000000) +#define GUEST_PL011_SIZE xen_mk_ullong(0x00001000) /* * 16MB == 4096 pages reserved for guest to use as a region to map its * grant table in. */ -#define GUEST_GNTTAB_BASE 0x38000000ULL -#define GUEST_GNTTAB_SIZE 0x01000000ULL +#define GUEST_GNTTAB_BASE xen_mk_ullong(0x38000000) +#define GUEST_GNTTAB_SIZE xen_mk_ullong(0x01000000) -#define GUEST_MAGIC_BASE 0x39000000ULL -#define GUEST_MAGIC_SIZE 0x01000000ULL +#define GUEST_MAGIC_BASE xen_mk_ullong(0x39000000) +#define GUEST_MAGIC_SIZE xen_mk_ullong(0x01000000) #define GUEST_RAM_BANKS 2 -#define GUEST_RAM0_BASE 0x40000000ULL /* 3GB of low RAM @ 1GB */ -#define GUEST_RAM0_SIZE 0xc0000000ULL +#define GUEST_RAM0_BASE xen_mk_ullong(0x40000000) /* 3GB of low RAM @ 1GB */ +#define GUEST_RAM0_SIZE xen_mk_ullong(0xc0000000) -#define GUEST_RAM1_BASE 0x0200000000ULL /* 1016GB of RAM @ 8GB */ -#define GUEST_RAM1_SIZE 0xfe00000000ULL +#define GUEST_RAM1_BASE xen_mk_ullong(0x0200000000) /* 1016GB of RAM @ 8GB */ +#define GUEST_RAM1_SIZE xen_mk_ullong(0xfe00000000) #define GUEST_RAM_BASE GUEST_RAM0_BASE /* Lowest RAM address */ /* Largest amount of actual RAM, not including holes */ @@ -434,12 +447,17 @@ typedef uint64_t xen_callback_t; #define GUEST_RAM_BANK_BASES { GUEST_RAM0_BASE, GUEST_RAM1_BASE } #define GUEST_RAM_BANK_SIZES { GUEST_RAM0_SIZE, GUEST_RAM1_SIZE } +/* Current supported guest VCPUs */ +#define GUEST_MAX_VCPUS 128 + /* Interrupts */ #define GUEST_TIMER_VIRT_PPI 27 #define GUEST_TIMER_PHYS_S_PPI 29 #define GUEST_TIMER_PHYS_NS_PPI 30 #define GUEST_EVTCHN_PPI 31 +#define GUEST_VPL011_SPI 32 + /* PSCI functions */ #define PSCI_cpu_suspend 0 #define PSCI_cpu_off 1 diff --git a/sys/xen/interface/arch-arm/smccc.h b/sys/xen/interface/arch-arm/smccc.h new file mode 100644 index 000000000000..17dc6d8829e6 --- /dev/null +++ b/sys/xen/interface/arch-arm/smccc.h @@ -0,0 +1,66 @@ +/* + * smccc.h + * + * SMC/HVC interface in accordance with SMC Calling Convention. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright 2017 (C) EPAM Systems + */ + +#ifndef __XEN_PUBLIC_ARCH_ARM_SMCCC_H__ +#define __XEN_PUBLIC_ARCH_ARM_SMCCC_H__ + +#include "public/xen.h" + +/* + * Hypervisor Service version. + * + * We can't use XEN version here, because of SMCCC requirements: + * Major revision should change every time SMC/HVC function is removed. + * Minor revision should change every time SMC/HVC function is added. + * So, it is SMCCC protocol revision code, not XEN version. + * + * Those values are subjected to change, when interface will be extended. + */ +#define XEN_SMCCC_MAJOR_REVISION 0 +#define XEN_SMCCC_MINOR_REVISION 1 + +/* Hypervisor Service UID. Randomly generated with uuidgen. */ +#define XEN_SMCCC_UID XEN_DEFINE_UUID(0xa71812dc, 0xc698, 0x4369, 0x9acf, \ + 0x79, 0xd1, 0x8d, 0xde, 0xe6, 0x67) + +/* Standard Service Service Call version. */ +#define SSSC_SMCCC_MAJOR_REVISION 0 +#define SSSC_SMCCC_MINOR_REVISION 1 + +/* Standard Service Call UID. Randomly generated with uuidgen. */ +#define SSSC_SMCCC_UID XEN_DEFINE_UUID(0xf863386f, 0x4b39, 0x4cbd, 0x9220,\ + 0xce, 0x16, 0x41, 0xe5, 0x9f, 0x6f) + +#endif /* __XEN_PUBLIC_ARCH_ARM_SMCCC_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End:b + */ diff --git a/sys/xen/interface/arch-x86/cpufeatureset.h b/sys/xen/interface/arch-x86/cpufeatureset.h new file mode 100644 index 000000000000..d06a2fd4c8e2 --- /dev/null +++ b/sys/xen/interface/arch-x86/cpufeatureset.h @@ -0,0 +1,295 @@ +/* + * arch-x86/cpufeatureset.h + * + * CPU featureset definitions + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright (c) 2015, 2016 Citrix Systems, Inc. + */ + +/* + * There are two expected ways of including this header. + * + * 1) The "default" case (expected from tools etc). + * + * Simply #include + * + * In this circumstance, normal header guards apply and the includer shall get + * an enumeration in the XEN_X86_FEATURE_xxx namespace. + * + * 2) The special case where the includer provides XEN_CPUFEATURE() in scope. + * + * In this case, no inclusion guards apply and the caller is responsible for + * their XEN_CPUFEATURE() being appropriate in the included context. + */ + +#ifndef XEN_CPUFEATURE + +/* + * Includer has not provided a custom XEN_CPUFEATURE(). Arrange for normal + * header guards, an enum and constants in the XEN_X86_FEATURE_xxx namespace. + */ +#ifndef __XEN_PUBLIC_ARCH_X86_CPUFEATURESET_H__ +#define __XEN_PUBLIC_ARCH_X86_CPUFEATURESET_H__ + +#define XEN_CPUFEATURESET_DEFAULT_INCLUDE + +#define XEN_CPUFEATURE(name, value) XEN_X86_FEATURE_##name = value, +enum { + +#endif /* __XEN_PUBLIC_ARCH_X86_CPUFEATURESET_H__ */ +#endif /* !XEN_CPUFEATURE */ + + +#ifdef XEN_CPUFEATURE +/* + * A featureset is a bitmap of x86 features, represented as a collection of + * 32bit words. + * + * Words are as specified in vendors programming manuals, and shall not + * contain any synthesied values. New words may be added to the end of + * featureset. + * + * All featureset words currently originate from leaves specified for the + * CPUID instruction, but this is not preclude other sources of information. + */ + +/* + * Attribute syntax: + * + * Attributes for a particular feature are provided as characters before the + * first space in the comment immediately following the feature value. Note - + * none of these attributes form part of the Xen public ABI. + * + * Special: '!' + * This bit has special properties and is not a straight indication of a + * piece of new functionality. Xen will handle these differently, + * and may override toolstack settings completely. + * + * Applicability to guests: 'A', 'S' or 'H' + * 'A' = All guests. + * 'S' = All HVM guests (not PV guests). + * 'H' = HVM HAP guests (not PV or HVM Shadow guests). + * Upper case => Available by default + * Lower case => Can be opted-in to, but not available by default. + */ + +/* Intel-defined CPU features, CPUID level 0x00000001.edx, word 0 */ +XEN_CPUFEATURE(FPU, 0*32+ 0) /*A Onboard FPU */ +XEN_CPUFEATURE(VME, 0*32+ 1) /*S Virtual Mode Extensions */ +XEN_CPUFEATURE(DE, 0*32+ 2) /*A Debugging Extensions */ +XEN_CPUFEATURE(PSE, 0*32+ 3) /*S Page Size Extensions */ +XEN_CPUFEATURE(TSC, 0*32+ 4) /*A Time Stamp Counter */ +XEN_CPUFEATURE(MSR, 0*32+ 5) /*A Model-Specific Registers, RDMSR, WRMSR */ +XEN_CPUFEATURE(PAE, 0*32+ 6) /*A Physical Address Extensions */ +XEN_CPUFEATURE(MCE, 0*32+ 7) /*A Machine Check Architecture */ +XEN_CPUFEATURE(CX8, 0*32+ 8) /*A CMPXCHG8 instruction */ +XEN_CPUFEATURE(APIC, 0*32+ 9) /*!A Onboard APIC */ +XEN_CPUFEATURE(SEP, 0*32+11) /*A SYSENTER/SYSEXIT */ +XEN_CPUFEATURE(MTRR, 0*32+12) /*S Memory Type Range Registers */ +XEN_CPUFEATURE(PGE, 0*32+13) /*S Page Global Enable */ +XEN_CPUFEATURE(MCA, 0*32+14) /*A Machine Check Architecture */ +XEN_CPUFEATURE(CMOV, 0*32+15) /*A CMOV instruction (FCMOVCC and FCOMI too if FPU present) */ +XEN_CPUFEATURE(PAT, 0*32+16) /*A Page Attribute Table */ +XEN_CPUFEATURE(PSE36, 0*32+17) /*S 36-bit PSEs */ +XEN_CPUFEATURE(CLFLUSH, 0*32+19) /*A CLFLUSH instruction */ +XEN_CPUFEATURE(DS, 0*32+21) /* Debug Store */ +XEN_CPUFEATURE(ACPI, 0*32+22) /*A ACPI via MSR */ +XEN_CPUFEATURE(MMX, 0*32+23) /*A Multimedia Extensions */ +XEN_CPUFEATURE(FXSR, 0*32+24) /*A FXSAVE and FXRSTOR instructions */ +XEN_CPUFEATURE(SSE, 0*32+25) /*A Streaming SIMD Extensions */ +XEN_CPUFEATURE(SSE2, 0*32+26) /*A Streaming SIMD Extensions-2 */ +XEN_CPUFEATURE(SS, 0*32+27) /*A CPU self snoop */ +XEN_CPUFEATURE(HTT, 0*32+28) /*!A Hyper-Threading Technology */ +XEN_CPUFEATURE(TM1, 0*32+29) /* Thermal Monitor 1 */ +XEN_CPUFEATURE(PBE, 0*32+31) /* Pending Break Enable */ + +/* Intel-defined CPU features, CPUID level 0x00000001.ecx, word 1 */ +XEN_CPUFEATURE(SSE3, 1*32+ 0) /*A Streaming SIMD Extensions-3 */ +XEN_CPUFEATURE(PCLMULQDQ, 1*32+ 1) /*A Carry-less multiplication */ +XEN_CPUFEATURE(DTES64, 1*32+ 2) /* 64-bit Debug Store */ +XEN_CPUFEATURE(MONITOR, 1*32+ 3) /* Monitor/Mwait support */ +XEN_CPUFEATURE(DSCPL, 1*32+ 4) /* CPL Qualified Debug Store */ +XEN_CPUFEATURE(VMX, 1*32+ 5) /*S Virtual Machine Extensions */ +XEN_CPUFEATURE(SMX, 1*32+ 6) /* Safer Mode Extensions */ +XEN_CPUFEATURE(EIST, 1*32+ 7) /* Enhanced SpeedStep */ +XEN_CPUFEATURE(TM2, 1*32+ 8) /* Thermal Monitor 2 */ +XEN_CPUFEATURE(SSSE3, 1*32+ 9) /*A Supplemental Streaming SIMD Extensions-3 */ +XEN_CPUFEATURE(FMA, 1*32+12) /*A Fused Multiply Add */ +XEN_CPUFEATURE(CX16, 1*32+13) /*A CMPXCHG16B */ +XEN_CPUFEATURE(XTPR, 1*32+14) /* Send Task Priority Messages */ +XEN_CPUFEATURE(PDCM, 1*32+15) /* Perf/Debug Capability MSR */ +XEN_CPUFEATURE(PCID, 1*32+17) /*H Process Context ID */ +XEN_CPUFEATURE(DCA, 1*32+18) /* Direct Cache Access */ +XEN_CPUFEATURE(SSE4_1, 1*32+19) /*A Streaming SIMD Extensions 4.1 */ +XEN_CPUFEATURE(SSE4_2, 1*32+20) /*A Streaming SIMD Extensions 4.2 */ +XEN_CPUFEATURE(X2APIC, 1*32+21) /*!A Extended xAPIC */ +XEN_CPUFEATURE(MOVBE, 1*32+22) /*A movbe instruction */ +XEN_CPUFEATURE(POPCNT, 1*32+23) /*A POPCNT instruction */ +XEN_CPUFEATURE(TSC_DEADLINE, 1*32+24) /*S TSC Deadline Timer */ +XEN_CPUFEATURE(AESNI, 1*32+25) /*A AES instructions */ +XEN_CPUFEATURE(XSAVE, 1*32+26) /*A XSAVE/XRSTOR/XSETBV/XGETBV */ +XEN_CPUFEATURE(OSXSAVE, 1*32+27) /*! OSXSAVE */ +XEN_CPUFEATURE(AVX, 1*32+28) /*A Advanced Vector Extensions */ +XEN_CPUFEATURE(F16C, 1*32+29) /*A Half-precision convert instruction */ +XEN_CPUFEATURE(RDRAND, 1*32+30) /*!A Digital Random Number Generator */ +XEN_CPUFEATURE(HYPERVISOR, 1*32+31) /*!A Running under some hypervisor */ + +/* AMD-defined CPU features, CPUID level 0x80000001.edx, word 2 */ +XEN_CPUFEATURE(SYSCALL, 2*32+11) /*A SYSCALL/SYSRET */ +XEN_CPUFEATURE(NX, 2*32+20) /*A Execute Disable */ +XEN_CPUFEATURE(MMXEXT, 2*32+22) /*A AMD MMX extensions */ +XEN_CPUFEATURE(FFXSR, 2*32+25) /*A FFXSR instruction optimizations */ +XEN_CPUFEATURE(PAGE1GB, 2*32+26) /*H 1Gb large page support */ +XEN_CPUFEATURE(RDTSCP, 2*32+27) /*A RDTSCP */ +XEN_CPUFEATURE(LM, 2*32+29) /*A Long Mode (x86-64) */ +XEN_CPUFEATURE(3DNOWEXT, 2*32+30) /*A AMD 3DNow! extensions */ +XEN_CPUFEATURE(3DNOW, 2*32+31) /*A 3DNow! */ + +/* AMD-defined CPU features, CPUID level 0x80000001.ecx, word 3 */ +XEN_CPUFEATURE(LAHF_LM, 3*32+ 0) /*A LAHF/SAHF in long mode */ +XEN_CPUFEATURE(CMP_LEGACY, 3*32+ 1) /*!A If yes HyperThreading not valid */ +XEN_CPUFEATURE(SVM, 3*32+ 2) /*S Secure virtual machine */ +XEN_CPUFEATURE(EXTAPIC, 3*32+ 3) /* Extended APIC space */ +XEN_CPUFEATURE(CR8_LEGACY, 3*32+ 4) /*S CR8 in 32-bit mode */ +XEN_CPUFEATURE(ABM, 3*32+ 5) /*A Advanced bit manipulation */ +XEN_CPUFEATURE(SSE4A, 3*32+ 6) /*A SSE-4A */ +XEN_CPUFEATURE(MISALIGNSSE, 3*32+ 7) /*A Misaligned SSE mode */ +XEN_CPUFEATURE(3DNOWPREFETCH, 3*32+ 8) /*A 3DNow prefetch instructions */ +XEN_CPUFEATURE(OSVW, 3*32+ 9) /* OS Visible Workaround */ +XEN_CPUFEATURE(IBS, 3*32+10) /* Instruction Based Sampling */ +XEN_CPUFEATURE(XOP, 3*32+11) /*A extended AVX instructions */ +XEN_CPUFEATURE(SKINIT, 3*32+12) /* SKINIT/STGI instructions */ +XEN_CPUFEATURE(WDT, 3*32+13) /* Watchdog timer */ +XEN_CPUFEATURE(LWP, 3*32+15) /* Light Weight Profiling */ +XEN_CPUFEATURE(FMA4, 3*32+16) /*A 4 operands MAC instructions */ +XEN_CPUFEATURE(NODEID_MSR, 3*32+19) /* NodeId MSR */ +XEN_CPUFEATURE(TBM, 3*32+21) /*A trailing bit manipulations */ +XEN_CPUFEATURE(TOPOEXT, 3*32+22) /* topology extensions CPUID leafs */ +XEN_CPUFEATURE(DBEXT, 3*32+26) /*A data breakpoint extension */ +XEN_CPUFEATURE(MONITORX, 3*32+29) /* MONITOR extension (MONITORX/MWAITX) */ + +/* Intel-defined CPU features, CPUID level 0x0000000D:1.eax, word 4 */ +XEN_CPUFEATURE(XSAVEOPT, 4*32+ 0) /*A XSAVEOPT instruction */ +XEN_CPUFEATURE(XSAVEC, 4*32+ 1) /*A XSAVEC/XRSTORC instructions */ +XEN_CPUFEATURE(XGETBV1, 4*32+ 2) /*A XGETBV with %ecx=1 */ +XEN_CPUFEATURE(XSAVES, 4*32+ 3) /*S XSAVES/XRSTORS instructions */ + +/* Intel-defined CPU features, CPUID level 0x00000007:0.ebx, word 5 */ +XEN_CPUFEATURE(FSGSBASE, 5*32+ 0) /*A {RD,WR}{FS,GS}BASE instructions */ +XEN_CPUFEATURE(TSC_ADJUST, 5*32+ 1) /*S TSC_ADJUST MSR available */ +XEN_CPUFEATURE(SGX, 5*32+ 2) /* Software Guard extensions */ +XEN_CPUFEATURE(BMI1, 5*32+ 3) /*A 1st bit manipulation extensions */ +XEN_CPUFEATURE(HLE, 5*32+ 4) /*A Hardware Lock Elision */ +XEN_CPUFEATURE(AVX2, 5*32+ 5) /*A AVX2 instructions */ +XEN_CPUFEATURE(FDP_EXCP_ONLY, 5*32+ 6) /*! x87 FDP only updated on exception. */ +XEN_CPUFEATURE(SMEP, 5*32+ 7) /*S Supervisor Mode Execution Protection */ +XEN_CPUFEATURE(BMI2, 5*32+ 8) /*A 2nd bit manipulation extensions */ +XEN_CPUFEATURE(ERMS, 5*32+ 9) /*A Enhanced REP MOVSB/STOSB */ +XEN_CPUFEATURE(INVPCID, 5*32+10) /*H Invalidate Process Context ID */ +XEN_CPUFEATURE(RTM, 5*32+11) /*A Restricted Transactional Memory */ +XEN_CPUFEATURE(PQM, 5*32+12) /* Platform QoS Monitoring */ +XEN_CPUFEATURE(NO_FPU_SEL, 5*32+13) /*! FPU CS/DS stored as zero */ +XEN_CPUFEATURE(MPX, 5*32+14) /*s Memory Protection Extensions */ +XEN_CPUFEATURE(PQE, 5*32+15) /* Platform QoS Enforcement */ +XEN_CPUFEATURE(AVX512F, 5*32+16) /*A AVX-512 Foundation Instructions */ +XEN_CPUFEATURE(AVX512DQ, 5*32+17) /*A AVX-512 Doubleword & Quadword Instrs */ +XEN_CPUFEATURE(RDSEED, 5*32+18) /*A RDSEED instruction */ +XEN_CPUFEATURE(ADX, 5*32+19) /*A ADCX, ADOX instructions */ +XEN_CPUFEATURE(SMAP, 5*32+20) /*S Supervisor Mode Access Prevention */ +XEN_CPUFEATURE(AVX512_IFMA, 5*32+21) /*A AVX-512 Integer Fused Multiply Add */ +XEN_CPUFEATURE(CLFLUSHOPT, 5*32+23) /*A CLFLUSHOPT instruction */ +XEN_CPUFEATURE(CLWB, 5*32+24) /*A CLWB instruction */ +XEN_CPUFEATURE(AVX512PF, 5*32+26) /*A AVX-512 Prefetch Instructions */ +XEN_CPUFEATURE(AVX512ER, 5*32+27) /*A AVX-512 Exponent & Reciprocal Instrs */ +XEN_CPUFEATURE(AVX512CD, 5*32+28) /*A AVX-512 Conflict Detection Instrs */ +XEN_CPUFEATURE(SHA, 5*32+29) /*A SHA1 & SHA256 instructions */ +XEN_CPUFEATURE(AVX512BW, 5*32+30) /*A AVX-512 Byte and Word Instructions */ +XEN_CPUFEATURE(AVX512VL, 5*32+31) /*A AVX-512 Vector Length Extensions */ + +/* Intel-defined CPU features, CPUID level 0x00000007:0.ecx, word 6 */ +XEN_CPUFEATURE(PREFETCHWT1, 6*32+ 0) /*A PREFETCHWT1 instruction */ +XEN_CPUFEATURE(AVX512_VBMI, 6*32+ 1) /*A AVX-512 Vector Byte Manipulation Instrs */ +XEN_CPUFEATURE(UMIP, 6*32+ 2) /*S User Mode Instruction Prevention */ +XEN_CPUFEATURE(PKU, 6*32+ 3) /*H Protection Keys for Userspace */ +XEN_CPUFEATURE(OSPKE, 6*32+ 4) /*! OS Protection Keys Enable */ +XEN_CPUFEATURE(AVX512_VBMI2, 6*32+ 6) /*A Additional AVX-512 Vector Byte Manipulation Instrs */ +XEN_CPUFEATURE(CET_SS, 6*32+ 7) /* CET - Shadow Stacks */ +XEN_CPUFEATURE(GFNI, 6*32+ 8) /*A Galois Field Instrs */ +XEN_CPUFEATURE(VAES, 6*32+ 9) /*A Vector AES Instrs */ +XEN_CPUFEATURE(VPCLMULQDQ, 6*32+10) /*A Vector Carry-less Multiplication Instrs */ +XEN_CPUFEATURE(AVX512_VNNI, 6*32+11) /*A Vector Neural Network Instrs */ +XEN_CPUFEATURE(AVX512_BITALG, 6*32+12) /*A Support for VPOPCNT[B,W] and VPSHUFBITQMB */ +XEN_CPUFEATURE(AVX512_VPOPCNTDQ, 6*32+14) /*A POPCNT for vectors of DW/QW */ +XEN_CPUFEATURE(TSXLDTRK, 6*32+16) /*a TSX load tracking suspend/resume insns */ +XEN_CPUFEATURE(RDPID, 6*32+22) /*A RDPID instruction */ +XEN_CPUFEATURE(CLDEMOTE, 6*32+25) /*A CLDEMOTE instruction */ +XEN_CPUFEATURE(MOVDIRI, 6*32+27) /*a MOVDIRI instruction */ +XEN_CPUFEATURE(MOVDIR64B, 6*32+28) /*a MOVDIR64B instruction */ +XEN_CPUFEATURE(ENQCMD, 6*32+29) /* ENQCMD{,S} instructions */ + +/* AMD-defined CPU features, CPUID level 0x80000007.edx, word 7 */ +XEN_CPUFEATURE(ITSC, 7*32+ 8) /* Invariant TSC */ +XEN_CPUFEATURE(EFRO, 7*32+10) /* APERF/MPERF Read Only interface */ + +/* AMD-defined CPU features, CPUID level 0x80000008.ebx, word 8 */ +XEN_CPUFEATURE(CLZERO, 8*32+ 0) /*A CLZERO instruction */ +XEN_CPUFEATURE(RSTR_FP_ERR_PTRS, 8*32+ 2) /*A (F)X{SAVE,RSTOR} always saves/restores FPU Error pointers */ +XEN_CPUFEATURE(WBNOINVD, 8*32+ 9) /* WBNOINVD instruction */ +XEN_CPUFEATURE(IBPB, 8*32+12) /*A IBPB support only (no IBRS, used by AMD) */ +XEN_CPUFEATURE(AMD_PPIN, 8*32+23) /* Protected Processor Inventory Number */ + +/* Intel-defined CPU features, CPUID level 0x00000007:0.edx, word 9 */ +XEN_CPUFEATURE(AVX512_4VNNIW, 9*32+ 2) /*A AVX512 Neural Network Instructions */ +XEN_CPUFEATURE(AVX512_4FMAPS, 9*32+ 3) /*A AVX512 Multiply Accumulation Single Precision */ +XEN_CPUFEATURE(SRBDS_CTRL, 9*32+ 9) /* MSR_MCU_OPT_CTRL and RNGDS_MITG_DIS. */ +XEN_CPUFEATURE(MD_CLEAR, 9*32+10) /*A VERW clears microarchitectural buffers */ +XEN_CPUFEATURE(TSX_FORCE_ABORT, 9*32+13) /* MSR_TSX_FORCE_ABORT.RTM_ABORT */ +XEN_CPUFEATURE(SERIALIZE, 9*32+14) /*a SERIALIZE insn */ +XEN_CPUFEATURE(CET_IBT, 9*32+20) /* CET - Indirect Branch Tracking */ +XEN_CPUFEATURE(IBRSB, 9*32+26) /*A IBRS and IBPB support (used by Intel) */ +XEN_CPUFEATURE(STIBP, 9*32+27) /*A STIBP */ +XEN_CPUFEATURE(L1D_FLUSH, 9*32+28) /*S MSR_FLUSH_CMD and L1D flush. */ +XEN_CPUFEATURE(ARCH_CAPS, 9*32+29) /*a IA32_ARCH_CAPABILITIES MSR */ +XEN_CPUFEATURE(CORE_CAPS, 9*32+30) /* IA32_CORE_CAPABILITIES MSR */ +XEN_CPUFEATURE(SSBD, 9*32+31) /*A MSR_SPEC_CTRL.SSBD available */ + +/* Intel-defined CPU features, CPUID level 0x00000007:1.eax, word 10 */ +XEN_CPUFEATURE(AVX512_BF16, 10*32+ 5) /*A AVX512 BFloat16 Instructions */ + +#endif /* XEN_CPUFEATURE */ + +/* Clean up from a default include. Close the enum (for C). */ +#ifdef XEN_CPUFEATURESET_DEFAULT_INCLUDE +#undef XEN_CPUFEATURESET_DEFAULT_INCLUDE +#undef XEN_CPUFEATURE +}; + +#endif /* XEN_CPUFEATURESET_DEFAULT_INCLUDE */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/sys/xen/interface/arch-x86/cpuid.h b/sys/xen/interface/arch-x86/cpuid.h index d709340f18d0..ce46305bee99 100644 --- a/sys/xen/interface/arch-x86/cpuid.h +++ b/sys/xen/interface/arch-x86/cpuid.h @@ -1,8 +1,8 @@ /****************************************************************************** * arch-x86/cpuid.h - * + * * CPUID interface to Xen. - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the @@ -20,9 +20,9 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. - * + * * Copyright (c) 2007 Citrix Systems, Inc. - * + * * Authors: * Keir Fraser */ @@ -73,18 +73,46 @@ #define _XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD 0 #define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0) +/* + * Leaf 4 (0x40000x03) + * Sub-leaf 0: EAX: bit 0: emulated tsc + * bit 1: host tsc is known to be reliable + * bit 2: RDTSCP instruction available + * EBX: tsc_mode: 0=default (emulate if necessary), 1=emulate, + * 2=no emulation, 3=no emulation + TSC_AUX support + * ECX: guest tsc frequency in kHz + * EDX: guest tsc incarnation (migration count) + * Sub-leaf 1: EAX: tsc offset low part + * EBX: tsc offset high part + * ECX: multiplicator for tsc->ns conversion + * EDX: shift amount for tsc->ns conversion + * Sub-leaf 2: EAX: host tsc frequency in kHz + */ + /* * Leaf 5 (0x40000x04) * HVM-specific features - * EAX: Features - * EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag) + * Sub-leaf 0: EAX: Features + * Sub-leaf 0: EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag) + * Sub-leaf 0: ECX: domain id (iff EAX has XEN_HVM_CPUID_DOMID_PRESENT flag) */ #define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */ #define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */ /* Memory mapped from other domains has valid IOMMU entries */ #define XEN_HVM_CPUID_IOMMU_MAPPINGS (1u << 2) #define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */ +#define XEN_HVM_CPUID_DOMID_PRESENT (1u << 4) /* domid is present in ECX */ + +/* + * Leaf 6 (0x40000x05) + * PV-specific parameters + * Sub-leaf 0: EAX: max available sub-leaf + * Sub-leaf 0: EBX: bits 0-7: max machine address width + */ + +/* Max. address width in bits taking memory hotplug into account. */ +#define XEN_CPUID_MACHINE_ADDRESS_WIDTH_MASK (0xffu << 0) -#define XEN_CPUID_MAX_NUM_LEAVES 4 +#define XEN_CPUID_MAX_NUM_LEAVES 5 #endif /* __XEN_PUBLIC_ARCH_X86_CPUID_H__ */ diff --git a/sys/xen/interface/arch-x86/hvm/.save.h.swp b/sys/xen/interface/arch-x86/hvm/.save.h.swp new file mode 100644 index 000000000000..d5f583e519f8 Binary files /dev/null and b/sys/xen/interface/arch-x86/hvm/.save.h.swp differ diff --git a/sys/xen/interface/arch-x86/hvm/save.h b/sys/xen/interface/arch-x86/hvm/save.h index 75ab9b592cdc..773a380bc22b 100644 --- a/sys/xen/interface/arch-x86/hvm/save.h +++ b/sys/xen/interface/arch-x86/hvm/save.h @@ -1,7 +1,7 @@ -/* +/* * Structure definitions for HVM state that is held by Xen and must * be saved along with the domain's memory and device-model state. - * + * * Copyright (c) 2007 XenSource Ltd. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -26,8 +26,10 @@ #ifndef __XEN_PUBLIC_HVM_SAVE_X86_H__ #define __XEN_PUBLIC_HVM_SAVE_X86_H__ -/* - * Save/restore header: general info about the save file. +#include "../../xen.h" + +/* + * Save/restore header: general info about the save file. */ #define HVM_FILE_MAGIC 0x54381286 @@ -43,10 +45,13 @@ struct hvm_save_header { DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header); + /* * Processor * - * Compat: Pre-3.4 didn't have msr_tsc_aux + * Compat: + * - Pre-3.4 didn't have msr_tsc_aux + * - Pre-4.7 didn't have fpu_initialised */ struct hvm_hw_cpu { @@ -82,7 +87,7 @@ struct hvm_hw_cpu { uint64_t dr2; uint64_t dr3; uint64_t dr6; - uint64_t dr7; + uint64_t dr7; uint32_t cs_sel; uint32_t ds_sel; @@ -132,7 +137,7 @@ struct hvm_hw_cpu { uint64_t shadow_gs; /* msr content saved/restored. */ - uint64_t msr_flags; + uint64_t msr_flags; /* Obsolete, ignored. */ uint64_t msr_lstar; uint64_t msr_star; uint64_t msr_cstar; @@ -156,6 +161,11 @@ struct hvm_hw_cpu { }; /* error code for pending event */ uint32_t error_code; + +#define _XEN_X86_FPU_INITIALISED 0 +#define XEN_X86_FPU_INITIALISED (1U<<_XEN_X86_FPU_INITIALISED) + uint32_t flags; + uint32_t pad0; }; struct hvm_hw_cpu_compat { @@ -191,7 +201,7 @@ struct hvm_hw_cpu_compat { uint64_t dr2; uint64_t dr3; uint64_t dr6; - uint64_t dr7; + uint64_t dr7; uint32_t cs_sel; uint32_t ds_sel; @@ -241,7 +251,7 @@ struct hvm_hw_cpu_compat { uint64_t shadow_gs; /* msr content saved/restored. */ - uint64_t msr_flags; + uint64_t msr_flags; /* Obsolete, ignored. */ uint64_t msr_lstar; uint64_t msr_star; uint64_t msr_cstar; @@ -267,18 +277,26 @@ struct hvm_hw_cpu_compat { uint32_t error_code; }; -static inline int _hvm_hw_fix_cpu(void *h) { +static inline int _hvm_hw_fix_cpu(void *h, uint32_t size) { + union hvm_hw_cpu_union { struct hvm_hw_cpu nat; struct hvm_hw_cpu_compat cmp; } *ucpu = (union hvm_hw_cpu_union *)h; - /* If we copy from the end backwards, we should - * be able to do the modification in-place */ - ucpu->nat.error_code = ucpu->cmp.error_code; - ucpu->nat.pending_event = ucpu->cmp.pending_event; - ucpu->nat.tsc = ucpu->cmp.tsc; - ucpu->nat.msr_tsc_aux = 0; + if ( size == sizeof(struct hvm_hw_cpu_compat) ) + { + /* + * If we copy from the end backwards, we should + * be able to do the modification in-place. + */ + ucpu->nat.error_code = ucpu->cmp.error_code; + ucpu->nat.pending_event = ucpu->cmp.pending_event; + ucpu->nat.tsc = ucpu->cmp.tsc; + ucpu->nat.msr_tsc_aux = 0; + } + /* Mimic the old behaviour by unconditionally setting fpu_initialised. */ + ucpu->nat.flags = XEN_X86_FPU_INITIALISED; return 0; } @@ -340,37 +358,50 @@ struct hvm_hw_vpic { DECLARE_HVM_SAVE_TYPE(PIC, 3, struct hvm_hw_vpic); + /* * IO-APIC */ +union vioapic_redir_entry +{ + uint64_t bits; + struct { + uint8_t vector; + uint8_t delivery_mode:3; + uint8_t dest_mode:1; + uint8_t delivery_status:1; + uint8_t polarity:1; + uint8_t remote_irr:1; + uint8_t trig_mode:1; + uint8_t mask:1; + uint8_t reserve:7; + uint8_t reserved[4]; + uint8_t dest_id; + } fields; +}; + #define VIOAPIC_NUM_PINS 48 /* 16 ISA IRQs, 32 non-legacy PCI IRQS. */ -struct hvm_hw_vioapic { - uint64_t base_address; - uint32_t ioregsel; - uint32_t id; - union vioapic_redir_entry - { - uint64_t bits; - struct { - uint8_t vector; - uint8_t delivery_mode:3; - uint8_t dest_mode:1; - uint8_t delivery_status:1; - uint8_t polarity:1; - uint8_t remote_irr:1; - uint8_t trig_mode:1; - uint8_t mask:1; - uint8_t reserve:7; - uint8_t reserved[4]; - uint8_t dest_id; - } fields; - } redirtbl[VIOAPIC_NUM_PINS]; -}; +#define XEN_HVM_VIOAPIC(name, cnt) \ + struct name { \ + uint64_t base_address; \ + uint32_t ioregsel; \ + uint32_t id; \ + union vioapic_redir_entry redirtbl[cnt]; \ + } + +XEN_HVM_VIOAPIC(hvm_hw_vioapic, VIOAPIC_NUM_PINS); + +#ifndef __XEN__ +#undef XEN_HVM_VIOAPIC +#else +#undef VIOAPIC_NUM_PINS +#endif DECLARE_HVM_SAVE_TYPE(IOAPIC, 4, struct hvm_hw_vioapic); + /* * LAPIC */ @@ -390,6 +421,7 @@ struct hvm_hw_lapic_regs { DECLARE_HVM_SAVE_TYPE(LAPIC_REGS, 6, struct hvm_hw_lapic_regs); + /* * IRQs */ @@ -433,7 +465,7 @@ struct hvm_hw_pci_link { DECLARE_HVM_SAVE_TYPE(PCI_LINK, 9, struct hvm_hw_pci_link); -/* +/* * PIT */ @@ -458,9 +490,10 @@ struct hvm_hw_pit { DECLARE_HVM_SAVE_TYPE(PIT, 10, struct hvm_hw_pit); -/* + +/* * RTC - */ + */ #define RTC_CMOS_SIZE 14 struct hvm_hw_rtc { @@ -469,10 +502,13 @@ struct hvm_hw_rtc { /* Index register for 2-part operations */ uint8_t cmos_index; uint8_t pad0; + /* RTC offset from host time */ + int64_t rtc_offset; }; DECLARE_HVM_SAVE_TYPE(RTC, 11, struct hvm_hw_rtc); + /* * HPET */ @@ -502,6 +538,7 @@ struct hvm_hw_hpet { DECLARE_HVM_SAVE_TYPE(HPET, 12, struct hvm_hw_hpet); + /* * PM timer */ @@ -542,12 +579,11 @@ struct hvm_hw_cpu_xsave { struct { struct { char x[512]; } fpu_sse; - struct { *** 12558 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Mon Jan 11 15:36:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D2E24DC6F9; Mon, 11 Jan 2021 15:36: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDyTy72Ntz3rWx; Mon, 11 Jan 2021 15:36: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 E45321CE7A; Mon, 11 Jan 2021 15:36: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 10BFa6Ws026604; Mon, 11 Jan 2021 15:36:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BFa65T026603; Mon, 11 Jan 2021 15:36:06 GMT (envelope-from git) Date: Mon, 11 Jan 2021 15:36:06 GMT Message-Id: <202101111536.10BFa65T026603@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: f713a5b37ecb - main - xen/privcmd: make some integers unsigned 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: f713a5b37ecb831941dcac0db163e186b5d59638 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 15:36:07 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=f713a5b37ecb831941dcac0db163e186b5d59638 commit f713a5b37ecb831941dcac0db163e186b5d59638 Author: Roger Pau Monné AuthorDate: 2021-01-04 18:03:09 +0000 Commit: Roger Pau Monné CommitDate: 2021-01-11 15:14:59 +0000 xen/privcmd: make some integers unsigned There's no reason for them to be signed. No functional change. Sponsored by: Citrix Systems R&D --- sys/dev/xen/privcmd/privcmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index 04dc9e883071..24bce97e9b3d 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -221,7 +221,8 @@ static int privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, int mode, struct thread *td) { - int error, i; + int error; + unsigned int i; switch (cmd) { case IOCTL_PRIVCMD_HYPERCALL: { @@ -263,7 +264,8 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, struct xen_add_to_physmap_range add; xen_ulong_t *idxs; xen_pfn_t *gpfns; - int *errs, index; + int *errs; + unsigned int index; struct privcmd_map *umap; uint16_t num; From owner-dev-commits-src-all@freebsd.org Mon Jan 11 15:36:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF6854DC86F; Mon, 11 Jan 2021 15:36: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDyV13cp7z3rYr; Mon, 11 Jan 2021 15:36: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 3EA951CD2D; Mon, 11 Jan 2021 15:36: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 10BFa9Cb026649; Mon, 11 Jan 2021 15:36:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BFa9Mk026648; Mon, 11 Jan 2021 15:36:09 GMT (envelope-from git) Date: Mon, 11 Jan 2021 15:36:09 GMT Message-Id: <202101111536.10BFa9Mk026648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 658860e2d070 - main - xen/privcmd: implement the map resource ioctl 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: 658860e2d07065b4203bb3e7779bee0512c65c92 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 15:36:10 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=658860e2d07065b4203bb3e7779bee0512c65c92 commit 658860e2d07065b4203bb3e7779bee0512c65c92 Author: Roger Pau Monne AuthorDate: 2020-06-23 09:36:19 +0000 Commit: Roger Pau Monné CommitDate: 2021-01-11 15:15:00 +0000 xen/privcmd: implement the map resource ioctl The interface is mostly the same as the Linux ioctl, so that we don't need to modify the user-space libraries that make use of it. The ioctl is just a proxy for the XENMEM_acquire_resource hypercall. Sponsored by: Citrix Systems R&D --- sys/dev/xen/privcmd/privcmd.c | 52 +++++++++++++++++++++++++++++++++++++++++++ sys/xen/privcmd.h | 15 +++++++++++++ 2 files changed, 67 insertions(+) diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index 78fb32444931..c31c31bcfe41 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -372,7 +372,59 @@ mmap_out: break; } + case IOCTL_PRIVCMD_MMAP_RESOURCE: { + struct ioctl_privcmd_mmapresource *mmap; + struct xen_mem_acquire_resource adq; + xen_pfn_t *gpfns; + struct privcmd_map *umap; + + mmap = (struct ioctl_privcmd_mmapresource *)arg; + + bzero(&adq, sizeof(adq)); + + adq.domid = mmap->dom; + adq.type = mmap->type; + adq.id = mmap->id; + + /* Shortcut for getting the resource size. */ + if (mmap->addr == 0 && mmap->num == 0) { + error = HYPERVISOR_memory_op(XENMEM_acquire_resource, + &adq); + if (error != 0) { + error = xen_translate_error(error); + break; + } + error = copyout(&adq.nr_frames, &mmap->num, + sizeof(mmap->num)); + break; + } + umap = setup_virtual_area(td, mmap->addr, mmap->num); + if (umap == NULL) { + error = EINVAL; + break; + } + + adq.nr_frames = mmap->num; + adq.frame = mmap->idx; + + gpfns = malloc(sizeof(*gpfns) * mmap->num, M_PRIVCMD, M_WAITOK); + for (i = 0; i < mmap->num; i++) + gpfns[i] = atop(umap->phys_base_addr) + i; + set_xen_guest_handle(adq.frame_list, gpfns); + + error = HYPERVISOR_memory_op(XENMEM_acquire_resource, &adq); + if (error != 0) + error = xen_translate_error(error); + else + umap->mapped = true; + + free(gpfns, M_PRIVCMD); + if (!umap->mapped) + free(umap->err, M_PRIVCMD); + + break; + } default: error = ENOSYS; break; diff --git a/sys/xen/privcmd.h b/sys/xen/privcmd.h index a3cc4e110e41..ac2d0c00b845 100644 --- a/sys/xen/privcmd.h +++ b/sys/xen/privcmd.h @@ -50,9 +50,24 @@ struct ioctl_privcmd_mmapbatch { int *err; /* array of error codes */ }; +struct ioctl_privcmd_mmapresource { + domid_t dom; /* target domain */ + unsigned int type; /* type of resource to map */ + unsigned int id; /* type-specific resource identifier */ + unsigned int idx; /* the index of the initial frame to be mapped */ + unsigned long num; /* number of frames of the resource to be mapped */ + unsigned long addr; /* physical address to map into */ + /* + * Note: issuing an ioctl with num = addr = 0 will return the size of + * the resource. + */ +}; + #define IOCTL_PRIVCMD_HYPERCALL \ _IOWR('E', 0, struct ioctl_privcmd_hypercall) #define IOCTL_PRIVCMD_MMAPBATCH \ _IOWR('E', 1, struct ioctl_privcmd_mmapbatch) +#define IOCTL_PRIVCMD_MMAP_RESOURCE \ + _IOW('E', 2, struct ioctl_privcmd_mmapresource) #endif /* !__XEN_PRIVCMD_H__ */ From owner-dev-commits-src-all@freebsd.org Mon Jan 11 15:36:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F6AB4DCDC0; Mon, 11 Jan 2021 15:36: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDyV01hlTz3r4K; Mon, 11 Jan 2021 15:36: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 2A3411CFC5; Mon, 11 Jan 2021 15:36: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 10BFa7hL026625; Mon, 11 Jan 2021 15:36:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BFa76D026624; Mon, 11 Jan 2021 15:36:07 GMT (envelope-from git) Date: Mon, 11 Jan 2021 15:36:07 GMT Message-Id: <202101111536.10BFa76D026624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 147e593921d7 - main - xen/privcmd: split setup of virtual address range into helper 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: 147e593921d7b9a6697a92a512ab7bd777f9a6b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 15:36:09 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=147e593921d7b9a6697a92a512ab7bd777f9a6b1 commit 147e593921d7b9a6697a92a512ab7bd777f9a6b1 Author: Roger Pau Monné AuthorDate: 2021-01-04 17:59:14 +0000 Commit: Roger Pau Monné CommitDate: 2021-01-11 15:14:59 +0000 xen/privcmd: split setup of virtual address range into helper Preparatory change for further additions that will also make use of the same code. No functional change. Sponsored by: Citrix Systems R&D --- sys/dev/xen/privcmd/privcmd.c | 69 ++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index 24bce97e9b3d..78fb32444931 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -217,6 +217,40 @@ privcmd_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t size, return (0); } +static struct privcmd_map * +setup_virtual_area(struct thread *td, unsigned long addr, unsigned long num) +{ + vm_map_t map; + vm_map_entry_t entry; + vm_object_t mem; + vm_pindex_t pindex; + vm_prot_t prot; + boolean_t wired; + struct privcmd_map *umap; + int error; + + if ((num == 0) || ((addr & PAGE_MASK) != 0)) + return NULL; + + map = &td->td_proc->p_vmspace->vm_map; + error = vm_map_lookup(&map, addr, VM_PROT_NONE, &entry, &mem, &pindex, + &prot, &wired); + if (error != KERN_SUCCESS || (entry->start != addr) || + (entry->end != addr + (num * PAGE_SIZE))) + return NULL; + + vm_map_lookup_done(map, entry); + if ((mem->type != OBJT_MGTDEVICE) || + (mem->un_pager.devp.ops != &privcmd_pg_ops)) + return NULL; + + umap = mem->handle; + /* Allocate a bitset to store broken page mappings. */ + umap->err = BITSET_ALLOC(num, M_PRIVCMD, M_WAITOK | M_ZERO); + + return umap; +} + static int privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, int mode, struct thread *td) @@ -255,12 +289,6 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, } case IOCTL_PRIVCMD_MMAPBATCH: { struct ioctl_privcmd_mmapbatch *mmap; - vm_map_t map; - vm_map_entry_t entry; - vm_object_t mem; - vm_pindex_t pindex; - vm_prot_t prot; - boolean_t wired; struct xen_add_to_physmap_range add; xen_ulong_t *idxs; xen_pfn_t *gpfns; @@ -271,33 +299,12 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, mmap = (struct ioctl_privcmd_mmapbatch *)arg; - if ((mmap->num == 0) || - ((mmap->addr & PAGE_MASK) != 0)) { + umap = setup_virtual_area(td, mmap->addr, mmap->num); + if (umap == NULL) { error = EINVAL; break; } - map = &td->td_proc->p_vmspace->vm_map; - error = vm_map_lookup(&map, mmap->addr, VM_PROT_NONE, &entry, - &mem, &pindex, &prot, &wired); - if (error != KERN_SUCCESS) { - error = EINVAL; - break; - } - if ((entry->start != mmap->addr) || - (entry->end != mmap->addr + (mmap->num * PAGE_SIZE))) { - vm_map_lookup_done(map, entry); - error = EINVAL; - break; - } - vm_map_lookup_done(map, entry); - if ((mem->type != OBJT_MGTDEVICE) || - (mem->un_pager.devp.ops != &privcmd_pg_ops)) { - error = EINVAL; - break; - } - umap = mem->handle; - add.domid = DOMID_SELF; add.space = XENMAPSPACE_gmfn_foreign; add.foreign_domid = mmap->dom; @@ -316,10 +323,6 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, set_xen_guest_handle(add.gpfns, gpfns); set_xen_guest_handle(add.errs, errs); - /* Allocate a bitset to store broken page mappings. */ - umap->err = BITSET_ALLOC(mmap->num, M_PRIVCMD, - M_WAITOK | M_ZERO); - for (index = 0; index < mmap->num; index += num) { num = MIN(mmap->num - index, UINT16_MAX); add.size = num; From owner-dev-commits-src-all@freebsd.org Mon Jan 11 15:36:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7DF04DCDC4; Mon, 11 Jan 2021 15:36: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDyV23plbz3rFk; Mon, 11 Jan 2021 15:36: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 55A2C1CD2E; Mon, 11 Jan 2021 15:36: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 10BFaAfO026671; Mon, 11 Jan 2021 15:36:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BFaAIK026670; Mon, 11 Jan 2021 15:36:10 GMT (envelope-from git) Date: Mon, 11 Jan 2021 15:36:10 GMT Message-Id: <202101111536.10BFaAIK026670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: ed78016d005c - main - xen/privcmd: implement the dm op ioctl 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: ed78016d005c9ec97883a33c4468052ca9880c4f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 15:36:11 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ed78016d005c9ec97883a33c4468052ca9880c4f commit ed78016d005c9ec97883a33c4468052ca9880c4f Author: Roger Pau Monne AuthorDate: 2020-06-25 16:25:29 +0000 Commit: Roger Pau Monné CommitDate: 2021-01-11 15:33:27 +0000 xen/privcmd: implement the dm op ioctl Use an interface compatible with the Linux one so that the user-space libraries already using the Linux interface can be used without much modifications. This allows user-space to make use of the dm_op family of hypercalls, which are used by device models. Sponsored by: Citrix Systems R&D --- sys/amd64/include/xen/hypercall.h | 7 ++++++ sys/dev/xen/privcmd/privcmd.c | 49 +++++++++++++++++++++++++++++++++++++++ sys/i386/include/xen/hypercall.h | 7 ++++++ sys/xen/hypervisor.h | 1 + sys/xen/privcmd.h | 13 +++++++++++ 5 files changed, 77 insertions(+) diff --git a/sys/amd64/include/xen/hypercall.h b/sys/amd64/include/xen/hypercall.h index e427bbf4d43f..6d00d4a6ebd8 100644 --- a/sys/amd64/include/xen/hypercall.h +++ b/sys/amd64/include/xen/hypercall.h @@ -427,6 +427,13 @@ HYPERVISOR_kexec_op( return _hypercall2(int, kexec_op, op, args); } +static inline int __must_check +HYPERVISOR_dm_op( + domid_t domid, unsigned int nr_bufs, const void *bufs) +{ + return _hypercall3(int, dm_op, domid, nr_bufs, bufs); +} + #undef __must_check #endif /* __MACHINE_XEN_HYPERCALL_H__ */ diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index c31c31bcfe41..d9f11aa0fe7a 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_PRIVCMD, "privcmd_dev", "Xen privcmd user-space device"); +#define MAX_DMOP_BUFFERS 16 + struct privcmd_map { vm_object_t mem; vm_size_t size; @@ -423,6 +425,53 @@ mmap_out: if (!umap->mapped) free(umap->err, M_PRIVCMD); + break; + } + case IOCTL_PRIVCMD_DM_OP: { + const struct ioctl_privcmd_dmop *dmop; + struct privcmd_dmop_buf *bufs; + struct xen_dm_op_buf *hbufs; + + dmop = (struct ioctl_privcmd_dmop *)arg; + + if (dmop->num == 0) + break; + + if (dmop->num > MAX_DMOP_BUFFERS) { + error = E2BIG; + break; + } + + bufs = malloc(sizeof(*bufs) * dmop->num, M_PRIVCMD, M_WAITOK); + + error = copyin(dmop->ubufs, bufs, sizeof(*bufs) * dmop->num); + if (error != 0) { + free(bufs, M_PRIVCMD); + break; + } + + hbufs = malloc(sizeof(*hbufs) * dmop->num, M_PRIVCMD, M_WAITOK); + for (i = 0; i < dmop->num; i++) { + set_xen_guest_handle(hbufs[i].h, bufs[i].uptr); + hbufs[i].size = bufs[i].size; + } + +#ifdef __amd64__ + if (cpu_stdext_feature & CPUID_STDEXT_SMAP) + stac(); +#endif + error = HYPERVISOR_dm_op(dmop->dom, dmop->num, hbufs); +#ifdef __amd64__ + if (cpu_stdext_feature & CPUID_STDEXT_SMAP) + clac(); +#endif + if (error != 0) + error = xen_translate_error(error); + + free(bufs, M_PRIVCMD); + free(hbufs, M_PRIVCMD); + + break; } default: diff --git a/sys/i386/include/xen/hypercall.h b/sys/i386/include/xen/hypercall.h index d0cd9179665c..78052fac9355 100644 --- a/sys/i386/include/xen/hypercall.h +++ b/sys/i386/include/xen/hypercall.h @@ -404,6 +404,13 @@ HYPERVISOR_kexec_op( { return _hypercall2(int, kexec_op, op, args); } + +static inline int +HYPERVISOR_dm_op( + domid_t domid, unsigned int nr_bufs, const void *bufs) +{ + return _hypercall3(int, dm_op, domid, nr_bufs, bufs); +} #endif /* __HYPERCALL_H__ */ /* diff --git a/sys/xen/hypervisor.h b/sys/xen/hypervisor.h index d613e67c5a3b..2be61597fc18 100644 --- a/sys/xen/hypervisor.h +++ b/sys/xen/hypervisor.h @@ -20,6 +20,7 @@ #include #include #include +#include #include extern uint64_t get_system_time(int ticks); diff --git a/sys/xen/privcmd.h b/sys/xen/privcmd.h index ac2d0c00b845..cd0bc7d550d9 100644 --- a/sys/xen/privcmd.h +++ b/sys/xen/privcmd.h @@ -63,11 +63,24 @@ struct ioctl_privcmd_mmapresource { */ }; +struct privcmd_dmop_buf { + void *uptr; /* pointer to memory (in calling process) */ + size_t size; /* size of the buffer */ +}; + +struct ioctl_privcmd_dmop { + domid_t dom; /* target domain */ + unsigned int num; /* num of buffers */ + const struct privcmd_dmop_buf *ubufs; /* array of buffers */ +}; + #define IOCTL_PRIVCMD_HYPERCALL \ _IOWR('E', 0, struct ioctl_privcmd_hypercall) #define IOCTL_PRIVCMD_MMAPBATCH \ _IOWR('E', 1, struct ioctl_privcmd_mmapbatch) #define IOCTL_PRIVCMD_MMAP_RESOURCE \ _IOW('E', 2, struct ioctl_privcmd_mmapresource) +#define IOCTL_PRIVCMD_DM_OP \ + _IOW('E', 3, struct ioctl_privcmd_dmop) #endif /* !__XEN_PRIVCMD_H__ */ From owner-dev-commits-src-all@freebsd.org Mon Jan 11 15:36:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC85F4DC6FE; Mon, 11 Jan 2021 15:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDyV36vCnz3rP2; Mon, 11 Jan 2021 15:36: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 7B4321CFC6; Mon, 11 Jan 2021 15:36: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 10BFaBcx026689; Mon, 11 Jan 2021 15:36:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BFaBtH026688; Mon, 11 Jan 2021 15:36:11 GMT (envelope-from git) Date: Mon, 11 Jan 2021 15:36:11 GMT Message-Id: <202101111536.10BFaBtH026688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: a7650787905d - main - xen/privcmd: implement the restrict ioctl 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: a7650787905d36ac01297aa699d3009da6cfaaa9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 15:36:17 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=a7650787905d36ac01297aa699d3009da6cfaaa9 commit a7650787905d36ac01297aa699d3009da6cfaaa9 Author: Roger Pau Monne AuthorDate: 2020-06-25 17:16:04 +0000 Commit: Roger Pau Monné CommitDate: 2021-01-11 15:33:27 +0000 xen/privcmd: implement the restrict ioctl Use an interface compatible with the Linux one so that the user-space libraries already using the Linux interface can be used without much modifications. This allows an open privcmd instance to limit against which domains it can act upon. Sponsored by: Citrix Systems R&D --- sys/dev/xen/privcmd/privcmd.c | 82 +++++++++++++++++++++++++++++++++++++++++++ sys/xen/privcmd.h | 2 ++ 2 files changed, 84 insertions(+) diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index d9f11aa0fe7a..0ef6737df64f 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -78,12 +78,14 @@ struct privcmd_map { }; static d_ioctl_t privcmd_ioctl; +static d_open_t privcmd_open; static d_mmap_single_t privcmd_mmap_single; static struct cdevsw privcmd_devsw = { .d_version = D_VERSION, .d_ioctl = privcmd_ioctl, .d_mmap_single = privcmd_mmap_single, + .d_open = privcmd_open, .d_name = "privcmd", }; @@ -99,6 +101,10 @@ static struct cdev_pager_ops privcmd_pg_ops = { .cdev_pg_dtor = privcmd_pg_dtor, }; +struct per_user_data { + domid_t dom; +}; + static device_t privcmd_dev = NULL; /*------------------------- Privcmd Pager functions --------------------------*/ @@ -259,12 +265,30 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, { int error; unsigned int i; + void *data; + const struct per_user_data *u; + + error = devfs_get_cdevpriv(&data); + if (error != 0) + return (EINVAL); + /* + * Constify user-data to prevent unintended changes to the restriction + * limits. + */ + u = data; switch (cmd) { case IOCTL_PRIVCMD_HYPERCALL: { struct ioctl_privcmd_hypercall *hcall; hcall = (struct ioctl_privcmd_hypercall *)arg; + + /* Forbid hypercalls if restricted. */ + if (u->dom != DOMID_INVALID) { + error = EPERM; + break; + } + #ifdef __amd64__ /* * The hypervisor page table walker will refuse to access @@ -301,6 +325,11 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, mmap = (struct ioctl_privcmd_mmapbatch *)arg; + if (u->dom != DOMID_INVALID && u->dom != mmap->dom) { + error = EPERM; + break; + } + umap = setup_virtual_area(td, mmap->addr, mmap->num); if (umap == NULL) { error = EINVAL; @@ -382,6 +411,11 @@ mmap_out: mmap = (struct ioctl_privcmd_mmapresource *)arg; + if (u->dom != DOMID_INVALID && u->dom != mmap->dom) { + error = EPERM; + break; + } + bzero(&adq, sizeof(adq)); adq.domid = mmap->dom; @@ -434,6 +468,11 @@ mmap_out: dmop = (struct ioctl_privcmd_dmop *)arg; + if (u->dom != DOMID_INVALID && u->dom != dmop->dom) { + error = EPERM; + break; + } + if (dmop->num == 0) break; @@ -472,6 +511,24 @@ mmap_out: free(hbufs, M_PRIVCMD); + break; + } + case IOCTL_PRIVCMD_RESTRICT: { + struct per_user_data *u; + domid_t dom; + + dom = *(domid_t *)arg; + + error = devfs_get_cdevpriv((void **)&u); + if (error != 0) + break; + + if (u->dom != DOMID_INVALID && u->dom != dom) { + error = -EINVAL; + break; + } + u->dom = dom; + break; } default: @@ -482,6 +539,31 @@ mmap_out: return (error); } +static void +user_release(void *arg) +{ + + free(arg, M_PRIVCMD); +} + +static int +privcmd_open(struct cdev *dev, int flag, int otyp, struct thread *td) +{ + struct per_user_data *u; + int error; + + u = malloc(sizeof(*u), M_PRIVCMD, M_WAITOK); + u->dom = DOMID_INVALID; + + /* Assign the allocated per_user_data to this open instance. */ + error = devfs_set_cdevpriv(u, user_release); + if (error != 0) { + free(u, M_PRIVCMD); + } + + return (error); +} + /*------------------ Private Device Attachment Functions --------------------*/ static void privcmd_identify(driver_t *driver, device_t parent) diff --git a/sys/xen/privcmd.h b/sys/xen/privcmd.h index cd0bc7d550d9..55a1cdc86471 100644 --- a/sys/xen/privcmd.h +++ b/sys/xen/privcmd.h @@ -82,5 +82,7 @@ struct ioctl_privcmd_dmop { _IOW('E', 2, struct ioctl_privcmd_mmapresource) #define IOCTL_PRIVCMD_DM_OP \ _IOW('E', 3, struct ioctl_privcmd_dmop) +#define IOCTL_PRIVCMD_RESTRICT \ + _IOW('E', 4, domid_t) #endif /* !__XEN_PRIVCMD_H__ */ From owner-dev-commits-src-all@freebsd.org Mon Jan 11 15:44:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF88C4DD6CC; Mon, 11 Jan 2021 15:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDygt2qzKz3vy0; Mon, 11 Jan 2021 15:44: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 D52941CD4B; Mon, 11 Jan 2021 15:44: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 10BFifMP039550; Mon, 11 Jan 2021 15:44:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BFifrH039549; Mon, 11 Jan 2021 15:44:41 GMT (envelope-from git) Date: Mon, 11 Jan 2021 15:44:41 GMT Message-Id: <202101111544.10BFifrH039549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Watson Subject: git: 30b68ecda84e - main - Changes that improve DTrace FBT reliability on freebsd/arm64: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rwatson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30b68ecda84e38648511f5585a6f36b94b167f0d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 15:44:42 -0000 The branch main has been updated by rwatson: URL: https://cgit.FreeBSD.org/src/commit/?id=30b68ecda84e38648511f5585a6f36b94b167f0d commit 30b68ecda84e38648511f5585a6f36b94b167f0d Author: Robert Watson AuthorDate: 2021-01-09 08:38:11 +0000 Commit: Robert Watson CommitDate: 2021-01-11 15:42:22 +0000 Changes that improve DTrace FBT reliability on freebsd/arm64: - Implement a dtrace_getnanouptime(), matching the existing dtrace_getnanotime(), to avoid DTrace calling out to a potentially instrumentable function. (These should probably both be under KDTRACE_HOOKS. Also, it's not clear to me that they are correct implementations for the DTrace thread time functions they are used in .. fixes for another commit.) - Don't allow FBT to instrument functions involved in EL1 exception handling that are involved in FBT trap processing: handle_el1h_sync() and do_el1h_sync(). - Don't allow FBT to instrument DDB and KDB functions, as that makes it rather harder to debug FBT problems. Prior to these changes, use of FBT on FreeBSD/arm64 rapidly led to kernel panics due to recursion in DTrace. Reliable FBT on FreeBSD/arm64 is reliant on another change from @andrew to have the aarch64 instrumentor more carefully check that instructions it replaces are against the stack pointer, which can otherwise lead to memory corruption. That change remains under review. MFC after: 2 weeks Reviewed by: andrew, kp, markj (earlier version), jrtc27 (earlier version) Differential revision: https://reviews.freebsd.org/D27766 --- sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 3 ++- sys/cddl/dev/dtrace/arm/dtrace_subr.c | 3 ++- sys/cddl/dev/dtrace/riscv/dtrace_subr.c | 3 ++- sys/cddl/dev/fbt/aarch64/fbt_isa.c | 8 ++++++++ sys/cddl/dev/fbt/fbt.c | 11 +++++++++++ sys/kern/kern_tc.c | 15 +++++++++++++++ 6 files changed, 40 insertions(+), 3 deletions(-) diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c index 000de0094492..2d59b29b850b 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); extern dtrace_id_t dtrace_probeid_error; extern int (*dtrace_invop_jump_addr)(struct trapframe *); extern void dtrace_getnanotime(struct timespec *tsp); +extern void dtrace_getnanouptime(struct timespec *tsp); int dtrace_invop(uintptr_t, struct trapframe *, uintptr_t); void dtrace_invop_init(void); @@ -163,7 +164,7 @@ dtrace_gethrtime() { struct timespec curtime; - nanouptime(&curtime); + dtrace_getnanouptime(&curtime); return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec); diff --git a/sys/cddl/dev/dtrace/arm/dtrace_subr.c b/sys/cddl/dev/dtrace/arm/dtrace_subr.c index 8cd9c9c1f204..e98a9ded5442 100644 --- a/sys/cddl/dev/dtrace/arm/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/arm/dtrace_subr.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); extern dtrace_id_t dtrace_probeid_error; extern int (*dtrace_invop_jump_addr)(struct trapframe *); extern void dtrace_getnanotime(struct timespec *tsp); +extern void dtrace_getnanouptime(struct timespec *tsp); int dtrace_invop(uintptr_t, struct trapframe *, uintptr_t); void dtrace_invop_init(void); @@ -174,7 +175,7 @@ dtrace_gethrtime() { struct timespec curtime; - nanouptime(&curtime); + dtrace_getnanouptime(&curtime); return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec); diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c index 463465e119f9..c1ac339b3a26 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); extern dtrace_id_t dtrace_probeid_error; extern int (*dtrace_invop_jump_addr)(struct trapframe *); extern void dtrace_getnanotime(struct timespec *tsp); +extern void dtrace_getnanouptime(struct timespec *tsp); int dtrace_invop(uintptr_t, struct trapframe *); void dtrace_invop_init(void); @@ -165,7 +166,7 @@ dtrace_gethrtime() { struct timespec curtime; - nanouptime(&curtime); + dtrace_getnanouptime(&curtime); return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec); diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index 581f390baf89..3c5070785614 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -96,6 +96,14 @@ fbt_provide_module_function(linker_file_t lf, int symindx, if (fbt_excluded(name)) return (0); + /* + * Instrumenting certain exception handling functions can lead to FBT + * recursion, so exclude from instrumentation. + */ + if (strcmp(name, "handle_el1h_sync") == 0 || + strcmp(name, "do_el1h_sync") == 0) + return (1); + instr = (uint32_t *)(symval->value); limit = (uint32_t *)(symval->value + symval->size); diff --git a/sys/cddl/dev/fbt/fbt.c b/sys/cddl/dev/fbt/fbt.c index cf5971d2d9bd..a378ae0eb317 100644 --- a/sys/cddl/dev/fbt/fbt.c +++ b/sys/cddl/dev/fbt/fbt.c @@ -127,6 +127,17 @@ fbt_excluded(const char *name) return (1); } + /* + * Omit instrumentation of functions that are probably in DDB. It + * makes it too hard to debug broken FBT. + * + * NB: kdb_enter() can be excluded, but its call to printf() can't be. + * This is generally OK since we're not yet in debugging context. + */ + if (strncmp(name, "db_", 3) == 0 || + strncmp(name, "kdb_", 4) == 0) + return (1); + /* * Lock owner methods may be called from probe context. */ diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 467e5cf8ee3a..cc3219a885ab 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -146,6 +146,7 @@ static void tc_windup(struct bintime *new_boottimebin); static void cpu_tick_calibrate(int); void dtrace_getnanotime(struct timespec *tsp); +void dtrace_getnanouptime(struct timespec *tsp); static int sysctl_kern_boottime(SYSCTL_HANDLER_ARGS) @@ -997,6 +998,20 @@ dtrace_getnanotime(struct timespec *tsp) GETTHMEMBER(tsp, th_nanotime); } +/* + * This is a clone of getnanouptime used for time since boot. + * The dtrace_ prefix prevents fbt from creating probes for + * it so an uptime that can be safely used in all fbt probes. + */ +void +dtrace_getnanouptime(struct timespec *tsp) +{ + struct bintime bt; + + GETTHMEMBER(&bt, th_offset); + bintime2timespec(&bt, tsp); +} + /* * System clock currently providing time to the system. Modifiable via sysctl * when the FFCLOCK option is defined. From owner-dev-commits-src-all@freebsd.org Mon Jan 11 16:23:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34A504DE173; Mon, 11 Jan 2021 16:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDzXW0nX2z4SVf; Mon, 11 Jan 2021 16:23: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 0DE011DA90; Mon, 11 Jan 2021 16:23: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 10BGNMLw090967; Mon, 11 Jan 2021 16:23:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BGNMK9090966; Mon, 11 Jan 2021 16:23:22 GMT (envelope-from git) Date: Mon, 11 Jan 2021 16:23:22 GMT Message-Id: <202101111623.10BGNMK9090966@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: 7dcddacafaf0 - main - cgem: update 64-bit check 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: 7dcddacafaf0e5afffb1c93105f5e31a2a7a6742 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 16:23:23 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7dcddacafaf0e5afffb1c93105f5e31a2a7a6742 commit 7dcddacafaf0e5afffb1c93105f5e31a2a7a6742 Author: Mitchell Horne AuthorDate: 2021-01-11 00:30:41 +0000 Commit: Mitchell Horne CommitDate: 2021-01-11 16:15:32 +0000 cgem: update 64-bit check The cgem(4) driver was updated to support 64-bit bus addressing in facdd1cd2045. However, the committed version determines this in an un-idiomatic way. Change the compile-time conditional to check BUS_SPACE_MAXADDR, rather than comparing int and pointer sizes. Reported by: jrtc27 --- sys/dev/cadence/if_cgem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c index 77337e977dcc..81fc39b831af 100644 --- a/sys/dev/cadence/if_cgem.c +++ b/sys/dev/cadence/if_cgem.c @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#if INTPTR_MAX == INT64_MAX +#if BUS_SPACE_MAXADDR > BUS_SPACE_MAXADDR_32BIT #define CGEM64 #endif From owner-dev-commits-src-all@freebsd.org Mon Jan 11 16:37:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFD644DF224; Mon, 11 Jan 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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDzrX5WcDz4TZ5; Mon, 11 Jan 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 AFFDE1D7E1; Mon, 11 Jan 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 10BGbGZ7004527; Mon, 11 Jan 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 10BGbGCh004526; Mon, 11 Jan 2021 16:37:16 GMT (envelope-from git) Date: Mon, 11 Jan 2021 16:37:16 GMT Message-Id: <202101111637.10BGbGCh004526@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: 2903606b6063 - main - Add missing rcvar name for os-release. 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: 2903606b6063b5330c2311a53ade552edf5a7cef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 16:37:16 -0000 The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=2903606b6063b5330c2311a53ade552edf5a7cef commit 2903606b6063b5330c2311a53ade552edf5a7cef Author: Gleb Smirnoff AuthorDate: 2021-01-11 16:36:37 +0000 Commit: Gleb Smirnoff CommitDate: 2021-01-11 16:36:37 +0000 Add missing rcvar name for os-release. --- libexec/rc/rc.d/os-release | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.d/os-release b/libexec/rc/rc.d/os-release index 411348a43668..c328e161a70e 100755 --- a/libexec/rc/rc.d/os-release +++ b/libexec/rc/rc.d/os-release @@ -13,6 +13,7 @@ : ${osrelease_perms:=444} name="osrelease" desc="Update ${osrelease_file}" +rcvar="osrelease_enable" start_cmd="osrelease_start" stop_cmd=":" From owner-dev-commits-src-all@freebsd.org Mon Jan 11 17:16:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 411F14E059E; Mon, 11 Jan 2021 17:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF0kB1N1Vz4Xq4; Mon, 11 Jan 2021 17:16: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 1D64D1E3B9; Mon, 11 Jan 2021 17:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10BHGoeq056253; Mon, 11 Jan 2021 17:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BHGobm056252; Mon, 11 Jan 2021 17:16:50 GMT (envelope-from git) Date: Mon, 11 Jan 2021 17:16:50 GMT Message-Id: <202101111716.10BHGobm056252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: d1eb05aa0c3a - main - xen: remove .swp file from public headers 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: d1eb05aa0c3a5140437d20920d2e80b72ae8c25c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 17:16:50 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=d1eb05aa0c3a5140437d20920d2e80b72ae8c25c commit d1eb05aa0c3a5140437d20920d2e80b72ae8c25c Author: Roger Pau Monné AuthorDate: 2021-01-11 17:13:57 +0000 Commit: Roger Pau Monné CommitDate: 2021-01-11 17:14:11 +0000 xen: remove .swp file from public headers Should have never been there in the first place. --- sys/xen/interface/arch-x86/hvm/.save.h.swp | Bin 16384 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/xen/interface/arch-x86/hvm/.save.h.swp b/sys/xen/interface/arch-x86/hvm/.save.h.swp deleted file mode 100644 index d5f583e519f8..000000000000 Binary files a/sys/xen/interface/arch-x86/hvm/.save.h.swp and /dev/null differ From owner-dev-commits-src-all@freebsd.org Mon Jan 11 18:04:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC5784E124C; Mon, 11 Jan 2021 18:04:01 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF1md4Hr4z4bwk; Mon, 11 Jan 2021 18:04:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:5df6:af43:a641:70cf]) (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 D9F934142; Mon, 11 Jan 2021 18:04:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 16079c7233be - main - hid: quiet -Wswitch To: Ryan Libby , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> Date: Mon, 11 Jan 2021 10:03:58 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 18:04:01 -0000 On 1/10/21 9:54 PM, Ryan Libby wrote: > The branch main has been updated by rlibby: > > URL: https://cgit.FreeBSD.org/src/commit/?id=16079c7233be8bd6c88e3421a70c7ca87cfea370 > > commit 16079c7233be8bd6c88e3421a70c7ca87cfea370 > Author: Ryan Libby > AuthorDate: 2021-01-11 05:53:15 +0000 > Commit: Ryan Libby > CommitDate: 2021-01-11 05:53:15 +0000 > > hid: quiet -Wswitch > > Gcc builds complained that not all switch cases are handled. Add > default cases to appease gcc. > > Reviewed by: hselasky (previous version), wulf > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D28082 If these cases are never reachable, then I think '__assert_unreachable()' is preferred to a plain break. -- John Baldwin From owner-dev-commits-src-all@freebsd.org Mon Jan 11 18:11:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE65A4E1B56; Mon, 11 Jan 2021 18:11:46 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF1xZ63Wrz4cdM; Mon, 11 Jan 2021 18:11:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:5df6:af43:a641:70cf]) (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 0AA32421D; Mon, 11 Jan 2021 18:11:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 0f0379fa5581 - main - hid: Add recently imported drivers to NOTES To: Vladimir Kondratyev , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101101920.10AJK6rv043957@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Mon, 11 Jan 2021 10:11:44 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <202101101920.10AJK6rv043957@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 18:11:47 -0000 On 1/10/21 11:20 AM, Vladimir Kondratyev wrote: > The branch main has been updated by wulf: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0f0379fa5581c6b89d22bd041f7443581bac616c > > commit 0f0379fa5581c6b89d22bd041f7443581bac616c > Author: Vladimir Kondratyev > AuthorDate: 2021-01-09 12:07:19 +0000 > Commit: Vladimir Kondratyev > CommitDate: 2021-01-10 19:17:20 +0000 > > hid: Add recently imported drivers to NOTES > > Reviewed by: hselasky > Differential revision: https://reviews.freebsd.org/D28060 Now that we have entries in NOTES, can we perhaps remove HID_DEBUG from GENERIC along with commented out drivers related to usbhid? -- John Baldwin From owner-dev-commits-src-all@freebsd.org Mon Jan 11 18:12:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBAC34E1E97; Mon, 11 Jan 2021 18:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF1yF6Npfz4d91; Mon, 11 Jan 2021 18:12: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 CDBA31EF49; Mon, 11 Jan 2021 18:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10BICLHK032613; Mon, 11 Jan 2021 18:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BICLF8032612; Mon, 11 Jan 2021 18:12:21 GMT (envelope-from git) Date: Mon, 11 Jan 2021 18:12:21 GMT Message-Id: <202101111812.10BICLF8032612@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: d7a7d6a7c3c6 - main - ndis: Per user request, delay removal to 14 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: d7a7d6a7c3c6a9b6e03e4739df6801e2a0a296e9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 18:12:22 -0000 The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d7a7d6a7c3c6a9b6e03e4739df6801e2a0a296e9 commit d7a7d6a7c3c6a9b6e03e4739df6801e2a0a296e9 Author: Brooks Davis AuthorDate: 2021-01-11 18:11:49 +0000 Commit: Brooks Davis CommitDate: 2021-01-11 18:11:49 +0000 ndis: Per user request, delay removal to 14 We will remove ndis shortly after the 13 branch. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D28049 --- share/man/man4/ndis.4 | 2 +- sys/dev/if_ndis/if_ndis_pci.c | 2 +- sys/dev/if_ndis/if_ndis_usb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/ndis.4 b/share/man/man4/ndis.4 index 0feec231e605..0a1ae39bff62 100644 --- a/share/man/man4/ndis.4 +++ b/share/man/man4/ndis.4 @@ -121,7 +121,7 @@ which can be configured via the command. .Sh DEPRECATION NOTICE This driver is scheduled for removal prior to the release of -.Fx 13.0 +.Fx 14.0 .Sh DIAGNOSTICS .Bl -diag .It "ndis%d: watchdog timeout" diff --git a/sys/dev/if_ndis/if_ndis_pci.c b/sys/dev/if_ndis/if_ndis_pci.c index ba83652d1289..cf1685a920ea 100644 --- a/sys/dev/if_ndis/if_ndis_pci.c +++ b/sys/dev/if_ndis/if_ndis_pci.c @@ -338,7 +338,7 @@ ndis_attach_pci(dev) error = ndis_attach(dev); if (error == 0) - gone_in_dev(dev, 13, "ndis removed"); + gone_in_dev(dev, 14, "ndis removed"); fail: diff --git a/sys/dev/if_ndis/if_ndis_usb.c b/sys/dev/if_ndis/if_ndis_usb.c index c696a7bf720c..3364d3181532 100644 --- a/sys/dev/if_ndis/if_ndis_usb.c +++ b/sys/dev/if_ndis/if_ndis_usb.c @@ -199,7 +199,7 @@ ndisusb_attach(device_t self) if (ndis_attach(self) != 0) return (ENXIO); - gone_in_dev(self, 13, "ndis removed"); + gone_in_dev(self, 14, "ndis removed"); return (0); } From owner-dev-commits-src-all@freebsd.org Mon Jan 11 19:05:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 875BE4E32A8; Mon, 11 Jan 2021 19:05:43 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF37q3F51z4hwV; Mon, 11 Jan 2021 19:05:43 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f174.google.com with SMTP id r9so34307qtp.11; Mon, 11 Jan 2021 11:05:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ySKTo6F2wXxoE9wNYXo5eEpB9UG2QlAAFQzmbBCQpO8=; b=XX5U6itNAjeZmBh9PsibOkNRhdo8NsRNlsrPR6F//XiwSEr7MKaHUlRldMJnNjvaSp 3oLYEHOIjb1xd6b4pfh31jKBxuxTImqoWxKdkGEm/mTUdJWrhcq3TPXkisZutbSJgp36 qrXFON5L5EgmTfuEuM/vnbXC+Rgvq0M145QDpexfRhsX8wfgweQsixucebrrNwX5DAvm UE7qZ4ksDxaPWIi4nVC+E8CTKWXOuU+FYO58jukyIeJ2OUKgWS62kthpmJmpgcX+bFio He2p/OVkCtj2YEvfsanQac382oeOhT9VEXwZV1NaCkSWWoxz8/jGA9ypTWSxdlo1B5S/ PSqg== X-Gm-Message-State: AOAM533gSXWrj4IwgeJqjE4HWGNPx4Mp6ahb5fCaYvqauzSCTjVRBUtO Xbrb7KVZH4PzTRViNLah1QyvBeqPGv7anQ== X-Google-Smtp-Source: ABdhPJxDLylM9j+sfSXBwFVpGof+SDUVAedDXX8c7vip4XhNlG41J1S8jomtz8yr3Hsv4XI/9abZsg== X-Received: by 2002:ac8:4b54:: with SMTP id e20mr1075130qts.236.1610391941842; Mon, 11 Jan 2021 11:05:41 -0800 (PST) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com. [209.85.222.180]) by smtp.gmail.com with ESMTPSA id f6sm419807qkh.2.2021.01.11.11.05.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 11:05:41 -0800 (PST) Received: by mail-qk1-f180.google.com with SMTP id w79so508296qkb.5; Mon, 11 Jan 2021 11:05:41 -0800 (PST) X-Received: by 2002:a37:6189:: with SMTP id v131mr721739qkb.337.1610391940354; Mon, 11 Jan 2021 11:05:40 -0800 (PST) MIME-Version: 1.0 References: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> In-Reply-To: <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> From: Ryan Libby Date: Mon, 11 Jan 2021 11:05:29 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 16079c7233be - main - hid: quiet -Wswitch To: Hans Petter Selasky , Vladimir Kondratyev , John Baldwin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DF37q3F51z4hwV X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 19:05:43 -0000 On Mon, Jan 11, 2021 at 10:04 AM John Baldwin wrote: > > On 1/10/21 9:54 PM, Ryan Libby wrote: > > The branch main has been updated by rlibby: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=16079c7233be8bd6c88e3421a70c7ca87cfea370 > > > > commit 16079c7233be8bd6c88e3421a70c7ca87cfea370 > > Author: Ryan Libby > > AuthorDate: 2021-01-11 05:53:15 +0000 > > Commit: Ryan Libby > > CommitDate: 2021-01-11 05:53:15 +0000 > > > > hid: quiet -Wswitch > > > > Gcc builds complained that not all switch cases are handled. Add > > default cases to appease gcc. > > > > Reviewed by: hselasky (previous version), wulf > > Sponsored by: Dell EMC Isilon > > Differential Revision: https://reviews.freebsd.org/D28082 > > If these cases are never reachable, then I think '__assert_unreachable()' > is preferred to a plain break. > > -- > John Baldwin I'll have to let wulf and hselasky speak to that... From owner-dev-commits-src-all@freebsd.org Mon Jan 11 19:15:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E67194E32D7; Mon, 11 Jan 2021 19:15:10 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF3Lk5KxVz4jYk; Mon, 11 Jan 2021 19:15:10 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id 05D04181ED9; Mon, 11 Jan 2021 22:15:03 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id r5vAY9xKA6HL; Mon, 11 Jan 2021 22:15:02 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 3365F181ECC; Mon, 11 Jan 2021 22:15:02 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 6459342211F; Mon, 11 Jan 2021 22:15:01 +0300 (MSK) Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id ATspCdyn2jei; Mon, 11 Jan 2021 22:14:54 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id 8C7BD42211C; Mon, 11 Jan 2021 22:14:54 +0300 (MSK) Subject: Re: git: 16079c7233be - main - hid: quiet -Wswitch To: John Baldwin , Ryan Libby , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> From: Vladimir Kondratyev Message-ID: <915475fa-0072-2303-dfc9-dbeb42224434@kondratyev.su> Date: Mon, 11 Jan 2021 22:14:43 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DF3Lk5KxVz4jYk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 19:15:11 -0000 On 11.01.2021 21:03, John Baldwin wrote: > On 1/10/21 9:54 PM, Ryan Libby wrote: >> The branch main has been updated by rlibby: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=16079c7233be8bd6c88e3421a70c7ca87cfea370 >> >> commit 16079c7233be8bd6c88e3421a70c7ca87cfea370 >> Author: Ryan Libby >> AuthorDate: 2021-01-11 05:53:15 +0000 >> Commit: Ryan Libby >> CommitDate: 2021-01-11 05:53:15 +0000 >> >> hid: quiet -Wswitch >> >> Gcc builds complained that not all switch cases are handled. Add >> default cases to appease gcc. >> >> Reviewed by: hselasky (previous version), wulf >> Sponsored by: Dell EMC Isilon >> Differential Revision: https://reviews.freebsd.org/D28082 > > If these cases are never reachable, then I think '__assert_unreachable()' > is preferred to a plain break. > These cases are reachable. They are NOP steps of state machine. From owner-dev-commits-src-all@freebsd.org Mon Jan 11 19:22:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0992E4E3C93 for ; Mon, 11 Jan 2021 19:22:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF3W61TM4z4jyS for ; Mon, 11 Jan 2021 19:22:25 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f45.google.com with SMTP id 190so260926wmz.0 for ; Mon, 11 Jan 2021 11:22:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=swcxcyZvikKZOUbqA2s5EDNMASx1ea5+IOTDA8KRWVg=; b=dQSUSUVnpwCBrKYGxiO1JWRehEwKGa6uMBZs6/jazB1eIpHUGSJr0196+vHRPwdbna t+vIDTSPxzSRLZa14ih3SdqtpQ6PCViI2j2NOPFunA0G43zV4Vl68WtBNyMfmj4jK6CX DPd/1DpwVYZo4UTMLPcJHxGNjXvv+uN/QaMLT5scSL2v5po6VYPv5H6As7zI3b2cDVMI bVlG9ZxnYvoSNkGR/NM0TnBbZsD81YquVe+VdqY/zXGFkf3J6SqvpdfygtsHfcRPG+jH TcAvUitSW/hPQAJpcp09OfPEh9eQvJ7mRsJg/XR5tFwnJjRWTVz6l0iFwGMW4Cr8UgkW B3ww== X-Gm-Message-State: AOAM532Nv6PoYZUPaNaUdc5y7//X1oVYAL3o/fKpVzwn5r1g/SzML3Oi zt1hbRg5FuQVSEybGQECzrmjpA== X-Google-Smtp-Source: ABdhPJy6Y4iB8t4jR9gOdiiB0tPQ+84nIhyXJ6Ek4fg+s4p6UPVDfEwoB9/FOK9fIMgrJ0Lwm9Ueww== X-Received: by 2002:a7b:c145:: with SMTP id z5mr288574wmi.164.1610392944732; Mon, 11 Jan 2021 11:22:24 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id r7sm400923wmh.2.2021.01.11.11.22.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 11:22:24 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 16079c7233be - main - hid: quiet -Wswitch From: Jessica Clarke In-Reply-To: <915475fa-0072-2303-dfc9-dbeb42224434@kondratyev.su> Date: Mon, 11 Jan 2021 19:22:21 +0000 Cc: John Baldwin , Ryan Libby , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <486B154B-376A-4000-8946-844353D8504E@freebsd.org> References: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> <915475fa-0072-2303-dfc9-dbeb42224434@kondratyev.su> To: Vladimir Kondratyev X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DF3W61TM4z4jyS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 19:22:27 -0000 On 11 Jan 2021, at 19:14, Vladimir Kondratyev = wrote: > On 11.01.2021 21:03, John Baldwin wrote: >> On 1/10/21 9:54 PM, Ryan Libby wrote: >>> The branch main has been updated by rlibby: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D16079c7233be8bd6c88e3421a70c7ca8= 7cfea370 >>>=20 >>> commit 16079c7233be8bd6c88e3421a70c7ca87cfea370 >>> Author: Ryan Libby >>> AuthorDate: 2021-01-11 05:53:15 +0000 >>> Commit: Ryan Libby >>> CommitDate: 2021-01-11 05:53:15 +0000 >>>=20 >>> hid: quiet -Wswitch >>>=20 >>> Gcc builds complained that not all switch cases are handled. Add >>> default cases to appease gcc. >>>=20 >>> Reviewed by: hselasky (previous version), wulf >>> Sponsored by: Dell EMC Isilon >>> Differential Revision: https://reviews.freebsd.org/D28082 >>=20 >> If these cases are never reachable, then I think = '__assert_unreachable()' >> is preferred to a plain break. >>=20 > These cases are reachable. They are NOP steps of state machine. How many states are there? It might be better to document that using an explicit set of case labels that just immediately break (and then -Wswitch will help you in future in case you ever forget to update one of the switch statements). Where possible -Wswitch is best fixed, not silenced with default, though there are times when the latter is preferable. Jess From owner-dev-commits-src-all@freebsd.org Mon Jan 11 19:36:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6145B4E3FE6; Mon, 11 Jan 2021 19:36:35 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF3qP6rnDz4lBb; Mon, 11 Jan 2021 19:36:33 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f172.google.com with SMTP id a6so115427qtw.6; Mon, 11 Jan 2021 11:36:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rLF97UMWs/9WyMP6zw+MHFEl/7QQWyol2vahNNGiXFA=; b=AiMWnY2KZ9HXOMFK2yoCgL7xIaSO0E7WW6KFia+l4m8GV9mrvUh0BGXjO5zmzlYRdI 3Ceyt4VZEG0xQYZ6iYpwHtKoqQpsysJFOOaIhYjbGrguLcLJV1GJFfeyB5cRXZ6UXyP4 02qAwqu5COGJn9lBkkIN53NMQQptVD55/LTwc3xodF8PHvZ6DhZm1MDpPF+pJA1ZOMid fCsPmJ4ek1bdysCUtJGkFpuDlFNBnEmov7v09THycRDQFPXNIsAE4duRPFiM7e+RrRha K9Tv0xxsg1StF4ztiTs01MC26S3LkApxSM3QHy75BHjUiWdPjGOaZGowejjj8kpmyN1L LmPg== X-Gm-Message-State: AOAM531HYK8FNAtHUKKqz491lsM6o0LEnHgDaZrrMdO3nEs7VNrTsVpj 2j/olJdMK8mPHnHttaDGAMr5fCclg87YHg== X-Google-Smtp-Source: ABdhPJyRqhJt33ocBrfRWwtGEOqFMVxxVUd+k652V4lc000Xu99zu7N1fg3+pvEP7Cg8pP4EWIy/uw== X-Received: by 2002:a05:622a:1cb:: with SMTP id t11mr1166410qtw.282.1610393792159; Mon, 11 Jan 2021 11:36:32 -0800 (PST) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com. [209.85.160.181]) by smtp.gmail.com with ESMTPSA id q27sm416879qkj.131.2021.01.11.11.36.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 11:36:30 -0800 (PST) Received: by mail-qt1-f181.google.com with SMTP id r9so94959qtp.11; Mon, 11 Jan 2021 11:36:30 -0800 (PST) X-Received: by 2002:ac8:70c:: with SMTP id g12mr1202568qth.140.1610393790511; Mon, 11 Jan 2021 11:36:30 -0800 (PST) MIME-Version: 1.0 References: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> <915475fa-0072-2303-dfc9-dbeb42224434@kondratyev.su> <486B154B-376A-4000-8946-844353D8504E@freebsd.org> In-Reply-To: <486B154B-376A-4000-8946-844353D8504E@freebsd.org> From: Ryan Libby Date: Mon, 11 Jan 2021 11:36:19 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 16079c7233be - main - hid: quiet -Wswitch To: Jessica Clarke Cc: Vladimir Kondratyev , John Baldwin , "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: 4DF3qP6rnDz4lBb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 19:36:36 -0000 On Mon, Jan 11, 2021 at 11:22 AM Jessica Clarke wrote: > > On 11 Jan 2021, at 19:14, Vladimir Kondratyev wrote: > > On 11.01.2021 21:03, John Baldwin wrote: > >> On 1/10/21 9:54 PM, Ryan Libby wrote: > >>> The branch main has been updated by rlibby: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=16079c7233be8bd6c88e3421a70c7ca87cfea370 > >>> > >>> commit 16079c7233be8bd6c88e3421a70c7ca87cfea370 > >>> Author: Ryan Libby > >>> AuthorDate: 2021-01-11 05:53:15 +0000 > >>> Commit: Ryan Libby > >>> CommitDate: 2021-01-11 05:53:15 +0000 > >>> > >>> hid: quiet -Wswitch > >>> > >>> Gcc builds complained that not all switch cases are handled. Add > >>> default cases to appease gcc. > >>> > >>> Reviewed by: hselasky (previous version), wulf > >>> Sponsored by: Dell EMC Isilon > >>> Differential Revision: https://reviews.freebsd.org/D28082 > >> > >> If these cases are never reachable, then I think '__assert_unreachable()' > >> is preferred to a plain break. > >> > > These cases are reachable. They are NOP steps of state machine. > > How many states are there? It might be better to document that using an > explicit set of case labels that just immediately break (and then > -Wswitch will help you in future in case you ever forget to update one > of the switch statements). Where possible -Wswitch is best fixed, not > silenced with default, though there are times when the latter is > preferable. > > Jess > There are currently two other enum values, and four total. I agree with your and John's points in general. In this case, this was specifically discussed in review and reviewers requested use of default. >From my perspective, if that's what maintainers prefer after having considered the options, use of default is acceptable. From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:00:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C1E954E45E8; Mon, 11 Jan 2021 20: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF4MH598Vz4mgr; Mon, 11 Jan 2021 20:00: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 A3FAA20358; Mon, 11 Jan 2021 20: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 10BK0hsD073031; Mon, 11 Jan 2021 20: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 10BK0hNn073030; Mon, 11 Jan 2021 20:00:43 GMT (envelope-from git) Date: Mon, 11 Jan 2021 20:00:43 GMT Message-Id: <202101112000.10BK0hNn073030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 0da3f8c98d17 - main - Bump amount of queued packets in for unresolved ARP/NDP entries to 16. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0da3f8c98d17d9c6e67d0f6cf45085df6a5ef041 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:00:43 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=0da3f8c98d17d9c6e67d0f6cf45085df6a5ef041 commit 0da3f8c98d17d9c6e67d0f6cf45085df6a5ef041 Author: Alexander V. Chernikov AuthorDate: 2021-01-11 19:50:21 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-11 19:51:11 +0000 Bump amount of queued packets in for unresolved ARP/NDP entries to 16. Currently default behaviour is to keep only 1 packet per unresolved entry. Ability to queue more than one packet was added 10 years ago, in r215207, though the default value was kep intact. Things have changed since that time. Systems tend to initiate multiple connections at once for a variety of reasons. For example, recent kern/252278 bug report describe happy-eyeball DNS behaviour sending multiple requests to the DNS server. The primary driver for upper value for the queue length determination is memory consumption. Remote actors should not be able to easily exhaust local memory by sending packets to unresolved arp/ND entries. For now, bump value to 16 packets, to match Darwin implementation. The proper approach would be to switch the limit to calculate memory consumption instead of packet count and limit based on memory. We should MFC this with a variation of D22447. Reviewers: #manpages, #network, bz, emaste Reviewed By: emaste, gbe(doc), jilles(doc) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D28068 --- sys/netinet/if_ether.c | 2 +- sys/netinet6/nd6.c | 2 +- usr.sbin/arp/arp.4 | 25 +++++++------------------ 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 972701369d13..e09ad3d47382 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -114,7 +114,7 @@ VNET_PCPUSTAT_SYSINIT(arpstat); VNET_PCPUSTAT_SYSUNINIT(arpstat); #endif /* VIMAGE */ -VNET_DEFINE_STATIC(int, arp_maxhold) = 1; +VNET_DEFINE_STATIC(int, arp_maxhold) = 16; #define V_arpt_keep VNET(arpt_keep) #define V_arpt_down VNET(arpt_down) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 5b66375e6613..386eb7cca922 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -106,7 +106,7 @@ VNET_DEFINE_STATIC(int, nd6_maxndopt) = 10; /* max # of ND options allowed */ VNET_DEFINE(int, nd6_maxnudhint) = 0; /* max # of subsequent upper * layer hints */ -VNET_DEFINE_STATIC(int, nd6_maxqueuelen) = 1; /* max pkts cached in unresolved +VNET_DEFINE_STATIC(int, nd6_maxqueuelen) = 16; /* max pkts cached in unresolved * ND entries */ #define V_nd6_maxndopt VNET(nd6_maxndopt) #define V_nd6_maxqueuelen VNET(nd6_maxqueuelen) diff --git a/usr.sbin/arp/arp.4 b/usr.sbin/arp/arp.4 index f13af95778a8..c9c9002cf908 100644 --- a/usr.sbin/arp/arp.4 +++ b/usr.sbin/arp/arp.4 @@ -40,9 +40,7 @@ The Address Resolution Protocol (ARP) is used to dynamically map between Protocol Addresses (such as IP addresses) and Local Network Addresses (such as Ethernet addresses). -This implementation maps IP addresses to Ethernet, -ARCnet, -or Token Ring addresses. +This implementation maps IP addresses to Ethernet addresses. It is used by all the Ethernet interface drivers. .Pp ARP caches Internet-Ethernet address mappings. @@ -51,9 +49,10 @@ ARP queues the message which requires the mapping and broadcasts a message on the associated network requesting the address mapping. If a response is provided, the new mapping is cached and any pending message is transmitted. -ARP will queue at most one packet while waiting for a response to a -mapping request; -only the most recently ``transmitted'' packet is kept. +ARP will queue at most +.Va net.link.ether.inet.maxhold +packets while waiting for a response to a mapping request; +only the most recently ``transmitted'' packets are kept. If the target host does not respond after several requests, the host is considered to be down allowing an error to be returned to transmission attempts. @@ -65,17 +64,7 @@ for a non-responding destination host, and .Er EHOSTUNREACH for a non-responding router. .Pp -The ARP cache is stored in the system routing table as -dynamically-created host routes. -The route to a directly-attached Ethernet network is installed as a -.Dq cloning -route (one with the -.Li RTF_CLONING -flag set), -causing routes to individual hosts on that network to be created on -demand. -These routes time out periodically (normally 20 minutes after validated; -entries are not validated when not in use). +The ARP cache is stored in per-interface link-level table. .Pp ARP entries may be added, deleted or changed with the .Xr arp 8 @@ -173,7 +162,7 @@ Default is 1200 seconds. .It Va maxhold How many packets to hold in the per-entry output queue while the entry is being resolved. -Default is one packet. +Default is 16 packets. .It Va maxtries Number of retransmits before a host is considered down and an error is returned. From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:09:18 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A255D4E48E6; Mon, 11 Jan 2021 20:09:18 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF4YB38PZz4nY9; Mon, 11 Jan 2021 20:09:17 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id 5D0BA182047; Mon, 11 Jan 2021 23:09:16 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id IbYFHIbJ-IND; Mon, 11 Jan 2021 23:09:15 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 8D01618203A; Mon, 11 Jan 2021 23:09:15 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 165B342211F; Mon, 11 Jan 2021 23:09:14 +0300 (MSK) Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id Nrakkdhk4-Hz; Mon, 11 Jan 2021 23:09:11 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id 5433A42211C; Mon, 11 Jan 2021 23:09:11 +0300 (MSK) Subject: Re: git: 0f0379fa5581 - main - hid: Add recently imported drivers to NOTES To: John Baldwin , Vladimir Kondratyev , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101101920.10AJK6rv043957@gitrepo.freebsd.org> From: Vladimir Kondratyev Message-ID: Date: Mon, 11 Jan 2021 23:08:59 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DF4YB38PZz4nY9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:09:18 -0000 On 11.01.2021 21:11, John Baldwin wrote: > On 1/10/21 11:20 AM, Vladimir Kondratyev wrote: >> The branch main has been updated by wulf: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=0f0379fa5581c6b89d22bd041f7443581bac616c >> >> commit 0f0379fa5581c6b89d22bd041f7443581bac616c >> Author: Vladimir Kondratyev >> AuthorDate: 2021-01-09 12:07:19 +0000 >> Commit: Vladimir Kondratyev >> CommitDate: 2021-01-10 19:17:20 +0000 >> >> hid: Add recently imported drivers to NOTES >> >> Reviewed by: hselasky >> Differential revision: https://reviews.freebsd.org/D28060 > > Now that we have entries in NOTES, can we perhaps remove HID_DEBUG > from GENERIC Some part of HID code belonged to USB previously. That is why HID_DEBUG line was inherited from already existing USB_DEBUG in GENERIC. If enabling of USB_DEBUG had no relation to HID, we can delete HID_DEBUG. > along with commented out drivers related to usbhid? Yes we can. I'll add mention about minimal number of devices/options required to enable usbhid reliably to NOTES and delete driver lines from GENERIC. I do not want to delete options USBHID_ENABLED as it is about priority rather than features. May be, it have a sense to change it name to USBHID_DISABLED and enable by default. From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:24:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8DBC34E5282; Mon, 11 Jan 2021 20:24:41 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF4tx1r87z4pV9; Mon, 11 Jan 2021 20:24:41 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id 66160182098; Mon, 11 Jan 2021 23:24:39 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id MJLn-Mv49VP8; Mon, 11 Jan 2021 23:24:34 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 2D0F518208B; Mon, 11 Jan 2021 23:24:34 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id A993942211F; Mon, 11 Jan 2021 23:24:32 +0300 (MSK) Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id Eu3p7J0pNI6Y; Mon, 11 Jan 2021 23:24:25 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id 6B7AE42211C; Mon, 11 Jan 2021 23:24:25 +0300 (MSK) Subject: Re: git: 16079c7233be - main - hid: quiet -Wswitch To: Ryan Libby , Jessica Clarke Cc: John Baldwin , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> <915475fa-0072-2303-dfc9-dbeb42224434@kondratyev.su> <486B154B-376A-4000-8946-844353D8504E@freebsd.org> From: Vladimir Kondratyev Message-ID: Date: Mon, 11 Jan 2021 23:24:13 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DF4tx1r87z4pV9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:24:41 -0000 On 11.01.2021 22:36, Ryan Libby wrote: > On Mon, Jan 11, 2021 at 11:22 AM Jessica Clarke wrote: >> >> On 11 Jan 2021, at 19:14, Vladimir Kondratyev wrote: >>> On 11.01.2021 21:03, John Baldwin wrote: >>>> On 1/10/21 9:54 PM, Ryan Libby wrote: >>>>> The branch main has been updated by rlibby: >>>>> >>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=16079c7233be8bd6c88e3421a70c7ca87cfea370 >>>>> >>>>> commit 16079c7233be8bd6c88e3421a70c7ca87cfea370 >>>>> Author: Ryan Libby >>>>> AuthorDate: 2021-01-11 05:53:15 +0000 >>>>> Commit: Ryan Libby >>>>> CommitDate: 2021-01-11 05:53:15 +0000 >>>>> >>>>> hid: quiet -Wswitch >>>>> >>>>> Gcc builds complained that not all switch cases are handled. Add >>>>> default cases to appease gcc. >>>>> >>>>> Reviewed by: hselasky (previous version), wulf >>>>> Sponsored by: Dell EMC Isilon >>>>> Differential Revision: https://reviews.freebsd.org/D28082 >>>> >>>> If these cases are never reachable, then I think '__assert_unreachable()' >>>> is preferred to a plain break. >>>> >>> These cases are reachable. They are NOP steps of state machine. >> >> How many states are there? It might be better to document that using an >> explicit set of case labels that just immediately break (and then >> -Wswitch will help you in future in case you ever forget to update one >> of the switch statements). Where possible -Wswitch is best fixed, not >> silenced with default, though there are times when the latter is >> preferable. >> >> Jess >> > > There are currently two other enum values, and four total. > > I agree with your and John's points in general. In this case, this was > specifically discussed in review and reviewers requested use of default. > From my perspective, if that's what maintainers prefer after having > considered the options, use of default is acceptable. > Skipping of this 2 steps requires addition of extra flags just to avoid calling of NOP routine once at device_probe() and once at device_detach(). I see no reason to add such a micro-optimization at cost of simplicity. From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:39:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 11EE64E593D; Mon, 11 Jan 2021 20:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF5Cd70q1z4q4D; Mon, 11 Jan 2021 20:39: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 E357B20E60; Mon, 11 Jan 2021 20:39: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 10BKd9Za015750; Mon, 11 Jan 2021 20:39:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BKd9VT015749; Mon, 11 Jan 2021 20:39:09 GMT (envelope-from git) Date: Mon, 11 Jan 2021 20:39:09 GMT Message-Id: <202101112039.10BKd9VT015749@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: 425f68e6ce6f - main - Follow-up on 51da4b19be1. When booting a system with WITHOUT_IPFILTER the following warning printed at boot time: 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: 425f68e6ce6f7a89ee8d2dfb4e8faf4b5095fdf7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:39:10 -0000 The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=425f68e6ce6f7a89ee8d2dfb4e8faf4b5095fdf7 commit 425f68e6ce6f7a89ee8d2dfb4e8faf4b5095fdf7 Author: Gleb Smirnoff AuthorDate: 2021-01-11 20:36:54 +0000 Commit: Gleb Smirnoff CommitDate: 2021-01-11 20:36:54 +0000 Follow-up on 51da4b19be1. When booting a system with WITHOUT_IPFILTER the following warning printed at boot time: rcorder: requirement `ipfs' in file `/etc/rc.d/netif' has no providers. Close that using BEFORE rather than REQUIRE for writing down dependencies of optional components. --- libexec/rc/rc.d/ipfs | 1 + libexec/rc/rc.d/netif | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/ipfs b/libexec/rc/rc.d/ipfs index 0cb968f0e4a5..448b8ce8a222 100755 --- a/libexec/rc/rc.d/ipfs +++ b/libexec/rc/rc.d/ipfs @@ -5,6 +5,7 @@ # PROVIDE: ipfs # REQUIRE: ipnat +# BEFORE: netif # KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/libexec/rc/rc.d/netif b/libexec/rc/rc.d/netif index eb1efc4d6274..3dbb3e1a9588 100755 --- a/libexec/rc/rc.d/netif +++ b/libexec/rc/rc.d/netif @@ -27,7 +27,7 @@ # PROVIDE: netif # REQUIRE: FILESYSTEMS iovctl serial sppp sysctl -# REQUIRE: hostid ipfs +# REQUIRE: hostid # KEYWORD: nojailvnet . /etc/rc.subr From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:56:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D92F54E59FE; Mon, 11 Jan 2021 20:56:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4DF5bc5FPPz4rth; Mon, 11 Jan 2021 20:56:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 009A126012D; Mon, 11 Jan 2021 21:56:25 +0100 (CET) Subject: Re: git: 16079c7233be - main - hid: quiet -Wswitch To: Ryan Libby , Vladimir Kondratyev , John Baldwin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> From: Hans Petter Selasky Message-ID: <4a6b1780-b3df-29f7-6062-05c6e81231da@selasky.org> Date: Mon, 11 Jan 2021 21:56:14 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DF5bc5FPPz4rth X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:56:28 -0000 On 1/11/21 8:05 PM, Ryan Libby wrote: >> If these cases are never reachable, then I think '__assert_unreachable()' >> is preferred to a plain break. > Hi, > I'll have to let wulf and hselasky speak to that... __assert_unreachable() is a bit fresh in my opinion. Basically it comes down to a panic/assert when supposedly unreached cases are triggered. commit c79cee71363ddaeb3c5ab7d3ccb87a11e1860d95 Author: Kyle Evans Date: Wed May 13 18:07:37 2020 +0000 kernel: provide panicky version of __unreachable I think: default: break; Or when you need: /* FALLTHROUGH */ is perfectly fine, even though I see other OS'es even macrofy FALLTHROUGH as a built in compiler attribute. Why do a) and not b) ? Are there more things about switch cases we should do? --HPS From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:58:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6C4D4E5E6D; Mon, 11 Jan 2021 20:58: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF5dp5jSCz4rnV; Mon, 11 Jan 2021 20:58: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 B6EA620F54; Mon, 11 Jan 2021 20:58: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 10BKwM5X041811; Mon, 11 Jan 2021 20:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BKwM4A041810; Mon, 11 Jan 2021 20:58:22 GMT (envelope-from git) Date: Mon, 11 Jan 2021 20:58:22 GMT Message-Id: <202101112058.10BKwM4A041810@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: 9658d9c71ae5 - main - amd64 pmap: fix NULL deref in pmap_mincore(). 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: 9658d9c71ae5eebb42cb86372ca75bb7ec0a0638 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:58:22 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9658d9c71ae5eebb42cb86372ca75bb7ec0a0638 commit 9658d9c71ae5eebb42cb86372ca75bb7ec0a0638 Author: Konstantin Belousov AuthorDate: 2021-01-05 15:36:37 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-11 20:57:52 +0000 amd64 pmap: fix NULL deref in pmap_mincore(). pmap_pdpe() might return NULL, check for it. Reviewed by: markj Reported and tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27956 --- sys/amd64/amd64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 2ec303d687a7..f4bfceb6aaaa 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -9490,6 +9490,8 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *pap) pa = 0; val = 0; pdpe = pmap_pdpe(pmap, addr); + if (pdpe == NULL) + goto out; if ((*pdpe & PG_V) != 0) { if ((*pdpe & PG_PS) != 0) { pte = *pdpe; @@ -9525,6 +9527,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *pap) (pte & (PG_MANAGED | PG_V)) == (PG_MANAGED | PG_V)) { *pap = pa; } +out: PMAP_UNLOCK(pmap); return (val); } From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:58:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F248F4E5E6E; Mon, 11 Jan 2021 20:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF5dq6bN9z4rvQ; Mon, 11 Jan 2021 20:58: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 D508221325; Mon, 11 Jan 2021 20:58: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 10BKwNVQ041834; Mon, 11 Jan 2021 20:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BKwNmZ041833; Mon, 11 Jan 2021 20:58:23 GMT (envelope-from git) Date: Mon, 11 Jan 2021 20:58:23 GMT Message-Id: <202101112058.10BKwNmZ041833@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: f67064e592ce - main - amd64 pmap: Remove wrong __unused annotation from the va argument. 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: f67064e592ce0017c72ed785db64d71a459db996 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:58:24 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f67064e592ce0017c72ed785db64d71a459db996 commit f67064e592ce0017c72ed785db64d71a459db996 Author: Konstantin Belousov AuthorDate: 2021-01-09 20:21:34 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-11 20:57:58 +0000 amd64 pmap: Remove wrong __unused annotation from the va argument. Noted by: alc Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27956 --- sys/amd64/amd64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index f4bfceb6aaaa..913a37c763a8 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4399,7 +4399,7 @@ pmap_allocpte_getpdp(pmap_t pmap, struct rwlock **lockp, vm_offset_t va, */ static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, - vm_offset_t va __unused) + vm_offset_t va) { vm_pindex_t pml5index, pml4index; pml5_entry_t *pml5, *pml5u; From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:58:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B5894E5E6F; Mon, 11 Jan 2021 20:58: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF5ds5TGJz4s3L; Mon, 11 Jan 2021 20:58: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 330A220F55; Mon, 11 Jan 2021 20:58: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 10BKwOm4041852; Mon, 11 Jan 2021 20:58:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BKwOjV041851; Mon, 11 Jan 2021 20:58:24 GMT (envelope-from git) Date: Mon, 11 Jan 2021 20:58:24 GMT Message-Id: <202101112058.10BKwOjV041851@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: 9a8f5f5cf5ba - main - amd64 pmap: rename _pmap_allocpte() to pmap_allocpte_alloc(). 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: 9a8f5f5cf5ba834bbaa0b80178895305afd031d2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:58:29 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9a8f5f5cf5ba834bbaa0b80178895305afd031d2 commit 9a8f5f5cf5ba834bbaa0b80178895305afd031d2 Author: Konstantin Belousov AuthorDate: 2021-01-09 19:40:45 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-11 20:57:58 +0000 amd64 pmap: rename _pmap_allocpte() to pmap_allocpte_alloc(). The function performs actual allocation of pte, as opposed to pmap_allocpte() that uses existing free pte if pt page is already there. This also moves function out of namespace similar to a language reserved. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27956 --- sys/amd64/amd64/pmap.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 913a37c763a8..20aed31a2098 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1275,7 +1275,7 @@ static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde); static void pmap_update_pde_invalidate(pmap_t, vm_offset_t va, pd_entry_t pde); -static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, +static vm_page_t pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, vm_offset_t va); static pd_entry_t *pmap_alloc_pde(pmap_t pmap, vm_offset_t va, vm_page_t *pdpgp, struct rwlock **lockp); @@ -4294,8 +4294,8 @@ pmap_allocpte_getpml4(pmap_t pmap, struct rwlock **lockp, vm_offset_t va, pml5index = pmap_pml5e_index(va); pml5 = &pmap->pm_pmltop[pml5index]; if ((*pml5 & PG_V) == 0) { - if (_pmap_allocpte(pmap, pmap_pml5e_pindex(va), lockp, va) == - NULL) + if (pmap_allocpte_alloc(pmap, pmap_pml5e_pindex(va), lockp, + va) == NULL) return (NULL); allocated = true; } else { @@ -4331,8 +4331,8 @@ pmap_allocpte_getpdp(pmap_t pmap, struct rwlock **lockp, vm_offset_t va, if ((*pml4 & PG_V) == 0) { /* Have to allocate a new pdp, recurse */ - if (_pmap_allocpte(pmap, pmap_pml4e_pindex(va), lockp, va) == - NULL) { + if (pmap_allocpte_alloc(pmap, pmap_pml4e_pindex(va), lockp, + va) == NULL) { if (pmap_is_la57(pmap)) pmap_allocpte_free_unref(pmap, va, pmap_pml5e(pmap, va)); @@ -4395,10 +4395,10 @@ pmap_allocpte_getpdp(pmap_t pmap, struct rwlock **lockp, vm_offset_t va, * regardless of the actual mode of operation. * * The root page at PML4/PML5 does not participate in this indexing scheme, - * since it is statically allocated by pmap_pinit() and not by _pmap_allocpte(). + * since it is statically allocated by pmap_pinit() and not by pmap_allocpte(). */ static vm_page_t -_pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, +pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, vm_offset_t va) { vm_pindex_t pml5index, pml4index; @@ -4509,7 +4509,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, } if ((*pdp & PG_V) == 0) { /* Have to allocate a new pd, recurse */ - if (_pmap_allocpte(pmap, pmap_pdpe_pindex(va), + if (pmap_allocpte_alloc(pmap, pmap_pdpe_pindex(va), lockp, va) == NULL) { pmap_allocpte_free_unref(pmap, va, pmap_pml4e(pmap, va)); @@ -4560,7 +4560,7 @@ retry: } else if (va < VM_MAXUSER_ADDRESS) { /* Allocate a pd page. */ pdpindex = pmap_pde_pindex(va) >> NPDPEPGSHIFT; - pdpg = _pmap_allocpte(pmap, NUPDE + pdpindex, lockp, va); + pdpg = pmap_allocpte_alloc(pmap, NUPDE + pdpindex, lockp, va); if (pdpg == NULL) { if (lockp != NULL) goto retry; @@ -4621,7 +4621,7 @@ retry: * Here if the pte page isn't mapped, or if it has been * deallocated. */ - m = _pmap_allocpte(pmap, ptepindex, lockp, va); + m = pmap_allocpte_alloc(pmap, ptepindex, lockp, va); if (m == NULL && lockp != NULL) goto retry; } @@ -6640,7 +6640,7 @@ restart: if (psind == 2) { /* 1G */ pml4e = pmap_pml4e(pmap, va); if (pml4e == NULL || (*pml4e & PG_V) == 0) { - mp = _pmap_allocpte(pmap, pmap_pml4e_pindex(va), + mp = pmap_allocpte_alloc(pmap, pmap_pml4e_pindex(va), NULL, va); if (mp == NULL) goto allocf; @@ -6661,7 +6661,7 @@ restart: } else /* (psind == 1) */ { /* 2M */ pde = pmap_pde(pmap, va); if (pde == NULL) { - mp = _pmap_allocpte(pmap, pmap_pdpe_pindex(va), + mp = pmap_allocpte_alloc(pmap, pmap_pdpe_pindex(va), NULL, va); if (mp == NULL) goto allocf; @@ -6816,7 +6816,7 @@ retry: * deallocated. */ nosleep = (flags & PMAP_ENTER_NOSLEEP) != 0; - mpte = _pmap_allocpte(pmap, pmap_pde_pindex(va), + mpte = pmap_allocpte_alloc(pmap, pmap_pde_pindex(va), nosleep ? NULL : &lock, va); if (mpte == NULL && nosleep) { rv = KERN_RESOURCE_SHORTAGE; @@ -7300,8 +7300,8 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, * Pass NULL instead of the PV list lock * pointer, because we don't intend to sleep. */ - mpte = _pmap_allocpte(pmap, ptepindex, NULL, - va); + mpte = pmap_allocpte_alloc(pmap, ptepindex, + NULL, va); if (mpte == NULL) return (mpte); } @@ -7629,7 +7629,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, srcptepaddr = *pdpe; pdpe = pmap_pdpe(dst_pmap, addr); if (pdpe == NULL) { - if (_pmap_allocpte(dst_pmap, + if (pmap_allocpte_alloc(dst_pmap, pmap_pml4e_pindex(addr), NULL, addr) == NULL) break; From owner-dev-commits-src-all@freebsd.org Mon Jan 11 20:58:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85A3E4E5EED; Mon, 11 Jan 2021 20:58: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF5dv0w9Zz4rdf; Mon, 11 Jan 2021 20:58: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 7719D21165; Mon, 11 Jan 2021 20:58: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 10BKwQNT041874; Mon, 11 Jan 2021 20:58:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BKwQbS041873; Mon, 11 Jan 2021 20:58:26 GMT (envelope-from git) Date: Mon, 11 Jan 2021 20:58:26 GMT Message-Id: <202101112058.10BKwQbS041873@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: 4174e45fb432 - main - amd64 pmap: do not sleep in pmap_allocpte_alloc() with zero referenced page table page. 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: 4174e45fb4320dc27969c3fcbdd7d06e3b1150b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:58:30 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4174e45fb4320dc27969c3fcbdd7d06e3b1150b8 commit 4174e45fb4320dc27969c3fcbdd7d06e3b1150b8 Author: Konstantin Belousov AuthorDate: 2021-01-02 22:27:20 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-11 20:57:58 +0000 amd64 pmap: do not sleep in pmap_allocpte_alloc() with zero referenced page table page. Otherwise parallel pmap_allocpte_alloc() for nearby va might also fail allocating page table page and free the page under us. The end result is that we could dereference unmapped pte when doing cleanup after sleep. Instead, on allocation failure, first free everything, only then we can drop pmap mutex and sleep safely, right before returning to caller. Split inner non-sleepable part of the pmap_allocpte_alloc() into a new helper pmap_allocpte_nosleep(). Reviewed by: markj Reported and tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27956 --- sys/amd64/amd64/pmap.c | 66 ++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 20aed31a2098..0e1d1c02d1fc 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1275,10 +1275,12 @@ static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde); static void pmap_update_pde_invalidate(pmap_t, vm_offset_t va, pd_entry_t pde); -static vm_page_t pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, - struct rwlock **lockp, vm_offset_t va); static pd_entry_t *pmap_alloc_pde(pmap_t pmap, vm_offset_t va, vm_page_t *pdpgp, struct rwlock **lockp); +static vm_page_t pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, + struct rwlock **lockp, vm_offset_t va); +static vm_page_t pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, + struct rwlock **lockp, vm_offset_t va); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, struct rwlock **lockp); @@ -4294,7 +4296,7 @@ pmap_allocpte_getpml4(pmap_t pmap, struct rwlock **lockp, vm_offset_t va, pml5index = pmap_pml5e_index(va); pml5 = &pmap->pm_pmltop[pml5index]; if ((*pml5 & PG_V) == 0) { - if (pmap_allocpte_alloc(pmap, pmap_pml5e_pindex(va), lockp, + if (pmap_allocpte_nosleep(pmap, pmap_pml5e_pindex(va), lockp, va) == NULL) return (NULL); allocated = true; @@ -4331,7 +4333,7 @@ pmap_allocpte_getpdp(pmap_t pmap, struct rwlock **lockp, vm_offset_t va, if ((*pml4 & PG_V) == 0) { /* Have to allocate a new pdp, recurse */ - if (pmap_allocpte_alloc(pmap, pmap_pml4e_pindex(va), lockp, + if (pmap_allocpte_nosleep(pmap, pmap_pml4e_pindex(va), lockp, va) == NULL) { if (pmap_is_la57(pmap)) pmap_allocpte_free_unref(pmap, va, @@ -4355,16 +4357,6 @@ pmap_allocpte_getpdp(pmap_t pmap, struct rwlock **lockp, vm_offset_t va, } /* - * This routine is called if the desired page table page does not exist. - * - * If page table page allocation fails, this routine may sleep before - * returning NULL. It sleeps only if a lock pointer was given. - * - * Note: If a page allocation fails at page table level two, three, or four, - * up to three pages may be held during the wait, only to be released - * afterwards. This conservative approach is easily argued to avoid - * race conditions. - * * The ptepindexes, i.e. page indices, of the page table pages encountered * while translating virtual address va are defined as follows: * - for the page table page (last level), @@ -4398,7 +4390,7 @@ pmap_allocpte_getpdp(pmap_t pmap, struct rwlock **lockp, vm_offset_t va, * since it is statically allocated by pmap_pinit() and not by pmap_allocpte(). */ static vm_page_t -pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, +pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, vm_offset_t va) { vm_pindex_t pml5index, pml4index; @@ -4420,21 +4412,8 @@ pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, * Allocate a page table page. */ if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | - VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { - if (lockp != NULL) { - RELEASE_PV_LIST_LOCK(lockp); - PMAP_UNLOCK(pmap); - PMAP_ASSERT_NOT_IN_DI(); - vm_wait(NULL); - PMAP_LOCK(pmap); - } - - /* - * Indicate the need to retry. While waiting, the page table - * page may have been allocated. - */ + VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) return (NULL); - } if ((m->flags & PG_ZERO) == 0) pmap_zero_page(m); @@ -4509,8 +4488,8 @@ pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, } if ((*pdp & PG_V) == 0) { /* Have to allocate a new pd, recurse */ - if (pmap_allocpte_alloc(pmap, pmap_pdpe_pindex(va), - lockp, va) == NULL) { + if (pmap_allocpte_nosleep(pmap, pmap_pdpe_pindex(va), + lockp, va) == NULL) { pmap_allocpte_free_unref(pmap, va, pmap_pml4e(pmap, va)); vm_page_unwire_noq(m); @@ -4532,7 +4511,32 @@ pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, } pmap_resident_count_inc(pmap, 1); + return (m); +} +/* + * This routine is called if the desired page table page does not exist. + * + * If page table page allocation fails, this routine may sleep before + * returning NULL. It sleeps only if a lock pointer was given. Sleep + * occurs right before returning to the caller. This way, we never + * drop pmap lock to sleep while a page table page has ref_count == 0, + * which prevents the page from being freed under us. + */ +static vm_page_t +pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, + vm_offset_t va) +{ + vm_page_t m; + + m = pmap_allocpte_nosleep(pmap, ptepindex, lockp, va); + if (m == NULL && lockp != NULL) { + RELEASE_PV_LIST_LOCK(lockp); + PMAP_UNLOCK(pmap); + PMAP_ASSERT_NOT_IN_DI(); + vm_wait(NULL); + PMAP_LOCK(pmap); + } return (m); } From owner-dev-commits-src-all@freebsd.org Mon Jan 11 21:01:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DA984E62D3; Mon, 11 Jan 2021 21:01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF5jD1KP1z4sqJ; Mon, 11 Jan 2021 21:01: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 203FF2104C; Mon, 11 Jan 2021 21:01: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 10BL1K8x050480; Mon, 11 Jan 2021 21:01:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BL1KCY050479; Mon, 11 Jan 2021 21:01:20 GMT (envelope-from git) Date: Mon, 11 Jan 2021 21:01:20 GMT Message-Id: <202101112101.10BL1KCY050479@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: 21f749da82e7 - main - libthr: wrap pdfork(2), same as fork(2). 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: 21f749da82e755aafab127618affeffb86cff9a5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 21:01:20 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=21f749da82e755aafab127618affeffb86cff9a5 commit 21f749da82e755aafab127618affeffb86cff9a5 Author: Konstantin Belousov AuthorDate: 2021-01-10 19:22:49 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-11 20:59:52 +0000 libthr: wrap pdfork(2), same as fork(2). Without wrapping, rtld services and malloc(3) are not guaranteed to operate correctly in the forked child. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28088 --- lib/libc/include/libc_private.h | 2 ++ lib/libc/sys/Symbol.map | 1 + lib/libc/sys/interposing_table.c | 1 + lib/libc/sys/pdfork.c | 46 ++++++++++++++++++++++++++++ lib/libthr/thread/thr_fork.c | 66 +++++++++++++++++++++++++++++++++++----- lib/libthr/thread/thr_private.h | 1 + lib/libthr/thread/thr_syscalls.c | 1 + 7 files changed, 111 insertions(+), 7 deletions(-) diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index d26c78c21c07..363e1057986b 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -238,6 +238,7 @@ enum { INTERPOS_fdatasync, INTERPOS_clock_nanosleep, INTERPOS_distribute_static_tls, + INTERPOS_pdfork, INTERPOS_MAX }; @@ -353,6 +354,7 @@ int __sys_msync(void *, __size_t, int); int __sys_nanosleep(const struct timespec *, struct timespec *); int __sys_open(const char *, int, ...); int __sys_openat(int, const char *, int, ...); +int __sys_pdfork(int *, int); int __sys_pselect(int, struct fd_set *, struct fd_set *, struct fd_set *, const struct timespec *, const __sigset_t *); diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 847dd9cca987..0044c06fd639 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -804,6 +804,7 @@ FBSDprivate_1.0 { __sys_openat; _pathconf; __sys_pathconf; + __sys_pdfork; _pipe; __sys_pipe; _poll; diff --git a/lib/libc/sys/interposing_table.c b/lib/libc/sys/interposing_table.c index 670e9fd7dd0f..b2cfb3250cd9 100644 --- a/lib/libc/sys/interposing_table.c +++ b/lib/libc/sys/interposing_table.c @@ -82,6 +82,7 @@ interpos_func_t __libc_interposing[INTERPOS_MAX] = { SLOT(fdatasync, __sys_fdatasync), SLOT(clock_nanosleep, __sys_clock_nanosleep), SLOT(distribute_static_tls, __libc_distribute_static_tls), + SLOT(pdfork, __sys_pdfork), }; #undef SLOT diff --git a/lib/libc/sys/pdfork.c b/lib/libc/sys/pdfork.c new file mode 100644 index 000000000000..003262d1237d --- /dev/null +++ b/lib/libc/sys/pdfork.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2021 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``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(S) 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 "libc_private.h" + +#pragma weak pdfork +pid_t +pdfork(int *fdp, int flags) +{ + return (((pid_t (*)(int *, int))__libc_interposing[ + INTERPOS_pdfork])(fdp, flags)); +} diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index 7b6b47024c12..9861e93c427d 100644 --- a/lib/libthr/thread/thr_fork.c +++ b/lib/libthr/thread/thr_fork.c @@ -132,10 +132,19 @@ __pthread_cxa_finalize(struct dl_phdr_info *phdr_info) _thr_sigact_unload(phdr_info); } -__weak_reference(__thr_fork, _fork); - -pid_t -__thr_fork(void) +enum thr_fork_mode { + MODE_FORK, + MODE_PDFORK, +}; + +struct thr_fork_args { + enum thr_fork_mode mode; + void *fdp; + int flags; +}; + +static pid_t +thr_fork_impl(const struct thr_fork_args *a) { struct pthread *curthread; struct pthread_atfork *af; @@ -144,8 +153,17 @@ __thr_fork(void) int was_threaded; int rtld_locks[MAX_RTLD_LOCKS]; - if (!_thr_is_inited()) - return (__sys_fork()); + if (!_thr_is_inited()) { + switch (a->mode) { + case MODE_FORK: + return (__sys_fork()); + case MODE_PDFORK: + return (__sys_pdfork(a->fdp, a->flags)); + default: + errno = EDOOFUS; + return (-1); + } + } curthread = _get_curthread(); cancelsave = curthread->no_cancel; @@ -186,7 +204,19 @@ __thr_fork(void) * indirection, the syscall symbol is resolved in * _thr_rtld_init() with side-effect free call. */ - ret = syscall(SYS_fork); + switch (a->mode) { + case MODE_FORK: + ret = syscall(SYS_fork); + break; + case MODE_PDFORK: + ret = syscall(SYS_pdfork, a->fdp, a->flags); + break; + default: + ret = -1; + errno = EDOOFUS; + break; + } + if (ret == 0) { /* Child process */ errsave = errno; @@ -272,3 +302,25 @@ __thr_fork(void) return (ret); } + +__weak_reference(__thr_fork, _fork); + +pid_t +__thr_fork(void) +{ + struct thr_fork_args a; + + a.mode = MODE_FORK; + return (thr_fork_impl(&a)); +} + +pid_t +__thr_pdfork(int *fdp, int flags) +{ + struct thr_fork_args a; + + a.mode = MODE_PDFORK; + a.fdp = fdp; + a.flags = flags; + return (thr_fork_impl(&a)); +} diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 33cb03fce990..a1258940a896 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -984,6 +984,7 @@ void __pthread_distribute_static_tls(size_t offset, void *src, size_t len, int *__error_threaded(void) __hidden; void __thr_interpose_libc(void) __hidden; pid_t __thr_fork(void); +pid_t __thr_pdfork(int *, int); int __thr_setcontext(const ucontext_t *ucp); int __thr_sigaction(int sig, const struct sigaction *act, struct sigaction *oact) __hidden; diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c index 025dfc75fab6..c60308fcd1d2 100644 --- a/lib/libthr/thread/thr_syscalls.c +++ b/lib/libthr/thread/thr_syscalls.c @@ -687,6 +687,7 @@ __thr_interpose_libc(void) SLOT(map_stacks_exec); SLOT(fdatasync); SLOT(clock_nanosleep); + SLOT(pdfork); #undef SLOT *(__libc_interposing_slot( INTERPOS__pthread_mutex_init_calloc_cb)) = From owner-dev-commits-src-all@freebsd.org Mon Jan 11 21:14:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 254764E6578; Mon, 11 Jan 2021 21:14: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF60j0WtKz4trY; Mon, 11 Jan 2021 21:14: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 009AD21615; Mon, 11 Jan 2021 21:14: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 10BLEiCW067125; Mon, 11 Jan 2021 21:14:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BLEitJ067124; Mon, 11 Jan 2021 21:14:44 GMT (envelope-from git) Date: Mon, 11 Jan 2021 21:14:44 GMT Message-Id: <202101112114.10BLEitJ067124@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: 0a09fd56501c - stable/12 - geom(8): list geoms with /dev/ prefix 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: 0a09fd56501c2508c9d2797302544d55112d767f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 21:14:45 -0000 The branch stable/12 has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=0a09fd56501c2508c9d2797302544d55112d767f commit 0a09fd56501c2508c9d2797302544d55112d767f Author: Robert Wing AuthorDate: 2020-12-12 07:22:38 +0000 Commit: Robert Wing CommitDate: 2021-01-11 20:54:22 +0000 geom(8): list geoms with /dev/ prefix Allow geom(8) to list geoms with the '/dev/' prefix. `geom part show` accepts the '/dev/' prefix but `geom part list` does not. Modify find_geom() in sbin/geom/core/geom.c to be consistent with the behavior of find_geom() in lib/geom/part/geom_part.c. PR: 188213 Reported by: Ronald F. Guilmette Reviewed by: imp, kevans Approved by: kevans (mentor) Differential Revision: https://reviews.freebsd.org/D27556 (cherry picked from commit f200cc255f8e90b1905d94d0506a22f5dcd467c0) --- sbin/geom/core/geom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index e6d6d789908f..58b33a067700 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -862,6 +863,9 @@ find_geom(struct gclass *classp, const char *name) { struct ggeom *gp; + if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) + name += sizeof(_PATH_DEV) - 1; + LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { if (strcmp(gp->lg_name, name) == 0) return (gp); From owner-dev-commits-src-all@freebsd.org Mon Jan 11 21:42:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F8084E77D9; Mon, 11 Jan 2021 21: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF6cd4BxTz3DDq; Mon, 11 Jan 2021 21:42: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 82FDA21D8B; Mon, 11 Jan 2021 21:42: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 10BLgPIH002746; Mon, 11 Jan 2021 21:42:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BLgP1e002745; Mon, 11 Jan 2021 21:42:25 GMT (envelope-from git) Date: Mon, 11 Jan 2021 21:42:25 GMT Message-Id: <202101112142.10BLgP1e002745@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: 3005e10ddbfb - main - netmap: vtnet: fix RX initialization after netmap_reset() 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: 3005e10ddbfbec3ecf46a080607bb0d85986eee5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 21:42:25 -0000 The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=3005e10ddbfbec3ecf46a080607bb0d85986eee5 commit 3005e10ddbfbec3ecf46a080607bb0d85986eee5 Author: Vincenzo Maffione AuthorDate: 2021-01-11 21:38:32 +0000 Commit: Vincenzo Maffione CommitDate: 2021-01-11 21:38:32 +0000 netmap: vtnet: fix RX initialization after netmap_reset() At device reset, we must not publish those netmap receive buffers that are owned by userspace (nm_kr_rxspace). MFC after: 1 week --- sys/dev/netmap/if_vtnet_netmap.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sys/dev/netmap/if_vtnet_netmap.h b/sys/dev/netmap/if_vtnet_netmap.h index f787bf573a28..cd652938bca5 100644 --- a/sys/dev/netmap/if_vtnet_netmap.h +++ b/sys/dev/netmap/if_vtnet_netmap.h @@ -213,20 +213,25 @@ vtnet_netmap_rxq_populate(struct vtnet_rxq *rxq) struct netmap_kring *kring; struct netmap_slot *slot; int error; + int num; slot = netmap_reset(na, NR_RX, rxq->vtnrx_id, 0); if (slot == NULL) return -1; kring = na->rx_rings[rxq->vtnrx_id]; - /* Expose all the RX netmap buffers we can. In case of no indirect + /* + * Expose all the RX netmap buffers we can. In case of no indirect * buffers, the number of netmap slots in the RX ring matches the * maximum number of 2-elements sglist that the RX virtqueue can - * accommodate. We need to start from kring->nr_hwcur, which is 0 - * on netmap register and may be different from 0 if a virtio - * re-init happens while the device is in use by netmap. */ - rxq->vtnrx_nm_refill = kring->nr_hwcur; - error = vtnet_netmap_kring_refill(kring, na->num_rx_desc - 1); + * accommodate. We need to start from kring->nr_hwtail, which is 0 + * on the first netmap register and may be different from 0 if a + * virtio re-init (caused by a netma register or i.e., ifconfig) + * happens while the device is in use by netmap. + */ + rxq->vtnrx_nm_refill = kring->nr_hwtail; + num = na->num_rx_desc - 1 - nm_kr_rxspace(kring); + error = vtnet_netmap_kring_refill(kring, num); virtqueue_notify(rxq->vtnrx_vq); return error; @@ -256,7 +261,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int flags) * First part: import newly received packets. * Only accept our own buffers (matching the token). We should only get * matching buffers. The hwtail should never overrun hwcur, because - * we publish only N-1 receive buffers (and non N). + * we publish only N-1 receive buffers (and not N). * In any case we must not leave this routine with the interrupts * disabled, pending packets in the VQ and hwtail == (hwcur - 1), * otherwise the pending packets could stall. From owner-dev-commits-src-all@freebsd.org Mon Jan 11 21:51:56 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C2C24E7C66; Mon, 11 Jan 2021 21:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF6qb703Lz3FHJ; Mon, 11 Jan 2021 21:51: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 E366A21969; Mon, 11 Jan 2021 21:51: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 10BLpt68016165; Mon, 11 Jan 2021 21:51:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BLptNM016164; Mon, 11 Jan 2021 21:51:55 GMT (envelope-from git) Date: Mon, 11 Jan 2021 21:51:55 GMT Message-Id: <202101112151.10BLptNM016164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 1a816c756003 - main - loader.efi: efifb_mask_from_pixfmt is missing PixelBltOnly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a816c75600335c4482070df055add6f96885d54 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 21:51:56 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=1a816c75600335c4482070df055add6f96885d54 commit 1a816c75600335c4482070df055add6f96885d54 Author: Toomas Soome AuthorDate: 2021-01-11 19:16:42 +0000 Commit: Toomas Soome CommitDate: 2021-01-11 19:16:42 +0000 loader.efi: efifb_mask_from_pixfmt is missing PixelBltOnly We are missing way to set RGB masks for BLT only framebuffer. --- stand/efi/loader/framebuffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index fccbd82a09f7..db7bcb49f2f4 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -105,6 +105,7 @@ efifb_mask_from_pixfmt(struct efi_fb *efifb, EFI_GRAPHICS_PIXEL_FORMAT pixfmt, result = 0; switch (pixfmt) { case PixelRedGreenBlueReserved8BitPerColor: + case PixelBltOnly: efifb->fb_mask_red = 0x000000ff; efifb->fb_mask_green = 0x0000ff00; efifb->fb_mask_blue = 0x00ff0000; From owner-dev-commits-src-all@freebsd.org Mon Jan 11 22:28:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EC584E87BF; Mon, 11 Jan 2021 22:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF7fK1WrGz3GdD; Mon, 11 Jan 2021 22:28: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 273C5224A5; Mon, 11 Jan 2021 22:28: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 10BMSvd6058444; Mon, 11 Jan 2021 22:28:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BMSvsH058443; Mon, 11 Jan 2021 22:28:57 GMT (envelope-from git) Date: Mon, 11 Jan 2021 22:28:57 GMT Message-Id: <202101112228.10BMSvsH058443@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: 36a2f5b81743 - main - arm64: Don't disable options GDB in LINT. 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: 36a2f5b81743b45c2cb7ec933e306eff20477dcf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 22:28:57 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=36a2f5b81743b45c2cb7ec933e306eff20477dcf commit 36a2f5b81743b45c2cb7ec933e306eff20477dcf Author: John Baldwin AuthorDate: 2021-01-11 22:26:59 +0000 Commit: John Baldwin CommitDate: 2021-01-11 22:28:46 +0000 arm64: Don't disable options GDB in LINT. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D28098 --- sys/arm64/conf/NOTES | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index 97ea00d181bd..111d850dc484 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -31,8 +31,6 @@ options VFP # Floating-point support options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options INTRNG -nooptions GDB # Support remote GDB -- not supported - # SoC support options SOC_ALLWINNER_A64 options SOC_ALLWINNER_H5 From owner-dev-commits-src-all@freebsd.org Mon Jan 11 22:28:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FD704E87C1; Mon, 11 Jan 2021 22:28: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF7fL2H4Nz3GdF; Mon, 11 Jan 2021 22:28: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 4131222619; Mon, 11 Jan 2021 22:28: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 10BMSwRk058467; Mon, 11 Jan 2021 22:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BMSwSk058466; Mon, 11 Jan 2021 22:28:58 GMT (envelope-from git) Date: Mon, 11 Jan 2021 22:28:58 GMT Message-Id: <202101112228.10BMSwSk058466@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: c3e77ab43f29 - main - arm64: Add armv8crpyto and ossl to NOTES. 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: c3e77ab43f2967ea4286a887668ef9f44be0fcc1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 22:28:58 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c3e77ab43f2967ea4286a887668ef9f44be0fcc1 commit c3e77ab43f2967ea4286a887668ef9f44be0fcc1 Author: John Baldwin AuthorDate: 2021-01-11 22:27:09 +0000 Commit: John Baldwin CommitDate: 2021-01-11 22:28:46 +0000 arm64: Add armv8crpyto and ossl to NOTES. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D28099 --- sys/arm64/conf/NOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index 111d850dc484..8036784370c5 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -66,6 +66,10 @@ device vtnet # CPU frequency control device cpufreq +# Accelerated software crypto +device armv8crypto # ARMv8 OpenCrypto module +device ossl # OpenSSL OpenCrypto module + # Bus drivers device al_pci # Annapurna Alpine PCI-E options PCI_HP # PCI-Express native HotPlug From owner-dev-commits-src-all@freebsd.org Mon Jan 11 22:32:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9923A4E8A95; Mon, 11 Jan 2021 22:32: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF7k53zVjz3H9l; Mon, 11 Jan 2021 22:32: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 7B74222437; Mon, 11 Jan 2021 22:32: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 10BMWDZ6068059; Mon, 11 Jan 2021 22:32:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BMWDjA068046; Mon, 11 Jan 2021 22:32:13 GMT (envelope-from git) Date: Mon, 11 Jan 2021 22:32:13 GMT Message-Id: <202101112232.10BMWDjA068046@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: 0c156a3c32cd - main - pfctl: Another set skip fix 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: 0c156a3c32cd0d9168570da5686ddc96abcbbc5a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 22:32:13 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c156a3c32cd0d9168570da5686ddc96abcbbc5a commit 0c156a3c32cd0d9168570da5686ddc96abcbbc5a Author: Kristof Provost AuthorDate: 2021-01-11 13:09:08 +0000 Commit: Kristof Provost CommitDate: 2021-01-11 21:30:44 +0000 pfctl: Another set skip fix When retrieving the list of group members we cannot simply use ifa_lookup(), because it expects the interface to have an IP (v4 or v6) address. This means that interfaces with no address are not found. This presents as interfacing being alternately marked as skip and not whenever the rules are re-loaded. Happily we only need to fix ifa_grouplookup(). Teach it to also accept AF_LINK (i.e. interface) node_hosts. PR: 250994 MFC after: 3 days --- sbin/pfctl/pfctl_parser.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 47a3992da128..1fd26711ea86 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1392,6 +1392,26 @@ ifa_exists(char *ifa_name) return (NULL); } +static struct node_host * +if_lookup(char *if_name) +{ + struct node_host *p, *n; + + for (p = iftab; p; p = p->next) { + if (! strcmp(if_name, p->ifname)) { + n = calloc(1, sizeof(struct node_host)); + bcopy(p, n, sizeof(struct node_host)); + + n->next = NULL; + n->tail = n; + + return (n); + } + } + + return (NULL); +} + struct node_host * ifa_grouplookup(char *ifa_name, int flags) { @@ -1415,7 +1435,7 @@ ifa_grouplookup(char *ifa_name, int flags) for (ifg = ifgr.ifgr_groups; ifg && len >= sizeof(struct ifg_req); ifg++) { len -= sizeof(struct ifg_req); - if ((n = ifa_lookup(ifg->ifgrq_member, flags)) == NULL) + if ((n = if_lookup(ifg->ifgrq_member)) == NULL) continue; if (h == NULL) h = n; From owner-dev-commits-src-all@freebsd.org Mon Jan 11 22:32:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5B474E86FA; Mon, 11 Jan 2021 22:32: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF7k64hPpz3HDS; Mon, 11 Jan 2021 22:32: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 91EFE2263B; Mon, 11 Jan 2021 22:32: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 10BMWEWc069533; Mon, 11 Jan 2021 22:32:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BMWEat069519; Mon, 11 Jan 2021 22:32:14 GMT (envelope-from git) Date: Mon, 11 Jan 2021 22:32:14 GMT Message-Id: <202101112232.10BMWEat069519@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: 86b653ed7eed - main - pf: quiet debugging printfs 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: 86b653ed7eedb0d6cc3315bea132f847f748066d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 22:32:15 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=86b653ed7eedb0d6cc3315bea132f847f748066d commit 86b653ed7eedb0d6cc3315bea132f847f748066d Author: Kristof Provost AuthorDate: 2021-01-11 18:28:01 +0000 Commit: Kristof Provost CommitDate: 2021-01-11 21:30:44 +0000 pf: quiet debugging printfs Only log these when debugging output is enabled. --- sys/netpfil/pf/pf_ruleset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c index 31a4ed879937..0cc0c357d59d 100644 --- a/sys/netpfil/pf/pf_ruleset.c +++ b/sys/netpfil/pf/pf_ruleset.c @@ -306,7 +306,7 @@ pf_kanchor_setup(struct pf_krule *r, const struct pf_kruleset *s, strlcpy(path, s->anchor->path, MAXPATHLEN); while (name[0] == '.' && name[1] == '.' && name[2] == '/') { if (!path[0]) { - printf("pf_anchor_setup: .. beyond root\n"); + DPFPRINTF("pf_anchor_setup: .. beyond root\n"); rs_free(path); return (1); } @@ -328,7 +328,7 @@ pf_kanchor_setup(struct pf_krule *r, const struct pf_kruleset *s, ruleset = pf_find_or_create_kruleset(path); rs_free(path); if (ruleset == NULL || ruleset->anchor == NULL) { - printf("pf_anchor_setup: ruleset\n"); + DPFPRINTF("pf_anchor_setup: ruleset\n"); return (1); } r->anchor = ruleset->anchor; From owner-dev-commits-src-all@freebsd.org Mon Jan 11 22:58:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED6E04E91CE; Mon, 11 Jan 2021 22:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF8Hr6NjJz3JXP; Mon, 11 Jan 2021 22:58: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 CE3BE228BD; Mon, 11 Jan 2021 22:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10BMw0dB097415; Mon, 11 Jan 2021 22:58:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BMw08l097414; Mon, 11 Jan 2021 22:58:00 GMT (envelope-from git) Date: Mon, 11 Jan 2021 22:58:00 GMT Message-Id: <202101112258.10BMw08l097414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 2c52512caf6e - main - pnglite: should use ntohl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c52512caf6ec10f49038e6884b9c2aea905cc4e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 22:58:01 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=2c52512caf6ec10f49038e6884b9c2aea905cc4e commit 2c52512caf6ec10f49038e6884b9c2aea905cc4e Author: Toomas Soome AuthorDate: 2021-01-11 19:42:44 +0000 Commit: Toomas Soome CommitDate: 2021-01-11 22:56:35 +0000 pnglite: should use ntohl Replace manual conversion with ntohl() --- contrib/pnglite/pnglite.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/contrib/pnglite/pnglite.c b/contrib/pnglite/pnglite.c index e3cc2f866c6f..f517b6bdcaa5 100644 --- a/contrib/pnglite/pnglite.c +++ b/contrib/pnglite/pnglite.c @@ -52,12 +52,12 @@ file_read(png_t *png, void *out, size_t size, size_t numel) static int file_read_ul(png_t *png, unsigned *out) { - uint8_t buf[4]; + uint32_t buf; - if (file_read(png, buf, 1, 4) != 4) + if (file_read(png, &buf, 1, 4) != 4) return (PNG_FILE_ERROR); - *out = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | buf[3]; + *out = ntohl(buf); return (PNG_NO_ERROR); } @@ -65,14 +65,7 @@ file_read_ul(png_t *png, unsigned *out) static unsigned get_ul(uint8_t *buf) { - unsigned result; - uint8_t foo[4]; - - memcpy(foo, buf, 4); - - result = (foo[0]<<24) | (foo[1]<<16) | (foo[2]<<8) | foo[3]; - - return (result); + return (ntohl(*(uint32_t *)buf)); } static int From owner-dev-commits-src-all@freebsd.org Mon Jan 11 23:22:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BC9B4E96AD; Mon, 11 Jan 2021 23: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF8qq2f9hz3KrQ; Mon, 11 Jan 2021 23: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 4DD8A22FAD; Mon, 11 Jan 2021 23: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 10BNMFOh035514; Mon, 11 Jan 2021 23: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 10BNMFFE035513; Mon, 11 Jan 2021 23:22:15 GMT (envelope-from git) Date: Mon, 11 Jan 2021 23:22:15 GMT Message-Id: <202101112322.10BNMFFE035513@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: 2e1c94aa1fd5 - main - Implement enforcing write XOR execute mapping policy. 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: 2e1c94aa1fd582fb8ae0522f0827be719ff5fb67 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 23:22:15 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2e1c94aa1fd582fb8ae0522f0827be719ff5fb67 commit 2e1c94aa1fd582fb8ae0522f0827be719ff5fb67 Author: Konstantin Belousov AuthorDate: 2021-01-08 22:40:04 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-11 23:15:43 +0000 Implement enforcing write XOR execute mapping policy. It is checked in vm_map_insert() and vm_map_protect() that PROT_WRITE | PROT_EXEC are never specified together, if vm_map has MAP_WX flag set. FreeBSD control flag allows specific binary to request WX exempt, and there are per ABI boolean sysctls kern.elf{32,64}.allow_wx to enable/ disable globally. Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28050 --- sys/kern/imgact_elf.c | 8 ++++++++ sys/kern/kern_exec.c | 6 +++--- sys/vm/vm_map.c | 11 +++++++++++ sys/vm/vm_map.h | 1 + 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 4f5d5a9a0736..9ab95a63a67b 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -190,6 +190,11 @@ SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, sigfastblock, CTLFLAG_RWTUN, &__elfN(sigfastblock), 0, "enable sigfastblock for new processes"); +static bool __elfN(allow_wx) = true; +SYSCTL_BOOL(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, allow_wx, + CTLFLAG_RWTUN, &__elfN(allow_wx), 0, + "Allow pages to be mapped simultaneously writable and executable"); + static Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; #define aligned(a, t) (rounddown2((u_long)(a), sizeof(t)) == (u_long)(a)) @@ -1237,6 +1242,9 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) imgp->map_flags |= MAP_ASLR_IGNSTART; } + if (!__elfN(allow_wx) && (fctl0 & NT_FREEBSD_FCTL_WXNEEDED) == 0) + imgp->map_flags |= MAP_WXORX; + error = exec_new_vmspace(imgp, sv); vmspace = imgp->proc->p_vmspace; map = &vmspace->vm_map; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 6f7c01470804..13753177127f 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1074,12 +1074,12 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) pmap_remove_pages(vmspace_pmap(vmspace)); vm_map_remove(map, vm_map_min(map), vm_map_max(map)); /* - * An exec terminates mlockall(MCL_FUTURE), ASLR state - * must be re-evaluated. + * An exec terminates mlockall(MCL_FUTURE). + * ASLR and W^X states must be re-evaluated. */ vm_map_lock(map); vm_map_modflags(map, 0, MAP_WIREFUTURE | MAP_ASLR | - MAP_ASLR_IGNSTART); + MAP_ASLR_IGNSTART | MAP_WXORX); vm_map_unlock(map); } else { error = vmspace_exec(p, sv_minuser, sv->sv_maxuser); diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 5925ae8e96ad..bea776480391 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1671,6 +1671,10 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset, if (start == end || !vm_map_range_valid(map, start, end)) return (KERN_INVALID_ADDRESS); + if ((map->flags & MAP_WXORX) != 0 && (prot & (VM_PROT_WRITE | + VM_PROT_EXECUTE)) == (VM_PROT_WRITE | VM_PROT_EXECUTE)) + return (KERN_PROTECTION_FAILURE); + /* * Find the entry prior to the proposed starting address; if it's part * of an existing entry, this range is bogus. @@ -2751,6 +2755,13 @@ again: in_tran = NULL; vm_map_lock(map); + if ((map->flags & MAP_WXORX) != 0 && (new_prot & + (VM_PROT_WRITE | VM_PROT_EXECUTE)) == (VM_PROT_WRITE | + VM_PROT_EXECUTE)) { + vm_map_unlock(map); + return (KERN_PROTECTION_FAILURE); + } + /* * Ensure that we are not concurrently wiring pages. vm_map_wire() may * need to fault pages into the map and will drop the map lock while diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 349bb4815762..44f99a31f3d9 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -228,6 +228,7 @@ struct vm_map { #define MAP_ASLR 0x08 /* enabled ASLR */ #define MAP_ASLR_IGNSTART 0x10 #define MAP_REPLENISH 0x20 +#define MAP_WXORX 0x40 /* enforce W^X */ #ifdef _KERNEL #if defined(KLD_MODULE) && !defined(KLD_TIED) From owner-dev-commits-src-all@freebsd.org Mon Jan 11 23:22:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9759B4E96AE; Mon, 11 Jan 2021 23:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF8qr3wFrz3KdK; Mon, 11 Jan 2021 23: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 6F65C22CC7; Mon, 11 Jan 2021 23: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 10BNMGqq035532; Mon, 11 Jan 2021 23: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 10BNMG45035531; Mon, 11 Jan 2021 23:22:16 GMT (envelope-from git) Date: Mon, 11 Jan 2021 23:22:16 GMT Message-Id: <202101112322.10BNMG45035531@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: 4ea65707d370 - main - exec_new_vmspace: print useful error message on ctty if stack cannot be mapped. 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: 4ea65707d3700efe250868a7a581b87fd96f635c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 23:22:16 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4ea65707d3700efe250868a7a581b87fd96f635c commit 4ea65707d3700efe250868a7a581b87fd96f635c Author: Konstantin Belousov AuthorDate: 2021-01-11 18:51:07 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-11 23:15:43 +0000 exec_new_vmspace: print useful error message on ctty if stack cannot be mapped. After old vmspace is destroyed during execve(2), but before the new space is fully constructed, an error during image activation cannot be returned because there is no executing program to receive it. In the relatively common case of failure to map stack, print some hints on the control terminal. Note that user has enough knobs to cause stack mapping error, and this is the most common reason for execve(2) aborting the process. Requested by: jhb Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28050 --- sys/kern/kern_exec.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 13753177127f..3de6ac565db5 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1043,6 +1043,7 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) struct rlimit rlim_stack; vm_offset_t sv_minuser, stack_addr; vm_map_t map; + vm_prot_t stack_prot; u_long ssiz; imgp->vmspace_destroyed = 1; @@ -1126,11 +1127,16 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) if (ssiz < imgp->eff_stack_sz) imgp->eff_stack_sz = ssiz; stack_addr = sv->sv_usrstack - ssiz; - error = vm_map_stack(map, stack_addr, (vm_size_t)ssiz, - obj != NULL && imgp->stack_prot != 0 ? imgp->stack_prot : - sv->sv_stackprot, VM_PROT_ALL, MAP_STACK_GROWS_DOWN); - if (error != KERN_SUCCESS) + stack_prot = obj != NULL && imgp->stack_prot != 0 ? + imgp->stack_prot : sv->sv_stackprot; + error = vm_map_stack(map, stack_addr, (vm_size_t)ssiz, stack_prot, + VM_PROT_ALL, MAP_STACK_GROWS_DOWN); + if (error != KERN_SUCCESS) { + uprintf("exec_new_vmspace: mapping stack size %#jx prot %#x " + "failed mach error %d errno %d\n", (uintmax_t)ssiz, + stack_prot, error, vm_mmap_to_errno(error)); return (vm_mmap_to_errno(error)); + } /* * vm_ssize and vm_maxsaddr are somewhat antiquated concepts, but they From owner-dev-commits-src-all@freebsd.org Mon Jan 11 23:30:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3AAC4E9AF3; Mon, 11 Jan 2021 23:30: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF91Z4j7vz3L6h; Mon, 11 Jan 2021 23:30: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 94763233CA; Mon, 11 Jan 2021 23:30: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 10BNUg9j044668; Mon, 11 Jan 2021 23:30:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10BNUgPM044667; Mon, 11 Jan 2021 23:30:42 GMT (envelope-from git) Date: Mon, 11 Jan 2021 23:30:42 GMT Message-Id: <202101112330.10BNUgPM044667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 2defbe9f0e01 - main - Use rn_match instead of doing indirect calls in fib_algo. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2defbe9f0e01381da0550e7ffbf4e75c723c9331 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 23:30:42 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=2defbe9f0e01381da0550e7ffbf4e75c723c9331 commit 2defbe9f0e01381da0550e7ffbf4e75c723c9331 Author: Alexander V. Chernikov AuthorDate: 2021-01-11 23:11:55 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-11 23:30:35 +0000 Use rn_match instead of doing indirect calls in fib_algo. Relevant inet/inet6 code has the control over deciding what the RIB lookup function currently is. With that in mind, explicitly set it to the current value (rn_match) in the datapath lookups. This avoids cost on indirect call. Differential Revision: https://reviews.freebsd.org/D28066 --- sys/netinet/in_fib_algo.c | 4 ++-- sys/netinet6/in6_fib_algo.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet/in_fib_algo.c b/sys/netinet/in_fib_algo.c index 92592a6a286f..48e48da395fa 100644 --- a/sys/netinet/in_fib_algo.c +++ b/sys/netinet/in_fib_algo.c @@ -521,7 +521,7 @@ lradix4_lookup(void *algo_data, const struct flm_lookup_key key, uint32_t scopei .sin_len = KEY_LEN_INET, .sin_addr = key.addr4, }; - ent = (struct radix4_addr_entry *)(rnh->rnh_matchaddr(&addr4, &rnh->rh)); + ent = (struct radix4_addr_entry *)(rn_match(&addr4, &rnh->rh)); if (ent != NULL) return (ent->nhop); return (NULL); @@ -680,7 +680,7 @@ radix4_lookup(void *algo_data, const struct flm_lookup_key key, uint32_t scopeid nh = NULL; RIB_RLOCK(rh); - rn = rh->rnh_matchaddr((void *)&sin4, &rh->head); + rn = rn_match((void *)&sin4, &rh->head); if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) nh = (RNTORT(rn))->rt_nhop; RIB_RUNLOCK(rh); diff --git a/sys/netinet6/in6_fib_algo.c b/sys/netinet6/in6_fib_algo.c index 4b0409143c95..c9df9387af37 100644 --- a/sys/netinet6/in6_fib_algo.c +++ b/sys/netinet6/in6_fib_algo.c @@ -106,7 +106,7 @@ lradix6_lookup(void *algo_data, const struct flm_lookup_key key, uint32_t scopei }; if (IN6_IS_SCOPE_LINKLOCAL(key.addr6)) addr6.sin6_addr.s6_addr16[1] = htons(scopeid & 0xffff); - ent = (struct radix6_addr_entry *)(rnh->rnh_matchaddr(&addr6, &rnh->rh)); + ent = (struct radix6_addr_entry *)(rn_match(&addr6, &rnh->rh)); if (ent != NULL) return (ent->nhop); return (NULL); @@ -264,7 +264,7 @@ radix6_lookup(void *algo_data, const struct flm_lookup_key key, uint32_t scopeid nh = NULL; RIB_RLOCK(rh); - rn = rh->rnh_matchaddr((void *)&sin6, &rh->head); + rn = rn_match((void *)&sin6, &rh->head); if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) nh = (RNTORT(rn))->rt_nhop; RIB_RUNLOCK(rh); From owner-dev-commits-src-all@freebsd.org Mon Jan 11 23:37:32 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E660E4E9C99; Mon, 11 Jan 2021 23: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF99S6DNwz3Lhf; Mon, 11 Jan 2021 23: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 C264D23232; Mon, 11 Jan 2021 23: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 10BNbWGL050025; Mon, 11 Jan 2021 23: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 10BNbWtC050024; Mon, 11 Jan 2021 23:37:32 GMT (envelope-from git) Date: Mon, 11 Jan 2021 23:37:32 GMT Message-Id: <202101112337.10BNbWtC050024@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: e8a5a1ad7154 - main - rctl(4): support throttling resource usage to 0 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: e8a5a1ad7154dc34e3a5234267e19faa86d5ff33 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 23:37:33 -0000 The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=e8a5a1ad7154dc34e3a5234267e19faa86d5ff33 commit e8a5a1ad7154dc34e3a5234267e19faa86d5ff33 Author: Jason A. Harmening AuthorDate: 2020-12-30 23:29:44 +0000 Commit: Jason A. Harmening CommitDate: 2021-01-11 23:36:57 +0000 rctl(4): support throttling resource usage to 0 For rate-based resources that support throttling (e.g. readiops/writeips), this fixes a divide-by-zero panic when rctl(8) passes 0 as the throttle value. For these resources, treat zero-throttle requests as requests to suspend forward progress as long as possible using the duration specified in kern.racct.rctl.throttle_max. PR: 251803 Reported by: chris@cretaforce.gr Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27858 --- sys/kern/kern_rctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c index 9a0e0651750f..90e2f7832691 100644 --- a/sys/kern/kern_rctl.c +++ b/sys/kern/kern_rctl.c @@ -600,6 +600,11 @@ rctl_enforce(struct proc *p, int resource, uint64_t amount) if (p->p_state != PRS_NORMAL) continue; + if (rule->rr_amount == 0) { + racct_proc_throttle(p, rctl_throttle_max); + continue; + } + /* * Make the process sleep for a fraction of second * proportional to the ratio of process' resource From owner-dev-commits-src-all@freebsd.org Tue Jan 12 00:02:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88BFC4EA6EC; Tue, 12 Jan 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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF9k53Wlgz3NJk; Tue, 12 Jan 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 6B76B23929; Tue, 12 Jan 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 10C02L1X088578; Tue, 12 Jan 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 10C02LTT088577; Tue, 12 Jan 2021 00:02:21 GMT (envelope-from git) Date: Tue, 12 Jan 2021 00:02:21 GMT Message-Id: <202101120002.10C02LTT088577@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: 58a08f9e9910 - main - [skip ci] Delete an accidentally-committed comment 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: 58a08f9e9910ea986e0f1103f47274a781b11874 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 00:02:21 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=58a08f9e9910ea986e0f1103f47274a781b11874 commit 58a08f9e9910ea986e0f1103f47274a781b11874 Author: Alan Somers AuthorDate: 2021-01-12 00:01:22 +0000 Commit: Alan Somers CommitDate: 2021-01-12 00:01:22 +0000 [skip ci] Delete an accidentally-committed comment MFC-With: 19cca0b9613d7c3058e41baf0204245119732235 --- sys/contrib/openzfs/module/zfs/vdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/contrib/openzfs/module/zfs/vdev.c b/sys/contrib/openzfs/module/zfs/vdev.c index 0b96c52669bd..7ffe924212da 100644 --- a/sys/contrib/openzfs/module/zfs/vdev.c +++ b/sys/contrib/openzfs/module/zfs/vdev.c @@ -3263,7 +3263,6 @@ vdev_load(vdev_t *vd) /* * Recursively load all children. - * TODO: parallelize. */ for (int c = 0; c < vd->vdev_children; c++) { error = vdev_load(vd->vdev_child[c]); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 00:30:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F09D14EAF20; Tue, 12 Jan 2021 00:30:35 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFBLg6Kq7z3Pgp; Tue, 12 Jan 2021 00:30:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:5df6:af43:a641:70cf]) (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 EF6E96372; Tue, 12 Jan 2021 00:30:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 0f0379fa5581 - main - hid: Add recently imported drivers to NOTES To: Vladimir Kondratyev , Vladimir Kondratyev , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101101920.10AJK6rv043957@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <62f2b009-1436-1871-ac41-19787dd65ac3@FreeBSD.org> Date: Mon, 11 Jan 2021 16:30:30 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 00:30:36 -0000 On 1/11/21 12:08 PM, Vladimir Kondratyev wrote: > On 11.01.2021 21:11, John Baldwin wrote: >> On 1/10/21 11:20 AM, Vladimir Kondratyev wrote: >>> The branch main has been updated by wulf: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=0f0379fa5581c6b89d22bd041f7443581bac616c >>> >>> commit 0f0379fa5581c6b89d22bd041f7443581bac616c >>> Author: Vladimir Kondratyev >>> AuthorDate: 2021-01-09 12:07:19 +0000 >>> Commit: Vladimir Kondratyev >>> CommitDate: 2021-01-10 19:17:20 +0000 >>> >>> hid: Add recently imported drivers to NOTES >>> >>> Reviewed by: hselasky >>> Differential revision: https://reviews.freebsd.org/D28060 >> >> Now that we have entries in NOTES, can we perhaps remove HID_DEBUG >> from GENERIC > > Some part of HID code belonged to USB previously. That is why HID_DEBUG > line was inherited from already existing USB_DEBUG in GENERIC. > If enabling of USB_DEBUG had no relation to HID, we can delete HID_DEBUG. Ah, I see. I am somewhat surprised USB_DEBUG is on by default, but HID_DEBUG being consistent with USB_DEBUG seems ok. >> along with commented out drivers related to usbhid? > > Yes we can. I'll add mention about minimal number of devices/options > required to enable usbhid reliably to NOTES and delete driver lines from > GENERIC. > I do not want to delete options USBHID_ENABLED as it is about priority > rather than features. May be, it have a sense to change it name to > USBHID_DISABLED and enable by default. I think it would be nice to turn it into a tunable sysctl (hw.usb.prefer_usbhid or some such) and let usbhid_probe() check the variable associated with that to determine it's return value. What I don't understand is why the other USB drivers exclude their PnP info when this option is enabled? Can't you just leave the PnP info enabled and depend on return values of the probe routines to DTRT? It does mean devmatch might load a ukbd.ko that doesn't get used? It seems like what you kind of want is to have the PnP info present in both drivers (ukbd.ko and usbhid.ko for example) and let them both load for now but let the tunable's value determine which driver "wins" (USB drivers are relatively small, and people who really want exactly one can either compile the desired one into a custom kernel or use MODULES_OVERRIDE or the like to select which modules to build). Eventually if usbhid supplants the other drivers they can be retired, but the tunable would allow them to coexist for a while, and changing the default would just be changing the default value of that tunable. -- John Baldwin From owner-dev-commits-src-all@freebsd.org Tue Jan 12 00:34:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB7214EB0E1; Tue, 12 Jan 2021 00:34:04 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFBQh58k7z3QB8; Tue, 12 Jan 2021 00:34:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:5df6:af43:a641:70cf]) (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 C94C56CCB; Tue, 12 Jan 2021 00:34:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 2e1c94aa1fd5 - main - Implement enforcing write XOR execute mapping policy. To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101112322.10BNMFFE035513@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <8f0f88f5-2a4b-a11d-7b9c-892443184b15@FreeBSD.org> Date: Mon, 11 Jan 2021 16:34:02 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <202101112322.10BNMFFE035513@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 00:34:04 -0000 On 1/11/21 3:22 PM, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2e1c94aa1fd582fb8ae0522f0827be719ff5fb67 > > commit 2e1c94aa1fd582fb8ae0522f0827be719ff5fb67 > Author: Konstantin Belousov > AuthorDate: 2021-01-08 22:40:04 +0000 > Commit: Konstantin Belousov > CommitDate: 2021-01-11 23:15:43 +0000 > > Implement enforcing write XOR execute mapping policy. > > It is checked in vm_map_insert() and vm_map_protect() that PROT_WRITE | > PROT_EXEC are never specified together, if vm_map has MAP_WX flag set. > FreeBSD control flag allows specific binary to request WX exempt, and > there are per ABI boolean sysctls kern.elf{32,64}.allow_wx to enable/ > disable globally. > > Reviewed by: emaste, jhb > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D28050 Relnotes: yes (or maybe do an update to RELNOTES?) To be clear though, this doesn't set the default to enforcing W^X, it just adds a knob that can be set to enforce that on most binaries. My guess is that the plan is to get some testing/exposure of this on head (e.g. doing an exp-run with this set would probably be a good test?) and then flip the default to enable this restriction in the future? -- John Baldwin From owner-dev-commits-src-all@freebsd.org Tue Jan 12 00:45:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6EDE44EB37D; Tue, 12 Jan 2021 00:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFBgJ2Wm6z3QSL; Tue, 12 Jan 2021 00:45: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 3B49824292; Tue, 12 Jan 2021 00:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10C0j0ox040604; Tue, 12 Jan 2021 00:45:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10C0j0TD040603; Tue, 12 Jan 2021 00:45:00 GMT (envelope-from git) Date: Tue, 12 Jan 2021 00:45:00 GMT Message-Id: <202101120045.10C0j0TD040603@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: 2d4422e7991a - main - Eliminate lock order reversal in UFS ffs_unmount(). 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: 2d4422e7991a8d69af395e93bffbc2ea344f7ebe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 00:45:00 -0000 The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=2d4422e7991a8d69af395e93bffbc2ea344f7ebe commit 2d4422e7991a8d69af395e93bffbc2ea344f7ebe Author: Kirk McKusick AuthorDate: 2021-01-12 00:44:41 +0000 Commit: Kirk McKusick CommitDate: 2021-01-12 00:49:07 +0000 Eliminate lock order reversal in UFS ffs_unmount(). UFS uses a new "mntfs" pseudo file system which provides private device vnodes for a file system to safely access its disk device. The original device vnode is saved in um_odevvp to hold the exclusive lock on the device so that any attempts to open it for writing will fail. But it is otherwise unused and has its BO_NOBUFS flag set to enforce that file systems using mntfs vnodes do not accidentally use the original devfs vnode. When the file system is unmounted, um_odevvp is no longer needed and is released. The lock order reversal happens because device vnodes must be locked before UFS vnodes. During unmount, the root directory vnode lock is held. When when calling vrele() on um_odevvp, vrele() attempts to exclusive lock um_odevvp causing the lock order reversal. The problem is eliminated by doing a non-blocking exclusive lock on um_odevvp which will always succeed since there are no users of um_odevvp. With um_odevvp locked, it can be released using vput which does not attempt to do a blocking exclusive lock request and thus avoids the lock order reversal. Sponsored by: Netflix --- sys/ufs/ffs/ffs_vfsops.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 0b3110c955f5..52b9b860f817 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1546,7 +1546,14 @@ ffs_unmount(mp, mntflags) BO_UNLOCK(&ump->um_odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&ump->um_dev->si_mountpt, 0); mntfs_freevp(ump->um_devvp); - vrele(ump->um_odevvp); + /* Avoid LOR in vrele by passing in locked vnode and using vput */ + if (vn_lock(ump->um_odevvp, LK_EXCLUSIVE | LK_NOWAIT) == 0) { + vput(ump->um_odevvp); + } else { + /* This should never happen, see commit message for details */ + printf("ffs_unmount: Unexpected LK_NOWAIT failure\n"); + vrele(ump->um_odevvp); + } dev_rel(ump->um_dev); mtx_destroy(UFS_MTX(ump)); if (mp->mnt_gjprovider != NULL) { From owner-dev-commits-src-all@freebsd.org Tue Jan 12 00:57:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 660924EB7F4; Tue, 12 Jan 2021 00:57: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFBy32J6Vz3QlQ; Tue, 12 Jan 2021 00:57: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 3D21C23F5A; Tue, 12 Jan 2021 00:57: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 10C0vljB053894; Tue, 12 Jan 2021 00:57:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10C0vlD5053893; Tue, 12 Jan 2021 00:57:47 GMT (envelope-from git) Date: Tue, 12 Jan 2021 00:57:47 GMT Message-Id: <202101120057.10C0vlD5053893@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: a5584ace96b6 - main - bsdconfig: correct utilties typo 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: a5584ace96b627f86cbac386b4c6f47dd206defe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 00:57:47 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a5584ace96b627f86cbac386b4c6f47dd206defe commit a5584ace96b627f86cbac386b4c6f47dd206defe Author: Ed Maste AuthorDate: 2021-01-11 13:49:56 +0000 Commit: Ed Maste CommitDate: 2021-01-12 00:57:23 +0000 bsdconfig: correct utilties typo --- usr.sbin/bsdconfig/include/messages.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdconfig/include/messages.subr b/usr.sbin/bsdconfig/include/messages.subr index 4932f08364d7..4fd05db08d7d 100644 --- a/usr.sbin/bsdconfig/include/messages.subr +++ b/usr.sbin/bsdconfig/include/messages.subr @@ -442,7 +442,7 @@ msg_x11_clocks_desc="X Window System based clocks." msg_x11_desc="X Window System based utilities." msg_x11_drivers_desc="X Window System drivers." msg_x11_fm_desc="X Window System based file managers." -msg_x11_fonts_desc="X Window System fonts and font utilties." +msg_x11_fonts_desc="X Window System fonts and font utilities." msg_x11_servers_desc="X Window System servers." msg_x11_themes_desc="X Window System themes." msg_x11_toolkits_desc="X Window System based development toolkits." From owner-dev-commits-src-all@freebsd.org Tue Jan 12 01:10:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00FCB4EB82C; Tue, 12 Jan 2021 01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFCDG6XJdz3hPk; Tue, 12 Jan 2021 01: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 D2FD124614; Tue, 12 Jan 2021 01: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 10C1A6or069688; Tue, 12 Jan 2021 01: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 10C1A6mg069684; Tue, 12 Jan 2021 01:10:06 GMT (envelope-from git) Date: Tue, 12 Jan 2021 01:10:06 GMT Message-Id: <202101120110.10C1A6mg069684@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 7eaea04a5bb1 - main - amd64: compare TLB shootdown target to all_cpus MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7eaea04a5bb1dc86c43ce046311e1c1a042994d3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 01:10:07 -0000 The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=7eaea04a5bb1dc86c43ce046311e1c1a042994d3 commit 7eaea04a5bb1dc86c43ce046311e1c1a042994d3 Author: Andrew Gallatin AuthorDate: 2021-01-12 01:03:37 +0000 Commit: Andrew Gallatin CommitDate: 2021-01-12 01:09:32 +0000 amd64: compare TLB shootdown target to all_cpus On amd64, the pmap code passes all_cpus to smp_targeted_tlb_shootdown() when unmapping from the kernel pmap. This function has an optimized path to send IPIs to all but itself, which it intends to do when the target is all cpus. However, we need to compare the target cpu mask with all_cpus, rather than using CPU_ISFULLSET(). Comparing with CPU_ISFULLSET() will only work when we have MAXCPU cpus active in the system, otherwise, we'll be sending repeated IPIs, rather than a single IPI to all CPUs but ourself. Fixing this should reduce the time spent in native_lapic_ipi_wait() as we will be sending ipis in parallel, rather than one-by-one. This is confirmed by dtrace. Reviewed by: alc, jhb, kib, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28102 --- sys/amd64/amd64/mp_machdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 63777014e151..794a11bf1276 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -673,7 +673,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, /* * Check for other cpus. Return if none. */ - if (CPU_ISFULLSET(&mask)) { + if (!CPU_CMP(&mask, &all_cpus)) { if (mp_ncpus <= 1) goto local_cb; } else { @@ -719,7 +719,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, * (zeroing slot) and reading from it below (wait for * acknowledgment). */ - if (CPU_ISFULLSET(&mask)) { + if (!CPU_CMP(&mask, &all_cpus)) { ipi_all_but_self(IPI_INVLOP); other_cpus = all_cpus; CPU_CLR(PCPU_GET(cpuid), &other_cpus); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 01:19:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07DD04EC404; Tue, 12 Jan 2021 01:19:30 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DFCR55BT8z3jFc; Tue, 12 Jan 2021 01:19:29 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id EE4A9182A99; Tue, 12 Jan 2021 04:19:27 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id zBEqllnSpHei; Tue, 12 Jan 2021 04:19:26 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 409F9182A8C; Tue, 12 Jan 2021 04:19:26 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 9ED0142211F; Tue, 12 Jan 2021 04:19:24 +0300 (MSK) Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id RHKCyiewiFaP; Tue, 12 Jan 2021 04:19:17 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id 783B342211C; Tue, 12 Jan 2021 04:19:17 +0300 (MSK) Subject: Re: git: 0f0379fa5581 - main - hid: Add recently imported drivers to NOTES To: John Baldwin , Vladimir Kondratyev , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101101920.10AJK6rv043957@gitrepo.freebsd.org> <62f2b009-1436-1871-ac41-19787dd65ac3@FreeBSD.org> From: Vladimir Kondratyev Message-ID: <01ee4eac-8d19-1b04-7448-3a8bfc9bd1f7@kondratyev.su> Date: Tue, 12 Jan 2021 04:19:05 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <62f2b009-1436-1871-ac41-19787dd65ac3@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DFCR55BT8z3jFc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 01:19:30 -0000 On 12.01.2021 03:30, John Baldwin wrote: > On 1/11/21 12:08 PM, Vladimir Kondratyev wrote: >> On 11.01.2021 21:11, John Baldwin wrote: >>> On 1/10/21 11:20 AM, Vladimir Kondratyev wrote: >>>> The branch main has been updated by wulf: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=0f0379fa5581c6b89d22bd041f7443581bac616c >>>> >>>> commit 0f0379fa5581c6b89d22bd041f7443581bac616c >>>> Author: Vladimir Kondratyev >>>> AuthorDate: 2021-01-09 12:07:19 +0000 >>>> Commit: Vladimir Kondratyev >>>> CommitDate: 2021-01-10 19:17:20 +0000 >>>> >>>> hid: Add recently imported drivers to NOTES >>>> >>>> Reviewed by: hselasky >>>> Differential revision: https://reviews.freebsd.org/D28060 >>> >>> Now that we have entries in NOTES, can we perhaps remove HID_DEBUG >>> from GENERIC >> >> Some part of HID code belonged to USB previously. That is why HID_DEBUG >> line was inherited from already existing USB_DEBUG in GENERIC. >> If enabling of USB_DEBUG had no relation to HID, we can delete HID_DEBUG. > > Ah, I see. I am somewhat surprised USB_DEBUG is on by default, but > HID_DEBUG being consistent with USB_DEBUG seems ok. > >>> along with commented out drivers related to usbhid? >> >> Yes we can. I'll add mention about minimal number of devices/options >> required to enable usbhid reliably to NOTES and delete driver lines from >> GENERIC. >> I do not want to delete options USBHID_ENABLED as it is about priority >> rather than features. May be, it have a sense to change it name to >> USBHID_DISABLED and enable by default. > > I think it would be nice to turn it into a tunable sysctl (hw.usb.prefer_usbhid > or some such) and let usbhid_probe() check the variable associated with that > to determine it's return value. This is good idea. Thanks! What I don't understand is why the other USB > drivers exclude their PnP info when this option is enabled? Can't you just > leave the PnP info enabled and depend on return values of the probe routines to > DTRT? It does mean devmatch might load a ukbd.ko that doesn't get used? It > seems like what you kind of want is to have the PnP info present in both drivers > (ukbd.ko and usbhid.ko for example) and let them both load for now but let the > tunable's value determine which driver "wins" (USB drivers are relatively > small, and people who really want exactly one can either compile the desired > one into a custom kernel or use MODULES_OVERRIDE or the like to select which > modules to build). Eventually if usbhid supplants the other drivers they can be > retired, but the tunable would allow them to coexist for a while, and changing the > default would just be changing the default value of that tunable. I did it to block surprising automatic attachment of low priority driver on kldunloading of high priority one. But while it is very annoying during development, it is irrelevant in everyday use. I will remove PnP info #ifdef-s as in conjunction with aforementioned tunable sysctl, it will allows avoid kernel recompilation. From owner-dev-commits-src-all@freebsd.org Tue Jan 12 02:10:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CC364ED7FE; Tue, 12 Jan 2021 02:10: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFDYd1nXMz3lyh; Tue, 12 Jan 2021 02:10: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 302932529F; Tue, 12 Jan 2021 02:10: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 10C2ADSg048702; Tue, 12 Jan 2021 02:10:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10C2ADmg048698; Tue, 12 Jan 2021 02:10:13 GMT (envelope-from git) Date: Tue, 12 Jan 2021 02:10:13 GMT Message-Id: <202101120210.10C2ADmg048698@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: 292808246db7 - main - ICMP checksum test: Fix for big endian 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: 292808246db702b9194deb8938e40fd06914aea9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 02:10:13 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=292808246db702b9194deb8938e40fd06914aea9 commit 292808246db702b9194deb8938e40fd06914aea9 Author: Charlie Root AuthorDate: 2021-01-12 01:56:12 +0000 Commit: Alan Somers CommitDate: 2021-01-12 02:03:46 +0000 ICMP checksum test: Fix for big endian The in_cksum tests originally tried to simulate a BE environment by swapping the byte order of the input. But that's overcomplicated, and didn't actually work on real BE hardware. The correct testing strategy is just to test on the native endianness, and run the tests in both BE and LE environments. Submitted by: Renato Riolino Reviewed By: asomers MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23193 --- sbin/ping/tests/in_cksum_test.c | 84 ++++++++++------------------------------- 1 file changed, 20 insertions(+), 64 deletions(-) diff --git a/sbin/ping/tests/in_cksum_test.c b/sbin/ping/tests/in_cksum_test.c index fc266545b432..597f6ac20722 100644 --- a/sbin/ping/tests/in_cksum_test.c +++ b/sbin/ping/tests/in_cksum_test.c @@ -39,92 +39,52 @@ __FBSDID("$FreeBSD$"); * Test cases. */ -ATF_TC_WITHOUT_HEAD(aligned_even_length_big_endian); -ATF_TC_BODY(aligned_even_length_big_endian, tc) +ATF_TC_WITHOUT_HEAD(aligned_even_length); +ATF_TC_BODY(aligned_even_length, tc) { u_char data[] __aligned(sizeof(u_short)) = {0x12, 0x34, 0x56, 0x78}; u_short sum; sum = in_cksum(data, nitems(data)); - ATF_REQUIRE(sum == 0x5397); + u_char *c_sum = (u_char *)∑ + ATF_REQUIRE(c_sum[0] == 0x97 && c_sum[1] == 0x53); } -ATF_TC_WITHOUT_HEAD(aligned_odd_length_big_endian); -ATF_TC_BODY(aligned_odd_length_big_endian, tc) +ATF_TC_WITHOUT_HEAD(aligned_odd_length); +ATF_TC_BODY(aligned_odd_length, tc) { u_char data[] __aligned(sizeof(u_short)) = {0x12, 0x34, 0x56, 0x78, 0x9a}; u_short sum; sum = in_cksum(data, nitems(data)); - ATF_REQUIRE(sum == 0x52fd); + u_char *c_sum = (u_char *)∑ + ATF_REQUIRE(c_sum[0] == 0xfd && c_sum[1] == 0x52); } -ATF_TC_WITHOUT_HEAD(aligned_even_length_little_endian); -ATF_TC_BODY(aligned_even_length_little_endian, tc) -{ - u_char data[] __aligned(sizeof(u_short)) = - {0x34, 0x12, 0x78, 0x56}; - u_short sum; - - sum = in_cksum(data, nitems(data)); - ATF_REQUIRE_MSG(sum == 0x9753, "%d", sum); -} - -ATF_TC_WITHOUT_HEAD(aligned_odd_length_little_endian); -ATF_TC_BODY(aligned_odd_length_little_endian, tc) -{ - u_char data[] __aligned(sizeof(u_short)) = - {0x34, 0x12, 0x78, 0x56, 0x00, 0x9a}; - u_short sum; - - sum = in_cksum(data, nitems(data)); - ATF_REQUIRE(sum == 0xfd52); -} - -ATF_TC_WITHOUT_HEAD(unaligned_even_length_big_endian); -ATF_TC_BODY(unaligned_even_length_big_endian, tc) +ATF_TC_WITHOUT_HEAD(unaligned_even_length); +ATF_TC_BODY(unaligned_even_length, tc) { u_char data[] __aligned(sizeof(u_short)) = {0x00, 0x12, 0x34, 0x56, 0x78}; u_short sum; sum = in_cksum(data + 1, nitems(data) - 1); - ATF_REQUIRE(sum == 0x5397); + u_char *c_sum = (u_char *)∑ + ATF_REQUIRE(c_sum[0] == 0x97 && c_sum[1] == 0x53); } -ATF_TC_WITHOUT_HEAD(unaligned_odd_length_big_endian); -ATF_TC_BODY(unaligned_odd_length_big_endian, tc) +ATF_TC_WITHOUT_HEAD(unaligned_odd_length); +ATF_TC_BODY(unaligned_odd_length, tc) { u_char data[] __aligned(sizeof(u_short)) = {0x00, 0x12, 0x34, 0x56, 0x78, 0x9a}; u_short sum; sum = in_cksum(data + 1, nitems(data) - 1); - ATF_REQUIRE(sum == 0x52fd); -} - -ATF_TC_WITHOUT_HEAD(unaligned_even_length_little_endian); -ATF_TC_BODY(unaligned_even_length_little_endian, tc) -{ - u_char data[] __aligned(sizeof(u_short)) = - {0x00, 0x34, 0x12, 0x78, 0x56}; - u_short sum; - - sum = in_cksum(data + 1, nitems(data) - 1); - ATF_REQUIRE_MSG(sum == 0x9753, "%d", sum); -} - -ATF_TC_WITHOUT_HEAD(unaligned_odd_length_little_endian); -ATF_TC_BODY(unaligned_odd_length_little_endian, tc) -{ - u_char data[] __aligned(sizeof(u_short)) = - {0x00, 0x34, 0x12, 0x78, 0x56, 0x00, 0x9a}; - u_short sum; - - sum = in_cksum(data + 1, nitems(data) - 1); - ATF_REQUIRE(sum == 0xfd52); + u_char *c_sum = (u_char *)∑ + ATF_REQUIRE(c_sum[0] == 0xfd && c_sum[1] == 0x52); } /* @@ -133,14 +93,10 @@ ATF_TC_BODY(unaligned_odd_length_little_endian, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, aligned_even_length_big_endian); - ATF_TP_ADD_TC(tp, aligned_odd_length_big_endian); - ATF_TP_ADD_TC(tp, aligned_even_length_little_endian); - ATF_TP_ADD_TC(tp, aligned_odd_length_little_endian); - ATF_TP_ADD_TC(tp, unaligned_even_length_big_endian); - ATF_TP_ADD_TC(tp, unaligned_odd_length_big_endian); - ATF_TP_ADD_TC(tp, unaligned_even_length_little_endian); - ATF_TP_ADD_TC(tp, unaligned_odd_length_little_endian); + ATF_TP_ADD_TC(tp, aligned_even_length); + ATF_TP_ADD_TC(tp, aligned_odd_length); + ATF_TP_ADD_TC(tp, unaligned_even_length); + ATF_TP_ADD_TC(tp, unaligned_odd_length); return (atf_no_error()); } From owner-dev-commits-src-all@freebsd.org Tue Jan 12 02:53:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E74F84EEA91; Tue, 12 Jan 2021 02:53: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFFWJ6G8tz3pJr; Tue, 12 Jan 2021 02:53: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 C9E6F25933; Tue, 12 Jan 2021 02:53: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 10C2rGuw009192; Tue, 12 Jan 2021 02:53:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10C2rGBW009191; Tue, 12 Jan 2021 02:53:16 GMT (envelope-from git) Date: Tue, 12 Jan 2021 02:53:16 GMT Message-Id: <202101120253.10C2rGBW009191@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: ff1a30780199 - main - lio_listio: validate aio_lio_opcode 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: ff1a307801994e18a87929898225f09d31f3e1fa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 02:53:17 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ff1a307801994e18a87929898225f09d31f3e1fa commit ff1a307801994e18a87929898225f09d31f3e1fa Author: Alan Somers AuthorDate: 2021-01-10 03:23:05 +0000 Commit: Alan Somers CommitDate: 2021-01-12 02:53:01 +0000 lio_listio: validate aio_lio_opcode Previously, we would accept any kind of LIO_* opcode, including ones that were intended for in-kernel use only like LIO_SYNC (which is not defined in userland). The situation became more serious with 022ca2fc7fe08d51f33a1d23a9be49e6d132914e. After that revision, setting aio_lio_opcode to LIO_WRITEV or LIO_READV would trigger an assertion. Note that POSIX does not specify what should happen if aio_lio_opcode is invalid. MFC-with: 022ca2fc7fe08d51f33a1d23a9be49e6d132914e Reviewed by: jhb, tmunro, 0mp Differential Revision: uaiocb.aio_lio_opcode) { + case LIO_WRITE: + case LIO_NOP: + case LIO_READ: + opcode = job->uaiocb.aio_lio_opcode; + break; + default: + error = EINVAL; + goto err2; + } + } else + opcode = job->uaiocb.aio_lio_opcode = type; + ksiginfo_init(&job->ksi); /* Save userspace address of the job info. */ job->ujob = ujob; - /* Get the opcode. */ - if (type != LIO_NOP) - job->uaiocb.aio_lio_opcode = type; - opcode = job->uaiocb.aio_lio_opcode; - /* * Validate the opcode and fetch the file object for the specified * file descriptor. diff --git a/sys/sys/aio.h b/sys/sys/aio.h index dbfbadcd1254..ee928b8bf846 100644 --- a/sys/sys/aio.h +++ b/sys/sys/aio.h @@ -43,7 +43,7 @@ #define LIO_NOP 0x0 #define LIO_WRITE 0x1 #define LIO_READ 0x2 -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_WANT_ALL_LIO_OPCODES) #define LIO_SYNC 0x3 #define LIO_MLOCK 0x4 #define LIO_WRITEV 0x5 diff --git a/tests/sys/aio/lio_test.c b/tests/sys/aio/lio_test.c index b6965cc9a4ee..fb519aac978d 100644 --- a/tests/sys/aio/lio_test.c +++ b/tests/sys/aio/lio_test.c @@ -26,8 +26,11 @@ * $FreeBSD$ */ +#define _WANT_ALL_LIO_OPCODES + #include #include +#include #include #include @@ -198,6 +201,53 @@ ATF_TC_BODY(lio_listio_empty_nowait_thread, tc) ATF_REQUIRE_EQ(0, sem_destroy(&completions)); } +/* + * Only select opcodes are allowed with lio_listio + */ +ATF_TC_WITHOUT_HEAD(lio_listio_invalid_opcode); +ATF_TC_BODY(lio_listio_invalid_opcode, tc) +{ + struct aiocb sync_cb, mlock_cb, writev_cb, readv_cb; + struct aiocb *list[] = {&sync_cb, &mlock_cb, &writev_cb, &readv_cb}; + struct iovec iov; + int fd; + + fd = open("testfile", O_CREAT | O_RDWR); + ATF_REQUIRE_MSG(fd >= 0, "open: %s", strerror(errno)); + + bzero(&sync_cb, sizeof(sync_cb)); + sync_cb.aio_fildes = fd; + sync_cb.aio_lio_opcode = LIO_SYNC; + + bzero(&mlock_cb, sizeof(mlock_cb)); + mlock_cb.aio_lio_opcode = LIO_MLOCK; + + iov.iov_base = NULL; + iov.iov_len = 0; + + bzero(&readv_cb, sizeof(readv_cb)); + readv_cb.aio_fildes = fd; + readv_cb.aio_lio_opcode = LIO_READV; + readv_cb.aio_iov = &iov; + readv_cb.aio_iovcnt = 1; + + bzero(&writev_cb, sizeof(writev_cb)); + writev_cb.aio_fildes = fd; + writev_cb.aio_lio_opcode = LIO_WRITEV; + writev_cb.aio_iov = &iov; + writev_cb.aio_iovcnt = 1; + + ATF_CHECK_ERRNO(EIO, lio_listio(LIO_WAIT, list, nitems(list), NULL)); + ATF_CHECK_EQ(EINVAL, aio_error(&sync_cb)); + ATF_CHECK_ERRNO(EINVAL, aio_return(&sync_cb) < 0); + ATF_CHECK_EQ(EINVAL, aio_error(&mlock_cb)); + ATF_CHECK_ERRNO(EINVAL, aio_return(&mlock_cb) < 0); + ATF_CHECK_EQ(EINVAL, aio_error(&readv_cb)); + ATF_CHECK_ERRNO(EINVAL, aio_return(&readv_cb) < 0); + ATF_CHECK_EQ(EINVAL, aio_error(&writev_cb)); + ATF_CHECK_ERRNO(EINVAL, aio_return(&writev_cb) < 0); +} + ATF_TP_ADD_TCS(tp) { @@ -207,6 +257,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, lio_listio_empty_nowait_signal); ATF_TP_ADD_TC(tp, lio_listio_empty_nowait_thread); ATF_TP_ADD_TC(tp, lio_listio_empty_wait); + ATF_TP_ADD_TC(tp, lio_listio_invalid_opcode); return (atf_no_error()); } From owner-dev-commits-src-all@freebsd.org Tue Jan 12 02:57:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E3E24EED86; Tue, 12 Jan 2021 02:57:44 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFFcS0q1tz3pSp; Tue, 12 Jan 2021 02:57:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f46.google.com with SMTP id d9so1018861iob.6; Mon, 11 Jan 2021 18:57:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ECDWYgyI3A1CMK//Wf2nSRHu+vT6I73CUf1C/s3KG8A=; b=bq1LqFbmR3SlKzGyLQaOMiz7gXBPxv+vMJZgbapioXHwvlsrPw+50rl00SCzKJChcq TqaS9IacMqkI/XHgRp+2UR4HQ5ISVeV3eZ1eA8l2mDyA6ryY5XmzftqW+AsET6KEBMyr JQJLIbkXdhnRbP2RPRVaiA4J0HYyOGoPM2zMzx+nP+FNvRJJE2FPT8+DAIVruaqW9Qqh FEzEW/LojIxPu9oRUJe6gGhTIZrU8T4jMOyqLqcM9aX5u+TA8f6lWrRQptS/2GhFnTDk wzDgkB074p17K56o2IGdjNghx6zEaigmnEqDLkz7Y5Vwax9aMz2Dk0Zc5wbElocF28DN 8iGg== X-Gm-Message-State: AOAM531kVkjg2DqoEUKSt1DHF9yD41sVb/xwNbD93WrKTfJxdI1ReU+L DNRJgspyM9muyg5j9MoIiVTH2kQQCsCTHVIMFzvVikZ6dDqj2A== X-Google-Smtp-Source: ABdhPJzvOl7RUsRQVsjdVPoxZ8vHniz8JemxiybIld/i8YLbOVBBqzkkDNtDoqSItSJnpSF+iaIooM7xzqCa9X781cA= X-Received: by 2002:a92:d2ce:: with SMTP id w14mr2106656ilg.182.1610420261891; Mon, 11 Jan 2021 18:57:41 -0800 (PST) MIME-Version: 1.0 References: <202101112322.10BNMFFE035513@gitrepo.freebsd.org> <8f0f88f5-2a4b-a11d-7b9c-892443184b15@FreeBSD.org> In-Reply-To: <8f0f88f5-2a4b-a11d-7b9c-892443184b15@FreeBSD.org> From: Ed Maste Date: Mon, 11 Jan 2021 21:57:30 -0500 Message-ID: Subject: Re: git: 2e1c94aa1fd5 - main - Implement enforcing write XOR execute mapping policy. To: John Baldwin Cc: Konstantin Belousov , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DFFcS0q1tz3pSp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 02:57:44 -0000 On Mon, 11 Jan 2021 at 19:34, John Baldwin wrote: > > To be clear though, this doesn't set the default to enforcing W^X, it just > adds a knob that can be set to enforce that on most binaries. My guess is > that the plan is to get some testing/exposure of this on head (e.g. doing > an exp-run with this set would probably be a good test?) and then flip the > default to enable this restriction in the future? Yes, an exp-run would be useful, although I don't think it will find too much unless we execute regression tests on the built ports. We can ask folks to turn it on and report problems; note that any ELF binary requesting an executable stack will (appear to) abort at startup, and will have to be fixed to request a non-executable stack. Other than that I have seen no fallout after enabling this on my laptop. To enable set the two sysctls: kern.elf32.allow_wx=0 kern.elf64.allow_wx=0 From owner-dev-commits-src-all@freebsd.org Tue Jan 12 03:03:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E862C4EEE3D; Tue, 12 Jan 2021 03:03: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFFlT5zKtz3pnP; Tue, 12 Jan 2021 03:03: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 BB9B625E29; Tue, 12 Jan 2021 03: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 10C33nfT022963; Tue, 12 Jan 2021 03: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 10C33n6w022962; Tue, 12 Jan 2021 03:03:49 GMT (envelope-from git) Date: Tue, 12 Jan 2021 03:03:49 GMT Message-Id: <202101120303.10C33n6w022962@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: 78d1f57dd963 - stable/12 - Fix devinfo typo. 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: 78d1f57dd963b5dd9f43847d66cff406d446081c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 03:03:50 -0000 The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=78d1f57dd963b5dd9f43847d66cff406d446081c commit 78d1f57dd963b5dd9f43847d66cff406d446081c Author: Alexander Motin AuthorDate: 2021-01-05 19:56:23 +0000 Commit: Alexander Motin CommitDate: 2021-01-12 03:03:33 +0000 Fix devinfo typo. Submitted by: Nick Wolff Differential Revision: https://reviews.freebsd.org/D27981 (cherry picked from commit 4d86ab429ee9b4b22654b52380512f7b8cee4478) --- usr.sbin/devinfo/devinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index be18c57dc5e7..ee5ac0a1f7eb 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -235,7 +235,7 @@ usage(void) fprintf(stderr, "%s\n%s\n%s\n", "usage: devinfo [-rv]", " devinfo -u", - " devifno -p dev [-v]"); + " devinfo -p dev [-v]"); exit(1); } From owner-dev-commits-src-all@freebsd.org Tue Jan 12 03:25:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93E084EF528; Tue, 12 Jan 2021 03:25:08 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFGD43fMCz3r1Q; Tue, 12 Jan 2021 03:25:08 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f169.google.com with SMTP id c1so785934qtc.1; Mon, 11 Jan 2021 19:25:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HkzH7CNvuHGjxQDDo+9AJa2trHozJOUXfaDWpK1TD9I=; b=mSJvqBFdd+E1dvU4JOcz2IlPS82iWO2G0OQ5Eei88vrDtsh472p655x1TGRyTFRGbs ei7MrCldcEDa+YF4cMVZKeQDUtS6OHLWT2p+MQj4df+yO16onE/Fr8yI3w/DXsbmQXip a52XXvbNXcowrUt0x0Ej4z/vmgy0NNmStTlZyy7XYI7wlX6re18HfQoa/aFgcsZZc9fP xec1pyDCZp2eIhfhxVeN8PN3B9lUhtFiftoJkqBlMaAQXmM6nQw87v6k0nMnEU5Ctsfp 2o5bZIWU1DuvkymATvQD8SUVvZcMbkuKwRPitNxZuSbRbF6A3KjegFx6FYFM/ThTsufj Ib7A== X-Gm-Message-State: AOAM532NiIsGaf4Hjfk+LisFyBNiUJWdMfik6CBNnKlyhc8Bp1/QMYB5 2sjsBBO3S17lPxxS86NshR8oTOD9tOFw4Q== X-Google-Smtp-Source: ABdhPJz76zjGiKMuPwLyLieByKvDRCKTdrVCeuGHPbCu8Iezvjwis1Fm82BNMe7SlN7jHd4y5W3nHw== X-Received: by 2002:ac8:6e90:: with SMTP id c16mr2670302qtv.391.1610421906931; Mon, 11 Jan 2021 19:25:06 -0800 (PST) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com. [209.85.222.180]) by smtp.gmail.com with ESMTPSA id p75sm814733qka.72.2021.01.11.19.25.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 19:25:06 -0800 (PST) Received: by mail-qk1-f180.google.com with SMTP id c7so811041qke.1; Mon, 11 Jan 2021 19:25:06 -0800 (PST) X-Received: by 2002:ae9:f312:: with SMTP id p18mr2433179qkg.311.1610421906371; Mon, 11 Jan 2021 19:25:06 -0800 (PST) MIME-Version: 1.0 References: <202101120210.10C2ADmg048698@gitrepo.freebsd.org> In-Reply-To: <202101120210.10C2ADmg048698@gitrepo.freebsd.org> From: Ryan Libby Date: Mon, 11 Jan 2021 19:24:55 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 292808246db7 - main - ICMP checksum test: Fix for big endian To: Alan Somers Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DFGD43fMCz3r1Q X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 03:25:08 -0000 On Mon, Jan 11, 2021 at 6:10 PM Alan Somers wrote: > > The branch main has been updated by asomers: > > URL: https://cgit.FreeBSD.org/src/commit/?id=292808246db702b9194deb8938e40fd06914aea9 > > commit 292808246db702b9194deb8938e40fd06914aea9 > Author: Charlie Root Hmm, did your git client fill in the author name that way? Since... > AuthorDate: 2021-01-12 01:56:12 +0000 > Commit: Alan Somers > CommitDate: 2021-01-12 02:03:46 +0000 > > ICMP checksum test: Fix for big endian > > The in_cksum tests originally tried to simulate a BE environment by > swapping the byte order of the input. But that's overcomplicated, and > didn't actually work on real BE hardware. The correct testing strategy > is just to test on the native endianness, and run the tests in both BE > and LE environments. > > Submitted by: Renato Riolino ...given this submitted-by line, I am guessing it wasn't intended? > Reviewed By: asomers > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D23193 > --- From owner-dev-commits-src-all@freebsd.org Tue Jan 12 04:04:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B10C34C804E; Tue, 12 Jan 2021 04:04:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFH5S4PHXz3sQY; Tue, 12 Jan 2021 04:04:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f182.google.com with SMTP id w124so1007267oia.6; Mon, 11 Jan 2021 20:04:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ve1oIDFmO313rXw0dAjJVe9/sl6lvrygYmMpt14ZtIA=; b=F6GnOrTN9fOh2tNgEibMllnCAi/JLHHNu3b0G+UgdsdzIJjNs7S298/0Yy6V3uiLn8 GLd7IH/Pz7y56AtpuR92gGu346vV3uuC95GVfGxqdEkNJhgEUe+Q5ETYmLPeNY0YaNah GmLu8mb1iRE3QNCI4g9QcfvmGnRiGPQGP+3fnip2MPlsNsDOX0Ne0SVOjn+tCqxV07fP +d79XdQyllz7Hvripj9kQDvMwONeNImSE/Q79uUKg9FepwntEmBYME7vZKUKoYePyyQG 3+a/TNiHsN1AF3J3BgYQCxwjaNQ5aXcZbOF4A/KAMJbje4JC+u1nBtilh0nbw7P+p58W PkDg== X-Gm-Message-State: AOAM530SkMHCDCuutRhChwHaexwaoiuhkeypBWj67PuG4M+drCXARHsF P1CNswdrlbftjP7FyiZ5pyrhGQsBt03UgewKPl4E+ARkstY= X-Google-Smtp-Source: ABdhPJyJCeGjFK03g5bYTne81Nv3sPaVa2aq9O+xxclt3sBUSOFBKf1aPIwqaqnZ5sUJ9pb5f9tjsEDQhdzvMfLMJRM= X-Received: by 2002:aca:af8f:: with SMTP id y137mr1274788oie.55.1610424266674; Mon, 11 Jan 2021 20:04:26 -0800 (PST) MIME-Version: 1.0 References: <202101120210.10C2ADmg048698@gitrepo.freebsd.org> In-Reply-To: From: Alan Somers Date: Mon, 11 Jan 2021 21:04:15 -0700 Message-ID: Subject: Re: git: 292808246db7 - main - ICMP checksum test: Fix for big endian To: Ryan Libby Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DFH5S4PHXz3sQY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 04:04:28 -0000 On Mon, Jan 11, 2021 at 8:25 PM Ryan Libby wrote: > On Mon, Jan 11, 2021 at 6:10 PM Alan Somers wrote: > > > > The branch main has been updated by asomers: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=292808246db702b9194deb8938e40fd06914aea9 > > > > commit 292808246db702b9194deb8938e40fd06914aea9 > > Author: Charlie Root > > Hmm, did your git client fill in the author name that way? Since... > > > AuthorDate: 2021-01-12 01:56:12 +0000 > > Commit: Alan Somers > > CommitDate: 2021-01-12 02:03:46 +0000 > > > > ICMP checksum test: Fix for big endian > > > > The in_cksum tests originally tried to simulate a BE environment by > > swapping the byte order of the input. But that's overcomplicated, > and > > didn't actually work on real BE hardware. The correct testing > strategy > > is just to test on the native endianness, and run the tests in both > BE > > and LE environments. > > > > Submitted by: Renato Riolino < > renato.riolino@eldorado.org.br> > > ...given this submitted-by line, I am guessing it wasn't intended? > > > Reviewed By: asomers > > MFC after: 2 weeks > > Differential Revision: https://reviews.freebsd.org/D23193 > > --- > Well, Renato opened the PR on Phabricator. When I pulled in his patch, phabricator must've helpfully pulled in the author line, too. But the "Submitted by" line I wrote by hand. -Alan From owner-dev-commits-src-all@freebsd.org Tue Jan 12 05:59:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F6884C9CD7; Tue, 12 Jan 2021 05:59:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFKfC1C0gz4S47; Tue, 12 Jan 2021 05:59:30 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x430.google.com with SMTP id c5so1149891wrp.6; Mon, 11 Jan 2021 21:59:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PjtN12IpIlQm2yTH7PLkO1IBl1ROoAlBPgvS2UOM380=; b=YER0LyDaZ/b0uksov98wP2GIOezttGCUKqFRaZOcQugfUxTALwkc5bKsh7/7XSfxFY nVWA6U1lKpLmZwk6XFXjaPmbGHLgF1nZ881bL0L67X02XjtwMKSpuRwvyo6lmz4X0q+q FcKFCbYNB4KSqVfHGB9b9Mme3Mvq1PKdV+ZdO0hW/tbFUV7zNIFCtsY/kk6SZ9nN1dgW SV26xrhpi0ELi/eGEQCGrnpyAyBmeLMEHxOoJk5y7kXjV58m+BzxtrHwep/eNp130hOT wFW6nyDdheAoTDOmMkSFc7+shrSNY4/vq5Ey5zU6WC0dTgSusuxZWNOhQX9pFGH3o6IM 9zCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PjtN12IpIlQm2yTH7PLkO1IBl1ROoAlBPgvS2UOM380=; b=m+ORqdcLJnl2cMnc/KKRFepJLrq98WxoepNYSKOrlgEpBjMJu2/Lgp3k2cUhhXIoLI 3IXyF+R3TNrDej9ygOXh466QH8ImHmM6JIlAgXphta35R0RuMud23j06o4RgAbXUx8IQ CTCZ14QenowYpDsyMwj0B3NZ3ZE6ZlvTTTANScKfuB0jJQnMXQiiQXyDj+VeVAsKpRT4 oxJ1Y9y0XNk56TUHJL0zqgu0hme61hWnm5trtMB7XqZRZXD90kyYHx0/Ot4pzCevWpDl be8YEK7ZwoCp7R3uXkYcFbEMp6ARSmEu7IJde4gJ4CPglaZg/4s5DYWJXX+FT6rSpXNw ABQA== X-Gm-Message-State: AOAM533/LEUgt11gvwtDpdcl9nshHc/Vhof/JHxK0XCu5wKvD3LN2JvE 7NZ2ODmmrXWScINMeFMYqxg9g4XddRKjx0H3pUcuXpUJkT0= X-Google-Smtp-Source: ABdhPJzvpyKL32Fjmjp6HC9glxM09tS5xB5jZ1u7h7/TrLy7kq5lEUuIQCOGTQYjdfsxZNcvK47s8bohAOplB2ocP7k= X-Received: by 2002:a5d:4e92:: with SMTP id e18mr2525339wru.66.1610431169148; Mon, 11 Jan 2021 21:59:29 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Mon, 11 Jan 2021 21:59:28 -0800 (PST) In-Reply-To: <202101120110.10C1A6mg069684@gitrepo.freebsd.org> References: <202101120110.10C1A6mg069684@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 12 Jan 2021 06:59:28 +0100 Message-ID: Subject: Re: git: 7eaea04a5bb1 - main - amd64: compare TLB shootdown target to all_cpus To: Andrew Gallatin 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: 4DFKfC1C0gz4S47 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 05:59:31 -0000 This makes my 2 core vm crash on boot: Launching APs: 1 Timecounter "TSC-low" frequency 1346899854 Hz quality 1000 panic: IPI scoreboard is zero, initiator 1 target 1 cpuid = 1 time = 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff80fb7600 vpanic() at vpanic+0x181/frame 0xffffffff80fb7650 panic() at panic+0x43/frame 0xffffffff80fb76b0 smp_targeted_tlb_shootdown() at smp_targeted_tlb_shootdown+0x434/frame 0xffffffff80fb7730 pmap_invalidate_range() at pmap_invalidate_range+0x16f/frame 0xffffffff80fb77a0 vm_thread_stack_create() at vm_thread_stack_create+0x45/frame 0xffffffff80fb78e0 kstack_import() at kstack_import+0x4e/frame 0xffffffff80fb7910 cache_alloc() at cache_alloc+0x3bf/frame 0xffffffff80fb7970 cache_alloc_retry() at cache_alloc_retry+0x25/frame 0xffffffff80fb79b0 vm_thread_new() at vm_thread_new+0x3d/frame 0xffffffff80fb79d0 thread_alloc() at thread_alloc+0x50/frame 0xffffffff80fb7a00 kthread_add() at kthread_add+0x42/frame 0xffffffff80fb7aa0 kproc_kthread_add() at kproc_kthread_add+0xaf/frame 0xffffffff80fb7bc0 intr_event_add_handler() at intr_event_add_handler+0x227/frame 0xffffffff80fb7c30 start_softintr() at start_softintr+0xea/frame 0xffffffff80fb7c60 mi_startup() at mi_startup+0xec/frame 0xffffffff80fb7cb0 btext() at btext+0x2c KDB: enter: panic On 1/12/21, Andrew Gallatin wrote: > The branch main has been updated by gallatin: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=7eaea04a5bb1dc86c43ce046311e1c1a042994d3 > > commit 7eaea04a5bb1dc86c43ce046311e1c1a042994d3 > Author: Andrew Gallatin > AuthorDate: 2021-01-12 01:03:37 +0000 > Commit: Andrew Gallatin > CommitDate: 2021-01-12 01:09:32 +0000 > > amd64: compare TLB shootdown target to all_cpus > > On amd64, the pmap code passes all_cpus to > smp_targeted_tlb_shootdown() when unmapping from the > kernel pmap. This function has an optimized path to send IPIs > to all but itself, which it intends to do when the target > is all cpus. However, we need to compare the target cpu mask > with all_cpus, rather than using CPU_ISFULLSET(). Comparing with > CPU_ISFULLSET() will only work when we have MAXCPU cpus active in > the system, otherwise, we'll be sending repeated IPIs, rather than > a single IPI to all CPUs but ourself. > > Fixing this should reduce the time spent in native_lapic_ipi_wait() > as we will be sending ipis in parallel, rather than one-by-one. > This is confirmed by dtrace. > > Reviewed by: alc, jhb, kib, markj > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D28102 > --- > sys/amd64/amd64/mp_machdep.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c > index 63777014e151..794a11bf1276 100644 > --- a/sys/amd64/amd64/mp_machdep.c > +++ b/sys/amd64/amd64/mp_machdep.c > @@ -673,7 +673,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, > vm_offset_t addr1, > /* > * Check for other cpus. Return if none. > */ > - if (CPU_ISFULLSET(&mask)) { > + if (!CPU_CMP(&mask, &all_cpus)) { > if (mp_ncpus <= 1) > goto local_cb; > } else { > @@ -719,7 +719,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, > vm_offset_t addr1, > * (zeroing slot) and reading from it below (wait for > * acknowledgment). > */ > - if (CPU_ISFULLSET(&mask)) { > + if (!CPU_CMP(&mask, &all_cpus)) { > ipi_all_but_self(IPI_INVLOP); > other_cpus = all_cpus; > CPU_CLR(PCPU_GET(cpuid), &other_cpus); > -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Tue Jan 12 06:23:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDC694CB105; Tue, 12 Jan 2021 06:23:01 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFL9K5f7rz4TRW; Tue, 12 Jan 2021 06:23:01 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f173.google.com with SMTP id 2so918176qtt.10; Mon, 11 Jan 2021 22:23:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vZg7QGF5O1WM4a9loqtPHDCwJ/t3VOxMaArKuf35Hag=; b=QeXtq1HqYBux762xSSlU1nAh49ltvH0gVHcFs/MO7H7SXycIJhvB289ludvl36/f0a jApgy1knZm20fa2fy6LiqzdtLU8PRKFGUgbkVLwOlBwkOdvXYBWILIc4rCa7dWMGaxaJ +d3gU+9LWAJmISnXc+KuzweQTQVZbIsLzfviw+GusSz1vb9Kkz9aw/j1R3GDVWpgRCLh 4F8cSDKtyva1Fev8ZbmLAj5w+JM8caEqDrepSqHQwE1BM853WTDkyTMufIUDKquy1nAx XE54LjIjphm3oZIsEOi69+KrVi+pfi82c8anwMMTsidkgtU3hwpyKcLbrhH4uIQToP25 ftrg== X-Gm-Message-State: AOAM531M6y7/DRy7vMNCZ/8sdPj9PoaODEVJaxFpnKW+G4tHjMoKQ7Ta R29NZleMw8V296Hyt3HSaI+9V3NLemnuZA== X-Google-Smtp-Source: ABdhPJxLDTZcZ1zgM2QBwtzQ0/IpkGxdFaYHNwEslAKBEN/JzC3ZK2R7OsGAge/k5RmBIhuq77iukA== X-Received: by 2002:ac8:60d8:: with SMTP id i24mr3248322qtm.30.1610432580590; Mon, 11 Jan 2021 22:23:00 -0800 (PST) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com. [209.85.222.178]) by smtp.gmail.com with ESMTPSA id 60sm773233qth.14.2021.01.11.22.23.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 22:23:00 -0800 (PST) Received: by mail-qk1-f178.google.com with SMTP id c7so1044403qke.1; Mon, 11 Jan 2021 22:23:00 -0800 (PST) X-Received: by 2002:ae9:f312:: with SMTP id p18mr2876766qkg.311.1610432579937; Mon, 11 Jan 2021 22:22:59 -0800 (PST) MIME-Version: 1.0 References: <202101120110.10C1A6mg069684@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Mon, 11 Jan 2021 22:22:49 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 7eaea04a5bb1 - main - amd64: compare TLB shootdown target to all_cpus To: Mateusz Guzik , Andrew Gallatin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DFL9K5f7rz4TRW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 06:23:01 -0000 On Mon, Jan 11, 2021 at 9:59 PM Mateusz Guzik wrote: > > This makes my 2 core vm crash on boot: There's some known broken logic in bitset(9) for comparisons and some other operations. I started some tests and a patch to fix it and clean up some stuff, but I haven't polished it off: https://github.com/rlibby/freebsd/commits/bitset Long story short, it isn't careful not to examine bits in the last word that are past the end of the set. > > Launching APs: 1 > Timecounter "TSC-low" frequency 1346899854 Hz quality 1000 > panic: IPI scoreboard is zero, initiator 1 target 1 > cpuid = 1 > time = 1 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff80fb7600 > vpanic() at vpanic+0x181/frame 0xffffffff80fb7650 > panic() at panic+0x43/frame 0xffffffff80fb76b0 > smp_targeted_tlb_shootdown() at smp_targeted_tlb_shootdown+0x434/frame > 0xffffffff80fb7730 > pmap_invalidate_range() at pmap_invalidate_range+0x16f/frame 0xffffffff80fb77a0 > vm_thread_stack_create() at vm_thread_stack_create+0x45/frame 0xffffffff80fb78e0 > kstack_import() at kstack_import+0x4e/frame 0xffffffff80fb7910 > cache_alloc() at cache_alloc+0x3bf/frame 0xffffffff80fb7970 > cache_alloc_retry() at cache_alloc_retry+0x25/frame 0xffffffff80fb79b0 > vm_thread_new() at vm_thread_new+0x3d/frame 0xffffffff80fb79d0 > thread_alloc() at thread_alloc+0x50/frame 0xffffffff80fb7a00 > kthread_add() at kthread_add+0x42/frame 0xffffffff80fb7aa0 > kproc_kthread_add() at kproc_kthread_add+0xaf/frame 0xffffffff80fb7bc0 > intr_event_add_handler() at intr_event_add_handler+0x227/frame > 0xffffffff80fb7c30 > start_softintr() at start_softintr+0xea/frame 0xffffffff80fb7c60 > mi_startup() at mi_startup+0xec/frame 0xffffffff80fb7cb0 > btext() at btext+0x2c > KDB: enter: panic > > > On 1/12/21, Andrew Gallatin wrote: > > The branch main has been updated by gallatin: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=7eaea04a5bb1dc86c43ce046311e1c1a042994d3 > > > > commit 7eaea04a5bb1dc86c43ce046311e1c1a042994d3 > > Author: Andrew Gallatin > > AuthorDate: 2021-01-12 01:03:37 +0000 > > Commit: Andrew Gallatin > > CommitDate: 2021-01-12 01:09:32 +0000 > > > > amd64: compare TLB shootdown target to all_cpus > > > > On amd64, the pmap code passes all_cpus to > > smp_targeted_tlb_shootdown() when unmapping from the > > kernel pmap. This function has an optimized path to send IPIs > > to all but itself, which it intends to do when the target > > is all cpus. However, we need to compare the target cpu mask > > with all_cpus, rather than using CPU_ISFULLSET(). Comparing with > > CPU_ISFULLSET() will only work when we have MAXCPU cpus active in > > the system, otherwise, we'll be sending repeated IPIs, rather than > > a single IPI to all CPUs but ourself. > > > > Fixing this should reduce the time spent in native_lapic_ipi_wait() > > as we will be sending ipis in parallel, rather than one-by-one. > > This is confirmed by dtrace. > > > > Reviewed by: alc, jhb, kib, markj > > Sponsored by: Netflix > > Differential Revision: https://reviews.freebsd.org/D28102 > > --- > > sys/amd64/amd64/mp_machdep.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c > > index 63777014e151..794a11bf1276 100644 > > --- a/sys/amd64/amd64/mp_machdep.c > > +++ b/sys/amd64/amd64/mp_machdep.c > > @@ -673,7 +673,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, > > vm_offset_t addr1, > > /* > > * Check for other cpus. Return if none. > > */ > > - if (CPU_ISFULLSET(&mask)) { > > + if (!CPU_CMP(&mask, &all_cpus)) { > > if (mp_ncpus <= 1) > > goto local_cb; > > } else { > > @@ -719,7 +719,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, > > vm_offset_t addr1, > > * (zeroing slot) and reading from it below (wait for > > * acknowledgment). > > */ > > - if (CPU_ISFULLSET(&mask)) { > > + if (!CPU_CMP(&mask, &all_cpus)) { > > ipi_all_but_self(IPI_INVLOP); > > other_cpus = all_cpus; > > CPU_CLR(PCPU_GET(cpuid), &other_cpus); > > > > > -- > Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Tue Jan 12 06:43:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB6CF4CB619; Tue, 12 Jan 2021 06:43:34 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFLd16wRjz4VQY; Tue, 12 Jan 2021 06:43:33 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f182.google.com with SMTP id b9so970089qtr.2; Mon, 11 Jan 2021 22:43:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ViXucKVoLwRbdgSLgkHvg32u3OGnBkzMWxGr1XLRrYA=; b=mrCKR27Gf9e8OCf48LX1z/TcylQw330qBNvRb0V7UKN0HvghG8q0eMLKEXuEx9aqyN DU5RkoHds36Xrq7j4fCL7Icd3AfcT0VEaNwcOEeCr39cnWufp31Y2MzmrmRR8DJkceu0 9WO5HNw/Stt4/Dbbo2TIVyv5tLOUU423WAnTCjcKSPhV2b0MvlG5CSQ4rupgdNQQ3ksZ zCNFcVb2OEaOLoRnicBHOhicAAPHacj8StNQ3it8XlCS6Sv0dDiMh3+HOeoeyqkfq8xx zds80NqUm4hsuI5OXbwzYZ0wt6RcbYbYKZFNan8pHcwxA/sAYIebDrx7BiSU3rvywszG Xt+w== X-Gm-Message-State: AOAM532j+0dQoaMT1bkDRLObf/Qah+zluFJyyrFO0DR99mUNUkg7VUZA pxOAYxIUfv0hjfUKonnHYIzwTOO1sTbHiA== X-Google-Smtp-Source: ABdhPJxpMV4sSomvSgb/JNGuZKIOb/BSG49tUJLkbZJddM/dHdjXidvOF4YgFNs9JNLvp1t7lokn+g== X-Received: by 2002:aed:2ea1:: with SMTP id k30mr3260481qtd.32.1610433812565; Mon, 11 Jan 2021 22:43:32 -0800 (PST) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com. [209.85.219.42]) by smtp.gmail.com with ESMTPSA id a5sm786525qtn.57.2021.01.11.22.43.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 22:43:32 -0800 (PST) Received: by mail-qv1-f42.google.com with SMTP id bd6so491677qvb.9; Mon, 11 Jan 2021 22:43:32 -0800 (PST) X-Received: by 2002:a0c:e383:: with SMTP id a3mr2912280qvl.45.1610433811832; Mon, 11 Jan 2021 22:43:31 -0800 (PST) MIME-Version: 1.0 References: <202101120110.10C1A6mg069684@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Mon, 11 Jan 2021 22:43:20 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 7eaea04a5bb1 - main - amd64: compare TLB shootdown target to all_cpus To: Mateusz Guzik , Andrew Gallatin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DFLd16wRjz4VQY X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.160.182 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RWL_MAILSPIKE_GOOD(0.00)[209.85.160.182:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.160.182:from]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[rlibby@freebsd.org,rlibby@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[rlibby]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.160.182:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.182:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 06:43:34 -0000 On Mon, Jan 11, 2021 at 10:22 PM Ryan Libby wrote: > > On Mon, Jan 11, 2021 at 9:59 PM Mateusz Guzik wrote: > > > > This makes my 2 core vm crash on boot: > > There's some known broken logic in bitset(9) for comparisons and some > other operations. I started some tests and a patch to fix it and clean > up some stuff, but I haven't polished it off: > > https://github.com/rlibby/freebsd/commits/bitset > > Long story short, it isn't careful not to examine bits in the last word > that are past the end of the set. > Ah, except MAXCPU is a multiple of the word size on amd64, so this shouldn't be the issue. Sorry for the noise. > > > > Launching APs: 1 > > Timecounter "TSC-low" frequency 1346899854 Hz quality 1000 > > panic: IPI scoreboard is zero, initiator 1 target 1 > > cpuid = 1 > > time = 1 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff80fb7600 > > vpanic() at vpanic+0x181/frame 0xffffffff80fb7650 > > panic() at panic+0x43/frame 0xffffffff80fb76b0 > > smp_targeted_tlb_shootdown() at smp_targeted_tlb_shootdown+0x434/frame > > 0xffffffff80fb7730 > > pmap_invalidate_range() at pmap_invalidate_range+0x16f/frame 0xffffffff80fb77a0 > > vm_thread_stack_create() at vm_thread_stack_create+0x45/frame 0xffffffff80fb78e0 > > kstack_import() at kstack_import+0x4e/frame 0xffffffff80fb7910 > > cache_alloc() at cache_alloc+0x3bf/frame 0xffffffff80fb7970 > > cache_alloc_retry() at cache_alloc_retry+0x25/frame 0xffffffff80fb79b0 > > vm_thread_new() at vm_thread_new+0x3d/frame 0xffffffff80fb79d0 > > thread_alloc() at thread_alloc+0x50/frame 0xffffffff80fb7a00 > > kthread_add() at kthread_add+0x42/frame 0xffffffff80fb7aa0 > > kproc_kthread_add() at kproc_kthread_add+0xaf/frame 0xffffffff80fb7bc0 > > intr_event_add_handler() at intr_event_add_handler+0x227/frame > > 0xffffffff80fb7c30 > > start_softintr() at start_softintr+0xea/frame 0xffffffff80fb7c60 > > mi_startup() at mi_startup+0xec/frame 0xffffffff80fb7cb0 > > btext() at btext+0x2c > > KDB: enter: panic > > > > > > On 1/12/21, Andrew Gallatin wrote: > > > The branch main has been updated by gallatin: > > > > > > URL: > > > https://cgit.FreeBSD.org/src/commit/?id=7eaea04a5bb1dc86c43ce046311e1c1a042994d3 > > > > > > commit 7eaea04a5bb1dc86c43ce046311e1c1a042994d3 > > > Author: Andrew Gallatin > > > AuthorDate: 2021-01-12 01:03:37 +0000 > > > Commit: Andrew Gallatin > > > CommitDate: 2021-01-12 01:09:32 +0000 > > > > > > amd64: compare TLB shootdown target to all_cpus > > > > > > On amd64, the pmap code passes all_cpus to > > > smp_targeted_tlb_shootdown() when unmapping from the > > > kernel pmap. This function has an optimized path to send IPIs > > > to all but itself, which it intends to do when the target > > > is all cpus. However, we need to compare the target cpu mask > > > with all_cpus, rather than using CPU_ISFULLSET(). Comparing with > > > CPU_ISFULLSET() will only work when we have MAXCPU cpus active in > > > the system, otherwise, we'll be sending repeated IPIs, rather than > > > a single IPI to all CPUs but ourself. > > > > > > Fixing this should reduce the time spent in native_lapic_ipi_wait() > > > as we will be sending ipis in parallel, rather than one-by-one. > > > This is confirmed by dtrace. > > > > > > Reviewed by: alc, jhb, kib, markj > > > Sponsored by: Netflix > > > Differential Revision: https://reviews.freebsd.org/D28102 > > > --- > > > sys/amd64/amd64/mp_machdep.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c > > > index 63777014e151..794a11bf1276 100644 > > > --- a/sys/amd64/amd64/mp_machdep.c > > > +++ b/sys/amd64/amd64/mp_machdep.c > > > @@ -673,7 +673,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, > > > vm_offset_t addr1, > > > /* > > > * Check for other cpus. Return if none. > > > */ > > > - if (CPU_ISFULLSET(&mask)) { > > > + if (!CPU_CMP(&mask, &all_cpus)) { > > > if (mp_ncpus <= 1) > > > goto local_cb; > > > } else { > > > @@ -719,7 +719,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, > > > vm_offset_t addr1, > > > * (zeroing slot) and reading from it below (wait for > > > * acknowledgment). > > > */ > > > - if (CPU_ISFULLSET(&mask)) { > > > + if (!CPU_CMP(&mask, &all_cpus)) { > > > ipi_all_but_self(IPI_INVLOP); > > > other_cpus = all_cpus; > > > CPU_CLR(PCPU_GET(cpuid), &other_cpus); > > > > > > > > > -- > > Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Tue Jan 12 07:16:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5F974CC41F; Tue, 12 Jan 2021 07: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFMLY4Hdmz4Wtk; Tue, 12 Jan 2021 07:16: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 8193F28DA8; Tue, 12 Jan 2021 07:16: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 10C7G5sn046150; Tue, 12 Jan 2021 07:16:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10C7G55H046149; Tue, 12 Jan 2021 07:16:05 GMT (envelope-from git) Date: Tue, 12 Jan 2021 07:16:05 GMT Message-Id: <202101120716.10C7G55H046149@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: 9402bb44f137 - main - vmspace_fork: preserve wx settings in the child vm map after fork 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: 9402bb44f137eec9c844210ee8436bfee58ac165 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 07:16:05 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9402bb44f137eec9c844210ee8436bfee58ac165 commit 9402bb44f137eec9c844210ee8436bfee58ac165 Author: Konstantin Belousov AuthorDate: 2021-01-12 06:09:59 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-12 06:09:59 +0000 vmspace_fork: preserve wx settings in the child vm map after fork Noted by: markj Sponsored by: The FreeBSD Foundation --- sys/vm/vm_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index bea776480391..9746d07713d3 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4303,7 +4303,8 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_charge) } new_map->anon_loc = old_map->anon_loc; - new_map->flags |= old_map->flags & (MAP_ASLR | MAP_ASLR_IGNSTART); + new_map->flags |= old_map->flags & (MAP_ASLR | MAP_ASLR_IGNSTART | + MAP_WXORX); VM_MAP_ENTRY_FOREACH(old_entry, old_map) { if ((old_entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0) From owner-dev-commits-src-all@freebsd.org Tue Jan 12 08:25:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 488E74CE19F; Tue, 12 Jan 2021 08:25: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFNv01YY7z4b5N; Tue, 12 Jan 2021 08:25: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 239FF29875; Tue, 12 Jan 2021 08: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 10C8PmWJ036571; Tue, 12 Jan 2021 08: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 10C8PmhK036570; Tue, 12 Jan 2021 08:25:48 GMT (envelope-from git) Date: Tue, 12 Jan 2021 08:25:48 GMT Message-Id: <202101120825.10C8PmhK036570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: bd89fbd27c6b - stable/12 - newvers: append commit count to uname version string 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/stable/12 X-Git-Reftype: branch X-Git-Commit: bd89fbd27c6b582df4bba750df652bb36402fc7e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 08:25:48 -0000 The branch stable/12 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=bd89fbd27c6b582df4bba750df652bb36402fc7e commit bd89fbd27c6b582df4bba750df652bb36402fc7e Author: Ed Maste AuthorDate: 2019-08-01 14:13:04 +0000 Commit: Li-Wen Hsu CommitDate: 2021-01-12 08:19:43 +0000 newvers: append commit count to uname version string In a git world this provides a facsimile of a monotonically increasing version number. This might be refined further, but this provides a starting point for investigation. Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20462 The "Relnotes" flag in the commit message is removed in cherry-pick as git repo doesn't affect the stable/11 and stable/12 release. (cherry picked from commit ecb2bbc081ae906956f4718ec946b9e4fcea241f) --- sys/conf/newvers.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e047f1e68d39..4b5651fdd4bf 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -231,6 +231,10 @@ if [ -n "$git_cmd" ] ; then git=" ${git}" fi fi + git_cnt=$($git_cmd rev-list --count HEAD 2>/dev/null) + if [ -n "$git_cnt" ] ; then + git="${git}-c${git_cnt}" + fi git_b=`$git_cmd rev-parse --abbrev-ref HEAD` if [ -n "$git_b" ] ; then git="${git}(${git_b})" From owner-dev-commits-src-all@freebsd.org Tue Jan 12 08:25:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58CAA4CDFEF; Tue, 12 Jan 2021 08: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFNv127hqz4Zm4; Tue, 12 Jan 2021 08: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 3CE0429876; Tue, 12 Jan 2021 08:25: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 10C8Pnq1036594; Tue, 12 Jan 2021 08:25:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10C8PntE036593; Tue, 12 Jan 2021 08:25:49 GMT (envelope-from git) Date: Tue, 12 Jan 2021 08:25:49 GMT Message-Id: <202101120825.10C8PntE036593@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 079273384c22 - stable/12 - Fix newvers.sh to no longer print an outdated SVN rev 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 079273384c22961b15d520c172645ba626af1db1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 08:25:49 -0000 The branch stable/12 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=079273384c22961b15d520c172645ba626af1db1 commit 079273384c22961b15d520c172645ba626af1db1 Author: Ulrich Spörlein AuthorDate: 2020-12-23 21:29:34 +0000 Commit: Li-Wen Hsu CommitDate: 2021-01-12 08:19:43 +0000 Fix newvers.sh to no longer print an outdated SVN rev We have stopped using SVN, so the notes containing the old SVN revisions are no longer populated, so fall back to purely counting the number of commits (currently at about 255337). Also turn the format more into what git-describe produces, with a name first, then the number of commits and the hash last. Note that as we don't tag anything on `main`, git describe will never produce something useful there and finds the newest vendor tag that was merged in instead. Sample output: FreeBSD 13.0-CURRENT #6 main-c255126-gb81783dc98e6-dirty FreeBSD 12.2-STABLE #0 stable/12-c243035-gd16dac42b641-dirty MFC after: 3 weeks Reviewed by: imp, glebius Differential Revision: https://reviews.freebsd.org/D27751 (cherry picked from commit 8d405efd73d3991fe1647f91a2b7c9989dd5f18f) --- sys/conf/newvers.sh | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 4b5651fdd4bf..48f778ed1223 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -210,40 +210,21 @@ if [ -n "$svnversion" ] ; then fi if [ -n "$git_cmd" ] ; then - git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` - svn=`$git_cmd svn find-rev $git 2>/dev/null` - if [ -n "$svn" ] ; then - svn=" r${svn}" - git="=${git}" - else - svn=`$git_cmd log --grep '^git-svn-id:' | \ - grep '^ git-svn-id:' | head -1 | \ - sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` - if [ -z "$svn" ] ; then - svn=`$git_cmd log --format='format:%N' | \ - grep '^svn ' | head -1 | \ - sed -n 's/^.*revision=\([0-9][0-9]*\).*$/\1/p'` - fi - if [ -n "$svn" ] ; then - svn=" r${svn}" - git="+${git}" - else - git=" ${git}" - fi - fi + git=$($git_cmd rev-parse --verify --short HEAD 2>/dev/null) git_cnt=$($git_cmd rev-list --count HEAD 2>/dev/null) if [ -n "$git_cnt" ] ; then - git="${git}-c${git_cnt}" + git="c${git_cnt}-g${git}" fi - git_b=`$git_cmd rev-parse --abbrev-ref HEAD` - if [ -n "$git_b" ] ; then - git="${git}(${git_b})" + git_b=$($git_cmd rev-parse --abbrev-ref HEAD) + if [ -n "$git_b" -a "$git_b" != "HEAD" ] ; then + git="${git_b}-${git}" fi if $git_cmd --work-tree=${VCSTOP} diff-index \ --name-only HEAD | read dummy; then git="${git}-dirty" modified=true fi + git=" ${git}" fi if [ -n "$p4_cmd" ] ; then From owner-dev-commits-src-all@freebsd.org Tue Jan 12 08:25:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 557044CE0D4; Tue, 12 Jan 2021 08: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFNvB3qlDz4Zpc; Tue, 12 Jan 2021 08: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 6106E297F3; Tue, 12 Jan 2021 08: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 10C8PvEg036744; Tue, 12 Jan 2021 08: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 10C8PvOm036743; Tue, 12 Jan 2021 08:25:57 GMT (envelope-from git) Date: Tue, 12 Jan 2021 08:25:57 GMT Message-Id: <202101120825.10C8PvOm036743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 3518e1924536 - stable/11 - Fix newvers.sh to no longer print an outdated SVN rev 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/stable/11 X-Git-Reftype: branch X-Git-Commit: 3518e1924536de2facc96030ab2707751ab0f5fc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 08:25:59 -0000 The branch stable/11 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=3518e1924536de2facc96030ab2707751ab0f5fc commit 3518e1924536de2facc96030ab2707751ab0f5fc Author: Ulrich Spörlein AuthorDate: 2020-12-23 21:29:34 +0000 Commit: Li-Wen Hsu CommitDate: 2021-01-12 08:24:00 +0000 Fix newvers.sh to no longer print an outdated SVN rev We have stopped using SVN, so the notes containing the old SVN revisions are no longer populated, so fall back to purely counting the number of commits (currently at about 255337). Also turn the format more into what git-describe produces, with a name first, then the number of commits and the hash last. Note that as we don't tag anything on `main`, git describe will never produce something useful there and finds the newest vendor tag that was merged in instead. Sample output: FreeBSD 13.0-CURRENT #6 main-c255126-gb81783dc98e6-dirty FreeBSD 12.2-STABLE #0 stable/12-c243035-gd16dac42b641-dirty MFC after: 3 weeks Reviewed by: imp, glebius Differential Revision: https://reviews.freebsd.org/D27751 (cherry picked from commit 8d405efd73d3991fe1647f91a2b7c9989dd5f18f) --- sys/conf/newvers.sh | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 593f14ef4145..9b7a1c19991a 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -212,40 +212,21 @@ if [ -n "$svnversion" ] ; then fi if [ -n "$git_cmd" ] ; then - git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` - svn=`$git_cmd svn find-rev $git 2>/dev/null` - if [ -n "$svn" ] ; then - svn=" r${svn}" - git="=${git}" - else - svn=`$git_cmd log --grep '^git-svn-id:' | \ - grep '^ git-svn-id:' | head -1 | \ - sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` - if [ -z "$svn" ] ; then - svn=`$git_cmd log --format='format:%N' | \ - grep '^svn ' | head -1 | \ - sed -n 's/^.*revision=\([0-9][0-9]*\).*$/\1/p'` - fi - if [ -n "$svn" ] ; then - svn=" r${svn}" - git="+${git}" - else - git=" ${git}" - fi - fi + git=$($git_cmd rev-parse --verify --short HEAD 2>/dev/null) git_cnt=$($git_cmd rev-list --count HEAD 2>/dev/null) if [ -n "$git_cnt" ] ; then - git="${git}-c${git_cnt}" + git="c${git_cnt}-g${git}" fi - git_b=`$git_cmd rev-parse --abbrev-ref HEAD` - if [ -n "$git_b" ] ; then - git="${git}(${git_b})" + git_b=$($git_cmd rev-parse --abbrev-ref HEAD) + if [ -n "$git_b" -a "$git_b" != "HEAD" ] ; then + git="${git_b}-${git}" fi if $git_cmd --work-tree=${VCSDIR}/.. diff-index \ --name-only HEAD | read dummy; then git="${git}-dirty" modified=true fi + git=" ${git}" fi if [ -n "$p4_cmd" ] ; then From owner-dev-commits-src-all@freebsd.org Tue Jan 12 08:26:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 147104CE303; Tue, 12 Jan 2021 08: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFNvC2v8jz4Zrq; Tue, 12 Jan 2021 08: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 3BF1629DA7; Tue, 12 Jan 2021 08: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 10C8Pu7f036721; Tue, 12 Jan 2021 08: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 10C8Puli036720; Tue, 12 Jan 2021 08:25:56 GMT (envelope-from git) Date: Tue, 12 Jan 2021 08:25:56 GMT Message-Id: <202101120825.10C8Puli036720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 98dfc7de6176 - stable/11 - newvers: append commit count to uname version string 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/stable/11 X-Git-Reftype: branch X-Git-Commit: 98dfc7de6176972d7b6b7dce9b18439c0c9edabe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 08:26:01 -0000 The branch stable/11 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=98dfc7de6176972d7b6b7dce9b18439c0c9edabe commit 98dfc7de6176972d7b6b7dce9b18439c0c9edabe Author: Ed Maste AuthorDate: 2019-08-01 14:13:04 +0000 Commit: Li-Wen Hsu CommitDate: 2021-01-12 08:22:30 +0000 newvers: append commit count to uname version string In a git world this provides a facsimile of a monotonically increasing version number. This might be refined further, but this provides a starting point for investigation. Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20462 The "Relnotes" flag in the commit message is removed in cherry-pick as git repo doesn't affect the stable/11 and stable/12 release. (cherry picked from commit ecb2bbc081ae906956f4718ec946b9e4fcea241f) --- sys/conf/newvers.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 661bbc3978e6..593f14ef4145 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -233,6 +233,10 @@ if [ -n "$git_cmd" ] ; then git=" ${git}" fi fi + git_cnt=$($git_cmd rev-list --count HEAD 2>/dev/null) + if [ -n "$git_cnt" ] ; then + git="${git}-c${git_cnt}" + fi git_b=`$git_cmd rev-parse --abbrev-ref HEAD` if [ -n "$git_b" ] ; then git="${git}(${git_b})" From owner-dev-commits-src-all@freebsd.org Tue Jan 12 08:54:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 756464CF3BD; Tue, 12 Jan 2021 08:54: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFPWf2tK9z4d9D; Tue, 12 Jan 2021 08:54: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 55D882A39B; Tue, 12 Jan 2021 08:54: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 10C8s6C7075399; Tue, 12 Jan 2021 08:54:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10C8s6Gr075398; Tue, 12 Jan 2021 08:54:06 GMT (envelope-from git) Date: Tue, 12 Jan 2021 08:54:06 GMT Message-Id: <202101120854.10C8s6Gr075398@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: 44121a0fbee0 - main - amd64: fix tlb shootdown when all cpus are passed in the bitmap 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: 44121a0fbee0272e23bfb90601d177ba9e9cda9b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 08:54:06 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=44121a0fbee0272e23bfb90601d177ba9e9cda9b commit 44121a0fbee0272e23bfb90601d177ba9e9cda9b Author: Mateusz Guzik AuthorDate: 2021-01-12 08:47:32 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-12 08:47:32 +0000 amd64: fix tlb shootdown when all cpus are passed in the bitmap Right now the routine leaves the current CPU in the map, later tripping on an assert when filling in the scoreboard: panic: IPI scoreboard is zero, initiator 1 target 1 Instead pre-check if all CPUs are present in the map and remember that outcome for later. Fixes: 7eaea04a5bb1dc86 ("amd64: compare TLB shootdown target to all_cpus") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28111 --- sys/amd64/amd64/mp_machdep.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 794a11bf1276..aa62c2086fa4 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -660,6 +660,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, cpuset_t other_cpus, mask1; uint32_t generation, *p_cpudone; int cpu; + bool is_all; /* * It is not necessary to signal other CPUs while booting or @@ -673,14 +674,10 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, /* * Check for other cpus. Return if none. */ - if (!CPU_CMP(&mask, &all_cpus)) { - if (mp_ncpus <= 1) - goto local_cb; - } else { - CPU_CLR(PCPU_GET(cpuid), &mask); - if (CPU_EMPTY(&mask)) - goto local_cb; - } + is_all = !CPU_CMP(&mask, &all_cpus); + CPU_CLR(PCPU_GET(cpuid), &mask); + if (CPU_EMPTY(&mask)) + goto local_cb; /* * Initiator must have interrupts enabled, which prevents @@ -719,7 +716,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, * (zeroing slot) and reading from it below (wait for * acknowledgment). */ - if (!CPU_CMP(&mask, &all_cpus)) { + if (is_all) { ipi_all_but_self(IPI_INVLOP); other_cpus = all_cpus; CPU_CLR(PCPU_GET(cpuid), &other_cpus); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 10:33:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7910A4D200E; Tue, 12 Jan 2021 10:33: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFRkR34RFz4kd6; Tue, 12 Jan 2021 10:33: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 5AB382B81E; Tue, 12 Jan 2021 10:33: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 10CAXZtD004741; Tue, 12 Jan 2021 10:33:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CAXZFe004740; Tue, 12 Jan 2021 10:33:35 GMT (envelope-from git) Date: Tue, 12 Jan 2021 10:33:35 GMT Message-Id: <202101121033.10CAXZFe004740@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: f74397658390 - main - dtrace: Blacklist riscv exception handlers for fbt 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: f74397658390237200cc19cae133ea1073e7bf6d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 10:33:35 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f74397658390237200cc19cae133ea1073e7bf6d commit f74397658390237200cc19cae133ea1073e7bf6d Author: Kristof Provost AuthorDate: 2021-01-11 20:23:22 +0000 Commit: Kristof Provost CommitDate: 2021-01-12 09:33:16 +0000 dtrace: Blacklist riscv exception handlers for fbt We can't safely instrument those exception handlers, so blacklist them. Test case: dtrace -n ::: Reviewed by: markj (previous version) Differential Revision: https://reviews.freebsd.org/D27754 --- sys/cddl/dev/fbt/riscv/fbt_isa.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/cddl/dev/fbt/riscv/fbt_isa.c b/sys/cddl/dev/fbt/riscv/fbt_isa.c index 406fcd3f9bea..659a9d44c81c 100644 --- a/sys/cddl/dev/fbt/riscv/fbt_isa.c +++ b/sys/cddl/dev/fbt/riscv/fbt_isa.c @@ -156,6 +156,19 @@ fbt_provide_module_function(linker_file_t lf, int symindx, if (fbt_excluded(name)) return (0); + /* + * Some assembly-language exception handlers are not suitable for + * instrumentation. + */ + if (strcmp(name, "cpu_exception_handler") == 0) + return (0); + if (strcmp(name, "cpu_exception_handler_user") == 0) + return (0); + if (strcmp(name, "cpu_exception_handler_supervisor") == 0) + return (0); + if (strcmp(name, "do_trap_supervisor") == 0) + return (0); + instr = (uint32_t *)(symval->value); limit = (uint32_t *)(symval->value + symval->size); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 10:46:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 065964D24A9; Tue, 12 Jan 2021 10:46: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFS166qpcz4lB7; Tue, 12 Jan 2021 10: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 DD5862BA94; Tue, 12 Jan 2021 10: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 10CAkI1u018158; Tue, 12 Jan 2021 10:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CAkI3s018157; Tue, 12 Jan 2021 10:46:18 GMT (envelope-from git) Date: Tue, 12 Jan 2021 10:46:18 GMT Message-Id: <202101121046.10CAkI3s018157@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: 513320c0f112 - main - sigfastblock_setpend(): do not set PEND user flag unless TDP_SIGFASTPENDING is set. 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: 513320c0f1122f096468c0b01623ba7c7e77cbe2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 10:46:19 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=513320c0f1122f096468c0b01623ba7c7e77cbe2 commit 513320c0f1122f096468c0b01623ba7c7e77cbe2 Author: Konstantin Belousov AuthorDate: 2021-01-11 17:07:10 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-12 10:43:34 +0000 sigfastblock_setpend(): do not set PEND user flag unless TDP_SIGFASTPENDING is set. User pending bit should not be set if kernel did not noted a pending signal. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28089 --- sys/kern/kern_sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 004aabdcb84e..7884b5be9f91 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -4213,7 +4213,7 @@ sigfastblock_setpend1(struct thread *td) int res; uint32_t oldval; - if ((td->td_pflags & TDP_SIGFASTBLOCK) == 0) + if ((td->td_pflags & TDP_SIGFASTPENDING) == 0) return; res = fueword32((void *)td->td_sigblock_ptr, &oldval); if (res == -1) { From owner-dev-commits-src-all@freebsd.org Tue Jan 12 10:46:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3263A4D22D9; Tue, 12 Jan 2021 10:46: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFS180zCXz4lQ1; Tue, 12 Jan 2021 10:46: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 09E5A2B6E9; Tue, 12 Jan 2021 10:46: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 10CAkJib018178; Tue, 12 Jan 2021 10:46:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CAkJKK018177; Tue, 12 Jan 2021 10:46:19 GMT (envelope-from git) Date: Tue, 12 Jan 2021 10:46:19 GMT Message-Id: <202101121046.10CAkJKK018177@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: 57f22c828ec0 - main - sigfastblock: do not skip cursig/postsig loop in ast() 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: 57f22c828ec01e0d92bc8858f61df06b4d81ea5c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 10:46:20 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=57f22c828ec01e0d92bc8858f61df06b4d81ea5c commit 57f22c828ec01e0d92bc8858f61df06b4d81ea5c Author: Konstantin Belousov AuthorDate: 2021-01-11 01:22:44 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-12 10:45:26 +0000 sigfastblock: do not skip cursig/postsig loop in ast() Even if sigfastblock block is non-zero, non-blockable signals must be checked on ast and delivered now. This also affects debugger ability to attach, because issignal() also calls ptracestop() if there is a pending stop for debugee. Instead of checking for sigfastblock, and either setting PENDING flag for usermode or doing signal delivery loop, always do the loop after checking, and then handle PENDING bit. issignal() already does the right thing for fast-blocked case, allowing only STOPs and SIGKILL delivery to happen. Reported by: Vasily Postnicov , markj Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28089 --- sys/kern/subr_trap.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 0c7e43c40ea2..8981091b50ed 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -204,6 +204,7 @@ ast(struct trapframe *framep) struct thread *td; struct proc *p; int flags, sig; + bool resched_sigs; td = curthread; p = td->td_proc; @@ -316,27 +317,24 @@ ast(struct trapframe *framep) if (flags & TDF_NEEDSIGCHK || p->p_pendingcnt > 0 || !SIGISEMPTY(p->p_siglist)) { sigfastblock_fetch(td); - if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0 && - td->td_sigblock_val != 0) { - sigfastblock_setpend(td, true); - } else { - PROC_LOCK(p); - mtx_lock(&p->p_sigacts->ps_mtx); - while ((sig = cursig(td)) != 0) { - KASSERT(sig >= 0, ("sig %d", sig)); - postsig(sig); - } - mtx_unlock(&p->p_sigacts->ps_mtx); - PROC_UNLOCK(p); + PROC_LOCK(p); + mtx_lock(&p->p_sigacts->ps_mtx); + while ((sig = cursig(td)) != 0) { + KASSERT(sig >= 0, ("sig %d", sig)); + postsig(sig); } + mtx_unlock(&p->p_sigacts->ps_mtx); + PROC_UNLOCK(p); + resched_sigs = true; + } else { + resched_sigs = false; } /* * Handle deferred update of the fast sigblock value, after * the postsig() loop was performed. */ - if (td->td_pflags & TDP_SIGFASTPENDING) - sigfastblock_setpend(td, false); + sigfastblock_setpend(td, resched_sigs); #ifdef KTRACE KTRUSERRET(td); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 10:46:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A79154D227B; Tue, 12 Jan 2021 10: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFS192wkZz4lSS; Tue, 12 Jan 2021 10: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 310912BA95; Tue, 12 Jan 2021 10: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 10CAkLxX018199; Tue, 12 Jan 2021 10: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 10CAkLxI018198; Tue, 12 Jan 2021 10:46:21 GMT (envelope-from git) Date: Tue, 12 Jan 2021 10:46:21 GMT Message-Id: <202101121046.10CAkLxI018198@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: 85d028223bc2 - main - libthr malloc: support recursion on thr_malloc_umtx. 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: 85d028223bc2768651f4d44881644ceb5dc2a664 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 10:46:21 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=85d028223bc2768651f4d44881644ceb5dc2a664 commit 85d028223bc2768651f4d44881644ceb5dc2a664 Author: Konstantin Belousov AuthorDate: 2021-01-12 09:02:37 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-12 10:45:44 +0000 libthr malloc: support recursion on thr_malloc_umtx. One possible way the recursion can happen is during fork: suppose that fork is called from early code that did not triggered jemalloc(3) initialization yet. Then we lock thr_malloc lock, and call malloc_prefork() that might require initialization of jemalloc pthread_mutexes, calling into libthr malloc. It is safe to allow recursion for this occurence. PR: 252579 Reported by: Vasily Postnicov MFC after: 1 week Sponsored by: The FreeBSD Foundation --- lib/libthr/thread/thr_malloc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c index 2f1c81142942..80a81f9c6c27 100644 --- a/lib/libthr/thread/thr_malloc.c +++ b/lib/libthr/thread/thr_malloc.c @@ -41,6 +41,7 @@ int npagesizes; size_t *pagesizes; static size_t pagesizes_d[2]; static struct umutex thr_malloc_umtx; +static u_int thr_malloc_umtx_level; void __thr_malloc_init(void) @@ -60,11 +61,16 @@ __thr_malloc_init(void) static void thr_malloc_lock(struct pthread *curthread) { + uint32_t curtid; if (curthread == NULL) return; curthread->locklevel++; - _thr_umutex_lock(&thr_malloc_umtx, TID(curthread)); + curtid = TID(curthread); + if ((uint32_t)thr_malloc_umtx.m_owner == curtid) + thr_malloc_umtx_level++; + else + _thr_umutex_lock(&thr_malloc_umtx, curtid); } static void @@ -73,7 +79,10 @@ thr_malloc_unlock(struct pthread *curthread) if (curthread == NULL) return; - _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); + if (thr_malloc_umtx_level > 0) + thr_malloc_umtx_level--; + else + _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); curthread->locklevel--; _thr_ast(curthread); } From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:08:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A66E54D2F0D; Tue, 12 Jan 2021 11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFSVX4My8z4n8r; Tue, 12 Jan 2021 11: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 891902BD28; Tue, 12 Jan 2021 11: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 10CB8K9X044142; Tue, 12 Jan 2021 11: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 10CB8Kjj044141; Tue, 12 Jan 2021 11:08:20 GMT (envelope-from git) Date: Tue, 12 Jan 2021 11:08:20 GMT Message-Id: <202101121108.10CB8Kjj044141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 50180d2b52cc - main - loader.efi: reworked framebuffer setup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50180d2b52cc16ecb6a6617fdc53f5d83c71a8b4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:08:20 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=50180d2b52cc16ecb6a6617fdc53f5d83c71a8b4 commit 50180d2b52cc16ecb6a6617fdc53f5d83c71a8b4 Author: Toomas Soome AuthorDate: 2021-01-11 21:54:23 +0000 Commit: Toomas Soome CommitDate: 2021-01-12 11:07:27 +0000 loader.efi: reworked framebuffer setup Pass gfx_state to efi_find_framebuffer(), so we can pick between GOP and UGA in efi_find_framebuffer(), also we can then set up struct gen_fb in gfx_state from efifb and isolate efi fb data processing into framebuffer.c. This change does allow us to clean up efi_cons_init() and reduce BS->LocateProtocol() calls. A little downside is that we now need to translate gen_fb back to efifb in bootinfo.c (for passing to kernel), and we need to add few -I options to CFLAGS. --- stand/efi/libefi/Makefile | 1 + stand/efi/libefi/efi_console.c | 61 +++++++++++++----------------------------- stand/efi/loader/Makefile | 4 +++ stand/efi/loader/bootinfo.c | 33 ++++++++++++++--------- stand/efi/loader/framebuffer.c | 50 +++++++++++++++++++++++++++++----- stand/efi/loader/framebuffer.h | 4 ++- 6 files changed, 90 insertions(+), 63 deletions(-) diff --git a/stand/efi/libefi/Makefile b/stand/efi/libefi/Makefile index 010754b5238a..6d342aaa8007 100644 --- a/stand/efi/libefi/Makefile +++ b/stand/efi/libefi/Makefile @@ -50,6 +50,7 @@ CFLAGS+= -fPIC -mno-red-zone CFLAGS+= -I${EFIINC} CFLAGS+= -I${EFIINCMD} CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite +CFLAGS.efi_console.c+= -I${.CURDIR}/../loader CFLAGS.teken.c+= -I${SRCTOP}/sys/teken .if ${MK_LOADER_ZFS} != "no" CFLAGS+= -I${ZFSSRC} diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 6782cf5696a8..533f4458c15b 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -34,10 +34,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bootstrap.h" extern EFI_GUID gop_guid; -extern int efi_find_framebuffer(struct efi_fb *efifb); static EFI_GUID simple_input_ex_guid = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID; static SIMPLE_TEXT_OUTPUT_INTERFACE *conout; static SIMPLE_INPUT_INTERFACE *conin; @@ -884,52 +884,29 @@ cons_update_mode(bool use_gfx_mode) const teken_attr_t *a; teken_attr_t attr; EFI_STATUS status; - EFI_GRAPHICS_OUTPUT *gop = NULL; - struct efi_fb efifb; char env[10], *ptr; - if (use_gfx_mode == true) { - gfx_state.tg_fb_type = FB_GOP; - if (gfx_state.tg_private == NULL) { - (void) BS->LocateProtocol(&gop_guid, NULL, - (void **)&gop); - gfx_state.tg_private = gop; - } else { - gop = gfx_state.tg_private; - } + /* + * Despite the use_gfx_mode, we want to make sure we call + * efi_find_framebuffer(). This will populate the fb data, + * which will be passed to kernel. + */ + if (efi_find_framebuffer(&gfx_state) == 0 && use_gfx_mode) { + int roff, goff, boff; + roff = ffs(gfx_state.tg_fb.fb_mask_red) - 1; + goff = ffs(gfx_state.tg_fb.fb_mask_green) - 1; + boff = ffs(gfx_state.tg_fb.fb_mask_blue) - 1; + + (void) generate_cons_palette(cmap, COLOR_FORMAT_RGB, + gfx_state.tg_fb.fb_mask_red >> roff, roff, + gfx_state.tg_fb.fb_mask_green >> goff, goff, + gfx_state.tg_fb.fb_mask_blue >> boff, boff); + } else { /* - * We have FB but no GOP - it must be UGA. + * Either text mode was asked by user or we failed to + * find frame buffer. */ - if (gop == NULL) - gfx_state.tg_fb_type = FB_UGA; - - if (efi_find_framebuffer(&efifb) == 0) { - int roff, goff, boff; - - gfx_state.tg_fb.fb_addr = efifb.fb_addr; - gfx_state.tg_fb.fb_size = efifb.fb_size; - gfx_state.tg_fb.fb_height = efifb.fb_height; - gfx_state.tg_fb.fb_width = efifb.fb_width; - gfx_state.tg_fb.fb_stride = efifb.fb_stride; - gfx_state.tg_fb.fb_mask_red = efifb.fb_mask_red; - gfx_state.tg_fb.fb_mask_green = efifb.fb_mask_green; - gfx_state.tg_fb.fb_mask_blue = efifb.fb_mask_blue; - gfx_state.tg_fb.fb_mask_reserved = - efifb.fb_mask_reserved; - roff = ffs(efifb.fb_mask_red) - 1; - goff = ffs(efifb.fb_mask_green) - 1; - boff = ffs(efifb.fb_mask_blue) - 1; - - (void) generate_cons_palette(cmap, COLOR_FORMAT_RGB, - efifb.fb_mask_red >> roff, roff, - efifb.fb_mask_green >> goff, goff, - efifb.fb_mask_blue >> boff, boff); - gfx_state.tg_fb.fb_bpp = fls( - efifb.fb_mask_red | efifb.fb_mask_green | - efifb.fb_mask_blue | efifb.fb_mask_reserved); - } - } else { gfx_state.tg_fb_type = FB_TEXT; } diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index 3cf2df933cc3..f7032c78926d 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -35,6 +35,10 @@ CFLAGS+= -DEFI_ZFS_BOOT HAVE_ZFS= yes .endif +CFLAGS.bootinfo.c += -I$(SRCTOP)/sys/teken +CFLAGS.bootinfo.c += -I${SRCTOP}/contrib/pnglite +CFLAGS.framebuffer.c += -I$(SRCTOP)/sys/teken +CFLAGS.framebuffer.c += -I${SRCTOP}/contrib/pnglite CFLAGS.gfx_fb.c += -I$(SRCTOP)/sys/teken CFLAGS.gfx_fb.c += -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 CFLAGS.gfx_fb.c += -I${SRCTOP}/contrib/pnglite diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 108f46c5f9c4..a11c45d05a0f 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#include "framebuffer.h" +#include "gfx_fb.h" #if defined(LOADER_FDT_SUPPORT) #include @@ -300,19 +300,26 @@ bi_load_efi_data(struct preloaded_file *kfp) #if defined(__amd64__) || defined(__aarch64__) struct efi_fb efifb; - if (efi_find_framebuffer(&efifb) == 0) { - printf("EFI framebuffer information:\n"); - printf("addr, size 0x%jx, 0x%jx\n", efifb.fb_addr, - efifb.fb_size); - printf("dimensions %d x %d\n", efifb.fb_width, - efifb.fb_height); - printf("stride %d\n", efifb.fb_stride); - printf("masks 0x%08x, 0x%08x, 0x%08x, 0x%08x\n", - efifb.fb_mask_red, efifb.fb_mask_green, efifb.fb_mask_blue, - efifb.fb_mask_reserved); - + efifb.fb_addr = gfx_state.tg_fb.fb_addr; + efifb.fb_size = gfx_state.tg_fb.fb_size; + efifb.fb_height = gfx_state.tg_fb.fb_height; + efifb.fb_width = gfx_state.tg_fb.fb_width; + efifb.fb_stride = gfx_state.tg_fb.fb_stride; + efifb.fb_mask_red = gfx_state.tg_fb.fb_mask_red; + efifb.fb_mask_green = gfx_state.tg_fb.fb_mask_green; + efifb.fb_mask_blue = gfx_state.tg_fb.fb_mask_blue; + efifb.fb_mask_reserved = gfx_state.tg_fb.fb_mask_reserved; + + printf("EFI framebuffer information:\n"); + printf("addr, size 0x%jx, 0x%jx\n", efifb.fb_addr, efifb.fb_size); + printf("dimensions %d x %d\n", efifb.fb_width, efifb.fb_height); + printf("stride %d\n", efifb.fb_stride); + printf("masks 0x%08x, 0x%08x, 0x%08x, 0x%08x\n", + efifb.fb_mask_red, efifb.fb_mask_green, efifb.fb_mask_blue, + efifb.fb_mask_reserved); + + if (efifb.fb_addr != 0) file_addmetadata(kfp, MODINFOMD_EFI_FB, sizeof(efifb), &efifb); - } #endif do_vmap = true; diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index db7bcb49f2f4..a2bd054e16dc 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -464,21 +464,57 @@ efifb_from_uga(struct efi_fb *efifb, EFI_UGA_DRAW_PROTOCOL *uga) } int -efi_find_framebuffer(struct efi_fb *efifb) +efi_find_framebuffer(teken_gfx_t *gfx_state) { + struct efi_fb efifb; EFI_GRAPHICS_OUTPUT *gop; EFI_UGA_DRAW_PROTOCOL *uga; EFI_STATUS status; + int rv; + + gfx_state->tg_fb_type = FB_TEXT; status = BS->LocateProtocol(&gop_guid, NULL, (VOID **)&gop); - if (status == EFI_SUCCESS) - return (efifb_from_gop(efifb, gop->Mode, gop->Mode->Info)); + if (status == EFI_SUCCESS) { + gfx_state->tg_fb_type = FB_GOP; + gfx_state->tg_private = gop; + } else { + status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); + if (status == EFI_SUCCESS) { + gfx_state->tg_fb_type = FB_UGA; + gfx_state->tg_private = uga; + } else { + return (1); + } + } - status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); - if (status == EFI_SUCCESS) - return (efifb_from_uga(efifb, uga)); + switch (gfx_state->tg_fb_type) { + case FB_GOP: + rv = efifb_from_gop(&efifb, gop->Mode, gop->Mode->Info); + break; - return (1); + case FB_UGA: + rv = efifb_from_uga(&efifb, uga); + break; + + default: + return (1); + } + + gfx_state->tg_fb.fb_addr = efifb.fb_addr; + gfx_state->tg_fb.fb_size = efifb.fb_size; + gfx_state->tg_fb.fb_height = efifb.fb_height; + gfx_state->tg_fb.fb_width = efifb.fb_width; + gfx_state->tg_fb.fb_stride = efifb.fb_stride; + gfx_state->tg_fb.fb_mask_red = efifb.fb_mask_red; + gfx_state->tg_fb.fb_mask_green = efifb.fb_mask_green; + gfx_state->tg_fb.fb_mask_blue = efifb.fb_mask_blue; + gfx_state->tg_fb.fb_mask_reserved = efifb.fb_mask_reserved; + + gfx_state->tg_fb.fb_bpp = fls(efifb.fb_mask_red | efifb.fb_mask_green | + efifb.fb_mask_blue | efifb.fb_mask_reserved); + + return (0); } static void diff --git a/stand/efi/loader/framebuffer.h b/stand/efi/loader/framebuffer.h index 2ec9017dc3ee..008df7f6c167 100644 --- a/stand/efi/loader/framebuffer.h +++ b/stand/efi/loader/framebuffer.h @@ -28,9 +28,11 @@ * $FreeBSD$ */ +#include + #ifndef _EFIFB_H_ #define _EFIFB_H_ -int efi_find_framebuffer(struct efi_fb *efifb); +int efi_find_framebuffer(teken_gfx_t *gfx_state); #endif /* _EFIFB_H_ */ From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:11:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B37054D3184; Tue, 12 Jan 2021 11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFSYh4lm7z4nW6; Tue, 12 Jan 2021 11: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 964512BD32; Tue, 12 Jan 2021 11: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 10CBB4kt055781; Tue, 12 Jan 2021 11:11:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CBB4Qf055780; Tue, 12 Jan 2021 11:11:04 GMT (envelope-from git) Date: Tue, 12 Jan 2021 11:11:04 GMT Message-Id: <202101121111.10CBB4Qf055780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 8b1839548750 - main - loader.efi: disable workaround for serial console on non-x86 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b18395487506d3602205e5844e0b67ba0c0dc80 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:11:04 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=8b18395487506d3602205e5844e0b67ba0c0dc80 commit 8b18395487506d3602205e5844e0b67ba0c0dc80 Author: Toomas Soome AuthorDate: 2021-01-11 20:07:06 +0000 Commit: Toomas Soome CommitDate: 2021-01-12 11:09:11 +0000 loader.efi: disable workaround for serial console on non-x86 As efi console is drawn and with functional comconsole driver, we can use proper terminal emulator on efi framebuffer console. --- stand/efi/libefi/efi_console.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 533f4458c15b..1ed2be15d3d6 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -929,7 +929,11 @@ cons_update_mode(bool use_gfx_mode) * also just use the old emulator. RB_MULTIPLE also implies * we're using a serial console. */ +#if defined(__i386__) || defined(__amd64__) mode = parse_uefi_con_out(); +#else + mode = 0; +#endif if ((mode & (RB_SERIAL | RB_MULTIPLE)) == 0) { conout->EnableCursor(conout, FALSE); gfx_state.tg_cursor_visible = false; From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:16:38 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA1F54D36E7; Tue, 12 Jan 2021 11:16:38 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFSh65BZdz4pF6; Tue, 12 Jan 2021 11:16:38 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ej1-f44.google.com with SMTP id b9so2995496ejy.0; Tue, 12 Jan 2021 03:16:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LrL61kvAVHBFwauF7cpIPhMVKd6X34++FcT2HSQUIr4=; b=XHAXR6Arn8+4UuLTzOBgFX4Oq8JjgYjCaqdBLGMrDjIKy5U2sMIwE+CbDgHWcWrlso RoyU/SkebcdGY3ua+y7QuEm9eUMn+F8McjkfsX0h1ejWbyz9bLfH7hgGb49hhmVZQEJE FCLetslVSqTkDGrqbEo535M6fnmf8LQRSdh61FTUM7zvS9oCR08QB/61+quV7Nyw5h3q pEjBG3okroFBC6yhpta17kJuQiUUdAHjklVYOJz0k3O/FA2x+cJev5mR713GRpkESuYB asv0Nm67GSE/niQeP3imcgG6+n884E+pTd5ZVUf5DfGoWL1/O8TnEMaYTHWQ2iimSNBa NiVA== X-Gm-Message-State: AOAM532UGE5DMBTcWIxeYprLiT7KomXZDjhxemKGlCZzDc/E891E3CzC yoKcf4T/57RvoeZEGInjLJNyIy3aSSMXzg== X-Google-Smtp-Source: ABdhPJx9zGhpbN34Ct4dJ7Eh/lerihV/gVk52Ji/8MvVgtRkld6O5RroqubXjy9UU5yE4GjnmWh1hA== X-Received: by 2002:a17:906:ca08:: with SMTP id jt8mr2693057ejb.368.1610450197213; Tue, 12 Jan 2021 03:16:37 -0800 (PST) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com. [209.85.221.50]) by smtp.gmail.com with ESMTPSA id a23sm1074046ejg.7.2021.01.12.03.16.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jan 2021 03:16:37 -0800 (PST) Received: by mail-wr1-f50.google.com with SMTP id y17so2048239wrr.10; Tue, 12 Jan 2021 03:16:36 -0800 (PST) X-Received: by 2002:a5d:6ccb:: with SMTP id c11mr3771110wrc.224.1610450196641; Tue, 12 Jan 2021 03:16:36 -0800 (PST) MIME-Version: 1.0 References: <202101121046.10CAkLxI018198@gitrepo.freebsd.org> In-Reply-To: <202101121046.10CAkLxI018198@gitrepo.freebsd.org> From: Alexander Richardson Date: Tue, 12 Jan 2021 11:16:25 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 85d028223bc2 - main - libthr malloc: support recursion on thr_malloc_umtx. To: Konstantin Belousov Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DFSh65BZdz4pF6 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-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:16:38 -0000 On Tue, 12 Jan 2021 at 10:46, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=85d028223bc2768651f4d44881644ceb5dc2a664 > > commit 85d028223bc2768651f4d44881644ceb5dc2a664 > Author: Konstantin Belousov > AuthorDate: 2021-01-12 09:02:37 +0000 > Commit: Konstantin Belousov > CommitDate: 2021-01-12 10:45:44 +0000 > > libthr malloc: support recursion on thr_malloc_umtx. > > One possible way the recursion can happen is during fork: suppose > that fork is called from early code that did not triggered > jemalloc(3) initialization yet. Then we lock thr_malloc lock, and > call malloc_prefork() that might require initialization of jemalloc > pthread_mutexes, calling into libthr malloc. It is safe to allow > recursion for this occurence. > > PR: 252579 > Reported by: Vasily Postnicov > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > --- > lib/libthr/thread/thr_malloc.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c > index 2f1c81142942..80a81f9c6c27 100644 > --- a/lib/libthr/thread/thr_malloc.c > +++ b/lib/libthr/thread/thr_malloc.c > @@ -41,6 +41,7 @@ int npagesizes; > size_t *pagesizes; > static size_t pagesizes_d[2]; > static struct umutex thr_malloc_umtx; > +static u_int thr_malloc_umtx_level; > > void > __thr_malloc_init(void) > @@ -60,11 +61,16 @@ __thr_malloc_init(void) > static void > thr_malloc_lock(struct pthread *curthread) > { > + uint32_t curtid; > > if (curthread == NULL) > return; > curthread->locklevel++; > - _thr_umutex_lock(&thr_malloc_umtx, TID(curthread)); > + curtid = TID(curthread); > + if ((uint32_t)thr_malloc_umtx.m_owner == curtid) > + thr_malloc_umtx_level++; > + else > + _thr_umutex_lock(&thr_malloc_umtx, curtid); > } > > static void > @@ -73,7 +79,10 @@ thr_malloc_unlock(struct pthread *curthread) > > if (curthread == NULL) > return; > - _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); > + if (thr_malloc_umtx_level > 0) > + thr_malloc_umtx_level--; Should this also assert that "thr_malloc_umtx.m_owner == curtid"? Thanks, Alex > + else > + _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); > curthread->locklevel--; > _thr_ast(curthread); > } From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:38:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 087784D43C6; Tue, 12 Jan 2021 11:38:47 +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 4DFT9f5WFsz4qWp; Tue, 12 Jan 2021 11:38:46 +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 10CBcbXr004114 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 12 Jan 2021 13:38:41 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 10CBcbXr004114 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 10CBcbRX004113; Tue, 12 Jan 2021 13:38:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 12 Jan 2021 13:38:36 +0200 From: Konstantin Belousov To: Alexander Richardson Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 85d028223bc2 - main - libthr malloc: support recursion on thr_malloc_umtx. Message-ID: References: <202101121046.10CAkLxI018198@gitrepo.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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DFT9f5WFsz4qWp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:38:47 -0000 On Tue, Jan 12, 2021 at 11:16:25AM +0000, Alexander Richardson wrote: > On Tue, 12 Jan 2021 at 10:46, Konstantin Belousov wrote: > > > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=85d028223bc2768651f4d44881644ceb5dc2a664 > > > > commit 85d028223bc2768651f4d44881644ceb5dc2a664 > > Author: Konstantin Belousov > > AuthorDate: 2021-01-12 09:02:37 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2021-01-12 10:45:44 +0000 > > > > libthr malloc: support recursion on thr_malloc_umtx. > > > > One possible way the recursion can happen is during fork: suppose > > that fork is called from early code that did not triggered > > jemalloc(3) initialization yet. Then we lock thr_malloc lock, and > > call malloc_prefork() that might require initialization of jemalloc > > pthread_mutexes, calling into libthr malloc. It is safe to allow > > recursion for this occurence. > > > > PR: 252579 > > Reported by: Vasily Postnicov > > MFC after: 1 week > > Sponsored by: The FreeBSD Foundation > > --- > > lib/libthr/thread/thr_malloc.c | 13 +++++++++++-- > > 1 file changed, 11 insertions(+), 2 deletions(-) > > > > diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c > > index 2f1c81142942..80a81f9c6c27 100644 > > --- a/lib/libthr/thread/thr_malloc.c > > +++ b/lib/libthr/thread/thr_malloc.c > > @@ -41,6 +41,7 @@ int npagesizes; > > size_t *pagesizes; > > static size_t pagesizes_d[2]; > > static struct umutex thr_malloc_umtx; > > +static u_int thr_malloc_umtx_level; > > > > void > > __thr_malloc_init(void) > > @@ -60,11 +61,16 @@ __thr_malloc_init(void) > > static void > > thr_malloc_lock(struct pthread *curthread) > > { > > + uint32_t curtid; > > > > if (curthread == NULL) > > return; > > curthread->locklevel++; > > - _thr_umutex_lock(&thr_malloc_umtx, TID(curthread)); > > + curtid = TID(curthread); > > + if ((uint32_t)thr_malloc_umtx.m_owner == curtid) > > + thr_malloc_umtx_level++; > > + else > > + _thr_umutex_lock(&thr_malloc_umtx, curtid); > > } > > > > static void > > @@ -73,7 +79,10 @@ thr_malloc_unlock(struct pthread *curthread) > > > > if (curthread == NULL) > > return; > > - _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); > > + if (thr_malloc_umtx_level > 0) > > + thr_malloc_umtx_level--; > > Should this also assert that "thr_malloc_umtx.m_owner == curtid"? I think a generic principle for userspace libraries is to not abort the application. Ideally we would return some error indicating memory corruption, but libthr is not set up for this. There are some asserts in libthr that are currently always compiled in. I wanted to make libthr in stable branches to avoid any assertions, but did not handled that. From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:42:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 667654D45BB; Tue, 12 Jan 2021 11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFTGT2FrMz4qvm; Tue, 12 Jan 2021 11: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 403CB2C0E1; Tue, 12 Jan 2021 11: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 10CBgv2n095911; Tue, 12 Jan 2021 11: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 10CBgvmI095910; Tue, 12 Jan 2021 11:42:57 GMT (envelope-from git) Date: Tue, 12 Jan 2021 11:42:57 GMT Message-Id: <202101121142.10CBgvmI095910@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: 8517a547a052 - main - pci: Add pci_find_class_from 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: 8517a547a05209c7da2c895e2d7c296ec54dd068 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:42:57 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8517a547a05209c7da2c895e2d7c296ec54dd068 commit 8517a547a05209c7da2c895e2d7c296ec54dd068 Author: Emmanuel Vadot AuthorDate: 2020-12-10 17:38:41 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-12 11:25:28 +0000 pci: Add pci_find_class_from pci_find_class_from help finding one or multiple device matching a class and subclass. If the from argument is not null we will first loop in the device list until we find the matching device and only then start to check if the class/subclass matches. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D27549 --- sys/dev/pci/pci.c | 22 ++++++++++++++++++++++ sys/dev/pci/pcivar.h | 1 + 2 files changed, 23 insertions(+) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 342e55681fb3..1ca128a48ad0 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -493,6 +493,28 @@ pci_find_class(uint8_t class, uint8_t subclass) return (NULL); } +device_t +pci_find_class_from(uint8_t class, uint8_t subclass, device_t from) +{ + struct pci_devinfo *dinfo; + bool found = false; + + STAILQ_FOREACH(dinfo, &pci_devq, pci_links) { + if (from != NULL && found == false) { + if (from != dinfo->cfg.dev) + continue; + found = true; + continue; + } + if (dinfo->cfg.baseclass == class && + dinfo->cfg.subclass == subclass) { + return (dinfo->cfg.dev); + } + } + + return (NULL); +} + static int pci_printf(pcicfgregs *cfg, const char *fmt, ...) { diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 29de6dad93f0..0f04ca8f623c 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -666,6 +666,7 @@ device_t pci_find_bsf(uint8_t, uint8_t, uint8_t); device_t pci_find_dbsf(uint32_t, uint8_t, uint8_t, uint8_t); device_t pci_find_device(uint16_t, uint16_t); device_t pci_find_class(uint8_t class, uint8_t subclass); +device_t pci_find_class_from(uint8_t class, uint8_t subclass, device_t devfrom); /* Can be used by drivers to manage the MSI-X table. */ int pci_pending_msix(device_t dev, u_int index); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:42:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CE924D4268; Tue, 12 Jan 2021 11:42: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFTGV3YQdz4qy6; Tue, 12 Jan 2021 11:42: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 6D4C72C514; Tue, 12 Jan 2021 11:42: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 10CBgw3i095931; Tue, 12 Jan 2021 11:42:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CBgwhi095930; Tue, 12 Jan 2021 11:42:58 GMT (envelope-from git) Date: Tue, 12 Jan 2021 11:42:58 GMT Message-Id: <202101121142.10CBgwhi095930@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: 105a37cac76b - main - linuxkpi: Add more pci functions needed by DRM 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: 105a37cac76b971f7a94409fbdc4f508a7e97fa0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:42:58 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=105a37cac76b971f7a94409fbdc4f508a7e97fa0 commit 105a37cac76b971f7a94409fbdc4f508a7e97fa0 Author: Emmanuel Vadot AuthorDate: 2020-12-10 16:47:11 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-12 11:31:00 +0000 linuxkpi: Add more pci functions needed by DRM -pci_get_class : This function search for a matching pci device based on the class/subclass and returns a newly created pci_dev. - pci_{save,restore}_state : This is analogous to ours with the same name - pci_is_root_bus : Return true if this is the root bus - pci_get_domain_bus_and_slot : This function search for a matching pci device based on domain, bus and slot/function concat into a single unsigned int (devfn) and returns a newly created pci_dev - pci_bus_{read,write}_config* : Read/Write to the config space. While here add some helper function to alloc and fill the pci_dev struct. Reviewed by: hselasky, bz (older version) Differential Revision: https://reviews.freebsd.org/D27550 --- sys/compat/linuxkpi/common/include/linux/pci.h | 96 ++++++++++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_pci.c | 75 +++++++++++++++++--- sys/dev/mlx4/mlx4_core/mlx4_main.c | 2 +- sys/dev/mlx5/mlx5_core/mlx5_main.c | 6 +- 4 files changed, 166 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 643bc7cc2630..6338f5795f0a 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -460,6 +460,9 @@ linux_pci_disable_msi(struct pci_dev *pdev) pdev->msi_enabled = false; } +#define pci_free_irq_vectors(pdev) \ + linux_pci_disable_msi(pdev) + unsigned long pci_resource_start(struct pci_dev *pdev, int bar); unsigned long pci_resource_len(struct pci_dev *pdev, int bar); @@ -702,6 +705,23 @@ pci_iounmap(struct pci_dev *dev, void *res) } } +static inline void +lkpi_pci_save_state(struct pci_dev *pdev) +{ + + pci_save_state(pdev->dev.bsddev); +} + +static inline void +lkpi_pci_restore_state(struct pci_dev *pdev) +{ + + pci_restore_state(pdev->dev.bsddev); +} + +#define pci_save_state(dev) lkpi_pci_save_state(dev) +#define pci_restore_state(dev) lkpi_pci_restore_state(dev) + #define DEFINE_PCI_DEVICE_TABLE(_table) \ const struct pci_device_id _table[] __devinitdata @@ -1058,4 +1078,80 @@ pci_dev_present(const struct pci_device_id *cur) return (0); } +static inline bool +pci_is_root_bus(struct pci_bus *pbus) +{ + + return (pbus->self == NULL); +} + +struct pci_dev *lkpi_pci_get_domain_bus_and_slot(int domain, + unsigned int bus, unsigned int devfn); +#define pci_get_domain_bus_and_slot(domain, bus, devfn) \ + lkpi_pci_get_domain_bus_and_slot(domain, bus, devfn) + +static inline int +pci_domain_nr(struct pci_bus *pbus) +{ + + return (pci_get_domain(pbus->self->dev.bsddev)); +} + +static inline int +pci_bus_read_config(struct pci_bus *bus, unsigned int devfn, + int pos, uint32_t *val, int len) +{ + + *val = pci_read_config(bus->self->dev.bsddev, pos, len); + return (0); +} + +static inline int +pci_bus_read_config_word(struct pci_bus *bus, unsigned int devfn, int pos, u16 *val) +{ + uint32_t tmp; + int ret; + + ret = pci_bus_read_config(bus, devfn, pos, &tmp, 2); + *val = (u16)tmp; + return (ret); +} + +static inline int +pci_bus_read_config_byte(struct pci_bus *bus, unsigned int devfn, int pos, u8 *val) +{ + uint32_t tmp; + int ret; + + ret = pci_bus_read_config(bus, devfn, pos, &tmp, 1); + *val = (u8)tmp; + return (ret); +} + +static inline int +pci_bus_write_config(struct pci_bus *bus, unsigned int devfn, int pos, + uint32_t val, int size) +{ + + pci_write_config(bus->self->dev.bsddev, pos, val, size); + return (0); +} + +static inline int +pci_bus_write_config_byte(struct pci_bus *bus, unsigned int devfn, int pos, + uint8_t val) +{ + return (pci_bus_write_config(bus, devfn, pos, val, 1)); +} + +static inline int +pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn, int pos, + uint16_t val) +{ + return (pci_bus_write_config(bus, devfn, pos, val, 2)); +} + +struct pci_dev *lkpi_pci_get_class(unsigned int class, struct pci_dev *from); +#define pci_get_class(class, from) lkpi_pci_get_class(class, from) + #endif /* _LINUX_PCI_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index be61c2dba3d2..0e184b64884b 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -70,6 +70,9 @@ __FBSDID("$FreeBSD$"); #include "backlight_if.h" #include "pcib_if.h" +/* Undef the linux function macro defined in linux/pci.h */ +#undef pci_get_class + static device_probe_t linux_pci_probe; static device_attach_t linux_pci_attach; static device_detach_t linux_pci_detach; @@ -210,6 +213,67 @@ linux_pci_find(device_t dev, const struct pci_device_id **idp) return (NULL); } +static void +lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) +{ + + pdev->devfn = PCI_DEVFN(pci_get_slot(dev), pci_get_function(dev)); + pdev->vendor = pci_get_vendor(dev); + pdev->device = pci_get_device(dev); + pdev->class = pci_get_class(dev); + pdev->revision = pci_get_revid(dev); + pdev->dev.bsddev = dev; + pdev->bus->self = pdev; + pdev->bus->number = pci_get_bus(dev); + pdev->bus->domain = pci_get_domain(dev); +} + +static struct pci_dev * +lkpinew_pci_dev(device_t dev) +{ + struct pci_dev *pdev; + struct pci_bus *pbus; + + pdev = malloc(sizeof(*pdev), M_DEVBUF, M_WAITOK|M_ZERO); + pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK|M_ZERO); + pdev->bus = pbus; + lkpifill_pci_dev(dev, pdev); + return (pdev); +} + +struct pci_dev * +lkpi_pci_get_class(unsigned int class, struct pci_dev *from) +{ + device_t dev; + device_t devfrom = NULL; + struct pci_dev *pdev; + + if (from != NULL) + devfrom = from->dev.bsddev; + + dev = pci_find_class_from(class >> 16, (class >> 8) & 0xFF, devfrom); + if (dev == NULL) + return (NULL); + + pdev = lkpinew_pci_dev(dev); + return (pdev); +} + +struct pci_dev * +lkpi_pci_get_domain_bus_and_slot(int domain, unsigned int bus, + unsigned int devfn) +{ + device_t dev; + struct pci_dev *pdev; + + dev = pci_find_dbsf(domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); + if (dev == NULL) + return (NULL); + + pdev = lkpinew_pci_dev(dev); + return (pdev); +} + static int linux_pci_probe(device_t dev) { @@ -245,7 +309,6 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, const struct pci_device_id *id, struct pci_dev *pdev) { struct resource_list_entry *rle; - struct pci_bus *pbus; struct pci_devinfo *dinfo; device_t parent; uintptr_t rid; @@ -264,8 +327,9 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, dinfo = device_get_ivars(dev); } + pdev->bus = malloc(sizeof(*pdev->bus), M_DEVBUF, M_WAITOK | M_ZERO); + lkpifill_pci_dev(dev, pdev); pdev->dev.parent = &linux_root_device; - pdev->dev.bsddev = dev; INIT_LIST_HEAD(&pdev->dev.irqents); if (isdrm) PCI_GET_ID(device_get_parent(parent), parent, PCI_ID_RID, &rid); @@ -276,8 +340,6 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, pdev->vendor = dinfo->cfg.vendor; pdev->subsystem_vendor = dinfo->cfg.subvendor; pdev->subsystem_device = dinfo->cfg.subdevice; - pdev->class = pci_get_class(dev); - pdev->revision = pci_get_revid(dev); pdev->pdrv = pdrv; kobject_init(&pdev->dev.kobj, &linux_dev_ktype); kobject_set_name(&pdev->dev.kobj, device_get_nameunit(dev)); @@ -294,11 +356,6 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, goto out_dma_init; TAILQ_INIT(&pdev->mmio); - pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK | M_ZERO); - pbus->self = pdev; - pbus->number = pci_get_bus(dev); - pbus->domain = pci_get_domain(dev); - pdev->bus = pbus; spin_lock(&pci_lock); list_add(&pdev->links, &pci_devices); diff --git a/sys/dev/mlx4/mlx4_core/mlx4_main.c b/sys/dev/mlx4/mlx4_core/mlx4_main.c index ee17418388eb..48cc2fc7d3f6 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_main.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_main.c @@ -3781,7 +3781,7 @@ static int mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) return ret; } else { device_set_desc(pdev->dev.bsddev, mlx4_description); - pci_save_state(pdev->dev.bsddev); + pci_save_state(pdev); } snprintf(dev->fw_str, sizeof(dev->fw_str), "%d.%d.%d", diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 27326d692261..37a55f65683c 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -1634,7 +1634,7 @@ static int init_one(struct pci_dev *pdev, } #endif - pci_save_state(bsddev); + pci_save_state(pdev); return 0; clean_health: @@ -1709,8 +1709,8 @@ static pci_ers_result_t mlx5_pci_slot_reset(struct pci_dev *pdev) } pci_set_master(pdev); pci_set_powerstate(pdev->dev.bsddev, PCI_POWERSTATE_D0); - pci_restore_state(pdev->dev.bsddev); - pci_save_state(pdev->dev.bsddev); + pci_restore_state(pdev); + pci_save_state(pdev); return err ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED; } From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:43:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 745614D4482; Tue, 12 Jan 2021 11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFTGW4Xvkz4qvs; Tue, 12 Jan 2021 11:42: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 8C9252C495; Tue, 12 Jan 2021 11:42: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 10CBgxJm095953; Tue, 12 Jan 2021 11:42:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CBgxs1095952; Tue, 12 Jan 2021 11:42:59 GMT (envelope-from git) Date: Tue, 12 Jan 2021 11:42:59 GMT Message-Id: <202101121142.10CBgxs1095952@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: 2c95fb753fb2 - main - linuxkpi: Add shrinker support 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: 2c95fb753fb20e82c16356537204d8583e125be0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:43:02 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2c95fb753fb20e82c16356537204d8583e125be0 commit 2c95fb753fb20e82c16356537204d8583e125be0 Author: Emmanuel Vadot AuthorDate: 2020-12-22 18:15:01 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-12 11:31:00 +0000 linuxkpi: Add shrinker support A driver can register a shrinker that will be called when the kernel wants to free some memory. Add support for that in linuxkpi and call the registered shrinkers when the lowmem event is triggered. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D27728 --- .../linuxkpi/common/include/linux/shrinker.h | 56 +++++++++ sys/compat/linuxkpi/common/src/linux_shrinker.c | 125 +++++++++++++++++++++ sys/conf/files | 2 + sys/modules/linuxkpi/Makefile | 1 + 4 files changed, 184 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/shrinker.h b/sys/compat/linuxkpi/common/include/linux/shrinker.h new file mode 100644 index 000000000000..d18bb60645f8 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/shrinker.h @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2020 Emmanuel Vadot + * + * 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 __LINUX_SHRINKER_H__ +#define __LINUX_SHRINKER_H__ + +#include + +struct shrink_control { + unsigned long nr_to_scan; + unsigned long nr_scanned; +}; + +struct shrinker { + unsigned long (*count_objects)(struct shrinker *, struct shrink_control *); + unsigned long (*scan_objects)(struct shrinker *, struct shrink_control *); + int seeks; + long batch; + TAILQ_ENTRY(shrinker) next; +}; + +#define SHRINK_STOP (~0UL) + +#define DEFAULT_SEEKS 2 + +int linuxkpi_register_shrinker(struct shrinker *s); +void linuxkpi_unregister_shrinker(struct shrinker *s); + +#define register_shrinker(s) linuxkpi_register_shrinker(s) +#define unregister_shrinker(s) linuxkpi_unregister_shrinker(s) + +#endif /* __LINUX_SHRINKER_H__ */ diff --git a/sys/compat/linuxkpi/common/src/linux_shrinker.c b/sys/compat/linuxkpi/common/src/linux_shrinker.c new file mode 100644 index 000000000000..adc22cc23510 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_shrinker.c @@ -0,0 +1,125 @@ +/*- + * Copyright (c) 2020 Emmanuel Vadot + * + * 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +TAILQ_HEAD(, shrinker) lkpi_shrinkers = TAILQ_HEAD_INITIALIZER(lkpi_shrinkers); +static struct mtx mtx_shrinker; + +int +linuxkpi_register_shrinker(struct shrinker *s) +{ + + KASSERT(s != NULL, ("NULL shrinker")); + KASSERT(s->count_objects != NULL, ("NULL shrinker")); + KASSERT(s->scan_objects != NULL, ("NULL shrinker")); + mtx_lock(&mtx_shrinker); + TAILQ_INSERT_TAIL(&lkpi_shrinkers, s, next); + mtx_unlock(&mtx_shrinker); + return (0); +} + +void +linuxkpi_unregister_shrinker(struct shrinker *s) +{ + + mtx_lock(&mtx_shrinker); + TAILQ_REMOVE(&lkpi_shrinkers, s, next); + mtx_unlock(&mtx_shrinker); +} + +#define SHRINKER_BATCH 512 + +static void +shrinker_shrink(struct shrinker *s) +{ + struct shrink_control sc; + unsigned long can_free; + unsigned long batch; + unsigned long freeed = 0; + unsigned long ret; + + can_free = s->count_objects(s, &sc); + if (can_free <= 0) + return; + + batch = s->batch ? s->batch : SHRINKER_BATCH; + while (freeed <= can_free) { + sc.nr_to_scan = batch; + ret = s->scan_objects(s, &sc); + if (ret == SHRINK_STOP) + break; + freeed += ret; + } +} + +static void +linuxkpi_vm_lowmem(void *arg __unused) +{ + struct shrinker *s; + + mtx_lock(&mtx_shrinker); + TAILQ_FOREACH(s, &lkpi_shrinkers, next) { + shrinker_shrink(s); + } + mtx_unlock(&mtx_shrinker); +} + +static eventhandler_tag lowmem_tag; + +static void +linuxkpi_sysinit_shrinker(void *arg __unused) +{ + + mtx_init(&mtx_shrinker, "lkpi-shrinker", NULL, MTX_DEF); + lowmem_tag = EVENTHANDLER_REGISTER(vm_lowmem, linuxkpi_vm_lowmem, + NULL, EVENTHANDLER_PRI_FIRST); +} + +static void +linuxkpi_sysuninit_shrinker(void *arg __unused) +{ + + mtx_destroy(&mtx_shrinker); + EVENTHANDLER_DEREGISTER(vm_lowmem, lowmem_tag); +} + +SYSINIT(linuxkpi_shrinker, SI_SUB_DRIVERS, SI_ORDER_ANY, + linuxkpi_sysinit_shrinker, NULL); +SYSUNINIT(linuxkpi_shrinker, SI_SUB_DRIVERS, SI_ORDER_ANY, + linuxkpi_sysuninit_shrinker, NULL); diff --git a/sys/conf/files b/sys/conf/files index 860fae3c8273..1765e217fcf6 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4576,6 +4576,8 @@ compat/linuxkpi/common/src/linux_schedule.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_shmemfs.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_shrinker.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_slab.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_usb.c optional compat_linuxkpi usb \ diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index 8aff57835411..c043a4e40dc6 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -17,6 +17,7 @@ SRCS= linux_compat.c \ linux_seq_file.c \ linux_schedule.c \ linux_shmemfs.c \ + linux_shrinker.c \ linux_slab.c \ linux_tasklet.c \ linux_usb.c \ From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:43:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 139CD4D4270; Tue, 12 Jan 2021 11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFTGY5NtSz4qyR; Tue, 12 Jan 2021 11: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 F33782C707; Tue, 12 Jan 2021 11: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 10CBh0UI095973; Tue, 12 Jan 2021 11: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 10CBh02x095972; Tue, 12 Jan 2021 11:43:00 GMT (envelope-from git) Date: Tue, 12 Jan 2021 11:43:00 GMT Message-Id: <202101121143.10CBh02x095972@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: 11d62b6f31ab - main - linuxkpi: add kernel_fpu_begin/kernel_fpu_end 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: 11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:43:03 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 commit 11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 Author: Emmanuel Vadot AuthorDate: 2021-01-12 11:02:38 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-12 11:31:00 +0000 linuxkpi: add kernel_fpu_begin/kernel_fpu_end With newer AMD GPUs (>=Navi,Renoir) there is FPU context usage in the amdgpu driver. The `kernel_fpu_begin/end` implementations in drm did not even allow nested begin-end blocks. Submitted by: Greg V Reviewed By: manu, hselasky Differential Revision: https://reviews.freebsd.org/D28061 --- sys/compat/linuxkpi/common/include/asm/fpu/api.h | 68 ++++++++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_fpu.c | 50 +++++++++++++++++ sys/conf/files.amd64 | 3 ++ sys/conf/files.arm64 | 3 ++ sys/conf/files.i386 | 3 ++ sys/modules/linuxkpi/Makefile | 2 +- 6 files changed, 128 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/asm/fpu/api.h b/sys/compat/linuxkpi/common/include/asm/fpu/api.h new file mode 100644 index 000000000000..035ec3620fdd --- /dev/null +++ b/sys/compat/linuxkpi/common/include/asm/fpu/api.h @@ -0,0 +1,68 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Greg V + * + * 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 AUTHORS 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 AUTHORS 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 _FPU_API_H_ +#define _FPU_API_H_ + +#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) + +#include + +extern struct fpu_kern_ctx *__lkpi_fpu_ctx; +extern unsigned int __lkpi_fpu_ctx_level; + +static inline void +kernel_fpu_begin() +{ + if (__lkpi_fpu_ctx_level++ == 0) { + fpu_kern_enter(curthread, __lkpi_fpu_ctx, FPU_KERN_NORMAL); + } +} + +static inline void +kernel_fpu_end() +{ + if (--__lkpi_fpu_ctx_level == 0) { + fpu_kern_leave(curthread, __lkpi_fpu_ctx); + } +} + +#else + +static inline void +kernel_fpu_begin() +{ +} + +static inline void +kernel_fpu_end() +{ +} + +#endif + +#endif /* _FPU_API_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_fpu.c b/sys/compat/linuxkpi/common/src/linux_fpu.c new file mode 100644 index 000000000000..976e55e68ca1 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_fpu.c @@ -0,0 +1,50 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Greg V + * + * 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 AUTHORS 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 AUTHORS 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 + +struct fpu_kern_ctx *__lkpi_fpu_ctx; +unsigned int __lkpi_fpu_ctx_level = 0; + +static void +linux_fpu_init(void *arg __unused) +{ + __lkpi_fpu_ctx = fpu_kern_alloc_ctx(0); +} +SYSINIT(linux_fpu, SI_SUB_EVENTHANDLER, SI_ORDER_SECOND, linux_fpu_init, NULL); + +static void +linux_fpu_uninit(void *arg __unused) +{ + fpu_kern_free_ctx(__lkpi_fpu_ctx); +} +SYSUNINIT(linux_fpu, SI_SUB_EVENTHANDLER, SI_ORDER_SECOND, linux_fpu_uninit, NULL); diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 00b8b8c57ee1..a049d9469834 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -462,6 +462,9 @@ x86/xen/pv.c optional xenhvm x86/xen/pvcpu_enum.c optional xenhvm x86/xen/xen_pci_bus.c optional xenhvm +compat/linuxkpi/common/src/linux_fpu.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" + contrib/openzfs/module/zcommon/zfs_fletcher_avx512.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zcommon/zfs_fletcher_intel.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zcommon/zfs_fletcher_sse.c optional zfs compile-with "${ZFS_C}" diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 3cd34c170778..030c02233910 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -494,3 +494,6 @@ tegra210_xusb.fw optional tegra210_xusb_fw \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "tegra210_xusb.fw" + +compat/linuxkpi/common/src/linux_fpu.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 96d2413b532d..b5192e47a738 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -241,3 +241,6 @@ x86/x86/local_apic.c optional apic x86/x86/mptable.c optional apic x86/x86/mptable_pci.c optional apic pci x86/x86/msi.c optional apic pci + +compat/linuxkpi/common/src/linux_fpu.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index c043a4e40dc6..f9ae0e60e339 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -26,7 +26,7 @@ SRCS= linux_compat.c \ .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" -SRCS+= opt_acpi.h acpi_if.h linux_acpi.c +SRCS+= opt_acpi.h acpi_if.h linux_acpi.c linux_fpu.c .endif SRCS+= ${LINUXKPI_GENSRCS} From owner-dev-commits-src-all@freebsd.org Tue Jan 12 11:43:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD4A14D47B8; Tue, 12 Jan 2021 11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFTGZ6341z4r1l; Tue, 12 Jan 2021 11: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 18F162C780; Tue, 12 Jan 2021 11: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 10CBh1lV095993; Tue, 12 Jan 2021 11: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 10CBh12K095992; Tue, 12 Jan 2021 11:43:01 GMT (envelope-from git) Date: Tue, 12 Jan 2021 11:43:01 GMT Message-Id: <202101121143.10CBh12K095992@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: 35a39dc5b349 - main - Bump __FreeBSD_version after linuxkpi changes 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: 35a39dc5b34962081eeda8dbcf0b99a31585499b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:43:04 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=35a39dc5b34962081eeda8dbcf0b99a31585499b commit 35a39dc5b34962081eeda8dbcf0b99a31585499b Author: Emmanuel Vadot AuthorDate: 2021-01-12 11:07:49 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-12 11:31:00 +0000 Bump __FreeBSD_version after linuxkpi changes --- 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 a1747efbf1b4..8e8ed0b9f00d 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 1300134 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300135 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-all@freebsd.org Tue Jan 12 12:48:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B61494D7207; Tue, 12 Jan 2021 12:48: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFVkL4gmGz3Cff; Tue, 12 Jan 2021 12:48: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 93A752CFB7; Tue, 12 Jan 2021 12:48: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 10CCmg6Q075754; Tue, 12 Jan 2021 12:48:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CCmgQi075753; Tue, 12 Jan 2021 12:48:42 GMT (envelope-from git) Date: Tue, 12 Jan 2021 12:48:42 GMT Message-Id: <202101121248.10CCmgQi075753@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: d0df1a2d54dc - main - Only allow a store through sp in the arm64 fbt 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: d0df1a2d54dcba438018f4be1d8bbaeac7e49d92 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 12:48:42 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d0df1a2d54dcba438018f4be1d8bbaeac7e49d92 commit d0df1a2d54dcba438018f4be1d8bbaeac7e49d92 Author: Andrew Turner AuthorDate: 2021-01-12 11:37:06 +0000 Commit: Andrew Turner CommitDate: 2021-01-12 12:42:23 +0000 Only allow a store through sp in the arm64 fbt When searching for an instruction to patch out in the arm64 function boundary trace we search for a store pair with a write back. This instruction is commonly used to store two registers to the stack and update the stack pointer to hold space for more. This works in many cases, however not all functions use this, e.g. when the stack frame is too large. In these cases we may find another instruction of the same type that doesn't store through the stack pointer. Filter these instructions out and assume if we see one we are past the function prologue. Reported by: rwatson Sponsored by: Innovate UK --- sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h | 4 +++- sys/cddl/dev/fbt/aarch64/fbt_isa.c | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index 31c5983270ca..922c1a9bba9b 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2479,11 +2479,13 @@ extern void dtrace_helpers_destroy(proc_t *); #define ARG1_MASK 0x1f #define ARG2_SHIFT 10 #define ARG2_MASK 0x1f +#define ADDR_SHIFT 5 +#define ADDR_MASK 0x1f #define OFFSET_SHIFT 15 #define OFFSET_SIZE 7 #define OFFSET_MASK ((1 << OFFSET_SIZE) - 1) -#define DTRACE_INVOP_PUSHM 1 +#define DTRACE_INVOP_STP 1 #define DTRACE_INVOP_RET 2 #define DTRACE_INVOP_B 3 diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index 3c5070785614..9235af1a4c65 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -87,6 +87,7 @@ fbt_provide_module_function(linker_file_t lf, int symindx, uint32_t *instr, *limit; const char *name; char *modname; + bool found; int offs; modname = opaque; @@ -108,12 +109,21 @@ fbt_provide_module_function(linker_file_t lf, int symindx, limit = (uint32_t *)(symval->value + symval->size); /* Look for stp (pre-indexed) operation */ + found = false; for (; instr < limit; instr++) { - if ((*instr & LDP_STP_MASK) == STP_64) + /* Some functions start with "stp xt1, xt2, [xn, ]!" */ + if ((*instr & LDP_STP_MASK) == STP_64) { + /* + * Assume any other store of this type means we + * are past the function prolog. + */ + if (((*instr >> ADDR_SHIFT) & ADDR_MASK) == 31) + found = true; break; + } } - if (instr >= limit) + if (!found) return (0); fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); @@ -125,7 +135,7 @@ fbt_provide_module_function(linker_file_t lf, int symindx, fbt->fbtp_loadcnt = lf->loadcnt; fbt->fbtp_savedval = *instr; fbt->fbtp_patchval = FBT_PATCHVAL; - fbt->fbtp_rval = DTRACE_INVOP_PUSHM; + fbt->fbtp_rval = DTRACE_INVOP_STP; fbt->fbtp_symindx = symindx; fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; From owner-dev-commits-src-all@freebsd.org Tue Jan 12 12:48:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1A714D703A; Tue, 12 Jan 2021 12:48: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFVkM5dkWz3Cj5; Tue, 12 Jan 2021 12:48: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 B45982D19B; Tue, 12 Jan 2021 12:48: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 10CCmh7L075777; Tue, 12 Jan 2021 12:48:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CCmhT2075776; Tue, 12 Jan 2021 12:48:43 GMT (envelope-from git) Date: Tue, 12 Jan 2021 12:48:43 GMT Message-Id: <202101121248.10CCmhT2075776@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: c00ec4dab276 - main - Handle using a sub instruction in the arm64 fbt 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: c00ec4dab276414ccc8a0712dd2f836bb17349d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 12:48:43 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c00ec4dab276414ccc8a0712dd2f836bb17349d7 commit c00ec4dab276414ccc8a0712dd2f836bb17349d7 Author: Andrew Turner AuthorDate: 2021-01-12 12:14:09 +0000 Commit: Andrew Turner CommitDate: 2021-01-12 12:42:23 +0000 Handle using a sub instruction in the arm64 fbt Some stack frames are too large for a store pair instruction we already detect in the arm64 fbt code. Add support for handling subtracting the stack pointer directly. Sponsored by: Innovate UK --- sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h | 9 +++++++++ sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 6 ++++++ sys/cddl/dev/fbt/aarch64/fbt_isa.c | 17 ++++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index 922c1a9bba9b..2bedd01cf3e7 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2468,6 +2468,14 @@ extern void dtrace_helpers_destroy(proc_t *); #define RET_INSTR 0xd65f03c0 +#define SUB_MASK 0xffc00000 +#define SUB_INSTR 0xd1000000 +#define SUB_RD_SHIFT 0 +#define SUB_RN_SHIFT 5 +#define SUB_R_MASK 0x1f +#define SUB_IMM_SHIFT 10 +#define SUB_IMM_MASK 0xfff + #define LDP_STP_MASK 0xffc00000 #define STP_32 0x29800000 #define STP_64 0xa9800000 @@ -2488,6 +2496,7 @@ extern void dtrace_helpers_destroy(proc_t *); #define DTRACE_INVOP_STP 1 #define DTRACE_INVOP_RET 2 #define DTRACE_INVOP_B 3 +#define DTRACE_INVOP_SUB 4 #elif defined(__mips__) diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c index 2d59b29b850b..6646e51fc191 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c @@ -305,6 +305,12 @@ dtrace_invop_start(struct trapframe *frame) return (0); } + if ((invop & SUB_MASK) == SUB_INSTR) { + frame->tf_sp -= (invop >> SUB_IMM_SHIFT) & SUB_IMM_MASK; + frame->tf_elr += INSN_SIZE; + return (0); + } + if ((invop & B_MASK) == B_INSTR) { data = (invop & B_DATA_MASK); /* The data is the number of 4-byte words to change the pc */ diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index 9235af1a4c65..f15bc12291d3 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -121,6 +121,18 @@ fbt_provide_module_function(linker_file_t lf, int symindx, found = true; break; } + + /* + * Some functions start with a "sub sp, sp, " + * Sometimes the compiler will have a sub instruction that + * is not of the above type so don't stop if we see one. + */ + if ((*instr & SUB_MASK) == SUB_INSTR && + ((*instr >> SUB_RD_SHIFT) & SUB_R_MASK) == 31 && + ((*instr >> SUB_RN_SHIFT) & SUB_R_MASK) == 31) { + found = true; + break; + } } if (!found) @@ -135,7 +147,10 @@ fbt_provide_module_function(linker_file_t lf, int symindx, fbt->fbtp_loadcnt = lf->loadcnt; fbt->fbtp_savedval = *instr; fbt->fbtp_patchval = FBT_PATCHVAL; - fbt->fbtp_rval = DTRACE_INVOP_STP; + if ((*instr & SUB_MASK) == SUB_INSTR) + fbt->fbtp_rval = DTRACE_INVOP_SUB; + else + fbt->fbtp_rval = DTRACE_INVOP_STP; fbt->fbtp_symindx = symindx; fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; From owner-dev-commits-src-all@freebsd.org Tue Jan 12 13:17:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34CA74D7ADE; Tue, 12 Jan 2021 13:17:04 +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 4DFWM36Zsfz3FZb; Tue, 12 Jan 2021 13:17:03 +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 10CDGtmD027893 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 12 Jan 2021 15:16:58 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 10CDGtmD027893 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 10CDGtlc027892; Tue, 12 Jan 2021 15:16:55 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 12 Jan 2021 15:16:55 +0200 From: Konstantin Belousov To: Emmanuel Vadot Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 11d62b6f31ab - main - linuxkpi: add kernel_fpu_begin/kernel_fpu_end Message-ID: References: <202101121143.10CBh02x095972@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202101121143.10CBh02x095972@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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DFWM36Zsfz3FZb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 13:17:04 -0000 On Tue, Jan 12, 2021 at 11:43:00AM +0000, Emmanuel Vadot wrote: > The branch main has been updated by manu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 > > commit 11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 > Author: Emmanuel Vadot > AuthorDate: 2021-01-12 11:02:38 +0000 > Commit: Emmanuel Vadot > CommitDate: 2021-01-12 11:31:00 +0000 > > linuxkpi: add kernel_fpu_begin/kernel_fpu_end > > With newer AMD GPUs (>=Navi,Renoir) there is FPU context usage in the > amdgpu driver. > The `kernel_fpu_begin/end` implementations in drm did not even allow nested > begin-end blocks. Does Linux allow more then one thread to execute kernel_fpu_begin ? From owner-dev-commits-src-all@freebsd.org Tue Jan 12 13:44:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C7104D9189; Tue, 12 Jan 2021 13:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFWyK28pPz3Hkt; Tue, 12 Jan 2021 13:44: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 3BF7F2DDA0; Tue, 12 Jan 2021 13:44: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 10CDi9Yd053686; Tue, 12 Jan 2021 13:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CDi9Ti053685; Tue, 12 Jan 2021 13:44:09 GMT (envelope-from git) Date: Tue, 12 Jan 2021 13:44:09 GMT Message-Id: <202101121344.10CDi9Ti053685@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: 6b3a9a0f3d2c - main - Convert remaining cap_rights_init users to cap_rights_init_one 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: 6b3a9a0f3d2cd66145e89fdd8d07cb33a9963e8f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 13:44:09 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6b3a9a0f3d2cd66145e89fdd8d07cb33a9963e8f commit 6b3a9a0f3d2cd66145e89fdd8d07cb33a9963e8f Author: Mateusz Guzik AuthorDate: 2021-01-12 12:11:26 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-12 13:16:10 +0000 Convert remaining cap_rights_init users to cap_rights_init_one semantic patch: @@ expression rights, r; @@ - cap_rights_init(&rights, r) + cap_rights_init_one(&rights, r) --- sys/amd64/sgx/sgx_linux.c | 3 ++- sys/compat/freebsd32/freebsd32_ioctl.c | 2 +- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/compat/linux/linux_event.c | 7 ++++--- sys/dev/aac/aac_linux.c | 3 ++- sys/dev/aacraid/aacraid_linux.c | 2 +- sys/dev/amr/amr_linux.c | 2 +- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 2 +- sys/dev/filemon/filemon_wrapper.c | 2 +- sys/dev/ipmi/ipmi_linux.c | 3 ++- sys/dev/iscsi/icl_soft.c | 2 +- sys/dev/iscsi_initiator/iscsi.c | 4 ++-- sys/dev/mfi/mfi_linux.c | 2 +- sys/dev/mrsas/mrsas_linux.c | 2 +- sys/dev/tdfx/tdfx_linux.c | 2 +- sys/fs/fdescfs/fdesc_vnops.c | 2 +- sys/fs/nfsclient/nfs_clport.c | 2 +- sys/fs/nfsserver/nfs_nfsdport.c | 2 +- sys/kern/kern_event.c | 3 ++- sys/kern/tty.c | 2 +- sys/kern/uipc_sem.c | 7 ++++--- sys/kern/uipc_usrreq.c | 6 ++++-- sys/netinet/sctp_syscalls.c | 4 ++-- sys/security/mac/mac_syscalls.c | 6 ++++-- sys/security/mac_veriexec/mac_veriexec.c | 4 ++-- sys/ufs/ffs/ffs_alloc.c | 2 +- 26 files changed, 45 insertions(+), 35 deletions(-) diff --git a/sys/amd64/sgx/sgx_linux.c b/sys/amd64/sgx/sgx_linux.c index 60ebec0e0278..c2975b0d2c84 100644 --- a/sys/amd64/sgx/sgx_linux.c +++ b/sys/amd64/sgx/sgx_linux.c @@ -63,7 +63,8 @@ sgx_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) int error; int len; - error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + error = fget(td, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), + &fp); if (error != 0) return (error); diff --git a/sys/compat/freebsd32/freebsd32_ioctl.c b/sys/compat/freebsd32/freebsd32_ioctl.c index db6946246b90..b3ed457f7132 100644 --- a/sys/compat/freebsd32/freebsd32_ioctl.c +++ b/sys/compat/freebsd32/freebsd32_ioctl.c @@ -212,7 +212,7 @@ freebsd32_ioctl(struct thread *td, struct freebsd32_ioctl_args *uap) cap_rights_t rights; int error; - error = fget(td, uap->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + error = fget(td, uap->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp); if (error != 0) return (error); if ((fp->f_flag & (FREAD | FWRITE)) == 0) { diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 14afd433d9f1..b7db1c4468d7 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2095,7 +2095,7 @@ freebsd32_do_sendfile(struct thread *td, AUDIT_ARG_FD(uap->fd); if ((error = fget_read(td, uap->fd, - cap_rights_init(&rights, CAP_PREAD), &fp)) != 0) + cap_rights_init_one(&rights, CAP_PREAD), &fp)) != 0) goto out; error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, offset, diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c index b4b4be1f7b49..dfb4588392cc 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -421,7 +421,7 @@ linux_epoll_ctl(struct thread *td, struct linux_epoll_ctl_args *args) } error = fget(td, args->epfd, - cap_rights_init(&rights, CAP_KQUEUE_CHANGE), &epfp); + cap_rights_init_one(&rights, CAP_KQUEUE_CHANGE), &epfp); if (error != 0) return (error); if (epfp->f_type != DTYPE_KQUEUE) { @@ -430,7 +430,8 @@ linux_epoll_ctl(struct thread *td, struct linux_epoll_ctl_args *args) } /* Protect user data vector from incorrectly supplied fd. */ - error = fget(td, args->fd, cap_rights_init(&rights, CAP_POLL_EVENT), &fp); + error = fget(td, args->fd, + cap_rights_init_one(&rights, CAP_POLL_EVENT), &fp); if (error != 0) goto leave1; @@ -505,7 +506,7 @@ linux_epoll_wait_common(struct thread *td, int epfd, struct epoll_event *events, return (EINVAL); error = fget(td, epfd, - cap_rights_init(&rights, CAP_KQUEUE_EVENT), &epfp); + cap_rights_init_one(&rights, CAP_KQUEUE_EVENT), &epfp); if (error != 0) return (error); if (epfp->f_type != DTYPE_KQUEUE) { diff --git a/sys/dev/aac/aac_linux.c b/sys/dev/aac/aac_linux.c index 02babb5c0576..3f2d8a827441 100644 --- a/sys/dev/aac/aac_linux.c +++ b/sys/dev/aac/aac_linux.c @@ -82,7 +82,8 @@ aac_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) u_long cmd; int error; - error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + error = fget(td, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), + &fp); if (error != 0) return (error); cmd = args->cmd; diff --git a/sys/dev/aacraid/aacraid_linux.c b/sys/dev/aacraid/aacraid_linux.c index b58b8bacd7f3..7592a0d5a8cb 100644 --- a/sys/dev/aacraid/aacraid_linux.c +++ b/sys/dev/aacraid/aacraid_linux.c @@ -85,7 +85,7 @@ aacraid_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) int error; if ((error = fget(td, args->fd, - cap_rights_init(&rights, CAP_IOCTL), + cap_rights_init_one(&rights, CAP_IOCTL), &fp)) != 0) { return (error); } diff --git a/sys/dev/amr/amr_linux.c b/sys/dev/amr/amr_linux.c index 967907cc6846..9e0a5cac693e 100644 --- a/sys/dev/amr/amr_linux.c +++ b/sys/dev/amr/amr_linux.c @@ -78,7 +78,7 @@ amr_linux_ioctl(struct thread *p, struct linux_ioctl_args *args) struct file *fp; int error; - error = fget(p, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + error = fget(p, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp); if (error != 0) return (error); error = fo_ioctl(fp, args->cmd, (caddr_t)args->arg, p->td_ucred, p); diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index f5d4f03476cb..5588d3cb9511 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -624,7 +624,7 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) * Steal the socket from userland. */ error = fget(curthread, fd, - cap_rights_init(&rights, CAP_SOCK_CLIENT), &fp); + cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp); if (error != 0) return (error); if (fp->f_type != DTYPE_SOCKET) { diff --git a/sys/dev/filemon/filemon_wrapper.c b/sys/dev/filemon/filemon_wrapper.c index 52dd3bb483eb..4e64d8254f8d 100644 --- a/sys/dev/filemon/filemon_wrapper.c +++ b/sys/dev/filemon/filemon_wrapper.c @@ -185,7 +185,7 @@ _filemon_wrapper_openat(struct thread *td, const char *upath, int flags, * than nothing. */ if (getvnode(td, fd, - cap_rights_init(&rights, CAP_LOOKUP), &fp) == 0) { + cap_rights_init_one(&rights, CAP_LOOKUP), &fp) == 0) { vn_fullpath(fp->f_vnode, &atpath, &freepath); } } diff --git a/sys/dev/ipmi/ipmi_linux.c b/sys/dev/ipmi/ipmi_linux.c index 136712e8cfb5..4b33c5b014d8 100644 --- a/sys/dev/ipmi/ipmi_linux.c +++ b/sys/dev/ipmi/ipmi_linux.c @@ -96,7 +96,8 @@ ipmi_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) u_long cmd; int error; - error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + error = fget(td, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), + &fp); if (error != 0) return (error); cmd = args->cmd; diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index f8bcbb9eaa1c..bd4d9db81bb0 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -1397,7 +1397,7 @@ icl_soft_conn_handoff(struct icl_conn *ic, int fd) * Steal the socket from userland. */ error = fget(curthread, fd, - cap_rights_init(&rights, CAP_SOCK_CLIENT), &fp); + cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp); if (error != 0) return (error); if (fp->f_type != DTYPE_SOCKET) { diff --git a/sys/dev/iscsi_initiator/iscsi.c b/sys/dev/iscsi_initiator/iscsi.c index 19c45f87d132..ce190c5c892a 100644 --- a/sys/dev/iscsi_initiator/iscsi.c +++ b/sys/dev/iscsi_initiator/iscsi.c @@ -392,8 +392,8 @@ i_setsoc(isc_session_t *sp, int fd, struct thread *td) if(sp->soc != NULL) isc_stop_receiver(sp); - error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_SOCK_CLIENT), - &sp->fp, NULL, NULL); + error = getsock_cap(td, fd, cap_rights_init_one(&rights, CAP_SOCK_CLIENT), + &sp->fp, NULL, NULL); if(error) return error; diff --git a/sys/dev/mfi/mfi_linux.c b/sys/dev/mfi/mfi_linux.c index 1452b80c280f..892b4f7a9fba 100644 --- a/sys/dev/mfi/mfi_linux.c +++ b/sys/dev/mfi/mfi_linux.c @@ -100,7 +100,7 @@ mfi_linux_ioctl(struct thread *p, struct linux_ioctl_args *args) break; } - error = fget(p, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + error = fget(p, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp); if (error != 0) return (error); error = fo_ioctl(fp, cmd, (caddr_t)args->arg, p->td_ucred, p); diff --git a/sys/dev/mrsas/mrsas_linux.c b/sys/dev/mrsas/mrsas_linux.c index 1794f977a21d..11ce3c3f8d54 100644 --- a/sys/dev/mrsas/mrsas_linux.c +++ b/sys/dev/mrsas/mrsas_linux.c @@ -121,7 +121,7 @@ mrsas_linux_ioctl(struct thread *p, struct linux_ioctl_args *args) goto END; } #if (__FreeBSD_version >= 1000000) - error = fget(p, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + error = fget(p, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp); #elif (__FreeBSD_version <= 900000) error = fget(p, args->fd, &fp); #else /* For FreeBSD version greater than diff --git a/sys/dev/tdfx/tdfx_linux.c b/sys/dev/tdfx/tdfx_linux.c index e20763b37647..922ff5478a42 100644 --- a/sys/dev/tdfx/tdfx_linux.c +++ b/sys/dev/tdfx/tdfx_linux.c @@ -57,7 +57,7 @@ linux_ioctl_tdfx(struct thread *td, struct linux_ioctl_args* args) struct file *fp; - error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + error = fget(td, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp); if (error != 0) return (error); /* We simply copy the data and send it right to ioctl */ diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index ba13aaf1ce85..1271b50e6e94 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -496,7 +496,7 @@ fdesc_setattr(struct vop_setattr_args *ap) * Allow setattr where there is an underlying vnode. */ error = getvnode(td, fd, - cap_rights_init(&rights, CAP_EXTATTR_SET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); if (error) { /* * getvnode() returns EINVAL if the file descriptor is not diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index 730877b6eb6f..9c0ac5c4364e 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -1247,7 +1247,7 @@ nfssvc_nfscl(struct thread *td, struct nfssvc_args *uap) * careful than too reckless. */ error = fget(td, nfscbdarg.sock, - cap_rights_init(&rights, CAP_SOCK_CLIENT), &fp); + cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp); if (error) return (error); if (fp->f_type != DTYPE_SOCKET) { diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 8336a0b8fab2..b781503a6815 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3609,7 +3609,7 @@ nfssvc_nfsd(struct thread *td, struct nfssvc_args *uap) * careful than too reckless. */ error = fget(td, sockarg.sock, - cap_rights_init(&rights, CAP_SOCK_SERVER), &fp); + cap_rights_init_one(&rights, CAP_SOCK_SERVER), &fp); if (error != 0) goto out; if (fp->f_type != DTYPE_SOCKET) { diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index e22c987f8a08..5185723b8d10 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2714,7 +2714,8 @@ kqfd_register(int fd, struct kevent *kev, struct thread *td, int mflag) cap_rights_t rights; int error; - error = fget(td, fd, cap_rights_init(&rights, CAP_KQUEUE_CHANGE), &fp); + error = fget(td, fd, cap_rights_init_one(&rights, CAP_KQUEUE_CHANGE), + &fp); if (error != 0) return (error); if ((error = kqueue_acquire(fp, &kq)) != 0) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 4b1f7ca52abe..00b4df675311 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2087,7 +2087,7 @@ ttyhook_register(struct tty **rtp, struct proc *p, int fd, struct ttyhook *th, /* Validate the file descriptor. */ fdp = p->p_fd; - error = fget_unlocked(fdp, fd, cap_rights_init(&rights, CAP_TTYHOOK), + error = fget_unlocked(fdp, fd, cap_rights_init_one(&rights, CAP_TTYHOOK), &fp); if (error != 0) return (error); diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index bb47fe9a3905..db1d84696df0 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -725,7 +725,7 @@ sys_ksem_post(struct thread *td, struct ksem_post_args *uap) AUDIT_ARG_FD(uap->id); error = ksem_get(td, uap->id, - cap_rights_init(&rights, CAP_SEM_POST), &fp); + cap_rights_init_one(&rights, CAP_SEM_POST), &fp); if (error) return (error); ks = fp->f_data; @@ -817,7 +817,8 @@ kern_sem_wait(struct thread *td, semid_t id, int tryflag, DP((">>> kern_sem_wait entered! pid=%d\n", (int)td->td_proc->p_pid)); AUDIT_ARG_FD(id); - error = ksem_get(td, id, cap_rights_init(&rights, CAP_SEM_WAIT), &fp); + error = ksem_get(td, id, cap_rights_init_one(&rights, CAP_SEM_WAIT), + &fp); if (error) return (error); ks = fp->f_data; @@ -886,7 +887,7 @@ sys_ksem_getvalue(struct thread *td, struct ksem_getvalue_args *uap) AUDIT_ARG_FD(uap->id); error = ksem_get(td, uap->id, - cap_rights_init(&rights, CAP_SEM_GETVALUE), &fp); + cap_rights_init_one(&rights, CAP_SEM_GETVALUE), &fp); if (error) return (error); ks = fp->f_data; diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index afea72fd2700..ad369fc7b23e 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -636,7 +636,8 @@ 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(&rights, CAP_BINDAT), td); + UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights, CAP_BINDAT), + td); /* SHOULD BE ABLE TO ADOPT EXISTING AND wakeup() ALA FIFO's */ error = namei(&nd); if (error) @@ -1559,7 +1560,8 @@ 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(&rights, CAP_CONNECTAT), td); + UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights, CAP_CONNECTAT), + td); error = namei(&nd); if (error) vp = NULL; diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c index 0dad76b0f8bc..2697d139300c 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -153,7 +153,7 @@ sys_sctp_peeloff(td, uap) int error, fd; AUDIT_ARG_FD(uap->sd); - error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_PEELOFF), + error = getsock_cap(td, uap->sd, cap_rights_init_one(&rights, CAP_PEELOFF), &headfp, &fflag, NULL); if (error != 0) goto done2; @@ -472,7 +472,7 @@ sys_sctp_generic_recvmsg(td, uap) int error, fromlen, i, msg_flags; AUDIT_ARG_FD(uap->sd); - error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), + error = getsock_cap(td, uap->sd, cap_rights_init_one(&rights, CAP_RECV), &fp, NULL, NULL); if (error != 0) return (error); diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index c28a5e99c656..e7d71b2e22da 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -253,7 +253,8 @@ sys___mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap) } buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO); - error = fget(td, uap->fd, cap_rights_init(&rights, CAP_MAC_GET), &fp); + error = fget(td, uap->fd, cap_rights_init_one(&rights, CAP_MAC_GET), + &fp); if (error) goto out; @@ -411,7 +412,8 @@ sys___mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap) return (error); } - error = fget(td, uap->fd, cap_rights_init(&rights, CAP_MAC_SET), &fp); + error = fget(td, uap->fd, cap_rights_init_one(&rights, CAP_MAC_SET), + &fp); if (error) goto out; diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index 8d43d59c9a3c..ecaa8cc35e09 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -656,8 +656,8 @@ mac_veriexec_syscall(struct thread *td, int call, void *arg) switch (call) { case MAC_VERIEXEC_CHECK_FD_SYSCALL: /* Get the vnode associated with the file descriptor passed */ - error = getvnode(td, (uintptr_t) arg, cap_rights_init(&rights, - CAP_READ), &fp); + error = getvnode(td, (uintptr_t) arg, + cap_rights_init_one(&rights, CAP_READ), &fp); if (error) return (error); if (fp->f_type != DTYPE_VNODE) { diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index be93dd16cd0a..3b652ea14303 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -3218,7 +3218,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) if (cmd.version != FFS_CMD_VERSION) return (ERPCMISMATCH); if ((error = getvnode(td, cmd.handle, - cap_rights_init(&rights, CAP_FSCK), &fp)) != 0) + cap_rights_init_one(&rights, CAP_FSCK), &fp)) != 0) return (error); vp = fp->f_vnode; if (vp->v_type != VREG && vp->v_type != VDIR) { From owner-dev-commits-src-all@freebsd.org Tue Jan 12 13:44:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E0D64D9133; Tue, 12 Jan 2021 13:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFWyL2G5Xz3HfW; Tue, 12 Jan 2021 13:44: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 40A972DBEF; Tue, 12 Jan 2021 13:44: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 10CDiAU3053709; Tue, 12 Jan 2021 13:44:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CDiAvU053708; Tue, 12 Jan 2021 13:44:10 GMT (envelope-from git) Date: Tue, 12 Jan 2021 13:44:10 GMT Message-Id: <202101121344.10CDiAvU053708@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: cdb62ab74ee0 - main - vfs: add NDFREE_NOTHING and convert several NDFREE_PNBUF callers 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: cdb62ab74ee0cb99988c7831d950a6021aaa4879 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 13:44:10 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cdb62ab74ee0cb99988c7831d950a6021aaa4879 commit cdb62ab74ee0cb99988c7831d950a6021aaa4879 Author: Mateusz Guzik AuthorDate: 2021-01-12 11:36:30 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-12 13:16:10 +0000 vfs: add NDFREE_NOTHING and convert several NDFREE_PNBUF callers Check the comment above the routine for reasoning. --- sys/kern/uipc_usrreq.c | 2 +- sys/kern/vfs_lookup.c | 27 +++++++++++++++++++++++++++ sys/kern/vfs_syscalls.c | 34 +++++++++++++++++----------------- sys/sys/namei.h | 2 ++ 4 files changed, 47 insertions(+), 18 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index ad369fc7b23e..44e48bc864a3 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1568,7 +1568,7 @@ unp_connectat(int fd, struct socket *so, struct sockaddr *nam, else vp = nd.ni_vp; ASSERT_VOP_LOCKED(vp, "unp_connect"); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); if (error) goto bad; diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index da04dd09af40..3b8ee558e023 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1487,6 +1487,33 @@ NDFREE_PNBUF(struct nameidata *ndp) } } +/* + * NDFREE_PNBUF replacement for callers that know there is no buffer. + * + * This is a hack. Preferably the VFS layer would not produce anything more + * than it was asked to do. Unfortunately several non-LOOKUP cases can add the + * HASBUF flag to the result. Even then an interface could be implemented where + * the caller specifies what they expected to see in the result and what they + * are going to take care of. + * + * In the meantime provide this kludge as a trivial replacement for NDFREE_PNBUF + * calls scattered throughout the kernel where we know for a fact the flag must not + * be seen. + */ +#ifdef INVARIANTS +void +NDFREE_NOTHING(struct nameidata *ndp) +{ + struct componentname *cnp; + + cnp = &ndp->ni_cnd; + KASSERT(cnp->cn_nameiop == LOOKUP, ("%s: got non-LOOKUP op %d\n", + __func__, cnp->cn_nameiop)); + KASSERT((cnp->cn_flags & (SAVENAME | HASBUF)) == 0, + ("%s: bad flags \%" PRIx64 "\n", __func__, cnp->cn_flags)); +} +#endif + void (NDFREE)(struct nameidata *ndp, const u_int flags) { diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index ce5da109f168..560a003765d5 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -340,7 +340,7 @@ kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, return (error); mp = nd.ni_vp->v_mount; vfs_ref(mp); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); vput(nd.ni_vp); return (kern_do_statfs(td, mp, buf)); } @@ -949,11 +949,11 @@ kern_chdir(struct thread *td, const char *path, enum uio_seg pathseg) return (error); if ((error = change_dir(nd.ni_vp, td)) != 0) { vput(nd.ni_vp); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); return (error); } VOP_UNLOCK(nd.ni_vp); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); pwd_chdir(td, nd.ni_vp); return (0); } @@ -991,12 +991,12 @@ sys_chroot(struct thread *td, struct chroot_args *uap) VOP_UNLOCK(nd.ni_vp); error = pwd_chroot(td, nd.ni_vp); vrele(nd.ni_vp); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); return (error); e_vunlock: vput(nd.ni_vp); error: - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); return (error); } @@ -2118,7 +2118,7 @@ kern_accessat(struct thread *td, int fd, const char *path, vp = nd.ni_vp; error = vn_access(vp, amode, usecred, td); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); vput(vp); out: if (usecred != cred) { @@ -2417,7 +2417,7 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, if (__predict_false(hook != NULL)) hook(nd.ni_vp, sbp); } - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); vput(nd.ni_vp); #ifdef __STAT_TIME_T_EXT sbp->st_atim_ext = 0; @@ -2557,7 +2557,7 @@ kern_pathconf(struct thread *td, const char *path, enum uio_seg pathseg, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); error = VOP_PATHCONF(nd.ni_vp, name, valuep); vput(nd.ni_vp); @@ -2613,7 +2613,7 @@ kern_readlinkat(struct thread *td, int fd, const char *path, if ((error = namei(&nd)) != 0) return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); vp = nd.ni_vp; error = kern_readlink_vp(vp, buf, bufseg, count, td); @@ -2764,7 +2764,7 @@ kern_chflagsat(struct thread *td, int fd, const char *path, &cap_fchflags_rights, td); if ((error = namei(&nd)) != 0) return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); error = setfflags(td, nd.ni_vp, flags); vrele(nd.ni_vp); return (error); @@ -2893,7 +2893,7 @@ kern_fchmodat(struct thread *td, int fd, const char *path, &cap_fchmod_rights, td); if ((error = namei(&nd)) != 0) return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); error = setfmode(td, td->td_ucred, nd.ni_vp, mode); vrele(nd.ni_vp); return (error); @@ -3006,7 +3006,7 @@ kern_fchownat(struct thread *td, int fd, const char *path, if ((error = namei(&nd)) != 0) return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); error = setfown(td, td->td_ucred, nd.ni_vp, uid, gid); vrele(nd.ni_vp); return (error); @@ -3219,7 +3219,7 @@ kern_utimesat(struct thread *td, int fd, const char *path, if ((error = namei(&nd)) != 0) return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); error = setutimes(td, nd.ni_vp, ts, 2, tptr == NULL); vrele(nd.ni_vp); return (error); @@ -3255,7 +3255,7 @@ kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg, NDINIT(&nd, LOOKUP, NOFOLLOW | AUDITVNODE1, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); error = setutimes(td, nd.ni_vp, ts, 2, tptr == NULL); vrele(nd.ni_vp); return (error); @@ -3370,7 +3370,7 @@ kern_utimensat(struct thread *td, int fd, const char *path, * "If both tv_nsec fields are UTIME_OMIT... EACCESS may be detected." * "Search permission is denied by a component of the path prefix." */ - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); if ((flags & UTIMENS_EXIT) == 0) error = setutimes(td, nd.ni_vp, ts, 2, flags & UTIMENS_NULL); vrele(nd.ni_vp); @@ -4226,7 +4226,7 @@ sys_revoke(struct thread *td, struct revoke_args *uap) if ((error = namei(&nd)) != 0) return (error); vp = nd.ni_vp; - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); if (vp->v_type != VCHR || vp->v_rdev == NULL) { error = EINVAL; goto out; @@ -4361,7 +4361,7 @@ kern_getfhat(struct thread *td, int flags, int fd, const char *path, error = namei(&nd); if (error != 0) return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); + NDFREE_NOTHING(&nd); vp = nd.ni_vp; bzero(&fh, sizeof(fh)); fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid; diff --git a/sys/sys/namei.h b/sys/sys/namei.h index ddba9cbd8912..c045bc7c6bc5 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -288,8 +288,10 @@ void NDFREE(struct nameidata *, const u_int); } while (0) #ifdef INVARIANTS +void NDFREE_NOTHING(struct nameidata *); void NDVALIDATE(struct nameidata *); #else +#define NDFREE_NOTHING(ndp) do { } while (0) #define NDVALIDATE(ndp) do { } while (0) #endif From owner-dev-commits-src-all@freebsd.org Tue Jan 12 13:44:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F0294D9209; Tue, 12 Jan 2021 13: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFWyM52yzz3HwK; Tue, 12 Jan 2021 13:44: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 6D9BC2DBF0; Tue, 12 Jan 2021 13:44: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 10CDiBGk053727; Tue, 12 Jan 2021 13: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 10CDiBrg053726; Tue, 12 Jan 2021 13:44:11 GMT (envelope-from git) Date: Tue, 12 Jan 2021 13:44:11 GMT Message-Id: <202101121344.10CDiBrg053726@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: 70ba77706dab - main - vfs: extend vfs:namei:lookup:return probe with nameidata 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: 70ba77706dab8145c2ff152c190b8dcd4528f616 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 13:44:12 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=70ba77706dab8145c2ff152c190b8dcd4528f616 commit 70ba77706dab8145c2ff152c190b8dcd4528f616 Author: Mateusz Guzik AuthorDate: 2021-01-12 13:09:55 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-12 13:35:27 +0000 vfs: extend vfs:namei:lookup:return probe with nameidata --- sys/kern/vfs_cache.c | 3 ++- sys/kern/vfs_lookup.c | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 4dad5f388448..7eb9237bf257 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -5436,7 +5436,8 @@ out: if (SDT_PROBES_ENABLED()) { SDT_PROBE3(vfs, fplookup, lookup, done, ndp, fpl.line, fpl.status); if (fpl.status == CACHE_FPL_STATUS_HANDLED) - SDT_PROBE3(vfs, namei, lookup, return, error, ndp->ni_vp, true); + SDT_PROBE4(vfs, namei, lookup, return, error, ndp->ni_vp, true, + ndp); } if (__predict_true(fpl.status == CACHE_FPL_STATUS_HANDLED)) { diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 3b8ee558e023..b6529623ecbb 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -76,7 +76,8 @@ __FBSDID("$FreeBSD$"); SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE4(vfs, namei, lookup, entry, "struct vnode *", "char *", "unsigned long", "bool"); -SDT_PROBE_DEFINE3(vfs, namei, lookup, return, "int", "struct vnode *", "bool"); +SDT_PROBE_DEFINE4(vfs, namei, lookup, return, "int", "struct vnode *", "bool", + "struct nameidata"); /* Allocation zone for namei. */ uma_zone_t namei_zone; @@ -643,6 +644,8 @@ namei(struct nameidata *ndp) * If not a symbolic link, we're done. */ if ((cnp->cn_flags & ISSYMLINK) == 0) { + SDT_PROBE4(vfs, namei, lookup, return, error, + (error == 0 ? ndp->ni_vp : NULL), false, ndp); if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) { namei_cleanup_cnp(cnp); } else @@ -653,8 +656,6 @@ namei(struct nameidata *ndp) error = ENOTCAPABLE; } nameicap_cleanup(ndp, true); - SDT_PROBE3(vfs, namei, lookup, return, error, - (error == 0 ? ndp->ni_vp : NULL), false); pwd_drop(pwd); if (error == 0) NDVALIDATE(ndp); @@ -729,9 +730,9 @@ namei(struct nameidata *ndp) vrele(ndp->ni_dvp); out: MPASS(error != 0); + SDT_PROBE4(vfs, namei, lookup, return, error, NULL, false, ndp); namei_cleanup_cnp(cnp); nameicap_cleanup(ndp, true); - SDT_PROBE3(vfs, namei, lookup, return, error, NULL, false); pwd_drop(pwd); return (error); } From owner-dev-commits-src-all@freebsd.org Tue Jan 12 14:21:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F4644DA00E; Tue, 12 Jan 2021 14:21:50 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (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 4DFXnp34V6z3LF0; Tue, 12 Jan 2021 14:21:50 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.1.2] (pool-74-110-137-7.rcmdva.fios.verizon.net [74.110.137.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 051102700136; Tue, 12 Jan 2021 09:21:48 -0500 (EST) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 051102700136 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1610461309; bh=twi7lcTgBxwzrjiYI+p872Sx+pnhOi/x+N4/Glps6t8=; h=Subject:To:From:Date:From; b=mCCalS7gOWTQK28SwWkY2Gs8tHYlzvhKcgcGv2mTfv9QY4qpDH/yVuUr5dF2KdL5k x0sD0mssN7m7k4a+WrNSG9siyRDcXXiNbCtE+huY/AtSqswBpLqmQyPvP1/J44vT68 MIcu57AG6Uz6NgEn7pmvYNiQ5EzeovkDAaaOLq8RSf2buYTIem2G7lWYaPH9HRw4kh beAknVE+DRhmAl40DUOKOTDby9Xkw+++gGzQHE0CrEQx2VKithGQjxF6uI/KZ9gT2D Kl6kC3vCjMI22p3x33OXCV1xysB+vBdpZ8D9KgzJQ6n36nJYSraeVGCSAk9aoxKt31 7s+Tc6jKq96DQ== Subject: Re: git: 7eaea04a5bb1 - main - amd64: compare TLB shootdown target to all_cpus To: Mateusz Guzik , Andrew Gallatin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101120110.10C1A6mg069684@gitrepo.freebsd.org> From: Andrew Gallatin Message-ID: <71b28d4a-24a8-c60c-b3d0-fd037997c386@cs.duke.edu> Date: Tue, 12 Jan 2021 09:21:48 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DFXnp34V6z3LF0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 14:21:50 -0000 On 1/12/21 12:59 AM, Mateusz Guzik wrote: > This makes my 2 core vm crash on boot: > > Launching APs: 1 > Timecounter "TSC-low" frequency 1346899854 Hz quality 1000 > panic: IPI scoreboard is zero, initiator 1 target 1 Ugh, sorry for the breakage & thanks for the fix. That's what I get for not testing enough. Drew From owner-dev-commits-src-all@freebsd.org Tue Jan 12 15:15:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD0564DBC25; Tue, 12 Jan 2021 15:15: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFYzS5M7qz3QZ8; Tue, 12 Jan 2021 15:15: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 AAA472EFC6; Tue, 12 Jan 2021 15:15: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 10CFFGw2070096; Tue, 12 Jan 2021 15:15:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CFFG1H070095; Tue, 12 Jan 2021 15:15:16 GMT (envelope-from git) Date: Tue, 12 Jan 2021 15:15:16 GMT Message-Id: <202101121515.10CFFG1H070095@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: 0628f6835702 - main - riscv pmap: add some pv list assertions 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: 0628f6835702943bd6da52fba30ee53971f9029c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 15:15:16 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0628f6835702943bd6da52fba30ee53971f9029c commit 0628f6835702943bd6da52fba30ee53971f9029c Author: mhorne AuthorDate: 2020-11-04 17:51:10 +0000 Commit: Mitchell Horne CommitDate: 2021-01-12 15:12:02 +0000 riscv pmap: add some pv list assertions Ensure that we don't end up with a superpage in the vm_page_t's pv list. This may help with debugging the panic reported in PR 250866, in which l3 in pmap_remove_write() was found to be NULL. Adding a KASSERT to this function will help narrow down the cause of this panic the next time it occurs. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D28109 --- sys/riscv/riscv/pmap.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 4ad46731f158..f30dda17afae 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -3498,7 +3498,10 @@ restart: goto restart; } } - l3 = pmap_l3(pmap, pv->pv_va); + l2 = pmap_l2(pmap, pv->pv_va); + KASSERT((pmap_load(l2) & PTE_RWX) == 0, + ("%s: found a 2mpage in page %p's pv list", __func__, m)); + l3 = pmap_l2_to_l3(l2, pv->pv_va); if ((pmap_load(l3) & PTE_SW_WIRED) != 0) count++; PMAP_UNLOCK(pmap); @@ -3745,7 +3748,10 @@ restart: goto restart; } } - l3 = pmap_l3(pmap, pv->pv_va); + l2 = pmap_l2(pmap, pv->pv_va); + KASSERT((pmap_load(l2) & PTE_RWX) == 0, + ("%s: found a 2mpage in page %p's pv list", __func__, m)); + l3 = pmap_l2_to_l3(l2, pv->pv_va); rv = (pmap_load(l3) & mask) == mask; PMAP_UNLOCK(pmap); if (rv) @@ -3901,7 +3907,10 @@ retry_pv_loop: goto retry_pv_loop; } } - l3 = pmap_l3(pmap, pv->pv_va); + l2 = pmap_l2(pmap, pv->pv_va); + KASSERT((pmap_load(l2) & PTE_RWX) == 0, + ("%s: found a 2mpage in page %p's pv list", __func__, m)); + l3 = pmap_l2_to_l3(l2, pv->pv_va); oldl3 = pmap_load(l3); retry: if ((oldl3 & PTE_W) != 0) { @@ -4172,8 +4181,7 @@ restart: } l2 = pmap_l2(pmap, pv->pv_va); KASSERT((pmap_load(l2) & PTE_RWX) == 0, - ("pmap_clear_modify: found a 2mpage in page %p's pv list", - m)); + ("%s: found a 2mpage in page %p's pv list", __func__, m)); l3 = pmap_l2_to_l3(l2, pv->pv_va); if ((pmap_load(l3) & (PTE_D | PTE_W)) == (PTE_D | PTE_W)) { pmap_clear_bits(l3, PTE_D | PTE_W); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 16:40:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB5F14DE23C; Tue, 12 Jan 2021 16:40: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFbsj5Lfqz3mlL; Tue, 12 Jan 2021 16:40: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 AA06D2FFB5; Tue, 12 Jan 2021 16:40: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 10CGePcb082521; Tue, 12 Jan 2021 16:40:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CGePiw082520; Tue, 12 Jan 2021 16:40:25 GMT (envelope-from git) Date: Tue, 12 Jan 2021 16:40:25 GMT Message-Id: <202101121640.10CGePiw082520@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: 992ef0f90dea - stable/12 - MFC ec52ff6d1411 and 747feea146d8: Streamline the infiniband code according to the ethernet code. 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: 992ef0f90deab792aef67c8e66167a7ad48ea905 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:40:25 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=992ef0f90deab792aef67c8e66167a7ad48ea905 commit 992ef0f90deab792aef67c8e66167a7ad48ea905 Author: Hans Petter Selasky AuthorDate: 2020-12-29 17:01:57 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:34:32 +0000 MFC ec52ff6d1411 and 747feea146d8: Streamline the infiniband code according to the ethernet code. Specifically implement the if_requestencap callback function for infiniband. Most of the changes are simply a cut and paste of the equivalent ethernet part. Reviewed by: melifaro @ Differential Revision: https://reviews.freebsd.org/D27631 Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/net/if_infiniband.c | 297 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 197 insertions(+), 100 deletions(-) diff --git a/sys/net/if_infiniband.c b/sys/net/if_infiniband.c index 19f7cdf7ffea..b644f91f2cda 100644 --- a/sys/net/if_infiniband.c +++ b/sys/net/if_infiniband.c @@ -143,139 +143,236 @@ infiniband_bpf_mtap(struct ifnet *ifp, struct mbuf *mb) mb->m_pkthdr.len += sizeof(*ibh); } +static void +update_mbuf_csumflags(struct mbuf *src, struct mbuf *dst) +{ + int csum_flags = 0; + + if (src->m_pkthdr.csum_flags & CSUM_IP) + csum_flags |= (CSUM_IP_CHECKED|CSUM_IP_VALID); + if (src->m_pkthdr.csum_flags & CSUM_DELAY_DATA) + csum_flags |= (CSUM_DATA_VALID|CSUM_PSEUDO_HDR); + if (src->m_pkthdr.csum_flags & CSUM_SCTP) + csum_flags |= CSUM_SCTP_VALID; + dst->m_pkthdr.csum_flags |= csum_flags; + if (csum_flags & CSUM_DATA_VALID) + dst->m_pkthdr.csum_data = 0xffff; +} + /* - * Infiniband output routine. + * Handle link-layer encapsulation requests. */ static int -infiniband_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, - struct route *ro) +infiniband_requestencap(struct ifnet *ifp, struct if_encap_req *req) { - uint8_t edst[INFINIBAND_ADDR_LEN]; -#if defined(INET) || defined(INET6) - struct llentry *lle = NULL; -#endif - struct infiniband_header *ibh; - int error = 0; - uint16_t type; - bool is_gw; + struct infiniband_header *ih; + struct arphdr *ah; + uint16_t etype; + const uint8_t *lladdr; - is_gw = ((ro != NULL) && (ro->ro_flags & RT_HAS_GW) != 0); + if (req->rtype != IFENCAP_LL) + return (EOPNOTSUPP); -#ifdef MAC - error = mac_ifnet_check_transmit(ifp, m); - if (error) - goto bad; -#endif + if (req->bufsize < INFINIBAND_HDR_LEN) + return (ENOMEM); - M_PROFILE(m); - if (ifp->if_flags & IFF_MONITOR) { - error = ENETDOWN; - goto bad; - } - if (!((ifp->if_flags & IFF_UP) && - (ifp->if_drv_flags & IFF_DRV_RUNNING))) { - error = ENETDOWN; - goto bad; - } + ih = (struct infiniband_header *)req->buf; + lladdr = req->lladdr; + req->lladdr_off = 0; - switch (dst->sa_family) { - case AF_LINK: - goto output; -#ifdef INET + switch (req->family) { case AF_INET: - if (lle != NULL && (lle->la_flags & LLE_VALID)) { - memcpy(edst, lle->ll_addr, sizeof(edst)); - } else if (m->m_flags & M_MCAST) { - infiniband_ipv4_multicast_map( - ((const struct sockaddr_in *)dst)->sin_addr.s_addr, - ifp->if_broadcastaddr, edst); - } else { - error = arpresolve(ifp, is_gw, m, dst, edst, NULL, NULL); - if (error) { - if (error == EWOULDBLOCK) - error = 0; - m = NULL; /* mbuf is consumed by resolver */ - goto bad; - } - } - type = htons(ETHERTYPE_IP); + etype = htons(ETHERTYPE_IP); break; - case AF_ARP: { - struct arphdr *ah; - - if (m->m_len < sizeof(*ah)) { - error = EINVAL; - goto bad; - } - - ah = mtod(m, struct arphdr *); - - if (m->m_len < arphdr_len(ah)) { - error = EINVAL; - goto bad; - } + case AF_INET6: + etype = htons(ETHERTYPE_IPV6); + break; + case AF_ARP: + ah = (struct arphdr *)req->hdata; ah->ar_hrd = htons(ARPHRD_INFINIBAND); switch (ntohs(ah->ar_op)) { case ARPOP_REVREQUEST: case ARPOP_REVREPLY: - type = htons(ETHERTYPE_REVARP); + etype = htons(ETHERTYPE_REVARP); break; case ARPOP_REQUEST: case ARPOP_REPLY: default: - type = htons(ETHERTYPE_ARP); + etype = htons(ETHERTYPE_ARP); break; } - if (m->m_flags & M_BCAST) { - memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN); + if (req->flags & IFENCAP_FLAG_BROADCAST) + lladdr = ifp->if_broadcastaddr; + break; + default: + return (EAFNOSUPPORT); + } + + ih->ib_protocol = etype; + ih->ib_reserved = 0; + memcpy(ih->ib_hwaddr, lladdr, INFINIBAND_ADDR_LEN); + req->bufsize = sizeof(struct infiniband_header); + + return (0); +} + +static int +infiniband_resolve_addr(struct ifnet *ifp, struct mbuf *m, + const struct sockaddr *dst, struct route *ro, uint8_t *phdr, + uint32_t *pflags, struct llentry **plle) +{ + struct infiniband_header *ih; + uint32_t lleflags = 0; + int error = 0; + + if (plle) + *plle = NULL; + ih = (struct infiniband_header *)phdr; + + switch (dst->sa_family) { +#ifdef INET + case AF_INET: + if ((m->m_flags & (M_BCAST | M_MCAST)) == 0) { + error = arpresolve(ifp, 0, m, dst, phdr, &lleflags, plle); } else { - if (ah->ar_hln != INFINIBAND_ADDR_LEN) { - error = EINVAL; - goto bad; + if (m->m_flags & M_BCAST) { + memcpy(ih->ib_hwaddr, ifp->if_broadcastaddr, + INFINIBAND_ADDR_LEN); + } else { + infiniband_ipv4_multicast_map( + ((const struct sockaddr_in *)dst)->sin_addr.s_addr, + ifp->if_broadcastaddr, ih->ib_hwaddr); } - memcpy(edst, ar_tha(ah), INFINIBAND_ADDR_LEN); + ih->ib_protocol = htons(ETHERTYPE_IP); + ih->ib_reserved = 0; } break; - } #endif #ifdef INET6 - case AF_INET6: { - const struct ip6_hdr *ip6; - - ip6 = mtod(m, const struct ip6_hdr *); - if (m->m_len < sizeof(*ip6)) { - error = EINVAL; - goto bad; - } else if (lle != NULL && (lle->la_flags & LLE_VALID)) { - memcpy(edst, lle->ll_addr, sizeof(edst)); - } else if (m->m_flags & M_MCAST) { + case AF_INET6: + if ((m->m_flags & M_MCAST) == 0) { + error = nd6_resolve(ifp, 0, m, dst, phdr, &lleflags, plle); + } else { infiniband_ipv6_multicast_map( &((const struct sockaddr_in6 *)dst)->sin6_addr, - ifp->if_broadcastaddr, edst); - } else if (ip6->ip6_nxt == IPPROTO_ICMPV6) { - memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN); - } else { - error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL, NULL); - if (error) { - if (error == EWOULDBLOCK) - error = 0; - m = NULL; /* mbuf is consumed by resolver */ - goto bad; - } + ifp->if_broadcastaddr, ih->ib_hwaddr); + ih->ib_protocol = htons(ETHERTYPE_IPV6); + ih->ib_reserved = 0; } - type = htons(ETHERTYPE_IPV6); break; - } #endif default: - error = EAFNOSUPPORT; + if_printf(ifp, "can't handle af%d\n", dst->sa_family); + if (m != NULL) + m_freem(m); + return (EAFNOSUPPORT); + } + + if (error == EHOSTDOWN) { + if (ro != NULL && (ro->ro_flags & RT_HAS_GW) != 0) + error = EHOSTUNREACH; + } + + if (error != 0) + return (error); + + *pflags = RT_MAY_LOOP; + if (lleflags & LLE_IFADDR) + *pflags |= RT_L2_ME; + + return (0); +} + +/* + * Infiniband output routine. + */ +static int +infiniband_output(struct ifnet *ifp, struct mbuf *m, + const struct sockaddr *dst, struct route *ro) +{ + uint8_t linkhdr[INFINIBAND_HDR_LEN]; + uint8_t *phdr; + struct llentry *lle = NULL; + struct infiniband_header *ih; + int error = 0; + int hlen; /* link layer header length */ + uint32_t pflags; + bool addref; + + addref = false; + phdr = NULL; + pflags = 0; + if (ro != NULL) { + /* XXX BPF uses ro_prepend */ + if (ro->ro_prepend != NULL) { + phdr = ro->ro_prepend; + hlen = ro->ro_plen; + } else if (!(m->m_flags & (M_BCAST | M_MCAST))) { + if ((ro->ro_flags & RT_LLE_CACHE) != 0) { + lle = ro->ro_lle; + if (lle != NULL && + (lle->la_flags & LLE_VALID) == 0) { + LLE_FREE(lle); + lle = NULL; /* redundant */ + ro->ro_lle = NULL; + } + if (lle == NULL) { + /* if we lookup, keep cache */ + addref = 1; + } else + /* + * Notify LLE code that + * the entry was used + * by datapath. + */ + llentry_mark_used(lle); + } + if (lle != NULL) { + phdr = lle->r_linkdata; + hlen = lle->r_hdrlen; + pflags = lle->r_flags; + } + } + } + +#ifdef MAC + error = mac_ifnet_check_transmit(ifp, m); + if (error) + goto bad; +#endif + + M_PROFILE(m); + if (ifp->if_flags & IFF_MONITOR) { + error = ENETDOWN; goto bad; } + if (!((ifp->if_flags & IFF_UP) && + (ifp->if_drv_flags & IFF_DRV_RUNNING))) { + error = ENETDOWN; + goto bad; + } + + if (phdr == NULL) { + /* No prepend data supplied. Try to calculate ourselves. */ + phdr = linkhdr; + hlen = INFINIBAND_HDR_LEN; + error = infiniband_resolve_addr(ifp, m, dst, ro, phdr, &pflags, + addref ? &lle : NULL); + if (addref && lle != NULL) + ro->ro_lle = lle; + if (error != 0) + return (error == EWOULDBLOCK ? 0 : error); + } + + if ((pflags & RT_L2_ME) != 0) { + update_mbuf_csumflags(m, m); + return (if_simloop(ifp, m, dst->sa_family, 0)); + } /* - * Add local net header. If no space in first mbuf, + * Add local infiniband header. If no space in first mbuf, * allocate another. */ M_PREPEND(m, INFINIBAND_HDR_LEN, M_NOWAIT); @@ -283,16 +380,15 @@ infiniband_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, error = ENOBUFS; goto bad; } - ibh = mtod(m, struct infiniband_header *); - - ibh->ib_protocol = type; - memcpy(ibh->ib_hwaddr, edst, sizeof(edst)); + if ((pflags & RT_HAS_HEADER) == 0) { + ih = mtod(m, struct infiniband_header *); + memcpy(ih, phdr, hlen); + } /* * Queue message on interface, update output statistics if * successful, and start output if interface not yet active. */ -output: return (ifp->if_transmit(ifp, m)); bad: if (m != NULL) @@ -482,6 +578,7 @@ infiniband_ifattach(struct ifnet *ifp, const uint8_t *lla, const uint8_t *llb) ifp->if_output = infiniband_output; ifp->if_input = infiniband_input; ifp->if_resolvemulti = infiniband_resolvemulti; + ifp->if_requestencap = infiniband_requestencap; if (ifp->if_baudrate == 0) ifp->if_baudrate = IF_Gbps(10); /* default value */ From owner-dev-commits-src-all@freebsd.org Tue Jan 12 16:40:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD6574DE24D; Tue, 12 Jan 2021 16:40: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFbt44BqQz3mwq; Tue, 12 Jan 2021 16:40: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 830671A3; Tue, 12 Jan 2021 16:40: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 10CGeiCn082671; Tue, 12 Jan 2021 16:40:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CGeiH9082670; Tue, 12 Jan 2021 16:40:44 GMT (envelope-from git) Date: Tue, 12 Jan 2021 16:40:44 GMT Message-Id: <202101121640.10CGeiH9082670@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: 5a6dd9d6f4f8 - stable/12 - MFC 19ecb5e8dabe: Fix for IPoIB over lagg(4). 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: 5a6dd9d6f4f8e9cfa084edc36ca650375ba4a322 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:40:44 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=5a6dd9d6f4f8e9cfa084edc36ca650375ba4a322 commit 5a6dd9d6f4f8e9cfa084edc36ca650375ba4a322 Author: Hans Petter Selasky AuthorDate: 2020-12-29 16:34:01 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:35:49 +0000 MFC 19ecb5e8dabe: Fix for IPoIB over lagg(4). Need to update both link layer address and broadcast address when active link changes for IP over infiniband. This is because the broadcast address contains the so-called P-key, which is interface dependent. Reviewed by: kib @ Differential Revision: https://reviews.freebsd.org/D27658 Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/net/if_lagg.c | 12 +++++------- sys/net/if_lagg.h | 5 +++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 4699a6b8d769..049978bcfd6c 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -496,11 +496,6 @@ lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) int if_type; int error; static const uint8_t eaddr[LAGG_ADDR_LEN]; - static const uint8_t ib_bcast_addr[INFINIBAND_ADDR_LEN] = { - 0x00, 0xff, 0xff, 0xff, - 0xff, 0x12, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff - }; if (params != NULL) { error = copyin(params, &iflp, sizeof(iflp)); @@ -582,7 +577,7 @@ lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) ether_ifattach(ifp, eaddr); break; case IFT_INFINIBAND: - infiniband_ifattach(ifp, eaddr, ib_bcast_addr); + infiniband_ifattach(ifp, eaddr, sc->sc_bcast_addr); break; default: break; @@ -1214,8 +1209,11 @@ lagg_watchdog_infiniband(void *arg) lp_ifp = lp->lp_ifp; if (ifp != NULL && lp_ifp != NULL && - memcmp(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen) != 0) { + (memcmp(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen) != 0 || + memcmp(sc->sc_bcast_addr, lp_ifp->if_broadcastaddr, ifp->if_addrlen) != 0)) { memcpy(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen); + memcpy(sc->sc_bcast_addr, lp_ifp->if_broadcastaddr, ifp->if_addrlen); + CURVNET_SET(ifp->if_vnet); EVENTHANDLER_INVOKE(iflladdr_event, ifp); CURVNET_RESTORE(); diff --git a/sys/net/if_lagg.h b/sys/net/if_lagg.h index 2a7796748786..de0fdd712b3e 100644 --- a/sys/net/if_lagg.h +++ b/sys/net/if_lagg.h @@ -257,13 +257,14 @@ struct lagg_softc { int flowid_shift; /* shift the flowid */ struct lagg_counters detached_counters; /* detached ports sum */ struct callout sc_watchdog; /* watchdog timer */ +#define LAGG_ADDR_LEN \ + MAX(INFINIBAND_ADDR_LEN, ETHER_ADDR_LEN) + uint8_t sc_bcast_addr[LAGG_ADDR_LEN]; }; struct lagg_port { struct ifnet *lp_ifp; /* physical interface */ struct lagg_softc *lp_softc; /* parent lagg */ -#define LAGG_ADDR_LEN \ - MAX(INFINIBAND_ADDR_LEN, ETHER_ADDR_LEN) uint8_t lp_lladdr[LAGG_ADDR_LEN]; u_char lp_iftype; /* interface type */ From owner-dev-commits-src-all@freebsd.org Tue Jan 12 16:42:51 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 402FF4DE274; Tue, 12 Jan 2021 16:42: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFbwW1Mbjz3n6D; Tue, 12 Jan 2021 16:42: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 21A2A2FED6; Tue, 12 Jan 2021 16:42: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 10CGgpVo086947; Tue, 12 Jan 2021 16:42:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CGgpoB086946; Tue, 12 Jan 2021 16:42:51 GMT (envelope-from git) Date: Tue, 12 Jan 2021 16:42:51 GMT Message-Id: <202101121642.10CGgpoB086946@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: 8d9bc45628bb - stable/12 - MFC ddce63fcb6d0: Remove not needed variable initialization. And switch from int to bool while at it. 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: 8d9bc45628bbb7200dd5e41e3a44119405307842 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:42:51 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=8d9bc45628bbb7200dd5e41e3a44119405307842 commit 8d9bc45628bbb7200dd5e41e3a44119405307842 Author: Hans Petter Selasky AuthorDate: 2020-12-23 10:37:44 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:41:39 +0000 MFC ddce63fcb6d0: Remove not needed variable initialization. And switch from int to bool while at it. Reviewed by: melifaro@ Differential Revision: https://reviews.freebsd.org/D27725 Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/net/if_ethersubr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 9591d9f1ebcc..532d6a7a342b 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -289,7 +289,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m, char linkhdr[ETHER_HDR_LEN], *phdr; struct ether_header *eh; struct pf_mtag *t; - int loop_copy = 1; + bool loop_copy; int hlen; /* link layer header length */ uint32_t pflags; struct llentry *lle = NULL; @@ -359,7 +359,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m, update_mbuf_csumflags(m, m); return (if_simloop(ifp, m, dst->sa_family, 0)); } - loop_copy = pflags & RT_MAY_LOOP; + loop_copy = (pflags & RT_MAY_LOOP) != 0; /* * Add local net header. If no space in first mbuf, From owner-dev-commits-src-all@freebsd.org Tue Jan 12 16:51:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D3DE4DE5B8; Tue, 12 Jan 2021 16:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFc5w2pCKz3nZn; Tue, 12 Jan 2021 16:51: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 530B231D; Tue, 12 Jan 2021 16:51: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 10CGp0j4095631; Tue, 12 Jan 2021 16:51:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CGp0Ns095630; Tue, 12 Jan 2021 16:51:00 GMT (envelope-from git) Date: Tue, 12 Jan 2021 16:51:00 GMT Message-Id: <202101121651.10CGp0Ns095630@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: 92b2a4deed65 - stable/12 - MFC 1622a498525b: No need to stop XHCI endpoints in disabled state. 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: 92b2a4deed657a389cdbf91d92ab20ae6996989c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:51:00 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=92b2a4deed657a389cdbf91d92ab20ae6996989c commit 92b2a4deed657a389cdbf91d92ab20ae6996989c Author: Hans Petter Selasky AuthorDate: 2020-12-23 10:54:42 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:44:02 +0000 MFC 1622a498525b: No need to stop XHCI endpoints in disabled state. Some AMD XHCI implementations apparently assert a permanent internal failure if this happens. Submitted by: ali.abdallah@suse.com PR: 251503 Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/usb/controller/xhci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 2bdb77f4ad25..70a73dcc94c4 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -3896,6 +3896,8 @@ xhci_configure_reset_endpoint(struct usb_xfer *xfer) * endpoint context state diagram in the XHCI specification: */ switch (xhci_get_endpoint_state(udev, epno)) { + case XHCI_EPCTX_0_EPSTATE_DISABLED: + break; case XHCI_EPCTX_0_EPSTATE_STOPPED: break; case XHCI_EPCTX_0_EPSTATE_HALTED: From owner-dev-commits-src-all@freebsd.org Tue Jan 12 16:51:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B948E4DE3DB; Tue, 12 Jan 2021 16:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFc5y4pkvz3nVp; Tue, 12 Jan 2021 16:51: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 979292FFEC; Tue, 12 Jan 2021 16:51: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 10CGp2Gd095672; Tue, 12 Jan 2021 16:51:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CGp2cS095671; Tue, 12 Jan 2021 16:51:02 GMT (envelope-from git) Date: Tue, 12 Jan 2021 16:51:02 GMT Message-Id: <202101121651.10CGp2cS095671@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: e424e6325355 - stable/12 - MFC 9e7fa1e66c1e: Collect statistics from all rate-limit queues in mlx5en(4). 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: e424e632535539a72604c651d071e2e8bf6eadbb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:51:02 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=e424e632535539a72604c651d071e2e8bf6eadbb commit e424e632535539a72604c651d071e2e8bf6eadbb Author: Hans Petter Selasky AuthorDate: 2020-10-12 08:18:48 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:47:00 +0000 MFC 9e7fa1e66c1e: Collect statistics from all rate-limit queues in mlx5en(4). Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index ef500664cdef..b22f949fdb87 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -904,6 +904,30 @@ mlx5e_update_stats_locked(struct mlx5e_priv *priv) } } +#ifdef RATELIMIT + /* Collect statistics from all rate-limit queues */ + for (j = 0; j < priv->rl.param.tx_worker_threads_def; j++) { + struct mlx5e_rl_worker *rlw = priv->rl.workers + j; + + for (i = 0; i < priv->rl.param.tx_channels_per_worker_def; i++) { + struct mlx5e_rl_channel *channel = rlw->channels + i; + struct mlx5e_sq *sq = channel->sq; + + if (sq == NULL) + continue; + + sq_stats = &sq->stats; + + tso_packets += sq_stats->tso_packets; + tso_bytes += sq_stats->tso_bytes; + tx_queue_dropped += sq_stats->dropped; + tx_queue_dropped += sq_stats->enobuf; + tx_defragged += sq_stats->defragged; + tx_offload_none += sq_stats->csum_offload_none; + } + } +#endif + /* update counters */ s->tso_packets = tso_packets; s->tso_bytes = tso_bytes; From owner-dev-commits-src-all@freebsd.org Tue Jan 12 16:51:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 959E14DE72A; Tue, 12 Jan 2021 16:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFc5x3mydz3njT; Tue, 12 Jan 2021 16:51: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 748451CB; Tue, 12 Jan 2021 16:51: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 10CGp1a9095654; Tue, 12 Jan 2021 16:51:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CGp14X095653; Tue, 12 Jan 2021 16:51:01 GMT (envelope-from git) Date: Tue, 12 Jan 2021 16:51:01 GMT Message-Id: <202101121651.10CGp14X095653@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: 79818c801026 - stable/12 - MFC aca12148b113: Improve error message printing in krping. Don't print completion queue flush as an error. 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: 79818c80102617558796df7b1cd9b7087cf39830 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:51:01 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=79818c80102617558796df7b1cd9b7087cf39830 commit 79818c80102617558796df7b1cd9b7087cf39830 Author: Hans Petter Selasky AuthorDate: 2020-12-09 12:59:01 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:45:45 +0000 MFC aca12148b113: Improve error message printing in krping. Don't print completion queue flush as an error. Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/contrib/rdma/krping/krping.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/contrib/rdma/krping/krping.c b/sys/contrib/rdma/krping/krping.c index c734da36247f..e9a379984dec 100644 --- a/sys/contrib/rdma/krping/krping.c +++ b/sys/contrib/rdma/krping/krping.c @@ -362,10 +362,6 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx) int ret; BUG_ON(cb->cq != cq); - if (cb->state == ERROR) { - printk(KERN_ERR PFX "cq completion in ERROR state\n"); - return; - } if (cb->frtest) { printk(KERN_ERR PFX "cq completion event in frtest!\n"); return; @@ -384,7 +380,10 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx) goto error; } } - + if (cb->state == ERROR) { + printk(KERN_ERR PFX "cq completion in ERROR state\n"); + return; + } switch (wc.opcode) { case IB_WC_SEND: DEBUG_LOG("send completion\n"); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 16:51:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70E804DE784; Tue, 12 Jan 2021 16:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFc605L8Nz3nm5; Tue, 12 Jan 2021 16:51: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 DB9C52FF49; Tue, 12 Jan 2021 16:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10CGp3Hm095694; Tue, 12 Jan 2021 16:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CGp3V4095693; Tue, 12 Jan 2021 16:51:03 GMT (envelope-from git) Date: Tue, 12 Jan 2021 16:51:03 GMT Message-Id: <202101121651.10CGp3V4095693@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: 9566c2ab4eda - stable/12 - MFC c834f30a0c16: Add new PCI ID for XHCI(4). 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: 9566c2ab4eda314a843d2f3dc72780accdc91927 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:51:09 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=9566c2ab4eda314a843d2f3dc72780accdc91927 commit 9566c2ab4eda314a843d2f3dc72780accdc91927 Author: Hans Petter Selasky AuthorDate: 2021-01-07 14:27:24 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:47:35 +0000 MFC c834f30a0c16: Add new PCI ID for XHCI(4). Submitted by: Dmitry Luhtionov Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/usb/controller/xhci_pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c index d18a115709b1..4c64fc5c8d94 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -134,6 +134,8 @@ xhci_pci_match(device_t self) return ("Intel Panther Point USB 3.0 controller"); case 0x22b58086: return ("Intel Braswell USB 3.0 controller"); + case 0x31a88086: + return ("Intel Gemini Lake USB 3.0 controller"); case 0x5aa88086: return ("Intel Apollo Lake USB 3.0 controller"); case 0x8c318086: From owner-dev-commits-src-all@freebsd.org Tue Jan 12 16:51:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99FEB4DE785; Tue, 12 Jan 2021 16:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFc613fkLz3nW5; Tue, 12 Jan 2021 16:51: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 EAFF22FE76; Tue, 12 Jan 2021 16:51: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 10CGp47R095716; Tue, 12 Jan 2021 16:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CGp4U2095715; Tue, 12 Jan 2021 16:51:04 GMT (envelope-from git) Date: Tue, 12 Jan 2021 16:51:04 GMT Message-Id: <202101121651.10CGp4U2095715@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: 2e0dd1574137 - stable/12 - MFC ea0efc370416: Add support for PL2303HXN to uplcom(4). 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: 2e0dd1574137757c4267c38c11493aab005136e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:51:07 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=2e0dd1574137757c4267c38c11493aab005136e3 commit 2e0dd1574137757c4267c38c11493aab005136e3 Author: Hans Petter Selasky AuthorDate: 2021-01-07 14:34:26 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:48:06 +0000 MFC ea0efc370416: Add support for PL2303HXN to uplcom(4). Code changes in this commit were obtained from straight from OpenBSD's uplcom.c with almost no modification, the list of chip names and USB IDs was obtained from Linux. Differential Revision: https://reviews.freebsd.org/D27952 Submitted by: tomli_tomli.me (Yifeng Li) Sponsored by: Mellanox Technologies // NVIDIA Networking --- share/man/man4/uplcom.4 | 4 +- sys/dev/usb/serial/uplcom.c | 94 +++++++++++++++++++++++++++++++++++++++------ sys/dev/usb/usbdevs | 6 +++ 3 files changed, 92 insertions(+), 12 deletions(-) diff --git a/share/man/man4/uplcom.4 b/share/man/man4/uplcom.4 index b79aac28a80c..3066551b4ab4 100644 --- a/share/man/man4/uplcom.4 +++ b/share/man/man4/uplcom.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2018 +.Dd January 7, 2021 .Dt UPLCOM 4 .Os .Sh NAME @@ -134,6 +134,8 @@ PLANEX USB-RS232 URS-03 .It Prolific Generic USB-Serial Adapters .It +Prolific Generic USB-Serial Adapters (HXN) +.It Prolific Pharos USB-Serial Adapter .It Prolific USB-Serial Controller D diff --git a/sys/dev/usb/serial/uplcom.c b/sys/dev/usb/serial/uplcom.c index a054601cc8ea..5bbbab94feb6 100644 --- a/sys/dev/usb/serial/uplcom.c +++ b/sys/dev/usb/serial/uplcom.c @@ -131,8 +131,13 @@ SYSCTL_INT(_hw_usb_uplcom, OID_AUTO, debug, CTLFLAG_RWTUN, #define UPLCOM_BULK_BUF_SIZE 1024 /* bytes */ #define UPLCOM_SET_REQUEST 0x01 +#define UPLCOM_SET_REQUEST_PL2303HXN 0x80 #define UPLCOM_SET_CRTSCTS 0x41 #define UPLCOM_SET_CRTSCTS_PL2303X 0x61 +#define UPLCOM_SET_CRTSCTS_PL2303HXN 0xFA +#define UPLCOM_CLEAR_CRTSCTS_PL2303HXN 0xFF +#define UPLCOM_CRTSCTS_REG_PL2303HXN 0x0A +#define UPLCOM_STATUS_REG_PL2303HX 0x8080 #define RSAQ_STATUS_CTS 0x80 #define RSAQ_STATUS_OVERRUN_ERROR 0x40 #define RSAQ_STATUS_PARITY_ERROR 0x20 @@ -145,6 +150,7 @@ SYSCTL_INT(_hw_usb_uplcom, OID_AUTO, debug, CTLFLAG_RWTUN, #define TYPE_PL2303 0 #define TYPE_PL2303HX 1 #define TYPE_PL2303HXD 2 +#define TYPE_PL2303HXN 3 #define UPLCOM_STATE_INDEX 8 @@ -289,6 +295,12 @@ static const STRUCT_USB_HOST_ID uplcom_devs[] = { UPLCOM_DEV(PROLIFIC, MOTOROLA), /* Motorola cable */ UPLCOM_DEV(PROLIFIC, PHAROS), /* Prolific Pharos */ UPLCOM_DEV(PROLIFIC, PL2303), /* Generic adapter */ + UPLCOM_DEV(PROLIFIC, PL2303GC), /* Generic adapter (PL2303HXN, type GC) */ + UPLCOM_DEV(PROLIFIC, PL2303GB), /* Generic adapter (PL2303HXN, type GB) */ + UPLCOM_DEV(PROLIFIC, PL2303GT), /* Generic adapter (PL2303HXN, type GT) */ + UPLCOM_DEV(PROLIFIC, PL2303GL), /* Generic adapter (PL2303HXN, type GL) */ + UPLCOM_DEV(PROLIFIC, PL2303GE), /* Generic adapter (PL2303HXN, type GE) */ + UPLCOM_DEV(PROLIFIC, PL2303GS), /* Generic adapter (PL2303HXN, type GS) */ UPLCOM_DEV(PROLIFIC, RSAQ2), /* I/O DATA USB-RSAQ2 */ UPLCOM_DEV(PROLIFIC, RSAQ3), /* I/O DATA USB-RSAQ3 */ UPLCOM_DEV(PROLIFIC, UIC_MSR206), /* UIC MSR206 Card Reader */ @@ -368,6 +380,10 @@ uplcom_attach(device_t dev) struct usb_device_descriptor *dd; int error; + struct usb_device_request req; + usb_error_t err; + uint8_t buf[4]; + DPRINTFN(11, "\n"); device_set_usb_desc(dev); @@ -407,6 +423,25 @@ uplcom_attach(device_t dev) break; } + /* + * The new chip revision PL2303HXN is only compatible with the new + * UPLCOM_SET_REQUEST_PL2303HXN command. Issuing the old command + * UPLCOM_SET_REQUEST to the new chip raises an error. Thus, PL2303HX + * and PL2303HXN can be distinguished by issuing an old-style request + * (on a status register) to the new chip and checking the error. + */ + if (sc->sc_chiptype == TYPE_PL2303HX) { + req.bmRequestType = UT_READ_VENDOR_DEVICE; + req.bRequest = UPLCOM_SET_REQUEST; + USETW(req.wValue, UPLCOM_STATUS_REG_PL2303HX); + req.wIndex[0] = sc->sc_data_iface_no; + req.wIndex[1] = 0; + USETW(req.wLength, 1); + err = usbd_do_request(sc->sc_udev, NULL, &req, buf); + if (err) + sc->sc_chiptype = TYPE_PL2303HXN; + } + switch (sc->sc_chiptype) { case TYPE_PL2303: DPRINTF("chiptype: 2303\n"); @@ -414,6 +449,9 @@ uplcom_attach(device_t dev) case TYPE_PL2303HX: DPRINTF("chiptype: 2303HX/TA\n"); break; + case TYPE_PL2303HXN: + DPRINTF("chiptype: 2303HXN\n"); + break; case TYPE_PL2303HXD: DPRINTF("chiptype: 2303HXD/TB/RA/EA\n"); break; @@ -475,7 +513,8 @@ uplcom_attach(device_t dev) usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_WR]); usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_RD]); mtx_unlock(&sc->sc_mtx); - } else { + } else if (sc->sc_chiptype == TYPE_PL2303HX || + sc->sc_chiptype == TYPE_PL2303HXD) { /* reset upstream data pipes */ if (uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 8, 0, 0) || @@ -483,6 +522,12 @@ uplcom_attach(device_t dev) UPLCOM_SET_REQUEST, 9, 0, 0)) { goto detach; } + } else if (sc->sc_chiptype == TYPE_PL2303HXN) { + /* reset upstream data pipes */ + if (uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE, + UPLCOM_SET_REQUEST_PL2303HXN, 0x07, 0x03, 0)) { + goto detach; + } } error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, @@ -546,6 +591,11 @@ uplcom_reset(struct uplcom_softc *sc, struct usb_device *udev) { struct usb_device_request req; + if (sc->sc_chiptype == TYPE_PL2303HXN) { + /* PL2303HXN doesn't need this reset sequence */ + return (0); + } + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = UPLCOM_SET_REQUEST; USETW(req.wValue, 0); @@ -583,6 +633,11 @@ uplcom_pl2303_init(struct usb_device *udev, uint8_t chiptype) { int err; + if (chiptype == TYPE_PL2303HXN) { + /* PL2303HXN doesn't need this initialization sequence */ + return (0); + } + if (uplcom_pl2303_do(udev, UT_READ_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x8484, 0, 1) || uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404, 0, 0) || uplcom_pl2303_do(udev, UT_READ_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x8484, 0, 1) @@ -729,7 +784,7 @@ uplcom_pre_param(struct ucom_softc *ucom, struct termios *t) * * The PL2303 can only set specific baud rates, up to 1228800 baud. * The PL2303HX can set any baud rate up to 6Mb. - * The PL2303HX rev. D can set any baud rate up to 12Mb. + * The PL2303HX rev. D and PL2303HXN can set any baud rate up to 12Mb. * */ @@ -737,6 +792,10 @@ uplcom_pre_param(struct ucom_softc *ucom, struct termios *t) if (t->c_ospeed & 0x80000000) return 0; switch (sc->sc_chiptype) { + case TYPE_PL2303HXN: + if (t->c_ospeed <= 12000000) + return (0); + break; case TYPE_PL2303HXD: if (t->c_ospeed <= 12000000) return (0); @@ -874,21 +933,34 @@ uplcom_cfg_param(struct ucom_softc *ucom, struct termios *t) DPRINTF("crtscts = on\n"); req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = UPLCOM_SET_REQUEST; - USETW(req.wValue, 0); - if (sc->sc_chiptype != TYPE_PL2303) - USETW(req.wIndex, UPLCOM_SET_CRTSCTS_PL2303X); - else - USETW(req.wIndex, UPLCOM_SET_CRTSCTS); + if (sc->sc_chiptype == TYPE_PL2303HXN) { + req.bRequest = UPLCOM_SET_REQUEST_PL2303HXN; + USETW(req.wValue, UPLCOM_CRTSCTS_REG_PL2303HXN); + USETW(req.wIndex, UPLCOM_SET_CRTSCTS_PL2303HXN); + } else { + req.bRequest = UPLCOM_SET_REQUEST; + USETW(req.wValue, 0); + if (sc->sc_chiptype != TYPE_PL2303) + USETW(req.wIndex, UPLCOM_SET_CRTSCTS_PL2303X); + else + USETW(req.wIndex, UPLCOM_SET_CRTSCTS); + } USETW(req.wLength, 0); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); } else { req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = UPLCOM_SET_REQUEST; - USETW(req.wValue, 0); - USETW(req.wIndex, 0); + if (sc->sc_chiptype == TYPE_PL2303HXN) { + req.bRequest = UPLCOM_SET_REQUEST_PL2303HXN; + USETW(req.wValue, UPLCOM_CRTSCTS_REG_PL2303HXN); + USETW(req.wIndex, UPLCOM_CLEAR_CRTSCTS_PL2303HXN); + } + else { + req.bRequest = UPLCOM_SET_REQUEST; + USETW(req.wValue, 0); + USETW(req.wIndex, 0); + } USETW(req.wLength, 0); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index b64526593c25..84508657b6ef 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3794,6 +3794,12 @@ product PROLIFIC MICROMAX_610U 0x0612 Micromax 610U product PROLIFIC DCU11 0x1234 DCU-11 Phone Cable product PROLIFIC UIC_MSR206 0x206a UIC MSR206 Card Reader product PROLIFIC PL2303 0x2303 PL2303 Serial (ATEN/IOGEAR UC232A) +product PROLIFIC PL2303GC 0x23a3 PL2303HXN Serial, type GC +product PROLIFIC PL2303GB 0x23b3 PL2303HXN Serial, type GB +product PROLIFIC PL2303GT 0x23c3 PL2303HXN Serial, type GT +product PROLIFIC PL2303GL 0x23d3 PL2303HXN Serial, type GL +product PROLIFIC PL2303GE 0x23e3 PL2303HXN Serial, type GE +product PROLIFIC PL2303GS 0x23f3 PL2303HXN Serial, type GS product PROLIFIC PL2305 0x2305 Parallel printer product PROLIFIC ATAPI4 0x2307 ATAPI-4 Controller product PROLIFIC PL2501 0x2501 PL2501 Host-Host interface From owner-dev-commits-src-all@freebsd.org Tue Jan 12 17:33:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 761A04E0166; Tue, 12 Jan 2021 17:33: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFd3B2yNfz3sPN; Tue, 12 Jan 2021 17: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 58722BF4; Tue, 12 Jan 2021 17: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 10CHXgYX052487; Tue, 12 Jan 2021 17: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 10CHXg1q052486; Tue, 12 Jan 2021 17:33:42 GMT (envelope-from git) Date: Tue, 12 Jan 2021 17:33:42 GMT Message-Id: <202101121733.10CHXg1q052486@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: 6e5baec33c10 - main - Fix for use-after-free in if_ure(4) driver. 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: 6e5baec33c1032f4fbf713d601a34b4658b918a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 17:33:42 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=6e5baec33c1032f4fbf713d601a34b4658b918a2 commit 6e5baec33c1032f4fbf713d601a34b4658b918a2 Author: Hans Petter Selasky AuthorDate: 2021-01-12 13:13:14 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-12 16:57:58 +0000 Fix for use-after-free in if_ure(4) driver. When detaching the if_ure(4) driver, the TX active USB transfer array may point to freed USB transfers. Given that the number of USB transfers is very low, simply start all transfers every time there is a packet to keep safe from use-after-free. PR: 252608 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/usb/net/if_ure.c | 49 ++++----------------------------------------- sys/dev/usb/net/if_urereg.h | 9 --------- 2 files changed, 4 insertions(+), 54 deletions(-) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index 9d43b9a59a44..30fcee59cce3 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -581,13 +581,6 @@ ure_attach(device_t dev) goto detach; } - /* Mark all TX transfers as available */ - for (int i = 0; i < URE_N_TRANSFER; i++) { - sc->sc_txavail[i] = sc->sc_tx_xfer[i]; - DEVPRINTF(dev, "sc_txavail[%d] = %p\n", i, sc->sc_txavail[i]); - } - sc->sc_txpos = 0; - ue->ue_sc = sc; ue->ue_dev = dev; ue->ue_udev = uaa->device; @@ -870,16 +863,6 @@ pkterror: usbd_transfer_submit(xfer); - KASSERT(sc->sc_txpos >= 0 && sc->sc_txpos <= URE_N_TRANSFER, - ("sc_txpos invalid: %d", sc->sc_txpos)); - if (sc->sc_txpos < URE_N_TRANSFER && - !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - xfer = sc->sc_txavail[sc->sc_txpos++]; - usbd_transfer_start(xfer); - } - - if (sc->sc_txpos == URE_N_TRANSFER) - ifp->if_drv_flags |= IFF_DRV_OACTIVE; return; default: /* Error */ @@ -900,11 +883,6 @@ pkterror: goto tr_setup; } } - - KASSERT(sc->sc_txpos > 0 && sc->sc_txpos <= URE_N_TRANSFER, ("sc_txpos invalid: %d", sc->sc_txpos)); - sc->sc_txavail[(--(sc->sc_txpos))] = xfer; - if (sc->sc_txpos < URE_N_TRANSFER) - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } static void @@ -1110,10 +1088,7 @@ ure_tick(struct usb_ether *ue) URE_LOCK_ASSERT(sc, MA_OWNED); - KASSERT(sc->sc_txpos >= 0 && sc->sc_txpos <= URE_N_TRANSFER, ("sc_txpos invalid: %d", sc->sc_txpos)); (void)ifp; - DEVPRINTFN(13, sc->sc_ue.ue_dev, - "sc_txpos: %d, oactive: %d\n", sc->sc_txpos, !!(ifp->if_drv_flags & IFF_DRV_OACTIVE)); for (int i = 0; i < URE_N_TRANSFER; i++) DEVPRINTFN(13, sc->sc_ue.ue_dev, "rx[%d] = %d\n", i, USB_GET_STATE(sc->sc_rx_xfer[i])); @@ -1190,34 +1165,18 @@ static void ure_start(struct usb_ether *ue) { struct ure_softc *sc = uether_getsc(ue); - struct usb_xfer *xfer; - struct ifnet *ifp; + unsigned i; URE_LOCK_ASSERT(sc, MA_OWNED); if (!sc->sc_rxstarted) { sc->sc_rxstarted = 1; - for (int i = 0; i < URE_N_TRANSFER; i++) + for (i = 0; i != URE_N_TRANSFER; i++) usbd_transfer_start(sc->sc_rx_xfer[i]); } - /* - * start the USB transfers, if not already started: - */ - if (sc->sc_txpos == URE_N_TRANSFER) { - ifp = uether_getifp(&sc->sc_ue); - - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - return; - } - - KASSERT(sc->sc_txpos >= 0 && sc->sc_txpos < URE_N_TRANSFER, ("sc_txpos invalid: %d", sc->sc_txpos)); - xfer = sc->sc_txavail[sc->sc_txpos++]; - if (sc->sc_txpos == URE_N_TRANSFER) { - ifp = uether_getifp(&sc->sc_ue); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - } - usbd_transfer_start(xfer); + for (i = 0; i != URE_N_TRANSFER; i++) + usbd_transfer_start(sc->sc_tx_xfer[i]); } static void diff --git a/sys/dev/usb/net/if_urereg.h b/sys/dev/usb/net/if_urereg.h index 2eb3de4d48e8..6b6f99434313 100644 --- a/sys/dev/usb/net/if_urereg.h +++ b/sys/dev/usb/net/if_urereg.h @@ -445,15 +445,6 @@ struct ure_softc { int sc_rxstarted; - struct usb_xfer *sc_txavail[URE_N_TRANSFER]; - /* - * Position of next available xfer for TX. If - * sc_txpos == URE_N_TRANSFER, no tx xfer's are available. - * Pop xfer: sc->sc_txavail[sc->sc_txpos++] - * Push xfer: sc->sc_txavail[(--(sc->sc_txpos))] = xfer - */ - int sc_txpos; - int sc_phyno; u_int sc_flags; From owner-dev-commits-src-all@freebsd.org Tue Jan 12 18:40:51 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0320D4E24B7; Tue, 12 Jan 2021 18:40: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFfXf4K4nz4VV2; Tue, 12 Jan 2021 18:40: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 6B72A14ED; Tue, 12 Jan 2021 18:40: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 10CIeopB038387; Tue, 12 Jan 2021 18:40:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CIeoQd038386; Tue, 12 Jan 2021 18:40:50 GMT (envelope-from git) Date: Tue, 12 Jan 2021 18:40:50 GMT Message-Id: <202101121840.10CIeoQd038386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: d2ceee38ca26 - main - casper: convert macros to inline functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2ceee38ca26d8ea48b8dfd9018636eadd41fbc4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 18:40:51 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=d2ceee38ca26d8ea48b8dfd9018636eadd41fbc4 commit d2ceee38ca26d8ea48b8dfd9018636eadd41fbc4 Author: Mariusz Zaborski AuthorDate: 2021-01-12 18:38:10 +0000 Commit: Mariusz Zaborski CommitDate: 2021-01-12 18:40:45 +0000 casper: convert macros to inline functions In libcasper, the first argument to the function is a structure that represents a connection to Casper. On systems without Casper, macros are used to interpose the Casper functions to standard libc ones. This may cause errors/warnings that the variable is not used. With the inline function, there is no such problem. I omitted this file in: 8c121177f063a187534dcd475b136c34474802cd --- lib/libcasper/libcasper/libcasper.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper.h b/lib/libcasper/libcasper/libcasper.h index c8ed184d92cd..b55619b01506 100644 --- a/lib/libcasper/libcasper/libcasper.h +++ b/lib/libcasper/libcasper/libcasper.h @@ -123,8 +123,21 @@ cap_channel_t *cap_service_open(const cap_channel_t *chan, const char *name); int cap_service_limit(const cap_channel_t *chan, const char * const *names, size_t nnames); #else -#define cap_service_open(chan, name) (cap_init()) -#define cap_service_limit(chan, names, nnames) (0) +static inline cap_channel_t * +cap_service_open(const cap_channel_t *chan __unused, + const char *name __unused) +{ + + return (cap_init()); +} + +static inline int +cap_service_limit(const cap_channel_t *chan __unused, + const char * const *names __unused, size_t nnames __unused) +{ + + return (0); +} #endif /* @@ -229,7 +242,13 @@ int cap_sock(const cap_channel_t *chan); #ifdef WITH_CASPER int cap_limit_set(const cap_channel_t *chan, nvlist_t *limits); #else -#define cap_limit_set(chan, limits) (0) +static inline int +cap_limit_set(const cap_channel_t *chan __unused, + nvlist_t *limits __unused) +{ + + return (0); +} #endif /* From owner-dev-commits-src-all@freebsd.org Tue Jan 12 21:11:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAC3B4E618C; Tue, 12 Jan 2021 21:11:48 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFjtr38f4z4fvf; Tue, 12 Jan 2021 21:11:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:96c:12e6:ae9f:21b7]) (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 91126206FB; Tue, 12 Jan 2021 21:11:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 44121a0fbee0 - main - amd64: fix tlb shootdown when all cpus are passed in the bitmap To: Mateusz Guzik , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101120854.10C8s6Gr075398@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <912ef087-e9e8-1bb5-5063-88bccb834db1@FreeBSD.org> Date: Tue, 12 Jan 2021 13:11:43 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <202101120854.10C8s6Gr075398@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 21:11:49 -0000 On 1/12/21 12:54 AM, Mateusz Guzik wrote: > The branch main has been updated by mjg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=44121a0fbee0272e23bfb90601d177ba9e9cda9b > > commit 44121a0fbee0272e23bfb90601d177ba9e9cda9b > Author: Mateusz Guzik > AuthorDate: 2021-01-12 08:47:32 +0000 > Commit: Mateusz Guzik > CommitDate: 2021-01-12 08:47:32 +0000 > > amd64: fix tlb shootdown when all cpus are passed in the bitmap > > Right now the routine leaves the current CPU in the map, later tripping > on an assert when filling in the scoreboard: panic: IPI scoreboard is > zero, initiator 1 target 1 > > Instead pre-check if all CPUs are present in the map and remember that > outcome for later. > > Fixes: 7eaea04a5bb1dc86 ("amd64: compare TLB shootdown target to all_cpus") > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D28111 > --- > sys/amd64/amd64/mp_machdep.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c > index 794a11bf1276..aa62c2086fa4 100644 > --- a/sys/amd64/amd64/mp_machdep.c > +++ b/sys/amd64/amd64/mp_machdep.c > @@ -660,6 +660,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, > * (zeroing slot) and reading from it below (wait for > * acknowledgment). > */ > - if (!CPU_CMP(&mask, &all_cpus)) { > + if (is_all) { > ipi_all_but_self(IPI_INVLOP); > other_cpus = all_cpus; > CPU_CLR(PCPU_GET(cpuid), &other_cpus); At this point isn't other_cpus == mask, so we could just drop other_cpus and use 'mask' directly now? -- John Baldwin From owner-dev-commits-src-all@freebsd.org Tue Jan 12 21:26:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 213094E6B2D; Tue, 12 Jan 2021 21:26:20 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFkCc0JNBz4gyN; Tue, 12 Jan 2021 21:26:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:96c:12e6:ae9f:21b7]) (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 5B37220E06; Tue, 12 Jan 2021 21:26:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 11d62b6f31ab - main - linuxkpi: add kernel_fpu_begin/kernel_fpu_end To: Konstantin Belousov , Emmanuel Vadot Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101121143.10CBh02x095972@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 12 Jan 2021 13:26:18 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 21:26:20 -0000 On 1/12/21 5:16 AM, Konstantin Belousov wrote: > On Tue, Jan 12, 2021 at 11:43:00AM +0000, Emmanuel Vadot wrote: >> The branch main has been updated by manu: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 >> >> commit 11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 >> Author: Emmanuel Vadot >> AuthorDate: 2021-01-12 11:02:38 +0000 >> Commit: Emmanuel Vadot >> CommitDate: 2021-01-12 11:31:00 +0000 >> >> linuxkpi: add kernel_fpu_begin/kernel_fpu_end >> >> With newer AMD GPUs (>=Navi,Renoir) there is FPU context usage in the >> amdgpu driver. >> The `kernel_fpu_begin/end` implementations in drm did not even allow nested >> begin-end blocks. > > Does Linux allow more then one thread to execute kernel_fpu_begin ? I wonder if FPU_KERN_NOCTX is a better fit? https://stackoverflow.com/questions/15934615/calling-kernel-fpu-begin-twice-before-kernel-fpu-end Claims you can't nest, and the body of the functions shown disable preemption which might be a good match for FPU_KERN_NOCTX? Though I'm not sure if Linux permits sleeping while in fpu_kern_begin(). -- John Baldwin From owner-dev-commits-src-all@freebsd.org Tue Jan 12 22:03:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECB6D4E7A34; Tue, 12 Jan 2021 22: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFl1y6KqMz4kP8; Tue, 12 Jan 2021 22: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 CC30E470A; Tue, 12 Jan 2021 22: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 10CM32Dl001235; Tue, 12 Jan 2021 22: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 10CM32a3001234; Tue, 12 Jan 2021 22:03:02 GMT (envelope-from git) Date: Tue, 12 Jan 2021 22:03:02 GMT Message-Id: <202101122203.10CM32a3001234@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: f6dc363f6dd2 - main - nfs-over-tls: handle res.gid.gid_val correctly for memory allocation 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: f6dc363f6dd2f6daa8cb59ecff6964fb86064f9f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 22:03:03 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f6dc363f6dd2f6daa8cb59ecff6964fb86064f9f commit f6dc363f6dd2f6daa8cb59ecff6964fb86064f9f Author: Rick Macklem AuthorDate: 2021-01-12 21:59:52 +0000 Commit: Rick Macklem CommitDate: 2021-01-12 21:59:52 +0000 nfs-over-tls: handle res.gid.gid_val correctly for memory allocation When the server side nfs-over-tls does an upcall to rpc.tlsservd(8) for the handshake and the rpc.tlsservd "-u" command line option has been specified, a list of gids may be returned. The list will be returned in malloc'd memory pointed to by res.gid.gid_val. To ensure the malloc occurs, res.gid.gid_val must be NULL before the call. Then, the malloc'd memory needs to be free'd. mem_free() just calls free(9), so a NULL pointer argument is fine and a length argument == 0 is ok, since the "len" argument is not used. This bug would have only affected nfs-over-tls and only when rpc.tlsservd(8) is running with the "-u" command line option. --- sys/rpc/rpcsec_tls/rpctls_impl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/rpc/rpcsec_tls/rpctls_impl.c b/sys/rpc/rpcsec_tls/rpctls_impl.c index 638f27eaf350..110ba107540a 100644 --- a/sys/rpc/rpcsec_tls/rpctls_impl.c +++ b/sys/rpc/rpcsec_tls/rpctls_impl.c @@ -573,6 +573,7 @@ rpctls_server(SVCXPRT *xprt, struct socket *so, uint32_t *flags, uint64_t *sslp, mtx_unlock(&rpctls_server_lock); /* Do the server upcall. */ + res.gid.gid_val = NULL; stat = rpctlssd_connect_1(NULL, &res, cl); if (stat == RPC_SUCCESS) { *flags = res.flags; @@ -598,6 +599,7 @@ rpctls_server(SVCXPRT *xprt, struct socket *so, uint32_t *flags, uint64_t *sslp, soshutdown(so, SHUT_RD); } CLNT_RELEASE(cl); + mem_free(res.gid.gid_val, 0); /* Once the upcall is done, the daemon is done with the fp and so. */ mtx_lock(&rpctls_server_lock); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 22:05:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46D694E7A60; Tue, 12 Jan 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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFl4p1W7Wz4ksB; Tue, 12 Jan 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 26DA1452E; Tue, 12 Jan 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 10CM5U0Y001809; Tue, 12 Jan 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 10CM5UCq001808; Tue, 12 Jan 2021 22:05:30 GMT (envelope-from git) Date: Tue, 12 Jan 2021 22:05:30 GMT Message-Id: <202101122205.10CM5UCq001808@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: d7493759fbfb - main - netmap: pkt-gen: fix offset hex formatting 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: d7493759fbfb382a008f4036d4cc80c82950daed Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 22:05:30 -0000 The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=d7493759fbfb382a008f4036d4cc80c82950daed commit d7493759fbfb382a008f4036d4cc80c82950daed Author: Vincenzo Maffione AuthorDate: 2021-01-12 22:02:28 +0000 Commit: Vincenzo Maffione CommitDate: 2021-01-12 22:05:04 +0000 netmap: pkt-gen: fix offset hex formatting PR: 252594 Reported by: brpoole@vt.edu MFC after: 3 days --- tools/tools/netmap/pkt-gen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tools/netmap/pkt-gen.c b/tools/tools/netmap/pkt-gen.c index e6237b8ba281..55504c09ae58 100644 --- a/tools/tools/netmap/pkt-gen.c +++ b/tools/tools/netmap/pkt-gen.c @@ -3176,17 +3176,17 @@ main(int arc, char **argv) struct netmap_if *nifp = g.nmd->nifp; struct nmreq_register *req = &g.nmd->reg; - D("nifp at offset %"PRIu64", %d tx %d rx region %d", + D("nifp at offset %"PRIu64" ntxqs %d nrxqs %d memid %d", req->nr_offset, req->nr_tx_rings, req->nr_rx_rings, req->nr_mem_id); for (i = 0; i < req->nr_tx_rings + req->nr_host_tx_rings; i++) { struct netmap_ring *ring = NETMAP_TXRING(nifp, i); - D(" TX%d at 0x%p slots %d", i, + D(" TX%d at offset %p slots %d", i, (void *)((char *)ring - (char *)nifp), ring->num_slots); } for (i = 0; i < req->nr_rx_rings + req->nr_host_rx_rings; i++) { struct netmap_ring *ring = NETMAP_RXRING(nifp, i); - D(" RX%d at 0x%p slots %d", i, + D(" RX%d at offset %p slots %d", i, (void *)((char *)ring - (char *)nifp), ring->num_slots); } } From owner-dev-commits-src-all@freebsd.org Tue Jan 12 22:07:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4DA3D4E7DD6; Tue, 12 Jan 2021 22:07: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFl701nx7z4lJP; Tue, 12 Jan 2021 22:07: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 308A0478B; Tue, 12 Jan 2021 22:07: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 10CM7Onf002297; Tue, 12 Jan 2021 22:07:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CM7OGe002296; Tue, 12 Jan 2021 22:07:24 GMT (envelope-from git) Date: Tue, 12 Jan 2021 22:07:24 GMT Message-Id: <202101122207.10CM7OGe002296@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: d89e1db5a331 - main - if_wg: fix modules load on !x86 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: d89e1db5a3319f4e3bc9403ed883c64638b67f71 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 22:07:24 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d89e1db5a3319f4e3bc9403ed883c64638b67f71 commit d89e1db5a3319f4e3bc9403ed883c64638b67f71 Author: Mitchell Horne AuthorDate: 2021-01-12 21:38:21 +0000 Commit: Mitchell Horne CommitDate: 2021-01-12 22:07:10 +0000 if_wg: fix modules load on !x86 Only x86 provides optimized implementations via the blake2 module. The software "reference" implementation is already included in the crypto(4) module, we can drop the extra MODULE_DEPEND for other platforms. Without this change, if_wg.ko could not be loaded due to the missing dependency. PR: 252156 Reported by: gbe Sponsored by: The FreeBSD Foundation --- sys/dev/if_wg/module/module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/if_wg/module/module.c b/sys/dev/if_wg/module/module.c index c7c71a1a0f72..76c7db01cba1 100644 --- a/sys/dev/if_wg/module/module.c +++ b/sys/dev/if_wg/module/module.c @@ -843,5 +843,8 @@ static moduledata_t wg_moduledata = { DECLARE_MODULE(wg, wg_moduledata, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(wg, 1); MODULE_DEPEND(wg, iflib, 1, 1, 1); +#if defined(__amd64__) || defined(__i386__) +/* Optimized blake2 implementations are only available on x86. */ MODULE_DEPEND(wg, blake2, 1, 1, 1); +#endif MODULE_DEPEND(wg, crypto, 1, 1, 1); From owner-dev-commits-src-all@freebsd.org Tue Jan 12 22:22:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 883D24E84AD; Tue, 12 Jan 2021 22:22:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFlSf3G3sz4mTQ; Tue, 12 Jan 2021 22:22:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x32c.google.com with SMTP id k10so3268490wmi.3; Tue, 12 Jan 2021 14:22:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UTo/iJHSXt3qNECSM519+6wJ0PTYKh+FpsOnOHYv3ls=; b=HJW9vuYePylmsKfqkNeQK7+fpcfYgNOQgDgpw6KrkXz+VcUStMMbvllExb+EENNyyt iT7nNAThqiQ4Jya+Wt+8tM9G2quRneOFtmwcPYJbKUsD0On4/TX87779XIkYSxHR7z6H brPYH2CWwMRFkYL4KkN8IVn+k1xS8EphCdIGcbWUob4id+rFaF6Ia06fe63um3BCGPPJ XNhbc4cq5cZXzm613bYE+sGtpLTsQj9weiBcCwcgomCq41HZURoPcx2CjzCySq+4aDE9 vFWdSFPbFQJmaDzEELz7dcxMRqrVxdNPUC4liqNYSn0ZRl9ZtCsZp2CPfJ359X0rpN1C hZ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UTo/iJHSXt3qNECSM519+6wJ0PTYKh+FpsOnOHYv3ls=; b=JeKhdGdkC3drd/47HYbBUAls9phpDr8SPXA9//lEzpoCdUXdk+ysXDuQ69LujjgJxx XeZUlP4b15771YjcZ6fu/QFNT4GEl7RR/lodbsWYkDskLO3ChS0BLlVX0WPvgvoRH3S7 bruhaM7QYqy8YcOYT2A2f5rlovNjF/vnXPw6hYSs6tLK2SwpQRZBCpjMwsfu8ThLWqSJ 9gJGK4nkzMCifdD7wC6z3zx2+1m5Wavwem9Gj1MSj1nK79jN7H0ge7KW7n9BPRxWO6H2 FzKVjpYqsiFJ5fKCUni66JolWZKgOqV1jexWfIyJ2+2zNgiwp3FC5hvAD7/c8tVlL45f 13Uw== X-Gm-Message-State: AOAM530+M70K7V29v9S3qiSEOwMryQc96OAB3H7+lhGr6jCpZDNqDvkN Y1u2mbfH6b3hq+R8gPWPde8TgBP/e7ZLMan7W0G+FwYd9ts= X-Google-Smtp-Source: ABdhPJy2p6JF3NUagCdDJsoS8RLIczaxCi0mpzlOBt5Sn1sHGuaXhZjTD0JrwXe+JdMajY8/99ZUszPpK5+PWyVMCjw= X-Received: by 2002:a1c:68d5:: with SMTP id d204mr1218495wmc.178.1610490159741; Tue, 12 Jan 2021 14:22:39 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Tue, 12 Jan 2021 14:22:38 -0800 (PST) In-Reply-To: <912ef087-e9e8-1bb5-5063-88bccb834db1@FreeBSD.org> References: <202101120854.10C8s6Gr075398@gitrepo.freebsd.org> <912ef087-e9e8-1bb5-5063-88bccb834db1@FreeBSD.org> From: Mateusz Guzik Date: Tue, 12 Jan 2021 23:22:38 +0100 Message-ID: Subject: Re: git: 44121a0fbee0 - main - amd64: fix tlb shootdown when all cpus are passed in the bitmap To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DFlSf3G3sz4mTQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 22:22:42 -0000 On 1/12/21, John Baldwin wrote: > On 1/12/21 12:54 AM, Mateusz Guzik wrote: >> The branch main has been updated by mjg: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=44121a0fbee0272e23bfb90601d177ba9e9cda9b >> >> commit 44121a0fbee0272e23bfb90601d177ba9e9cda9b >> Author: Mateusz Guzik >> AuthorDate: 2021-01-12 08:47:32 +0000 >> Commit: Mateusz Guzik >> CommitDate: 2021-01-12 08:47:32 +0000 >> >> amd64: fix tlb shootdown when all cpus are passed in the bitmap >> >> Right now the routine leaves the current CPU in the map, later >> tripping >> on an assert when filling in the scoreboard: panic: IPI scoreboard is >> zero, initiator 1 target 1 >> >> Instead pre-check if all CPUs are present in the map and remember >> that >> outcome for later. >> >> Fixes: 7eaea04a5bb1dc86 ("amd64: compare TLB shootdown target to >> all_cpus") >> Reviewed by: kib >> Differential Revision: https://reviews.freebsd.org/D28111 >> --- >> sys/amd64/amd64/mp_machdep.c | 15 ++++++--------- >> 1 file changed, 6 insertions(+), 9 deletions(-) >> >> diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c >> index 794a11bf1276..aa62c2086fa4 100644 >> --- a/sys/amd64/amd64/mp_machdep.c >> +++ b/sys/amd64/amd64/mp_machdep.c >> @@ -660,6 +660,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, >> vm_offset_t addr1, >> * (zeroing slot) and reading from it below (wait for >> * acknowledgment). >> */ >> - if (!CPU_CMP(&mask, &all_cpus)) { >> + if (is_all) { >> ipi_all_but_self(IPI_INVLOP); >> other_cpus = all_cpus; >> CPU_CLR(PCPU_GET(cpuid), &other_cpus); > > At this point isn't other_cpus == mask, so we could just drop other_cpus and > use 'mask' > directly now? > The previous iteration is: while ((cpu = CPU_FFS(&mask1)) != 0) { cpu--; CPU_CLR(cpu, &mask1); KASSERT(*invl_scoreboard_slot(cpu) != 0, ("IPI scoreboard is zero, initiator %d target %d", PCPU_GET(cpuid), cpu)); *invl_scoreboard_slot(cpu) = 0; } and the one after that: while ((cpu = CPU_FFS(&other_cpus)) != 0) { cpu--; CPU_CLR(cpu, &other_cpus); p_cpudone = invl_scoreboard_slot(cpu); while (atomic_load_int(p_cpudone) != generation) ia32_pause(); } iow when someone(tm) implements CPU_FOREACH_MASK or similar instead of needlessly modifying it the code will get itself a good cleanup. The point of the change at hand was to fix the immediate problem. -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Tue Jan 12 23:37:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 854B94E9C87; Tue, 12 Jan 2021 23: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFn6T3R6Mz4qpv; Tue, 12 Jan 2021 23: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 692835A80; Tue, 12 Jan 2021 23:37: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 10CNb5WQ018640; Tue, 12 Jan 2021 23:37:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CNb5Ei018639; Tue, 12 Jan 2021 23:37:05 GMT (envelope-from git) Date: Tue, 12 Jan 2021 23:37:05 GMT Message-Id: <202101122337.10CNb5Ei018639@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: 0659df6faddf - main - vm_map_protect: allow to set prot and max_prot in one go. 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: 0659df6faddfb27ba54a2cae2a12552cf4f823a0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 23:37:05 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0659df6faddfb27ba54a2cae2a12552cf4f823a0 commit 0659df6faddfb27ba54a2cae2a12552cf4f823a0 Author: Konstantin Belousov AuthorDate: 2021-01-12 12:43:39 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-12 23:35:22 +0000 vm_map_protect: allow to set prot and max_prot in one go. This prevents a situation where other thread modifies map entries permissions between setting max_prot, then relocking, then setting prot, confusing the operation outcome. E.g. you can get an error that is not possible if operation is performed atomic. Also enable setting rwx for max_prot even if map does not allow to set effective rwx protection. Reviewed by: brooks, markj (previous version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28117 --- sys/i386/linux/imgact_linux.c | 6 ++++-- sys/kern/imgact_elf.c | 2 +- sys/kern/kern_resource.c | 3 ++- sys/kern/link_elf.c | 2 +- sys/kern/link_elf_obj.c | 3 ++- sys/vm/vm_map.c | 45 ++++++++++++++++++++++++++++--------------- sys/vm/vm_map.h | 7 ++++++- sys/vm/vm_mmap.c | 18 ++++++++--------- 8 files changed, 53 insertions(+), 33 deletions(-) diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c index dad18b37aa40..661620b6ceaf 100644 --- a/sys/i386/linux/imgact_linux.c +++ b/sys/i386/linux/imgact_linux.c @@ -158,7 +158,8 @@ exec_linux_imgact(struct image_params *imgp) * remove write enable on the 'text' part */ error = vm_map_protect(&vmspace->vm_map, vmaddr, - vmaddr + a_out->a_text, VM_PROT_EXECUTE|VM_PROT_READ, TRUE); + vmaddr + a_out->a_text, 0, VM_PROT_EXECUTE | VM_PROT_READ, + VM_MAP_PROTECT_SET_MAXPROT); if (error) goto fail; } else { @@ -185,7 +186,8 @@ exec_linux_imgact(struct image_params *imgp) * allow read/write of data */ error = vm_map_protect(&vmspace->vm_map, vmaddr + a_out->a_text, - vmaddr + a_out->a_text + a_out->a_data, VM_PROT_ALL, FALSE); + vmaddr + a_out->a_text + a_out->a_data, VM_PROT_ALL, 0, + VM_MAP_PROTECT_SET_PROT); if (error) goto fail; diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 9ab95a63a67b..dae11ab92a6c 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -692,7 +692,7 @@ __elfN(load_section)(struct image_params *imgp, vm_ooffset_t offset, */ if ((prot & VM_PROT_WRITE) == 0) vm_map_protect(map, trunc_page(map_addr), round_page(map_addr + - map_len), prot, FALSE); + map_len), prot, 0, VM_MAP_PROTECT_SET_PROT); return (0); } diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 036cb0ccb945..e14be34aa6e0 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -770,7 +770,8 @@ kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, addr = trunc_page(addr); size = round_page(size); (void)vm_map_protect(&p->p_vmspace->vm_map, - addr, addr + size, prot, FALSE); + addr, addr + size, prot, 0, + VM_MAP_PROTECT_SET_PROT); } } diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index d9b5f9437b57..ea21bf447a55 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -1224,7 +1224,7 @@ link_elf_load_file(linker_class_t cls, const char* filename, error = vm_map_protect(kernel_map, (vm_offset_t)segbase, (vm_offset_t)segbase + round_page(segs[i]->p_memsz), - prot, FALSE); + prot, 0, VM_MAP_PROTECT_SET_PROT); if (error != KERN_SUCCESS) { error = ENOMEM; goto out; diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 63ed9bf61fc3..6b5a6df0a56f 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -219,7 +219,8 @@ link_elf_protect_range(elf_file_t ef, vm_offset_t start, vm_offset_t end, #endif return; } - error = vm_map_protect(kernel_map, start, end, prot, FALSE); + error = vm_map_protect(kernel_map, start, end, prot, 0, + VM_MAP_PROTECT_SET_PROT); KASSERT(error == KERN_SUCCESS, ("link_elf_protect_range: vm_map_protect() returned %d", error)); } diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 9746d07713d3..4bd0b245a881 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2733,14 +2733,12 @@ vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, /* * vm_map_protect: * - * Sets the protection of the specified address - * region in the target map. If "set_max" is - * specified, the maximum protection is to be set; - * otherwise, only the current protection is affected. + * Sets the protection and/or the maximum protection of the + * specified address region in the target map. */ int vm_map_protect(vm_map_t map, vm_offset_t start, vm_offset_t end, - vm_prot_t new_prot, boolean_t set_max) + vm_prot_t new_prot, vm_prot_t new_maxprot, int flags) { vm_map_entry_t entry, first_entry, in_tran, prev_entry; vm_object_t obj; @@ -2751,12 +2749,18 @@ vm_map_protect(vm_map_t map, vm_offset_t start, vm_offset_t end, if (start == end) return (KERN_SUCCESS); + if ((flags & (VM_MAP_PROTECT_SET_PROT | VM_MAP_PROTECT_SET_MAXPROT)) == + (VM_MAP_PROTECT_SET_PROT | VM_MAP_PROTECT_SET_MAXPROT) && + (new_prot & new_maxprot) != new_prot) + return (KERN_OUT_OF_BOUNDS); + again: in_tran = NULL; vm_map_lock(map); - if ((map->flags & MAP_WXORX) != 0 && (new_prot & - (VM_PROT_WRITE | VM_PROT_EXECUTE)) == (VM_PROT_WRITE | + if ((map->flags & MAP_WXORX) != 0 && + (flags & VM_MAP_PROTECT_SET_PROT) != 0 && + (new_prot & (VM_PROT_WRITE | VM_PROT_EXECUTE)) == (VM_PROT_WRITE | VM_PROT_EXECUTE)) { vm_map_unlock(map); return (KERN_PROTECTION_FAILURE); @@ -2786,7 +2790,12 @@ again: vm_map_unlock(map); return (KERN_INVALID_ARGUMENT); } - if ((new_prot & entry->max_protection) != new_prot) { + if ((flags & VM_MAP_PROTECT_SET_PROT) == 0) + new_prot = entry->protection; + if ((flags & VM_MAP_PROTECT_SET_MAXPROT) == 0) + new_maxprot = entry->max_protection; + if ((new_prot & entry->max_protection) != new_prot || + (new_maxprot & entry->max_protection) != new_maxprot) { vm_map_unlock(map); return (KERN_PROTECTION_FAILURE); } @@ -2827,12 +2836,16 @@ again: return (rv); } - if (set_max || + if ((flags & VM_MAP_PROTECT_SET_PROT) == 0) + new_prot = entry->protection; + if ((flags & VM_MAP_PROTECT_SET_MAXPROT) == 0) + new_maxprot = entry->max_protection; + + if ((flags & VM_MAP_PROTECT_SET_PROT) == 0 || ((new_prot & ~entry->protection) & VM_PROT_WRITE) == 0 || ENTRY_CHARGED(entry) || - (entry->eflags & MAP_ENTRY_GUARD) != 0) { + (entry->eflags & MAP_ENTRY_GUARD) != 0) continue; - } cred = curthread->td_ucred; obj = entry->object.vm_object; @@ -2893,11 +2906,11 @@ again: old_prot = entry->protection; - if (set_max) - entry->protection = - (entry->max_protection = new_prot) & - old_prot; - else + if ((flags & VM_MAP_PROTECT_SET_MAXPROT) != 0) { + entry->max_protection = new_maxprot; + entry->protection = new_maxprot & old_prot; + } + if ((flags & VM_MAP_PROTECT_SET_PROT) != 0) entry->protection = new_prot; /* diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 44f99a31f3d9..ace205b21b42 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -510,7 +510,12 @@ vm_map_entry_succ(vm_map_entry_t entry) for ((it) = vm_map_entry_first(map); \ (it) != &(map)->header; \ (it) = vm_map_entry_succ(it)) -int vm_map_protect (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); + +#define VM_MAP_PROTECT_SET_PROT 0x0001 +#define VM_MAP_PROTECT_SET_MAXPROT 0x0002 + +int vm_map_protect(vm_map_t map, vm_offset_t start, vm_offset_t end, + vm_prot_t new_prot, vm_prot_t new_maxprot, int flags); int vm_map_remove (vm_map_t, vm_offset_t, vm_offset_t); void vm_map_try_merge_entries(vm_map_t map, vm_map_entry_t prev, vm_map_entry_t entry); diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 7888ff15e36c..30c485010ac8 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -653,6 +653,7 @@ kern_mprotect(struct thread *td, uintptr_t addr0, size_t size, int prot) vm_offset_t addr; vm_size_t pageoff; int vm_error, max_prot; + int flags; addr = addr0; if ((prot & ~(_PROT_ALL | PROT_MAX(_PROT_ALL))) != 0) @@ -672,16 +673,11 @@ kern_mprotect(struct thread *td, uintptr_t addr0, size_t size, int prot) if (addr + size < addr) return (EINVAL); - vm_error = KERN_SUCCESS; - if (max_prot != 0) { - if ((max_prot & prot) != prot) - return (ENOTSUP); - vm_error = vm_map_protect(&td->td_proc->p_vmspace->vm_map, - addr, addr + size, max_prot, TRUE); - } - if (vm_error == KERN_SUCCESS) - vm_error = vm_map_protect(&td->td_proc->p_vmspace->vm_map, - addr, addr + size, prot, FALSE); + flags = VM_MAP_PROTECT_SET_PROT; + if (max_prot != 0) + flags |= VM_MAP_PROTECT_SET_MAXPROT; + vm_error = vm_map_protect(&td->td_proc->p_vmspace->vm_map, + addr, addr + size, prot, max_prot, flags); switch (vm_error) { case KERN_SUCCESS: @@ -690,6 +686,8 @@ kern_mprotect(struct thread *td, uintptr_t addr0, size_t size, int prot) return (EACCES); case KERN_RESOURCE_SHORTAGE: return (ENOMEM); + case KERN_OUT_OF_BOUNDS: + return (ENOTSUP); } return (EINVAL); } From owner-dev-commits-src-all@freebsd.org Wed Jan 13 00:43:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8537C4EB76F; Wed, 13 Jan 2021 00:43: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFpb43Kg4z4vPy; Wed, 13 Jan 2021 00:43: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 6549664F2; Wed, 13 Jan 2021 00:43: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 10D0hSt1009860; Wed, 13 Jan 2021 00:43:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D0hSUq009859; Wed, 13 Jan 2021 00:43:28 GMT (envelope-from git) Date: Wed, 13 Jan 2021 00:43:28 GMT Message-Id: <202101130043.10D0hSUq009859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 7c5a624afae4 - main - [wpa] Add support for hostapd/wpa_supplicant when WITHOUT_CRYPT=YES is enabled. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c5a624afae43c44d8e57eb8c5073b9b07f88064 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 00:43:28 -0000 The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=7c5a624afae43c44d8e57eb8c5073b9b07f88064 commit 7c5a624afae43c44d8e57eb8c5073b9b07f88064 Author: Adrian Chadd AuthorDate: 2021-01-04 20:39:53 +0000 Commit: Adrian Chadd CommitDate: 2021-01-13 00:43:19 +0000 [wpa] Add support for hostapd/wpa_supplicant when WITHOUT_CRYPT=YES is enabled. This builds wpa_supplicant / hostpad using internal encryption routines rather than using libcrypt. This has been supported in wpa for years now, however since we use local makefiles for this, we bitrotted dependencies and configuration options. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D27958 --- share/mk/src.opts.mk | 1 - usr.sbin/wpa/Makefile.crypto | 31 +++++++++++++++++++++++++++++-- usr.sbin/wpa/hostapd/Makefile | 4 ++++ usr.sbin/wpa/wpa_supplicant/Makefile | 2 +- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index b87826781318..55d07dac42dd 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -438,7 +438,6 @@ MK_LDNS:= no MK_PKGBOOTSTRAP:= no MK_SVN:= no MK_SVNLITE:= no -MK_WIRELESS:= no .endif .if ${MK_LDNS} == "no" diff --git a/usr.sbin/wpa/Makefile.crypto b/usr.sbin/wpa/Makefile.crypto index 1b67c79650af..bed452bf8592 100644 --- a/usr.sbin/wpa/Makefile.crypto +++ b/usr.sbin/wpa/Makefile.crypto @@ -16,9 +16,13 @@ CONFIG_INTERNAL_RC4=y CONFIG_INTERNAL_SHA1=y NEED_SHA256=y CONFIG_INTERNAL_SHA256=y +NEED_SHA384=y +CONFIG_INTERNAL_SHA384=y +NEED_SHA512=y +CONFIG_INTERNAL_SHA512=y CONFIG_INTERNAL_TLS=y +NEED_DH_GROUPS=y CONFIG_INTERNAL_DH5=y -CONFIG_INTERNAL_DH=y NEED_AES_ENC=true NEED_AES_CBC=true .endif @@ -45,6 +49,7 @@ SRCS+= asn1.c \ tlsv1_client.c \ tlsv1_client_write.c \ tlsv1_client_read.c \ + tlsv1_client_ocsp.c \ x509v3.c NEED_DES=y NEED_MD4=y @@ -123,14 +128,36 @@ SRCS+= sha256-internal.c sha256-prf.c .endif .endif +.if defined(NEED_SHA384) +CFLAGS+=-DCONFIG_SHA384 +SRCS+= sha384.c +.if defined(CONFIG_INTERNAL_SHA384) +SRCS+= sha384-internal.c sha384-prf.c +.endif +.endif + +.if defined(NEED_SHA512) +CFLAGS+=-DCONFIG_SHA512 +SRCS+= sha512.c +.if defined(CONFIG_INTERNAL_SHA512) +SRCS+= sha512-internal.c sha512-prf.c +.endif +.endif + .if defined(NEED_TLS_PRF) SRCS+= sha1-tlsprf.c .endif .if defined(CONFIG_INTERNAL_DH5) +.if defined(NEED_DH_GROUPS) SRCS+= dh_group5.c .endif +.endif -.if defined(CONFIG_INTERNAL_DH) +.if defined(NEED_DH_GROUPS) SRCS+= dh_groups.c .endif + +.if defined(NEED_DH_GROUPS_ALL) +CFLAGS+=-DALL_DH_GROUPS +.endif diff --git a/usr.sbin/wpa/hostapd/Makefile b/usr.sbin/wpa/hostapd/Makefile index 24c25ffc0b94..579694046989 100644 --- a/usr.sbin/wpa/hostapd/Makefile +++ b/usr.sbin/wpa/hostapd/Makefile @@ -163,6 +163,10 @@ SRCS+= eap_server_gtc.c \ eapol_auth_sm.c TLS_FUNCS=y +# For WPS, EAP modes, etc +NEED_DH_GROUPS=y +NEED_DH_GROUPS_ALL=y + .if !empty(CFLAGS:M*-DCONFIG_WPS) NEED_SIM_COMMON=y .endif diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index 7556e9b8d26a..dc8178ccf9b8 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -14,7 +14,7 @@ PROG= wpa_supplicant SRCS= base64.c bitfield.c blacklist.c bss.c cli.c common.c \ config.c config_file.c \ ctrl_iface.c ctrl_iface_common.c ctrl_iface_unix.c \ - dh_groups.c driver_bsd.c driver_common.c \ + driver_bsd.c driver_common.c \ driver_ndis.c driver_wired.c driver_wired_common.c drivers.c \ eap_register.c eloop.c \ events.c gas.c gas_query.c \ From owner-dev-commits-src-all@freebsd.org Wed Jan 13 01:14:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C750F4EC962; Wed, 13 Jan 2021 01:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFqGp5J05z3DJ5; Wed, 13 Jan 2021 01:14: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 A8A966D32; Wed, 13 Jan 2021 01:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10D1EQ8C048844; Wed, 13 Jan 2021 01:14:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D1EQYD048843; Wed, 13 Jan 2021 01:14:26 GMT (envelope-from git) Date: Wed, 13 Jan 2021 01:14:26 GMT Message-Id: <202101130114.10D1EQYD048843@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: cbba81681a13 - stable/12 - x86 identcpu.c: fix formatting of the comment. 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/12 X-Git-Reftype: branch X-Git-Commit: cbba81681a133cd79745a7007f4d4da0a970e754 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 01:14:26 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cbba81681a133cd79745a7007f4d4da0a970e754 commit cbba81681a133cd79745a7007f4d4da0a970e754 Author: Konstantin Belousov AuthorDate: 2021-01-06 14:52:27 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-13 01:09:07 +0000 x86 identcpu.c: fix formatting of the comment. (cherry picked from commit aa9450e44b5f017bb132ab5a00df68c9d7aa1d94) --- sys/x86/x86/identcpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index ad8bcc9a6888..2907575377b8 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -215,7 +215,7 @@ static struct { } cpu_vendors[] = { { INTEL_VENDOR_ID, CPU_VENDOR_INTEL }, /* GenuineIntel */ { AMD_VENDOR_ID, CPU_VENDOR_AMD }, /* AuthenticAMD */ - { HYGON_VENDOR_ID, CPU_VENDOR_HYGON }, /* HygonGenuine*/ + { HYGON_VENDOR_ID, CPU_VENDOR_HYGON }, /* HygonGenuine */ { CENTAUR_VENDOR_ID, CPU_VENDOR_CENTAUR }, /* CentaurHauls */ #ifdef __i386__ { NSC_VENDOR_ID, CPU_VENDOR_NSC }, /* Geode by NSC */ From owner-dev-commits-src-all@freebsd.org Wed Jan 13 01:14:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8F2A4EC9B8; Wed, 13 Jan 2021 01:14: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFqGn5Bmvz3DFN; Wed, 13 Jan 2021 01:14: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 965AF6C50; Wed, 13 Jan 2021 01:14: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 10D1EPLi048822; Wed, 13 Jan 2021 01:14:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D1EPCB048821; Wed, 13 Jan 2021 01:14:25 GMT (envelope-from git) Date: Wed, 13 Jan 2021 01:14:25 GMT Message-Id: <202101130114.10D1EPCB048821@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: 7aca3f4a7754 - stable/12 - Style. Improve some KASSERTs messages. 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/12 X-Git-Reftype: branch X-Git-Commit: 7aca3f4a77542ca4fc1575de9366eeeacb62a331 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 01:14:25 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7aca3f4a77542ca4fc1575de9366eeeacb62a331 commit 7aca3f4a77542ca4fc1575de9366eeeacb62a331 Author: Konstantin Belousov AuthorDate: 2020-12-31 00:45:47 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-13 01:08:26 +0000 Style. Improve some KASSERTs messages. (cherry picked from commit 993a1699b1948d30c4903440e8d8b23a7d5fc6c5) --- sys/kern/kern_proc.c | 8 +++----- sys/kern/kern_sig.c | 12 ++++++------ sys/kern/tty.c | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index a4cc1825e31f..566b9a8ea43a 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -533,12 +533,10 @@ enterthispgrp(struct proc *p, struct pgrp *pgrp) PGRP_LOCK_ASSERT(p->p_pgrp, MA_NOTOWNED); SESS_LOCK_ASSERT(p->p_session, MA_NOTOWNED); KASSERT(pgrp->pg_session == p->p_session, - ("%s: pgrp's session %p, p->p_session %p.\n", - __func__, - pgrp->pg_session, - p->p_session)); + ("%s: pgrp's session %p, p->p_session %p proc %p\n", + __func__, pgrp->pg_session, p->p_session, p)); KASSERT(pgrp != p->p_pgrp, - ("%s: p belongs to pgrp.", __func__)); + ("%s: p %p belongs to pgrp %p", __func__, p, pgrp)); doenterpgrp(p, pgrp); diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 74647ca6822a..b84793285d8a 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2208,9 +2208,9 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) * is default; don't stop the process below if sleeping, * and don't clear any pending SIGCONT. */ - if ((prop & SIGPROP_TTYSTOP) && - (p->p_pgrp->pg_jobc == 0) && - (action == SIG_DFL)) { + if ((prop & SIGPROP_TTYSTOP) != 0 && + p->p_pgrp->pg_jobc == 0 && + action == SIG_DFL) { if (ksi && (ksi->ksi_flags & KSI_INS)) ksiginfo_tryfree(ksi); return (ret); @@ -2950,10 +2950,10 @@ issignal(struct thread *td) * should ignore tty stops. */ if (prop & SIGPROP_STOP) { - if (p->p_flag & - (P_TRACED | P_WEXIT | P_SINGLE_EXIT) || + if ((p->p_flag & (P_TRACED | P_WEXIT | + P_SINGLE_EXIT)) != 0 || (p->p_pgrp->pg_jobc == 0 && - prop & SIGPROP_TTYSTOP)) + (prop & SIGPROP_TTYSTOP) != 0)) break; /* == ignore */ if (TD_SBDRY_INTR(td)) { KASSERT((td->td_flags & TDF_SBDRY) != 0, diff --git a/sys/kern/tty.c b/sys/kern/tty.c index f82c1feca021..63324ac3e881 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -446,7 +446,7 @@ tty_wait_background(struct tty *tp, struct thread *td, int sig) } pg = p->p_pgrp; - if (p->p_flag & P_PPWAIT || pg->pg_jobc == 0) { + if ((p->p_flag & P_PPWAIT) != 0 || pg->pg_jobc == 0) { /* Don't allow the action to happen. */ PROC_UNLOCK(p); return (EIO); From owner-dev-commits-src-all@freebsd.org Wed Jan 13 01:14:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5759C4EC6F7; Wed, 13 Jan 2021 01:14: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFqGr13zdz3DKy; Wed, 13 Jan 2021 01:14: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 D6AD76C51; Wed, 13 Jan 2021 01:14: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 10D1ERCT048866; Wed, 13 Jan 2021 01:14:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D1ERrQ048865; Wed, 13 Jan 2021 01:14:27 GMT (envelope-from git) Date: Wed, 13 Jan 2021 01:14:27 GMT Message-Id: <202101130114.10D1ERrQ048865@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: 49038d1723a9 - stable/12 - tsc: use u_int for return type for prototype, same as in definitions. 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/12 X-Git-Reftype: branch X-Git-Commit: 49038d1723a9d45e064f482d510230ed5395b675 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 01:14:28 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=49038d1723a9d45e064f482d510230ed5395b675 commit 49038d1723a9d45e064f482d510230ed5395b675 Author: Konstantin Belousov AuthorDate: 2021-01-05 20:44:10 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-13 01:09:29 +0000 tsc: use u_int for return type for prototype, same as in definitions. (cherry picked from commit 826fc3cc3d59c1d0af4caf3a08888e168bfe22b2) --- sys/x86/x86/tsc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index 92e33dd9d373..cb1ba0758db9 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -90,12 +90,12 @@ static void tsc_freq_changed(void *arg, const struct cf_level *level, int status); static void tsc_freq_changing(void *arg, const struct cf_level *level, int *status); -static unsigned tsc_get_timecount(struct timecounter *tc); -static inline unsigned tsc_get_timecount_low(struct timecounter *tc); -static unsigned tsc_get_timecount_lfence(struct timecounter *tc); -static unsigned tsc_get_timecount_low_lfence(struct timecounter *tc); -static unsigned tsc_get_timecount_mfence(struct timecounter *tc); -static unsigned tsc_get_timecount_low_mfence(struct timecounter *tc); +static u_int tsc_get_timecount(struct timecounter *tc); +static inline u_int tsc_get_timecount_low(struct timecounter *tc); +static u_int tsc_get_timecount_lfence(struct timecounter *tc); +static u_int tsc_get_timecount_low_lfence(struct timecounter *tc); +static u_int tsc_get_timecount_mfence(struct timecounter *tc); +static u_int tsc_get_timecount_low_mfence(struct timecounter *tc); static void tsc_levels_changed(void *arg, int unit); static uint32_t x86_tsc_vdso_timehands(struct vdso_timehands *vdso_th, struct timecounter *tc); From owner-dev-commits-src-all@freebsd.org Wed Jan 13 03:31:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74DB34EEE66; Wed, 13 Jan 2021 03:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFtK91cXYz3Mkc; Wed, 13 Jan 2021 03:31: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 F0F3F10C1C; Wed, 13 Jan 2021 03:31: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 10D3VclD029035; Wed, 13 Jan 2021 03:31:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D3VcoJ029034; Wed, 13 Jan 2021 03:31:38 GMT (envelope-from git) Date: Wed, 13 Jan 2021 03:31:38 GMT Message-Id: <202101130331.10D3VcoJ029034@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: 4faa375cdd4e - main - fd: provide a dedicated closef variant for unix socket code 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: 4faa375cdd4e36d3a5b7fc46ee9dd8079a5e26f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 03:31:42 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4faa375cdd4e36d3a5b7fc46ee9dd8079a5e26f7 commit 4faa375cdd4e36d3a5b7fc46ee9dd8079a5e26f7 Author: Mateusz Guzik AuthorDate: 2021-01-12 15:13:27 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-13 02:27:03 +0000 fd: provide a dedicated closef variant for unix socket code This avoids testing for td != NULL. --- sys/kern/kern_descrip.c | 14 +++++++++++++- sys/kern/uipc_usrreq.c | 4 ++-- sys/sys/filedesc.h | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index ad1916e87b68..237d15fb5387 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2737,6 +2737,8 @@ closef(struct file *fp, struct thread *td) struct filedesc_to_leader *fdtol; struct filedesc *fdp; + MPASS(td != NULL); + /* * POSIX record locking dictates that any close releases ALL * locks owned by this process. This is handled by setting @@ -2749,7 +2751,7 @@ closef(struct file *fp, struct thread *td) * context that might have locks, or the locks will be * leaked. */ - if (fp->f_type == DTYPE_VNODE && td != NULL) { + if (fp->f_type == DTYPE_VNODE) { vp = fp->f_vnode; if ((td->td_proc->p_leader->p_flag & P_ADVLOCK) != 0) { lf.l_whence = SEEK_SET; @@ -2797,6 +2799,16 @@ closef(struct file *fp, struct thread *td) return (fdrop_close(fp, td)); } +/* + * Hack for file descriptor passing code. + */ +void +closef_nothread(struct file *fp) +{ + + fdrop(fp, NULL); +} + /* * Initialize the file pointer with the specified properties. * diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 44e48bc864a3..0809f5180cc1 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2486,7 +2486,7 @@ unp_discard(struct file *fp) atomic_add_int(&unp_defers_count, 1); taskqueue_enqueue(taskqueue_thread, &unp_defer_task); } else - (void) closef(fp, (struct thread *)NULL); + closef_nothread(fp); } static void @@ -2508,7 +2508,7 @@ unp_process_defers(void *arg __unused, int pending) count = 0; while ((dr = SLIST_FIRST(&drl)) != NULL) { SLIST_REMOVE_HEAD(&drl, ud_link); - closef(dr->ud_fp, NULL); + closef_nothread(dr->ud_fp); free(dr, M_TEMP); count++; } diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index ae2232814136..132aa6c1de03 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -224,6 +224,7 @@ void filecaps_move(struct filecaps *src, struct filecaps *dst); void filecaps_free(struct filecaps *fcaps); int closef(struct file *fp, struct thread *td); +void closef_nothread(struct file *fp); int dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode, int openerror, int *indxp); int falloc_caps(struct thread *td, struct file **resultfp, int *resultfd, From owner-dev-commits-src-all@freebsd.org Wed Jan 13 03:31:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74F814EF119; Wed, 13 Jan 2021 03:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFtK94Gflz3MSn; Wed, 13 Jan 2021 03:31: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 404D610BA0; Wed, 13 Jan 2021 03:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10D3VdCD029054; Wed, 13 Jan 2021 03:31:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D3VdiS029053; Wed, 13 Jan 2021 03:31:39 GMT (envelope-from git) Date: Wed, 13 Jan 2021 03:31:39 GMT Message-Id: <202101130331.10D3VdiS029053@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: 530b699a62ad - main - fd: add finstall_refed 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: 530b699a62ad0f1e5718825d60ddb1ec9b214489 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 03:31:42 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=530b699a62ad0f1e5718825d60ddb1ec9b214489 commit 530b699a62ad0f1e5718825d60ddb1ec9b214489 Author: Mateusz Guzik AuthorDate: 2021-01-12 16:05:27 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-13 02:27:03 +0000 fd: add finstall_refed Can be used to consume an already existing reference and consequently avoid atomic ops. --- sys/kern/kern_descrip.c | 28 ++++++++++++++++++++-------- sys/sys/filedesc.h | 2 ++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 237d15fb5387..407280d79850 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2059,7 +2059,7 @@ _finstall(struct filedesc *fdp, struct file *fp, int fd, int flags, } int -finstall(struct thread *td, struct file *fp, int *fd, int flags, +finstall_refed(struct thread *td, struct file *fp, int *fd, int flags, struct filecaps *fcaps) { struct filedesc *fdp = td->td_proc->p_fd; @@ -2067,18 +2067,30 @@ finstall(struct thread *td, struct file *fp, int *fd, int flags, MPASS(fd != NULL); - if (!fhold(fp)) - return (EBADF); FILEDESC_XLOCK(fdp); error = fdalloc(td, 0, fd); + if (__predict_true(error == 0)) { + _finstall(fdp, fp, *fd, flags, fcaps); + } + FILEDESC_XUNLOCK(fdp); + return (error); +} + +int +finstall(struct thread *td, struct file *fp, int *fd, int flags, + struct filecaps *fcaps) +{ + int error; + + MPASS(fd != NULL); + + if (!fhold(fp)) + return (EBADF); + error = finstall_refed(td, fp, fd, flags, fcaps); if (__predict_false(error != 0)) { - FILEDESC_XUNLOCK(fdp); fdrop(fp, td); - return (error); } - _finstall(fdp, fp, *fd, flags, fcaps); - FILEDESC_XUNLOCK(fdp); - return (0); + return (error); } /* diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 132aa6c1de03..f0cae3ed6911 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -234,6 +234,8 @@ void _finstall(struct filedesc *fdp, struct file *fp, int fd, int flags, struct filecaps *fcaps); int finstall(struct thread *td, struct file *fp, int *resultfd, int flags, struct filecaps *fcaps); +int finstall_refed(struct thread *td, struct file *fp, int *resultfd, int flags, + struct filecaps *fcaps); int fdalloc(struct thread *td, int minfd, int *result); int fdallocn(struct thread *td, int minfd, int *fds, int n); int fdcheckstd(struct thread *td); From owner-dev-commits-src-all@freebsd.org Wed Jan 13 03:31:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9665D4EEE67; Wed, 13 Jan 2021 03:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFtKB2JnXz3MhV; Wed, 13 Jan 2021 03:31: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 5380810DF8; Wed, 13 Jan 2021 03:31: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 10D3VfGZ029076; Wed, 13 Jan 2021 03:31:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D3Vfvq029075; Wed, 13 Jan 2021 03:31:41 GMT (envelope-from git) Date: Wed, 13 Jan 2021 03:31:41 GMT Message-Id: <202101130331.10D3Vfvq029075@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: 5171310e661d - main - vfs: use finstall_refed in openat 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: 5171310e661d6c85f6208d86c6f651e3d499e346 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 03:31:42 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5171310e661d6c85f6208d86c6f651e3d499e346 commit 5171310e661d6c85f6208d86c6f651e3d499e346 Author: Mateusz Guzik AuthorDate: 2021-01-12 16:11:15 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-13 03:30:38 +0000 vfs: use finstall_refed in openat This avoids 2 atomic ops in the common case: 1 to grab an extra reference and 1 to release it. --- sys/kern/vfs_syscalls.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 560a003765d5..c1b6c70ab0ac 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1129,15 +1129,11 @@ kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, /* * Allocate a file structure. The descriptor to reference it - * is allocated and set by finstall() below. + * is allocated and used by finstall_refed() below. */ error = falloc_noinstall(td, &fp); if (error != 0) return (error); - /* - * An extra reference on `fp' has been held for us by - * falloc_noinstall(). - */ /* Set the flags early so the finit in devfs can pick them up. */ fp->f_flag = flags & FMASK; cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT; @@ -1210,21 +1206,17 @@ success: else #endif fcaps = NULL; - error = finstall(td, fp, &indx, flags, fcaps); - /* On success finstall() consumes fcaps. */ + error = finstall_refed(td, fp, &indx, flags, fcaps); + /* On success finstall_refed() consumes fcaps. */ if (error != 0) { filecaps_free(&nd.ni_filecaps); goto bad; } } else { filecaps_free(&nd.ni_filecaps); + fdrop_close(fp, td); } - /* - * Release our private reference, leaving the one associated with - * the descriptor table intact. - */ - fdrop(fp, td); td->td_retval[0] = indx; return (0); bad: From owner-dev-commits-src-all@freebsd.org Wed Jan 13 05:12:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A4E74D0930; Wed, 13 Jan 2021 05:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFwYJ0HrHz3hBd; Wed, 13 Jan 2021 05:12: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 E721711ECD; Wed, 13 Jan 2021 05:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10D5CJjc057458; Wed, 13 Jan 2021 05:12:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D5CJR4057457; Wed, 13 Jan 2021 05:12:19 GMT (envelope-from git) Date: Wed, 13 Jan 2021 05:12:19 GMT Message-Id: <202101130512.10D5CJR4057457@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: f6d95a01103a - main - elftcl: add -i flag to ignore unknown flags 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: f6d95a01103a49a94c876d5a51bb4be25c06d964 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 05:12:20 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d95a01103a49a94c876d5a51bb4be25c06d964 commit f6d95a01103a49a94c876d5a51bb4be25c06d964 Author: Ed Maste AuthorDate: 2021-01-13 03:24:52 +0000 Commit: Ed Maste CommitDate: 2021-01-13 05:10:13 +0000 elftcl: add -i flag to ignore unknown flags This may allow an identical elfctl invocation to be used on multiple FreeBSD versions, with features not implemented on older releases being silently ignored. PR: 252629 (related) Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28130 --- usr.bin/elfctl/elfctl.1 | 6 +++++- usr.bin/elfctl/elfctl.c | 13 ++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/usr.bin/elfctl/elfctl.1 b/usr.bin/elfctl/elfctl.1 index 176c2c42b22a..f93b558fdf0d 100644 --- a/usr.bin/elfctl/elfctl.1 +++ b/usr.bin/elfctl/elfctl.1 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2020 +.Dd January 12, 2021 .Dt ELFCTL 1 .Os .Sh NAME @@ -35,6 +35,7 @@ .Sh SYNOPSIS .Nm .Op Fl h | Fl -help +.Op Fl i .Op Fl l .Op Fl e Ar featurelist .Ar @@ -47,6 +48,9 @@ The options are as follows: .Bl -tag -width indent .It Fl h | Fl -help Print a usage message and exit. +.It Fl i +Ignore unknown feature flags in +.Ar featurelist . .It Fl l List known ELF feature flags. .It Fl e Ar featurelist diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c index e9b93e697ef7..9d75c002d82c 100644 --- a/usr.bin/elfctl/elfctl.c +++ b/usr.bin/elfctl/elfctl.c @@ -81,7 +81,9 @@ static struct option long_opts[] = { #else #define SUPPORTED_ENDIAN ELFDATA2MSB #endif - + +static bool iflag; + int main(int argc, char **argv) { @@ -100,8 +102,11 @@ main(int argc, char **argv) if (elf_version(EV_CURRENT) == EV_NONE) errx(EXIT_FAILURE, "elf_version error"); - while ((ch = getopt_long(argc, argv, "hle:", long_opts, NULL)) != -1) { + while ((ch = getopt_long(argc, argv, "hile:", long_opts, NULL)) != -1) { switch (ch) { + case 'i': + iflag = true; + break; case 'l': print_features(); lflag = true; @@ -197,6 +202,7 @@ Usage: %s [options] file...\n\ Set or display the control features for an ELF object.\n\n\ Supported options are:\n\ -l List known control features.\n\ + -i Ignore unknown features.\n\ -e [+-=]feature,list Edit features from a comma separated list.\n\ -h | --help Print a usage message and exit.\n" @@ -229,7 +235,8 @@ convert_to_feature_val(char *feature_str, uint32_t *feature_val) } if (i == len) { warnx("%s is not a valid feature", feature); - return (false); + if (!iflag) + return (false); } } From owner-dev-commits-src-all@freebsd.org Wed Jan 13 09:07:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2382B4D59EA; Wed, 13 Jan 2021 09:07: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG1mS0VPtz3sny; Wed, 13 Jan 2021 09:07: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 03C0214CC0; Wed, 13 Jan 2021 09:07: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 10D97J1i058132; Wed, 13 Jan 2021 09:07:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10D97J6M058131; Wed, 13 Jan 2021 09:07:19 GMT (envelope-from git) Date: Wed, 13 Jan 2021 09:07:19 GMT Message-Id: <202101130907.10D97J6M058131@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: bafb68265672 - main - Fix for off-by-one in GPIO driver after r368585. While at it declare the iteration variable outside the for-loop to appease older compilers. 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: bafb682656724d06045fa494efb83a4312036f1f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 09:07:20 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=bafb682656724d06045fa494efb83a4312036f1f commit bafb682656724d06045fa494efb83a4312036f1f Author: Hans Petter Selasky AuthorDate: 2021-01-12 17:46:09 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-13 09:06:30 +0000 Fix for off-by-one in GPIO driver after r368585. While at it declare the iteration variable outside the for-loop to appease older compilers. Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/gpio/gpioc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index 727b07a70589..83d55742a3a2 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -567,6 +567,7 @@ gpioc_probe(device_t dev) static int gpioc_attach(device_t dev) { + int i; int err; struct gpioc_softc *sc; struct make_dev_args devargs; @@ -582,7 +583,7 @@ gpioc_attach(device_t dev) return (err); sc->sc_pin_intr = malloc(sizeof(struct gpioc_pin_intr) * sc->sc_npins, M_GPIOC, M_WAITOK | M_ZERO); - for (int i = 0; i <= sc->sc_npins; i++) { + for (i = 0; i < sc->sc_npins; i++) { sc->sc_pin_intr[i].pin = malloc(sizeof(struct gpiobus_pin), M_GPIOC, M_WAITOK | M_ZERO); sc->sc_pin_intr[i].sc = sc; @@ -612,11 +613,12 @@ gpioc_detach(device_t dev) { struct gpioc_softc *sc = device_get_softc(dev); int err; + int i; if (sc->sc_ctl_dev) destroy_dev(sc->sc_ctl_dev); - for (int i = 0; i <= sc->sc_npins; i++) { + for (i = 0; i < sc->sc_npins; i++) { mtx_destroy(&sc->sc_pin_intr[i].mtx); free(&sc->sc_pin_intr[i].pin, M_GPIOC); } From owner-dev-commits-src-all@freebsd.org Wed Jan 13 10:02:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A6204D6EE4; Wed, 13 Jan 2021 10: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG3053T6Dz4QvN; Wed, 13 Jan 2021 10: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 6A12D1563F; Wed, 13 Jan 2021 10: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 10DA2TW5035722; Wed, 13 Jan 2021 10: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 10DA2TIU035721; Wed, 13 Jan 2021 10:02:29 GMT (envelope-from git) Date: Wed, 13 Jan 2021 10:02:29 GMT Message-Id: <202101131002.10DA2TIU035721@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: a339b4223a4f - main - linux: bump the default version from 3.10.0 to 3.17.0 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: a339b4223a4fd7cddbd691302d2eeeddc045415a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 10:02:29 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=a339b4223a4fd7cddbd691302d2eeeddc045415a commit a339b4223a4fd7cddbd691302d2eeeddc045415a Author: Edward Tomasz Napierala AuthorDate: 2021-01-13 09:59:08 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-01-13 10:02:16 +0000 linux: bump the default version from 3.10.0 to 3.17.0 This is required for Qt5, as found in Ubuntu Focal. The library contains the minimum kernel version encoded in an ELF note; this makes rtld ignore it altogether, with a confusing error message. Without it, things fail like this: $ konsole: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory For reference, the Qt kernel version requirements can be found at: https://github.com/qt/qtbase/blob/dev/src/corelib/global/minimum-linux_p.h Sponsored by: The FreeBSD Foundation Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D28105 --- sys/compat/linux/linux_mib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index bef21758acde..0a1baec39826 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -47,7 +47,7 @@ int linux_get_oss_version(struct thread *td); int linux_kernver(struct thread *td); #define LINUX_KVERSION 3 -#define LINUX_KPATCHLEVEL 10 +#define LINUX_KPATCHLEVEL 17 #define LINUX_KSUBLEVEL 0 #define LINUX_KERNVER(a,b,c) (((a) << 16) + ((b) << 8) + (c)) From owner-dev-commits-src-all@freebsd.org Wed Jan 13 10:05:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 862EF4D6B4E; Wed, 13 Jan 2021 10:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG33Y3KQwz4QqJ; Wed, 13 Jan 2021 10: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 60926158C8; Wed, 13 Jan 2021 10:05: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 10DA5Tgx036285; Wed, 13 Jan 2021 10:05:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DA5TdR036284; Wed, 13 Jan 2021 10:05:29 GMT (envelope-from git) Date: Wed, 13 Jan 2021 10:05:29 GMT Message-Id: <202101131005.10DA5TdR036284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: e58c8da0683d - main - Map IPv6 link-local prefix to the link-local ifa. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e58c8da0683dcff6ce3432bdfa98f7271140cda3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 10:05:29 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=e58c8da0683dcff6ce3432bdfa98f7271140cda3 commit e58c8da0683dcff6ce3432bdfa98f7271140cda3 Author: Alexander V. Chernikov AuthorDate: 2021-01-12 23:14:03 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-13 10:03:15 +0000 Map IPv6 link-local prefix to the link-local ifa. Currently we create link-local route by creating an always-on IPv6 prefix in the prefix list. This prefix is not tied to the link-local ifa. This leads to the following problems: First, when flushing interface addresses we skip on-link route, leaving fe80::/64 prefix on the interface without any IPv6 addresses. Second, when creating and removing link-local alias we lose fe80::/64 prefix from the routing table. Fix this by attaching link-local prefix to the ifa at the initial creation. Reviewed by: hrs MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D28129 --- sys/netinet6/in6_ifattach.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 81cd24823f10..1a07fb13b179 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -520,8 +520,11 @@ in6_ifattach_linklocal(struct ifnet *ifp, struct ifnet *altifp) * valid with referring to the old link-local address. */ if ((pr = nd6_prefix_lookup(&pr0)) == NULL) { - if ((error = nd6_prelist_add(&pr0, NULL, NULL)) != 0) + if ((error = nd6_prelist_add(&pr0, NULL, &pr)) != 0) return (error); + /* Reference prefix */ + ia->ia6_ndpr = pr; + pr->ndpr_addrcnt++; } else nd6_prefix_rele(pr); From owner-dev-commits-src-all@freebsd.org Wed Jan 13 10:05:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28C634D6DC6; Wed, 13 Jan 2021 10:05: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG33s0kvBz4R0g; Wed, 13 Jan 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 0C55B15D13; Wed, 13 Jan 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 10DA5idA036431; Wed, 13 Jan 2021 10:05:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DA5iWa036430; Wed, 13 Jan 2021 10:05:44 GMT (envelope-from git) Date: Wed, 13 Jan 2021 10:05:44 GMT Message-Id: <202101131005.10DA5iWa036430@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: a6b7689718d2 - main - Remove redundant rtinit() calls from tuntap. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a6b7689718d223e5cefc7beb6d8bb317f92ff839 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 10:05:45 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=a6b7689718d223e5cefc7beb6d8bb317f92ff839 commit a6b7689718d223e5cefc7beb6d8bb317f92ff839 Author: Alexander V. Chernikov AuthorDate: 2021-01-11 23:31:37 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-13 10:03:15 +0000 Remove redundant rtinit() calls from tuntap. Removed code iterates over if_addrhead and tries to remove routes for each ifa. This is exactly the thing that if_purgeaddrs() do, and if_purgeaddr() is already called in the end. Reviewed by: glebius MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D28106 --- sys/net/if_tuntap.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 5789fce5407f..0c0a0dd66339 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -123,7 +123,7 @@ struct tuntap_softc { #define TUN_OPEN 0x0001 #define TUN_INITED 0x0002 #define TUN_UNUSED1 0x0008 -#define TUN_DSTADDR 0x0010 +#define TUN_UNUSED2 0x0010 #define TUN_LMODE 0x0020 #define TUN_RWAIT 0x0040 #define TUN_ASYNC 0x0080 @@ -1160,19 +1160,8 @@ tundtor(void *data) /* Delete all addresses and routes which reference this interface. */ if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - struct ifaddr *ifa; - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; TUN_UNLOCK(tp); - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - /* deal w/IPv4 PtP destination; unlocked read */ - if (!l2tun && ifa->ifa_addr->sa_family == AF_INET) { - rtinit(ifa, (int)RTM_DELETE, - tp->tun_flags & TUN_DSTADDR ? RTF_HOST : 0); - } else { - rtinit(ifa, (int)RTM_DELETE, 0); - } - } if_purgeaddrs(ifp); TUN_LOCK(tp); } @@ -1197,10 +1186,6 @@ static void tuninit(struct ifnet *ifp) { struct tuntap_softc *tp = ifp->if_softc; -#ifdef INET - struct epoch_tracker et; - struct ifaddr *ifa; -#endif TUNDEBUG(ifp, "tuninit\n"); @@ -1209,21 +1194,6 @@ tuninit(struct ifnet *ifp) if ((tp->tun_flags & TUN_L2) == 0) { ifp->if_flags |= IFF_UP; getmicrotime(&ifp->if_lastchange); -#ifdef INET - NET_EPOCH_ENTER(et); - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family == AF_INET) { - struct sockaddr_in *si; - - si = (struct sockaddr_in *)ifa->ifa_dstaddr; - if (si && si->sin_addr.s_addr) { - tp->tun_flags |= TUN_DSTADDR; - break; - } - } - } - NET_EPOCH_EXIT(et); -#endif TUN_UNLOCK(tp); } else { ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; From owner-dev-commits-src-all@freebsd.org Wed Jan 13 10:08:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D5364D704A; Wed, 13 Jan 2021 10:08:40 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG37C6CPcz4RRl; Wed, 13 Jan 2021 10:08:39 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1610532510; 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=bvdckk2Jnh6BquFlBAMajwnkwQrf2fvjaBb9hBJsWKk=; b=OOP1ZHpq4Tg/QUQ4eZR1VGsUIx8BLnb761p+7qj6AP0rR4z5z2N2hwhBT58OYrXD5MTBc7 oj8l3wl4xrvtfqEAhP8VQV1vBiJSXMtKALQD0hCzm/WAZjwBK9uDa3I6OCN7FnmzU/Kj9S uMzmInVGHDRbWHW1iSminSIlx7fYM6Y= Received: from amy.home (lfbn-idf2-1-745-114.w86-247.abo.wanadoo.fr [86.247.192.114]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 7ab2a5d2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 13 Jan 2021 10:08:30 +0000 (UTC) Date: Wed, 13 Jan 2021 11:08:26 +0100 From: Emmanuel Vadot To: Konstantin Belousov Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, myfreeweb Subject: Re: git: 11d62b6f31ab - main - linuxkpi: add kernel_fpu_begin/kernel_fpu_end Message-Id: <20210113110826.46fbc900b3c375e7215a8195@bidouilliste.com> In-Reply-To: References: <202101121143.10CBh02x095972@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DG37C6CPcz4RRl X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 10:08:40 -0000 On Tue, 12 Jan 2021 15:16:55 +0200 Konstantin Belousov wrote: > On Tue, Jan 12, 2021 at 11:43:00AM +0000, Emmanuel Vadot wrote: > > The branch main has been updated by manu: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 > > > > commit 11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 > > Author: Emmanuel Vadot > > AuthorDate: 2021-01-12 11:02:38 +0000 > > Commit: Emmanuel Vadot > > CommitDate: 2021-01-12 11:31:00 +0000 > > > > linuxkpi: add kernel_fpu_begin/kernel_fpu_end > > > > With newer AMD GPUs (>=Navi,Renoir) there is FPU context usage in the > > amdgpu driver. > > The `kernel_fpu_begin/end` implementations in drm did not even allow nested > > begin-end blocks. > > Does Linux allow more then one thread to execute kernel_fpu_begin ? I actually have no idea, adding Greg to cc. -- Emmanuel Vadot From owner-dev-commits-src-all@freebsd.org Wed Jan 13 10:32:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A42734D757C; Wed, 13 Jan 2021 10:32: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG3fG462Lz4SyC; Wed, 13 Jan 2021 10:32: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 7FA5116011; Wed, 13 Jan 2021 10:32: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 10DAW6jM074747; Wed, 13 Jan 2021 10:32:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DAW68a074746; Wed, 13 Jan 2021 10:32:06 GMT (envelope-from git) Date: Wed, 13 Jan 2021 10:32:06 GMT Message-Id: <202101131032.10DAW68a074746@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: ec2700e01532 - main - linux: mute the "unsupported prctl option 23" warnings 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: ec2700e01532c9d1096ac4fd0b57174c2850188b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 10:32:06 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=ec2700e01532c9d1096ac4fd0b57174c2850188b commit ec2700e01532c9d1096ac4fd0b57174c2850188b Author: Edward Tomasz Napierala AuthorDate: 2021-01-12 14:47:44 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-01-13 10:31:56 +0000 linux: mute the "unsupported prctl option 23" warnings Make the PR_CAPBSET_READ prctl(2) return EINVAL without logging any warnings; this is way too noisy with Focal. Sponsored by: The FreeBSD Foundation --- sys/compat/linux/linux_misc.c | 10 ++++++++++ sys/compat/linux/linux_misc.h | 1 + 2 files changed, 11 insertions(+) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 0898a361193e..fc846df6689f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -2041,6 +2041,16 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args) */ error = EINVAL; break; + case LINUX_PR_CAPBSET_READ: +#if 0 + /* + * This makes too much noise with Ubuntu Focal. + */ + linux_msg(td, "unsupported prctl PR_CAPBSET_READ %d", + (int)args->arg2); +#endif + error = EINVAL; + break; case LINUX_PR_SET_NO_NEW_PRIVS: linux_msg(td, "unsupported prctl PR_SET_NO_NEW_PRIVS"); error = EINVAL; diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index c3d9b3719dcf..c7e4fa38682c 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -58,6 +58,7 @@ #define LINUX_PR_GET_NAME 16 /* Get process name. */ #define LINUX_PR_GET_SECCOMP 21 #define LINUX_PR_SET_SECCOMP 22 +#define LINUX_PR_CAPBSET_READ 23 #define LINUX_PR_SET_NO_NEW_PRIVS 38 #define LINUX_PR_SET_PTRACER 1499557217 From owner-dev-commits-src-all@freebsd.org Wed Jan 13 11:13:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C53554D8452; Wed, 13 Jan 2021 11:13:45 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG4ZK4pHCz4Vwd; Wed, 13 Jan 2021 11:13:45 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm1-x329.google.com with SMTP id g10so1241038wmh.2; Wed, 13 Jan 2021 03:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:reply-to:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UIwJJl1ZATE7qNfFfo3v9+gj9qwA5PqC1tnbSWqS4JQ=; b=iaNujW+qRJ2AtQawTxMMwrgzGKiIEJVm9k7KQRQPWmWz4PXhU1X7YIUW/qd++4RwYt ghVFtxRg3EzMBmM9F8JeFuQqrG55QcPJo59jj7ENkzlobfakxBRvaJlQYduUie6XGa5N p5SARBX4q8lO446L+EpF6A/KlOmygX/YzXrE2OeDj+QuUGcL420w9S5BcL8ysYIeplt2 BWXZy5DmwfoumhAHv3Joh3Tdcmz+rL0gCLqXCN2VAhWYwtiM82qwCKEgdIaB6eGvqsJM 5KD6wkU+sEWtkbXYd/62eZlyrm8SPWjVi0wVWLMS9xvK875BOPE0k1zmWMTUyXvgNS+0 kFig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:reply-to:subject:to:references :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=UIwJJl1ZATE7qNfFfo3v9+gj9qwA5PqC1tnbSWqS4JQ=; b=RTJEJMgV2yvClT/TUoCC/TAMNOOzcSgga6GRn/DPKDCvvTezjwllD7YzuFN6gbQZ7d YAXBTm/PuHwAe88AoDp+DZ19zxJl+eTOi2ayCSBFNayVmG+EM41X0Wi3gqoyyhK8vAO3 O8YfB3rIXh+CNIzRdbHK5cigek371Pq35U7DVKbRA2HAZbqUVO3FFw0Bu2TV4Z2WhE8p sz6AXuBaxR2vnGhsD13ehh71zXsHlkQ7//vf6uT6mNkjD/VtsLYXUq0INGkq/UtthJFu CojOv96WIgYWEmLD/oomCMo5VQ9vED0q5YtWXsKG5iMWHDDOUdNl+etB30c5fPPPQ/oZ UlEA== X-Gm-Message-State: AOAM5320ItnLvQNSaKwOWdU9hK3ZX59qxjYo2oFwRm2dZ8+LFYOQsSml VwWKQNaeLCOgViYeGth0bpSwkg5qQoU= X-Google-Smtp-Source: ABdhPJx5u0D8Z1WAy36YxKjkrnz4hvf6m0uggmZl4SgzxHbaSwS8n8DQjqbfHBT2n7kQ2UOS6meVBg== X-Received: by 2002:a1c:b4c4:: with SMTP id d187mr1711608wmf.38.1610536422296; Wed, 13 Jan 2021 03:13:42 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id i11sm2402018wmd.47.2021.01.13.03.13.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jan 2021 03:13:41 -0800 (PST) Sender: Michal Meloun From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: git: bafb68265672 - main - Fix for off-by-one in GPIO driver after r368585. While at it declare the iteration variable outside the for-loop to appease older compilers. To: Hans Petter Selasky , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101130907.10D97J6M058131@gitrepo.freebsd.org> Message-ID: <1bbcc331-9a7a-f2d5-a71b-28e55ef32d40@freebsd.org> Date: Wed, 13 Jan 2021 12:13:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <202101130907.10D97J6M058131@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DG4ZK4pHCz4Vwd 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-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 11:13:45 -0000 On 13.01.2021 10:07, Hans Petter Selasky wrote: > The branch main has been updated by hselasky: > > URL: https://cgit.FreeBSD.org/src/commit/?id=bafb682656724d06045fa494efb83a4312036f1f > > commit bafb682656724d06045fa494efb83a4312036f1f > Author: Hans Petter Selasky > AuthorDate: 2021-01-12 17:46:09 +0000 > Commit: Hans Petter Selasky > CommitDate: 2021-01-13 09:06:30 +0000 > > Fix for off-by-one in GPIO driver after r368585. > While at it declare the iteration variable outside the for-loop > to appease older compilers. Why? All supported compilers are familiar with this variable declaration. It is explicitly allowed by style (9) and makes the code much more readable, IMHO. Michal > Sponsored by: Mellanox Technologies // NVIDIA Networking > --- > sys/dev/gpio/gpioc.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c > index 727b07a70589..83d55742a3a2 100644 > --- a/sys/dev/gpio/gpioc.c > +++ b/sys/dev/gpio/gpioc.c > @@ -567,6 +567,7 @@ gpioc_probe(device_t dev) > static int > gpioc_attach(device_t dev) > { > + int i; > int err; > struct gpioc_softc *sc; > struct make_dev_args devargs; > @@ -582,7 +583,7 @@ gpioc_attach(device_t dev) > return (err); > sc->sc_pin_intr = malloc(sizeof(struct gpioc_pin_intr) * sc->sc_npins, > M_GPIOC, M_WAITOK | M_ZERO); > - for (int i = 0; i <= sc->sc_npins; i++) { > + for (i = 0; i < sc->sc_npins; i++) { > sc->sc_pin_intr[i].pin = malloc(sizeof(struct gpiobus_pin), > M_GPIOC, M_WAITOK | M_ZERO); > sc->sc_pin_intr[i].sc = sc; > @@ -612,11 +613,12 @@ gpioc_detach(device_t dev) > { > struct gpioc_softc *sc = device_get_softc(dev); > int err; > + int i; > > if (sc->sc_ctl_dev) > destroy_dev(sc->sc_ctl_dev); > > - for (int i = 0; i <= sc->sc_npins; i++) { > + for (i = 0; i < sc->sc_npins; i++) { > mtx_destroy(&sc->sc_pin_intr[i].mtx); > free(&sc->sc_pin_intr[i].pin, M_GPIOC); > } > From owner-dev-commits-src-all@freebsd.org Wed Jan 13 11:25:18 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A51A4D9242; Wed, 13 Jan 2021 11:25:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4DG4qf30M2z4Wl1; Wed, 13 Jan 2021 11:25:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 610FA2601CA; Wed, 13 Jan 2021 12:25:16 +0100 (CET) Subject: Re: git: bafb68265672 - main - Fix for off-by-one in GPIO driver after r368585. While at it declare the iteration variable outside the for-loop to appease older compilers. To: mmel@freebsd.org, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101130907.10D97J6M058131@gitrepo.freebsd.org> <1bbcc331-9a7a-f2d5-a71b-28e55ef32d40@freebsd.org> From: Hans Petter Selasky Message-ID: <91d89b94-0416-44b3-2a4c-3e64b7be5f28@selasky.org> Date: Wed, 13 Jan 2021 12:25:05 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <1bbcc331-9a7a-f2d5-a71b-28e55ef32d40@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4DG4qf30M2z4Wl1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 11:25:18 -0000 On 1/13/21 12:13 PM, Michal Meloun wrote: > > > On 13.01.2021 10:07, Hans Petter Selasky wrote: >> The branch main has been updated by hselasky: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=bafb682656724d06045fa494efb83a4312036f1f >> >> >> commit bafb682656724d06045fa494efb83a4312036f1f >> Author:     Hans Petter Selasky >> AuthorDate: 2021-01-12 17:46:09 +0000 >> Commit:     Hans Petter Selasky >> CommitDate: 2021-01-13 09:06:30 +0000 >> >>      Fix for off-by-one in GPIO driver after r368585. >>      While at it declare the iteration variable outside the for-loop >>      to appease older compilers. > > Why? All supported compilers are familiar with this variable > declaration. It is explicitly allowed by style (9) and makes the code > much more readable, IMHO. > Hi, Maybe I'm a bit old-fashioned, but it appears declaring variables inside for-loops is a C99 thing: https://stackoverflow.com/questions/1287863/c-for-loop-int-initial-declaration You are right, I didn't have to change that. And btw, style(9) was updated: commit 34a8e7368f3f00d4564b0b980871f73929d6b1ce Author: Warner Losh Date: Thu Jul 16 14:12:54 2020 +0000 And I didn't yet install that version :-) I'll fix. --HPS From owner-dev-commits-src-all@freebsd.org Wed Jan 13 11:31:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A70154D949E; Wed, 13 Jan 2021 11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG4yj4NNdz4X5b; Wed, 13 Jan 2021 11: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 895D016C9C; Wed, 13 Jan 2021 11: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 10DBVPdX048977; Wed, 13 Jan 2021 11:31:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DBVPTk048976; Wed, 13 Jan 2021 11:31:25 GMT (envelope-from git) Date: Wed, 13 Jan 2021 11:31:25 GMT Message-Id: <202101131131.10DBVPTk048976@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: f2a7b434b30e - main - Variable declarations are since C99 and r363250 allowed inside for-loops. Partial revert of bafb68265672. 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: f2a7b434b30efe341d51c0c0b151614775771ab6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 11:31:25 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=f2a7b434b30efe341d51c0c0b151614775771ab6 commit f2a7b434b30efe341d51c0c0b151614775771ab6 Author: Hans Petter Selasky AuthorDate: 2021-01-13 11:27:04 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-13 11:30:41 +0000 Variable declarations are since C99 and r363250 allowed inside for-loops. Partial revert of bafb68265672. Suggested by: mmel@ --- sys/dev/gpio/gpioc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index 83d55742a3a2..9e46b32ffcba 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -567,7 +567,6 @@ gpioc_probe(device_t dev) static int gpioc_attach(device_t dev) { - int i; int err; struct gpioc_softc *sc; struct make_dev_args devargs; @@ -583,7 +582,7 @@ gpioc_attach(device_t dev) return (err); sc->sc_pin_intr = malloc(sizeof(struct gpioc_pin_intr) * sc->sc_npins, M_GPIOC, M_WAITOK | M_ZERO); - for (i = 0; i < sc->sc_npins; i++) { + for (int i = 0; i < sc->sc_npins; i++) { sc->sc_pin_intr[i].pin = malloc(sizeof(struct gpiobus_pin), M_GPIOC, M_WAITOK | M_ZERO); sc->sc_pin_intr[i].sc = sc; @@ -613,12 +612,11 @@ gpioc_detach(device_t dev) { struct gpioc_softc *sc = device_get_softc(dev); int err; - int i; if (sc->sc_ctl_dev) destroy_dev(sc->sc_ctl_dev); - for (i = 0; i < sc->sc_npins; i++) { + for (int i = 0; i < sc->sc_npins; i++) { mtx_destroy(&sc->sc_pin_intr[i].mtx); free(&sc->sc_pin_intr[i].pin, M_GPIOC); } From owner-dev-commits-src-all@freebsd.org Wed Jan 13 11:42:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CC2B4D9932; Wed, 13 Jan 2021 11:42:26 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) (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 4DG5CP356qz4Xxf; Wed, 13 Jan 2021 11:42:25 +0000 (UTC) (envelope-from greg@unrelenting.technology) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unrelenting.technology; s=default; t=1610538142; 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=J3m2mgrv7C7oQ52laIwJhP6ZVuT3ZJuYveyYX9ZRFlw=; b=dfjTkwOeFhRMTEw2rAOoktqPm++GZxO0I7gonQ7boFHNz+F4ZBKPbVzDN4Gip+VBkMuykf YUe0pvIQPOwLF2v0PYBIw3xEM7YzDV1jPIkiVBaYvlcfd8WPgBCEHP0Q7awSeVCiStxz1I dfZwrDviqm2mebPV2F+/8bOyhyUtyDc= From: myfreeweb To: Konstantin Belousov CC: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 11d62b6f31ab - main - linuxkpi: add kernel_fpu_begin/kernel_fpu_end In-Reply-To: <20210113110826.46fbc900b3c375e7215a8195@bidouilliste.com> References: <202101121143.10CBh02x095972@gitrepo.freebsd.org> <20210113110826.46fbc900b3c375e7215a8195@bidouilliste.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: greg@unrelenting.technology Date: Wed, 13 Jan 2021 11:42:22 GMT X-Rspamd-Queue-Id: 4DG5CP356qz4Xxf X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=unrelenting.technology header.s=default header.b=dfjTkwOe; dmarc=pass (policy=none) header.from=unrelenting.technology; spf=pass (mx1.freebsd.org: domain of greg@unrelenting.technology designates 94.23.1.103 as permitted sender) smtp.mailfrom=greg@unrelenting.technology X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[unrelenting.technology:s=default]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:94.23.1.103]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[unrelenting.technology:+]; DMARC_POLICY_ALLOW(-0.50)[unrelenting.technology,none]; RCVD_IN_DNSWL_NONE(0.00)[94.23.1.103:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_VERYGOOD(0.00)[94.23.1.103:from]; ASN(0.00)[asn:16276, ipnet:94.23.0.0/16, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 11:42:26 -0000 On January 13, 2021 10:08:26 AM UTC, Emmanuel Vadot wrote: >On Tue, 12 Jan 2021 15:16:55 +0200 >Konstantin Belousov wrote: > >> On Tue, Jan 12, 2021 at 11:43:00AM +0000, Emmanuel Vadot wrote: >> > The branch main has been updated by manu: >> >=20 >> > URL: https://cgit=2EFreeBSD=2Eorg/src/commit/?id=3D11d62b6f31ab4e99df= 6d0c6c23406b57eaa37f41 >> >=20 >> > commit 11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 >> > Author: Emmanuel Vadot >> > AuthorDate: 2021-01-12 11:02:38 +0000 >> > Commit: Emmanuel Vadot >> > CommitDate: 2021-01-12 11:31:00 +0000 >> >=20 >> > linuxkpi: add kernel_fpu_begin/kernel_fpu_end >> > =20 >> > With newer AMD GPUs (>=3DNavi,Renoir) there is FPU context usage = in the >> > amdgpu driver=2E >> > The `kernel_fpu_begin/end` implementations in drm did not even al= low nested >> > begin-end blocks=2E >>=20 >> Does Linux allow more then one thread to execute kernel_fpu_begin ? > > I actually have no idea, adding Greg to cc=2E Looks like they save the context into the current thread state, so yes? (d= rm doesn't need that) Also they seem to do something FPU_KERN_NOCTX like (??) because they disab= le preemption inside these blocks=2E (Where does our NOCTX actually store the state?) Apparently the API shouldn't actually support nesting these sections, beca= use kernel_fpu_end unconditionally enables preemption=2E But that nesting w= ould not just panic like it did on our old impl=2E (Indeed in newest linux = versions there's a WARN on nesting =E2=80=93 only a warning though, not a p= anic!) And amdgpu relies on that not panicking=2E Looks like amdgpu will narrow the FPU sections down now, they are struggli= ng with FPU stuff upstream too: https://www=2Espinics=2Enet/lists/kernel/msg3793776=2Ehtml From owner-dev-commits-src-all@freebsd.org Wed Jan 13 12:15:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E742F4DB192; Wed, 13 Jan 2021 12:15:14 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG5xG5gPrz4b89; Wed, 13 Jan 2021 12:15:14 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: by mail-wm1-x329.google.com with SMTP id y23so1410339wmi.1; Wed, 13 Jan 2021 04:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kP1qlQOy4n4C+3xPGKghq2PXcz0KZ4cdFgwEabYzWnY=; b=Z3gMiKgxnLg+Ky/2LsMb1UvTllhr/I1uC6cHfOHytmXEePS94ITMumEOV4KN2uZv0z x6xDXhPLGd3PsAR2xAEh/yirVzxokVRZlprUu129q3YEHRKSjCEhyRuxdQP/rdwZmoJA hw/b+hWqIOkN2lKRMke1Q3KUXb/rCyW+k5kqEfgc7tN7NvWyreDoyrxmmTsNedcdJ3Lr 73kOlYVC5fSyvh8BVoaTEm+kv38GyWGLiAPaYxk101yDDayl/29KELb5srEnoUkpAgiR lZcS1yS6isF4AN7JdBjjiO/GQH0K38D6oJBnhiw5nZjV+uyLwfLYlv3PgTXbNkTUItP1 5giA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=kP1qlQOy4n4C+3xPGKghq2PXcz0KZ4cdFgwEabYzWnY=; b=PDtd9beYvtgiD1i9YuZO0AT7vOGue51jYf/Hv41DI6t4mWwavv52QpgRPn2Svvg6de +Fawl+CFxF4t/+5EoaE4z+hg2fHYN/edcwbm4cRPSlaVh1brDWlZJawtFtWB+aEM8juH ksFhA3Lfp1XKfvjewvMC7MkI2kQX1gYeNZRJwQpTqgvkaYm7Hz6UcR/uiJMXtpABmhRx 18qzBztkeyMfv+0tDoibHzx72Q+SBgaL5PyrHERYsLyPs9uwH3BZyF4U9yOvtmF2yB63 ium4dsyPqMaMd/Qq5c4NurE0n/DAb9QmYnddOwQgePoDsUGTJC/D2CrJRoWqwH3NCbL4 m7NA== X-Gm-Message-State: AOAM5333SFVwNl97Bz4vYgkXphM9QbiArn68QD3MzGvQLOZRU0Sx7MVG rJci0yh/LU0Bxc/Z9/7zHTNgZmp2QZU= X-Google-Smtp-Source: ABdhPJyb32bbuukAl3BLhlM89vdTBTvGG9Wwu7M1feXbuxmkyBRpCV6BlAYX0QGWeKDM4Xkt3OcyWg== X-Received: by 2002:a1c:2091:: with SMTP id g139mr1964715wmg.133.1610540112991; Wed, 13 Jan 2021 04:15:12 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id g14sm2739810wrd.32.2021.01.13.04.15.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jan 2021 04:15:12 -0800 (PST) Sender: Michal Meloun Reply-To: meloun.michal@gmail.com Subject: Re: git: f2a7b434b30e - main - Variable declarations are since C99 and r363250 allowed inside for-loops. Partial revert of bafb68265672. To: Hans Petter Selasky , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101131131.10DBVPTk048976@gitrepo.freebsd.org> From: Michal Meloun Message-ID: Date: Wed, 13 Jan 2021 13:15:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <202101131131.10DBVPTk048976@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DG5xG5gPrz4b89 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-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 12:15:15 -0000 On 13.01.2021 12:31, Hans Petter Selasky wrote: > The branch main has been updated by hselasky: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f2a7b434b30efe341d51c0c0b151614775771ab6 > > commit f2a7b434b30efe341d51c0c0b151614775771ab6 > Author: Hans Petter Selasky > AuthorDate: 2021-01-13 11:27:04 +0000 > Commit: Hans Petter Selasky > CommitDate: 2021-01-13 11:30:41 +0000 > > Variable declarations are since C99 and r363250 allowed inside for-loops. > Partial revert of bafb68265672. > > Suggested by: mmel@ Thanks for prompt action. Michal From owner-dev-commits-src-all@freebsd.org Wed Jan 13 12:35:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45CE84DBC1D; Wed, 13 Jan 2021 12:35:50 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG6P12gD8z4c9L; Wed, 13 Jan 2021 12:35:49 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-ej1-x630.google.com with SMTP id e18so2773929ejt.12; Wed, 13 Jan 2021 04:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:reply-to:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9FVUmeuNSQC+cfy/tbgAlhAhldOUik8vhBr8HmmT3FM=; b=mQib1aeRl6NCgVYBJ+ZW2ePN6JL7v9ZZwg/0Y3keMBvEnsQrTHxzh6UQ9QnvAXjKzz +UUi1pQJI56FbXcw7b+7PLRojmi1xinsdSZulBGu3K4LbL3mxEHroVmltL/5fLVk7KfL iJgCjPokF+lhK9v7MsUII5eiZ6z9iFGd99CQ4eV78S3AMsounAsEW/R0aMsL/KRtHcDY pt6a7nYMlCxtwj0XhPcvatQ8klCqtFbFVjlcbyy8vVMOJp35jj6dp2gvLHbbOxLfECxf +Gd5Gyife+FSPo8yYIxWzxfeo99GQzbGmUSJPB4Z0JvpZO1gdL7F8W2GfNvo7sF5rDxj /Fow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:reply-to:subject:to:references :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=9FVUmeuNSQC+cfy/tbgAlhAhldOUik8vhBr8HmmT3FM=; b=lv//bUxB+0yWigo2wSwDHi0CpG3SOXeSBK6yf/e/7qg3H4m0Nq6e+HG4iBRpjz5C5v 1pos6Vxth3hC6nQttiGe9veQm0h3kBGFBhJJ8Q4B/IAOj7dIddGL/7Nv1tf4HqODDPTG I59ltaOvFvX36B6wKKH4cdJ7CdsYXWSPwenHp5bBQNCty7431HDQosDrYKsGj3A7AJVL RjPpH+nPZtP+kmoVEwDU2jk9LVO71rBEt68RcyZWI0J3oiL3lbed4zxTbjBie7vgf7VQ YpwtTDdW0ZfKKIpxdjgbUjf/pqfLudDcTIhw1Ifm4WuiXKOzsj3hDHCit2jAudWkmgkE qIzw== X-Gm-Message-State: AOAM530jZRI9Rk9Sh0uJfVzpciFJw/rp2PEd7HmGIa1A8cWqGL/t7vhI 2ZLkd3CiAeVNGKuDmTc8oB0uYvVT5aQ= X-Google-Smtp-Source: ABdhPJyzA7NPU5XeHo45Lx1+kh1Mt4NwYyEsqaFphqQJT4lIUSaInwLEL3U2NjEU4achmKhmxMKM3Q== X-Received: by 2002:a17:906:2e0f:: with SMTP id n15mr1477675eji.252.1610541347242; Wed, 13 Jan 2021 04:35:47 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id h16sm799715edw.34.2021.01.13.04.35.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jan 2021 04:35:46 -0800 (PST) Sender: Michal Meloun From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: git: facdd1cd2045 - main - cgem: add 64-bit support To: Mitchell Horne , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101102053.10AKrGqv070360@gitrepo.freebsd.org> Message-ID: Date: Wed, 13 Jan 2021 13:35:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <202101102053.10AKrGqv070360@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DG6P12gD8z4c9L X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=mQib1aeR; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::630 as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-1.40 / 15.00]; HAS_REPLYTO(0.00)[mmel@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::630:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; NEURAL_SPAM_SHORT(0.60)[0.596]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::630:from:127.0.2.255]; MID_RHS_MATCH_TO(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::630:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-main,dev-commits-src-all] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 12:35:50 -0000 On 10.01.2021 21:53, Mitchell Horne wrote: > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=facdd1cd20451d7817c72a25e9253b934ca65eb6 > > commit facdd1cd20451d7817c72a25e9253b934ca65eb6 > Author: Thomas Skibo > AuthorDate: 2021-01-10 20:18:41 +0000 > Commit: Mitchell Horne > CommitDate: 2021-01-10 20:51:52 +0000 > > cgem: add 64-bit support > > Add 64-bit address support to Cadence CGEM Ethernet driver for use in > other SoCs such as the Zynq UltraScale+ and SiFive HighFive Unleashed. > > Reviewed by: philip, 0mp (manpages) > Differential Revision: https://reviews.freebsd.org/D24304 > --- > share/man/man4/Makefile | 7 + > share/man/man4/{man4.arm => }/cgem.4 | 14 +- > share/man/man4/man4.arm/Makefile | 4 +- > sys/arm/conf/GENERIC | 2 +- > sys/arm/conf/ZEDBOARD | 2 +- > sys/arm64/conf/GENERIC | 1 + > sys/dev/cadence/if_cgem.c | 341 ++++++++++++++++++++++++----------- > sys/dev/cadence/if_cgem_hw.h | 64 ++++++- > sys/dts/arm/zynq-7000.dtsi | 12 +- > sys/riscv/conf/GENERIC | 2 +- > 10 files changed, 323 insertions(+), 126 deletions(-) > > diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile > index c72caf0199c9..b8e63315cb95 100644 > --- a/share/man/man4/Makefile > +++ b/share/man/man4/Makefile > @@ -106,6 +106,7 @@ MAN= aac.4 \ > cdceem.4 \ > cfi.4 \ > cfumass.4 \ > + ${_cgem.4} \ > ch.4 \ > chromebook_platform.4 \ > ${_chvgpio.4} \ > @@ -903,6 +904,12 @@ _virtio_scsi.4= virtio_scsi.4 > _vtnet.4= vtnet.4 > .endif > > +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" || \ > + ${MACHINE_CPUARCH} == "riscv" > +_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" > diff --git a/share/man/man4/man4.arm/cgem.4 b/share/man/man4/cgem.4 > similarity index 96% > rename from share/man/man4/man4.arm/cgem.4 > rename to share/man/man4/cgem.4 > index 6de1d7961788..f9f525dc4554 100644 > --- a/share/man/man4/man4.arm/cgem.4 > +++ b/share/man/man4/cgem.4 > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd August 26, 2014 > +.Dd January 10, 2021 > .Dt CGEM 4 > .Os > .Sh NAME > @@ -44,7 +44,8 @@ The > .Nm > driver provides support for the Cadence GEM (Gigabit Ethernet MAC). > The Cadence GEM is used in some SoC (System on a Chip) devices such as > -the Xilinx Zynq-7000 and the Atmel SAMA5D3. > +the Xilinx Zynq-7000, the Xilinx Zynq UltraScale+, and the SiFive > +HiFive Unleashed. > .Pp > The > .Nm > @@ -284,7 +285,7 @@ There are > variables that count > packets discarded by the hardware (see below). > .Pp > -The GEM used in the Zynq-7000 has a bug such that the receiver can > +The GEM used in the Zynq-7000 has a bug such that the receiver can > potentially freeze up under a high load. > The issue is described in sec. 16.7 > "Known Issues" of the Zynq-7000 SoC Technical Reference Manual (Xilinx > @@ -292,7 +293,10 @@ UG585 v1.7). > The > .Nm > driver implements the work-around suggested in the manual. > -If the bug does not exist in other versions of this device, the > -work-around can be disabled by setting the dev.cgem.%d.rxhangwar > +It is believed that the bug does not exist in the Zynq UltraScale+ and > +SiFive SoCs so the work-around is disabled in those instances and enabled > +in all others. > +The work-around can be disabled by setting the > +.Va dev.cgem.%d.rxhangwar > .Xr sysctl 8 > variable to 0. > diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile > index 21d53f43a7c8..0b3eec427934 100644 > --- a/share/man/man4/man4.arm/Makefile > +++ b/share/man/man4/man4.arm/Makefile > @@ -8,7 +8,6 @@ MAN= \ > aw_spi.4 \ > aw_syscon.4 \ > bcm283x_pwm.4 \ > - cgem.4 \ > devcfg.4 \ > imx6_ahci.4 \ > imx6_snvs.4 \ > @@ -16,8 +15,7 @@ MAN= \ > mge.4 \ > ti_adc.4 > > -MLINKS= cgem.4 if_cgem.4 > -MLINKS+= imx_wdog.4 imxwdt.4 > +MLINKS= imx_wdog.4 imxwdt.4 > MLINKS+= mge.4 if_mge.4 > > MANSUBDIR=/arm > diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC > index 0f0522eb9802..3cfe16ccfe54 100644 > --- a/sys/arm/conf/GENERIC > +++ b/sys/arm/conf/GENERIC > @@ -228,8 +228,8 @@ device e6000sw > device miibus > > device awg # 10/100/1000 integrated EMAC controller > +device cgem # Cadence GEM Gigabit Ethernet device > device cpsw # TI Common Platform Ethernet Switch (CPSW) > -device cgem # Zynq-7000 gig ethernet device > device dwc # 10/100/1000 integrated GMAC controller > device emac # 10/100 integrated EMAC controller > device ffec # Freescale Fast Ethernet Controller > diff --git a/sys/arm/conf/ZEDBOARD b/sys/arm/conf/ZEDBOARD > index 613e0c73a16d..24490a5129e5 100644 > --- a/sys/arm/conf/ZEDBOARD > +++ b/sys/arm/conf/ZEDBOARD > @@ -49,7 +49,7 @@ device mpcore_timer > > device loop > device ether > -device cgem # Zynq-7000 gig ethernet device > +device cgem # Cadence GEM Gigabit Ethernet device > device mii > device e1000phy > device rgephy # Zybo uses Realtek RTL8211E > diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC > index 268089dba1fc..463271d1db26 100644 > --- a/sys/arm64/conf/GENERIC > +++ b/sys/arm64/conf/GENERIC > @@ -278,6 +278,7 @@ device miibus # MII bus support > device al_eth # Annapurna Alpine Ethernet NIC > device awg # Allwinner EMAC Gigabit Ethernet > device axa # AMD Opteron A1100 integrated NIC > +device cgem # Cadence GEM Gigabit Ethernet device > device dwc_rk # Rockchip Designware > device dwc_socfpga # Altera SOCFPGA Ethernet MAC > device ffec # iMX FFEC > diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c > index 3c5277452469..77337e977dcc 100644 > --- a/sys/dev/cadence/if_cgem.c > +++ b/sys/dev/cadence/if_cgem.c > @@ -77,6 +77,14 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#ifdef EXT_RESOURCES > +#include > +#endif > + > +#if INTPTR_MAX == INT64_MAX > +#define CGEM64 > +#endif > + > #include > > #include "miibus_if.h" > @@ -86,9 +94,6 @@ __FBSDID("$FreeBSD$"); > #define CGEM_NUM_RX_DESCS 512 /* size of receive descriptor ring */ > #define CGEM_NUM_TX_DESCS 512 /* size of transmit descriptor ring */ > > -#define MAX_DESC_RING_SIZE (MAX(CGEM_NUM_RX_DESCS*sizeof(struct cgem_rx_desc),\ > - CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc))) > - > /* Default for sysctl rxbufs. Must be < CGEM_NUM_RX_DESCS of course. */ > #define DEFAULT_NUM_RX_BUFS 256 /* number of receive bufs to queue. */ > > @@ -97,11 +102,18 @@ __FBSDID("$FreeBSD$"); > #define CGEM_CKSUM_ASSIST (CSUM_IP | CSUM_TCP | CSUM_UDP | \ > CSUM_TCP_IPV6 | CSUM_UDP_IPV6) > > +#define HWTYPE_GENERIC_GEM 1 > +#define HWTYPE_ZYNQ 2 > +#define HWTYPE_ZYNQMP 3 > +#define HWTYPE_SIFIVE_FU540 4 > + > static struct ofw_compat_data compat_data[] = { > - { "cadence,gem", 1 }, > - { "cdns,macb", 1 }, > - { "sifive,fu540-c000-gem", 1 }, > - { NULL, 0 }, > + { "cdns,zynq-gem", HWTYPE_ZYNQ }, > + { "cdns,zynqmp-gem", HWTYPE_ZYNQMP }, > + { "sifive,fu540-c000-gem", HWTYPE_SIFIVE_FU540 }, > + { "cdns,gem", HWTYPE_GENERIC_GEM }, > + { "cadence,gem", HWTYPE_GENERIC_GEM }, > + { NULL, 0 } > }; > > struct cgem_softc { > @@ -116,8 +128,13 @@ struct cgem_softc { > void *intrhand; > struct callout tick_ch; > uint32_t net_ctl_shadow; > + uint32_t net_cfg_shadow; > +#ifdef EXT_RESOURCES > + clk_t ref_clk; > +#else > int ref_clk_num; > - u_char eaddr[6]; > +#endif > + int neednullqs; > > bus_dma_tag_t desc_dma_tag; > bus_dma_tag_t mbuf_dma_tag; > @@ -146,12 +163,15 @@ struct cgem_softc { > int txring_hd_ptr; /* where to put next xmits */ > int txring_tl_ptr; /* next xmit mbuf to free */ > int txring_queued; /* num xmits segs queued */ > - bus_dmamap_t txring_dma_map; > u_int txfull; /* tx ring full events */ > u_int txdefrags; /* tx calls to m_defrag() */ > u_int txdefragfails; /* tx m_defrag() failures */ > u_int txdmamapfails; /* tx dmamap failures */ > > + /* null descriptor rings */ > + void *null_qs; > + bus_addr_t null_qs_physaddr; > + > /* hardware provided statistics */ > struct cgem_hw_stats { > uint64_t tx_bytes; > @@ -274,9 +294,9 @@ cgem_get_mac(struct cgem_softc *sc, u_char eaddr[]) > > /* > * cgem_mac_hash(): map 48-bit address to a 6-bit hash. The 6-bit hash > - * corresponds to a bit in a 64-bit hash register. Setting that bit in the hash > - * register enables reception of all frames with a destination address that > - * hashes to that 6-bit value. > + * corresponds to a bit in a 64-bit hash register. Setting that bit in the > + * hash register enables reception of all frames with a destination address > + * that hashes to that 6-bit value. > * > * The hash function is described in sec. 16.2.3 in the Zynq-7000 Tech > * Reference Manual. Bits 0-5 in the hash are the exclusive-or of > @@ -321,18 +341,15 @@ cgem_rx_filter(struct cgem_softc *sc) > { > if_t ifp = sc->ifp; > uint32_t hashes[2] = { 0, 0 }; > - uint32_t net_cfg; > - > - net_cfg = RD4(sc, CGEM_NET_CFG); > > - net_cfg &= ~(CGEM_NET_CFG_MULTI_HASH_EN | > + sc->net_cfg_shadow &= ~(CGEM_NET_CFG_MULTI_HASH_EN | > CGEM_NET_CFG_NO_BCAST | CGEM_NET_CFG_COPY_ALL); > > if ((if_getflags(ifp) & IFF_PROMISC) != 0) > - net_cfg |= CGEM_NET_CFG_COPY_ALL; > + sc->net_cfg_shadow |= CGEM_NET_CFG_COPY_ALL; > else { > if ((if_getflags(ifp) & IFF_BROADCAST) == 0) > - net_cfg |= CGEM_NET_CFG_NO_BCAST; > + sc->net_cfg_shadow |= CGEM_NET_CFG_NO_BCAST; > if ((if_getflags(ifp) & IFF_ALLMULTI) != 0) { > hashes[0] = 0xffffffff; > hashes[1] = 0xffffffff; > @@ -340,12 +357,12 @@ cgem_rx_filter(struct cgem_softc *sc) > if_foreach_llmaddr(ifp, cgem_hash_maddr, hashes); > > if (hashes[0] != 0 || hashes[1] != 0) > - net_cfg |= CGEM_NET_CFG_MULTI_HASH_EN; > + sc->net_cfg_shadow |= CGEM_NET_CFG_MULTI_HASH_EN; > } > > WR4(sc, CGEM_HASH_TOP, hashes[0]); > WR4(sc, CGEM_HASH_BOT, hashes[1]); > - WR4(sc, CGEM_NET_CFG, net_cfg); > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > } > > /* For bus_dmamap_load() callback. */ > @@ -358,40 +375,92 @@ cgem_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) > *(bus_addr_t *)arg = segs[0].ds_addr; > } > > +/* Set up null queues for priority queues we actually can't disable. */ > +static void > +cgem_null_qs(struct cgem_softc *sc) > +{ > + struct cgem_rx_desc *rx_desc; > + struct cgem_tx_desc *tx_desc; > + uint32_t queue_mask; > + int n; > + > + /* Read design config register 6 to determine number of queues. */ > + queue_mask = (RD4(sc, CGEM_DESIGN_CFG6) & > + CGEM_DESIGN_CFG6_DMA_PRIO_Q_MASK) >> 1; > + if (queue_mask == 0) > + return; > + > + /* Create empty RX queue and empty TX buf queues. */ > + memset(sc->null_qs, 0, sizeof(struct cgem_rx_desc) + > + sizeof(struct cgem_tx_desc)); > + rx_desc = sc->null_qs; > + rx_desc->addr = CGEM_RXDESC_OWN | CGEM_RXDESC_WRAP; > + tx_desc = (struct cgem_tx_desc *)(rx_desc + 1); > + tx_desc->ctl = CGEM_TXDESC_USED | CGEM_TXDESC_WRAP; > + > + /* Point all valid ring base pointers to the null queues. */ > + for (n = 1; (queue_mask & 1) != 0; n++, queue_mask >>= 1) { > + WR4(sc, CGEM_RX_QN_BAR(n), sc->null_qs_physaddr); > + WR4(sc, CGEM_TX_QN_BAR(n), sc->null_qs_physaddr + > + sizeof(struct cgem_rx_desc)); > + } > +} > + > /* Create DMA'able descriptor rings. */ > static int > cgem_setup_descs(struct cgem_softc *sc) > { > int i, err; > + int desc_rings_size = CGEM_NUM_RX_DESCS * sizeof(struct cgem_rx_desc) + > + CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc); > + > + if (sc->neednullqs) > + desc_rings_size += sizeof(struct cgem_rx_desc) + > + sizeof(struct cgem_tx_desc); > > sc->txring = NULL; > sc->rxring = NULL; > > /* Allocate non-cached DMA space for RX and TX descriptors. */ > - err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, > - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, > - MAX_DESC_RING_SIZE, 1, MAX_DESC_RING_SIZE, 0, > + err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, > +#ifdef CGEM64 > + 1ULL << 32, /* Do not cross a 4G boundary. */ > +#else > + 0, > +#endif > + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, > + desc_rings_size, 1, desc_rings_size, 0, > busdma_lock_mutex, &sc->sc_mtx, &sc->desc_dma_tag); > if (err) > return (err); > > /* Set up a bus_dma_tag for mbufs. */ > err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, > - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, > - MCLBYTES, TX_MAX_DMA_SEGS, MCLBYTES, 0, > - busdma_lock_mutex, &sc->sc_mtx, &sc->mbuf_dma_tag); > + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, > + TX_MAX_DMA_SEGS, MCLBYTES, 0, busdma_lock_mutex, &sc->sc_mtx, > + &sc->mbuf_dma_tag); > if (err) > return (err); > > - /* Allocate DMA memory in non-cacheable space. */ > + /* > + * Allocate DMA memory in non-cacheable space. We allocate transmit, > + * receive and null descriptor queues all at once because the > + * hardware only provides one register for the upper 32 bits of > + * rx and tx descriptor queues hardware addresses. > + */ > err = bus_dmamem_alloc(sc->desc_dma_tag, (void **)&sc->rxring, > - BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &sc->rxring_dma_map); > +#ifdef __arm__ > + BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, > +#else > + BUS_DMA_NOWAIT | BUS_DMA_NOCACHE | BUS_DMA_ZERO, Using BUS_DMA_NOCACHE is clearly wrong on arm64 and probably also on all other architectures. In other words - the only real usage of BUS_DMA_NOCACHE is buggy hardware - (when snooping is not delivered to all levels of caches). In all other cases it indicates problem in the implementation of busdma. Memory types in busdma should works as follows: Normal -> allocate cached memory although device is not on DMA coherent bus. BUS_DMA_COHERENT -> allocate cached memory if device is on DMA coherent bus, uncached otherwise. BUS_DMA_NOCACHE -> allocate uncached memory although given device is on DMA coherent bus. Michal > +#endif > + &sc->rxring_dma_map); > if (err) > return (err); > > /* Load descriptor DMA memory. */ > err = bus_dmamap_load(sc->desc_dma_tag, sc->rxring_dma_map, > - (void *)sc->rxring, CGEM_NUM_RX_DESCS*sizeof(struct cgem_rx_desc), > + (void *)sc->rxring, desc_rings_size, > cgem_getaddr, &sc->rxring_physaddr, BUS_DMA_NOWAIT); > if (err) > return (err); > @@ -409,18 +478,9 @@ cgem_setup_descs(struct cgem_softc *sc) > sc->rxring_tl_ptr = 0; > sc->rxring_queued = 0; > > - /* Allocate DMA memory for TX descriptors in non-cacheable space. */ > - err = bus_dmamem_alloc(sc->desc_dma_tag, (void **)&sc->txring, > - BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &sc->txring_dma_map); > - if (err) > - return (err); > - > - /* Load TX descriptor DMA memory. */ > - err = bus_dmamap_load(sc->desc_dma_tag, sc->txring_dma_map, > - (void *)sc->txring, CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc), > - cgem_getaddr, &sc->txring_physaddr, BUS_DMA_NOWAIT); > - if (err) > - return (err); > + sc->txring = (struct cgem_tx_desc *)(sc->rxring + CGEM_NUM_RX_DESCS); > + sc->txring_physaddr = sc->rxring_physaddr + CGEM_NUM_RX_DESCS * > + sizeof(struct cgem_rx_desc); > > /* Initialize TX descriptor ring. */ > for (i = 0; i < CGEM_NUM_TX_DESCS; i++) { > @@ -435,6 +495,14 @@ cgem_setup_descs(struct cgem_softc *sc) > sc->txring_tl_ptr = 0; > sc->txring_queued = 0; > > + if (sc->neednullqs) { > + sc->null_qs = (void *)(sc->txring + CGEM_NUM_TX_DESCS); > + sc->null_qs_physaddr = sc->txring_physaddr + > + CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc); > + > + cgem_null_qs(sc); > + } > + > return (0); > } > > @@ -484,6 +552,9 @@ cgem_fill_rqueue(struct cgem_softc *sc) > > /* Write rx descriptor and increment head pointer. */ > sc->rxring[sc->rxring_hd_ptr].ctl = 0; > +#ifdef CGEM64 > + sc->rxring[sc->rxring_hd_ptr].addrhi = segs[0].ds_addr >> 32; > +#endif > if (sc->rxring_hd_ptr == CGEM_NUM_RX_DESCS - 1) { > sc->rxring[sc->rxring_hd_ptr].addr = segs[0].ds_addr | > CGEM_RXDESC_WRAP; > @@ -509,7 +580,7 @@ cgem_recv(struct cgem_softc *sc) > m_hd = NULL; > m_tl = &m_hd; > while (sc->rxring_queued > 0 && > - (sc->rxring[sc->rxring_tl_ptr].addr & CGEM_RXDESC_OWN) != 0) { > + (sc->rxring[sc->rxring_tl_ptr].addr & CGEM_RXDESC_OWN) != 0) { > ctl = sc->rxring[sc->rxring_tl_ptr].ctl; > > /* Grab filled mbuf. */ > @@ -629,9 +700,16 @@ cgem_clean_tx(struct cgem_softc *sc) > /* Check the status. */ > if ((ctl & CGEM_TXDESC_AHB_ERR) != 0) { > /* Serious bus error. log to console. */ > +#ifdef CGEM64 > + device_printf(sc->dev, > + "cgem_clean_tx: AHB error, addr=0x%x%08x\n", > + sc->txring[sc->txring_tl_ptr].addrhi, > + sc->txring[sc->txring_tl_ptr].addr); > +#else > device_printf(sc->dev, > "cgem_clean_tx: AHB error, addr=0x%x\n", > sc->txring[sc->txring_tl_ptr].addr); > +#endif > } else if ((ctl & (CGEM_TXDESC_RETRY_ERR | > CGEM_TXDESC_LATE_COLL)) != 0) { > if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); > @@ -640,8 +718,8 @@ cgem_clean_tx(struct cgem_softc *sc) > > /* > * If the packet spanned more than one tx descriptor, skip > - * descriptors until we find the end so that only start-of-frame > - * descriptors are processed. > + * descriptors until we find the end so that only > + * start-of-frame descriptors are processed. > */ > while ((ctl & CGEM_TXDESC_LAST_BUF) == 0) { > if ((ctl & CGEM_TXDESC_WRAP) != 0) > @@ -759,7 +837,10 @@ cgem_start_locked(if_t ifp) > /* Descriptor address. */ > sc->txring[sc->txring_hd_ptr + i].addr = > segs[i].ds_addr; > - > +#ifdef CGEM64 > + sc->txring[sc->txring_hd_ptr + i].addrhi = > + segs[i].ds_addr >> 32; > +#endif > /* Descriptor control word. */ > ctl = segs[i].ds_len; > if (i == nsegs - 1) { > @@ -961,8 +1042,21 @@ cgem_reset(struct cgem_softc *sc) > > CGEM_ASSERT_LOCKED(sc); > > + /* Determine data bus width from design configuration register. */ > + switch (RD4(sc, CGEM_DESIGN_CFG1) & > + CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_MASK) { > + case CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_64: > + sc->net_cfg_shadow = CGEM_NET_CFG_DBUS_WIDTH_64; > + break; > + case CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_128: > + sc->net_cfg_shadow = CGEM_NET_CFG_DBUS_WIDTH_128; > + break; > + default: > + sc->net_cfg_shadow = CGEM_NET_CFG_DBUS_WIDTH_32; > + } > + > WR4(sc, CGEM_NET_CTRL, 0); > - WR4(sc, CGEM_NET_CFG, 0); > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > WR4(sc, CGEM_NET_CTRL, CGEM_NET_CTRL_CLR_STAT_REGS); > WR4(sc, CGEM_TX_STAT, CGEM_TX_STAT_ALL); > WR4(sc, CGEM_RX_STAT, CGEM_RX_STAT_ALL); > @@ -973,8 +1067,8 @@ cgem_reset(struct cgem_softc *sc) > WR4(sc, CGEM_RX_QBAR, 0); > > /* Get management port running even if interface is down. */ > - WR4(sc, CGEM_NET_CFG, CGEM_NET_CFG_DBUS_WIDTH_32 | > - CGEM_NET_CFG_MDC_CLK_DIV_64); > + sc->net_cfg_shadow |= CGEM_NET_CFG_MDC_CLK_DIV_48; > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > > sc->net_ctl_shadow = CGEM_NET_CTRL_MGMT_PORT_EN; > WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow); > @@ -985,33 +1079,33 @@ static void > cgem_config(struct cgem_softc *sc) > { > if_t ifp = sc->ifp; > - uint32_t net_cfg; > uint32_t dma_cfg; > u_char *eaddr = if_getlladdr(ifp); > > CGEM_ASSERT_LOCKED(sc); > > /* Program Net Config Register. */ > - net_cfg = CGEM_NET_CFG_DBUS_WIDTH_32 | > - CGEM_NET_CFG_MDC_CLK_DIV_64 | > - CGEM_NET_CFG_FCS_REMOVE | > + sc->net_cfg_shadow &= (CGEM_NET_CFG_MDC_CLK_DIV_MASK | > + CGEM_NET_CFG_DBUS_WIDTH_MASK); > + sc->net_cfg_shadow |= (CGEM_NET_CFG_FCS_REMOVE | > CGEM_NET_CFG_RX_BUF_OFFSET(ETHER_ALIGN) | > - CGEM_NET_CFG_GIGE_EN | > - CGEM_NET_CFG_1536RXEN | > - CGEM_NET_CFG_FULL_DUPLEX | > - CGEM_NET_CFG_SPEED100; > + CGEM_NET_CFG_GIGE_EN | CGEM_NET_CFG_1536RXEN | > + CGEM_NET_CFG_FULL_DUPLEX | CGEM_NET_CFG_SPEED100); > > /* Enable receive checksum offloading? */ > if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) > - net_cfg |= CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN; > + sc->net_cfg_shadow |= CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN; > > - WR4(sc, CGEM_NET_CFG, net_cfg); > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > > /* Program DMA Config Register. */ > dma_cfg = CGEM_DMA_CFG_RX_BUF_SIZE(MCLBYTES) | > CGEM_DMA_CFG_RX_PKTBUF_MEMSZ_SEL_8K | > CGEM_DMA_CFG_TX_PKTBUF_MEMSZ_SEL | > CGEM_DMA_CFG_AHB_FIXED_BURST_LEN_16 | > +#ifdef CGEM64 > + CGEM_DMA_CFG_ADDR_BUS_64 | > +#endif > CGEM_DMA_CFG_DISC_WHEN_NO_AHB; > > /* Enable transmit checksum offloading? */ > @@ -1021,8 +1115,12 @@ cgem_config(struct cgem_softc *sc) > WR4(sc, CGEM_DMA_CFG, dma_cfg); > > /* Write the rx and tx descriptor ring addresses to the QBAR regs. */ > - WR4(sc, CGEM_RX_QBAR, (uint32_t) sc->rxring_physaddr); > - WR4(sc, CGEM_TX_QBAR, (uint32_t) sc->txring_physaddr); > + WR4(sc, CGEM_RX_QBAR, (uint32_t)sc->rxring_physaddr); > + WR4(sc, CGEM_TX_QBAR, (uint32_t)sc->txring_physaddr); > +#ifdef CGEM64 > + WR4(sc, CGEM_RX_QBAR_HI, (uint32_t)(sc->rxring_physaddr >> 32)); > + WR4(sc, CGEM_TX_QBAR_HI, (uint32_t)(sc->txring_physaddr >> 32)); > +#endif > > /* Enable rx and tx. */ > sc->net_ctl_shadow |= (CGEM_NET_CTRL_TX_EN | CGEM_NET_CTRL_RX_EN); > @@ -1055,8 +1153,10 @@ cgem_init_locked(struct cgem_softc *sc) > > if_setdrvflagbits(sc->ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); > > - mii = device_get_softc(sc->miibus); > - mii_mediachg(mii); > + if (sc->miibus != NULL) { > + mii = device_get_softc(sc->miibus); > + mii_mediachg(mii); > + } > > callout_reset(&sc->tick_ch, hz, cgem_tick, sc); > } > @@ -1085,9 +1185,9 @@ cgem_stop(struct cgem_softc *sc) > cgem_reset(sc); > > /* Clear out transmit queue. */ > + memset(sc->txring, 0, CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc)); > for (i = 0; i < CGEM_NUM_TX_DESCS; i++) { > sc->txring[i].ctl = CGEM_TXDESC_USED; > - sc->txring[i].addr = 0; > if (sc->txring_m[i]) { > /* Unload and destroy dmamap. */ > bus_dmamap_unload(sc->mbuf_dma_tag, > @@ -1106,9 +1206,9 @@ cgem_stop(struct cgem_softc *sc) > sc->txring_queued = 0; > > /* Clear out receive queue. */ > + memset(sc->rxring, 0, CGEM_NUM_RX_DESCS * sizeof(struct cgem_rx_desc)); > for (i = 0; i < CGEM_NUM_RX_DESCS; i++) { > sc->rxring[i].addr = CGEM_RXDESC_OWN; > - sc->rxring[i].ctl = 0; > if (sc->rxring_m[i]) { > /* Unload and destroy dmamap. */ > bus_dmamap_unload(sc->mbuf_dma_tag, > @@ -1171,6 +1271,8 @@ cgem_ioctl(if_t ifp, u_long cmd, caddr_t data) > > case SIOCSIFMEDIA: > case SIOCGIFMEDIA: > + if (sc->miibus == NULL) > + return (ENXIO); > mii = device_get_softc(sc->miibus); > error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd); > break; > @@ -1205,16 +1307,16 @@ cgem_ioctl(if_t ifp, u_long cmd, caddr_t data) > /* Turn on RX checksumming. */ > if_setcapenablebit(ifp, IFCAP_RXCSUM | > IFCAP_RXCSUM_IPV6, 0); > - WR4(sc, CGEM_NET_CFG, > - RD4(sc, CGEM_NET_CFG) | > - CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); > + sc->net_cfg_shadow |= > + CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN; > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > } else { > /* Turn off RX checksumming. */ > if_setcapenablebit(ifp, 0, IFCAP_RXCSUM | > IFCAP_RXCSUM_IPV6); > - WR4(sc, CGEM_NET_CFG, > - RD4(sc, CGEM_NET_CFG) & > - ~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); > + sc->net_cfg_shadow &= > + ~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN; > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > } > } > if ((if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_TXCSUM)) == > @@ -1235,15 +1337,6 @@ cgem_ioctl(if_t ifp, u_long cmd, caddr_t data) > > /* MII bus support routines. > */ > -static void > -cgem_child_detached(device_t dev, device_t child) > -{ > - struct cgem_softc *sc = device_get_softc(dev); > - > - if (child == sc->miibus) > - sc->miibus = NULL; > -} > - > static int > cgem_ifmedia_upd(if_t ifp) > { > @@ -1380,24 +1473,22 @@ __weak_reference(cgem_default_set_ref_clk, cgem_set_ref_clk); > static void > cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii) > { > - uint32_t net_cfg; > int ref_clk_freq; > > CGEM_ASSERT_LOCKED(sc); > > /* Update hardware to reflect media. */ > - net_cfg = RD4(sc, CGEM_NET_CFG); > - net_cfg &= ~(CGEM_NET_CFG_SPEED100 | CGEM_NET_CFG_GIGE_EN | > + sc->net_cfg_shadow &= ~(CGEM_NET_CFG_SPEED100 | CGEM_NET_CFG_GIGE_EN | > CGEM_NET_CFG_FULL_DUPLEX); > > switch (IFM_SUBTYPE(mii->mii_media_active)) { > case IFM_1000_T: > - net_cfg |= (CGEM_NET_CFG_SPEED100 | > + sc->net_cfg_shadow |= (CGEM_NET_CFG_SPEED100 | > CGEM_NET_CFG_GIGE_EN); > ref_clk_freq = 125000000; > break; > case IFM_100_TX: > - net_cfg |= CGEM_NET_CFG_SPEED100; > + sc->net_cfg_shadow |= CGEM_NET_CFG_SPEED100; > ref_clk_freq = 25000000; > break; > default: > @@ -1405,15 +1496,25 @@ cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii) > } > > if ((mii->mii_media_active & IFM_FDX) != 0) > - net_cfg |= CGEM_NET_CFG_FULL_DUPLEX; > + sc->net_cfg_shadow |= CGEM_NET_CFG_FULL_DUPLEX; > > - WR4(sc, CGEM_NET_CFG, net_cfg); > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > > +#ifdef EXT_RESOURCES > + if (sc->ref_clk != NULL) { > + CGEM_UNLOCK(sc); > + if (clk_set_freq(sc->ref_clk, ref_clk_freq, 0)) > + device_printf(sc->dev, "could not set ref clk to %d\n", > + ref_clk_freq); > + CGEM_LOCK(sc); > + } > +#else > /* Set the reference clock if necessary. */ > if (cgem_set_ref_clk(sc->ref_clk_num, ref_clk_freq)) > device_printf(sc->dev, > "cgem_mediachange: could not set ref clk%d to %d.\n", > sc->ref_clk_num, ref_clk_freq); > +#endif > > sc->mii_media_active = mii->mii_media_active; > } > @@ -1640,19 +1741,46 @@ cgem_attach(device_t dev) > { > struct cgem_softc *sc = device_get_softc(dev); > if_t ifp = NULL; > - phandle_t node; > - pcell_t cell; > int rid, err; > u_char eaddr[ETHER_ADDR_LEN]; > + int hwtype; > +#ifndef EXT_RESOURCES > + phandle_t node; > + pcell_t cell; > +#endif > > sc->dev = dev; > CGEM_LOCK_INIT(sc); > > + /* Key off of compatible string and set hardware-specific options. */ > + hwtype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; > + if (hwtype == HWTYPE_ZYNQMP) > + sc->neednullqs = 1; > + if (hwtype == HWTYPE_ZYNQ) > + sc->rxhangwar = 1; > + > +#ifdef EXT_RESOURCES > + if (hwtype == HWTYPE_ZYNQ || hwtype == HWTYPE_ZYNQMP) { > + if (clk_get_by_ofw_name(dev, 0, "tx_clk", &sc->ref_clk) != 0) > + device_printf(dev, > + "could not retrieve reference clock.\n"); > + else if (clk_enable(sc->ref_clk) != 0) > + device_printf(dev, "could not enable clock.\n"); > + } > + else if (hwtype == HWTYPE_SIFIVE_FU540) { > + if (clk_get_by_ofw_name(dev, 0, "pclk", &sc->ref_clk) != 0) > + device_printf(dev, > + "could not retrieve reference clock.\n"); > + else if (clk_enable(sc->ref_clk) != 0) > + device_printf(dev, "could not enable clock.\n"); > + } > +#else > /* Get reference clock number and base divider from fdt. */ > node = ofw_bus_get_node(dev); > sc->ref_clk_num = 0; > if (OF_getprop(node, "ref-clock-num", &cell, sizeof(cell)) > 0) > sc->ref_clk_num = fdt32_to_cpu(cell); > +#endif > > /* Get memory resource. */ > rid = 0; > @@ -1665,7 +1793,8 @@ cgem_attach(device_t dev) > > /* Get IRQ resource. */ > rid = 0; > - sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); > + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, > + RF_ACTIVE); > if (sc->irq_res == NULL) { > device_printf(dev, "could not allocate interrupt resource.\n"); > cgem_detach(dev); > @@ -1697,7 +1826,6 @@ cgem_attach(device_t dev) > > sc->if_old_flags = if_getflags(ifp); > sc->rxbufs = DEFAULT_NUM_RX_BUFS; > - sc->rxhangwar = 1; > > /* Reset hardware. */ > CGEM_LOCK(sc); > @@ -1708,11 +1836,8 @@ cgem_attach(device_t dev) > err = mii_attach(dev, &sc->miibus, ifp, > cgem_ifmedia_upd, cgem_ifmedia_sts, BMSR_DEFCAPMASK, > MII_PHY_ANY, MII_OFFSET_ANY, 0); > - if (err) { > - device_printf(dev, "attaching PHYs failed\n"); > - cgem_detach(dev); > - return (err); > - } > + if (err) > + device_printf(dev, "warning: attaching PHYs failed\n"); > > /* Set up TX and RX descriptor area. */ > err = cgem_setup_descs(sc); > @@ -1787,26 +1912,21 @@ cgem_detach(device_t dev) > bus_dmamap_unload(sc->desc_dma_tag, > sc->rxring_dma_map); > sc->rxring_physaddr = 0; > + sc->txring_physaddr = 0; > + sc->null_qs_physaddr = 0; > } > bus_dmamem_free(sc->desc_dma_tag, sc->rxring, > sc->rxring_dma_map); > sc->rxring = NULL; > + sc->txring = NULL; > + sc->null_qs = NULL; > + > for (i = 0; i < CGEM_NUM_RX_DESCS; i++) > if (sc->rxring_m_dmamap[i] != NULL) { > bus_dmamap_destroy(sc->mbuf_dma_tag, > sc->rxring_m_dmamap[i]); > sc->rxring_m_dmamap[i] = NULL; > } > - } > - if (sc->txring != NULL) { > - if (sc->txring_physaddr != 0) { > - bus_dmamap_unload(sc->desc_dma_tag, > - sc->txring_dma_map); > - sc->txring_physaddr = 0; > - } > - bus_dmamem_free(sc->desc_dma_tag, sc->txring, > - sc->txring_dma_map); > - sc->txring = NULL; > for (i = 0; i < CGEM_NUM_TX_DESCS; i++) > if (sc->txring_m_dmamap[i] != NULL) { > bus_dmamap_destroy(sc->mbuf_dma_tag, > @@ -1823,6 +1943,13 @@ cgem_detach(device_t dev) > sc->mbuf_dma_tag = NULL; > } > > +#ifdef EXT_RESOURCES > + if (sc->ref_clk != NULL) { > + clk_release(sc->ref_clk); > + sc->ref_clk = NULL; > + } > +#endif > + > bus_generic_detach(dev); > > CGEM_LOCK_DESTROY(sc); > @@ -1836,9 +1963,6 @@ static device_method_t cgem_methods[] = { > DEVMETHOD(device_attach, cgem_attach), > DEVMETHOD(device_detach, cgem_detach), > > - /* Bus interface */ > - DEVMETHOD(bus_child_detached, cgem_child_detached), > - > /* MII interface */ > DEVMETHOD(miibus_readreg, cgem_miibus_readreg), > DEVMETHOD(miibus_writereg, cgem_miibus_writereg), > @@ -1858,3 +1982,4 @@ DRIVER_MODULE(cgem, simplebus, cgem_driver, cgem_devclass, NULL, NULL); > DRIVER_MODULE(miibus, cgem, miibus_driver, miibus_devclass, NULL, NULL); > MODULE_DEPEND(cgem, miibus, 1, 1, 1); > MODULE_DEPEND(cgem, ether, 1, 1, 1); > +SIMPLEBUS_PNP_INFO(compat_data); > diff --git a/sys/dev/cadence/if_cgem_hw.h b/sys/dev/cadence/if_cgem_hw.h > index fced73327d91..784b131a885e 100644 > --- a/sys/dev/cadence/if_cgem_hw.h > +++ b/sys/dev/cadence/if_cgem_hw.h > @@ -35,6 +35,10 @@ > * Reference: Zynq-7000 All Programmable SoC Technical Reference Manual. > * (v1.4) November 16, 2012. Xilinx doc UG585. GEM is covered in Ch. 16 > * and register definitions are in appendix B.18. > + * > + * Additional Reference: Zynq UltraScale+ Device Register Reference > + * (UG1087 v1.7 Feb 8,2019): > + * https://www.xilinx.com/html_docs/registers/ug1087/ug1087-zynq-ultrascale-registers.html > */ > > #ifndef _IF_CGEM_HW_H_ > @@ -113,6 +117,7 @@ > #define CGEM_USER_IO 0x00C /* User I/O */ > > #define CGEM_DMA_CFG 0x010 /* DMA Config */ > +#define CGEM_DMA_CFG_ADDR_BUS_64 (1 << 30) > #define CGEM_DMA_CFG_DISC_WHEN_NO_AHB (1 << 24) > #define CGEM_DMA_CFG_RX_BUF_SIZE_SHIFT 16 > #define CGEM_DMA_CFG_RX_BUF_SIZE_MASK (0xff << 16) > @@ -290,6 +295,29 @@ > #define CGEM_PTP_PEER_RX_S 0x1F8 /* PTP Peer Event rcv'd s */ > #define CGEM_PTP_PEER_RX_NS 0x1FC /* PTP Peer Event rcv'd ns */ > > +#define CGEM_DESIGN_CFG1 0x280 /* Design Configuration 1 */ > +#define CGEM_DESIGN_CFG1_AXI_CACHE_WIDTH_MASK (0xfU << 28) > +#define CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_MASK (7 << 25) > +#define CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_32 (1 << 25) > +#define CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_64 (2 << 25) > +#define CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_128 (4 << 25) > +#define CGEM_DESIGN_CFG1_IRQ_READ_CLR (1 << 23) > +#define CGEM_DESIGN_CFG1_NO_SNAPSHOT (1 << 22) > +#define CGEM_DESIGN_CFG1_NO_STATS (1 << 21) > +#define CGEM_DESIGN_CFG1_NO_SCAN_PINS (1 << 20) > +#define CGEM_DESIGN_CFG1_USER_IN_WIDTH_MASK (0x1f << 15) > +#define CGEM_DESIGN_CFG1_USER_OUT_WIDTH_MASK (0x1f << 10) > +#define CGEM_DESIGN_CFG1_USER_IO (1 << 9) > +#define CGEM_DESIGN_CFG1_APB_REV2 (1 << 8) > +#define CGEM_DESIGN_CFG1_APB_REV1 (1 << 7) > +#define CGEM_DESIGN_CFG1_EXT_FIFO_INTERFACE (1 << 6) > +#define CGEM_DESIGN_CFG1_NO_INT_LOOPBACK (1 << 5) > +#define CGEM_DESIGN_CFG1_INT_LOOPBACK (1 << 4) > +#define CGEM_DESIGN_CFG1_TDC_50 (1 << 3) > +#define CGEM_DESIGN_CFG1_RDC_50 (1 << 2) > +#define CGEM_DESIGN_CFG1_SERDES (1 << 1) > +#define CGEM_DESIGN_CFG1_NO_PCS (1 << 0) > + > #define CGEM_DESIGN_CFG2 0x284 /* Design Configuration 2 */ > #define CGEM_DESIGN_CFG2_TX_PBUF_ADDR_SHIFT 26 > #define CGEM_DESIGN_CFG2_TX_PBUF_ADDR_MASK (0xf << 26) > @@ -330,7 +358,25 @@ > #define CGEM_DESIGN_CFG5_TX_FIFO_CNT_WIDTH_MASK (0xf << 4) > #define CGEM_DESIGN_CFG5_RX_FIFO_CNT_WIDTH_MASK 0xf > > -/* Transmit Descriptors */ > +#define CGEM_DESIGN_CFG6 0x294 /* Design Configuration 6 */ > +#define CGEM_DESIGN_CFG6_ADDR_64B (1 << 23) /* 64-bit addr cap */ > +#define CGEM_DESIGN_CFG6_DMA_PRIO_Q_MASK 0xfffe > +#define CGEM_DESIGN_CFG6_DMA_PRIO_Q(n) (1 << (n)) > + > +#define CGEM_TX_QN_BAR(n) (0x440 + ((n) - 1) * 4) > +#define CGEM_RX_QN_BAR(n) (0x480 + ((n) - 1) * 4) > + > +#define CGEM_TX_QBAR_HI 0x4C8 > +#define CGEM_RX_QBAR_HI 0x4D4 > + > +/* > + * Transmit Descriptors: two or four 32-bit words: > + * word0: address > + * word1: length and control > + * word2: address upper 32-bits (64-bit mode) > + * word3: unused (64-bit mode) > + */ > + > struct cgem_tx_desc { > uint32_t addr; > uint32_t ctl; > @@ -350,8 +396,20 @@ struct cgem_tx_desc { > #define CGEM_TXDESC_NO_CRC_APPENDED (1 << 16) > #define CGEM_TXDESC_LAST_BUF (1 << 15) /* last in frame */ > #define CGEM_TXDESC_LENGTH_MASK 0x3fff > +#ifdef CGEM64 > + uint32_t addrhi; > + uint32_t unused; > +#endif > }; > > +/* > + * Receive Descriptors: two or four 32-bit words: > + * word0: address | WRAP and OWN flags > + * word1: length and control > + * word2: address upper 32 bits (64-bit mode) > + * word3: unused > + */ > + > struct cgem_rx_desc { > uint32_t addr; > #define CGEM_RXDESC_WRAP (1 << 1) /* goes in addr! */ > @@ -379,6 +437,10 @@ struct cgem_rx_desc { > #define CGEM_RXDESC_SOF (1 << 14) /* start of frame */ > #define CGEM_RXDESC_BAD_FCS (1 << 13) > #define CGEM_RXDESC_LENGTH_MASK 0x1fff > +#ifdef CGEM64 > + uint32_t addrhi; > + uint32_t unused; > +#endif > }; > > #endif /* _IF_CGEM_HW_H_ */ > diff --git a/sys/dts/arm/zynq-7000.dtsi b/sys/dts/arm/zynq-7000.dtsi > index a48c7bb732a1..a2a585a39446 100644 > --- a/sys/dts/arm/zynq-7000.dtsi > +++ b/sys/dts/arm/zynq-7000.dtsi > @@ -176,20 +176,20 @@ > *** 40 LINES SKIPPED *** > From owner-dev-commits-src-all@freebsd.org Wed Jan 13 12:36:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D30B4DB938; Wed, 13 Jan 2021 12:36:06 +0000 (UTC) (envelope-from melounmichal@gmail.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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG6PG17htz4cGj; Wed, 13 Jan 2021 12:36:01 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-ed1-x52d.google.com with SMTP id c7so1717961edv.6; Wed, 13 Jan 2021 04:36:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:reply-to:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9FVUmeuNSQC+cfy/tbgAlhAhldOUik8vhBr8HmmT3FM=; b=L1CU35MKbg1Ur/TixLI3lFi6zxVjHlnhzwW+RT5oe9MvEfRS7jDhvIPFPgQC659QoB ThGy9XCQfPBXkcSarHLikIn5eiU4AspS0O0r3UsxtFl+8CIhor1vgg79A3NgfIuHmE/+ DjMcfZBuCEXns60NSNrR3lLqvGWOnIefTafGXsEz8f7m+6mWZyqARYEaUpwTXRIuG5oH TCouhwDluM3Ln6nZHqkk1IIsl5WLd5nAFX7DDD3ihfTt2BArYMkFeQepyrIt8jL8IaL6 xzYyMQUGsX4Vo53B+/2BZ1/5+IhmOurjcf2WrQmJ8SfBh+bA3g8nBjmIo+C+YT0R/RjE SCfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:reply-to:subject:to:references :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=9FVUmeuNSQC+cfy/tbgAlhAhldOUik8vhBr8HmmT3FM=; b=n1IMigh6I06gPCg5S+xb+MNJHDinlIij3rloRjvaCp1Nklw4Yp4bvVMiadlmXV9ieh 5Eih1iWUv8CxO/fvNsp8XBfyLXQFI4xEO2Rce//2ijt90ZRb8aGg1iosc8Nd5D0aBcy2 uSbdmLEptMpLIoNNaG1Yr8JlGs0Sb97rl8Qr7CfylWiV2iCPlbMhRNwqevegqSBe5iLA nZYyXYWbSAWe1H+kA+RLsytfj/OArhT0X2PAP2W8cdH/IYjkciTkFPTH95aa+0YAGrO3 AaEf9ysoxuJzX6oVnhD+f+ztO5NPVPFT/2SolWwYEmn0rhSynZJkbIiZlcf+AucHSlD5 oECw== X-Gm-Message-State: AOAM530Jn0G/iKju2I8kFrDO5RbTGAMeRuL8Reg5usUovfUYND8Gi2QA +/GyYhO8f5CL+oQ05eboMPQXCXuhOIDTwA== X-Google-Smtp-Source: ABdhPJwScWorsQHcMhZZJKJx07PyeouO0Lr5OqFQ3Pcj/T7CQGYPywQkKFBhuN75JHydqFjpXxrqXQ== X-Received: by 2002:a50:fb97:: with SMTP id e23mr1649774edq.208.1610541358213; Wed, 13 Jan 2021 04:35:58 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id n13sm661461ejr.93.2021.01.13.04.35.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jan 2021 04:35:57 -0800 (PST) Sender: Michal Meloun From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: git: facdd1cd2045 - main - cgem: add 64-bit support To: Mitchell Horne , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101102053.10AKrGqv070360@gitrepo.freebsd.org> Message-ID: Date: Wed, 13 Jan 2021 13:35:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <202101102053.10AKrGqv070360@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DG6PG17htz4cGj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=L1CU35MK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::52d as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-1.37 / 15.00]; HAS_REPLYTO(0.00)[mmel@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::52d:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; NEURAL_SPAM_SHORT(0.63)[0.635]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::52d:from:127.0.2.255]; MID_RHS_MATCH_TO(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52d:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-main,dev-commits-src-all] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 12:36:06 -0000 On 10.01.2021 21:53, Mitchell Horne wrote: > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=facdd1cd20451d7817c72a25e9253b934ca65eb6 > > commit facdd1cd20451d7817c72a25e9253b934ca65eb6 > Author: Thomas Skibo > AuthorDate: 2021-01-10 20:18:41 +0000 > Commit: Mitchell Horne > CommitDate: 2021-01-10 20:51:52 +0000 > > cgem: add 64-bit support > > Add 64-bit address support to Cadence CGEM Ethernet driver for use in > other SoCs such as the Zynq UltraScale+ and SiFive HighFive Unleashed. > > Reviewed by: philip, 0mp (manpages) > Differential Revision: https://reviews.freebsd.org/D24304 > --- > share/man/man4/Makefile | 7 + > share/man/man4/{man4.arm => }/cgem.4 | 14 +- > share/man/man4/man4.arm/Makefile | 4 +- > sys/arm/conf/GENERIC | 2 +- > sys/arm/conf/ZEDBOARD | 2 +- > sys/arm64/conf/GENERIC | 1 + > sys/dev/cadence/if_cgem.c | 341 ++++++++++++++++++++++++----------- > sys/dev/cadence/if_cgem_hw.h | 64 ++++++- > sys/dts/arm/zynq-7000.dtsi | 12 +- > sys/riscv/conf/GENERIC | 2 +- > 10 files changed, 323 insertions(+), 126 deletions(-) > > diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile > index c72caf0199c9..b8e63315cb95 100644 > --- a/share/man/man4/Makefile > +++ b/share/man/man4/Makefile > @@ -106,6 +106,7 @@ MAN= aac.4 \ > cdceem.4 \ > cfi.4 \ > cfumass.4 \ > + ${_cgem.4} \ > ch.4 \ > chromebook_platform.4 \ > ${_chvgpio.4} \ > @@ -903,6 +904,12 @@ _virtio_scsi.4= virtio_scsi.4 > _vtnet.4= vtnet.4 > .endif > > +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" || \ > + ${MACHINE_CPUARCH} == "riscv" > +_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" > diff --git a/share/man/man4/man4.arm/cgem.4 b/share/man/man4/cgem.4 > similarity index 96% > rename from share/man/man4/man4.arm/cgem.4 > rename to share/man/man4/cgem.4 > index 6de1d7961788..f9f525dc4554 100644 > --- a/share/man/man4/man4.arm/cgem.4 > +++ b/share/man/man4/cgem.4 > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd August 26, 2014 > +.Dd January 10, 2021 > .Dt CGEM 4 > .Os > .Sh NAME > @@ -44,7 +44,8 @@ The > .Nm > driver provides support for the Cadence GEM (Gigabit Ethernet MAC). > The Cadence GEM is used in some SoC (System on a Chip) devices such as > -the Xilinx Zynq-7000 and the Atmel SAMA5D3. > +the Xilinx Zynq-7000, the Xilinx Zynq UltraScale+, and the SiFive > +HiFive Unleashed. > .Pp > The > .Nm > @@ -284,7 +285,7 @@ There are > variables that count > packets discarded by the hardware (see below). > .Pp > -The GEM used in the Zynq-7000 has a bug such that the receiver can > +The GEM used in the Zynq-7000 has a bug such that the receiver can > potentially freeze up under a high load. > The issue is described in sec. 16.7 > "Known Issues" of the Zynq-7000 SoC Technical Reference Manual (Xilinx > @@ -292,7 +293,10 @@ UG585 v1.7). > The > .Nm > driver implements the work-around suggested in the manual. > -If the bug does not exist in other versions of this device, the > -work-around can be disabled by setting the dev.cgem.%d.rxhangwar > +It is believed that the bug does not exist in the Zynq UltraScale+ and > +SiFive SoCs so the work-around is disabled in those instances and enabled > +in all others. > +The work-around can be disabled by setting the > +.Va dev.cgem.%d.rxhangwar > .Xr sysctl 8 > variable to 0. > diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile > index 21d53f43a7c8..0b3eec427934 100644 > --- a/share/man/man4/man4.arm/Makefile > +++ b/share/man/man4/man4.arm/Makefile > @@ -8,7 +8,6 @@ MAN= \ > aw_spi.4 \ > aw_syscon.4 \ > bcm283x_pwm.4 \ > - cgem.4 \ > devcfg.4 \ > imx6_ahci.4 \ > imx6_snvs.4 \ > @@ -16,8 +15,7 @@ MAN= \ > mge.4 \ > ti_adc.4 > > -MLINKS= cgem.4 if_cgem.4 > -MLINKS+= imx_wdog.4 imxwdt.4 > +MLINKS= imx_wdog.4 imxwdt.4 > MLINKS+= mge.4 if_mge.4 > > MANSUBDIR=/arm > diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC > index 0f0522eb9802..3cfe16ccfe54 100644 > --- a/sys/arm/conf/GENERIC > +++ b/sys/arm/conf/GENERIC > @@ -228,8 +228,8 @@ device e6000sw > device miibus > > device awg # 10/100/1000 integrated EMAC controller > +device cgem # Cadence GEM Gigabit Ethernet device > device cpsw # TI Common Platform Ethernet Switch (CPSW) > -device cgem # Zynq-7000 gig ethernet device > device dwc # 10/100/1000 integrated GMAC controller > device emac # 10/100 integrated EMAC controller > device ffec # Freescale Fast Ethernet Controller > diff --git a/sys/arm/conf/ZEDBOARD b/sys/arm/conf/ZEDBOARD > index 613e0c73a16d..24490a5129e5 100644 > --- a/sys/arm/conf/ZEDBOARD > +++ b/sys/arm/conf/ZEDBOARD > @@ -49,7 +49,7 @@ device mpcore_timer > > device loop > device ether > -device cgem # Zynq-7000 gig ethernet device > +device cgem # Cadence GEM Gigabit Ethernet device > device mii > device e1000phy > device rgephy # Zybo uses Realtek RTL8211E > diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC > index 268089dba1fc..463271d1db26 100644 > --- a/sys/arm64/conf/GENERIC > +++ b/sys/arm64/conf/GENERIC > @@ -278,6 +278,7 @@ device miibus # MII bus support > device al_eth # Annapurna Alpine Ethernet NIC > device awg # Allwinner EMAC Gigabit Ethernet > device axa # AMD Opteron A1100 integrated NIC > +device cgem # Cadence GEM Gigabit Ethernet device > device dwc_rk # Rockchip Designware > device dwc_socfpga # Altera SOCFPGA Ethernet MAC > device ffec # iMX FFEC > diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c > index 3c5277452469..77337e977dcc 100644 > --- a/sys/dev/cadence/if_cgem.c > +++ b/sys/dev/cadence/if_cgem.c > @@ -77,6 +77,14 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#ifdef EXT_RESOURCES > +#include > +#endif > + > +#if INTPTR_MAX == INT64_MAX > +#define CGEM64 > +#endif > + > #include > > #include "miibus_if.h" > @@ -86,9 +94,6 @@ __FBSDID("$FreeBSD$"); > #define CGEM_NUM_RX_DESCS 512 /* size of receive descriptor ring */ > #define CGEM_NUM_TX_DESCS 512 /* size of transmit descriptor ring */ > > -#define MAX_DESC_RING_SIZE (MAX(CGEM_NUM_RX_DESCS*sizeof(struct cgem_rx_desc),\ > - CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc))) > - > /* Default for sysctl rxbufs. Must be < CGEM_NUM_RX_DESCS of course. */ > #define DEFAULT_NUM_RX_BUFS 256 /* number of receive bufs to queue. */ > > @@ -97,11 +102,18 @@ __FBSDID("$FreeBSD$"); > #define CGEM_CKSUM_ASSIST (CSUM_IP | CSUM_TCP | CSUM_UDP | \ > CSUM_TCP_IPV6 | CSUM_UDP_IPV6) > > +#define HWTYPE_GENERIC_GEM 1 > +#define HWTYPE_ZYNQ 2 > +#define HWTYPE_ZYNQMP 3 > +#define HWTYPE_SIFIVE_FU540 4 > + > static struct ofw_compat_data compat_data[] = { > - { "cadence,gem", 1 }, > - { "cdns,macb", 1 }, > - { "sifive,fu540-c000-gem", 1 }, > - { NULL, 0 }, > + { "cdns,zynq-gem", HWTYPE_ZYNQ }, > + { "cdns,zynqmp-gem", HWTYPE_ZYNQMP }, > + { "sifive,fu540-c000-gem", HWTYPE_SIFIVE_FU540 }, > + { "cdns,gem", HWTYPE_GENERIC_GEM }, > + { "cadence,gem", HWTYPE_GENERIC_GEM }, > + { NULL, 0 } > }; > > struct cgem_softc { > @@ -116,8 +128,13 @@ struct cgem_softc { > void *intrhand; > struct callout tick_ch; > uint32_t net_ctl_shadow; > + uint32_t net_cfg_shadow; > +#ifdef EXT_RESOURCES > + clk_t ref_clk; > +#else > int ref_clk_num; > - u_char eaddr[6]; > +#endif > + int neednullqs; > > bus_dma_tag_t desc_dma_tag; > bus_dma_tag_t mbuf_dma_tag; > @@ -146,12 +163,15 @@ struct cgem_softc { > int txring_hd_ptr; /* where to put next xmits */ > int txring_tl_ptr; /* next xmit mbuf to free */ > int txring_queued; /* num xmits segs queued */ > - bus_dmamap_t txring_dma_map; > u_int txfull; /* tx ring full events */ > u_int txdefrags; /* tx calls to m_defrag() */ > u_int txdefragfails; /* tx m_defrag() failures */ > u_int txdmamapfails; /* tx dmamap failures */ > > + /* null descriptor rings */ > + void *null_qs; > + bus_addr_t null_qs_physaddr; > + > /* hardware provided statistics */ > struct cgem_hw_stats { > uint64_t tx_bytes; > @@ -274,9 +294,9 @@ cgem_get_mac(struct cgem_softc *sc, u_char eaddr[]) > > /* > * cgem_mac_hash(): map 48-bit address to a 6-bit hash. The 6-bit hash > - * corresponds to a bit in a 64-bit hash register. Setting that bit in the hash > - * register enables reception of all frames with a destination address that > - * hashes to that 6-bit value. > + * corresponds to a bit in a 64-bit hash register. Setting that bit in the > + * hash register enables reception of all frames with a destination address > + * that hashes to that 6-bit value. > * > * The hash function is described in sec. 16.2.3 in the Zynq-7000 Tech > * Reference Manual. Bits 0-5 in the hash are the exclusive-or of > @@ -321,18 +341,15 @@ cgem_rx_filter(struct cgem_softc *sc) > { > if_t ifp = sc->ifp; > uint32_t hashes[2] = { 0, 0 }; > - uint32_t net_cfg; > - > - net_cfg = RD4(sc, CGEM_NET_CFG); > > - net_cfg &= ~(CGEM_NET_CFG_MULTI_HASH_EN | > + sc->net_cfg_shadow &= ~(CGEM_NET_CFG_MULTI_HASH_EN | > CGEM_NET_CFG_NO_BCAST | CGEM_NET_CFG_COPY_ALL); > > if ((if_getflags(ifp) & IFF_PROMISC) != 0) > - net_cfg |= CGEM_NET_CFG_COPY_ALL; > + sc->net_cfg_shadow |= CGEM_NET_CFG_COPY_ALL; > else { > if ((if_getflags(ifp) & IFF_BROADCAST) == 0) > - net_cfg |= CGEM_NET_CFG_NO_BCAST; > + sc->net_cfg_shadow |= CGEM_NET_CFG_NO_BCAST; > if ((if_getflags(ifp) & IFF_ALLMULTI) != 0) { > hashes[0] = 0xffffffff; > hashes[1] = 0xffffffff; > @@ -340,12 +357,12 @@ cgem_rx_filter(struct cgem_softc *sc) > if_foreach_llmaddr(ifp, cgem_hash_maddr, hashes); > > if (hashes[0] != 0 || hashes[1] != 0) > - net_cfg |= CGEM_NET_CFG_MULTI_HASH_EN; > + sc->net_cfg_shadow |= CGEM_NET_CFG_MULTI_HASH_EN; > } > > WR4(sc, CGEM_HASH_TOP, hashes[0]); > WR4(sc, CGEM_HASH_BOT, hashes[1]); > - WR4(sc, CGEM_NET_CFG, net_cfg); > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > } > > /* For bus_dmamap_load() callback. */ > @@ -358,40 +375,92 @@ cgem_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) > *(bus_addr_t *)arg = segs[0].ds_addr; > } > > +/* Set up null queues for priority queues we actually can't disable. */ > +static void > +cgem_null_qs(struct cgem_softc *sc) > +{ > + struct cgem_rx_desc *rx_desc; > + struct cgem_tx_desc *tx_desc; > + uint32_t queue_mask; > + int n; > + > + /* Read design config register 6 to determine number of queues. */ > + queue_mask = (RD4(sc, CGEM_DESIGN_CFG6) & > + CGEM_DESIGN_CFG6_DMA_PRIO_Q_MASK) >> 1; > + if (queue_mask == 0) > + return; > + > + /* Create empty RX queue and empty TX buf queues. */ > + memset(sc->null_qs, 0, sizeof(struct cgem_rx_desc) + > + sizeof(struct cgem_tx_desc)); > + rx_desc = sc->null_qs; > + rx_desc->addr = CGEM_RXDESC_OWN | CGEM_RXDESC_WRAP; > + tx_desc = (struct cgem_tx_desc *)(rx_desc + 1); > + tx_desc->ctl = CGEM_TXDESC_USED | CGEM_TXDESC_WRAP; > + > + /* Point all valid ring base pointers to the null queues. */ > + for (n = 1; (queue_mask & 1) != 0; n++, queue_mask >>= 1) { > + WR4(sc, CGEM_RX_QN_BAR(n), sc->null_qs_physaddr); > + WR4(sc, CGEM_TX_QN_BAR(n), sc->null_qs_physaddr + > + sizeof(struct cgem_rx_desc)); > + } > +} > + > /* Create DMA'able descriptor rings. */ > static int > cgem_setup_descs(struct cgem_softc *sc) > { > int i, err; > + int desc_rings_size = CGEM_NUM_RX_DESCS * sizeof(struct cgem_rx_desc) + > + CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc); > + > + if (sc->neednullqs) > + desc_rings_size += sizeof(struct cgem_rx_desc) + > + sizeof(struct cgem_tx_desc); > > sc->txring = NULL; > sc->rxring = NULL; > > /* Allocate non-cached DMA space for RX and TX descriptors. */ > - err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, > - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, > - MAX_DESC_RING_SIZE, 1, MAX_DESC_RING_SIZE, 0, > + err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, > +#ifdef CGEM64 > + 1ULL << 32, /* Do not cross a 4G boundary. */ > +#else > + 0, > +#endif > + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, > + desc_rings_size, 1, desc_rings_size, 0, > busdma_lock_mutex, &sc->sc_mtx, &sc->desc_dma_tag); > if (err) > return (err); > > /* Set up a bus_dma_tag for mbufs. */ > err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, > - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, > - MCLBYTES, TX_MAX_DMA_SEGS, MCLBYTES, 0, > - busdma_lock_mutex, &sc->sc_mtx, &sc->mbuf_dma_tag); > + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, > + TX_MAX_DMA_SEGS, MCLBYTES, 0, busdma_lock_mutex, &sc->sc_mtx, > + &sc->mbuf_dma_tag); > if (err) > return (err); > > - /* Allocate DMA memory in non-cacheable space. */ > + /* > + * Allocate DMA memory in non-cacheable space. We allocate transmit, > + * receive and null descriptor queues all at once because the > + * hardware only provides one register for the upper 32 bits of > + * rx and tx descriptor queues hardware addresses. > + */ > err = bus_dmamem_alloc(sc->desc_dma_tag, (void **)&sc->rxring, > - BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &sc->rxring_dma_map); > +#ifdef __arm__ > + BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, > +#else > + BUS_DMA_NOWAIT | BUS_DMA_NOCACHE | BUS_DMA_ZERO, Using BUS_DMA_NOCACHE is clearly wrong on arm64 and probably also on all other architectures. In other words - the only real usage of BUS_DMA_NOCACHE is buggy hardware - (when snooping is not delivered to all levels of caches). In all other cases it indicates problem in the implementation of busdma. Memory types in busdma should works as follows: Normal -> allocate cached memory although device is not on DMA coherent bus. BUS_DMA_COHERENT -> allocate cached memory if device is on DMA coherent bus, uncached otherwise. BUS_DMA_NOCACHE -> allocate uncached memory although given device is on DMA coherent bus. Michal > +#endif > + &sc->rxring_dma_map); > if (err) > return (err); > > /* Load descriptor DMA memory. */ > err = bus_dmamap_load(sc->desc_dma_tag, sc->rxring_dma_map, > - (void *)sc->rxring, CGEM_NUM_RX_DESCS*sizeof(struct cgem_rx_desc), > + (void *)sc->rxring, desc_rings_size, > cgem_getaddr, &sc->rxring_physaddr, BUS_DMA_NOWAIT); > if (err) > return (err); > @@ -409,18 +478,9 @@ cgem_setup_descs(struct cgem_softc *sc) > sc->rxring_tl_ptr = 0; > sc->rxring_queued = 0; > > - /* Allocate DMA memory for TX descriptors in non-cacheable space. */ > - err = bus_dmamem_alloc(sc->desc_dma_tag, (void **)&sc->txring, > - BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &sc->txring_dma_map); > - if (err) > - return (err); > - > - /* Load TX descriptor DMA memory. */ > - err = bus_dmamap_load(sc->desc_dma_tag, sc->txring_dma_map, > - (void *)sc->txring, CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc), > - cgem_getaddr, &sc->txring_physaddr, BUS_DMA_NOWAIT); > - if (err) > - return (err); > + sc->txring = (struct cgem_tx_desc *)(sc->rxring + CGEM_NUM_RX_DESCS); > + sc->txring_physaddr = sc->rxring_physaddr + CGEM_NUM_RX_DESCS * > + sizeof(struct cgem_rx_desc); > > /* Initialize TX descriptor ring. */ > for (i = 0; i < CGEM_NUM_TX_DESCS; i++) { > @@ -435,6 +495,14 @@ cgem_setup_descs(struct cgem_softc *sc) > sc->txring_tl_ptr = 0; > sc->txring_queued = 0; > > + if (sc->neednullqs) { > + sc->null_qs = (void *)(sc->txring + CGEM_NUM_TX_DESCS); > + sc->null_qs_physaddr = sc->txring_physaddr + > + CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc); > + > + cgem_null_qs(sc); > + } > + > return (0); > } > > @@ -484,6 +552,9 @@ cgem_fill_rqueue(struct cgem_softc *sc) > > /* Write rx descriptor and increment head pointer. */ > sc->rxring[sc->rxring_hd_ptr].ctl = 0; > +#ifdef CGEM64 > + sc->rxring[sc->rxring_hd_ptr].addrhi = segs[0].ds_addr >> 32; > +#endif > if (sc->rxring_hd_ptr == CGEM_NUM_RX_DESCS - 1) { > sc->rxring[sc->rxring_hd_ptr].addr = segs[0].ds_addr | > CGEM_RXDESC_WRAP; > @@ -509,7 +580,7 @@ cgem_recv(struct cgem_softc *sc) > m_hd = NULL; > m_tl = &m_hd; > while (sc->rxring_queued > 0 && > - (sc->rxring[sc->rxring_tl_ptr].addr & CGEM_RXDESC_OWN) != 0) { > + (sc->rxring[sc->rxring_tl_ptr].addr & CGEM_RXDESC_OWN) != 0) { > ctl = sc->rxring[sc->rxring_tl_ptr].ctl; > > /* Grab filled mbuf. */ > @@ -629,9 +700,16 @@ cgem_clean_tx(struct cgem_softc *sc) > /* Check the status. */ > if ((ctl & CGEM_TXDESC_AHB_ERR) != 0) { > /* Serious bus error. log to console. */ > +#ifdef CGEM64 > + device_printf(sc->dev, > + "cgem_clean_tx: AHB error, addr=0x%x%08x\n", > + sc->txring[sc->txring_tl_ptr].addrhi, > + sc->txring[sc->txring_tl_ptr].addr); > +#else > device_printf(sc->dev, > "cgem_clean_tx: AHB error, addr=0x%x\n", > sc->txring[sc->txring_tl_ptr].addr); > +#endif > } else if ((ctl & (CGEM_TXDESC_RETRY_ERR | > CGEM_TXDESC_LATE_COLL)) != 0) { > if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); > @@ -640,8 +718,8 @@ cgem_clean_tx(struct cgem_softc *sc) > > /* > * If the packet spanned more than one tx descriptor, skip > - * descriptors until we find the end so that only start-of-frame > - * descriptors are processed. > + * descriptors until we find the end so that only > + * start-of-frame descriptors are processed. > */ > while ((ctl & CGEM_TXDESC_LAST_BUF) == 0) { > if ((ctl & CGEM_TXDESC_WRAP) != 0) > @@ -759,7 +837,10 @@ cgem_start_locked(if_t ifp) > /* Descriptor address. */ > sc->txring[sc->txring_hd_ptr + i].addr = > segs[i].ds_addr; > - > +#ifdef CGEM64 > + sc->txring[sc->txring_hd_ptr + i].addrhi = > + segs[i].ds_addr >> 32; > +#endif > /* Descriptor control word. */ > ctl = segs[i].ds_len; > if (i == nsegs - 1) { > @@ -961,8 +1042,21 @@ cgem_reset(struct cgem_softc *sc) > > CGEM_ASSERT_LOCKED(sc); > > + /* Determine data bus width from design configuration register. */ > + switch (RD4(sc, CGEM_DESIGN_CFG1) & > + CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_MASK) { > + case CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_64: > + sc->net_cfg_shadow = CGEM_NET_CFG_DBUS_WIDTH_64; > + break; > + case CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_128: > + sc->net_cfg_shadow = CGEM_NET_CFG_DBUS_WIDTH_128; > + break; > + default: > + sc->net_cfg_shadow = CGEM_NET_CFG_DBUS_WIDTH_32; > + } > + > WR4(sc, CGEM_NET_CTRL, 0); > - WR4(sc, CGEM_NET_CFG, 0); > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > WR4(sc, CGEM_NET_CTRL, CGEM_NET_CTRL_CLR_STAT_REGS); > WR4(sc, CGEM_TX_STAT, CGEM_TX_STAT_ALL); > WR4(sc, CGEM_RX_STAT, CGEM_RX_STAT_ALL); > @@ -973,8 +1067,8 @@ cgem_reset(struct cgem_softc *sc) > WR4(sc, CGEM_RX_QBAR, 0); > > /* Get management port running even if interface is down. */ > - WR4(sc, CGEM_NET_CFG, CGEM_NET_CFG_DBUS_WIDTH_32 | > - CGEM_NET_CFG_MDC_CLK_DIV_64); > + sc->net_cfg_shadow |= CGEM_NET_CFG_MDC_CLK_DIV_48; > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > > sc->net_ctl_shadow = CGEM_NET_CTRL_MGMT_PORT_EN; > WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow); > @@ -985,33 +1079,33 @@ static void > cgem_config(struct cgem_softc *sc) > { > if_t ifp = sc->ifp; > - uint32_t net_cfg; > uint32_t dma_cfg; > u_char *eaddr = if_getlladdr(ifp); > > CGEM_ASSERT_LOCKED(sc); > > /* Program Net Config Register. */ > - net_cfg = CGEM_NET_CFG_DBUS_WIDTH_32 | > - CGEM_NET_CFG_MDC_CLK_DIV_64 | > - CGEM_NET_CFG_FCS_REMOVE | > + sc->net_cfg_shadow &= (CGEM_NET_CFG_MDC_CLK_DIV_MASK | > + CGEM_NET_CFG_DBUS_WIDTH_MASK); > + sc->net_cfg_shadow |= (CGEM_NET_CFG_FCS_REMOVE | > CGEM_NET_CFG_RX_BUF_OFFSET(ETHER_ALIGN) | > - CGEM_NET_CFG_GIGE_EN | > - CGEM_NET_CFG_1536RXEN | > - CGEM_NET_CFG_FULL_DUPLEX | > - CGEM_NET_CFG_SPEED100; > + CGEM_NET_CFG_GIGE_EN | CGEM_NET_CFG_1536RXEN | > + CGEM_NET_CFG_FULL_DUPLEX | CGEM_NET_CFG_SPEED100); > > /* Enable receive checksum offloading? */ > if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) > - net_cfg |= CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN; > + sc->net_cfg_shadow |= CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN; > > - WR4(sc, CGEM_NET_CFG, net_cfg); > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > > /* Program DMA Config Register. */ > dma_cfg = CGEM_DMA_CFG_RX_BUF_SIZE(MCLBYTES) | > CGEM_DMA_CFG_RX_PKTBUF_MEMSZ_SEL_8K | > CGEM_DMA_CFG_TX_PKTBUF_MEMSZ_SEL | > CGEM_DMA_CFG_AHB_FIXED_BURST_LEN_16 | > +#ifdef CGEM64 > + CGEM_DMA_CFG_ADDR_BUS_64 | > +#endif > CGEM_DMA_CFG_DISC_WHEN_NO_AHB; > > /* Enable transmit checksum offloading? */ > @@ -1021,8 +1115,12 @@ cgem_config(struct cgem_softc *sc) > WR4(sc, CGEM_DMA_CFG, dma_cfg); > > /* Write the rx and tx descriptor ring addresses to the QBAR regs. */ > - WR4(sc, CGEM_RX_QBAR, (uint32_t) sc->rxring_physaddr); > - WR4(sc, CGEM_TX_QBAR, (uint32_t) sc->txring_physaddr); > + WR4(sc, CGEM_RX_QBAR, (uint32_t)sc->rxring_physaddr); > + WR4(sc, CGEM_TX_QBAR, (uint32_t)sc->txring_physaddr); > +#ifdef CGEM64 > + WR4(sc, CGEM_RX_QBAR_HI, (uint32_t)(sc->rxring_physaddr >> 32)); > + WR4(sc, CGEM_TX_QBAR_HI, (uint32_t)(sc->txring_physaddr >> 32)); > +#endif > > /* Enable rx and tx. */ > sc->net_ctl_shadow |= (CGEM_NET_CTRL_TX_EN | CGEM_NET_CTRL_RX_EN); > @@ -1055,8 +1153,10 @@ cgem_init_locked(struct cgem_softc *sc) > > if_setdrvflagbits(sc->ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); > > - mii = device_get_softc(sc->miibus); > - mii_mediachg(mii); > + if (sc->miibus != NULL) { > + mii = device_get_softc(sc->miibus); > + mii_mediachg(mii); > + } > > callout_reset(&sc->tick_ch, hz, cgem_tick, sc); > } > @@ -1085,9 +1185,9 @@ cgem_stop(struct cgem_softc *sc) > cgem_reset(sc); > > /* Clear out transmit queue. */ > + memset(sc->txring, 0, CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc)); > for (i = 0; i < CGEM_NUM_TX_DESCS; i++) { > sc->txring[i].ctl = CGEM_TXDESC_USED; > - sc->txring[i].addr = 0; > if (sc->txring_m[i]) { > /* Unload and destroy dmamap. */ > bus_dmamap_unload(sc->mbuf_dma_tag, > @@ -1106,9 +1206,9 @@ cgem_stop(struct cgem_softc *sc) > sc->txring_queued = 0; > > /* Clear out receive queue. */ > + memset(sc->rxring, 0, CGEM_NUM_RX_DESCS * sizeof(struct cgem_rx_desc)); > for (i = 0; i < CGEM_NUM_RX_DESCS; i++) { > sc->rxring[i].addr = CGEM_RXDESC_OWN; > - sc->rxring[i].ctl = 0; > if (sc->rxring_m[i]) { > /* Unload and destroy dmamap. */ > bus_dmamap_unload(sc->mbuf_dma_tag, > @@ -1171,6 +1271,8 @@ cgem_ioctl(if_t ifp, u_long cmd, caddr_t data) > > case SIOCSIFMEDIA: > case SIOCGIFMEDIA: > + if (sc->miibus == NULL) > + return (ENXIO); > mii = device_get_softc(sc->miibus); > error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd); > break; > @@ -1205,16 +1307,16 @@ cgem_ioctl(if_t ifp, u_long cmd, caddr_t data) > /* Turn on RX checksumming. */ > if_setcapenablebit(ifp, IFCAP_RXCSUM | > IFCAP_RXCSUM_IPV6, 0); > - WR4(sc, CGEM_NET_CFG, > - RD4(sc, CGEM_NET_CFG) | > - CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); > + sc->net_cfg_shadow |= > + CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN; > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > } else { > /* Turn off RX checksumming. */ > if_setcapenablebit(ifp, 0, IFCAP_RXCSUM | > IFCAP_RXCSUM_IPV6); > - WR4(sc, CGEM_NET_CFG, > - RD4(sc, CGEM_NET_CFG) & > - ~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); > + sc->net_cfg_shadow &= > + ~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN; > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > } > } > if ((if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_TXCSUM)) == > @@ -1235,15 +1337,6 @@ cgem_ioctl(if_t ifp, u_long cmd, caddr_t data) > > /* MII bus support routines. > */ > -static void > -cgem_child_detached(device_t dev, device_t child) > -{ > - struct cgem_softc *sc = device_get_softc(dev); > - > - if (child == sc->miibus) > - sc->miibus = NULL; > -} > - > static int > cgem_ifmedia_upd(if_t ifp) > { > @@ -1380,24 +1473,22 @@ __weak_reference(cgem_default_set_ref_clk, cgem_set_ref_clk); > static void > cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii) > { > - uint32_t net_cfg; > int ref_clk_freq; > > CGEM_ASSERT_LOCKED(sc); > > /* Update hardware to reflect media. */ > - net_cfg = RD4(sc, CGEM_NET_CFG); > - net_cfg &= ~(CGEM_NET_CFG_SPEED100 | CGEM_NET_CFG_GIGE_EN | > + sc->net_cfg_shadow &= ~(CGEM_NET_CFG_SPEED100 | CGEM_NET_CFG_GIGE_EN | > CGEM_NET_CFG_FULL_DUPLEX); > > switch (IFM_SUBTYPE(mii->mii_media_active)) { > case IFM_1000_T: > - net_cfg |= (CGEM_NET_CFG_SPEED100 | > + sc->net_cfg_shadow |= (CGEM_NET_CFG_SPEED100 | > CGEM_NET_CFG_GIGE_EN); > ref_clk_freq = 125000000; > break; > case IFM_100_TX: > - net_cfg |= CGEM_NET_CFG_SPEED100; > + sc->net_cfg_shadow |= CGEM_NET_CFG_SPEED100; > ref_clk_freq = 25000000; > break; > default: > @@ -1405,15 +1496,25 @@ cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii) > } > > if ((mii->mii_media_active & IFM_FDX) != 0) > - net_cfg |= CGEM_NET_CFG_FULL_DUPLEX; > + sc->net_cfg_shadow |= CGEM_NET_CFG_FULL_DUPLEX; > > - WR4(sc, CGEM_NET_CFG, net_cfg); > + WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); > > +#ifdef EXT_RESOURCES > + if (sc->ref_clk != NULL) { > + CGEM_UNLOCK(sc); > + if (clk_set_freq(sc->ref_clk, ref_clk_freq, 0)) > + device_printf(sc->dev, "could not set ref clk to %d\n", > + ref_clk_freq); > + CGEM_LOCK(sc); > + } > +#else > /* Set the reference clock if necessary. */ > if (cgem_set_ref_clk(sc->ref_clk_num, ref_clk_freq)) > device_printf(sc->dev, > "cgem_mediachange: could not set ref clk%d to %d.\n", > sc->ref_clk_num, ref_clk_freq); > +#endif > > sc->mii_media_active = mii->mii_media_active; > } > @@ -1640,19 +1741,46 @@ cgem_attach(device_t dev) > { > struct cgem_softc *sc = device_get_softc(dev); > if_t ifp = NULL; > - phandle_t node; > - pcell_t cell; > int rid, err; > u_char eaddr[ETHER_ADDR_LEN]; > + int hwtype; > +#ifndef EXT_RESOURCES > + phandle_t node; > + pcell_t cell; > +#endif > > sc->dev = dev; > CGEM_LOCK_INIT(sc); > > + /* Key off of compatible string and set hardware-specific options. */ > + hwtype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; > + if (hwtype == HWTYPE_ZYNQMP) > + sc->neednullqs = 1; > + if (hwtype == HWTYPE_ZYNQ) > + sc->rxhangwar = 1; > + > +#ifdef EXT_RESOURCES > + if (hwtype == HWTYPE_ZYNQ || hwtype == HWTYPE_ZYNQMP) { > + if (clk_get_by_ofw_name(dev, 0, "tx_clk", &sc->ref_clk) != 0) > + device_printf(dev, > + "could not retrieve reference clock.\n"); > + else if (clk_enable(sc->ref_clk) != 0) > + device_printf(dev, "could not enable clock.\n"); > + } > + else if (hwtype == HWTYPE_SIFIVE_FU540) { > + if (clk_get_by_ofw_name(dev, 0, "pclk", &sc->ref_clk) != 0) > + device_printf(dev, > + "could not retrieve reference clock.\n"); > + else if (clk_enable(sc->ref_clk) != 0) > + device_printf(dev, "could not enable clock.\n"); > + } > +#else > /* Get reference clock number and base divider from fdt. */ > node = ofw_bus_get_node(dev); > sc->ref_clk_num = 0; > if (OF_getprop(node, "ref-clock-num", &cell, sizeof(cell)) > 0) > sc->ref_clk_num = fdt32_to_cpu(cell); > +#endif > > /* Get memory resource. */ > rid = 0; > @@ -1665,7 +1793,8 @@ cgem_attach(device_t dev) > > /* Get IRQ resource. */ > rid = 0; > - sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); > + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, > + RF_ACTIVE); > if (sc->irq_res == NULL) { > device_printf(dev, "could not allocate interrupt resource.\n"); > cgem_detach(dev); > @@ -1697,7 +1826,6 @@ cgem_attach(device_t dev) > > sc->if_old_flags = if_getflags(ifp); > sc->rxbufs = DEFAULT_NUM_RX_BUFS; > - sc->rxhangwar = 1; > > /* Reset hardware. */ > CGEM_LOCK(sc); > @@ -1708,11 +1836,8 @@ cgem_attach(device_t dev) > err = mii_attach(dev, &sc->miibus, ifp, > cgem_ifmedia_upd, cgem_ifmedia_sts, BMSR_DEFCAPMASK, > MII_PHY_ANY, MII_OFFSET_ANY, 0); > - if (err) { > - device_printf(dev, "attaching PHYs failed\n"); > - cgem_detach(dev); > - return (err); > - } > + if (err) > + device_printf(dev, "warning: attaching PHYs failed\n"); > > /* Set up TX and RX descriptor area. */ > err = cgem_setup_descs(sc); > @@ -1787,26 +1912,21 @@ cgem_detach(device_t dev) > bus_dmamap_unload(sc->desc_dma_tag, > sc->rxring_dma_map); > sc->rxring_physaddr = 0; > + sc->txring_physaddr = 0; > + sc->null_qs_physaddr = 0; > } > bus_dmamem_free(sc->desc_dma_tag, sc->rxring, > sc->rxring_dma_map); > sc->rxring = NULL; > + sc->txring = NULL; > + sc->null_qs = NULL; > + > for (i = 0; i < CGEM_NUM_RX_DESCS; i++) > if (sc->rxring_m_dmamap[i] != NULL) { > bus_dmamap_destroy(sc->mbuf_dma_tag, > sc->rxring_m_dmamap[i]); > sc->rxring_m_dmamap[i] = NULL; > } > - } > - if (sc->txring != NULL) { > - if (sc->txring_physaddr != 0) { > - bus_dmamap_unload(sc->desc_dma_tag, > - sc->txring_dma_map); > - sc->txring_physaddr = 0; > - } > - bus_dmamem_free(sc->desc_dma_tag, sc->txring, > - sc->txring_dma_map); > - sc->txring = NULL; > for (i = 0; i < CGEM_NUM_TX_DESCS; i++) > if (sc->txring_m_dmamap[i] != NULL) { > bus_dmamap_destroy(sc->mbuf_dma_tag, > @@ -1823,6 +1943,13 @@ cgem_detach(device_t dev) > sc->mbuf_dma_tag = NULL; > } > > +#ifdef EXT_RESOURCES > + if (sc->ref_clk != NULL) { > + clk_release(sc->ref_clk); > + sc->ref_clk = NULL; > + } > +#endif > + > bus_generic_detach(dev); > > CGEM_LOCK_DESTROY(sc); > @@ -1836,9 +1963,6 @@ static device_method_t cgem_methods[] = { > DEVMETHOD(device_attach, cgem_attach), > DEVMETHOD(device_detach, cgem_detach), > > - /* Bus interface */ > - DEVMETHOD(bus_child_detached, cgem_child_detached), > - > /* MII interface */ > DEVMETHOD(miibus_readreg, cgem_miibus_readreg), > DEVMETHOD(miibus_writereg, cgem_miibus_writereg), > @@ -1858,3 +1982,4 @@ DRIVER_MODULE(cgem, simplebus, cgem_driver, cgem_devclass, NULL, NULL); > DRIVER_MODULE(miibus, cgem, miibus_driver, miibus_devclass, NULL, NULL); > MODULE_DEPEND(cgem, miibus, 1, 1, 1); > MODULE_DEPEND(cgem, ether, 1, 1, 1); > +SIMPLEBUS_PNP_INFO(compat_data); > diff --git a/sys/dev/cadence/if_cgem_hw.h b/sys/dev/cadence/if_cgem_hw.h > index fced73327d91..784b131a885e 100644 > --- a/sys/dev/cadence/if_cgem_hw.h > +++ b/sys/dev/cadence/if_cgem_hw.h > @@ -35,6 +35,10 @@ > * Reference: Zynq-7000 All Programmable SoC Technical Reference Manual. > * (v1.4) November 16, 2012. Xilinx doc UG585. GEM is covered in Ch. 16 > * and register definitions are in appendix B.18. > + * > + * Additional Reference: Zynq UltraScale+ Device Register Reference > + * (UG1087 v1.7 Feb 8,2019): > + * https://www.xilinx.com/html_docs/registers/ug1087/ug1087-zynq-ultrascale-registers.html > */ > > #ifndef _IF_CGEM_HW_H_ > @@ -113,6 +117,7 @@ > #define CGEM_USER_IO 0x00C /* User I/O */ > > #define CGEM_DMA_CFG 0x010 /* DMA Config */ > +#define CGEM_DMA_CFG_ADDR_BUS_64 (1 << 30) > #define CGEM_DMA_CFG_DISC_WHEN_NO_AHB (1 << 24) > #define CGEM_DMA_CFG_RX_BUF_SIZE_SHIFT 16 > #define CGEM_DMA_CFG_RX_BUF_SIZE_MASK (0xff << 16) > @@ -290,6 +295,29 @@ > #define CGEM_PTP_PEER_RX_S 0x1F8 /* PTP Peer Event rcv'd s */ > #define CGEM_PTP_PEER_RX_NS 0x1FC /* PTP Peer Event rcv'd ns */ > > +#define CGEM_DESIGN_CFG1 0x280 /* Design Configuration 1 */ > +#define CGEM_DESIGN_CFG1_AXI_CACHE_WIDTH_MASK (0xfU << 28) > +#define CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_MASK (7 << 25) > +#define CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_32 (1 << 25) > +#define CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_64 (2 << 25) > +#define CGEM_DESIGN_CFG1_DMA_BUS_WIDTH_128 (4 << 25) > +#define CGEM_DESIGN_CFG1_IRQ_READ_CLR (1 << 23) > +#define CGEM_DESIGN_CFG1_NO_SNAPSHOT (1 << 22) > +#define CGEM_DESIGN_CFG1_NO_STATS (1 << 21) > +#define CGEM_DESIGN_CFG1_NO_SCAN_PINS (1 << 20) > +#define CGEM_DESIGN_CFG1_USER_IN_WIDTH_MASK (0x1f << 15) > +#define CGEM_DESIGN_CFG1_USER_OUT_WIDTH_MASK (0x1f << 10) > +#define CGEM_DESIGN_CFG1_USER_IO (1 << 9) > +#define CGEM_DESIGN_CFG1_APB_REV2 (1 << 8) > +#define CGEM_DESIGN_CFG1_APB_REV1 (1 << 7) > +#define CGEM_DESIGN_CFG1_EXT_FIFO_INTERFACE (1 << 6) > +#define CGEM_DESIGN_CFG1_NO_INT_LOOPBACK (1 << 5) > +#define CGEM_DESIGN_CFG1_INT_LOOPBACK (1 << 4) > +#define CGEM_DESIGN_CFG1_TDC_50 (1 << 3) > +#define CGEM_DESIGN_CFG1_RDC_50 (1 << 2) > +#define CGEM_DESIGN_CFG1_SERDES (1 << 1) > +#define CGEM_DESIGN_CFG1_NO_PCS (1 << 0) > + > #define CGEM_DESIGN_CFG2 0x284 /* Design Configuration 2 */ > #define CGEM_DESIGN_CFG2_TX_PBUF_ADDR_SHIFT 26 > #define CGEM_DESIGN_CFG2_TX_PBUF_ADDR_MASK (0xf << 26) > @@ -330,7 +358,25 @@ > #define CGEM_DESIGN_CFG5_TX_FIFO_CNT_WIDTH_MASK (0xf << 4) > #define CGEM_DESIGN_CFG5_RX_FIFO_CNT_WIDTH_MASK 0xf > > -/* Transmit Descriptors */ > +#define CGEM_DESIGN_CFG6 0x294 /* Design Configuration 6 */ > +#define CGEM_DESIGN_CFG6_ADDR_64B (1 << 23) /* 64-bit addr cap */ > +#define CGEM_DESIGN_CFG6_DMA_PRIO_Q_MASK 0xfffe > +#define CGEM_DESIGN_CFG6_DMA_PRIO_Q(n) (1 << (n)) > + > +#define CGEM_TX_QN_BAR(n) (0x440 + ((n) - 1) * 4) > +#define CGEM_RX_QN_BAR(n) (0x480 + ((n) - 1) * 4) > + > +#define CGEM_TX_QBAR_HI 0x4C8 > +#define CGEM_RX_QBAR_HI 0x4D4 > + > +/* > + * Transmit Descriptors: two or four 32-bit words: > + * word0: address > + * word1: length and control > + * word2: address upper 32-bits (64-bit mode) > + * word3: unused (64-bit mode) > + */ > + > struct cgem_tx_desc { > uint32_t addr; > uint32_t ctl; > @@ -350,8 +396,20 @@ struct cgem_tx_desc { > #define CGEM_TXDESC_NO_CRC_APPENDED (1 << 16) > #define CGEM_TXDESC_LAST_BUF (1 << 15) /* last in frame */ > #define CGEM_TXDESC_LENGTH_MASK 0x3fff > +#ifdef CGEM64 > + uint32_t addrhi; > + uint32_t unused; > +#endif > }; > > +/* > + * Receive Descriptors: two or four 32-bit words: > + * word0: address | WRAP and OWN flags > + * word1: length and control > + * word2: address upper 32 bits (64-bit mode) > + * word3: unused > + */ > + > struct cgem_rx_desc { > uint32_t addr; > #define CGEM_RXDESC_WRAP (1 << 1) /* goes in addr! */ > @@ -379,6 +437,10 @@ struct cgem_rx_desc { > #define CGEM_RXDESC_SOF (1 << 14) /* start of frame */ > #define CGEM_RXDESC_BAD_FCS (1 << 13) > #define CGEM_RXDESC_LENGTH_MASK 0x1fff > +#ifdef CGEM64 > + uint32_t addrhi; > + uint32_t unused; > +#endif > }; > > #endif /* _IF_CGEM_HW_H_ */ > diff --git a/sys/dts/arm/zynq-7000.dtsi b/sys/dts/arm/zynq-7000.dtsi > index a48c7bb732a1..a2a585a39446 100644 > --- a/sys/dts/arm/zynq-7000.dtsi > +++ b/sys/dts/arm/zynq-7000.dtsi > @@ -176,20 +176,20 @@ > *** 40 LINES SKIPPED *** > From owner-dev-commits-src-all@freebsd.org Wed Jan 13 15:02:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A86184DFD0A; Wed, 13 Jan 2021 15: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG9dw4RQXz4n2K; Wed, 13 Jan 2021 15:02: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 8B5131954F; Wed, 13 Jan 2021 15:02: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 10DF2CPx025268; Wed, 13 Jan 2021 15:02:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DF2CIw025258; Wed, 13 Jan 2021 15:02:12 GMT (envelope-from git) Date: Wed, 13 Jan 2021 15:02:12 GMT Message-Id: <202101131502.10DF2CIw025258@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: 895ad33784e0 - main - x86 budma_bounce: style. 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: 895ad33784e00fc9d601fd51f0571e0e02d9d146 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 15:02:12 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=895ad33784e00fc9d601fd51f0571e0e02d9d146 commit 895ad33784e00fc9d601fd51f0571e0e02d9d146 Author: Konstantin Belousov AuthorDate: 2021-01-11 23:42:04 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-13 15:00:46 +0000 x86 budma_bounce: style. Reviewed by: dim, jah MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28108 --- sys/x86/x86/busdma_bounce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c index 037416be0e8a..65fbbb7ec1a4 100644 --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -400,7 +400,7 @@ bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) * A dmamap to for use with dmamap_load is also allocated. */ static int -bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, +bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, bus_dmamap_t *mapp) { vm_memattr_t attr; From owner-dev-commits-src-all@freebsd.org Wed Jan 13 15:02:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C38634DFABE; Wed, 13 Jan 2021 15:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG9dx5Bd3z4n2L; Wed, 13 Jan 2021 15:02: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 A581D1989A; Wed, 13 Jan 2021 15:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10DF2DcK025496; Wed, 13 Jan 2021 15:02:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DF2D49025495; Wed, 13 Jan 2021 15:02:13 GMT (envelope-from git) Date: Wed, 13 Jan 2021 15:02:13 GMT Message-Id: <202101131502.10DF2D49025495@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: 8f54940f019c - main - x86 busdma_bounce: do not make assumptions about alignment of malloc(9) results. 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: 8f54940f019ca586bcfbf189ef9974eeb0a8194a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 15:02:13 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8f54940f019ca586bcfbf189ef9974eeb0a8194a commit 8f54940f019ca586bcfbf189ef9974eeb0a8194a Author: Konstantin Belousov AuthorDate: 2021-01-11 23:42:30 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-13 15:00:49 +0000 x86 busdma_bounce: do not make assumptions about alignment of malloc(9) results. Reported by: dim Reviewed by: dim, jah Tested by: dim, pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28108 --- sys/x86/x86/busdma_bounce.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c index 65fbbb7ec1a4..fec6e2144a22 100644 --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -403,6 +403,8 @@ static int bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, bus_dmamap_t *mapp) { + uintptr_t ma; + size_t malloc_sz; vm_memattr_t attr; int mflags; @@ -445,19 +447,20 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, * else allocate a block of contiguous pages because one or more of the * constraints is something that only the contig allocator can fulfill. * - * NOTE: The (dmat->common.alignment <= dmat->maxsize) check - * below is just a quick hack. The exact alignment guarantees - * of malloc(9) need to be nailed down, and the code below - * should be rewritten to take that into account. - * - * In the meantime warn the user if malloc gets it wrong. + * Warn the user if we get it wrong. */ if (dmat->common.maxsize <= PAGE_SIZE && - dmat->common.alignment <= dmat->common.maxsize && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { - *vaddr = malloc_domainset(dmat->common.maxsize, M_DEVBUF, + malloc_sz = roundup2(dmat->common.maxsize, + dmat->common.alignment); + ma = (uintptr_t)malloc_domainset(malloc_sz, M_DEVBUF, DOMAINSET_PREF(dmat->common.domain), mflags); + if (ma != 0) { + *vaddr = (void *)roundup2(ma, dmat->common.alignment); + } else { + *vaddr = NULL; + } } else if (dmat->common.nsegments >= howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && From owner-dev-commits-src-all@freebsd.org Wed Jan 13 15:33:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA13B4E0B52; Wed, 13 Jan 2021 15:33: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGBKw3GnFz4qKy; Wed, 13 Jan 2021 15:33: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 1753119E90; Wed, 13 Jan 2021 15:33: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 10DFXOoU064583; Wed, 13 Jan 2021 15:33:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DFXN1x064582; Wed, 13 Jan 2021 15:33:23 GMT (envelope-from git) Date: Wed, 13 Jan 2021 15:33:23 GMT Message-Id: <202101131533.10DFXN1x064582@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: 5753be8e432f - main - fd: add refcount argument to falloc_noinstall 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: 5753be8e432f26b02c0bd06d7dd84316ddc50ed5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 15:33:27 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5753be8e432f26b02c0bd06d7dd84316ddc50ed5 commit 5753be8e432f26b02c0bd06d7dd84316ddc50ed5 Author: Mateusz Guzik AuthorDate: 2021-01-13 14:16:38 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-13 15:29:34 +0000 fd: add refcount argument to falloc_noinstall This lets callers avoid atomic ops by initializing the count to required value from the get go. While here add falloc_abort to backpedal from this without having to fdrop. --- sys/kern/kern_descrip.c | 29 +++++++++++++++++++++-------- sys/kern/vfs_syscalls.c | 4 ++-- sys/sys/filedesc.h | 4 +++- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 407280d79850..257b1de2a6ac 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1979,13 +1979,14 @@ falloc_caps(struct thread *td, struct file **resultfp, int *resultfd, int flags, MPASS(resultfp != NULL); MPASS(resultfd != NULL); - error = falloc_noinstall(td, &fp); - if (error) - return (error); /* no reference held on error */ + error = _falloc_noinstall(td, &fp, 2); + if (__predict_false(error != 0)) { + return (error); + } - error = finstall(td, fp, &fd, flags, fcaps); - if (error) { - fdrop(fp, td); /* one reference (fp only) */ + error = finstall_refed(td, fp, &fd, flags, fcaps); + if (__predict_false(error != 0)) { + falloc_abort(td, fp); return (error); } @@ -1999,7 +2000,7 @@ falloc_caps(struct thread *td, struct file **resultfp, int *resultfd, int flags, * Create a new open file structure without allocating a file descriptor. */ int -falloc_noinstall(struct thread *td, struct file **resultfp) +_falloc_noinstall(struct thread *td, struct file **resultfp, u_int n) { struct file *fp; int maxuserfiles = maxfiles - (maxfiles / 20); @@ -2008,6 +2009,7 @@ falloc_noinstall(struct thread *td, struct file **resultfp) static int curfail; KASSERT(resultfp != NULL, ("%s: resultfp == NULL", __func__)); + MPASS(n > 0); openfiles_new = atomic_fetchadd_int(&openfiles, 1) + 1; if ((openfiles_new >= maxuserfiles && @@ -2022,13 +2024,24 @@ falloc_noinstall(struct thread *td, struct file **resultfp) } fp = uma_zalloc(file_zone, M_WAITOK); bzero(fp, sizeof(*fp)); - refcount_init(&fp->f_count, 1); + refcount_init(&fp->f_count, n); fp->f_cred = crhold(td->td_ucred); fp->f_ops = &badfileops; *resultfp = fp; return (0); } +void +falloc_abort(struct thread *td, struct file *fp) +{ + + /* + * For assertion purposes. + */ + refcount_init(&fp->f_count, 0); + _fdrop(fp, td); +} + /* * Install a file in a file descriptor table. */ diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index c1b6c70ab0ac..35a56510e9ef 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1214,14 +1214,14 @@ success: } } else { filecaps_free(&nd.ni_filecaps); - fdrop_close(fp, td); + falloc_abort(td, fp); } td->td_retval[0] = indx; return (0); bad: KASSERT(indx == -1, ("indx=%d, should be -1", indx)); - fdrop_close(fp, td); + falloc_abort(td, fp); return (error); } diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index f0cae3ed6911..9b65c7a66054 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -229,7 +229,9 @@ int dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode, int openerror, int *indxp); int falloc_caps(struct thread *td, struct file **resultfp, int *resultfd, int flags, struct filecaps *fcaps); -int falloc_noinstall(struct thread *td, struct file **resultfp); +void falloc_abort(struct thread *td, struct file *fp); +int _falloc_noinstall(struct thread *td, struct file **resultfp, u_int n); +#define falloc_noinstall(td, resultfp) _falloc_noinstall(td, resultfp, 1) void _finstall(struct filedesc *fdp, struct file *fp, int fd, int flags, struct filecaps *fcaps); int finstall(struct thread *td, struct file *fp, int *resultfd, int flags, From owner-dev-commits-src-all@freebsd.org Wed Jan 13 15:33:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CDF04E0C8F; Wed, 13 Jan 2021 15:33: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGBL01mcpz4q4c; Wed, 13 Jan 2021 15:33: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 518A119E91; Wed, 13 Jan 2021 15:33: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 10DFXPn5064605; Wed, 13 Jan 2021 15:33:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DFXP6T064604; Wed, 13 Jan 2021 15:33:25 GMT (envelope-from git) Date: Wed, 13 Jan 2021 15:33:25 GMT Message-Id: <202101131533.10DFXP6T064604@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: ef23df135468 - main - vfs: set NC_KEEPPOSENTRY alongside NOCACHE when creating a file 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: ef23df13546811a49aeebb107dd17298bec8122e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 15:33:28 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ef23df13546811a49aeebb107dd17298bec8122e commit ef23df13546811a49aeebb107dd17298bec8122e Author: Mateusz Guzik AuthorDate: 2021-01-13 14:53:55 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-13 15:29:34 +0000 vfs: set NC_KEEPPOSENTRY alongside NOCACHE when creating a file Arguably the entire NOCACHE logic should get retired, in the meantime at least prevent the code from evicting existing entries. --- sys/kern/vfs_vnops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index de5cd68501a7..6c6727c7f372 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -240,8 +240,11 @@ restart: /* * Set NOCACHE to avoid flushing the cache when * rolling in many files at once. - */ - ndp->ni_cnd.cn_flags |= LOCKPARENT | NOCACHE; + * + * Set NC_KEEPPOSENTRY to keep positive entries if they already + * exist despite NOCACHE. + */ + ndp->ni_cnd.cn_flags |= LOCKPARENT | NOCACHE | NC_KEEPPOSENTRY; if ((fmode & O_EXCL) == 0 && (fmode & O_NOFOLLOW) == 0) ndp->ni_cnd.cn_flags |= FOLLOW; if ((vn_open_flags & VN_OPEN_INVFS) == 0) From owner-dev-commits-src-all@freebsd.org Wed Jan 13 15:44:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B62254E10A2; Wed, 13 Jan 2021 15:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGBZJ4qlZz4rQL; Wed, 13 Jan 2021 15:44: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 98CFB1A015; Wed, 13 Jan 2021 15:44: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 10DFi8Ft078251; Wed, 13 Jan 2021 15:44:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DFi8wo078250; Wed, 13 Jan 2021 15:44:08 GMT (envelope-from git) Date: Wed, 13 Jan 2021 15:44:08 GMT Message-Id: <202101131544.10DFi8wo078250@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: f9d85a082181 - main - Revert "x86 busdma_bounce: do not make assumptions about alignment of malloc(9) results." 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: f9d85a082181a4eeec4200e42c3ffc1ac85f571c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 15:44:08 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f9d85a082181a4eeec4200e42c3ffc1ac85f571c commit f9d85a082181a4eeec4200e42c3ffc1ac85f571c Author: Konstantin Belousov AuthorDate: 2021-01-13 15:40:54 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-13 15:44:00 +0000 Revert "x86 busdma_bounce: do not make assumptions about alignment of malloc(9) results." This reverts commit 8f54940f019ca586bcfbf189ef9974eeb0a8194a. The free needs to be called on the address returned by malloc, not the realigned address. Noted by: andrew Sponsored by: The FreeBSD Foundation --- sys/x86/x86/busdma_bounce.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c index fec6e2144a22..65fbbb7ec1a4 100644 --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -403,8 +403,6 @@ static int bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, bus_dmamap_t *mapp) { - uintptr_t ma; - size_t malloc_sz; vm_memattr_t attr; int mflags; @@ -447,20 +445,19 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, * else allocate a block of contiguous pages because one or more of the * constraints is something that only the contig allocator can fulfill. * - * Warn the user if we get it wrong. + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. + * + * In the meantime warn the user if malloc gets it wrong. */ if (dmat->common.maxsize <= PAGE_SIZE && + dmat->common.alignment <= dmat->common.maxsize && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { - malloc_sz = roundup2(dmat->common.maxsize, - dmat->common.alignment); - ma = (uintptr_t)malloc_domainset(malloc_sz, M_DEVBUF, + *vaddr = malloc_domainset(dmat->common.maxsize, M_DEVBUF, DOMAINSET_PREF(dmat->common.domain), mflags); - if (ma != 0) { - *vaddr = (void *)roundup2(ma, dmat->common.alignment); - } else { - *vaddr = NULL; - } } else if (dmat->common.nsegments >= howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && From owner-dev-commits-src-all@freebsd.org Wed Jan 13 16:42:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0FEB4E1D5F; Wed, 13 Jan 2021 16: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGCt26VQ4z4vfB; Wed, 13 Jan 2021 16: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 D24AB1AB9E; Wed, 13 Jan 2021 16: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 10DGgolF055397; Wed, 13 Jan 2021 16: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 10DGgo7L055396; Wed, 13 Jan 2021 16:42:50 GMT (envelope-from git) Date: Wed, 13 Jan 2021 16:42:50 GMT Message-Id: <202101131642.10DGgo7L055396@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: 594389d1de64 - main - Create a stack frame when needed in the arm64 kernel 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: 594389d1de647cbda3cb36f06c06d3f73b190e82 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 16:42:51 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=594389d1de647cbda3cb36f06c06d3f73b190e82 commit 594389d1de647cbda3cb36f06c06d3f73b190e82 Author: Andrew Turner AuthorDate: 2021-01-12 14:18:59 +0000 Commit: Andrew Turner CommitDate: 2021-01-13 16:36:52 +0000 Create a stack frame when needed in the arm64 kernel When building the arm64 kernel for use with dtrace or hwpmc we need to include a stack frame so they can extract a stack trace. As with amd64 also build a stack frame in modules. Sponsored by: Innovate UK --- sys/conf/Makefile.arm64 | 2 +- sys/conf/kmod.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index 1f5760021f3e..d48826197dbd 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -45,7 +45,7 @@ SYSTEM_LD= \ KERNEL_EXTRA+= ${KERNEL_KO}.bin KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin -.if !empty(DDB_ENABLED) +.if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED) CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index b7ba121925ea..c245f447cefb 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -146,7 +146,7 @@ LDFLAGS+= --build-id=sha1 .endif CFLAGS+= ${DEBUG_FLAGS} -.if ${MACHINE_CPUARCH} == amd64 +.if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif From owner-dev-commits-src-all@freebsd.org Wed Jan 13 16:42:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C7174E1DCD; Wed, 13 Jan 2021 16:42: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGCt40Mnhz4vG2; Wed, 13 Jan 2021 16:42: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 F3D1A1AB9F; Wed, 13 Jan 2021 16:42: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 10DGgpPk055420; Wed, 13 Jan 2021 16:42:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DGgpT6055419; Wed, 13 Jan 2021 16:42:51 GMT (envelope-from git) Date: Wed, 13 Jan 2021 16:42:51 GMT Message-Id: <202101131642.10DGgpT6055419@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: 63c858a04d56 - main - Switch the arm64 pcpu to a global register variable 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: 63c858a04d56529eddbddf85ad04fc8e99e73762 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 16:42:52 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=63c858a04d56529eddbddf85ad04fc8e99e73762 commit 63c858a04d56529eddbddf85ad04fc8e99e73762 Author: Andrew Turner AuthorDate: 2021-01-11 15:43:39 +0000 Commit: Andrew Turner CommitDate: 2021-01-13 16:36:52 +0000 Switch the arm64 pcpu to a global register variable This removes an unneeded instruction to move the pointer from x18 to a temporary register. Reviewed by: emaste Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26971 --- sys/arm64/include/pcpu.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/arm64/include/pcpu.h b/sys/arm64/include/pcpu.h index a520cfc7df56..ce4dc46e1609 100644 --- a/sys/arm64/include/pcpu.h +++ b/sys/arm64/include/pcpu.h @@ -56,14 +56,9 @@ struct debug_monitor_state; struct pcb; struct pcpu; -static inline struct pcpu * -get_pcpu(void) -{ - struct pcpu *pcpu; +register struct pcpu *pcpup __asm ("x18"); - __asm __volatile("mov %0, x18" : "=&r"(pcpu)); - return (pcpu); -} +#define get_pcpu() pcpup static inline struct thread * get_curthread(void) @@ -76,11 +71,11 @@ get_curthread(void) #define curthread get_curthread() -#define PCPU_GET(member) (get_pcpu()->pc_ ## member) -#define PCPU_ADD(member, value) (get_pcpu()->pc_ ## member += (value)) +#define PCPU_GET(member) (pcpup->pc_ ## member) +#define PCPU_ADD(member, value) (pcpup->pc_ ## member += (value)) #define PCPU_INC(member) PCPU_ADD(member, 1) -#define PCPU_PTR(member) (&get_pcpu()->pc_ ## member) -#define PCPU_SET(member,value) (get_pcpu()->pc_ ## member = (value)) +#define PCPU_PTR(member) (&pcpup->pc_ ## member) +#define PCPU_SET(member,value) (pcpup->pc_ ## member = (value)) #endif /* _KERNEL */ From owner-dev-commits-src-all@freebsd.org Wed Jan 13 17:08:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E8434E29B5; Wed, 13 Jan 2021 17: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGDRb2lDVz3D0t; Wed, 13 Jan 2021 17:08: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 511381AF4C; Wed, 13 Jan 2021 17:08: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 10DH8Rn2082391; Wed, 13 Jan 2021 17:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DH8RZB082390; Wed, 13 Jan 2021 17:08:27 GMT (envelope-from git) Date: Wed, 13 Jan 2021 17:08:27 GMT Message-Id: <202101131708.10DH8RZB082390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 98c15d4dc284 - main - loader.efi: initial terminal size should base on UEFI terminal size MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98c15d4dc28450688dcee6c6082d3a4d417b5d5d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 17:08:27 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=98c15d4dc28450688dcee6c6082d3a4d417b5d5d commit 98c15d4dc28450688dcee6c6082d3a4d417b5d5d Author: Toomas Soome AuthorDate: 2021-01-13 17:05:51 +0000 Commit: Toomas Soome CommitDate: 2021-01-13 17:05:51 +0000 loader.efi: initial terminal size should base on UEFI terminal size We do select font based on desired terminal size, we do query UEFI terminal size with conout->QueryMode(), but by mistake, the fallback values are used. --- stand/efi/libefi/efi_console.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 1ed2be15d3d6..4c04461a5f92 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -953,13 +953,13 @@ cons_update_mode(bool use_gfx_mode) /* * setup_font() can adjust terminal size. - * Note, we assume 80x24 terminal first, this is - * because the font selection will attempt to achieve - * at least this terminal dimension and we do not - * end up with too small font. + * Note, we do use UEFI terminal dimensions first, + * this is because the font selection will attempt + * to achieve at least this terminal dimension and + * we do not end up with too small font. */ - gfx_state.tg_tp.tp_row = TEXT_ROWS; - gfx_state.tg_tp.tp_col = TEXT_COLS; + gfx_state.tg_tp.tp_row = rows; + gfx_state.tg_tp.tp_col = cols; setup_font(&gfx_state, fb_height, fb_width); rows = gfx_state.tg_tp.tp_row; cols = gfx_state.tg_tp.tp_col; From owner-dev-commits-src-all@freebsd.org Wed Jan 13 17:44:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C9CD4E3814; Wed, 13 Jan 2021 17:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGFDh2Cg9z3GcD; Wed, 13 Jan 2021 17:44: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 3EA731B5FD; Wed, 13 Jan 2021 17:44: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 10DHi4K7033570; Wed, 13 Jan 2021 17:44:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DHi43M033569; Wed, 13 Jan 2021 17:44:04 GMT (envelope-from git) Date: Wed, 13 Jan 2021 17:44:04 GMT Message-Id: <202101131744.10DHi43M033569@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: 0a05676b44ae - main - Add driver for Synopsys Designware Watchdog timer. 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: 0a05676b44ae5575141ff731079a8405e111f965 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 17:44:04 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=0a05676b44ae5575141ff731079a8405e111f965 commit 0a05676b44ae5575141ff731079a8405e111f965 Author: Emmanuel Vadot AuthorDate: 2021-01-13 17:23:51 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-13 17:43:47 +0000 Add driver for Synopsys Designware Watchdog timer. This driver supports some arm and arm64 boards equipped with "snps,dw-wdt"-compatible watchdog device. Tested on RK3399-based board (RockPro64). Once started watchdog device cannot be stopped. Interrupt handler has mode to kick watchdog even when software does not do it properly. This can be controlled via sysctl: dev.dwwdt.prevent_restart. Also - driver handles system shutdown and prevents from restart when system is asked to reboot. Submitted by: kjopek@gmail.com Differential Revision: https://reviews.freebsd.org/D26761 --- sys/dev/dwwdt/dwwdt.c | 360 +++++++++++++++++++++++++++++++++++++++++++++ sys/modules/Makefile | 2 + sys/modules/dwwdt/Makefile | 7 + 3 files changed, 369 insertions(+) diff --git a/sys/dev/dwwdt/dwwdt.c b/sys/dev/dwwdt/dwwdt.c new file mode 100644 index 000000000000..c08927f44c60 --- /dev/null +++ b/sys/dev/dwwdt/dwwdt.c @@ -0,0 +1,360 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 BusyTech + * + * 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 + +/* Registers */ +#define DWWDT_CR 0x00 +#define DWWDT_CR_WDT_EN (1 << 0) +#define DWWDT_CR_RESP_MODE (1 << 1) +#define DWWDT_TORR 0x04 +#define DWWDT_CCVR 0x08 +#define DWWDT_CRR 0x0C +#define DWWDT_CRR_KICK 0x76 +#define DWWDT_STAT 0x10 +#define DWWDT_STAT_STATUS 0x01 +#define DWWDT_EOI 0x14 + +#define DWWDT_READ4(sc, reg) bus_read_4((sc)->sc_mem_res, (reg)) +#define DWWDT_WRITE4(sc, reg, val) \ + bus_write_4((sc)->sc_mem_res, (reg), (val)) + +/* + * 47 = 16 (timeout shift of dwwdt) + 30 (1s ~= 2 ** 30ns) + 1 + * (pre-restart delay) + */ +#define DWWDT_EXP_OFFSET 47 + +struct dwwdt_softc { + device_t sc_dev; + struct resource *sc_mem_res; + struct resource *sc_irq_res; + void *sc_intr_cookie; + clk_t sc_clk; + uint64_t sc_clk_freq; + eventhandler_tag sc_evtag; + int sc_mem_rid; + int sc_irq_rid; + enum { + DWWDT_STOPPED, + DWWDT_RUNNING, + } sc_status; +}; + +static devclass_t dwwdt_devclass; + +SYSCTL_NODE(_dev, OID_AUTO, dwwdt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "Synopsys Designware watchdog timer"); +/* Setting this to 0 enables full restart mode. */ +static uint32_t dwwdt_prevent_restart = 1; +SYSCTL_UINT(_dev_dwwdt, OID_AUTO, prevent_restart, CTLFLAG_RW | CTLFLAG_MPSAFE, + &dwwdt_prevent_restart, 1, + "Prevent system restart (0 - Disabled; 1 - Enabled)"); + +static uint32_t dwwdt_debug_enabled = 0; +SYSCTL_UINT(_dev_dwwdt, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_MPSAFE, + &dwwdt_debug_enabled, 1, "Debug mode (0 - Disabled; 1 - Enabled)"); + +static int dwwdt_probe(device_t); +static int dwwdt_attach(device_t); +static int dwwdt_detach(device_t); +static int dwwdt_shutdown(device_t); + +static void dwwdt_intr(void *); +static void dwwdt_event(void *, unsigned int, int *); + +/* Helpers */ +static inline void dwwdt_start(struct dwwdt_softc *sc); +static inline bool dwwdt_started(const struct dwwdt_softc *sc); +static inline void dwwdt_stop(struct dwwdt_softc *sc); +static inline void dwwdt_set_timeout(const struct dwwdt_softc *sc, int val); + +static void dwwdt_debug(device_t); + +static void +dwwdt_debug(device_t dev) +{ + /* + * Reading from EOI may clear interrupt flag. + */ + const struct dwwdt_softc *sc = device_get_softc(dev); + + device_printf(dev, "Registers dump: \n"); + device_printf(dev, " CR: %08x\n", DWWDT_READ4(sc, DWWDT_CR)); + device_printf(dev, " CCVR: %08x\n", DWWDT_READ4(sc, DWWDT_CCVR)); + device_printf(dev, " CRR: %08x\n", DWWDT_READ4(sc, DWWDT_CRR)); + device_printf(dev, " STAT: %08x\n", DWWDT_READ4(sc, DWWDT_STAT)); + + device_printf(dev, "Clock: %s\n", clk_get_name(sc->sc_clk)); + device_printf(dev, " FREQ: %lu\n", sc->sc_clk_freq); +} + +static inline bool +dwwdt_started(const struct dwwdt_softc *sc) +{ + + /* CR_WDT_E bit can be clear only by full CPU reset. */ + return ((DWWDT_READ4(sc, DWWDT_CR) & DWWDT_CR_WDT_EN) != 0); +} + +static void inline +dwwdt_start(struct dwwdt_softc *sc) +{ + uint32_t val; + + /* Enable watchdog */ + val = DWWDT_READ4(sc, DWWDT_CR); + val |= DWWDT_CR_WDT_EN | DWWDT_CR_RESP_MODE; + DWWDT_WRITE4(sc, DWWDT_CR, val); + sc->sc_status = DWWDT_RUNNING; +} + +static void inline +dwwdt_stop(struct dwwdt_softc *sc) +{ + + sc->sc_status = DWWDT_STOPPED; + dwwdt_set_timeout(sc, 0x0f); +} + +static void inline +dwwdt_set_timeout(const struct dwwdt_softc *sc, int val) +{ + + DWWDT_WRITE4(sc, DWWDT_TORR, val); + DWWDT_WRITE4(sc, DWWDT_CRR, DWWDT_CRR_KICK); +} + +static void +dwwdt_intr(void *arg) +{ + struct dwwdt_softc *sc = arg; + + KASSERT((DWWDT_READ4(sc, DWWDT_STAT) & DWWDT_STAT_STATUS) != 0, + ("Missing interrupt status bit?")); + + if (dwwdt_prevent_restart != 0 || sc->sc_status == DWWDT_STOPPED) { + /* + * Confirm interrupt reception. Restart counter. + * This also emulates stopping watchdog. + */ + (void)DWWDT_READ4(sc, DWWDT_EOI); + } +} + +static void +dwwdt_event(void *arg, unsigned int cmd, int *error) +{ + struct dwwdt_softc *sc = arg; + const int exponent = flsl(sc->sc_clk_freq); + int timeout; + int val; + + timeout = cmd & WD_INTERVAL; + val = MAX(0, timeout + exponent - DWWDT_EXP_OFFSET); + + dwwdt_stop(sc); + if (cmd == 0 || val > 0x0f) { + /* + * Set maximum time between interrupts and Leave watchdog + * disabled. + */ + return; + } + + dwwdt_set_timeout(sc, val); + dwwdt_start(sc); + *error = 0; + + if (dwwdt_debug_enabled) + dwwdt_debug(sc->sc_dev); +} + +static int +dwwdt_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "snps,dw-wdt")) + return (ENXIO); + + device_set_desc(dev, "Synopsys Designware watchdog timer"); + return (BUS_PROBE_DEFAULT); +} + +static int +dwwdt_attach(device_t dev) +{ + struct dwwdt_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + sc->sc_mem_rid = 0; + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->sc_mem_rid, RF_ACTIVE); + if (sc->sc_mem_res == NULL) { + device_printf(dev, "cannot allocate memory resource\n"); + goto err_no_mem; + } + + sc->sc_irq_rid = 0; + sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &sc->sc_irq_rid, RF_ACTIVE); + if (sc->sc_irq_res == NULL) { + device_printf(dev, "cannot allocate ireq resource\n"); + goto err_no_irq; + } + + sc->sc_intr_cookie = NULL; + if (bus_setup_intr(dev, sc->sc_irq_res, INTR_MPSAFE | INTR_TYPE_MISC, + NULL, dwwdt_intr, sc, &sc->sc_intr_cookie) != 0) { + device_printf(dev, "cannot setup interrupt routine\n"); + goto err_no_intr; + } + + if (clk_get_by_ofw_index(dev, 0, 0, &sc->sc_clk) != 0) { + device_printf(dev, "cannot find clock\n"); + goto err_no_clock; + } + + if (clk_enable(sc->sc_clk) != 0) { + device_printf(dev, "cannot enable clock\n"); + goto err_no_freq; + } + + if (clk_get_freq(sc->sc_clk, &sc->sc_clk_freq) != 0) { + device_printf(dev, "cannot get clock frequency\n"); + goto err_no_freq; + } + + if (sc->sc_clk_freq == 0UL) + goto err_no_freq; + + sc->sc_evtag = EVENTHANDLER_REGISTER(watchdog_list, dwwdt_event, sc, 0); + sc->sc_status = DWWDT_STOPPED; + + return (bus_generic_attach(dev)); + +err_no_freq: + clk_release(sc->sc_clk); +err_no_clock: + bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intr_cookie); +err_no_intr: + bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irq_rid, sc->sc_irq_res); +err_no_irq: + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_mem_rid, + sc->sc_mem_res); +err_no_mem: + return (ENXIO); +} + +static int +dwwdt_detach(device_t dev) +{ + struct dwwdt_softc *sc = device_get_softc(dev); + + if (dwwdt_started(sc)) { + /* + * Once started it cannot be stopped. Prevent module unload + * instead. + */ + return (EBUSY); + } + + EVENTHANDLER_DEREGISTER(watchdog_list, sc->sc_evtag); + sc->sc_evtag = NULL; + + if (sc->sc_clk != NULL) + clk_release(sc->sc_clk); + + if (sc->sc_intr_cookie != NULL) + bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intr_cookie); + + if (sc->sc_irq_res) { + bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irq_rid, + sc->sc_irq_res); + } + + if (sc->sc_mem_res) { + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_mem_rid, + sc->sc_mem_res); + } + + return (bus_generic_detach(dev)); +} + +static int +dwwdt_shutdown(device_t dev) +{ + struct dwwdt_softc *sc; + + sc = device_get_softc(dev); + + /* Prevent restarts during shutdown. */ + dwwdt_prevent_restart = 1; + dwwdt_stop(sc); + return (bus_generic_shutdown(dev)); +} + +static device_method_t dwwdt_methods[] = { + DEVMETHOD(device_probe, dwwdt_probe), + DEVMETHOD(device_attach, dwwdt_attach), + DEVMETHOD(device_detach, dwwdt_detach), + DEVMETHOD(device_shutdown, dwwdt_shutdown), + + {0, 0} +}; + +static driver_t dwwdt_driver = { + "dwwdt", + dwwdt_methods, + sizeof(struct dwwdt_softc), +}; + +DRIVER_MODULE(dwwdt, simplebus, dwwdt_driver, dwwdt_devclass, NULL, NULL); +MODULE_VERSION(dwwdt, 1); diff --git a/sys/modules/Makefile b/sys/modules/Makefile index d417309cdee3..320f4002f817 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -108,6 +108,7 @@ SUBDIR= \ ${_dpdk_lpm6} \ ${_dpms} \ dummynet \ + ${_dwwdt} \ ${_efirt} \ ${_em} \ ${_ena} \ @@ -611,6 +612,7 @@ _cxgb= cxgb .if ${MACHINE_CPUARCH} == "aarch64" _allwinner= allwinner _armv8crypto= armv8crypto +_dwwdt= dwwdt _em= em _rockchip= rockchip .endif diff --git a/sys/modules/dwwdt/Makefile b/sys/modules/dwwdt/Makefile new file mode 100644 index 000000000000..e486705998d5 --- /dev/null +++ b/sys/modules/dwwdt/Makefile @@ -0,0 +1,7 @@ +.PATH: ${SRCTOP}/sys/dev/dwwdt + +KMOD = dwwdt +SRCS = dwwdt.c \ + device_if.h bus_if.h ofw_bus_if.h + +.include From owner-dev-commits-src-all@freebsd.org Wed Jan 13 17:44:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFC754E3730; Wed, 13 Jan 2021 17:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGFDj4BgGz3G5b; Wed, 13 Jan 2021 17:44: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 7B5D41B4B5; Wed, 13 Jan 2021 17:44: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 10DHi5vm033588; Wed, 13 Jan 2021 17:44:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DHi5MA033587; Wed, 13 Jan 2021 17:44:05 GMT (envelope-from git) Date: Wed, 13 Jan 2021 17:44:05 GMT Message-Id: <202101131744.10DHi5MA033587@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: 6003bf9290cd - main - dwwdt: Add PNP info for the driver 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: 6003bf9290cd6f5b2fd9adcd45ac82144e6cb789 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 17:44:05 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=6003bf9290cd6f5b2fd9adcd45ac82144e6cb789 commit 6003bf9290cd6f5b2fd9adcd45ac82144e6cb789 Author: Emmanuel Vadot AuthorDate: 2021-01-13 17:41:34 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-13 17:43:51 +0000 dwwdt: Add PNP info for the driver --- sys/dev/dwwdt/dwwdt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/dwwdt/dwwdt.c b/sys/dev/dwwdt/dwwdt.c index c08927f44c60..4eab26ef2915 100644 --- a/sys/dev/dwwdt/dwwdt.c +++ b/sys/dev/dwwdt/dwwdt.c @@ -86,6 +86,11 @@ struct dwwdt_softc { static devclass_t dwwdt_devclass; +static struct ofw_compat_data compat_data[] = { + { "snps,dw-wdt", 1 }, + { NULL, 0 } +}; + SYSCTL_NODE(_dev, OID_AUTO, dwwdt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Synopsys Designware watchdog timer"); /* Setting this to 0 enables full restart mode. */ @@ -219,7 +224,7 @@ dwwdt_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "snps,dw-wdt")) + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); device_set_desc(dev, "Synopsys Designware watchdog timer"); @@ -358,3 +363,4 @@ static driver_t dwwdt_driver = { DRIVER_MODULE(dwwdt, simplebus, dwwdt_driver, dwwdt_devclass, NULL, NULL); MODULE_VERSION(dwwdt, 1); +OFWBUS_PNP_INFO(compat_data); From owner-dev-commits-src-all@freebsd.org Wed Jan 13 18:19:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 067AF4E45B6; Wed, 13 Jan 2021 18:19: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGG1l6j0cz3Jjx; Wed, 13 Jan 2021 18:19: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 D77A51BDA3; Wed, 13 Jan 2021 18:19: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 10DIJdwG073190; Wed, 13 Jan 2021 18:19:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DIJdVZ073189; Wed, 13 Jan 2021 18:19:39 GMT (envelope-from git) Date: Wed, 13 Jan 2021 18:19:39 GMT Message-Id: <202101131819.10DIJdVZ073189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: fdaf9cb942d9 - main - Revert "loader.efi: disable workaround for serial console on non-x86" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fdaf9cb942d995969b79eb8ad3fa91b7592198cd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 18:19:40 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=fdaf9cb942d995969b79eb8ad3fa91b7592198cd commit fdaf9cb942d995969b79eb8ad3fa91b7592198cd Author: Toomas Soome AuthorDate: 2021-01-13 18:18:35 +0000 Commit: Toomas Soome CommitDate: 2021-01-13 18:18:35 +0000 Revert "loader.efi: disable workaround for serial console on non-x86" This patch is creating some issues, reverting it. This reverts commit 8b18395487506d3602205e5844e0b67ba0c0dc80. --- stand/efi/libefi/efi_console.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 4c04461a5f92..7024f9c8b2f2 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -929,11 +929,7 @@ cons_update_mode(bool use_gfx_mode) * also just use the old emulator. RB_MULTIPLE also implies * we're using a serial console. */ -#if defined(__i386__) || defined(__amd64__) mode = parse_uefi_con_out(); -#else - mode = 0; -#endif if ((mode & (RB_SERIAL | RB_MULTIPLE)) == 0) { conout->EnableCursor(conout, FALSE); gfx_state.tg_cursor_visible = false; From owner-dev-commits-src-all@freebsd.org Wed Jan 13 19:49:55 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89FD04E6B97; Wed, 13 Jan 2021 19:49: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGJ1v3VC9z3QHL; Wed, 13 Jan 2021 19:49: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 6AA1D1D0A0; Wed, 13 Jan 2021 19:49: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 10DJntdj089634; Wed, 13 Jan 2021 19:49:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DJntLw089633; Wed, 13 Jan 2021 19:49:55 GMT (envelope-from git) Date: Wed, 13 Jan 2021 19:49:55 GMT Message-Id: <202101131949.10DJntLw089633@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: ea36212bf571 - main - pf: Don't hold PF_RULES_WLOCK during copyin() on DIOCRCLRTSTATS 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: ea36212bf5711206bbaf5362a23ebb52c7f7e2a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 19:49:55 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ea36212bf5711206bbaf5362a23ebb52c7f7e2a4 commit ea36212bf5711206bbaf5362a23ebb52c7f7e2a4 Author: Kristof Provost AuthorDate: 2021-01-13 18:30:01 +0000 Commit: Kristof Provost CommitDate: 2021-01-13 18:49:42 +0000 pf: Don't hold PF_RULES_WLOCK during copyin() on DIOCRCLRTSTATS We cannot hold a non-sleepable lock during copyin(). This means we can't safely count the table, so instead we fall back to the pf_ioctl_maxcount used in other ioctls to protect against overly large requests. Reported by: syzbot+81e380344d4a6c37d78a@syzkaller.appspotmail.com MFC after: 1 week --- sys/netpfil/pf/pf_ioctl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index b6e2ec98ddce..60c38a980d1e 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -3363,36 +3363,35 @@ DIOCCHANGEADDR_error: struct pfioc_table *io = (struct pfioc_table *)addr; struct pfr_table *pfrts; size_t totlen; - int n; if (io->pfrio_esize != sizeof(struct pfr_table)) { error = ENODEV; break; } - PF_RULES_WLOCK(); - n = pfr_table_count(&io->pfrio_table, io->pfrio_flags); - if (n < 0) { - PF_RULES_WUNLOCK(); - error = EINVAL; + if (io->pfrio_size < 0 || io->pfrio_size > pf_ioctl_maxcount || + WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_table))) { + /* We used to count tables and use the minimum required + * size, so we didn't fail on overly large requests. + * Keep doing so. */ + io->pfrio_size = pf_ioctl_maxcount; break; } - io->pfrio_size = min(io->pfrio_size, n); totlen = io->pfrio_size * sizeof(struct pfr_table); pfrts = mallocarray(io->pfrio_size, sizeof(struct pfr_table), M_TEMP, M_NOWAIT); if (pfrts == NULL) { error = ENOMEM; - PF_RULES_WUNLOCK(); break; } error = copyin(io->pfrio_buffer, pfrts, totlen); if (error) { free(pfrts, M_TEMP); - PF_RULES_WUNLOCK(); break; } + + PF_RULES_WLOCK(); error = pfr_clr_tstats(pfrts, io->pfrio_size, &io->pfrio_nzero, io->pfrio_flags | PFR_FLAG_USERIOCTL); PF_RULES_WUNLOCK(); From owner-dev-commits-src-all@freebsd.org Wed Jan 13 19:49:56 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A81874E6AAD; Wed, 13 Jan 2021 19:49: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGJ1w45rnz3Q90; Wed, 13 Jan 2021 19:49: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 7E2291D201; Wed, 13 Jan 2021 19:49: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 10DJnuGA089657; Wed, 13 Jan 2021 19:49:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DJnuFN089656; Wed, 13 Jan 2021 19:49:56 GMT (envelope-from git) Date: Wed, 13 Jan 2021 19:49:56 GMT Message-Id: <202101131949.10DJnuFN089656@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: 44117554b1ee - main - pf tests: pass NULL buffer to DIOCRCLRTSTATS 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: 44117554b1ee8edd66d7383c17802d5799fd18f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 19:49:56 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=44117554b1ee8edd66d7383c17802d5799fd18f2 commit 44117554b1ee8edd66d7383c17802d5799fd18f2 Author: Kristof Provost AuthorDate: 2021-01-13 18:41:07 +0000 Commit: Kristof Provost CommitDate: 2021-01-13 18:49:45 +0000 pf tests: pass NULL buffer to DIOCRCLRTSTATS As discovered by syzcaller this used to provoke panics. MFC after: 1 week --- tests/sys/netpfil/pf/ioctl/validation.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/sys/netpfil/pf/ioctl/validation.c b/tests/sys/netpfil/pf/ioctl/validation.c index 5b1f61720f66..0d7f7631e91b 100644 --- a/tests/sys/netpfil/pf/ioctl/validation.c +++ b/tests/sys/netpfil/pf/ioctl/validation.c @@ -265,6 +265,11 @@ ATF_TC_BODY(clrtstats, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRCLRTSTATS, &io) != 0) atf_tc_fail("Request with size 1 << 24 failed"); + + io.pfrio_size = sizeof(tbl); + io.pfrio_buffer = NULL; + if (ioctl(dev, DIOCRCLRTSTATS, &io) == 0) + atf_tc_fail("Request with NULL buffer succeeded"); } ATF_TC_CLEANUP(clrtstats, tc) From owner-dev-commits-src-all@freebsd.org Wed Jan 13 20:59:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F2EE4E858E; Wed, 13 Jan 2021 20:59:01 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGKYd2ps5z3krV; Wed, 13 Jan 2021 20:59:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:96c:12e6:ae9f:21b7]) (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 8C2FC2B15B; Wed, 13 Jan 2021 20:59:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 11d62b6f31ab - main - linuxkpi: add kernel_fpu_begin/kernel_fpu_end To: myfreeweb , Konstantin Belousov Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101121143.10CBh02x095972@gitrepo.freebsd.org> <20210113110826.46fbc900b3c375e7215a8195@bidouilliste.com> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 13 Jan 2021 12:58:58 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 20:59:01 -0000 On 1/13/21 3:42 AM, myfreeweb wrote: > > > On January 13, 2021 10:08:26 AM UTC, Emmanuel Vadot wrote: >> On Tue, 12 Jan 2021 15:16:55 +0200 >> Konstantin Belousov wrote: >> >>> On Tue, Jan 12, 2021 at 11:43:00AM +0000, Emmanuel Vadot wrote: >>>> The branch main has been updated by manu: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 >>>> >>>> commit 11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 >>>> Author: Emmanuel Vadot >>>> AuthorDate: 2021-01-12 11:02:38 +0000 >>>> Commit: Emmanuel Vadot >>>> CommitDate: 2021-01-12 11:31:00 +0000 >>>> >>>> linuxkpi: add kernel_fpu_begin/kernel_fpu_end >>>> >>>> With newer AMD GPUs (>=Navi,Renoir) there is FPU context usage in the >>>> amdgpu driver. >>>> The `kernel_fpu_begin/end` implementations in drm did not even allow nested >>>> begin-end blocks. >>> >>> Does Linux allow more then one thread to execute kernel_fpu_begin ? >> >> I actually have no idea, adding Greg to cc. > > Looks like they save the context into the current thread state, so yes? (drm doesn't need that) > > Also they seem to do something FPU_KERN_NOCTX like (??) because they disable preemption inside these blocks. > (Where does our NOCTX actually store the state?) It doesn't store at all because threads aren't allowed to sleep in a critical section, so the thread will never give up the CPU while in the FPU section. If threads can voluntarily sleep (cv_wait*, *sleep(), etc.) while using kernel_fpu_begin(), then NOCTX won't work and we will need something else. However, the code snippet from the stackoverflow URL I posted earlier looks exactly like the NOCTX case where we flush the user FPU state to the thread if the FPU state is "dirty" and then load a clean initial state for use by the FPU. It would also seem to never save the kernel FPU state anywhere by counting on avoiding context switches. So, I think you probably should just make this use NOCTX. -- John Baldwin From owner-dev-commits-src-all@freebsd.org Wed Jan 13 21:13:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7ED9A4E87E0; Wed, 13 Jan 2021 21:13: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGKtG37gJz3lsw; Wed, 13 Jan 2021 21:13: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 5E2751E2AA; Wed, 13 Jan 2021 21:13: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 10DLDQMw005005; Wed, 13 Jan 2021 21:13:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DLDQt9005004; Wed, 13 Jan 2021 21:13:26 GMT (envelope-from git) Date: Wed, 13 Jan 2021 21:13:26 GMT Message-Id: <202101132113.10DLDQt9005004@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: 074a91f746bd - main - Enable accelerated AES-XTS software crypto in GENERIC. 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: 074a91f746bd80498a4c815aa795e5dc51b12121 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 21:13:26 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=074a91f746bd80498a4c815aa795e5dc51b12121 commit 074a91f746bd80498a4c815aa795e5dc51b12121 Author: John Baldwin AuthorDate: 2021-01-13 21:13:01 +0000 Commit: John Baldwin CommitDate: 2021-01-13 21:13:01 +0000 Enable accelerated AES-XTS software crypto in GENERIC. In particular, using GELI on a root filesystem will only use accelerated software crypto drivers if they are available before the root filesystem is mounted. While these modules can be loaded from the loader, including them in GENERIC provides a better out-of-the-box experience for users. Both aesni(4) and armv8crypto(4) provide accelerated implementations of the default cipher used by GELI (AES-XTS) in addition to other ciphers. Reviewed by: mhorne, allanjude, markj Differential Revision: https://reviews.freebsd.org/D28100 --- sys/amd64/conf/GENERIC | 1 + sys/arm64/conf/GENERIC | 1 + sys/i386/conf/GENERIC | 1 + 3 files changed, 3 insertions(+) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 1ccd06669951..393fec26d423 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -315,6 +315,7 @@ device wpi # Intel 3945ABG wireless NICs. # Pseudo devices. device crypto # core crypto support +device aesni # AES-NI OpenCrypto module device loop # Network loopback device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 463271d1db26..d1ad101975de 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -217,6 +217,7 @@ device aw_rtc # Allwinner Real-time Clock device mv_rtc # Marvell Real-time Clock # Crypto accelerators +device armv8crypto # ARMv8 OpenCrypto module device safexcel # Inside Secure EIP-97 # Watchdog controllers diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index eac3a0af6c82..b65235ca9668 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -287,6 +287,7 @@ device wpi # Intel 3945ABG wireless NICs. # Pseudo devices. device crypto # core crypto support +device aesni # AES-NI OpenCrypto module device loop # Network loopback device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG From owner-dev-commits-src-all@freebsd.org Wed Jan 13 21:18:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87A284E8F5E; Wed, 13 Jan 2021 21:18:52 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGL0X2tGrz3mnb; Wed, 13 Jan 2021 21:18:52 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f170.google.com with SMTP id s2so3703316oij.2; Wed, 13 Jan 2021 13:18:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vquRFzeHYLlQYgKm1Mime0kc5KX2+D88SztQyNeUdZo=; b=hlWZCdx2iTrk+jcFzSrjbaUDRxaWhfh4iYwhHEKivPKVYu5G0qOWH1K/k9h2RJTSnH w+o2yeJOubo1RIHPXFdzILg13eMRyFZ1l1tJ0XaqKPwap5g/SGnxfToCwxcjs2otJexI X1fNc4fDTPgLEGXeqhRcYV7lWzcg84BN0TrPTTkIBep/hOVrEjRUHUyrl6kmHRfOU2Yh WyzlYjqZwHcmxk2E6BAz/Vcc7S6SfPqCDjfiX7gZelvEneY+Vm2rJYL0kH2ZXRYxNxRn sa53T1ZJlc05wz/skuDsDQkyvEje0F3+7ogGcHMWX8mLwb6MXI1M+FZXx6PRoTxATpAf isQw== X-Gm-Message-State: AOAM530uv2je370OkDiQxTlHvro+6ZEtxVlO0zF7JGnEcPkytLh4t/s0 EV0aEfhV8acMBQra6PTIFUfHqUEKfMg1masd8H57dHNBbMU= X-Google-Smtp-Source: ABdhPJzBlFk7XUxTrfKU0ytiFJE5sTSczo99THQMdkrjqL7iEC0nDXuC2HcUywJH1A2ZHuV3jRoKsWyLCJMgE8kp6BQ= X-Received: by 2002:aca:dd09:: with SMTP id u9mr727092oig.73.1610572731016; Wed, 13 Jan 2021 13:18:51 -0800 (PST) MIME-Version: 1.0 References: <202101132113.10DLDQt9005004@gitrepo.freebsd.org> In-Reply-To: <202101132113.10DLDQt9005004@gitrepo.freebsd.org> From: Alan Somers Date: Wed, 13 Jan 2021 14:18:40 -0700 Message-ID: Subject: Re: git: 074a91f746bd - main - Enable accelerated AES-XTS software crypto in GENERIC. To: John Baldwin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DGL0X2tGrz3mnb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 21:18:52 -0000 On Wed, Jan 13, 2021 at 2:13 PM John Baldwin wrote: > The branch main has been updated by jhb: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=074a91f746bd80498a4c815aa795e5dc51b12121 > > commit 074a91f746bd80498a4c815aa795e5dc51b12121 > Author: John Baldwin > AuthorDate: 2021-01-13 21:13:01 +0000 > Commit: John Baldwin > CommitDate: 2021-01-13 21:13:01 +0000 > > Enable accelerated AES-XTS software crypto in GENERIC. > > In particular, using GELI on a root filesystem will only use > accelerated software crypto drivers if they are available before the > root filesystem is mounted. While these modules can be loaded from > the loader, including them in GENERIC provides a better out-of-the-box > experience for users. > > Both aesni(4) and armv8crypto(4) provide accelerated implementations > of the default cipher used by GELI (AES-XTS) in addition to other > ciphers. > > Reviewed by: mhorne, allanjude, markj > Differential Revision: https://reviews.freebsd.org/D28100 > > How about an entry in UPDATING? From owner-dev-commits-src-all@freebsd.org Wed Jan 13 21:28:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E09B04E950E; Wed, 13 Jan 2021 21: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGLCD5sx3z3ncZ; Wed, 13 Jan 2021 21: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 BC3321E2D5; Wed, 13 Jan 2021 21:28: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 10DLS8VS018543; Wed, 13 Jan 2021 21:28:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DLS8ZH018542; Wed, 13 Jan 2021 21:28:08 GMT (envelope-from git) Date: Wed, 13 Jan 2021 21:28:08 GMT Message-Id: <202101132128.10DLS8ZH018542@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: 818390ce0ca5 - main - arm64: fix early devmap assertion 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: 818390ce0ca539300dd15d7a817784f1e3f7a9b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 21:28:08 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=818390ce0ca539300dd15d7a817784f1e3f7a9b8 commit 818390ce0ca539300dd15d7a817784f1e3f7a9b8 Author: Mitchell Horne AuthorDate: 2021-01-13 18:30:50 +0000 Commit: Mitchell Horne CommitDate: 2021-01-13 21:27:44 +0000 arm64: fix early devmap assertion The purpose of this KASSERT is to ensure that we do not run out of space in the early devmap. However, the devmap grew beyond its initial size of 2MB in r336519, and this assertion did not grow with it. A devmap mapping of a 1080p framebuffer requires 1920x1080 bytes, or 1.977 MB, so it is just barely able to fit without triggering the assertion, provided no other devices are mapped before it. With the addition of `options GDB` in GENERIC by bbfa199cbc16, the uart is now mapped for the purposes of a debug port, before mapping the framebuffer. The presence of both these conditions pushes the selected virtual address just below the threshold, triggering the assertion. To fix this, use the correct size of the devmap, defined by PMAP_MAPDEV_EARLY_SIZE. Since this code is shared with RISC-V, define it for that platform as well (although it is a different size). PR: 25241 Reported by: gbe MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/kern/subr_devmap.c | 2 +- sys/riscv/include/vmparam.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_devmap.c b/sys/kern/subr_devmap.c index 581e85086f0f..8e07199b7f73 100644 --- a/sys/kern/subr_devmap.c +++ b/sys/kern/subr_devmap.c @@ -275,7 +275,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t size) if (early_boot) { akva_devmap_vaddr = trunc_page(akva_devmap_vaddr - size); va = akva_devmap_vaddr; - KASSERT(va >= VM_MAX_KERNEL_ADDRESS - L2_SIZE, + KASSERT(va >= VM_MAX_KERNEL_ADDRESS - PMAP_MAPDEV_EARLY_SIZE, ("Too many early devmap mappings")); } else #endif diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h index f3cab1074454..9580ab3e1218 100644 --- a/sys/riscv/include/vmparam.h +++ b/sys/riscv/include/vmparam.h @@ -235,6 +235,7 @@ extern vm_offset_t init_pt_va; #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ #define DEVMAP_MAX_VADDR VM_MAX_KERNEL_ADDRESS +#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 2) /* * No non-transparent large page support in the pmap. From owner-dev-commits-src-all@freebsd.org Wed Jan 13 21:35:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC9AB4E97ED; Wed, 13 Jan 2021 21:35:34 +0000 (UTC) (envelope-from mhorne063@gmail.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGLMp6FHZz3p5V; Wed, 13 Jan 2021 21:35:34 +0000 (UTC) (envelope-from mhorne063@gmail.com) Received: by mail-qk1-x731.google.com with SMTP id w79so4224128qkb.5; Wed, 13 Jan 2021 13:35:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Si/25qAHFaL3vMN1+BHzjKe2mSw/N8l/nZf3XfVwt+k=; b=S/xmJ2f/hVyQfe06OujQkcQA7qhhQsw8H/cLyz5z2PP67a6KB09nY2Ff0NtlV3Kj17 CZyoypIiPU1fOcEwdk8YMj8IW7Clgzle5zjgcgIlcU1/JNeNs+IHtCmMDS5hu1tX8lzd C9ajN0u++3WMH1gZVT/c2s4MtNl4MSuACk9y4rDAnDhSe4uTkVCaqBL6e9wRFq9m0e4B RoaL5Rv9vrU1wKRnYilBD9GTf3FyVlwpObNnHkcVaVlkJBy6ODMdyTEN1xexmT/J5wtb JtKX+xAm4WuZ19hCqtTpFyIA7kelLp7IUaSKaaIl3TxpvT9x1LBk7f/4ytxff65/X1kz +Oaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Si/25qAHFaL3vMN1+BHzjKe2mSw/N8l/nZf3XfVwt+k=; b=s2Byo/0LB0nrd0YMajGKpN2C172avyWX3PKPqvtZD93ms1qiT1z4+eXiVIyeSus7tJ a5AAWymhY1CHmJfc4D+ASihs2mId6x/tT1QRUUCiIMsenrhbGKxr3iQfkB1swO1cbZac nQxgrfKWZxkRrEAh6KtemMHJ1Wfrr7NfARQARxtX8X8Q698K6BCZ9koqA0XLzhnmRyEj UctcDaZezblNkWFCowactIoOJwEnerR5PqFs3/LXQHLzHo8rnvbUON59oROrA2D5TwXj nQmTB5BEu83MxeTZjHXjOBX1SIQ1bMJ2DuSK/hK15GdaUzjrKz/IJl37m4cKaGKNVZdB n6pQ== X-Gm-Message-State: AOAM5314VDh6QLn6YdYVQmTnj5NHdKYIqNuV4snU2/R8x6e5nGb/xSFj BYkgnuagBoABVJsskD9h1L7im+HUbAIssEgoHTof9fZAmiM= X-Google-Smtp-Source: ABdhPJwNAWmUvnuxVejMQ46eglviRL3C/j0rXg04w160EiQIpdgoGiWmuSvAz2kHRQp9i76axXHC5CLrekBkczakPBw= X-Received: by 2002:a5b:1c1:: with SMTP id f1mr3726449ybp.212.1610573733728; Wed, 13 Jan 2021 13:35:33 -0800 (PST) MIME-Version: 1.0 References: <202101132128.10DLS8ZH018542@gitrepo.freebsd.org> In-Reply-To: <202101132128.10DLS8ZH018542@gitrepo.freebsd.org> From: Mitchell Horne Date: Wed, 13 Jan 2021 17:35:22 -0400 Message-ID: Subject: Re: git: 818390ce0ca5 - main - arm64: fix early devmap assertion To: Mitchell Horne Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DGLMp6FHZz3p5V X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 21:35:35 -0000 On Wed, Jan 13, 2021 at 5:28 PM Mitchell Horne wrote: > > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=818390ce0ca539300dd15d7a817784f1e3f7a9b8 > > commit 818390ce0ca539300dd15d7a817784f1e3f7a9b8 > Author: Mitchell Horne > AuthorDate: 2021-01-13 18:30:50 +0000 > Commit: Mitchell Horne > CommitDate: 2021-01-13 21:27:44 +0000 > > arm64: fix early devmap assertion > > The purpose of this KASSERT is to ensure that we do not run out of space > in the early devmap. However, the devmap grew beyond its initial size of > 2MB in r336519, and this assertion did not grow with it. > > A devmap mapping of a 1080p framebuffer requires 1920x1080 bytes, or > 1.977 MB, so it is just barely able to fit without triggering the > assertion, provided no other devices are mapped before it. With the > addition of `options GDB` in GENERIC by bbfa199cbc16, the uart is now > mapped for the purposes of a debug port, before mapping the framebuffer. > The presence of both these conditions pushes the selected virtual > address just below the threshold, triggering the assertion. > > To fix this, use the correct size of the devmap, defined by > PMAP_MAPDEV_EARLY_SIZE. Since this code is shared with RISC-V, define > it for that platform as well (although it is a different size). > > PR: 25241 Sigh. This should be PR 252541. Mitchell > Reported by: gbe > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > --- > sys/kern/subr_devmap.c | 2 +- > sys/riscv/include/vmparam.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sys/kern/subr_devmap.c b/sys/kern/subr_devmap.c > index 581e85086f0f..8e07199b7f73 100644 > --- a/sys/kern/subr_devmap.c > +++ b/sys/kern/subr_devmap.c > @@ -275,7 +275,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t size) > if (early_boot) { > akva_devmap_vaddr = trunc_page(akva_devmap_vaddr - size); > va = akva_devmap_vaddr; > - KASSERT(va >= VM_MAX_KERNEL_ADDRESS - L2_SIZE, > + KASSERT(va >= VM_MAX_KERNEL_ADDRESS - PMAP_MAPDEV_EARLY_SIZE, > ("Too many early devmap mappings")); > } else > #endif > diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h > index f3cab1074454..9580ab3e1218 100644 > --- a/sys/riscv/include/vmparam.h > +++ b/sys/riscv/include/vmparam.h > @@ -235,6 +235,7 @@ extern vm_offset_t init_pt_va; > #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ > > #define DEVMAP_MAX_VADDR VM_MAX_KERNEL_ADDRESS > +#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 2) > > /* > * No non-transparent large page support in the pmap. From owner-dev-commits-src-all@freebsd.org Thu Jan 14 00:02:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9147F4EB9CC; Thu, 14 Jan 2021 00:02: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGPcn3nTnz4RcC; Thu, 14 Jan 2021 00:02: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 74E7F2058D; Thu, 14 Jan 2021 00:02: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 10E0219F024447; Thu, 14 Jan 2021 00:02:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10E0211m024446; Thu, 14 Jan 2021 00:02:01 GMT (envelope-from git) Date: Thu, 14 Jan 2021 00:02:01 GMT Message-Id: <202101140002.10E0211m024446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: 7ae27c2d6c4f - main - newvers.sh: set to ALPHA1 as part of the 13.0 cycle 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/main X-Git-Reftype: branch X-Git-Commit: 7ae27c2d6c4fe4f21e1219bb5d8a37cfc932337b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 00:02:01 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=7ae27c2d6c4fe4f21e1219bb5d8a37cfc932337b commit 7ae27c2d6c4fe4f21e1219bb5d8a37cfc932337b Author: Glen Barber AuthorDate: 2021-01-14 00:01:30 +0000 Commit: Glen Barber CommitDate: 2021-01-14 00:01:30 +0000 newvers.sh: set to ALPHA1 as part of the 13.0 cycle Sponsored by: Rubicon Communications, LLC (netgate.com) --- 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 b8667844210b..2a0ace45f2f6 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.0" -BRANCH="CURRENT" +BRANCH="ALPHA1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-dev-commits-src-all@freebsd.org Thu Jan 14 01:26:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2371C4EEDA1 for ; Thu, 14 Jan 2021 01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGRTj0XyRz4XXT; Thu, 14 Jan 2021 01:26: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 054582172C; Thu, 14 Jan 2021 01:26: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 10E1Q1u0028216; Thu, 14 Jan 2021 01:26:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10E1Q0SC028215; Thu, 14 Jan 2021 01:26:00 GMT (envelope-from git) Date: Thu, 14 Jan 2021 01:26:00 GMT Message-Id: <202101140126.10E1Q0SC028215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 8e11a9b4250b - vendor/NetBSD/bmake - Import bmake-20210110 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/vendor/NetBSD/bmake X-Git-Reftype: branch X-Git-Commit: 8e11a9b4250be3c3379c45fa820bff78d99d5946 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 01:26:01 -0000 The branch vendor/NetBSD/bmake has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8e11a9b4250be3c3379c45fa820bff78d99d5946 commit 8e11a9b4250be3c3379c45fa820bff78d99d5946 Author: Simon J. Gerraty AuthorDate: 2021-01-14 01:24:34 +0000 Commit: Simon J. Gerraty CommitDate: 2021-01-14 01:24:34 +0000 Import bmake-20210110 Quite a lot of churn on style, but lots of good work refactoring complicated functions and lots more unit-tests. Thanks mostly to rillig at NetBSD Some interesting entries from ChangeLog o .MAKE.{UID,GID} represent uid and gid running make. o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o add more unit tests for META MODE Change-Id: I4d3bcf08b4c864d98b343f602efe5a75dbfa7a94 --- ChangeLog | 241 +- FILES | 64 +- LICENSE | 4 +- PSD.doc/tutorial.ms | 10 +- VERSION | 2 +- arch.c | 1323 ++--- bmake.1 | 18 +- bmake.cat1 | 248 +- buf.c | 139 +- buf.h | 28 +- compat.c | 932 +-- cond.c | 1611 +++--- dir.c | 2047 ++++--- dir.h | 36 +- enum.c | 11 +- enum.h | 69 +- filemon/filemon.h | 6 +- filemon/filemon_dev.c | 6 +- filemon/filemon_ktrace.c | 79 +- for.c | 633 +- hash.c | 41 +- hash.h | 72 +- import.sh | 87 + job.c | 3876 +++++++------ job.h | 84 +- lst.c | 304 +- lst.h | 88 +- main.c | 364 +- make-conf.h | 20 +- make.1 | 18 +- make.c | 1825 +++--- make.h | 812 +-- make_malloc.c | 7 +- make_malloc.h | 12 +- meta.c | 359 +- meta.h | 4 +- metachar.h | 4 +- mk/ChangeLog | 39 + mk/dirdeps-options.mk | 5 +- mk/dirdeps-targets.mk | 7 +- mk/dirdeps.mk | 25 +- mk/init.mk | 17 +- mk/install-mk | 4 +- mk/meta.subdir.mk | 4 +- mk/mkopt.sh | 0 mk/own.mk | 6 +- mk/sys.mk | 6 +- nonints.h | 278 +- os.sh | 0 parse.c | 4058 ++++++------- pathnames.h | 15 +- str.c | 15 +- suff.c | 2897 +++++----- targ.c | 568 +- trace.c | 16 +- trace.h | 6 +- unit-tests/Makefile | 159 +- unit-tests/cmd-errors-jobs.exp | 9 + unit-tests/cmd-errors-jobs.mk | 32 + unit-tests/cmd-errors.mk | 4 +- unit-tests/cmdline.mk | 2 +- unit-tests/compat-error.exp | 15 + unit-tests/compat-error.mk | 37 + unit-tests/cond-eof.exp | 9 + unit-tests/cond-eof.mk | 20 + unit-tests/cond-func-empty.mk | 27 +- unit-tests/cond-func-exists.mk | 11 +- unit-tests/cond-func-make-main.exp | 3 + unit-tests/cond-func-make-main.mk | 62 + unit-tests/cond-short.exp | 12 +- unit-tests/cond-short.mk | 64 +- unit-tests/cond-token-string.exp | 2 +- unit-tests/dep-percent.exp | 5 +- unit-tests/depsrc-meta.exp | 4 + unit-tests/depsrc-meta.mk | 27 +- unit-tests/depsrc-optional.exp | 18 +- unit-tests/depsrc.exp | 3 + unit-tests/depsrc.mk | 17 +- unit-tests/deptgt-begin-fail-indirect.exp | 6 + unit-tests/deptgt-begin-fail-indirect.mk | 16 + unit-tests/deptgt-begin-fail.exp | 6 + unit-tests/deptgt-begin-fail.mk | 10 + unit-tests/deptgt-end-fail-all.exp | 7 + unit-tests/deptgt-end-fail-all.mk | 19 + unit-tests/deptgt-end-fail-indirect.exp | 7 + unit-tests/deptgt-end-fail-indirect.mk | 16 + unit-tests/deptgt-end-fail.exp | 163 + unit-tests/deptgt-end-fail.mk | 69 + unit-tests/deptgt-suffixes.exp | 26 + unit-tests/deptgt-suffixes.mk | 23 +- unit-tests/deptgt.exp | 1 + unit-tests/deptgt.mk | 10 +- unit-tests/directive-elif.exp | 32 +- unit-tests/directive-elif.mk | 126 +- unit-tests/directive-else.exp | 16 +- unit-tests/directive-else.mk | 15 +- unit-tests/directive-endfor.exp | 4 + unit-tests/directive-endfor.mk | 9 + unit-tests/directive-endif.exp | 9 +- unit-tests/directive-endif.mk | 28 +- unit-tests/directive-error.mk | 6 +- unit-tests/directive-export-env.mk | 4 +- unit-tests/directive-export-impl.exp | 56 + unit-tests/directive-export-impl.mk | 62 + unit-tests/directive-export-literal.mk | 4 +- unit-tests/directive-export.exp | 5 +- unit-tests/directive-export.mk | 16 +- unit-tests/directive-for-errors.exp | 22 + unit-tests/directive-for-errors.mk | 75 + unit-tests/directive-for-escape.exp | 74 + unit-tests/directive-for-escape.mk | 96 + unit-tests/directive-for-lines.exp | 10 + unit-tests/directive-for-lines.mk | 32 + unit-tests/directive-for-null.exp | 10 + unit-tests/directive-for-null.mk | 19 + unit-tests/directive-for.exp | 7 +- unit-tests/directive-for.mk | 9 +- unit-tests/directive-if.exp | 6 +- unit-tests/directive-if.mk | 14 +- unit-tests/directive-include.mk | 5 +- unit-tests/directive-info.exp | 23 +- unit-tests/directive-info.mk | 18 +- unit-tests/directive-misspellings.exp | 45 + unit-tests/directive-misspellings.mk | 79 + unit-tests/directive-undef.exp | 3 +- unit-tests/directive-undef.mk | 85 +- unit-tests/directive-unexport-env.exp | 19 +- unit-tests/directive-unexport-env.mk | 19 +- unit-tests/directive-unexport.exp | 13 +- unit-tests/directive-unexport.mk | 12 +- unit-tests/directive-warning.exp | 16 +- unit-tests/directive-warning.mk | 10 +- unit-tests/jobs-error-indirect.exp | 8 + unit-tests/jobs-error-indirect.mk | 21 + unit-tests/jobs-error-nested-make.exp | 11 + unit-tests/jobs-error-nested-make.mk | 20 + unit-tests/jobs-error-nested.exp | 15 + unit-tests/jobs-error-nested.mk | 20 + unit-tests/make-exported.mk | 2 +- unit-tests/meta-cmd-cmp.exp | 37 + unit-tests/meta-cmd-cmp.mk | 52 + unit-tests/modmisc.exp | 1 - unit-tests/modmisc.mk | 29 +- unit-tests/opt-chdir.exp | 4 +- unit-tests/opt-debug-errors.exp | 5 +- unit-tests/opt-debug-graph1.exp | 36 + unit-tests/opt-debug-jobs.exp | 4 +- unit-tests/opt-debug-lint.exp | 3 +- unit-tests/opt-debug-lint.mk | 15 +- unit-tests/opt-file.exp | 13 +- unit-tests/opt-file.mk | 101 +- unit-tests/opt-jobs-no-action.exp | 61 + unit-tests/opt-jobs-no-action.mk | 102 + unit-tests/opt-keep-going-multiple.exp | 9 + unit-tests/opt-keep-going-multiple.mk | 21 + unit-tests/opt-keep-going.exp | 5 +- unit-tests/opt-keep-going.mk | 6 +- unit-tests/opt-no-action-runflags.exp | 34 + unit-tests/opt-no-action-runflags.mk | 32 + unit-tests/opt.exp | 4 + unit-tests/posix.exp | 5 +- unit-tests/qequals.exp | 2 - unit-tests/qequals.mk | 8 - unit-tests/sh-dots.exp | 12 +- unit-tests/sh-errctl.exp | 27 + unit-tests/sh-errctl.mk | 26 + unit-tests/sh-flags.exp | 4325 ++++++++++++++ unit-tests/sh-flags.mk | 138 + unit-tests/sh-jobs.exp | 7 +- unit-tests/sh-jobs.mk | 34 +- unit-tests/sh-meta-chars.mk | 17 +- unit-tests/shell-csh.mk | 6 +- unit-tests/suff-add-later.exp | 8 +- unit-tests/suff-clear-regular.exp | 5 +- unit-tests/suff-clear-regular.mk | 3 +- unit-tests/suff-clear-single.exp | 5 +- unit-tests/suff-incomplete.exp | 42 + unit-tests/suff-incomplete.mk | 31 + unit-tests/suff-lookup.exp | 21 +- unit-tests/suff-main-several.exp | 141 + unit-tests/suff-main-several.mk | 42 + unit-tests/suff-phony.exp | 13 + unit-tests/suff-phony.mk | 21 + unit-tests/suff-rebuild.exp | 76 +- unit-tests/suff-rebuild.mk | 23 +- unit-tests/suff-self.exp | 5 +- unit-tests/suff-transform-debug.exp | 62 + unit-tests/suff-transform-debug.mk | 12 + unit-tests/suff-transform-endless.exp | 44 +- unit-tests/suff-transform-endless.mk | 9 +- unit-tests/suff-transform-expand.exp | 5 +- unit-tests/suff-transform-select.exp | 45 +- unit-tests/suff-transform-select.mk | 7 +- unit-tests/use-inference.exp | 5 +- unit-tests/use-inference.mk | 6 +- unit-tests/var-op-default.mk | 72 +- unit-tests/var-op-expand.exp | 9 - unit-tests/var-op-expand.mk | 191 +- unit-tests/vardebug.exp | 2 +- unit-tests/varmisc.mk | 14 +- unit-tests/varmod-defined.exp | 18 +- unit-tests/varmod-edge.exp | 41 +- unit-tests/varmod-extension.exp | 1 + unit-tests/varmod-extension.mk | 4 +- unit-tests/varmod-gmtime.exp | 40 +- unit-tests/varmod-gmtime.mk | 197 +- unit-tests/varmod-head.exp | 1 + unit-tests/varmod-head.mk | 4 +- unit-tests/varmod-ifelse.exp | 4 + unit-tests/varmod-ifelse.mk | 20 +- unit-tests/varmod-indirect.exp | 59 + unit-tests/varmod-indirect.mk | 157 + unit-tests/varmod-localtime.exp | 40 +- unit-tests/varmod-localtime.mk | 196 +- unit-tests/varmod-range.exp | 9 +- unit-tests/varmod-root.exp | 1 + unit-tests/varmod-root.mk | 4 +- unit-tests/varmod-subst-regex.exp | 2 + unit-tests/varmod-subst-regex.mk | 7 +- unit-tests/varmod-sysv.exp | 4 +- unit-tests/varmod-sysv.mk | 16 +- unit-tests/varmod-tail.exp | 1 + unit-tests/varmod-tail.mk | 4 +- unit-tests/varmod-to-many-words.mk | 16 +- unit-tests/varmod-to-one-word.mk | 16 +- unit-tests/varmod-to-separator.exp | 2 - unit-tests/varmod.exp | 2 +- unit-tests/varmod.mk | 4 +- unit-tests/varname-dot-makeflags.exp | 3 + unit-tests/varname-dot-makeflags.mk | 15 + unit-tests/varname-dot-shell.exp | 2 +- .../varname-make_print_var_on_error-jobs.exp | 5 +- unit-tests/varname-make_print_var_on_error-jobs.mk | 15 +- unit-tests/varname-make_print_var_on_error.exp | 3 +- unit-tests/varname-make_print_var_on_error.mk | 15 +- unit-tests/varname-makeflags.mk | 24 +- unit-tests/varparse-dynamic.mk | 12 +- unit-tests/varparse-errors.exp | 6 +- unit-tests/varparse-errors.mk | 18 +- util.c | 91 +- var.c | 6056 ++++++++++---------- 241 files changed, 24279 insertions(+), 14537 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac723511d75a..5cf7f1f45384 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,247 @@ +2021-01-10 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20210110 + Merge with NetBSD make, pick up + o fix lint warnings + o consistently use boolean expressions in conditions + +2021-01-08 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20210108 + Merge with NetBSD make, pick up + o job.c: back to polling token pipe if we want a token + o main.c: always print 'stopped in' on first call + The execption is if we bail because of an abort token + in which case just exit 6. + +2021-01-01 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20210101 + Merge with NetBSD make, pick up + o Happy New Year! + o rename CmdOpts.lint to strict + o exit 2 on technical errors + o replace pointers in controlling conditions with booleans + o replace global preserveUndefined with VARE_KEEP_UNDEF + o compat.c: re-export variables from the actual make process + if using vfork this is the effect anyway + o cond.c: clean up VarParseResult constants + o for.c: fix undefined behavior in SubstVarLong + make control flow in SubstVarLong of .for loops more obvious + clean up SubstVarShort in .for loops + extract ForSubstBody from ForReadMore + clean up ForReadMore + simplify termination condition for .for loop + add error handling for .for loop items + job.c: re-export variables from the actual make process + parse.c: remove mmap for loading files, only allow files < 1 GiB + fix edge case in := with undefined in variable name + skip variable expansion in ParseDependencyTargetWord + var.c: split ExportVar into separate functions + clean up code in extracted ExportVar functions + remove dead code from ApplyModifiersIndirect + split Var_Subst into easily understandable functions + clean up VarParseResult constants + +2020-12-25 Simon J Gerraty + + * main.c: use .MAKE.DEPENDFILE as set by makefiles + +2020-12-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20201222 + Merge with NetBSD make, pick up + o make DEBUG macro return boolean + o parse.c: fix assertion failure for files without trailing newline + o var.c: allow .undef to undefine multiple variables at once + remove excess newline from parse errors + +2020-12-21 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20201221 + Merge with NetBSD make, pick up + o some unit-test updates + +2020-12-20 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20201220 + Merge with NetBSD make, pick up + o more unit tests + o return FStr from Var_Parse and Var_Value + o spell nonexistent consistently + o add str_basename to reduce duplicate code + o compat.c: fix .ERROR_TARGET in compat -k mode + extract InitSignals from Compat_Run + extract UseShell from Compat_RunCommand + o cond.c: error out if an '.endif' or '.else' contain extraneous text + o for.c: rename ForIterate to ForReadMore + o hash.c: clean up hash function for HashTable + o lst.c: rename Vector.priv_cap to cap + o main.c: remove constant parameter from MakeMode + o make.c: use symbolic time for 0 in Make_Recheck + extract MakeChildren from MakeStartJobs + o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar + fix error message for .info/.warning/.error without argument + extract Var_Undef from ParseDirective + extract ParseSkippedBranches, ParseForLoop from ParseReadLine + rename mode constants for ParseGetLine to be more expressive + reduce debugging details in Parse_SetInput + fix line numbers in .for loops + split ParseGetLine into separate functions + fix garbled output for failed shell command + var.c: remove redundant assignment in ApplyModifier_SysV + error out on unknown variable modifiers at parse time + remove wrong error message for indirect modifier in lint mode + extract ApplySingleModifier from ApplyModifiers + use FStr for memory management in Var_SetWithFlags + extract SetVar from Var_SetWithFlags + use FStr in VarNew + extract string functions from ApplyModifier_To + error out if .undef has not exactly 1 argument + extract Var_DeleteVar from Var_Delete + extract Var_Undef from ParseDirective + clean up memory management for expanding variable expressions + +2020-12-12 Simon J Gerraty + + * avoid %zu + + * lst.c: avoid anonymous union + + * VERSION (_MAKE_VERSION): 20201212 + Merge with NetBSD make, pick up + o more unit tests + o inline Targ_Ignore and Targ_Silent + o split JobFlags into separate fields + o remove const from function parameters (left overs from refactoring) + o eliminate boolean argument of Var_Export + o make API of Buf_Init simpler + o rename ParseRunOptions to ParseCommandFlags + o replace *line with line[0] + o compat.c: fix wrong exit status for multiple failed main targets + refactor Compat_Run to show the error condition more clearly + don't make .END if the main targets already failed (-k mode) + fix exit status in -k mode if a dependency fails + o for.c: clean up Buf_AddEscaped in .for loops + o job.c: extract ShellWriter_ErrOn from JobPrintCommand + make Job_Touch simpler + refactor JobFinish + rename Shell.exitFlag to errFlag + move Job.xtraced to ShellWriter + make printing of shell commands independent from the job + rename shell flags in struct Shell + extract JobOpenTmpFile from JobStart + rename RunFlags to CommandFlags + split various Job.* into separate fields + rename commandShell to shell + extract InitShellNameAndPath from Shell_Init + replace signal handling macros with local functions + replace macro MESSAGE with local function + parse.c: error out on null bytes in makefiles + error out on misspelled directives + rename IFile.nextbuf to readMore + fix undefined behavior in ParseEOF + str.c: remove redundant call to strlen in Str_Words + var.c: error out on misspelled .unexport-env + error out on misspelled .export directives + extract ExportVars from Var_Export + extract ExportVarsExpand from Var_Export + eliminate boolean argument of Var_Export + fix undefined behavior when exporting ${:U } + rename Var_ExportVars to Var_ReexportVars + rename Var_Export1 to ExportVar + +2020-12-06 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20201206 + Merge with NetBSD make, pick up + o more unit tests + o inline macros for debug logging + o use consistent variable names for list nodes + o define constants for enum zero-values + o dir.c: use fixed format for debug output of the directory cache + remove Dir_InitDir + o lst.c: inline Lst_Enqueue, Vector_Done + o meta.c: remove unused parameter from meta_needed + o parse.c: rename parse functions + o suff.c: extract ExpandChildrenRegular from ExpandChildren + o targ.c: don't concatenate identifiers in Targ_PrintType + o var.c: remove comment decoration + extract UnexportVars from Var_UnExport + extract GetVarnamesToUnexport from Var_UnExport + extract UnexportEnv from Var_UnExport + extract UnexportVar from Var_UnExport + move CleanEnv to UnexportVars + replace pointer comparisons with enum + add FStr to var.c to make memory handling simpler + use FStr in Var_UnExport + move type definitions in var.c to the top + extract FreeEnvVar from Var_Parse + extract ShuffleStrings from ApplyModifier_Order + +2020-11-30 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20201130 + Merge with NetBSD make, pick up + o add unit tests for META MODE + o reduce memory allocation for dirSearchPath, GNode.parents, + GNode.children, OpenDirs + o reduce pointer indirection for GNode.cohorts and + GNode.implicitParents + o remove pointer indirection from GNode.commands + o inline Lst_ForEachUntil in meta mode + o dir.c: fix memory leak for lstat cache in -DCLEANUP mode + clean up memory management for CachedDirs + fix the reference count of dotLast going negative + add debug logging for OpenDirs_Done + extract CacheNewDir from Dir_AddDir + add debug logging for reference counting of CachedDir + rename some Dir functions to SearchPath + o job.c: rename some global variables + o main.c: reduce memory allocation in ReadBuiltinRules + reduce memory allocation in CmdOpts.create, CmdOpts.variables, + CmdOpts.makefiles + Add .MAKE.UID and .MAKE.GID + o make.c: reduce memory allocation for/in toBeMade, + Make_ProcessWait, Make_ExpandUse + o meta.c: reduce memory allocation in meta_oodate + o parse.c: reduce memory allocations for parsing dependencies and + targets + o suff.c: reduce memory allocation in suffix handling + +2020-11-24 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20201124 + Merge with NetBSD make, pick up + o .MAKE.{UID,GID} represent uid and gid running make. + o fix error handling for .BEGIN and .END dependency in -k mode + o fix missing "Stop." after failed .END node in -k mode + o use properly typed comparisons in boolean contexts + o replace a few HashTable_CreateEntry with HashTable_Set + o add HashSet type + o compat.c: split Compat_Make into smaller functions + extract DebugFailedTarget from Compat_RunCommand + o dir.c: refactor Dir_UpdateMTime + migrate CachedDir.files from HashTable to HashSet + o make.c: add high-level API for GNode.made + +2020-11-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20201122 + Merge with NetBSD make, pick up + o rename GNode.context to vars + o suff.c: cleanup and refactor + rename some functions and vars to better reflect usage + add high-level API for CandidateSearcher + o targ.c: add more debug logging for suffix handling + o more unit tests + o add debug logging for setting and resetting the main target + 2020-11-17 Simon J Gerraty * VERSION (_MAKE_VERSION): 20201117 Merge with NetBSD make, pick up - o fix some unit-tests when dash is .SHELL + o fix some unit-tests when .SHELL is dash o rename Targ_NewGN to GNode_New o make some GNode functions const o main.c: call Targ_Init before Var_Init diff --git a/FILES b/FILES index dedc29767658..8e2513e1c183 100644 --- a/FILES +++ b/FILES @@ -75,6 +75,8 @@ unit-tests/archive-suffix.exp unit-tests/archive-suffix.mk unit-tests/archive.exp unit-tests/archive.mk +unit-tests/cmd-errors-jobs.exp +unit-tests/cmd-errors-jobs.mk unit-tests/cmd-errors-lint.exp unit-tests/cmd-errors-lint.mk unit-tests/cmd-errors.exp @@ -87,6 +89,8 @@ unit-tests/cmdline.exp unit-tests/cmdline.mk unit-tests/comment.exp unit-tests/comment.mk +unit-tests/compat-error.exp +unit-tests/compat-error.mk unit-tests/cond-cmp-numeric-eq.exp unit-tests/cond-cmp-numeric-eq.mk unit-tests/cond-cmp-numeric-ge.exp @@ -105,6 +109,8 @@ unit-tests/cond-cmp-string.exp unit-tests/cond-cmp-string.mk unit-tests/cond-cmp-unary.exp unit-tests/cond-cmp-unary.mk +unit-tests/cond-eof.exp +unit-tests/cond-eof.mk unit-tests/cond-func-commands.exp unit-tests/cond-func-commands.mk unit-tests/cond-func-defined.exp @@ -113,6 +119,8 @@ unit-tests/cond-func-empty.exp unit-tests/cond-func-empty.mk unit-tests/cond-func-exists.exp unit-tests/cond-func-exists.mk +unit-tests/cond-func-make-main.exp +unit-tests/cond-func-make-main.mk unit-tests/cond-func-make.exp unit-tests/cond-func-make.mk unit-tests/cond-func-target.exp @@ -213,12 +221,22 @@ unit-tests/depsrc-wait.exp unit-tests/depsrc-wait.mk unit-tests/depsrc.exp unit-tests/depsrc.mk +unit-tests/deptgt-begin-fail-indirect.exp +unit-tests/deptgt-begin-fail-indirect.mk +unit-tests/deptgt-begin-fail.exp +unit-tests/deptgt-begin-fail.mk unit-tests/deptgt-begin.exp unit-tests/deptgt-begin.mk unit-tests/deptgt-default.exp unit-tests/deptgt-default.mk unit-tests/deptgt-delete_on_error.exp unit-tests/deptgt-delete_on_error.mk +unit-tests/deptgt-end-fail-all.exp +unit-tests/deptgt-end-fail-all.mk +unit-tests/deptgt-end-fail-indirect.exp +unit-tests/deptgt-end-fail-indirect.mk +unit-tests/deptgt-end-fail.exp +unit-tests/deptgt-end-fail.mk unit-tests/deptgt-end-jobs.exp unit-tests/deptgt-end-jobs.mk unit-tests/deptgt-end.exp @@ -279,6 +297,8 @@ unit-tests/directive-elifnmake.exp unit-tests/directive-elifnmake.mk unit-tests/directive-else.exp unit-tests/directive-else.mk +unit-tests/directive-endfor.exp +unit-tests/directive-endfor.mk unit-tests/directive-endif.exp unit-tests/directive-endif.mk unit-tests/directive-error.exp @@ -287,12 +307,22 @@ unit-tests/directive-export-env.exp unit-tests/directive-export-env.mk unit-tests/directive-export-gmake.exp unit-tests/directive-export-gmake.mk +unit-tests/directive-export-impl.exp +unit-tests/directive-export-impl.mk unit-tests/directive-export-literal.exp unit-tests/directive-export-literal.mk unit-tests/directive-export.exp unit-tests/directive-export.mk +unit-tests/directive-for-errors.exp +unit-tests/directive-for-errors.mk +unit-tests/directive-for-escape.exp +unit-tests/directive-for-escape.mk unit-tests/directive-for-generating-endif.exp unit-tests/directive-for-generating-endif.mk +unit-tests/directive-for-lines.exp +unit-tests/directive-for-lines.mk +unit-tests/directive-for-null.exp +unit-tests/directive-for-null.mk unit-tests/directive-for.exp unit-tests/directive-for.mk unit-tests/directive-hyphen-include.exp @@ -315,6 +345,8 @@ unit-tests/directive-include.exp unit-tests/directive-include.mk unit-tests/directive-info.exp unit-tests/directive-info.mk +unit-tests/directive-misspellings.exp +unit-tests/directive-misspellings.mk unit-tests/directive-sinclude.exp unit-tests/directive-sinclude.mk unit-tests/directive-undef.exp @@ -365,10 +397,18 @@ unit-tests/job-flags.exp unit-tests/job-flags.mk unit-tests/job-output-long-lines.exp unit-tests/job-output-long-lines.mk +unit-tests/jobs-error-indirect.exp +unit-tests/jobs-error-indirect.mk +unit-tests/jobs-error-nested-make.exp +unit-tests/jobs-error-nested-make.mk +unit-tests/jobs-error-nested.exp +unit-tests/jobs-error-nested.mk unit-tests/lint.exp unit-tests/lint.mk unit-tests/make-exported.exp unit-tests/make-exported.mk +unit-tests/meta-cmd-cmp.exp +unit-tests/meta-cmd-cmp.mk unit-tests/moderrs.exp unit-tests/moderrs.mk unit-tests/modmatch.exp @@ -447,14 +487,20 @@ unit-tests/opt-include-dir.exp unit-tests/opt-include-dir.mk unit-tests/opt-jobs-internal.exp unit-tests/opt-jobs-internal.mk +unit-tests/opt-jobs-no-action.exp +unit-tests/opt-jobs-no-action.mk unit-tests/opt-jobs.exp unit-tests/opt-jobs.mk +unit-tests/opt-keep-going-multiple.exp +unit-tests/opt-keep-going-multiple.mk unit-tests/opt-keep-going.exp unit-tests/opt-keep-going.mk unit-tests/opt-m-include-dir.exp unit-tests/opt-m-include-dir.mk unit-tests/opt-no-action-at-all.exp unit-tests/opt-no-action-at-all.mk +unit-tests/opt-no-action-runflags.exp +unit-tests/opt-no-action-runflags.mk unit-tests/opt-no-action.exp unit-tests/opt-no-action.mk unit-tests/opt-query.exp @@ -491,12 +537,14 @@ unit-tests/posix.exp unit-tests/posix.mk unit-tests/posix1.exp unit-tests/posix1.mk -unit-tests/qequals.exp -unit-tests/qequals.mk unit-tests/recursive.exp unit-tests/recursive.mk unit-tests/sh-dots.exp unit-tests/sh-dots.mk +unit-tests/sh-errctl.exp +unit-tests/sh-errctl.mk +unit-tests/sh-flags.exp +unit-tests/sh-flags.mk unit-tests/sh-jobs-error.exp unit-tests/sh-jobs-error.mk unit-tests/sh-jobs.exp @@ -529,14 +577,22 @@ unit-tests/suff-clear-regular.exp unit-tests/suff-clear-regular.mk unit-tests/suff-clear-single.exp unit-tests/suff-clear-single.mk +unit-tests/suff-incomplete.exp +unit-tests/suff-incomplete.mk unit-tests/suff-lookup.exp unit-tests/suff-lookup.mk +unit-tests/suff-main-several.exp +unit-tests/suff-main-several.mk unit-tests/suff-main.exp unit-tests/suff-main.mk +unit-tests/suff-phony.exp +unit-tests/suff-phony.mk unit-tests/suff-rebuild.exp unit-tests/suff-rebuild.mk unit-tests/suff-self.exp unit-tests/suff-self.mk +unit-tests/suff-transform-debug.exp +unit-tests/suff-transform-debug.mk unit-tests/suff-transform-endless.exp unit-tests/suff-transform-endless.mk unit-tests/suff-transform-expand.exp @@ -607,6 +663,8 @@ unit-tests/varmod-head.exp unit-tests/varmod-head.mk unit-tests/varmod-ifelse.exp unit-tests/varmod-ifelse.mk +unit-tests/varmod-indirect.exp +unit-tests/varmod-indirect.mk unit-tests/varmod-l-name-to-value.exp unit-tests/varmod-l-name-to-value.mk unit-tests/varmod-localtime.exp @@ -721,6 +779,8 @@ unit-tests/varname-dot-make-ppid.exp unit-tests/varname-dot-make-ppid.mk unit-tests/varname-dot-make-save_dollars.exp unit-tests/varname-dot-make-save_dollars.mk +unit-tests/varname-dot-makeflags.exp +unit-tests/varname-dot-makeflags.mk unit-tests/varname-dot-makeoverrides.exp unit-tests/varname-dot-makeoverrides.mk unit-tests/varname-dot-newline.exp diff --git a/LICENSE b/LICENSE index 283dd20cccd0..0d460e91d230 100644 --- a/LICENSE +++ b/LICENSE @@ -2,11 +2,11 @@ The individual files in this distribution are copyright their original contributors or assignees. Including: - Copyright (c) 1993-2020, Simon J Gerraty + Copyright (c) 1993-2021, Simon J Gerraty Copyright (c) 2020, Roland Illig Copyright (c) 2009-2016, Juniper Networks, Inc. Copyright (c) 2009, John Birrell. - Copyright (c) 1997-2020 The NetBSD Foundation, Inc. + Copyright (c) 1997-2021 The NetBSD Foundation, Inc. Copyright (c) 1998 Todd C. Miller Copyright (c) 1989 by Berkeley Softworks Copyright (c) 1988, 1989, 1990, 1992, 1993 diff --git a/PSD.doc/tutorial.ms b/PSD.doc/tutorial.ms index 814a09a62146..da17f950f2b5 100644 --- a/PSD.doc/tutorial.ms +++ b/PSD.doc/tutorial.ms @@ -1,4 +1,4 @@ -.\" $NetBSD: tutorial.ms,v 1.13 2017/03/01 13:05:11 kre Exp $ +.\" $NetBSD: tutorial.ms,v 1.14 2020/12/18 15:47:34 rillig Exp $ .\" Copyright (c) 1988, 1989, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -1918,15 +1918,15 @@ Suff_FindDeps (jive.c) applying .l -> .c to "jive.l" Suff_FindDeps (jive.l) Examining jive.l...modified 17:16:01 Oct 4, 1987...up-to-date -Examining jive.c...non-existent...out-of-date +Examining jive.c...nonexistent...out-of-date --- jive.c --- lex jive.l \&.\|.\|. meaningless lex output deleted .\|.\|. mv lex.yy.c jive.c -Examining jive.o...non-existent...out-of-date +Examining jive.o...nonexistent...out-of-date --- jive.o --- cc -c jive.c -Examining jive.out...non-existent...out-of-date +Examining jive.out...nonexistent...out-of-date --- jive.out --- cc -o jive.out jive.o .DE @@ -2871,7 +2871,7 @@ current directory. While people have suggested that PMake should read the directories each time, my experience suggests that the caching seldom causes problems. In addition, not caching the directories slows things down enormously because of PMake's attempts to apply transformation -rules through non-existent files \*- the number of extra file-system +rules through nonexistent files \*- the number of extra file-system searches is truly staggering, especially if many files without suffixes are used and the null suffix isn't changed from .CW .out . diff --git a/VERSION b/VERSION index 6dfd755ffdc8..70e0f68a60b0 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20201117 +_MAKE_VERSION=20210110 diff --git a/arch.c b/arch.c index 81552dee2bb9..037f6bc548cf 100644 --- a/arch.c +++ b/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.177 2020/11/14 21:29:44 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.193 2021/01/09 16:06:09 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -68,7 +68,8 @@ * SUCH DAMAGE. */ -/* Manipulate libraries, archives and their members. +/* + * Manipulate libraries, archives and their members. * * The first time an archive is referenced, all of its members' headers are * read and cached and the archive closed again. All cached archives are kept @@ -146,19 +147,19 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.177 2020/11/14 21:29:44 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.193 2021/01/09 16:06:09 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; -static ArchList *archives; /* The archives we've already examined */ +static ArchList archives; /* The archives we've already examined */ typedef struct Arch { - char *name; /* Name of archive */ - HashTable members; /* All the members of the archive described + char *name; /* Name of archive */ + HashTable members; /* All the members of the archive described * by key/value pairs */ - char *fnametab; /* Extended name table strings */ - size_t fnamesize; /* Size of the string table */ + char *fnametab; /* Extended name table strings */ + size_t fnamesize; /* Size of the string table */ } Arch; static FILE *ArchFindMember(const char *, const char *, @@ -200,240 +201,244 @@ static int ArchSVR4Entry(Arch *, char *, size_t, FILE *); static void ArchFree(void *ap) { - Arch *a = ap; - HashIter hi; - - /* Free memory from hash entries */ - HashIter_Init(&hi, &a->members); - while (HashIter_Next(&hi) != NULL) - free(hi.entry->value); - - free(a->name); - free(a->fnametab); - HashTable_Done(&a->members); - free(a); + Arch *a = ap; + HashIter hi; + + /* Free memory from hash entries */ + HashIter_Init(&hi, &a->members); + while (HashIter_Next(&hi) != NULL) + free(hi.entry->value); + + free(a->name); + free(a->fnametab); + HashTable_Done(&a->members); + free(a); } #endif /* * Parse an archive specification such as "archive.a(member1 member2.${EXT})", - * adding nodes for the expanded members to nodeLst. Nodes are created as + * adding nodes for the expanded members to gns. Nodes are created as * necessary. * * Input: * pp The start of the specification. - * nodeLst The list on which to place the nodes. + * gns The list on which to place the nodes. * ctxt The context in which to expand variables. * * Output: * return TRUE if it was a valid specification. * *pp Points to the first non-space after the archive spec. - * *nodeLst Nodes for the members have been added. */ Boolean -Arch_ParseArchive(char **pp, GNodeList *nodeLst, GNode *ctxt) +Arch_ParseArchive(char **pp, GNodeList *gns, GNode *ctxt) { - char *cp; /* Pointer into line */ - GNode *gn; /* New node */ - char *libName; /* Library-part of specification */ - char *libName_freeIt = NULL; - char *memName; /* Member-part of specification */ - char saveChar; /* Ending delimiter of member-name */ - Boolean expandLibName; /* Whether the parsed libName contains + char *cp; /* Pointer into line */ + GNode *gn; /* New node */ + MFStr libName; /* Library-part of specification */ + char *memName; /* Member-part of specification */ + char saveChar; /* Ending delimiter of member-name */ + Boolean expandLibName; /* Whether the parsed libName contains * variable expressions that need to be * expanded */ - libName = *pp; - expandLibName = FALSE; - - for (cp = libName; *cp != '(' && *cp != '\0';) { - if (*cp == '$') { - /* - * Variable spec, so call the Var module to parse the puppy - * so we can safely advance beyond it... - */ - const char *nested_p = cp; - void *result_freeIt; - const char *result; - Boolean isError; - - /* XXX: is expanded twice: once here and once below */ - (void)Var_Parse(&nested_p, ctxt, VARE_WANTRES | VARE_UNDEFERR, - &result, &result_freeIt); - /* TODO: handle errors */ - isError = result == var_Error; - free(result_freeIt); - if (isError) - return FALSE; - - expandLibName = TRUE; - cp += nested_p - cp; - } else - cp++; - } - - *cp++ = '\0'; - if (expandLibName) { - (void)Var_Subst(libName, ctxt, VARE_WANTRES | VARE_UNDEFERR, &libName); - /* TODO: handle errors */ - libName_freeIt = libName; - } - - - for (;;) { - /* - * First skip to the start of the member's name, mark that - * place and skip to the end of it (either white-space or - * a close paren). - */ - Boolean doSubst = FALSE; /* TRUE if need to substitute in memName */ - - pp_skip_whitespace(&cp); - - memName = cp; - while (*cp != '\0' && *cp != ')' && !ch_isspace(*cp)) { - if (*cp == '$') { - /* - * Variable spec, so call the Var module to parse the puppy - * so we can safely advance beyond it... - */ - void *freeIt; - const char *result; - Boolean isError; - const char *nested_p = cp; - - (void)Var_Parse(&nested_p, ctxt, VARE_WANTRES | VARE_UNDEFERR, - &result, &freeIt); - /* TODO: handle errors */ - isError = result == var_Error; - free(freeIt); - - if (isError) - return FALSE; - - doSubst = TRUE; - cp += nested_p - cp; - } else { - cp++; - } - } - - /* - * If the specification ends without a closing parenthesis, - * chances are there's something wrong (like a missing backslash), - * so it's better to return failure than allow such things to happen - */ - if (*cp == '\0') { *** 48397 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Jan 14 01:36:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F2204EF71F; Thu, 14 Jan 2021 01:36:30 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) (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 4DGRjn4r7Sz4YhK; Thu, 14 Jan 2021 01:36:29 +0000 (UTC) (envelope-from greg@unrelenting.technology) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unrelenting.technology; s=default; t=1610588187; 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=BjdzVQD0uwwq7faeYCr1Kr7GPiThK9ZnHmAT0cRwz3s=; b=bzBIDbVcrWPsXK5GV3fUHcAeF+ZXM4W0pkGBPWo27FuABk4ygkKwEoverNCPdJ5m+FcPqV ah019PRu5b9/TPfyJG9U/pV8YMC92L0ONfvaLiEHso2hpoo8Czo3S1Y643BYkZ1yr/69lz IaTHWYtWNZFFHbD+jkp/QAJao7kT5LA= From: myfreeweb To: John Baldwin , Konstantin Belousov CC: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 11d62b6f31ab - main - linuxkpi: add kernel_fpu_begin/kernel_fpu_end In-Reply-To: References: <202101121143.10CBh02x095972@gitrepo.freebsd.org> <20210113110826.46fbc900b3c375e7215a8195@bidouilliste.com> Message-ID: <171B7072-9BAE-46BB-82BA-4792AEBAD0EB@unrelenting.technology> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: greg@unrelenting.technology Date: Thu, 14 Jan 2021 01:36:27 GMT X-Rspamd-Queue-Id: 4DGRjn4r7Sz4YhK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 01:36:30 -0000 On January 13, 2021 8:58:58 PM UTC, John Baldwin wrote= : >On 1/13/21 3:42 AM, myfreeweb wrote: >>=20 >>=20 >> On January 13, 2021 10:08:26 AM UTC, Emmanuel Vadot wrote: >>> On Tue, 12 Jan 2021 15:16:55 +0200 >>> Konstantin Belousov wrote: >>> >>>> On Tue, Jan 12, 2021 at 11:43:00AM +0000, Emmanuel Vadot wrote: >>>>> The branch main has been updated by manu: >>>>> >>>>> URL: https://cgit=2EFreeBSD=2Eorg/src/commit/?id=3D11d62b6f31ab4e99d= f6d0c6c23406b57eaa37f41 >>>>> >>>>> commit 11d62b6f31ab4e99df6d0c6c23406b57eaa37f41 >>>>> Author: Emmanuel Vadot >>>>> AuthorDate: 2021-01-12 11:02:38 +0000 >>>>> Commit: Emmanuel Vadot >>>>> CommitDate: 2021-01-12 11:31:00 +0000 >>>>> >>>>> linuxkpi: add kernel_fpu_begin/kernel_fpu_end >>>>> =20 >>>>> With newer AMD GPUs (>=3DNavi,Renoir) there is FPU context usage= in the >>>>> amdgpu driver=2E >>>>> The `kernel_fpu_begin/end` implementations in drm did not even a= llow nested >>>>> begin-end blocks=2E >>>> >>>> Does Linux allow more then one thread to execute kernel_fpu_begin ? >>> >>> I actually have no idea, adding Greg to cc=2E >>=20 >> Looks like they save the context into the current thread state, so yes?= (drm doesn't need that) >>=20 >> Also they seem to do something FPU_KERN_NOCTX like (??) because they di= sable preemption inside these blocks=2E >> (Where does our NOCTX actually store the state?) > >It doesn't store at all because threads aren't allowed to sleep in a crit= ical >section, so the thread will never give up the CPU while in the FPU sectio= n=2E If >threads can voluntarily sleep (cv_wait*, *sleep(), etc=2E) while using >kernel_fpu_begin(), then NOCTX won't work and we will need something else= =2E Hmm but with no storage at all, how would it work from a syscall? The manpage does mention a "usermode save area" =E2=80=93 I was talking ab= out that=2E Linux kernel_fpu_begin starts with preempt_disable, so definitely no condv= ars and the like=2E No idea about simple time sleeps=2E But amdgpu doesn't = seem to do even that=2E >However, the code snippet from the stackoverflow URL I posted earlier loo= ks >exactly like the NOCTX case where we flush the user FPU state to the thre= ad >if the FPU state is "dirty" and then load a clean initial state for use b= y >the FPU=2E It would also seem to never save the kernel FPU state anywher= e by >counting on avoiding context switches=2E So, I think you probably should= just >make this use NOCTX=2E NOCTX was the first thing I've tried, and it didn't work, but probably jus= t because of the nesting=2E Haven't retried it with the nesting counter=2E Testing a bunch of things would be easier if I had one of the GPUs that us= e this code instead of having to ask someone else to test=E2=80=A6 From owner-dev-commits-src-all@freebsd.org Thu Jan 14 02:14:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E9F34D0DF5 for ; Thu, 14 Jan 2021 02: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGSYC1mBjz4btS; Thu, 14 Jan 2021 02: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 2F3142201C; Thu, 14 Jan 2021 02: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 10E2E7Fw092134; Thu, 14 Jan 2021 02: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 10E2E7TK092133; Thu, 14 Jan 2021 02:14:07 GMT (envelope-from git) Date: Thu, 14 Jan 2021 02:14:07 GMT Message-Id: <202101140214.10E2E7TK092133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 8b4f60165b7c - Create tag vendor/NetBSD/bmake/20210110 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/tags/vendor/NetBSD/bmake/20210110 X-Git-Reftype: annotated tag X-Git-Commit: 8b4f60165b7cc80cf8f17ef7a2be3d1cdd3bca71 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 02:14:07 -0000 The annotated tag vendor/NetBSD/bmake/20210110 has been created by sjg: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/NetBSD/bmake/20210110 tag vendor/NetBSD/bmake/20210110 Tagger: Simon J. Gerraty TaggerDate: 2021-01-14 01:24:52 +0000 Tag bmake-20210110 commit 8e11a9b4250be3c3379c45fa820bff78d99d5946 Author: Simon J. Gerraty AuthorDate: 2021-01-14 01:24:34 +0000 Commit: Simon J. Gerraty CommitDate: 2021-01-14 01:24:34 +0000 Import bmake-20210110 Quite a lot of churn on style, but lots of good work refactoring complicated functions and lots more unit-tests. Thanks mostly to rillig at NetBSD Some interesting entries from ChangeLog o .MAKE.{UID,GID} represent uid and gid running make. o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o add more unit tests for META MODE Change-Id: I4d3bcf08b4c864d98b343f602efe5a75dbfa7a94 From owner-dev-commits-src-all@freebsd.org Thu Jan 14 02:23:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 104B84D15C6; Thu, 14 Jan 2021 02:23: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 4DGSmC4j2cz4cbm; Thu, 14 Jan 2021 02:23: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 10E2NVIM060159 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 14 Jan 2021 04:23:34 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 10E2NVIM060159 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 10E2NVaZ060158; Thu, 14 Jan 2021 04:23:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Jan 2021 04:23:31 +0200 From: Konstantin Belousov To: myfreeweb Cc: John Baldwin , Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 11d62b6f31ab - main - linuxkpi: add kernel_fpu_begin/kernel_fpu_end Message-ID: References: <202101121143.10CBh02x095972@gitrepo.freebsd.org> <20210113110826.46fbc900b3c375e7215a8195@bidouilliste.com> <171B7072-9BAE-46BB-82BA-4792AEBAD0EB@unrelenting.technology> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <171B7072-9BAE-46BB-82BA-4792AEBAD0EB@unrelenting.technology> 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DGSmC4j2cz4cbm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 02:23:40 -0000 On Thu, Jan 14, 2021 at 01:36:27AM +0000, myfreeweb wrote: > > > On January 13, 2021 8:58:58 PM UTC, John Baldwin wrote: > >It doesn't store at all because threads aren't allowed to sleep in a critical > >section, so the thread will never give up the CPU while in the FPU section. If > >threads can voluntarily sleep (cv_wait*, *sleep(), etc.) while using > >kernel_fpu_begin(), then NOCTX won't work and we will need something else. > > Hmm but with no storage at all, how would it work from a syscall? > The manpage does mention a "usermode save area" – I was talking about that. There is a storage for the user state, always. When NOCTX is used, FPU state is spilled into the _current_ save area, and then kernel lives to the promise that the new state after fpu_enter(NOCTX) does not ever need to be saved. > > Linux kernel_fpu_begin starts with preempt_disable, so definitely no condvars and the like. No idea about simple time sleeps. But amdgpu doesn't seem to do even that. You should get enough assertions fired if something tries to context switch while entered NOCTX region. From owner-dev-commits-src-all@freebsd.org Thu Jan 14 05:58:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B17A4D625F; Thu, 14 Jan 2021 05:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGYWz1fsmz4pjs; Thu, 14 Jan 2021 05:58: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 2BB5E249EF; Thu, 14 Jan 2021 05:58: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 10E5wN2i079126; Thu, 14 Jan 2021 05:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10E5wMNW079125; Thu, 14 Jan 2021 05:58:22 GMT (envelope-from git) Date: Thu, 14 Jan 2021 05:58:22 GMT Message-Id: <202101140558.10E5wMNW079125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0495ed398c4f - main - contrib/lua: update to 5.4.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0495ed398c4f64013bab2327eb13a303e1f90c13 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 05:58:23 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0495ed398c4f64013bab2327eb13a303e1f90c13 commit 0495ed398c4f64013bab2327eb13a303e1f90c13 Merge: 7ae27c2d6c4f 0ea45b9cd43c Author: Kyle Evans AuthorDate: 2021-01-14 05:56:18 +0000 Commit: Kyle Evans CommitDate: 2021-01-14 05:56:18 +0000 contrib/lua: update to 5.4.2 Merge commit '0ea45b9cd43ce1247eb3eee9bfd5cee3d19068e7' into main contrib/lua/Makefile | 30 +- contrib/lua/README | 2 +- contrib/lua/doc/contents.html | 81 +- contrib/lua/doc/lua.1 | 93 +- contrib/lua/doc/manual.html | 3260 ++++++++++++++++++++++++++-------------- contrib/lua/doc/readme.html | 115 +- contrib/lua/src/Makefile | 83 +- contrib/lua/src/lapi.c | 706 +++++---- contrib/lua/src/lapi.h | 27 +- contrib/lua/src/lauxlib.c | 385 ++--- contrib/lua/src/lauxlib.h | 54 +- contrib/lua/src/lbaselib.c | 139 +- contrib/lua/src/lbitlib.c | 233 --- contrib/lua/src/lcode.c | 1141 ++++++++++---- contrib/lua/src/lcode.h | 34 +- contrib/lua/src/lcorolib.c | 89 +- contrib/lua/src/lctype.c | 43 +- contrib/lua/src/lctype.h | 18 +- contrib/lua/src/ldblib.c | 94 +- contrib/lua/src/ldebug.c | 462 ++++-- contrib/lua/src/ldebug.h | 21 +- contrib/lua/src/ldo.c | 559 +++---- contrib/lua/src/ldo.h | 38 +- contrib/lua/src/ldump.c | 197 +-- contrib/lua/src/lfunc.c | 223 ++- contrib/lua/src/lfunc.h | 50 +- contrib/lua/src/lgc.c | 1387 +++++++++++------ contrib/lua/src/lgc.h | 128 +- contrib/lua/src/linit.c | 7 +- contrib/lua/src/liolib.c | 121 +- contrib/lua/src/ljumptab.h | 112 ++ contrib/lua/src/llex.c | 74 +- contrib/lua/src/llex.h | 12 +- contrib/lua/src/llimits.h | 134 +- contrib/lua/src/lmathlib.c | 433 +++++- contrib/lua/src/lmem.c | 178 ++- contrib/lua/src/lmem.h | 72 +- contrib/lua/src/loadlib.c | 261 ++-- contrib/lua/src/lobject.c | 340 +++-- contrib/lua/src/lobject.h | 737 ++++++--- contrib/lua/src/lopcodes.c | 190 ++- contrib/lua/src/lopcodes.h | 401 +++-- contrib/lua/src/lopnames.h | 103 ++ contrib/lua/src/loslib.c | 85 +- contrib/lua/src/lparser.c | 967 ++++++++---- contrib/lua/src/lparser.h | 80 +- contrib/lua/src/lprefix.h | 4 +- contrib/lua/src/lstate.c | 221 ++- contrib/lua/src/lstate.h | 202 ++- contrib/lua/src/lstring.c | 135 +- contrib/lua/src/lstring.h | 22 +- contrib/lua/src/lstrlib.c | 504 +++++-- contrib/lua/src/ltable.c | 692 ++++++--- contrib/lua/src/ltable.h | 22 +- contrib/lua/src/ltablib.c | 52 +- contrib/lua/src/ltm.c | 173 ++- contrib/lua/src/ltm.h | 37 +- contrib/lua/src/lua.c | 439 +++--- contrib/lua/src/lua.h | 60 +- contrib/lua/src/luac.c | 470 ++++-- contrib/lua/src/luaconf.h.dist | 253 ++-- contrib/lua/src/lualib.h | 5 +- contrib/lua/src/lundump.c | 266 ++-- contrib/lua/src/lundump.h | 8 +- contrib/lua/src/lutf8lib.c | 117 +- contrib/lua/src/lvm.c | 1762 ++++++++++++++-------- contrib/lua/src/lvm.h | 91 +- contrib/lua/src/lzio.c | 2 +- contrib/lua/src/lzio.h | 2 +- lib/liblua/Makefile | 2 +- lib/liblua/luaconf.h | 248 ++- stand/liblua/luaconf.h | 244 ++- 72 files changed, 12945 insertions(+), 7087 deletions(-) diff --cc contrib/lua/Makefile index a2820e04fe24,000000000000..36447a0f61c7 mode 100644,000000..100644 --- a/contrib/lua/Makefile +++ b/contrib/lua/Makefile @@@ -1,114 -1,0 +1,106 @@@ +# Makefile for installing Lua +# See doc/readme.html for installation and customization instructions. + +# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + +# Your platform. See PLATS for possible values. - PLAT= none ++PLAT= guess + +# Where to install. The installation starts in the src and doc directories, +# so take care if INSTALL_TOP is not an absolute path. See the local target. +# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with +# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. +INSTALL_TOP= /usr/local +INSTALL_BIN= $(INSTALL_TOP)/bin +INSTALL_INC= $(INSTALL_TOP)/include +INSTALL_LIB= $(INSTALL_TOP)/lib +INSTALL_MAN= $(INSTALL_TOP)/man/man1 +INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V +INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V + +# How to install. If your install program does not support "-p", then +# you may have to run ranlib on the installed liblua.a. +INSTALL= install -p +INSTALL_EXEC= $(INSTALL) -m 0755 +INSTALL_DATA= $(INSTALL) -m 0644 +# +# If you don't have "install" you can use "cp" instead. +# INSTALL= cp -p +# INSTALL_EXEC= $(INSTALL) +# INSTALL_DATA= $(INSTALL) + +# Other utilities. +MKDIR= mkdir -p +RM= rm -f + +# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= + +# Convenience platforms targets. - PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris ++PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris + +# What to install. +TO_BIN= lua luac +TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp +TO_LIB= liblua.a +TO_MAN= lua.1 luac.1 + +# Lua version and release. - V= 5.3 - R= $V.6 ++V= 5.4 ++R= $V.2 + +# Targets start here. +all: $(PLAT) + - $(PLATS) clean: - cd src && $(MAKE) $@ - - test: dummy - src/lua -v ++$(PLATS) help test clean: ++ @cd src && $(MAKE) $@ + +install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + +uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) + cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC) + cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB) + cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN) + +local: + $(MAKE) install INSTALL_TOP=../install + - none: - @echo "Please do 'make PLATFORM' where PLATFORM is one of these:" - @echo " $(PLATS)" - @echo "See doc/readme.html for complete instructions." - - # make may get confused with test/ and install/ ++# make may get confused with install/ if it does not support .PHONY. +dummy: + - # echo config parameters ++# Echo config parameters. +echo: + @cd src && $(MAKE) -s echo + @echo "PLAT= $(PLAT)" + @echo "V= $V" + @echo "R= $R" + @echo "TO_BIN= $(TO_BIN)" + @echo "TO_INC= $(TO_INC)" + @echo "TO_LIB= $(TO_LIB)" + @echo "TO_MAN= $(TO_MAN)" + @echo "INSTALL_TOP= $(INSTALL_TOP)" + @echo "INSTALL_BIN= $(INSTALL_BIN)" + @echo "INSTALL_INC= $(INSTALL_INC)" + @echo "INSTALL_LIB= $(INSTALL_LIB)" + @echo "INSTALL_MAN= $(INSTALL_MAN)" + @echo "INSTALL_LMOD= $(INSTALL_LMOD)" + @echo "INSTALL_CMOD= $(INSTALL_CMOD)" + @echo "INSTALL_EXEC= $(INSTALL_EXEC)" + @echo "INSTALL_DATA= $(INSTALL_DATA)" + - # echo pkg-config data ++# Echo pkg-config data. +pc: + @echo "version=$R" + @echo "prefix=$(INSTALL_TOP)" + @echo "libdir=$(INSTALL_LIB)" + @echo "includedir=$(INSTALL_INC)" + - # list targets that do not create files (but not all makes understand .PHONY) - .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho ++# Targets that do not create files (not all makes understand .PHONY). ++.PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc + +# (end of Makefile) diff --cc contrib/lua/README index f8bdb6f41d00,000000000000..bc8a9d737d26 mode 100644,000000..100644 --- a/contrib/lua/README +++ b/contrib/lua/README @@@ -1,6 -1,0 +1,6 @@@ + - This is Lua 5.3.6, released on 14 Sep 2020. ++This is Lua 5.4.2, released on 13 Nov 2020. + +For installation instructions, license details, and +further information about Lua, see doc/readme.html. + diff --cc contrib/lua/src/ljumptab.h index 000000000000,8306f250ccb6..8306f250ccb6 mode 000000,100644..100644 --- a/contrib/lua/src/ljumptab.h +++ b/contrib/lua/src/ljumptab.h diff --cc contrib/lua/src/lopnames.h index 000000000000,965cec9bf2fa..965cec9bf2fa mode 000000,100644..100644 --- a/contrib/lua/src/lopnames.h +++ b/contrib/lua/src/lopnames.h diff --cc contrib/lua/src/lstrlib.c index 28064960818f,000000000000..ed88abdb4db2 mode 100644,000000..100644 --- a/contrib/lua/src/lstrlib.c +++ b/contrib/lua/src/lstrlib.c @@@ -1,1605 -1,0 +1,1825 @@@ +/* - ** $Id: lstrlib.c,v 1.254.1.1 2017/04/19 17:29:57 roberto Exp $ ++** $Id: lstrlib.c $ +** Standard library for string operations and pattern-matching +** See Copyright Notice in lua.h +*/ + +#define lstrlib_c +#define LUA_LIB + +#include "lprefix.h" + + +#include +#include +#include +#include ++#include +#include +#include +#include +#include + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +/* +** maximum number of captures that a pattern can do during +** pattern-matching. This limit is arbitrary, but must fit in +** an unsigned char. +*/ +#if !defined(LUA_MAXCAPTURES) +#define LUA_MAXCAPTURES 32 +#endif + + +/* macro to 'unsign' a character */ +#define uchar(c) ((unsigned char)(c)) + + +/* +** Some sizes are better limited to fit in 'int', but must also fit in +** 'size_t'. (We assume that 'lua_Integer' cannot be smaller than 'int'.) +*/ +#define MAX_SIZET ((size_t)(~(size_t)0)) + +#define MAXSIZE \ + (sizeof(size_t) < sizeof(int) ? MAX_SIZET : (size_t)(INT_MAX)) + + + + +static int str_len (lua_State *L) { + size_t l; + luaL_checklstring(L, 1, &l); + lua_pushinteger(L, (lua_Integer)l); + return 1; +} + + - /* translate a relative string position: negative means back from end */ - static lua_Integer posrelat (lua_Integer pos, size_t len) { - if (pos >= 0) return pos; - else if (0u - (size_t)pos > len) return 0; - else return (lua_Integer)len + pos + 1; ++/* ++** translate a relative initial string position ++** (negative means back from end): clip result to [1, inf). ++** The length of any string in Lua must fit in a lua_Integer, ++** so there are no overflows in the casts. ++** The inverted comparison avoids a possible overflow ++** computing '-pos'. ++*/ ++static size_t posrelatI (lua_Integer pos, size_t len) { ++ if (pos > 0) ++ return (size_t)pos; ++ else if (pos == 0) ++ return 1; ++ else if (pos < -(lua_Integer)len) /* inverted comparison */ ++ return 1; /* clip to 1 */ ++ else return len + (size_t)pos + 1; ++} ++ ++ ++/* ++** Gets an optional ending string position from argument 'arg', ++** with default value 'def'. ++** Negative means back from end: clip result to [0, len] ++*/ ++static size_t getendpos (lua_State *L, int arg, lua_Integer def, ++ size_t len) { ++ lua_Integer pos = luaL_optinteger(L, arg, def); ++ if (pos > (lua_Integer)len) ++ return len; ++ else if (pos >= 0) ++ return (size_t)pos; ++ else if (pos < -(lua_Integer)len) ++ return 0; ++ else return len + (size_t)pos + 1; +} + + +static int str_sub (lua_State *L) { + size_t l; + const char *s = luaL_checklstring(L, 1, &l); - lua_Integer start = posrelat(luaL_checkinteger(L, 2), l); - lua_Integer end = posrelat(luaL_optinteger(L, 3, -1), l); - if (start < 1) start = 1; - if (end > (lua_Integer)l) end = l; ++ size_t start = posrelatI(luaL_checkinteger(L, 2), l); ++ size_t end = getendpos(L, 3, -1, l); + if (start <= end) - lua_pushlstring(L, s + start - 1, (size_t)(end - start) + 1); ++ lua_pushlstring(L, s + start - 1, (end - start) + 1); + else lua_pushliteral(L, ""); + return 1; +} + + +static int str_reverse (lua_State *L) { + size_t l, i; + luaL_Buffer b; + const char *s = luaL_checklstring(L, 1, &l); + char *p = luaL_buffinitsize(L, &b, l); + for (i = 0; i < l; i++) + p[i] = s[l - i - 1]; + luaL_pushresultsize(&b, l); + return 1; +} + + +static int str_lower (lua_State *L) { + size_t l; + size_t i; + luaL_Buffer b; + const char *s = luaL_checklstring(L, 1, &l); + char *p = luaL_buffinitsize(L, &b, l); + for (i=0; i MAXSIZE / n) /* may overflow? */ + return luaL_error(L, "resulting string too large"); + else { + size_t totallen = (size_t)n * l + (size_t)(n - 1) * lsep; + luaL_Buffer b; + char *p = luaL_buffinitsize(L, &b, totallen); + while (n-- > 1) { /* first n-1 copies (followed by separator) */ + memcpy(p, s, l * sizeof(char)); p += l; + if (lsep > 0) { /* empty 'memcpy' is not that cheap */ + memcpy(p, sep, lsep * sizeof(char)); + p += lsep; + } + } + memcpy(p, s, l * sizeof(char)); /* last copy (not followed by separator) */ + luaL_pushresultsize(&b, totallen); + } + return 1; +} + + +static int str_byte (lua_State *L) { + size_t l; + const char *s = luaL_checklstring(L, 1, &l); - lua_Integer posi = posrelat(luaL_optinteger(L, 2, 1), l); - lua_Integer pose = posrelat(luaL_optinteger(L, 3, posi), l); ++ lua_Integer pi = luaL_optinteger(L, 2, 1); ++ size_t posi = posrelatI(pi, l); ++ size_t pose = getendpos(L, 3, pi, l); + int n, i; - if (posi < 1) posi = 1; - if (pose > (lua_Integer)l) pose = l; + if (posi > pose) return 0; /* empty interval; return no values */ - if (pose - posi >= INT_MAX) /* arithmetic overflow? */ ++ if (pose - posi >= (size_t)INT_MAX) /* arithmetic overflow? */ + return luaL_error(L, "string slice too long"); + n = (int)(pose - posi) + 1; + luaL_checkstack(L, n, "string slice too long"); + for (i=0; iinit) { ++ state->init = 1; ++ luaL_buffinit(L, &state->B); ++ } ++ luaL_addlstring(&state->B, (const char *)b, size); + return 0; +} + + +static int str_dump (lua_State *L) { - luaL_Buffer b; ++ struct str_Writer state; + int strip = lua_toboolean(L, 2); + luaL_checktype(L, 1, LUA_TFUNCTION); - lua_settop(L, 1); - luaL_buffinit(L,&b); - if (lua_dump(L, writer, &b, strip) != 0) ++ lua_settop(L, 1); /* ensure function is on the top of the stack */ ++ state.init = 0; ++ if (lua_dump(L, writer, &state, strip) != 0) + return luaL_error(L, "unable to dump given function"); - luaL_pushresult(&b); ++ luaL_pushresult(&state.B); + return 1; +} + + + ++/* ++** {====================================================== ++** METAMETHODS ++** ======================================================= ++*/ ++ ++#if defined(LUA_NOCVTS2N) /* { */ ++ ++/* no coercion from strings to numbers */ ++ ++static const luaL_Reg stringmetamethods[] = { ++ {"__index", NULL}, /* placeholder */ ++ {NULL, NULL} ++}; ++ ++#else /* }{ */ ++ ++static int tonum (lua_State *L, int arg) { ++ if (lua_type(L, arg) == LUA_TNUMBER) { /* already a number? */ ++ lua_pushvalue(L, arg); ++ return 1; ++ } ++ else { /* check whether it is a numerical string */ ++ size_t len; ++ const char *s = lua_tolstring(L, arg, &len); ++ return (s != NULL && lua_stringtonumber(L, s) == len + 1); ++ } ++} ++ ++ ++static void trymt (lua_State *L, const char *mtname) { ++ lua_settop(L, 2); /* back to the original arguments */ ++ if (lua_type(L, 2) == LUA_TSTRING || !luaL_getmetafield(L, 2, mtname)) ++ luaL_error(L, "attempt to %s a '%s' with a '%s'", mtname + 2, ++ luaL_typename(L, -2), luaL_typename(L, -1)); ++ lua_insert(L, -3); /* put metamethod before arguments */ ++ lua_call(L, 2, 1); /* call metamethod */ ++} ++ ++ ++static int arith (lua_State *L, int op, const char *mtname) { ++ if (tonum(L, 1) && tonum(L, 2)) ++ lua_arith(L, op); /* result will be on the top */ ++ else ++ trymt(L, mtname); ++ return 1; ++} ++ ++ ++static int arith_add (lua_State *L) { ++ return arith(L, LUA_OPADD, "__add"); ++} ++ ++static int arith_sub (lua_State *L) { ++ return arith(L, LUA_OPSUB, "__sub"); ++} ++ ++static int arith_mul (lua_State *L) { ++ return arith(L, LUA_OPMUL, "__mul"); ++} ++ ++static int arith_mod (lua_State *L) { ++ return arith(L, LUA_OPMOD, "__mod"); ++} ++ ++static int arith_pow (lua_State *L) { ++ return arith(L, LUA_OPPOW, "__pow"); ++} ++ ++static int arith_div (lua_State *L) { ++ return arith(L, LUA_OPDIV, "__div"); ++} ++ ++static int arith_idiv (lua_State *L) { ++ return arith(L, LUA_OPIDIV, "__idiv"); ++} ++ ++static int arith_unm (lua_State *L) { ++ return arith(L, LUA_OPUNM, "__unm"); ++} ++ ++ ++static const luaL_Reg stringmetamethods[] = { ++ {"__add", arith_add}, ++ {"__sub", arith_sub}, ++ {"__mul", arith_mul}, ++ {"__mod", arith_mod}, ++ {"__pow", arith_pow}, ++ {"__div", arith_div}, ++ {"__idiv", arith_idiv}, ++ {"__unm", arith_unm}, ++ {"__index", NULL}, /* placeholder */ ++ {NULL, NULL} ++}; ++ ++#endif /* } */ ++ ++/* }====================================================== */ ++ +/* +** {====================================================== +** PATTERN MATCHING +** ======================================================= +*/ + + +#define CAP_UNFINISHED (-1) +#define CAP_POSITION (-2) + + +typedef struct MatchState { + const char *src_init; /* init of source string */ + const char *src_end; /* end ('\0') of source string */ + const char *p_end; /* end ('\0') of pattern */ + lua_State *L; + int matchdepth; /* control for recursive depth (to avoid C stack overflow) */ + unsigned char level; /* total number of captures (finished or unfinished) */ + struct { + const char *init; + ptrdiff_t len; + } capture[LUA_MAXCAPTURES]; +} MatchState; + + +/* recursive function */ +static const char *match (MatchState *ms, const char *s, const char *p); + + +/* maximum recursion depth for 'match' */ +#if !defined(MAXCCALLS) +#define MAXCCALLS 200 +#endif + + +#define L_ESC '%' +#define SPECIALS "^$*+?.([%-" + + +static int check_capture (MatchState *ms, int l) { + l -= '1'; + if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED) + return luaL_error(ms->L, "invalid capture index %%%d", l + 1); + return l; +} + + +static int capture_to_close (MatchState *ms) { + int level = ms->level; + for (level--; level>=0; level--) + if (ms->capture[level].len == CAP_UNFINISHED) return level; + return luaL_error(ms->L, "invalid pattern capture"); +} + + +static const char *classend (MatchState *ms, const char *p) { + switch (*p++) { + case L_ESC: { + if (p == ms->p_end) + luaL_error(ms->L, "malformed pattern (ends with '%%')"); + return p+1; + } + case '[': { + if (*p == '^') p++; + do { /* look for a ']' */ + if (p == ms->p_end) + luaL_error(ms->L, "malformed pattern (missing ']')"); + if (*(p++) == L_ESC && p < ms->p_end) + p++; /* skip escapes (e.g. '%]') */ + } while (*p != ']'); + return p+1; + } + default: { + return p; + } + } +} + + +static int match_class (int c, int cl) { + int res; + switch (tolower(cl)) { + case 'a' : res = isalpha(c); break; + case 'c' : res = iscntrl(c); break; + case 'd' : res = isdigit(c); break; + case 'g' : res = isgraph(c); break; + case 'l' : res = islower(c); break; + case 'p' : res = ispunct(c); break; + case 's' : res = isspace(c); break; + case 'u' : res = isupper(c); break; + case 'w' : res = isalnum(c); break; + case 'x' : res = isxdigit(c); break; + case 'z' : res = (c == 0); break; /* deprecated option */ + default: return (cl == c); + } + return (islower(cl) ? res : !res); +} + + +static int matchbracketclass (int c, const char *p, const char *ec) { + int sig = 1; + if (*(p+1) == '^') { + sig = 0; + p++; /* skip the '^' */ + } + while (++p < ec) { + if (*p == L_ESC) { + p++; + if (match_class(c, uchar(*p))) + return sig; + } + else if ((*(p+1) == '-') && (p+2 < ec)) { + p+=2; + if (uchar(*(p-2)) <= c && c <= uchar(*p)) + return sig; + } + else if (uchar(*p) == c) return sig; + } + return !sig; +} + + +static int singlematch (MatchState *ms, const char *s, const char *p, + const char *ep) { + if (s >= ms->src_end) + return 0; + else { + int c = uchar(*s); + switch (*p) { + case '.': return 1; /* matches any char */ + case L_ESC: return match_class(c, uchar(*(p+1))); + case '[': return matchbracketclass(c, p, ep-1); + default: return (uchar(*p) == c); + } + } +} + + +static const char *matchbalance (MatchState *ms, const char *s, + const char *p) { + if (p >= ms->p_end - 1) + luaL_error(ms->L, "malformed pattern (missing arguments to '%%b')"); + if (*s != *p) return NULL; + else { + int b = *p; + int e = *(p+1); + int cont = 1; + while (++s < ms->src_end) { + if (*s == e) { + if (--cont == 0) return s+1; + } + else if (*s == b) cont++; + } + } + return NULL; /* string ends out of balance */ +} + + +static const char *max_expand (MatchState *ms, const char *s, + const char *p, const char *ep) { + ptrdiff_t i = 0; /* counts maximum expand for item */ + while (singlematch(ms, s + i, p, ep)) + i++; + /* keeps trying to match with the maximum repetitions */ + while (i>=0) { + const char *res = match(ms, (s+i), ep+1); + if (res) return res; + i--; /* else didn't match; reduce 1 repetition to try again */ + } + return NULL; +} + + +static const char *min_expand (MatchState *ms, const char *s, + const char *p, const char *ep) { + for (;;) { + const char *res = match(ms, s, ep+1); + if (res != NULL) + return res; + else if (singlematch(ms, s, p, ep)) + s++; /* try with one more repetition */ + else return NULL; + } +} + + +static const char *start_capture (MatchState *ms, const char *s, + const char *p, int what) { + const char *res; + int level = ms->level; + if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures"); + ms->capture[level].init = s; + ms->capture[level].len = what; + ms->level = level+1; + if ((res=match(ms, s, p)) == NULL) /* match failed? */ + ms->level--; /* undo capture */ + return res; +} + + +static const char *end_capture (MatchState *ms, const char *s, + const char *p) { + int l = capture_to_close(ms); + const char *res; + ms->capture[l].len = s - ms->capture[l].init; /* close capture */ + if ((res = match(ms, s, p)) == NULL) /* match failed? */ + ms->capture[l].len = CAP_UNFINISHED; /* undo capture */ + return res; +} + + +static const char *match_capture (MatchState *ms, const char *s, int l) { + size_t len; + l = check_capture(ms, l); + len = ms->capture[l].len; + if ((size_t)(ms->src_end-s) >= len && + memcmp(ms->capture[l].init, s, len) == 0) + return s+len; + else return NULL; +} + + +static const char *match (MatchState *ms, const char *s, const char *p) { + if (ms->matchdepth-- == 0) + luaL_error(ms->L, "pattern too complex"); + init: /* using goto's to optimize tail recursion */ + if (p != ms->p_end) { /* end of pattern? */ + switch (*p) { + case '(': { /* start capture */ + if (*(p + 1) == ')') /* position capture? */ + s = start_capture(ms, s, p + 2, CAP_POSITION); + else + s = start_capture(ms, s, p + 1, CAP_UNFINISHED); + break; + } + case ')': { /* end capture */ + s = end_capture(ms, s, p + 1); + break; + } + case '$': { + if ((p + 1) != ms->p_end) /* is the '$' the last char in pattern? */ + goto dflt; /* no; go to default */ + s = (s == ms->src_end) ? s : NULL; /* check end of string */ + break; + } + case L_ESC: { /* escaped sequences not in the format class[*+?-]? */ + switch (*(p + 1)) { + case 'b': { /* balanced string? */ + s = matchbalance(ms, s, p + 2); + if (s != NULL) { + p += 4; goto init; /* return match(ms, s, p + 4); */ + } /* else fail (s == NULL) */ + break; + } + case 'f': { /* frontier? */ + const char *ep; char previous; + p += 2; + if (*p != '[') + luaL_error(ms->L, "missing '[' after '%%f' in pattern"); + ep = classend(ms, p); /* points to what is next */ + previous = (s == ms->src_init) ? '\0' : *(s - 1); + if (!matchbracketclass(uchar(previous), p, ep - 1) && + matchbracketclass(uchar(*s), p, ep - 1)) { + p = ep; goto init; /* return match(ms, s, ep); */ + } + s = NULL; /* match failed */ + break; + } + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + case '8': case '9': { /* capture results (%0-%9)? */ + s = match_capture(ms, s, uchar(*(p + 1))); + if (s != NULL) { + p += 2; goto init; /* return match(ms, s, p + 2) */ + } + break; + } + default: goto dflt; + } + break; + } + default: dflt: { /* pattern class plus optional suffix */ + const char *ep = classend(ms, p); /* points to optional suffix */ + /* does not match at least once? */ + if (!singlematch(ms, s, p, ep)) { + if (*ep == '*' || *ep == '?' || *ep == '-') { /* accept empty? */ + p = ep + 1; goto init; /* return match(ms, s, ep + 1); */ + } + else /* '+' or no suffix */ + s = NULL; /* fail */ + } + else { /* matched once */ + switch (*ep) { /* handle optional suffix */ + case '?': { /* optional */ + const char *res; + if ((res = match(ms, s + 1, ep + 1)) != NULL) + s = res; + else { + p = ep + 1; goto init; /* else return match(ms, s, ep + 1); */ + } + break; + } + case '+': /* 1 or more repetitions */ + s++; /* 1 match already done */ + /* FALLTHROUGH */ + case '*': /* 0 or more repetitions */ + s = max_expand(ms, s, p, ep); + break; + case '-': /* 0 or more repetitions (minimum) */ + s = min_expand(ms, s, p, ep); + break; + default: /* no suffix */ + s++; p = ep; goto init; /* return match(ms, s + 1, ep); */ + } + } + break; + } + } + } + ms->matchdepth++; + return s; +} + + + +static const char *lmemfind (const char *s1, size_t l1, + const char *s2, size_t l2) { + if (l2 == 0) return s1; /* empty strings are everywhere */ + else if (l2 > l1) return NULL; /* avoids a negative 'l1' */ + else { + const char *init; /* to search for a '*s2' inside 's1' */ + l2--; /* 1st char will be checked by 'memchr' */ + l1 = l1-l2; /* 's2' cannot be found after that */ + while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) { + init++; /* 1st char is already checked */ + if (memcmp(init, s2+1, l2) == 0) + return init-1; + else { /* correct 'l1' and 's1' to try again */ + l1 -= init-s1; + s1 = init; + } + } + return NULL; /* not found */ + } +} + + - static void push_onecapture (MatchState *ms, int i, const char *s, - const char *e) { ++/* ++** get information about the i-th capture. If there are no captures ++** and 'i==0', return information about the whole match, which ++** is the range 's'..'e'. If the capture is a string, return ++** its length and put its address in '*cap'. If it is an integer ++** (a position), push it on the stack and return CAP_POSITION. ++*/ ++static size_t get_onecapture (MatchState *ms, int i, const char *s, ++ const char *e, const char **cap) { + if (i >= ms->level) { - if (i == 0) /* ms->level == 0, too */ - lua_pushlstring(ms->L, s, e - s); /* add whole match */ - else ++ if (i != 0) + luaL_error(ms->L, "invalid capture index %%%d", i + 1); ++ *cap = s; ++ return e - s; + } + else { *** 6490 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Jan 14 06:22:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E55F64D6B1F; Thu, 14 Jan 2021 06:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGZ3X5pz2z4r9W; Thu, 14 Jan 2021 06: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 BA2A425508; Thu, 14 Jan 2021 06: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 10E6MGwQ018195; Thu, 14 Jan 2021 06: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 10E6MGAx018193; Thu, 14 Jan 2021 06:22:16 GMT (envelope-from git) Date: Thu, 14 Jan 2021 06:22:16 GMT Message-Id: <202101140622.10E6MGAx018193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 06b9b3e0ad0d - main - Merge bmake-20210110 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 06:22:17 -0000 The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527 commit 06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527 Merge: 0495ed398c4f 8e11a9b4250b Author: Simon J. Gerraty AuthorDate: 2021-01-14 06:21:37 +0000 Commit: Simon J. Gerraty CommitDate: 2021-01-14 06:21:37 +0000 Merge bmake-20210110 Quite a lot of churn on style, but lots of good work refactoring complicated functions and lots more unit-tests. Thanks mostly to rillig at NetBSD Some interesting entries from ChangeLog o .MAKE.{UID,GID} represent uid and gid running make. o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o add more unit tests for META MODE Merge commit '8e11a9b4250be3c3379c45fa820bff78d99d5946' into main Change-Id: I464fd4c013067f0915671c1ccc96d2d8090b2b9c contrib/bmake/ChangeLog | 241 +- contrib/bmake/FILES | 64 +- contrib/bmake/LICENSE | 4 +- contrib/bmake/PSD.doc/tutorial.ms | 10 +- contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 1323 ++--- contrib/bmake/bmake.1 | 18 +- contrib/bmake/bmake.cat1 | 248 +- contrib/bmake/buf.c | 139 +- contrib/bmake/buf.h | 28 +- contrib/bmake/compat.c | 932 +-- contrib/bmake/cond.c | 1611 +++--- contrib/bmake/dir.c | 2047 ++++--- contrib/bmake/dir.h | 36 +- contrib/bmake/enum.c | 11 +- contrib/bmake/enum.h | 69 +- contrib/bmake/filemon/filemon.h | 6 +- contrib/bmake/filemon/filemon_dev.c | 6 +- contrib/bmake/filemon/filemon_ktrace.c | 79 +- contrib/bmake/for.c | 633 +- contrib/bmake/hash.c | 41 +- contrib/bmake/hash.h | 72 +- contrib/bmake/import.sh | 87 + contrib/bmake/job.c | 3893 +++++++------ contrib/bmake/job.h | 84 +- contrib/bmake/lst.c | 304 +- contrib/bmake/lst.h | 88 +- contrib/bmake/main.c | 364 +- contrib/bmake/make-conf.h | 20 +- contrib/bmake/make.1 | 18 +- contrib/bmake/make.c | 1825 +++--- contrib/bmake/make.h | 812 +-- contrib/bmake/make_malloc.c | 7 +- contrib/bmake/make_malloc.h | 12 +- contrib/bmake/meta.c | 359 +- contrib/bmake/meta.h | 4 +- contrib/bmake/metachar.h | 4 +- contrib/bmake/mk/ChangeLog | 39 + contrib/bmake/mk/dirdeps-options.mk | 5 +- contrib/bmake/mk/dirdeps-targets.mk | 7 +- contrib/bmake/mk/dirdeps.mk | 25 +- contrib/bmake/mk/init.mk | 17 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/meta.subdir.mk | 4 +- contrib/bmake/mk/mkopt.sh | 0 contrib/bmake/mk/own.mk | 6 +- contrib/bmake/mk/sys.mk | 6 +- contrib/bmake/nonints.h | 278 +- contrib/bmake/os.sh | 0 contrib/bmake/parse.c | 4058 ++++++------- contrib/bmake/pathnames.h | 15 +- contrib/bmake/str.c | 15 +- contrib/bmake/suff.c | 2897 +++++----- contrib/bmake/targ.c | 568 +- contrib/bmake/trace.c | 16 +- contrib/bmake/trace.h | 6 +- contrib/bmake/unit-tests/Makefile | 159 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 9 + contrib/bmake/unit-tests/cmd-errors-jobs.mk | 32 + contrib/bmake/unit-tests/cmd-errors.mk | 4 +- contrib/bmake/unit-tests/cmdline.mk | 2 +- contrib/bmake/unit-tests/compat-error.exp | 15 + contrib/bmake/unit-tests/compat-error.mk | 37 + contrib/bmake/unit-tests/cond-eof.exp | 9 + contrib/bmake/unit-tests/cond-eof.mk | 20 + contrib/bmake/unit-tests/cond-func-empty.mk | 27 +- contrib/bmake/unit-tests/cond-func-exists.mk | 11 +- contrib/bmake/unit-tests/cond-func-make-main.exp | 3 + contrib/bmake/unit-tests/cond-func-make-main.mk | 62 + contrib/bmake/unit-tests/cond-short.exp | 12 +- contrib/bmake/unit-tests/cond-short.mk | 64 +- contrib/bmake/unit-tests/cond-token-string.exp | 2 +- contrib/bmake/unit-tests/dep-percent.exp | 5 +- contrib/bmake/unit-tests/depsrc-meta.exp | 4 + contrib/bmake/unit-tests/depsrc-meta.mk | 27 +- contrib/bmake/unit-tests/depsrc-optional.exp | 18 +- contrib/bmake/unit-tests/depsrc.exp | 3 + contrib/bmake/unit-tests/depsrc.mk | 17 +- .../unit-tests/deptgt-begin-fail-indirect.exp | 6 + .../bmake/unit-tests/deptgt-begin-fail-indirect.mk | 16 + contrib/bmake/unit-tests/deptgt-begin-fail.exp | 6 + contrib/bmake/unit-tests/deptgt-begin-fail.mk | 10 + contrib/bmake/unit-tests/deptgt-end-fail-all.exp | 7 + contrib/bmake/unit-tests/deptgt-end-fail-all.mk | 19 + .../bmake/unit-tests/deptgt-end-fail-indirect.exp | 7 + .../bmake/unit-tests/deptgt-end-fail-indirect.mk | 16 + contrib/bmake/unit-tests/deptgt-end-fail.exp | 163 + contrib/bmake/unit-tests/deptgt-end-fail.mk | 69 + contrib/bmake/unit-tests/deptgt-suffixes.exp | 26 + contrib/bmake/unit-tests/deptgt-suffixes.mk | 23 +- contrib/bmake/unit-tests/deptgt.exp | 1 + contrib/bmake/unit-tests/deptgt.mk | 10 +- contrib/bmake/unit-tests/directive-elif.exp | 32 +- contrib/bmake/unit-tests/directive-elif.mk | 126 +- contrib/bmake/unit-tests/directive-else.exp | 16 +- contrib/bmake/unit-tests/directive-else.mk | 15 +- contrib/bmake/unit-tests/directive-endfor.exp | 4 + contrib/bmake/unit-tests/directive-endfor.mk | 9 + contrib/bmake/unit-tests/directive-endif.exp | 9 +- contrib/bmake/unit-tests/directive-endif.mk | 28 +- contrib/bmake/unit-tests/directive-error.mk | 6 +- contrib/bmake/unit-tests/directive-export-env.mk | 4 +- contrib/bmake/unit-tests/directive-export-impl.exp | 56 + contrib/bmake/unit-tests/directive-export-impl.mk | 62 + .../bmake/unit-tests/directive-export-literal.mk | 4 +- contrib/bmake/unit-tests/directive-export.exp | 5 +- contrib/bmake/unit-tests/directive-export.mk | 16 +- contrib/bmake/unit-tests/directive-for-errors.exp | 22 + contrib/bmake/unit-tests/directive-for-errors.mk | 75 + contrib/bmake/unit-tests/directive-for-escape.exp | 74 + contrib/bmake/unit-tests/directive-for-escape.mk | 96 + contrib/bmake/unit-tests/directive-for-lines.exp | 10 + contrib/bmake/unit-tests/directive-for-lines.mk | 32 + contrib/bmake/unit-tests/directive-for-null.exp | 10 + contrib/bmake/unit-tests/directive-for-null.mk | 19 + contrib/bmake/unit-tests/directive-for.exp | 7 +- contrib/bmake/unit-tests/directive-for.mk | 9 +- contrib/bmake/unit-tests/directive-if.exp | 6 +- contrib/bmake/unit-tests/directive-if.mk | 14 +- contrib/bmake/unit-tests/directive-include.mk | 5 +- contrib/bmake/unit-tests/directive-info.exp | 23 +- contrib/bmake/unit-tests/directive-info.mk | 18 +- .../bmake/unit-tests/directive-misspellings.exp | 45 + contrib/bmake/unit-tests/directive-misspellings.mk | 79 + contrib/bmake/unit-tests/directive-undef.exp | 3 +- contrib/bmake/unit-tests/directive-undef.mk | 85 +- .../bmake/unit-tests/directive-unexport-env.exp | 19 +- contrib/bmake/unit-tests/directive-unexport-env.mk | 19 +- contrib/bmake/unit-tests/directive-unexport.exp | 13 +- contrib/bmake/unit-tests/directive-unexport.mk | 12 +- contrib/bmake/unit-tests/directive-warning.exp | 16 +- contrib/bmake/unit-tests/directive-warning.mk | 10 +- contrib/bmake/unit-tests/jobs-error-indirect.exp | 8 + contrib/bmake/unit-tests/jobs-error-indirect.mk | 21 + .../bmake/unit-tests/jobs-error-nested-make.exp | 11 + contrib/bmake/unit-tests/jobs-error-nested-make.mk | 20 + contrib/bmake/unit-tests/jobs-error-nested.exp | 15 + contrib/bmake/unit-tests/jobs-error-nested.mk | 20 + contrib/bmake/unit-tests/make-exported.mk | 2 +- contrib/bmake/unit-tests/meta-cmd-cmp.exp | 37 + contrib/bmake/unit-tests/meta-cmd-cmp.mk | 52 + contrib/bmake/unit-tests/modmisc.exp | 1 - contrib/bmake/unit-tests/modmisc.mk | 29 +- contrib/bmake/unit-tests/opt-chdir.exp | 4 +- contrib/bmake/unit-tests/opt-debug-errors.exp | 5 +- contrib/bmake/unit-tests/opt-debug-graph1.exp | 36 + contrib/bmake/unit-tests/opt-debug-jobs.exp | 4 +- contrib/bmake/unit-tests/opt-debug-lint.exp | 3 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 15 +- contrib/bmake/unit-tests/opt-file.exp | 13 +- contrib/bmake/unit-tests/opt-file.mk | 101 +- contrib/bmake/unit-tests/opt-jobs-no-action.exp | 61 + contrib/bmake/unit-tests/opt-jobs-no-action.mk | 102 + .../bmake/unit-tests/opt-keep-going-multiple.exp | 9 + .../bmake/unit-tests/opt-keep-going-multiple.mk | 21 + contrib/bmake/unit-tests/opt-keep-going.exp | 5 +- contrib/bmake/unit-tests/opt-keep-going.mk | 6 +- .../bmake/unit-tests/opt-no-action-runflags.exp | 34 + contrib/bmake/unit-tests/opt-no-action-runflags.mk | 32 + contrib/bmake/unit-tests/opt.exp | 4 + contrib/bmake/unit-tests/posix.exp | 5 +- contrib/bmake/unit-tests/qequals.exp | 2 - contrib/bmake/unit-tests/qequals.mk | 8 - contrib/bmake/unit-tests/sh-dots.exp | 12 +- contrib/bmake/unit-tests/sh-errctl.exp | 27 + contrib/bmake/unit-tests/sh-errctl.mk | 26 + contrib/bmake/unit-tests/sh-flags.exp | 4325 ++++++++++++++ contrib/bmake/unit-tests/sh-flags.mk | 138 + contrib/bmake/unit-tests/sh-jobs.exp | 7 +- contrib/bmake/unit-tests/sh-jobs.mk | 34 +- contrib/bmake/unit-tests/sh-meta-chars.mk | 17 +- contrib/bmake/unit-tests/shell-csh.mk | 6 +- contrib/bmake/unit-tests/suff-add-later.exp | 8 +- contrib/bmake/unit-tests/suff-clear-regular.exp | 5 +- contrib/bmake/unit-tests/suff-clear-regular.mk | 3 +- contrib/bmake/unit-tests/suff-clear-single.exp | 5 +- contrib/bmake/unit-tests/suff-incomplete.exp | 42 + contrib/bmake/unit-tests/suff-incomplete.mk | 31 + contrib/bmake/unit-tests/suff-lookup.exp | 21 +- contrib/bmake/unit-tests/suff-main-several.exp | 141 + contrib/bmake/unit-tests/suff-main-several.mk | 42 + contrib/bmake/unit-tests/suff-phony.exp | 13 + contrib/bmake/unit-tests/suff-phony.mk | 21 + contrib/bmake/unit-tests/suff-rebuild.exp | 76 +- contrib/bmake/unit-tests/suff-rebuild.mk | 23 +- contrib/bmake/unit-tests/suff-self.exp | 5 +- contrib/bmake/unit-tests/suff-transform-debug.exp | 62 + contrib/bmake/unit-tests/suff-transform-debug.mk | 12 + .../bmake/unit-tests/suff-transform-endless.exp | 44 +- contrib/bmake/unit-tests/suff-transform-endless.mk | 9 +- contrib/bmake/unit-tests/suff-transform-expand.exp | 5 +- contrib/bmake/unit-tests/suff-transform-select.exp | 45 +- contrib/bmake/unit-tests/suff-transform-select.mk | 7 +- contrib/bmake/unit-tests/use-inference.exp | 5 +- contrib/bmake/unit-tests/use-inference.mk | 6 +- contrib/bmake/unit-tests/var-op-default.mk | 72 +- contrib/bmake/unit-tests/var-op-expand.exp | 9 - contrib/bmake/unit-tests/var-op-expand.mk | 191 +- contrib/bmake/unit-tests/vardebug.exp | 2 +- contrib/bmake/unit-tests/varmisc.mk | 14 +- contrib/bmake/unit-tests/varmod-defined.exp | 18 +- contrib/bmake/unit-tests/varmod-edge.exp | 41 +- contrib/bmake/unit-tests/varmod-extension.exp | 1 + contrib/bmake/unit-tests/varmod-extension.mk | 4 +- contrib/bmake/unit-tests/varmod-gmtime.exp | 40 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 197 +- contrib/bmake/unit-tests/varmod-head.exp | 1 + contrib/bmake/unit-tests/varmod-head.mk | 4 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 4 + contrib/bmake/unit-tests/varmod-ifelse.mk | 20 +- contrib/bmake/unit-tests/varmod-indirect.exp | 59 + contrib/bmake/unit-tests/varmod-indirect.mk | 157 + contrib/bmake/unit-tests/varmod-localtime.exp | 40 +- contrib/bmake/unit-tests/varmod-localtime.mk | 196 +- contrib/bmake/unit-tests/varmod-range.exp | 9 +- contrib/bmake/unit-tests/varmod-root.exp | 1 + contrib/bmake/unit-tests/varmod-root.mk | 4 +- contrib/bmake/unit-tests/varmod-subst-regex.exp | 2 + contrib/bmake/unit-tests/varmod-subst-regex.mk | 7 +- contrib/bmake/unit-tests/varmod-sysv.exp | 4 +- contrib/bmake/unit-tests/varmod-sysv.mk | 16 +- contrib/bmake/unit-tests/varmod-tail.exp | 1 + contrib/bmake/unit-tests/varmod-tail.mk | 4 +- contrib/bmake/unit-tests/varmod-to-many-words.mk | 16 +- contrib/bmake/unit-tests/varmod-to-one-word.mk | 16 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 2 - contrib/bmake/unit-tests/varmod.exp | 2 +- contrib/bmake/unit-tests/varmod.mk | 4 +- contrib/bmake/unit-tests/varname-dot-makeflags.exp | 3 + contrib/bmake/unit-tests/varname-dot-makeflags.mk | 15 + contrib/bmake/unit-tests/varname-dot-shell.exp | 2 +- .../varname-make_print_var_on_error-jobs.exp | 5 +- .../varname-make_print_var_on_error-jobs.mk | 15 +- .../unit-tests/varname-make_print_var_on_error.exp | 3 +- .../unit-tests/varname-make_print_var_on_error.mk | 15 +- contrib/bmake/unit-tests/varname-makeflags.mk | 24 +- contrib/bmake/unit-tests/varparse-dynamic.mk | 12 +- contrib/bmake/unit-tests/varparse-errors.exp | 6 +- contrib/bmake/unit-tests/varparse-errors.mk | 18 +- contrib/bmake/util.c | 91 +- contrib/bmake/var.c | 6056 ++++++++++---------- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 159 +- 243 files changed, 24413 insertions(+), 14581 deletions(-) diff --cc contrib/bmake/import.sh index 000000000000,d4554a078951..d4554a078951 mode 000000,100755..100755 --- a/contrib/bmake/import.sh +++ b/contrib/bmake/import.sh diff --cc contrib/bmake/job.c index 052b9290f9f3,000000000000..d43761ca80ff mode 100644,000000..100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@@ -1,2853 -1,0 +1,3016 @@@ - /* $NetBSD: job.c,v 1.326 2020/11/16 18:28:27 rillig Exp $ */ ++/* $NetBSD: job.c,v 1.397 2021/01/10 23:59:53 rillig Exp $ */ + +/* + * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Adam de Boor. + * + * 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. + */ + +/* + * Copyright (c) 1988, 1989 by Adam de Boor + * Copyright (c) 1989 by Berkeley Softworks + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Adam de Boor. + * + * 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. + */ + +/*- + * job.c -- + * handle the creation etc. of our child processes. + * + * Interface: + * Job_Init Called to initialize this module. In addition, + * any commands attached to the .BEGIN target + * are executed before this function returns. + * Hence, the makefiles must have been parsed + * before this function is called. + * + * Job_End Clean up any memory used. + * + * Job_Make Start the creation of the given target. + * + * Job_CatchChildren + * Check for and handle the termination of any + * children. This must be called reasonably + * frequently to keep the whole make going at + * a decent clip, since job table entries aren't + * removed until their process is caught this way. + * + * Job_CatchOutput + * Print any output our children have produced. + * Should also be called fairly frequently to + * keep the user informed of what's going on. + * If no output is waiting, it will block for + * a time given by the SEL_* constants, below, + * or until output is ready. + * + * Job_ParseShell Given the line following a .SHELL target, parse + * the line as a shell specification. Returns + * FALSE if the spec was incorrect. + * + * Job_Finish Perform any final processing which needs doing. + * This includes the execution of any commands + * which have been/were attached to the .END + * target. It should only be called when the + * job table is empty. + * + * Job_AbortAll Abort all currently running jobs. It doesn't + * handle output or do anything for the jobs, + * just kills them. It should only be called in + * an emergency. + * + * Job_CheckCommands + * Verify that the commands for a target are + * ok. Provide them if necessary and possible. + * + * Job_Touch Update a target without really updating it. + * + * Job_Wait Wait for all currently-running jobs to finish. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#include +#include +#include +#include +#include "wait.h" + +#include +#if !defined(USE_SELECT) && defined(HAVE_POLL_H) +#include +#else +#ifndef USE_SELECT /* no poll.h */ +# define USE_SELECT +#endif +#if defined(HAVE_SYS_SELECT_H) +# include +#endif +#endif +#include +#include +#if defined(HAVE_SYS_SOCKET_H) +# include +#endif + +#include "make.h" +#include "dir.h" +#include "job.h" +#include "pathnames.h" +#include "trace.h" + +/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ - MAKE_RCSID("$NetBSD: job.c,v 1.326 2020/11/16 18:28:27 rillig Exp $"); ++MAKE_RCSID("$NetBSD: job.c,v 1.397 2021/01/10 23:59:53 rillig Exp $"); + - /* A shell defines how the commands are run. All commands for a target are ++/* ++ * A shell defines how the commands are run. All commands for a target are + * written into a single file, which is then given to the shell to execute + * the commands from it. The commands are written to the file using a few + * templates for echo control and error control. + * + * The name of the shell is the basename for the predefined shells, such as + * "sh", "csh", "bash". For custom shells, it is the full pathname, and its + * basename is used to select the type of shell; the longest match wins. + * So /usr/pkg/bin/bash has type sh, /usr/local/bin/tcsh has type csh. + * + * The echoing of command lines is controlled using hasEchoCtl, echoOff, + * echoOn, noPrint and noPrintLen. When echoOff is executed by the shell, it + * still outputs something, but this something is not interesting, therefore + * it is filtered out using noPrint and noPrintLen. + * + * The error checking for individual commands is controlled using hasErrCtl, - * errOnOrEcho, errOffOrExecIgnore and errExit. ++ * errOn, errOff and runChkTmpl. + * - * If a shell doesn't have error control, errOnOrEcho becomes a printf template - * for echoing the command, should echoing be on; errOffOrExecIgnore becomes ++ * If a shell doesn't have error control, echoTmpl becomes a printf template ++ * for echoing the command, should echoing be on; runIgnTmpl becomes + * another printf template for executing the command while ignoring the return - * status. Finally errExit is a printf template for running the command and ++ * status. Finally runChkTmpl is a printf template for running the command and + * causing the shell to exit on error. If any of these strings are empty when + * hasErrCtl is FALSE, the command will be executed anyway as is, and if it + * causes an error, so be it. Any templates set up to echo the command will + * escape any '$ ` \ "' characters in the command string to avoid common + * problems with echo "%s\n" as a template. + * + * The command-line flags "echo" and "exit" also control the behavior. The + * "echo" flag causes the shell to start echoing commands right away. The + * "exit" flag causes the shell to exit when an error is detected in one of + * the commands. + */ +typedef struct Shell { + - /* The name of the shell. For Bourne and C shells, this is used only to - * find the shell description when used as the single source of a .SHELL - * target. For user-defined shells, this is the full path of the shell. */ - const char *name; ++ /* ++ * The name of the shell. For Bourne and C shells, this is used only ++ * to find the shell description when used as the single source of a ++ * .SHELL target. For user-defined shells, this is the full path of ++ * the shell. ++ */ ++ const char *name; + - Boolean hasEchoCtl; /* True if both echoOff and echoOn defined */ - const char *echoOff; /* command to turn off echo */ - const char *echoOn; /* command to turn it back on again */ - const char *noPrint; /* text to skip when printing output from ++ Boolean hasEchoCtl; /* whether both echoOff and echoOn are there */ ++ const char *echoOff; /* command to turn echoing off */ ++ const char *echoOn; /* command to turn echoing back on */ ++ const char *noPrint; /* text to skip when printing output from the + * shell. This is usually the same as echoOff */ - size_t noPrintLen; /* length of noPrint command */ ++ size_t noPrintLen; /* length of noPrint command */ ++ ++ Boolean hasErrCtl; /* whether error checking can be controlled ++ * for individual commands */ ++ const char *errOn; /* command to turn on error checking */ ++ const char *errOff; /* command to turn off error checking */ ++ ++ const char *echoTmpl; /* template to echo a command */ ++ const char *runIgnTmpl; /* template to run a command ++ * without error checking */ ++ const char *runChkTmpl; /* template to run a command ++ * with error checking */ ++ ++ /* string literal that results in a newline character when it appears ++ * outside of any 'quote' or "quote" characters */ ++ const char *newline; ++ char commentChar; /* character used by shell for comment lines */ ++ ++ const char *echoFlag; /* shell flag to echo commands */ ++ const char *errFlag; /* shell flag to exit on error */ ++} Shell; + - Boolean hasErrCtl; /* set if can control error checking for - * individual commands */ - /* XXX: split into errOn and echoCmd */ - const char *errOnOrEcho; /* template to turn on error checking */ - /* XXX: split into errOff and execIgnore */ - const char *errOffOrExecIgnore; /* template to turn off error checking */ - const char *errExit; /* template to use for testing exit code */ ++typedef struct CommandFlags { ++ /* Whether to echo the command before running it. */ ++ Boolean echo; + - /* string literal that results in a newline character when it appears - * outside of any 'quote' or "quote" characters */ - const char *newline; - char commentChar; /* character used by shell for comment lines */ ++ /* Run the command even in -n or -N mode. */ ++ Boolean always; + - /* - * command-line flags - */ - const char *echo; /* echo commands */ - const char *exit; /* exit on error */ - } Shell; ++ /* ++ * true if we turned error checking off before printing the command ++ * and need to turn it back on ++ */ ++ Boolean ignerr; ++} CommandFlags; ++ ++/* ++ * Write shell commands to a file. ++ * ++ * TODO: keep track of whether commands are echoed. ++ * TODO: keep track of whether error checking is active. ++ */ ++typedef struct ShellWriter { ++ FILE *f; ++ ++ /* we've sent 'set -x' */ ++ Boolean xtraced; ++ ++} ShellWriter; + +/* + * FreeBSD: traditionally .MAKE is not required to + * pass jobs queue to sub-makes. + * Use .MAKE.ALWAYS_PASS_JOB_QUEUE=no to disable. + */ +#define MAKE_ALWAYS_PASS_JOB_QUEUE ".MAKE.ALWAYS_PASS_JOB_QUEUE" +static int Always_pass_job_queue = TRUE; +/* + * FreeBSD: aborting entire parallel make isn't always + * desired. When doing tinderbox for example, failure of + * one architecture should not stop all. + * We still want to bail on interrupt though. + */ +#define MAKE_JOB_ERROR_TOKEN "MAKE_JOB_ERROR_TOKEN" +static int Job_error_token = TRUE; + +/* + * error handling variables + */ - static int errors = 0; /* number of errors reported */ ++static int job_errors = 0; /* number of errors reported */ +typedef enum AbortReason { /* why is the make aborting? */ - ABORT_NONE, - ABORT_ERROR, /* Because of an error */ - ABORT_INTERRUPT, /* Because it was interrupted */ - ABORT_WAIT /* Waiting for jobs to finish */ ++ ABORT_NONE, ++ ABORT_ERROR, /* Because of an error */ ++ ABORT_INTERRUPT, /* Because it was interrupted */ ++ ABORT_WAIT /* Waiting for jobs to finish */ +} AbortReason; +static AbortReason aborting = ABORT_NONE; - #define JOB_TOKENS "+EI+" /* Token to requeue for each abort state */ ++#define JOB_TOKENS "+EI+" /* Token to requeue for each abort state */ + +/* + * this tracks the number of tokens currently "out" to build jobs. + */ +int jobTokensRunning = 0; + - /* The number of commands actually printed to the shell commands file for - * the current job. Should this number be 0, no shell will be executed. */ - static int numCommands; - +typedef enum JobStartResult { - JOB_RUNNING, /* Job is running */ - JOB_ERROR, /* Error in starting the job */ - JOB_FINISHED /* The job is already finished */ ++ JOB_RUNNING, /* Job is running */ ++ JOB_ERROR, /* Error in starting the job */ ++ JOB_FINISHED /* The job is already finished */ +} JobStartResult; + +/* + * Descriptions for various shells. + * + * The build environment may set DEFSHELL_INDEX to one of + * DEFSHELL_INDEX_SH, DEFSHELL_INDEX_KSH, or DEFSHELL_INDEX_CSH, to + * select one of the predefined shells as the default shell. + * + * Alternatively, the build environment may set DEFSHELL_CUSTOM to the + * name or the full path of a sh-compatible shell, which will be used as + * the default shell. + * + * ".SHELL" lines in Makefiles can choose the default shell from the + * set defined here, or add additional shells. + */ + +#ifdef DEFSHELL_CUSTOM +#define DEFSHELL_INDEX_CUSTOM 0 +#define DEFSHELL_INDEX_SH 1 +#define DEFSHELL_INDEX_KSH 2 +#define DEFSHELL_INDEX_CSH 3 +#else /* !DEFSHELL_CUSTOM */ +#define DEFSHELL_INDEX_SH 0 +#define DEFSHELL_INDEX_KSH 1 +#define DEFSHELL_INDEX_CSH 2 +#endif /* !DEFSHELL_CUSTOM */ + +#ifndef DEFSHELL_INDEX +#define DEFSHELL_INDEX 0 /* DEFSHELL_INDEX_CUSTOM or DEFSHELL_INDEX_SH */ +#endif /* !DEFSHELL_INDEX */ + - static Shell shells[] = { ++static Shell shells[] = { +#ifdef DEFSHELL_CUSTOM + /* + * An sh-compatible shell with a non-standard name. + * + * Keep this in sync with the "sh" description below, but avoid + * non-portable features that might not be supplied by all + * sh-compatible shells. + */ - { - DEFSHELL_CUSTOM, /* .name */ - FALSE, /* .hasEchoCtl */ - "", /* .echoOff */ - "", /* .echoOn */ - "", /* .noPrint */ - 0, /* .noPrintLen */ - FALSE, /* .hasErrCtl */ - "echo \"%s\"\n", /* .errOnOrEcho */ - "%s\n", /* .errOffOrExecIgnore */ - "{ %s \n} || exit $?\n", /* .errExit */ - "'\n'", /* .newline */ - '#', /* .commentChar */ - "", /* .echo */ - "", /* .exit */ - }, ++ { ++ DEFSHELL_CUSTOM, /* .name */ ++ FALSE, /* .hasEchoCtl */ ++ "", /* .echoOff */ ++ "", /* .echoOn */ ++ "", /* .noPrint */ ++ 0, /* .noPrintLen */ ++ FALSE, /* .hasErrCtl */ ++ "", /* .errOn */ ++ "", /* .errOff */ ++ "echo \"%s\"\n", /* .echoTmpl */ ++ "%s\n", /* .runIgnTmpl */ ++ "{ %s \n} || exit $?\n", /* .runChkTmpl */ ++ "'\n'", /* .newline */ ++ '#', /* .commentChar */ ++ "", /* .echoFlag */ ++ "", /* .errFlag */ ++ }, +#endif /* DEFSHELL_CUSTOM */ + /* + * SH description. Echo control is also possible and, under + * sun UNIX anyway, one can even control error checking. + */ - { - "sh", /* .name */ - FALSE, /* .hasEchoCtl */ - "", /* .echoOff */ - "", /* .echoOn */ - "", /* .noPrint */ - 0, /* .noPrintLen */ - FALSE, /* .hasErrCtl */ - "echo \"%s\"\n", /* .errOnOrEcho */ - "%s\n", /* .errOffOrExecIgnore */ - "{ %s \n} || exit $?\n", /* .errExit */ - "'\n'", /* .newline */ - '#', /* .commentChar*/ ++ { ++ "sh", /* .name */ ++ FALSE, /* .hasEchoCtl */ ++ "", /* .echoOff */ ++ "", /* .echoOn */ ++ "", /* .noPrint */ ++ 0, /* .noPrintLen */ ++ FALSE, /* .hasErrCtl */ ++ "", /* .errOn */ ++ "", /* .errOff */ ++ "echo \"%s\"\n", /* .echoTmpl */ ++ "%s\n", /* .runIgnTmpl */ ++ "{ %s \n} || exit $?\n", /* .runChkTmpl */ ++ "'\n'", /* .newline */ ++ '#', /* .commentChar*/ +#if defined(MAKE_NATIVE) && defined(__NetBSD__) - "q", /* .echo */ ++ /* XXX: -q is not really echoFlag, it's more like noEchoInSysFlag. */ ++ "q", /* .echoFlag */ +#else - "", /* .echo */ ++ "", /* .echoFlag */ +#endif - "", /* .exit */ - }, ++ "", /* .errFlag */ ++ }, + /* + * KSH description. + */ - { - "ksh", /* .name */ - TRUE, /* .hasEchoCtl */ - "set +v", /* .echoOff */ - "set -v", /* .echoOn */ - "set +v", /* .noPrint */ - 6, /* .noPrintLen */ - FALSE, /* .hasErrCtl */ - "echo \"%s\"\n", /* .errOnOrEcho */ - "%s\n", /* .errOffOrExecIgnore */ - "{ %s \n} || exit $?\n", /* .errExit */ - "'\n'", /* .newline */ - '#', /* .commentChar */ - "v", /* .echo */ - "", /* .exit */ - }, ++ { ++ "ksh", /* .name */ ++ TRUE, /* .hasEchoCtl */ ++ "set +v", /* .echoOff */ ++ "set -v", /* .echoOn */ ++ "set +v", /* .noPrint */ ++ 6, /* .noPrintLen */ ++ FALSE, /* .hasErrCtl */ ++ "", /* .errOn */ ++ "", /* .errOff */ ++ "echo \"%s\"\n", /* .echoTmpl */ ++ "%s\n", /* .runIgnTmpl */ ++ "{ %s \n} || exit $?\n", /* .runChkTmpl */ ++ "'\n'", /* .newline */ ++ '#', /* .commentChar */ ++ "v", /* .echoFlag */ ++ "", /* .errFlag */ ++ }, + /* + * CSH description. The csh can do echo control by playing + * with the setting of the 'echo' shell variable. Sadly, + * however, it is unable to do error control nicely. + */ - { - "csh", /* .name */ - TRUE, /* .hasEchoCtl */ - "unset verbose", /* .echoOff */ - "set verbose", /* .echoOn */ - "unset verbose", /* .noPrint */ - 13, /* .noPrintLen */ - FALSE, /* .hasErrCtl */ - "echo \"%s\"\n", /* .errOnOrEcho */ - /* XXX: Mismatch between errOn and execIgnore */ - "csh -c \"%s || exit 0\"\n", /* .errOffOrExecIgnore */ - "", /* .errExit */ - "'\\\n'", /* .newline */ - '#', /* .commentChar */ - "v", /* .echo */ - "e", /* .exit */ - } ++ { ++ "csh", /* .name */ ++ TRUE, /* .hasEchoCtl */ ++ "unset verbose", /* .echoOff */ ++ "set verbose", /* .echoOn */ ++ "unset verbose", /* .noPrint */ ++ 13, /* .noPrintLen */ ++ FALSE, /* .hasErrCtl */ ++ "", /* .errOn */ ++ "", /* .errOff */ ++ "echo \"%s\"\n", /* .echoTmpl */ ++ "csh -c \"%s || exit 0\"\n", /* .runIgnTmpl */ ++ "", /* .runChkTmpl */ ++ "'\\\n'", /* .newline */ ++ '#', /* .commentChar */ ++ "v", /* .echoFlag */ ++ "e", /* .errFlag */ ++ } +}; + - /* This is the shell to which we pass all commands in the Makefile. - * It is set by the Job_ParseShell function. */ - static Shell *commandShell = &shells[DEFSHELL_INDEX]; ++/* ++ * This is the shell to which we pass all commands in the Makefile. ++ * It is set by the Job_ParseShell function. ++ */ ++static Shell *shell = &shells[DEFSHELL_INDEX]; +const char *shellPath = NULL; /* full pathname of executable image */ +const char *shellName = NULL; /* last component of shellPath */ +char *shellErrFlag = NULL; +static char *shellArgv = NULL; /* Custom shell args */ + + +static Job *job_table; /* The structures that describe them */ +static Job *job_table_end; /* job_table + maxJobs */ +static unsigned int wantToken; /* we want a token */ +static Boolean lurking_children = FALSE; - static Boolean make_suspended = FALSE; /* Whether we've seen a SIGTSTP (etc) */ ++static Boolean make_suspended = FALSE; /* Whether we've seen a SIGTSTP (etc) */ + +/* + * Set of descriptors of pipes connected to + * the output channels of children + */ +static struct pollfd *fds = NULL; - static Job **jobfds = NULL; - static nfds_t nfds = 0; ++static Job **allJobs = NULL; ++static nfds_t nJobs = 0; +static void watchfd(Job *); +static void clearfd(Job *); - static int readyfd(Job *); ++static Boolean readyfd(Job *); + - static GNode *lastNode; /* The node for which output was most recently - * produced. */ - static char *targPrefix = NULL; /* What we print at the start of TARG_FMT */ ++static char *targPrefix = NULL; /* To identify a job change in the output. */ +static Job tokenWaitJob; /* token wait pseudo-job */ + +static Job childExitJob; /* child exit pseudo-job */ - #define CHILD_EXIT "." - #define DO_JOB_RESUME "R" ++#define CHILD_EXIT "." ++#define DO_JOB_RESUME "R" + - enum { npseudojobs = 2 }; /* number of pseudo-jobs */ - - #define TARG_FMT "%s %s ---\n" /* Default format */ - #define MESSAGE(fp, gn) \ - if (opts.maxJobs != 1 && targPrefix && *targPrefix) \ - (void)fprintf(fp, TARG_FMT, targPrefix, gn->name) ++enum { ++ npseudojobs = 2 /* number of pseudo-jobs */ ++}; + +static sigset_t caught_signals; /* Set of signals we handle */ + +static void JobDoOutput(Job *, Boolean); - static void JobInterrupt(int, int) MAKE_ATTR_DEAD; ++static void JobInterrupt(Boolean, int) MAKE_ATTR_DEAD; +static void JobRestartJobs(void); +static void JobSigReset(void); + ++static void ++SwitchOutputTo(GNode *gn) ++{ ++ /* The node for which output was most recently produced. */ ++ static GNode *lastNode = NULL; ++ ++ if (gn == lastNode) ++ return; ++ lastNode = gn; ++ ++ if (opts.maxJobs != 1 && targPrefix != NULL && targPrefix[0] != '\0') ++ (void)fprintf(stdout, "%s %s ---\n", targPrefix, gn->name); ++} ++ +static unsigned +nfds_per_job(void) +{ +#if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV) - if (useMeta) - return 2; ++ if (useMeta) ++ return 2; +#endif - return 1; ++ return 1; ++} ++ ++void ++Job_FlagsToString(const Job *job, char *buf, size_t bufsize) ++{ ++ snprintf(buf, bufsize, "%c%c%c", ++ job->ignerr ? 'i' : '-', ++ !job->echo ? 's' : '-', ++ job->special ? 'S' : '-'); +} + +static void +job_table_dump(const char *where) +{ - Job *job; ++ Job *job; ++ char flags[4]; + - debug_printf("job table @ %s\n", where); - for (job = job_table; job < job_table_end; job++) { - debug_printf("job %d, status %d, flags %d, pid %d\n", - (int)(job - job_table), job->status, job->flags, job->pid); - } ++ debug_printf("job table @ %s\n", where); ++ for (job = job_table; job < job_table_end; job++) { ++ Job_FlagsToString(job, flags, sizeof flags); ++ debug_printf("job %d, status %d, flags %s, pid %d\n", ++ (int)(job - job_table), job->status, flags, job->pid); ++ } +} + +/* + * Delete the target of a failed, interrupted, or otherwise + * unsuccessful job unless inhibited by .PRECIOUS. + */ +static void +JobDeleteTarget(GNode *gn) +{ - const char *file; - - if (gn->type & OP_JOIN) - return; - if (gn->type & OP_PHONY) - return; - if (Targ_Precious(gn)) - return; - if (opts.noExecute) - return; - - file = GNode_Path(gn); - if (eunlink(file) != -1) - Error("*** %s removed", file); ++ const char *file; ++ ++ if (gn->type & OP_JOIN) ++ return; ++ if (gn->type & OP_PHONY) ++ return; ++ if (Targ_Precious(gn)) ++ return; ++ if (opts.noExecute) ++ return; ++ ++ file = GNode_Path(gn); ++ if (eunlink(file) != -1) ++ Error("*** %s removed", file); *** 7771 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Jan 14 06:33:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C02C4D71AC; Thu, 14 Jan 2021 06:33: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGZJH2VXdz4rdH; Thu, 14 Jan 2021 06:33: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 4877225528; Thu, 14 Jan 2021 06:33: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 10E6XJwG031697; Thu, 14 Jan 2021 06:33:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10E6XJGg031696; Thu, 14 Jan 2021 06:33:19 GMT (envelope-from git) Date: Thu, 14 Jan 2021 06:33:19 GMT Message-Id: <202101140633.10E6XJGg031696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 03774659d1f2 - main - tools: git hooks: drop "submitted by" from commit template MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03774659d1f24d47ce00e165048a253263028cff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 06:33:19 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=03774659d1f24d47ce00e165048a253263028cff commit 03774659d1f24d47ce00e165048a253263028cff Author: Kyle Evans AuthorDate: 2021-01-14 06:33:07 +0000 Commit: Kyle Evans CommitDate: 2021-01-14 06:33:07 +0000 tools: git hooks: drop "submitted by" from commit template With the switch to git, we should strive to properly attribute every commit appropriately with the metadata that's provided to do so. In this case, the submitter should be recorded via the author metadata. Committing an arbitrary patch, one can set it as such: git commit --author="John Smith " Reviewed-by: emaste Differential-Revision: https://reviews.freebsd.org/D28069 --- tools/tools/git/hooks/prepare-commit-msg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index 51b92a10724d..0ebec48fd9a5 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -43,7 +43,6 @@ $(awk '1;/^#$/{exit}' $1) # Uncomment and complete these metadata fields, as appropriate: # # PR: -# Submitted by: # Reported by: # Reviewed by: # Approved by: @@ -57,7 +56,8 @@ $(awk '1;/^#$/{exit}' $1) # Differential Revision: # # "Pull Request" and "Differential Revision" require the *full* GitHub or -# Phabricator URL. +# Phabricator URL. The commit author should be set appropriately, using +# \`git commit --author\` if someone besides the committer sent in the change. $(awk '/^#$/,EOF' "$1") EOF From owner-dev-commits-src-all@freebsd.org Thu Jan 14 06:35:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6F6A4D730F; Thu, 14 Jan 2021 06:35: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGZLs5j4zz4s68; Thu, 14 Jan 2021 06:35: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 B68C2255A3; Thu, 14 Jan 2021 06:35: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 10E6ZXal032282; Thu, 14 Jan 2021 06:35:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10E6ZX92032281; Thu, 14 Jan 2021 06:35:33 GMT (envelope-from git) Date: Thu, 14 Jan 2021 06:35:33 GMT Message-Id: <202101140635.10E6ZX92032281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: 9a01a2551636 - main - unifdef -D__FreeBSD__ to remove the OpenBSD support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a01a25516367d1deeb48484d38a66137b01ebb0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 06:35:33 -0000 The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=9a01a25516367d1deeb48484d38a66137b01ebb0 commit 9a01a25516367d1deeb48484d38a66137b01ebb0 Author: David E. O'Brien AuthorDate: 2021-01-14 04:45:54 +0000 Commit: David E. O'Brien CommitDate: 2021-01-14 06:35:22 +0000 unifdef -D__FreeBSD__ to remove the OpenBSD support OpenBSD never accepted this driver, and instead wrote their own minimal one (sys/dev/acpi/tpm.c for suspending the device). Reviewed by: stevek, emaste Differential Revision: D10321 --- sys/dev/tpm/tpm.c | 199 ------------------------------------------------------ 1 file changed, 199 deletions(-) diff --git a/sys/dev/tpm/tpm.c b/sys/dev/tpm/tpm.c index a458804d0ac9..21d68012aded 100644 --- a/sys/dev/tpm/tpm.c +++ b/sys/dev/tpm/tpm.c @@ -27,7 +27,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __FreeBSD__ #include #include #include @@ -41,24 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include -#else -#include - -#include -#include -#include -#include - -#include -#include -#endif #include -#ifndef __FreeBSD__ -/* XXX horrible hack for tcsd (-lpthread) workaround on OpenBSD */ -#undef PCATCH -#define PCATCH 0 -#endif #define TPM_BUFSIZ 1024 @@ -66,9 +49,7 @@ __FBSDID("$FreeBSD$"); #define TPM_PARAM_SIZE 0x0001 -#ifdef __FreeBSD__ #define IRQUNK -1 -#endif #define TPM_ACCESS 0x0000 /* access register */ #define TPM_ACCESS_ESTABLISHMENT 0x01 /* establishment */ @@ -146,7 +127,6 @@ __FBSDID("$FreeBSD$"); /* Set when enabling legacy interface in host bridge. */ int tpm_enabled; -#ifdef __FreeBSD__ #define TPMSOFTC(dev) \ ((struct tpm_softc *)dev->si_drv1) @@ -166,21 +146,6 @@ static struct cdevsw tpm_cdevsw = { .d_ioctl = tpmioctl, .d_name = "tpm", }; -#else -#define TPMSOFTC(dev) \ - (struct tpm_softc *)device_lookup(&tpm_cd, minor(dev)) - -struct cfdriver tpm_cd = { - NULL, "tpm", DV_DULL -}; - -int tpm_match(device_t , void *, void *); -void tpm_attach(device_t , device_t , void *); - -struct cfattach tpm_ca = { - sizeof(struct tpm_softc), tpm_match, tpm_attach -}; -#endif const struct { u_int32_t devid; @@ -206,14 +171,7 @@ int tpm_tis12_read(struct tpm_softc *, void *, int, size_t *, int); int tpm_tis12_write(struct tpm_softc *, void *, int); int tpm_tis12_end(struct tpm_softc *, int, int); -#ifdef __FreeBSD__ void tpm_intr(void *); -#else -int tpm_intr(void *); -void tpm_powerhook(int, void *); -int tpm_suspend(struct tpm_softc *, int); -int tpm_resume(struct tpm_softc *, int); -#endif int tpm_waitfor_poll(struct tpm_softc *, u_int8_t, int, void *); int tpm_waitfor_int(struct tpm_softc *, u_int8_t, int, void *, int); @@ -230,7 +188,6 @@ int tpm_legacy_read(struct tpm_softc *, void *, int, size_t *, int); int tpm_legacy_write(struct tpm_softc *, void *, int); int tpm_legacy_end(struct tpm_softc *, int, int); -#ifdef __FreeBSD__ /* * FreeBSD specific code for probing and attaching TPM to device tree. @@ -329,100 +286,6 @@ tpm_detach(device_t dev) return 0; } -#else -/* - * OpenBSD specific code for probing and attaching TPM to device tree. - */ -int -tpm_match(device_t parent, void *match, void *aux) -{ - struct isa_attach_args *ia = aux; - struct cfdata *cf = match; - bus_space_tag_t bt = ia->ia_memt; - bus_space_handle_t bh; - int rv; - - /* There can be only one. */ - if (cf->cf_unit) - return 0; - - if (tpm_legacy_probe(ia->ia_iot, ia->ia_iobase)) { - ia->ia_iosize = 2; - return 1; - } - - if (ia->ia_maddr == -1) - return 0; - - if (bus_space_map(bt, ia->ia_maddr, TPM_SIZE, 0, &bh)) - return 0; - - if ((rv = tpm_tis12_probe(bt, bh))) { - ia->ia_iosize = 0; - ia->ia_msize = TPM_SIZE; - } - - bus_space_unmap(bt, bh, TPM_SIZE); - return rv; -} - -void -tpm_attach(device_t parent, device_t self, void *aux) -{ - struct tpm_softc *sc = (struct tpm_softc *)self; - struct isa_attach_args *ia = aux; - bus_addr_t iobase; - bus_size_t size; - int rv; - - if (tpm_legacy_probe(ia->ia_iot, ia->ia_iobase)) { - sc->sc_bt = ia->ia_iot; - iobase = ia->ia_iobase; - size = ia->ia_iosize; - sc->sc_batm = ia->ia_iot; - sc->sc_init = tpm_legacy_init; - sc->sc_start = tpm_legacy_start; - sc->sc_read = tpm_legacy_read; - sc->sc_write = tpm_legacy_write; - sc->sc_end = tpm_legacy_end; - } else { - sc->sc_bt = ia->ia_memt; - iobase = ia->ia_maddr; - size = TPM_SIZE; - sc->sc_init = tpm_tis12_init; - sc->sc_start = tpm_tis12_start; - sc->sc_read = tpm_tis12_read; - sc->sc_write = tpm_tis12_write; - sc->sc_end = tpm_tis12_end; - } - - if (bus_space_map(sc->sc_bt, iobase, size, 0, &sc->sc_bh)) { - printf(": cannot map registers\n"); - return; - } - - if ((rv = (sc->sc_init)(sc, ia->ia_irq, sc->sc_dev.dv_xname))) { - bus_space_unmap(sc->sc_bt, sc->sc_bh, size); - return; - } - - /* - * Only setup interrupt handler when we have a vector and the - * chip is TIS 1.2 compliant. - */ - if (sc->sc_init == tpm_tis12_init && ia->ia_irq != IRQUNK && - (sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, - IPL_TTY, tpm_intr, sc, sc->sc_dev.dv_xname)) == NULL) { - bus_space_unmap(sc->sc_bt, sc->sc_bh, TPM_SIZE); - printf("%s: cannot establish interrupt\n", - sc->sc_dev.dv_xname); - return; - } - - sc->sc_suspend = PWR_RESUME; - sc->sc_powerhook = powerhook_establish(tpm_powerhook, sc); -} -#endif /* Probe TPM using TIS 1.2 interface. */ int @@ -634,16 +497,10 @@ tpm_tmotohz(int tmo) /* Save TPM state on suspend. */ int -#ifdef __FreeBSD__ tpm_suspend(device_t dev) -#else -tpm_suspend(struct tpm_softc *sc, int why) -#endif { -#ifdef __FreeBSD__ struct tpm_softc *sc = device_get_softc(dev); int why = 1; -#endif u_int8_t command[] = { 0, 193, /* TPM_TAG_RQU_COMMAND */ 0, 0, 0, 10, /* Length in bytes */ @@ -668,16 +525,10 @@ tpm_suspend(struct tpm_softc *sc, int why) * to restore the previously saved state. */ int -#ifdef __FreeBSD__ tpm_resume(device_t dev) -#else -tpm_resume(struct tpm_softc *sc, int why) -#endif { -#ifdef __FreeBSD__ struct tpm_softc *sc = device_get_softc(dev); int why = 0; -#endif #ifdef TPM_DEBUG printf("tpm_resume: resume: %d -> %d\n", sc->sc_suspend, why); #endif @@ -687,18 +538,6 @@ tpm_resume(struct tpm_softc *sc, int why) } /* Dispatch suspend and resume events. */ -#ifndef __FreeBSD__ -void -tpm_powerhook(int why, void *self) -{ - struct tpm_softc *sc = (struct tpm_softc *)self; - - if (why != PWR_RESUME) - tpm_suspend(sc, why); - else - tpm_resume(sc, why); -} -#endif /* !__FreeBSD__ */ /* Wait for given status bits using polling. */ int @@ -1074,11 +913,7 @@ tpm_tis12_end(struct tpm_softc *sc, int flag, int err) return rv; } -#ifdef __FreeBSD__ void -#else -int -#endif tpm_intr(void *v) { struct tpm_softc *sc = v; @@ -1097,11 +932,7 @@ tpm_intr(void *v) #endif if (!(r & (TPM_CMD_READY_INT | TPM_LOCALITY_CHANGE_INT | TPM_STS_VALID_INT | TPM_DATA_AVAIL_INT))) -#ifdef __FreeBSD__ return; -#else - return 0; -#endif if (r & TPM_STS_VALID_INT) wakeup(sc); @@ -1116,11 +947,7 @@ tpm_intr(void *v) bus_space_write_4(sc->sc_bt, sc->sc_bh, TPM_INT_STATUS, r); -#ifdef __FreeBSD__ return; -#else - return 1; -#endif } /* Read single byte using legacy interface. */ @@ -1231,9 +1058,6 @@ tpm_legacy_start(struct tpm_softc *sc, int flag) return rv; } -#if defined(TPM_DEBUG) && !defined(__FreeBSD__) - printf("%s: bits %b\n", sc->sc_dev.dv_xname, r, TPM_LEGACY_BITS); -#endif if ((r & (TPM_LEGACY_BUSY|bits)) != bits) return EIO; @@ -1305,9 +1129,6 @@ tpm_legacy_end(struct tpm_softc *sc, int flag, int rv) return rv; } -#if defined(TPM_DEBUG) && !defined(__FreeBSD__) - printf("%s: bits %b\n", sc->sc_dev.dv_xname, r, TPM_LEGACY_BITS); -#endif if (r & TPM_LEGACY_BUSY) return EIO; @@ -1319,11 +1140,7 @@ tpm_legacy_end(struct tpm_softc *sc, int flag, int rv) } int -#ifdef __FreeBSD__ tpmopen(struct cdev *dev, int flag, int mode, struct thread *td) -#else -tpmopen(dev_t dev, int flag, int mode, struct proc *p) -#endif { struct tpm_softc *sc = TPMSOFTC(dev); @@ -1339,11 +1156,7 @@ tpmopen(dev_t dev, int flag, int mode, struct proc *p) } int -#ifdef __FreeBSD__ tpmclose(struct cdev *dev, int flag, int mode, struct thread *td) -#else -tpmclose(dev_t dev, int flag, int mode, struct proc *p) -#endif { struct tpm_softc *sc = TPMSOFTC(dev); @@ -1359,11 +1172,7 @@ tpmclose(dev_t dev, int flag, int mode, struct proc *p) } int -#ifdef __FreeBSD__ tpmread(struct cdev *dev, struct uio *uio, int flags) -#else -tpmread(dev_t dev, struct uio *uio, int flags) -#endif { struct tpm_softc *sc = TPMSOFTC(dev); u_int8_t buf[TPM_BUFSIZ], *p; @@ -1435,11 +1244,7 @@ tpmread(dev_t dev, struct uio *uio, int flags) } int -#ifdef __FreeBSD__ tpmwrite(struct cdev *dev, struct uio *uio, int flags) -#else -tpmwrite(dev_t dev, struct uio *uio, int flags) -#endif { struct tpm_softc *sc = TPMSOFTC(dev); u_int8_t buf[TPM_BUFSIZ]; @@ -1476,12 +1281,8 @@ tpmwrite(dev_t dev, struct uio *uio, int flags) } int -#ifdef __FreeBSD__ tpmioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) -#else -tpmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) -#endif { return ENOTTY; } From owner-dev-commits-src-all@freebsd.org Thu Jan 14 06:38:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 856334D73A9; Thu, 14 Jan 2021 06:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGZQp3N0Kz4s7B; Thu, 14 Jan 2021 06:38: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 66B4725774; Thu, 14 Jan 2021 06: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 10E6cwPJ032885; Thu, 14 Jan 2021 06: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 10E6cwWg032884; Thu, 14 Jan 2021 06:38:58 GMT (envelope-from git) Date: Thu, 14 Jan 2021 06:38:58 GMT Message-Id: <202101140638.10E6cwWg032884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 986deea5b518 - main - build: `make check`: use a PATH search instead for Kyua MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 986deea5b518ee5bf6b8b1486056a21819bd8bd2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 06:38:58 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=986deea5b518ee5bf6b8b1486056a21819bd8bd2 commit 986deea5b518ee5bf6b8b1486056a21819bd8bd2 Author: Kyle Evans AuthorDate: 2021-01-14 06:34:29 +0000 Commit: Kyle Evans CommitDate: 2021-01-14 06:37:48 +0000 build: `make check`: use a PATH search instead for Kyua which(1) accepts both relative/absolute paths as well as lone binary names. Set KYUA to kyua and use which(1) to confirm that it can find one; if it cannot, just advise the user to set KYUA directly to the kyua binary rather than assuming a relative location from LOCALBASE. This allows `make check` to be operated with the version of kyua in base without losing the flexibility of specifying another one. ngie@ notes that the original intention was to avoid redundant $PATH lookups and improve the determinism of the target. A future change will likely push us back to this state, perhaps in the form of reverting this entirely and just switching to using kyua in base. Accepting any in $PATH should be considered a transitional move, at least until it's declared otherwise, since kyua was only semi-recently added to base. Reviewed-by: brooks, emaste, lwhsu, ngie Differential-Revision: https://reviews.freebsd.org/D28045 --- share/mk/suite.test.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/mk/suite.test.mk b/share/mk/suite.test.mk index 69cd02d684de..e772ccd1b292 100644 --- a/share/mk/suite.test.mk +++ b/share/mk/suite.test.mk @@ -77,7 +77,7 @@ Kyuafile: Makefile @mv ${.TARGET}.tmp ${.TARGET} .endif -KYUA= ${LOCALBASE}/bin/kyua +KYUA?= kyua # Definition of the "make check" target and supporting variables. # @@ -90,13 +90,13 @@ KYUA= ${LOCALBASE}/bin/kyua # report bogus results unless the new binaries are put in place. realcheck: .PHONY - @if [ ! -x ${KYUA} ]; then \ + if ! which -s "${KYUA}"; then \ echo; \ echo "kyua binary not installed at expected location (${.TARGET})"; \ echo; \ echo "Please install via pkg install, or specify the path to the kyua"; \ - echo "package via the \$${LOCALBASE} variable, e.g. "; \ - echo "LOCALBASE=\"${LOCALBASE}\""; \ + echo "binary via the \$${KYUA} variable, e.g., "; \ + echo "KYUA=\"${LOCALBASE}/bin/kyua\""; \ false; \ fi @env ${TESTS_ENV:Q} ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile From owner-dev-commits-src-all@freebsd.org Thu Jan 14 07:04:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 408DC4D7BC5; Thu, 14 Jan 2021 07:04: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGb041FGYz4tD7; Thu, 14 Jan 2021 07:04: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 1312625CDB; Thu, 14 Jan 2021 07:04: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 10E74KBK070997; Thu, 14 Jan 2021 07:04:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10E74KhX070996; Thu, 14 Jan 2021 07:04:20 GMT (envelope-from git) Date: Thu, 14 Jan 2021 07:04:20 GMT Message-Id: <202101140704.10E74KhX070996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: bd72252aace3 - main - [mips] revert r366664 - flip mips back from -O2 to -O MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd72252aace382921840ddbceea712b96f4ad242 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 07:04:20 -0000 The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=bd72252aace382921840ddbceea712b96f4ad242 commit bd72252aace382921840ddbceea712b96f4ad242 Author: Adrian Chadd AuthorDate: 2021-01-12 21:13:20 +0000 Commit: Adrian Chadd CommitDate: 2021-01-14 07:03:53 +0000 [mips] revert r366664 - flip mips back from -O2 to -O Now that I have -head fitting in 8MB of flash again, I can test out freebsd-head on my home AP test setup. Unfortunately, the introduction of -O2 in r366664 causes the following infinite loop shortly after boot: ------ MAP: No valid partition found at map/rootfs.uzip Warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init BAD_PAGE_FAULT: pid 1 tid 100001 (init), uid 0: pc 0x4042c320 got a read fault (type 0x2) at 0x2e3a0 Trapframe Register Dump: zero: 0 at: 0 v0: 0 v1: 0 a0: 0x1af34 a1: 0 a2: 0 a3: 0x7fffeff0 t0: 0 t1: 0 t2: 0 t3: 0 t4: 0 t5: 0 t6: 0 t7: 0 t8: 0 t9: 0x152e8 s0: 0x7fffee84 s1: 0 s2: 0 s3: 0 s4: 0 s5: 0 s6: 0 s7: 0 k0: 0 k1: 0 gp: 0x362c0 sp: 0x7fffedf0 s8: 0 ra: 0x40417df0 sr: 0xf413 mullo: 0 mulhi: 0 badvaddr: 0x2e3a0 cause: 0xffffffff80000008 pc: 0x4042c31c Page table info for pc address 0x4042c320: pde = 0x80712000, pte = 0xa002065a Dumping 4 words starting at pc address 0x4042c320: 8f9980e0 80820000 10400067 00809825 Page table info for bad address 0x2e3a0: pde = 0, pte = 0 ------ I'm not yet sure why, but until I figure it out with the mips64/cheri folk this should be reverted. This should only use -O on GCC generated code for MIPS platforms. Tested: * QCA934x (mips74k) - WDR-3600/WDR-4300 APs Differential Revision: https://reviews.freebsd.org/D28122 --- share/mk/sys.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 8f456b28593a..72f458397683 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -166,7 +166,14 @@ CC ?= c89 CFLAGS ?= -O .else CC ?= cc +.if ${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc" +# Note: there are currently issues generating code gcc-6.x targeting +# code for at least mips32. The system hits infinite page faults +# when starting /sbin/init if -O2 is used. +CFLAGS ?= -O -pipe +.else CFLAGS ?= -O2 -pipe +.endif .if defined(NO_STRICT_ALIASING) CFLAGS += -fno-strict-aliasing .endif From owner-dev-commits-src-all@freebsd.org Thu Jan 14 08:20:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E82E04D949D; Thu, 14 Jan 2021 08: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGchG68QRz3DgD; Thu, 14 Jan 2021 08:20: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 C6151266F0; Thu, 14 Jan 2021 08:20: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 10E8KkSk069930; Thu, 14 Jan 2021 08:20:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10E8Kkw4069929; Thu, 14 Jan 2021 08:20:46 GMT (envelope-from git) Date: Thu, 14 Jan 2021 08:20:46 GMT Message-Id: <202101140820.10E8Kkw4069929@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: 420d4be3e40a - main - vm_map_protect(): remove not needed recalculations of new_prot, new_maxprot 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: 420d4be3e40a13dbeb6ac1fe754f81480448ef55 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 08:20:47 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=420d4be3e40a13dbeb6ac1fe754f81480448ef55 commit 420d4be3e40a13dbeb6ac1fe754f81480448ef55 Author: Konstantin Belousov AuthorDate: 2021-01-13 03:04:18 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-14 08:02:43 +0000 vm_map_protect(): remove not needed recalculations of new_prot, new_maxprot Requested by: alc Sponsored by: The FreeBSD Foundation --- sys/vm/vm_map.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 4bd0b245a881..b3288fce5114 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2836,11 +2836,6 @@ again: return (rv); } - if ((flags & VM_MAP_PROTECT_SET_PROT) == 0) - new_prot = entry->protection; - if ((flags & VM_MAP_PROTECT_SET_MAXPROT) == 0) - new_maxprot = entry->max_protection; - if ((flags & VM_MAP_PROTECT_SET_PROT) == 0 || ((new_prot & ~entry->protection) & VM_PROT_WRITE) == 0 || ENTRY_CHARGED(entry) || From owner-dev-commits-src-all@freebsd.org Thu Jan 14 09:47:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E4174DB9E6; Thu, 14 Jan 2021 09:47: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGfcj0pcHz3LgN; Thu, 14 Jan 2021 09:47: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 0EA6427D87; Thu, 14 Jan 2021 09:47: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 10E9lmU0079458; Thu, 14 Jan 2021 09:47:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10E9lmYJ079457; Thu, 14 Jan 2021 09:47:48 GMT (envelope-from git) Date: Thu, 14 Jan 2021 09:47:48 GMT Message-Id: <202101140947.10E9lmYJ079457@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: feb96ee9c804 - main - linux: mute "unsupported socket(AF_NETLINK, 3, NETLINK_AUDIT)" warnings 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: feb96ee9c804c3b3af363dadac2d4def3fe4ee2d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 09:47:49 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=feb96ee9c804c3b3af363dadac2d4def3fe4ee2d commit feb96ee9c804c3b3af363dadac2d4def3fe4ee2d Author: Edward Tomasz Napierala AuthorDate: 2021-01-12 18:00:18 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-01-14 09:16:28 +0000 linux: mute "unsupported socket(AF_NETLINK, 3, NETLINK_AUDIT)" warnings They are way too noisy with Focal. Sponsored by: The FreeBSD Foundation --- sys/compat/linux/linux_socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index c68a033d3bd1..5bfcdbb8fd21 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -846,7 +846,10 @@ linux_socket(struct thread *td, struct linux_socket_args *args) if (domain == -1) { /* Mask off SOCK_NONBLOCK / CLOEXEC for error messages. */ type = args->type & LINUX_SOCK_TYPE_MASK; - if (args->domain == LINUX_AF_NETLINK) { + if (args->domain == LINUX_AF_NETLINK && + args->protocol == LINUX_NETLINK_AUDIT) { + ; /* Do nothing, quietly. */ + } else if (args->domain == LINUX_AF_NETLINK) { const char *nl_name; if (args->protocol >= 0 && From owner-dev-commits-src-all@freebsd.org Thu Jan 14 10:47:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C11364DD311; Thu, 14 Jan 2021 10:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGgxH55XMz3Pxn; Thu, 14 Jan 2021 10:47: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 A1904913; Thu, 14 Jan 2021 10:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10EAlF2C056482; Thu, 14 Jan 2021 10:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EAlF2u056481; Thu, 14 Jan 2021 10:47:15 GMT (envelope-from git) Date: Thu, 14 Jan 2021 10:47:15 GMT Message-Id: <202101141047.10EAlF2u056481@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: e47a6525e71d - main - Add missing init of new fields after new UAR API was introduced by f8f5b459d21e in mlx5ib. 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: e47a6525e71d48fd3dd49aac61cbe211ceec34f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 10:47:15 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=e47a6525e71d48fd3dd49aac61cbe211ceec34f2 commit e47a6525e71d48fd3dd49aac61cbe211ceec34f2 Author: Hans Petter Selasky AuthorDate: 2021-01-14 10:42:31 +0000 Commit: Hans Petter Selasky CommitDate: 2021-01-14 10:44:54 +0000 Add missing init of new fields after new UAR API was introduced by f8f5b459d21e in mlx5ib. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 42 +++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index 58f9379e867b..f2485d13d791 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2021, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -3226,6 +3226,36 @@ free: return ARRAY_SIZE(names); } +static int mlx5_ib_stage_bfreg_init(struct mlx5_ib_dev *dev) +{ + int err; + + err = mlx5_alloc_bfreg(dev->mdev, &dev->bfreg, false, false); + if (err) + return err; + + err = mlx5_alloc_bfreg(dev->mdev, &dev->fp_bfreg, false, true); + if (err) { + mlx5_free_bfreg(dev->mdev, &dev->bfreg); + return err; + } + + err = mlx5_alloc_bfreg(dev->mdev, &dev->wc_bfreg, true, false); + if (err) { + mlx5_free_bfreg(dev->mdev, &dev->fp_bfreg); + mlx5_free_bfreg(dev->mdev, &dev->bfreg); + } + + return err; +} + +static void mlx5_ib_stage_bfreg_cleanup(struct mlx5_ib_dev *dev) +{ + mlx5_free_bfreg(dev->mdev, &dev->wc_bfreg); + mlx5_free_bfreg(dev->mdev, &dev->fp_bfreg); + mlx5_free_bfreg(dev->mdev, &dev->bfreg); +} + static void *mlx5_ib_add(struct mlx5_core_dev *mdev) { struct mlx5_ib_dev *dev; @@ -3430,10 +3460,14 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) if (err) goto err_odp; - err = ib_register_device(&dev->ib_dev, NULL); + err = mlx5_ib_stage_bfreg_init(dev); if (err) goto err_q_cnt; + err = ib_register_device(&dev->ib_dev, NULL); + if (err) + goto err_bfreg; + err = create_umr_res(dev); if (err) goto err_dev; @@ -3459,6 +3493,9 @@ err_umrc: err_dev: ib_unregister_device(&dev->ib_dev); +err_bfreg: + mlx5_ib_stage_bfreg_cleanup(dev); + err_q_cnt: mlx5_ib_dealloc_q_counters(dev); @@ -3491,6 +3528,7 @@ static void mlx5_ib_remove(struct mlx5_core_dev *mdev, void *context) mlx5_ib_cleanup_congestion(dev); mlx5_remove_roce_notifier(dev); ib_unregister_device(&dev->ib_dev); + mlx5_ib_stage_bfreg_cleanup(dev); mlx5_ib_dealloc_q_counters(dev); destroy_umrc_res(dev); mlx5_ib_odp_remove_one(dev); From owner-dev-commits-src-all@freebsd.org Thu Jan 14 10:52:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA9B44DD5B0; Thu, 14 Jan 2021 10:52: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGh2w4Xz3z3QLh; Thu, 14 Jan 2021 10:52: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 8F2D4B6B; Thu, 14 Jan 2021 10:52: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 10EAq8Pl068458; Thu, 14 Jan 2021 10:52:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EAq85M068457; Thu, 14 Jan 2021 10:52:08 GMT (envelope-from git) Date: Thu, 14 Jan 2021 10:52:08 GMT Message-Id: <202101141052.10EAq85M068457@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: f9b0587dc2f9 - stable/12 - pfctl: Another set skip fix 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: f9b0587dc2f98800f9f72944fd66a695200c554b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 10:52:08 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f9b0587dc2f98800f9f72944fd66a695200c554b commit f9b0587dc2f98800f9f72944fd66a695200c554b Author: Kristof Provost AuthorDate: 2021-01-11 13:09:08 +0000 Commit: Kristof Provost CommitDate: 2021-01-14 08:39:57 +0000 pfctl: Another set skip fix When retrieving the list of group members we cannot simply use ifa_lookup(), because it expects the interface to have an IP (v4 or v6) address. This means that interfaces with no address are not found. This presents as interfacing being alternately marked as skip and not whenever the rules are re-loaded. Happily we only need to fix ifa_grouplookup(). Teach it to also accept AF_LINK (i.e. interface) node_hosts. PR: 250994 MFC after: 3 days (cherry picked from commit 0c156a3c32cd0d9168570da5686ddc96abcbbc5a) --- sbin/pfctl/pfctl_parser.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index f9a60253da44..120178c50087 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1392,6 +1392,26 @@ ifa_exists(char *ifa_name) return (NULL); } +static struct node_host * +if_lookup(char *if_name) +{ + struct node_host *p, *n; + + for (p = iftab; p; p = p->next) { + if (! strcmp(if_name, p->ifname)) { + n = calloc(1, sizeof(struct node_host)); + bcopy(p, n, sizeof(struct node_host)); + + n->next = NULL; + n->tail = n; + + return (n); + } + } + + return (NULL); +} + struct node_host * ifa_grouplookup(char *ifa_name, int flags) { @@ -1415,7 +1435,7 @@ ifa_grouplookup(char *ifa_name, int flags) for (ifg = ifgr.ifgr_groups; ifg && len >= sizeof(struct ifg_req); ifg++) { len -= sizeof(struct ifg_req); - if ((n = ifa_lookup(ifg->ifgrq_member, flags)) == NULL) + if ((n = if_lookup(ifg->ifgrq_member)) == NULL) continue; if (h == NULL) h = n; From owner-dev-commits-src-all@freebsd.org Thu Jan 14 12:51:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66EA74E1163; Thu, 14 Jan 2021 12:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGkjC2Xssz3nkj; Thu, 14 Jan 2021 12:51: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 4A33A1DD2; Thu, 14 Jan 2021 12:51: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 10ECpxrZ020287; Thu, 14 Jan 2021 12:51:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10ECpx1i020286; Thu, 14 Jan 2021 12:51:59 GMT (envelope-from git) Date: Thu, 14 Jan 2021 12:51:59 GMT Message-Id: <202101141251.10ECpx1i020286@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: 685265ecfbd8 - main - tmpfs_reclaim: style 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: 685265ecfbd8e929d7c6988a99b708d3a3a5cbf4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 12:51:59 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=685265ecfbd8e929d7c6988a99b708d3a3a5cbf4 commit 685265ecfbd8e929d7c6988a99b708d3a3a5cbf4 Author: Konstantin Belousov AuthorDate: 2021-01-13 06:55:38 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-14 12:43:13 +0000 tmpfs_reclaim: style MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/fs/tmpfs/tmpfs_vnops.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 90711b4849c5..d8c10517b0e0 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1490,11 +1490,11 @@ need: int tmpfs_reclaim(struct vop_reclaim_args *v) { - struct vnode *vp = v->a_vp; - + struct vnode *vp; struct tmpfs_mount *tmp; struct tmpfs_node *node; + vp = v->a_vp; node = VP_TO_TMPFS_NODE(vp); tmp = VFS_TO_TMPFS(vp->v_mount); @@ -1505,9 +1505,11 @@ tmpfs_reclaim(struct vop_reclaim_args *v) TMPFS_NODE_LOCK(node); tmpfs_free_vp(vp); - /* If the node referenced by this vnode was deleted by the user, + /* + * If the node referenced by this vnode was deleted by the user, * we must free its associated data structures (now that the vnode - * is being reclaimed). */ + * is being reclaimed). + */ if (node->tn_links == 0 && (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0) { node->tn_vpstate = TMPFS_VNODE_DOOMED; @@ -1517,7 +1519,7 @@ tmpfs_reclaim(struct vop_reclaim_args *v) TMPFS_NODE_UNLOCK(node); MPASS(vp->v_data == NULL); - return 0; + return (0); } int From owner-dev-commits-src-all@freebsd.org Thu Jan 14 12:52:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 803184E120E; Thu, 14 Jan 2021 12:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGkjD37zKz3nhG; Thu, 14 Jan 2021 12:52: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 54A4E2217; Thu, 14 Jan 2021 12:52: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 10ECq0lv020511; Thu, 14 Jan 2021 12:52:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10ECq0If020500; Thu, 14 Jan 2021 12:52:00 GMT (envelope-from git) Date: Thu, 14 Jan 2021 12:52:00 GMT Message-Id: <202101141252.10ECq0If020500@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: 2d1e4220ebd5 - main - tmpfs_reclaim: detach unlinked node on dereferencing. 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: 2d1e4220ebd50b9220d3266754425f025c786108 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 12:52:00 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2d1e4220ebd50b9220d3266754425f025c786108 commit 2d1e4220ebd50b9220d3266754425f025c786108 Author: Konstantin Belousov AuthorDate: 2021-01-12 16:10:07 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-14 12:51:37 +0000 tmpfs_reclaim: detach unlinked node on dereferencing. Otherwise it is dereferenced one extra time at unmount, if it survives long enough. One way to hold the reference on such node is to keep it open. tmpfs_vptocnp() now needs to account for the possibility that unlocked node was removed from the list. Reported by: danfe Tested by: danfe, pho MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/fs/tmpfs/tmpfs_vnops.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index d8c10517b0e0..66568e07b4d7 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1493,16 +1493,26 @@ tmpfs_reclaim(struct vop_reclaim_args *v) struct vnode *vp; struct tmpfs_mount *tmp; struct tmpfs_node *node; + bool unlock, tm_locked; vp = v->a_vp; node = VP_TO_TMPFS_NODE(vp); tmp = VFS_TO_TMPFS(vp->v_mount); + tm_locked = false; if (vp->v_type == VREG) tmpfs_destroy_vobject(vp, node->tn_reg.tn_aobj); vp->v_object = NULL; +relock: TMPFS_NODE_LOCK(node); + if (!tm_locked && node->tn_links == 0 && + (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0) { + TMPFS_NODE_UNLOCK(node); + TMPFS_LOCK(tmp); + tm_locked = true; + goto relock; + } tmpfs_free_vp(vp); /* @@ -1512,11 +1522,18 @@ tmpfs_reclaim(struct vop_reclaim_args *v) */ if (node->tn_links == 0 && (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0) { + MPASS(tm_locked); node->tn_vpstate = TMPFS_VNODE_DOOMED; + unlock = !tmpfs_free_node_locked(tmp, node, true); + } else { + unlock = true; + } + + if (unlock) { TMPFS_NODE_UNLOCK(node); - tmpfs_free_node(tmp, node); - } else - TMPFS_NODE_UNLOCK(node); + if (tm_locked) + TMPFS_UNLOCK(tmp); + } MPASS(vp->v_data == NULL); return (0); @@ -1727,6 +1744,7 @@ tmpfs_vptocnp(struct vop_vptocnp_args *ap) } restart: TMPFS_LOCK(tm); +restart_locked: LIST_FOREACH_SAFE(tnp, &tm->tm_nodes_used, tn_entries, tnp1) { if (tnp->tn_type != VDIR) continue; @@ -1764,8 +1782,13 @@ restart: } else { KASSERT(tnp->tn_refcount > 0, ("node %p refcount zero", tnp)); - tnp1 = LIST_NEXT(tnp, tn_entries); - TMPFS_NODE_UNLOCK(tnp); + if (tnp->tn_attached) { + tnp1 = LIST_NEXT(tnp, tn_entries); + TMPFS_NODE_UNLOCK(tnp); + } else { + TMPFS_NODE_UNLOCK(tnp); + goto restart_locked; + } } } TMPFS_UNLOCK(tm); From owner-dev-commits-src-all@freebsd.org Thu Jan 14 13:00:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E57524E1717; Thu, 14 Jan 2021 13:00: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGktq683Nz3pbv; Thu, 14 Jan 2021 13:00: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 C5B8223EC; Thu, 14 Jan 2021 13:00: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 10ED0Jks032302; Thu, 14 Jan 2021 13:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10ED0JiX032299; Thu, 14 Jan 2021 13:00:19 GMT (envelope-from git) Date: Thu, 14 Jan 2021 13:00:19 GMT Message-Id: <202101141300.10ED0JiX032299@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: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases 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: aef769614f921660cb0262412426034cf5395ae5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 13:00:20 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 commit aef769614f921660cb0262412426034cf5395ae5 Author: Emmanuel Vadot AuthorDate: 2021-01-14 12:56:38 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-14 13:00:04 +0000 pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases The current postfix conversions are: CURRENT / STABLE -> .sYYYYMMDDhhmmss ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 Submitted by: rene (original version) Differential Revision: https://reviews.freebsd.org/D20734 --- Makefile.inc1 | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 5a9eff870dd5..2242ca3be5b4 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -557,21 +557,25 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA .endif .if !defined(PKG_VERSION) -.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} -TIMENOW= %Y%m%d%H%M%S -EXTRA_REVISION= .s${TIMENOW:gmtime} +_STRTIMENOW= %Y%m%d%H%M%S +_TIMENOW= ${_STRTIMENOW:gmtime} +.if ${_BRANCH:MCURRENT*} +_REVISION:= ${_REVISION:R} +EXTRA_REVISION= .s${_TIMENOW} +.elif ${_BRANCH:MSTABLE*} +EXTRA_REVISION= s${_TIMENOW} +.elif ${_BRANCH:MPRERELEASE*} +EXTRA_REVISION= .p .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} -.elif ${_BRANCH:MPRERELEASE*} -EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/} +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/} .elif ${_BRANCH:M*-p*} EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif -PKG_VERSION:= ${_REVISION}${EXTRA_REVISION} +PKG_VERSION:= ${_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif .endif # !defined(PKG_VERSION) From owner-dev-commits-src-all@freebsd.org Thu Jan 14 13:17:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2BDA74E1DCD; Thu, 14 Jan 2021 13:17: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGlGr0m25z3qT1; Thu, 14 Jan 2021 13:17: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 0CC8A2649; Thu, 14 Jan 2021 13:17: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 10EDHdrZ051644; Thu, 14 Jan 2021 13:17:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EDHdT6051643; Thu, 14 Jan 2021 13:17:39 GMT (envelope-from git) Date: Thu, 14 Jan 2021 13:17:39 GMT Message-Id: <202101141317.10EDHdT6051643@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: 03cab14ea3a8 - main - Revert "pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases" 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: 03cab14ea3a8e0444cec2ec3844e0648bd60bb58 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 13:17:40 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=03cab14ea3a8e0444cec2ec3844e0648bd60bb58 commit 03cab14ea3a8e0444cec2ec3844e0648bd60bb58 Author: Emmanuel Vadot AuthorDate: 2021-01-14 13:15:05 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-14 13:15:05 +0000 Revert "pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases" This reverts commit aef769614f921660cb0262412426034cf5395ae5. While the package names are a bit prettier this confuse pkg about upgrading : $ pkg version -t 13.0.s2021011313063 13.0.a1 > $ pkg version -t 13.0.s2021011313063 13.0_ALPHA1 < Note that the current scheme isn't good when bumping from ALPHA to BETA or even BETA to RC: $ pkg version -t 13.0_ALPHA1 13.0_BETA1 = $ pkg version -t 13.0_BETA1 13.0_RC1 = But more thoughts have to be put into this renaming. --- Makefile.inc1 | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 2242ca3be5b4..5a9eff870dd5 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -557,25 +557,21 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA .endif .if !defined(PKG_VERSION) -_STRTIMENOW= %Y%m%d%H%M%S -_TIMENOW= ${_STRTIMENOW:gmtime} -.if ${_BRANCH:MCURRENT*} -_REVISION:= ${_REVISION:R} -EXTRA_REVISION= .s${_TIMENOW} -.elif ${_BRANCH:MSTABLE*} -EXTRA_REVISION= s${_TIMENOW} -.elif ${_BRANCH:MPRERELEASE*} -EXTRA_REVISION= .p +.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} +TIMENOW= %Y%m%d%H%M%S +EXTRA_REVISION= .s${TIMENOW:gmtime} .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/} +EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/} +EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/} +EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} +.elif ${_BRANCH:MPRERELEASE*} +EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/} .elif ${_BRANCH:M*-p*} EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif -PKG_VERSION:= ${_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} +PKG_VERSION:= ${_REVISION}${EXTRA_REVISION} .endif .endif # !defined(PKG_VERSION) From owner-dev-commits-src-all@freebsd.org Thu Jan 14 13:26:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AC0D4E22FB; Thu, 14 Jan 2021 13:26:41 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGlTF2gchz3rgY; Thu, 14 Jan 2021 13:26:41 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x429.google.com with SMTP id d26so5742690wrb.12; Thu, 14 Jan 2021 05:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=W/fhBpck4o3yfpKz+UO+mubR0deFHuVxxf49jMMG/SE=; b=iUvU8qb89pBZ16VeKii1XZu16AHs1FSS6Cw028VfeBlOjTnw2liNqqcCFW1uAdhLs6 vJ96/l++gJu//3h9M+pL5czI7b/BZvSYjkbm0SDp2M2Tai2kaWioyhWJZi3UowkzbKGL hGP82lLoMe6VDFwmQp5nG4BQPT90tapnJvb6opfhLw1RWe8OXCUwWuq5GDP/ugKps6sd 0rzCHrEbVZ1iq7sopPMvdV7a+ukl4GsG8qD3clEcLfP6whk7t/mygQGxzxGCglIxllV/ y+JDFLQGVj6FCch5lPVcC8uv9jUg5ZHPGxV3m8AKnYcqWo8+RD2dhtEuJINCU9MqabTi qVuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=W/fhBpck4o3yfpKz+UO+mubR0deFHuVxxf49jMMG/SE=; b=QANDRtcWpIFdsCD6qrNZvtAnVTYG81dBBY9x7NKSaMBS3jRw55dNMjCp1t5E14SwpY 6+hGL2wy2eh4dShJvULDGvTDrqvFcBRsETeo8Y+BAmWBrPoszW72A0EEsyrnZ5SOBSS6 cqN2V8/wTd0AqSa52YTcM1rQ+627uwZZeg6aEGMXPp2uWnFGhKYyZEhpHtvXuALqiVq5 3HWrvoMAQtF9RwMx3OFY4RzqL70KOOamD10+tT4vfMIof5teZlu+PGstztXBLM+ynGC4 TvZP0+YJOhugFTyKaZOheCwi7fKBHSInCQktPZkIfHQlJxBhMrlWpaGDQS8RTrSHr3UZ lQYA== X-Gm-Message-State: AOAM533mSTZyxJSDsvA28NvYt/Z//wtmg3IWzm5Qfvw9dw6nnivoBfk8 5LPCyoFgb7xH+fllBaIpkyI++5UR4PMPrm1+JjXSdfse X-Google-Smtp-Source: ABdhPJxTxTAcs69YFN+TSxuXSHoklb/BNUrLY+foKJb1JN8xudkJDyz8xFho4FtAyHTO2P1qJjSxxdxJHHhzKQ5T5fk= X-Received: by 2002:adf:ec86:: with SMTP id z6mr7936449wrn.17.1610630799414; Thu, 14 Jan 2021 05:26:39 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Thu, 14 Jan 2021 05:26:38 -0800 (PST) In-Reply-To: <202101140704.10E74KhX070996@gitrepo.freebsd.org> References: <202101140704.10E74KhX070996@gitrepo.freebsd.org> From: Mateusz Guzik Date: Thu, 14 Jan 2021 14:26:38 +0100 Message-ID: Subject: Re: git: bd72252aace3 - main - [mips] revert r366664 - flip mips back from -O2 to -O To: Adrian Chadd 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: 4DGlTF2gchz3rgY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 13:26:41 -0000 This breaks tinderbox, for example: make[5]: "/usr/src/share/mk/sys.mk" line 169: Malformed conditional (${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc") make[5]: Fatal errors encountered -- cannot continue make[5]: stopped in /usr/obj/usr/src/mips.mips64/sys/BERI_NETFPGA_MDROOT On 1/14/21, Adrian Chadd wrote: > The branch main has been updated by adrian: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=bd72252aace382921840ddbceea712b96f4ad242 > > commit bd72252aace382921840ddbceea712b96f4ad242 > Author: Adrian Chadd > AuthorDate: 2021-01-12 21:13:20 +0000 > Commit: Adrian Chadd > CommitDate: 2021-01-14 07:03:53 +0000 > > [mips] revert r366664 - flip mips back from -O2 to -O > > Now that I have -head fitting in 8MB of flash again, I can test > out freebsd-head on my home AP test setup. Unfortunately, > the introduction of -O2 in r366664 causes the following infinite > loop shortly after boot: > > ------ > > MAP: No valid partition found at map/rootfs.uzip > Warning: no time-of-day clock registered, system time will not be set > accurately > start_init: trying /sbin/init > BAD_PAGE_FAULT: pid 1 tid 100001 (init), uid 0: pc 0x4042c320 got a read > fault (type 0x2) at 0x2e3a0 > Trapframe Register Dump: > zero: 0 at: 0 v0: 0 v1: 0 > a0: 0x1af34 a1: 0 a2: 0 a3: 0x7fffeff0 > t0: 0 t1: 0 t2: 0 t3: 0 > t4: 0 t5: 0 t6: 0 t7: 0 > t8: 0 t9: 0x152e8 s0: 0x7fffee84 s1: 0 > s2: 0 s3: 0 s4: 0 s5: 0 > s6: 0 s7: 0 k0: 0 k1: 0 > gp: 0x362c0 sp: 0x7fffedf0 s8: 0 ra: 0x40417df0 > sr: 0xf413 mullo: 0 mulhi: 0 badvaddr: > 0x2e3a0 > cause: 0xffffffff80000008 pc: 0x4042c31c > Page table info for pc address 0x4042c320: pde = 0x80712000, pte = > 0xa002065a > Dumping 4 words starting at pc address 0x4042c320: > 8f9980e0 80820000 10400067 00809825 > Page table info for bad address 0x2e3a0: pde = 0, pte = 0 > > ------ > > I'm not yet sure why, but until I figure it out with the mips64/cheri > folk this should be reverted. > > This should only use -O on GCC generated code for MIPS platforms. > > Tested: > > * QCA934x (mips74k) - WDR-3600/WDR-4300 APs > > Differential Revision: https://reviews.freebsd.org/D28122 > --- > share/mk/sys.mk | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/share/mk/sys.mk b/share/mk/sys.mk > index 8f456b28593a..72f458397683 100644 > --- a/share/mk/sys.mk > +++ b/share/mk/sys.mk > @@ -166,7 +166,14 @@ CC ?= c89 > CFLAGS ?= -O > .else > CC ?= cc > +.if ${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc" > +# Note: there are currently issues generating code gcc-6.x targeting > +# code for at least mips32. The system hits infinite page faults > +# when starting /sbin/init if -O2 is used. > +CFLAGS ?= -O -pipe > +.else > CFLAGS ?= -O2 -pipe > +.endif > .if defined(NO_STRICT_ALIASING) > CFLAGS += -fno-strict-aliasing > .endif > _______________________________________________ > dev-commits-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > To unsubscribe, send any mail to > "dev-commits-src-all-unsubscribe@freebsd.org" > -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Thu Jan 14 13:51:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A6844E3350; Thu, 14 Jan 2021 13:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGm1x3Zjkz3tG5; Thu, 14 Jan 2021 13:51: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 6DF5B2B4B; Thu, 14 Jan 2021 13:51: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 10EDpXEJ002403; Thu, 14 Jan 2021 13:51:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EDpXSt002402; Thu, 14 Jan 2021 13:51:33 GMT (envelope-from git) Date: Thu, 14 Jan 2021 13:51:33 GMT Message-Id: <202101141351.10EDpXSt002402@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: cc3c34859eab - main - tcp: fix handling of TCP RST segments missing timestamps 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: cc3c34859eab1b317d0f38731355b53f7d978c97 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 13:51:33 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=cc3c34859eab1b317d0f38731355b53f7d978c97 commit cc3c34859eab1b317d0f38731355b53f7d978c97 Author: Michael Tuexen AuthorDate: 2021-01-13 22:43:40 +0000 Commit: Michael Tuexen CommitDate: 2021-01-14 13:39:35 +0000 tcp: fix handling of TCP RST segments missing timestamps A TCP RST segment should be processed even it is missing TCP timestamps. Reported by: dmgk@, kevans@ Reviewed by: rscheff@, dmgk@ Sponsored by: Netflix, Inc. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28143 --- sys/netinet/tcp_input.c | 21 +++++++++++++++------ sys/netinet/tcp_stacks/bbr.c | 5 +++-- sys/netinet/tcp_stacks/rack.c | 5 +++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 7746ccf24073..dda37d4795c9 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1692,16 +1692,25 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment. + * the segment, unless it is a RST segment. * See section 3.2 of RFC 7323. */ if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: Timestamp missing, " - "segment silently dropped\n", s, __func__); - free(s, M_TCPLOG); + if ((thflags & TH_RST) != 0) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: Timestamp missing, " + "segment processed normally\n", + s, __func__); + free(s, M_TCPLOG); + } + } else { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: Timestamp missing, " + "segment silently dropped\n", s, __func__); + free(s, M_TCPLOG); + } + goto drop; } - goto drop; } /* * If timestamps were not negotiated during SYN/ACK and a diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index ccf138f70719..e59d9b9ff168 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -11463,10 +11463,11 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment. + * the segment, unless it is a RST segment. * See section 3.2 of RFC 7323. */ - if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { + if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS) && + ((thflags & TH_RST) == 0)) { retval = 0; goto done_with_input; } diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index c225377807ba..7c81e8b3a2bc 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -10879,10 +10879,11 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment. + * the segment, unless it is a RST segment. * See section 3.2 of RFC 7323. */ - if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { + if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS) && + ((thflags & TH_RST) == 0)) { way_out = 5; retval = 0; goto done_with_input; From owner-dev-commits-src-all@freebsd.org Thu Jan 14 14:37:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2BA1E4E475E; Thu, 14 Jan 2021 14: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGn3H0mgJz4Rgn; Thu, 14 Jan 2021 14: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 0CAFB39A8; Thu, 14 Jan 2021 14: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 10EEbkf9055102; Thu, 14 Jan 2021 14: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 10EEbkBx055101; Thu, 14 Jan 2021 14:37:46 GMT (envelope-from git) Date: Thu, 14 Jan 2021 14:37:46 GMT Message-Id: <202101141437.10EEbkBx055101@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: 37bd3aa6fac8 - main - amd64: use builtins for all ffs* variants 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: 37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 14:37:47 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8 commit 37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8 Author: Mateusz Guzik AuthorDate: 2021-01-14 12:33:24 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-14 14:37:22 +0000 amd64: use builtins for all ffs* variants While here even up whitespace. --- sys/amd64/include/cpufunc.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 2bf2339c7d6e..763ed2c64c8a 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -160,24 +160,13 @@ enable_intr(void) #ifdef _KERNEL #define HAVE_INLINE_FFS -#define ffs(x) __builtin_ffs(x) +#define ffs(x) __builtin_ffs(x) #define HAVE_INLINE_FFSL - -static __inline __pure2 int -ffsl(long mask) -{ - - return (__builtin_ffsl(mask)); -} +#define ffsl(x) __builtin_ffsl(x) #define HAVE_INLINE_FFSLL - -static __inline __pure2 int -ffsll(long long mask) -{ - return (ffsl((long)mask)); -} +#define ffsll(x) __builtin_ffsll(x) #define HAVE_INLINE_FLS From owner-dev-commits-src-all@freebsd.org Thu Jan 14 14:59:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EFFF4E4EC3; Thu, 14 Jan 2021 14:59:30 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGnXL31Bkz4StF; Thu, 14 Jan 2021 14:59:30 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qt1-x829.google.com with SMTP id c1so3668513qtc.1; Thu, 14 Jan 2021 06:59:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+t38qk+x2HWmYwMFXcT4LlFiK+B0780Dq1gOsv5fCho=; b=WgAdX2ylud3del4c9/nnUzzozXJqAEDgHpY7nvo9b1UFsBR6V98yhH0sxo3+I5VPez m3l8TnK9bSxadKyi2LLWLOQfibTWpRdBTDd/WUZUdMTf2ftouZQ2TmoJyaw45My1r090 T+W/nnAZk/zj9Fe7yGQLkvvUbr+NGARK3Rwtaa6DQJolTORleYBl7slAqK493tuIQxwV VFcOubCmFMlEbqRXX3WOfGrKgG4cIUjmLsV51z1q9tF/7AaD+ChHjqChNS/7fVH7NOYi GHiOR08ex9ywxErTrirptHPDjvUCuiO6Gnt2Drr7Y4bHl4KRT4oBZPBlfcXgomn4+g33 SrGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=+t38qk+x2HWmYwMFXcT4LlFiK+B0780Dq1gOsv5fCho=; b=Gwh+A/Pg7mxYbSsD+a+Vwp3QEPOJBW2uthdT7hbmyxUeDjpVcO8+NCM8lv3KzT941H J8FC6usyCfGj3JL6HLklGA2ML32917lIsKG+BFmixoSVxg16f+GeHdtPkLj59278qfbq vRxhyBIi8xiiK8uUCmUPr0tNzQVrenB8if4t1AlqyRcWW1z/RiG1dtgI9X3xOkz15m8z fCBoPYEZLPh4F9UKDJ6lZbZ/H7Cl3Yk+w0KSqh8A8rbSiM2O75UXyi/y2cLBbfl9VMpY +Uj+9nHD8O+rk/0+yLtGXCsmDAITo1JnsJg7blb1j8qjXx3237HXHDY8NoKNOL+J0ofL 0GrQ== X-Gm-Message-State: AOAM532A61Csma5C37NWZBIx/a1tQ+j+EHwDoUhau/ZGjYUQsHwEA7K1 Voqk7LSP6svJ4EDQm/UkEVwrSu4Oo5E= X-Google-Smtp-Source: ABdhPJwQOk0IbJgnAPLnEc3/rmXJBiEEE1HHoqQjcXXr3vBEc3+AqrZjh06fg8rc4buZ4uMAjqaLxA== X-Received: by 2002:ac8:7754:: with SMTP id g20mr7196105qtu.27.1610636369336; Thu, 14 Jan 2021 06:59:29 -0800 (PST) Received: from mbp.home (200-12-5-188.rev.tribenet.com.br. [200.12.5.188]) by smtp.gmail.com with ESMTPSA id z26sm3038516qki.40.2021.01.14.06.59.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Jan 2021 06:59:28 -0800 (PST) Sender: Renato Botelho Subject: Re: git: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases To: Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> From: Renato Botelho Message-ID: <41f18274-d3c7-409e-5e47-4722c024e994@FreeBSD.org> Date: Thu, 14 Jan 2021 11:59:25 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DGnXL31Bkz4StF 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-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 14:59:30 -0000 On 14/01/21 10:00, Emmanuel Vadot wrote: > The branch main has been updated by manu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 > > commit aef769614f921660cb0262412426034cf5395ae5 > Author: Emmanuel Vadot > AuthorDate: 2021-01-14 12:56:38 +0000 > Commit: Emmanuel Vadot > CommitDate: 2021-01-14 13:00:04 +0000 > > pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases > > The current postfix conversions are: > > CURRENT / STABLE -> .sYYYYMMDDhhmmss > ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 > BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 > RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 > PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p > RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 Wouldn't it be necessary to add timestamp information on PRERELEASE as done on CURRENT/STABLE ? -- Renato Botelho From owner-dev-commits-src-all@freebsd.org Thu Jan 14 15:02:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41E004E51BD; Thu, 14 Jan 2021 15:02:01 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGnbD4L3nz4TGg; Thu, 14 Jan 2021 15:02:00 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1610636513; 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=cl61FrdTd5rSn+NW8+tUFKE0FCotjgr8cK4k1WO1aV0=; b=r2iOBC3dd3ay3U/uG2krDFkLQKXzw+sV6sM5IOEPwChp80QNObLE37g89WNEMJa4fx2Qo2 t0ykQDMxIHb/d3hLglbfzuRhP/YLXAx5kDugl08wAgZxwzk5UpuxjWvP7dO0/yJ3aVh67t c8xApMjBPKan77sz5cR6H0srxdi6lkY= Received: from skull.home.blih.net (lfbn-idf2-1-745-114.w86-247.abo.wanadoo.fr [86.247.192.114]) by mx.blih.net (OpenSMTPD) with ESMTPSA id e81ae03c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 14 Jan 2021 15:01:53 +0000 (UTC) Date: Thu, 14 Jan 2021 16:01:50 +0100 From: Emmanuel Vadot To: Renato Botelho Cc: Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases Message-Id: <20210114160150.1c929cd2e9beceecf182184f@bidouilliste.com> In-Reply-To: <41f18274-d3c7-409e-5e47-4722c024e994@FreeBSD.org> References: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> <41f18274-d3c7-409e-5e47-4722c024e994@FreeBSD.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DGnbD4L3nz4TGg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 15:02:01 -0000 On Thu, 14 Jan 2021 11:59:25 -0300 Renato Botelho wrote: > On 14/01/21 10:00, Emmanuel Vadot wrote: > > The branch main has been updated by manu: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 > > > > commit aef769614f921660cb0262412426034cf5395ae5 > > Author: Emmanuel Vadot > > AuthorDate: 2021-01-14 12:56:38 +0000 > > Commit: Emmanuel Vadot > > CommitDate: 2021-01-14 13:00:04 +0000 > > > > pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases > > > > The current postfix conversions are: > > > > CURRENT / STABLE -> .sYYYYMMDDhhmmss > > ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 > > BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 > > RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 > > PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p > > RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 > > Wouldn't it be necessary to add timestamp information on PRERELEASE as > done on CURRENT/STABLE ? Yes it would, this wasn't one of the reason for the revert but it was brough to me after. -STABLE should always be .sYYYYMMDDhhmmss even when in the PRERELEASE phase. -- Emmanuel Vadot From owner-dev-commits-src-all@freebsd.org Thu Jan 14 15:26:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 192464E5D80 for ; Thu, 14 Jan 2021 15:26: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGp7K08mmz4Vm1; Thu, 14 Jan 2021 15:26: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 EBFD64458; Thu, 14 Jan 2021 15:26: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 10EFQKn7019562; Thu, 14 Jan 2021 15:26:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EFQJP6019559; Thu, 14 Jan 2021 15:26:19 GMT (envelope-from git) Date: Thu, 14 Jan 2021 15:26:19 GMT Message-Id: <202101141526.10EFQJP6019559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Emmanuel Vadot Subject: git: 5ee353c36d3c - vendor/device-tree - Import device tree files from Linux 5.9 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/vendor/device-tree X-Git-Reftype: branch X-Git-Commit: 5ee353c36d3c9c7f63df7c7671875e73fba70958 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 15:26:21 -0000 The branch vendor/device-tree has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5ee353c36d3c9c7f63df7c7671875e73fba70958 commit 5ee353c36d3c9c7f63df7c7671875e73fba70958 Author: Emmanuel Vadot AuthorDate: 2021-01-14 15:25:07 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-14 15:25:07 +0000 Import device tree files from Linux 5.9 --- Bindings/arm/amazon,al.yaml | 33 + Bindings/arm/amlogic.yaml | 1 + Bindings/arm/arm,integrator.yaml | 6 +- Bindings/arm/arm,realview.yaml | 66 +- Bindings/arm/arm,scmi.txt | 2 +- Bindings/arm/arm,scpi.txt | 2 +- Bindings/arm/arm,vexpress-juno.yaml | 12 +- Bindings/arm/bcm/brcm,bcm11351.yaml | 2 +- Bindings/arm/bcm/brcm,bcm21664.yaml | 2 +- Bindings/arm/bcm/brcm,bcm23550.yaml | 2 +- Bindings/arm/bcm/brcm,cygnus.yaml | 20 +- Bindings/arm/bcm/brcm,hr2.yaml | 2 +- Bindings/arm/bcm/brcm,ns2.yaml | 4 +- Bindings/arm/bcm/brcm,nsp.yaml | 14 +- Bindings/arm/bcm/brcm,stingray.yaml | 6 +- Bindings/arm/bcm/brcm,vulcan-soc.yaml | 4 +- Bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml | 68 + Bindings/arm/coresight-cti.yaml | 20 +- Bindings/arm/coresight.txt | 13 + Bindings/arm/cpus.yaml | 4 +- Bindings/arm/freescale/fsl,scu.txt | 2 +- Bindings/arm/fsl.yaml | 18 +- Bindings/arm/intel,keembay.yaml | 19 + Bindings/arm/keystone/ti,k3-sci-common.yaml | 44 + Bindings/arm/marvell/ap80x-system-controller.txt | 2 +- Bindings/arm/marvell/cp110-system-controller.txt | 2 +- Bindings/arm/mediatek.yaml | 5 + Bindings/arm/mediatek/mediatek,pericfg.yaml | 30 +- Bindings/arm/microchip,sparx5.yaml | 65 + Bindings/arm/mstar/mstar,l3bridge.yaml | 44 + Bindings/arm/mstar/mstar.yaml | 33 + Bindings/arm/nvidia,tegra194-ccplex.yaml | 69 + Bindings/arm/renesas.yaml | 13 + Bindings/arm/rockchip.yaml | 6 + Bindings/arm/stm32/st,stm32-syscon.yaml | 14 +- Bindings/arm/sunxi.yaml | 5 + Bindings/arm/tegra.yaml | 18 + Bindings/bus/baikal,bt1-apb.yaml | 2 +- Bindings/bus/baikal,bt1-axi.yaml | 2 +- Bindings/bus/mti,mips-cdmm.yaml | 35 + Bindings/clock/brcm,bcm2711-dvp.yaml | 47 + Bindings/clock/brcm,bcm63xx-clocks.txt | 2 + Bindings/clock/clock-bindings.txt | 2 +- Bindings/clock/idt,versaclock5.yaml | 154 ++ Bindings/clock/imx23-clock.yaml | 2 +- Bindings/clock/imx28-clock.yaml | 2 +- Bindings/clock/imx35-clock.yaml | 2 +- Bindings/clock/imx7ulp-pcc-clock.yaml | 121 ++ Bindings/clock/imx7ulp-scg-clock.yaml | 99 ++ Bindings/clock/imx8qxp-lpcg.yaml | 2 +- Bindings/clock/ingenic,cgu.yaml | 16 +- Bindings/clock/microchip,sparx5-dpll.yaml | 52 + Bindings/clock/qcom,a53pll.yaml | 21 +- Bindings/clock/qcom,gpucc.yaml | 82 + Bindings/clock/qcom,mmcc.yaml | 2 +- Bindings/clock/qcom,msm8996-apcc.yaml | 54 + Bindings/clock/qcom,rpmcc.txt | 4 + Bindings/clock/qcom,sc7180-lpasscorecc.yaml | 108 ++ Bindings/clock/renesas,cpg-clocks.yaml | 241 +++ Bindings/clock/renesas,cpg-mssr.yaml | 1 + Bindings/clock/rockchip,rk3288-cru.txt | 8 +- Bindings/clock/silabs,si514.txt | 2 +- Bindings/clock/silabs,si5351.txt | 2 +- Bindings/clock/silabs,si570.txt | 4 +- Bindings/clock/sprd,sc9863a-clk.yaml | 2 +- Bindings/clock/ti,cdce706.txt | 2 +- Bindings/clock/ti,cdce925.txt | 8 +- Bindings/cpufreq/cpufreq-dt.txt | 3 +- Bindings/cpufreq/cpufreq-mediatek.txt | 4 +- Bindings/cpufreq/nvidia,tegra20-cpufreq.txt | 2 +- Bindings/crypto/ti,sa2ul.yaml | 76 + Bindings/devfreq/rk3399_dmc.txt | 2 + .../display/allwinner,sun8i-a83t-de2-mixer.yaml | 3 + Bindings/display/brcm,bcm2835-dpi.yaml | 62 + Bindings/display/brcm,bcm2835-dsi0.yaml | 84 + Bindings/display/brcm,bcm2835-hdmi.yaml | 79 + Bindings/display/brcm,bcm2835-hvs.yaml | 37 + Bindings/display/brcm,bcm2835-pixelvalve0.yaml | 40 + Bindings/display/brcm,bcm2835-txp.yaml | 37 + Bindings/display/brcm,bcm2835-v3d.yaml | 42 + Bindings/display/brcm,bcm2835-vc4.yaml | 34 + Bindings/display/brcm,bcm2835-vec.yaml | 44 + Bindings/display/bridge/nwl-dsi.yaml | 22 +- Bindings/display/bridge/renesas,lvds.yaml | 248 +++ Bindings/display/bridge/simple-bridge.yaml | 18 +- Bindings/display/bridge/ti,sn65dsi86.yaml | 293 ++++ Bindings/display/bridge/ti,tfp410.yaml | 131 ++ .../display/connector/analog-tv-connector.yaml | 52 + Bindings/display/connector/dvi-connector.yaml | 70 + Bindings/display/connector/hdmi-connector.yaml | 64 + Bindings/display/connector/vga-connector.yaml | 46 + Bindings/display/dsi-controller.yaml | 10 +- Bindings/display/ilitek,ili9486.yaml | 4 +- Bindings/display/ingenic,ipu.yaml | 65 + Bindings/display/ingenic,lcd.yaml | 126 ++ Bindings/display/msm/dsi.txt | 1 + Bindings/display/msm/gmu.yaml | 38 +- Bindings/display/msm/gpu.txt | 28 + .../display/panel/asus,z00t-tm5p5-nt35596.yaml | 4 +- Bindings/display/panel/boe,tv101wum-nl6.yaml | 12 +- Bindings/display/panel/elida,kd35t133.yaml | 4 +- Bindings/display/panel/feixin,k101-im2ba02.yaml | 6 +- Bindings/display/panel/ilitek,ili9322.yaml | 3 +- Bindings/display/panel/ilitek,ili9881c.yaml | 3 +- Bindings/display/panel/leadtek,ltk050h3146w.yaml | 4 +- Bindings/display/panel/leadtek,ltk500hd1829.yaml | 4 +- Bindings/display/panel/novatek,nt35510.yaml | 4 +- Bindings/display/panel/panel-dsi-cm.yaml | 86 + Bindings/display/panel/panel-simple-dsi.yaml | 2 + Bindings/display/panel/panel-simple.yaml | 8 + Bindings/display/panel/panel-timing.yaml | 20 +- Bindings/display/panel/raydium,rm68200.yaml | 4 +- Bindings/display/panel/rocktech,jh057n00900.yaml | 71 + .../display/panel/samsung,s6e88a0-ams452ef01.yaml | 4 +- Bindings/display/panel/samsung,s6e8aa0.yaml | 100 ++ Bindings/display/panel/sharp,lq101r1sx01.yaml | 87 + Bindings/display/panel/visionox,rm69299.yaml | 2 +- Bindings/display/simple-framebuffer.yaml | 44 +- Bindings/display/st,stm32-dsi.yaml | 3 +- Bindings/display/ti/ti,j721e-dss.yaml | 2 +- Bindings/display/tilcdc/tilcdc.txt | 2 +- Bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 174 ++ Bindings/dma/arm-pl330.txt | 1 + Bindings/dma/owl-dma.yaml | 79 + Bindings/dma/renesas,rcar-dmac.yaml | 1 + Bindings/dma/renesas,usb-dmac.yaml | 2 + Bindings/dma/snps,dma-spear1340.yaml | 176 ++ Bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml | 68 + Bindings/dsp/fsl,dsp.yaml | 4 +- Bindings/example-schema.yaml | 4 +- Bindings/firmware/qcom,scm.txt | 2 + Bindings/fpga/fpga-region.txt | 2 +- Bindings/fpga/xilinx-slave-serial.txt | 16 +- Bindings/fsi/ibm,fsi2spi.yaml | 2 +- Bindings/fuse/nvidia,tegra20-fuse.txt | 5 +- Bindings/gpio/brcm,xgs-iproc-gpio.yaml | 6 +- Bindings/gpio/gpio-mxs.yaml | 2 +- Bindings/gpio/gpio-pca953x.txt | 1 + Bindings/gpio/gpio-pca9570.yaml | 47 + Bindings/gpio/gpio-zynq.txt | 4 +- Bindings/gpio/mrvl-gpio.yaml | 173 ++ Bindings/gpio/renesas,rcar-gpio.yaml | 58 +- Bindings/gpio/sgpio-aspeed.txt | 5 +- Bindings/gpu/nvidia,gk20a.txt | 25 + Bindings/gpu/vivante,gc.yaml | 3 +- Bindings/hwlock/qcom-hwspinlock.yaml | 42 + Bindings/hwmon/adi,axi-fan-control.yaml | 2 +- Bindings/hwmon/gpio-fan.txt | 3 +- Bindings/hwmon/lm90.txt | 4 +- Bindings/hwmon/microchip,sparx5-temp.yaml | 44 + Bindings/hwmon/ti,tmp513.yaml | 4 +- Bindings/i2c/i2c-gpio.yaml | 8 +- Bindings/i2c/i2c-imx-lpi2c.yaml | 47 + Bindings/i2c/i2c-imx.yaml | 103 ++ Bindings/i2c/i2c-mt65xx.txt | 1 + Bindings/i2c/i2c-mxs.yaml | 51 + Bindings/i2c/i2c-pxa.yaml | 74 + Bindings/i2c/i2c.txt | 10 + Bindings/i2c/marvell,mv64xxx-i2c.yaml | 3 + Bindings/i2c/nvidia,tegra20-i2c.txt | 19 +- Bindings/i2c/renesas,i2c.txt | 1 + Bindings/i2c/renesas,iic.txt | 1 + Bindings/iio/accel/adi,adxl345.yaml | 4 +- Bindings/iio/accel/kionix,kxsd9.yaml | 65 + Bindings/iio/adc/adi,ad7606.yaml | 8 +- Bindings/iio/adc/ingenic,adc.yaml | 71 + Bindings/iio/adc/maxim,max1238.yaml | 2 +- Bindings/iio/adc/qcom,spmi-vadc.yaml | 276 ++++ Bindings/iio/adc/rockchip-saradc.yaml | 8 +- Bindings/iio/adc/ti,ads8688.yaml | 45 + Bindings/iio/amplifiers/adi,hmc425a.yaml | 4 +- Bindings/iio/chemical/atlas,sensor.yaml | 4 +- Bindings/iio/chemical/sensirion,scd30.yaml | 68 + Bindings/iio/dac/adi,ad5770r.yaml | 60 +- Bindings/iio/dac/ti,dac7612.txt | 2 +- Bindings/iio/iio-bindings.txt | 2 +- Bindings/iio/imu/bosch,bmi160.yaml | 14 + Bindings/iio/imu/invensense,icm42600.yaml | 90 + Bindings/iio/light/apds9300.txt | 2 +- Bindings/iio/light/apds9960.txt | 2 +- Bindings/iio/light/opt3001.txt | 2 +- Bindings/iio/light/vishay,vcnl4000.yaml | 22 +- Bindings/iio/light/vl6180.txt | 2 +- Bindings/iio/magnetometer/asahi-kasei,ak8975.yaml | 83 + Bindings/iio/magnetometer/bmc150_magn.txt | 6 +- Bindings/iio/multiplexer/io-channel-mux.txt | 2 +- Bindings/iio/potentiometer/mcp41010.txt | 2 +- Bindings/iio/potentiostat/lmp91000.txt | 4 +- Bindings/iio/pressure/asc,dlhl60d.yaml | 2 +- Bindings/iio/proximity/devantech-srf04.yaml | 4 +- Bindings/iio/proximity/vishay,vcnl3020.yaml | 4 +- Bindings/iio/temperature/adi,ltc2983.yaml | 2 +- Bindings/input/imx-keypad.yaml | 85 + Bindings/input/matrix-keymap.txt | 28 +- Bindings/input/matrix-keymap.yaml | 46 + Bindings/input/touchscreen/cypress,cy8ctma140.yaml | 2 +- Bindings/input/touchscreen/edt-ft5x06.yaml | 10 +- Bindings/input/touchscreen/eeti,exc3000.yaml | 58 + Bindings/input/touchscreen/goodix.yaml | 5 +- Bindings/input/touchscreen/touchscreen.yaml | 12 +- Bindings/interconnect/fsl,imx8m-noc.yaml | 20 +- Bindings/interconnect/qcom,sc7180.yaml | 2 +- Bindings/interconnect/qcom,sdm845.yaml | 2 +- Bindings/interrupt-controller/arm,gic.yaml | 4 +- Bindings/interrupt-controller/brcm,l2-intc.txt | 5 +- Bindings/interrupt-controller/ingenic,intc.yaml | 22 +- Bindings/interrupt-controller/loongson,htvec.yaml | 4 +- .../interrupt-controller/loongson,liointc.yaml | 4 +- Bindings/interrupt-controller/mrvl,intc.yaml | 134 ++ Bindings/interrupt-controller/mti,gic.yaml | 146 ++ .../interrupt-controller/renesas,rza1-irqc.yaml | 80 + Bindings/interrupt-controller/ti,sci-inta.yaml | 98 ++ Bindings/interrupt-controller/ti,sci-intr.yaml | 102 ++ Bindings/iommu/arm,smmu.yaml | 31 +- Bindings/iommu/mediatek,iommu.txt | 2 + Bindings/iommu/renesas,ipmmu-vmsa.yaml | 2 + Bindings/leds/backlight/gpio-backlight.yaml | 41 + Bindings/leds/backlight/led-backlight.yaml | 57 + Bindings/leds/backlight/pwm-backlight.yaml | 104 ++ Bindings/leds/backlight/qcom-wled.yaml | 3 +- Bindings/leds/cznic,turris-omnia-leds.yaml | 90 + Bindings/leds/leds-class-multicolor.yaml | 37 + Bindings/leds/leds-lm3532.txt | 2 +- Bindings/leds/leds-lm3601x.txt | 4 +- Bindings/leds/leds-lm36274.txt | 2 +- Bindings/leds/leds-lm3692x.txt | 2 +- Bindings/leds/leds-lm3697.txt | 2 +- Bindings/leds/leds-lp55xx.yaml | 220 +++ Bindings/leds/leds-lp8860.txt | 2 +- Bindings/leds/leds-pca955x.txt | 6 +- Bindings/mailbox/fsl,mu.yaml | 12 +- Bindings/mailbox/mtk-gce.txt | 8 +- Bindings/mailbox/qcom,apcs-kpss-global.yaml | 2 + Bindings/mailbox/qcom-ipcc.yaml | 2 +- .../media/allwinner,sun8i-a83t-de2-rotate.yaml | 4 +- Bindings/media/allwinner,sun8i-h3-deinterlace.yaml | 4 +- Bindings/media/i2c/adv7180.yaml | 183 +++ Bindings/media/i2c/chrontel,ch7322.yaml | 67 + Bindings/media/i2c/dongwoon,dw9768.yaml | 97 ++ Bindings/media/i2c/imi,rdacm2x-gmsl.yaml | 159 ++ Bindings/media/i2c/maxim,max9286.yaml | 366 +++++ Bindings/media/i2c/ov8856.yaml | 3 +- Bindings/media/i2c/sony,imx274.yaml | 76 + Bindings/media/renesas,csi2.yaml | 18 +- Bindings/media/renesas,fcp.yaml | 66 + Bindings/media/renesas,fdp1.yaml | 69 + Bindings/media/renesas,vsp1.yaml | 97 ++ Bindings/media/rockchip-vpu.yaml | 4 +- Bindings/media/xilinx/video.txt | 2 +- Bindings/media/xilinx/xlnx,csi2rxss.yaml | 236 +++ Bindings/memory-controllers/fsl/mmdc.yaml | 49 + Bindings/memory-controllers/ingenic,nemc.yaml | 8 +- .../memory-controllers/mediatek,smi-common.txt | 5 +- Bindings/memory-controllers/mediatek,smi-larb.txt | 3 +- Bindings/memory-controllers/renesas,rpc-if.yaml | 88 + Bindings/memory-controllers/st,stm32-fmc2-ebi.yaml | 252 +++ Bindings/mfd/aspeed-lpc.txt | 2 +- Bindings/mfd/cirrus,madera.yaml | 34 +- Bindings/mfd/da9062.txt | 4 +- Bindings/mfd/gateworks-gsc.yaml | 9 +- Bindings/mfd/google,cros-ec.yaml | 129 ++ Bindings/mfd/khadas,mcu.yaml | 44 + Bindings/mfd/st,stm32-lptimer.yaml | 5 + Bindings/mfd/st,stmfx.yaml | 122 ++ Bindings/mfd/st,stpmic1.yaml | 24 +- Bindings/mfd/syscon.yaml | 5 +- Bindings/mfd/ti,j721e-system-controller.yaml | 73 + Bindings/mfd/tps6507x.txt | 0 Bindings/mfd/twl-family.txt | 2 +- Bindings/mfd/wlf,arizona.yaml | 22 +- Bindings/mips/ingenic/devices.yaml | 17 +- Bindings/mips/ingenic/ingenic,cpu.yaml | 67 + Bindings/mips/loongson/devices.yaml | 20 +- Bindings/misc/fsl,qoriq-mc.txt | 52 +- Bindings/misc/olpc,xo1.75-ec.yaml | 52 + Bindings/mmc/amlogic,meson-mx-sdhc.yaml | 6 +- Bindings/mmc/arasan,sdhci.yaml | 303 ++++ Bindings/mmc/fsl-imx-esdhc.yaml | 124 ++ Bindings/mmc/fsl-imx-mmc.yaml | 53 + Bindings/mmc/ingenic,mmc.yaml | 14 +- Bindings/mmc/mmc-controller.yaml | 5 + Bindings/mmc/mmc-pwrseq-emmc.yaml | 46 + Bindings/mmc/mmc-pwrseq-sd8787.yaml | 39 + Bindings/mmc/mmc-pwrseq-simple.yaml | 62 + Bindings/mmc/mtk-sd.txt | 3 + Bindings/mmc/mxs-mmc.yaml | 58 + Bindings/mmc/nvidia,tegra20-sdhci.txt | 32 +- Bindings/mmc/renesas,sdhi.yaml | 191 +++ Bindings/mmc/sdhci-am654.txt | 1 + Bindings/mmc/sdhci-msm.txt | 18 + Bindings/mtd/arasan,nand-controller.yaml | 8 +- Bindings/mtd/davinci-nand.txt | 4 +- Bindings/mtd/fsl-upm-nand.txt | 10 +- Bindings/mtd/gpmi-nand.yaml | 118 ++ Bindings/mtd/mxc-nand.yaml | 42 + Bindings/mtd/nand-controller.yaml | 7 + Bindings/mtd/st,stm32-fmc2-nand.yaml | 85 +- Bindings/net/amlogic,meson-dwmac.yaml | 3 + Bindings/net/dsa/dsa.txt | 255 +-- Bindings/net/dsa/dsa.yaml | 92 ++ Bindings/net/dsa/ocelot.txt | 105 +- Bindings/net/ethernet-controller.yaml | 3 +- Bindings/net/ethernet-phy.yaml | 12 + Bindings/net/mdio.yaml | 7 + Bindings/net/mscc-phy-vsc8531.txt | 3 + Bindings/net/qcom,ipa.yaml | 12 +- Bindings/net/realtek-bluetooth.yaml | 2 +- Bindings/net/renesas,ether.yaml | 22 +- Bindings/net/renesas,ravb.txt | 1 + Bindings/net/socionext,uniphier-ave4.yaml | 12 +- Bindings/net/stm32-dwmac.yaml | 12 +- Bindings/net/ti,cpsw-switch.yaml | 62 +- Bindings/net/ti,dp83867.yaml | 2 +- Bindings/net/ti,dp83869.yaml | 18 +- Bindings/net/ti,k3-am654-cpsw-nuss.yaml | 66 +- Bindings/net/wireless/microchip,wilc1000.yaml | 71 + Bindings/nvmem/allwinner,sun4i-a10-sid.yaml | 19 +- Bindings/nvmem/imx-ocotp.yaml | 24 +- Bindings/nvmem/qcom,qfprom.yaml | 96 ++ Bindings/pci/cdns,cdns-pcie-host.yaml | 8 +- Bindings/pci/intel-gw-pcie.yaml | 8 + Bindings/pci/nvidia,tegra20-pcie.txt | 12 - Bindings/pci/pci.txt | 4 +- Bindings/pci/qcom,pcie.txt | 15 +- Bindings/pci/ti,j721e-pci-ep.yaml | 93 ++ Bindings/pci/ti,j721e-pci-host.yaml | 112 ++ Bindings/pci/xilinx-versal-cpm.yaml | 99 ++ Bindings/phy/amlogic,meson-g12a-usb2-phy.yaml | 6 +- Bindings/phy/brcm,bcm63xx-usbh-phy.yaml | 79 + Bindings/phy/phy-armada38x-comphy.txt | 10 +- Bindings/phy/phy-rockchip-inno-usb2.yaml | 6 +- Bindings/phy/qcom,ipq806x-usb-phy-hs.yaml | 55 + Bindings/phy/qcom,ipq806x-usb-phy-ss.yaml | 73 + Bindings/phy/qcom,qmp-phy.yaml | 15 +- Bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 9 +- Bindings/phy/qcom,qusb2-phy.yaml | 29 +- Bindings/phy/renesas,usb2-phy.yaml | 1 + Bindings/phy/renesas,usb3-phy.yaml | 1 + Bindings/phy/samsung,ufs-phy.yaml | 75 + Bindings/phy/socionext,uniphier-pcie-phy.yaml | 8 +- Bindings/phy/socionext,uniphier-usb3hs-phy.yaml | 12 +- Bindings/phy/socionext,uniphier-usb3ss-phy.yaml | 22 +- Bindings/phy/ti,phy-gmii-sel.yaml | 104 ++ Bindings/phy/ti,phy-j721e-wiz.yaml | 3 +- Bindings/phy/xlnx,zynqmp-psgtr.yaml | 105 ++ Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 32 +- Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 36 +- Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml | 96 +- Bindings/pinctrl/ingenic,pinctrl.yaml | 176 ++ Bindings/pinctrl/mediatek,mt6779-pinctrl.yaml | 202 +++ Bindings/pinctrl/qcom,ipq4019-pinctrl.txt | 3 +- Bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 54 +- Bindings/pinctrl/qcom,pmic-gpio.txt | 2 + Bindings/pinctrl/qcom,sm8250-pinctrl.yaml | 32 +- Bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 + Bindings/pinctrl/renesas,rza2-pinctrl.yaml | 100 ++ Bindings/pinctrl/st,stm32-pinctrl.yaml | 4 +- Bindings/power/mti,mips-cpc.yaml | 35 + Bindings/power/power-domain.yaml | 14 +- Bindings/power/renesas,rcar-sysc.yaml | 1 + Bindings/power/supply/battery.txt | 86 +- Bindings/power/supply/battery.yaml | 144 ++ Bindings/power/supply/bq2515x.yaml | 93 ++ Bindings/power/supply/bq25890.txt | 30 +- Bindings/power/supply/bq27xxx.yaml | 2 + Bindings/power/supply/gpio-charger.yaml | 63 + Bindings/property-units.txt | 1 + Bindings/pwm/mxs-pwm.yaml | 2 +- Bindings/pwm/pwm-samsung.yaml | 23 +- Bindings/regulator/da9211.txt | 4 + Bindings/regulator/google,cros-ec-regulator.yaml | 51 + Bindings/regulator/lp872x.txt | 4 +- Bindings/regulator/mt6397-regulator.txt | 3 + Bindings/regulator/nxp,pca9450-regulator.yaml | 190 +++ Bindings/regulator/onnn,fan53880.yaml | 85 + Bindings/regulator/qcom,smd-rpm-regulator.yaml | 107 ++ Bindings/regulator/qcom,usb-vbus-regulator.yaml | 41 + Bindings/regulator/qcom-labibb-regulator.yaml | 70 + Bindings/regulator/silergy,sy8827n.yaml | 45 + Bindings/remoteproc/qcom,pil-info.yaml | 44 + Bindings/remoteproc/ti,k3-dsp-rproc.yaml | 184 +++ Bindings/reset/fsl,imx-src.yaml | 82 + Bindings/reset/fsl,imx7-src.yaml | 58 + Bindings/reset/renesas,rst.yaml | 1 + Bindings/reset/socionext,uniphier-reset.yaml | 112 ++ Bindings/reset/uniphier-reset.txt | 121 +- Bindings/rng/imx-rng.txt | 3 + Bindings/rng/ingenic,rng.yaml | 36 + Bindings/rng/silex-insight,ba431-rng.yaml | 36 + Bindings/rtc/atmel,at91sam9-rtc.txt | 4 +- Bindings/rtc/imxdi-rtc.yaml | 44 + Bindings/rtc/ingenic,rtc.yaml | 16 +- Bindings/rtc/sa1100-rtc.yaml | 57 + Bindings/rtc/trivial-rtc.yaml | 2 + Bindings/serial/ingenic,uart.yaml | 20 +- Bindings/serial/st,stm32-uart.yaml | 4 +- Bindings/soc/microchip/atmel,at91rm9200-tcb.yaml | 181 +++ Bindings/soc/qcom/qcom,geni-se.yaml | 30 +- Bindings/soc/qcom/qcom,smd-rpm.yaml | 87 + Bindings/soc/ti/k3-ringacc.yaml | 102 ++ Bindings/sound/adi,adau1977.txt | 6 +- Bindings/sound/ak4613.yaml | 49 + Bindings/sound/ak4642.yaml | 58 + Bindings/sound/amlogic,aiu.yaml | 11 +- Bindings/sound/amlogic,g12a-toacodec.yaml | 10 +- Bindings/sound/cirrus,cs42l51.yaml | 2 +- Bindings/sound/everest,es8316.yaml | 50 + Bindings/sound/fsl,spdif.txt | 6 +- Bindings/sound/fsl-asoc-card.txt | 20 +- Bindings/sound/ingenic,aic.yaml | 12 +- Bindings/sound/intel,keembay-i2s.yaml | 70 + Bindings/sound/max98357a.txt | 12 +- Bindings/sound/maxim,max98390.yaml | 49 + Bindings/sound/mt6358.txt | 6 + Bindings/sound/mt8183-da7219-max98357.txt | 9 +- Bindings/sound/mt8183-mt6358-ts3a227-max98357.txt | 8 +- Bindings/sound/nvidia,tegra186-dspk.yaml | 82 + Bindings/sound/nvidia,tegra210-admaif.yaml | 111 ++ Bindings/sound/nvidia,tegra210-ahub.yaml | 136 ++ Bindings/sound/nvidia,tegra210-dmic.yaml | 82 + Bindings/sound/nvidia,tegra210-i2s.yaml | 100 ++ Bindings/sound/qcom,q6asm.txt | 9 +- Bindings/sound/renesas,fsi.yaml | 19 +- Bindings/sound/renesas,rsnd.txt | 1 + Bindings/sound/rockchip,rk3328-codec.yaml | 69 + Bindings/sound/rockchip-i2s.yaml | 24 +- Bindings/sound/rockchip-spdif.yaml | 4 +- Bindings/sound/rohm,bd28623.yaml | 67 + Bindings/sound/rt1308.txt | 0 Bindings/sound/rt5665.txt | 0 Bindings/sound/samsung,aries-wm8994.yaml | 147 ++ Bindings/sound/samsung,midas-audio.yaml | 108 ++ Bindings/sound/sgtl5000.yaml | 103 ++ Bindings/sound/socionext,uniphier-aio.yaml | 81 + Bindings/sound/socionext,uniphier-evea.yaml | 70 + Bindings/sound/tas2552.txt | 2 +- Bindings/sound/tas2562.txt | 7 +- Bindings/sound/tas2562.yaml | 69 + Bindings/sound/tas2770.yaml | 76 + Bindings/sound/tas5720.txt | 6 +- Bindings/sound/ti,j721e-cpb-audio.yaml | 93 ++ Bindings/sound/ti,j721e-cpb-ivi-audio.yaml | 145 ++ Bindings/sound/ti,tas6424.txt | 2 +- Bindings/sound/tlv320adcx140.yaml | 60 +- Bindings/sound/wm8960.txt | 11 + Bindings/sound/wm8994.txt | 23 + Bindings/spi/allwinner,sun6i-a31-spi.yaml | 8 +- Bindings/spi/brcm,bcm2835-spi.txt | 3 +- Bindings/spi/brcm,spi-bcm-qspi.txt | 16 +- Bindings/spi/fsl-imx-cspi.yaml | 97 ++ Bindings/spi/mikrotik,rb4xx-spi.yaml | 2 +- Bindings/spi/mxs-spi.yaml | 56 + Bindings/spi/renesas,sh-msiof.yaml | 2 + Bindings/spi/spi-davinci.txt | 4 +- Bindings/spi/spi-fsl-lpspi.yaml | 68 + Bindings/spi/spi-lantiq-ssc.txt | 21 +- Bindings/spi/spi-mt65xx.txt | 1 + Bindings/spi/spi-mux.yaml | 74 +- Bindings/spi/spi-rockchip.yaml | 14 +- Bindings/thermal/allwinner,sun8i-a83t-ths.yaml | 2 +- Bindings/thermal/amazon,al-thermal.txt | 2 +- Bindings/thermal/brcm,avs-ro-thermal.yaml | 2 +- Bindings/thermal/brcm,bcm2835-thermal.txt | 2 +- Bindings/thermal/hisilicon-thermal.txt | 2 +- Bindings/thermal/imx-thermal.yaml | 2 +- Bindings/thermal/max77620_thermal.txt | 6 +- Bindings/thermal/mediatek-thermal.txt | 2 +- Bindings/thermal/nvidia,tegra124-soctherm.txt | 10 +- Bindings/thermal/nvidia,tegra186-bpmp-thermal.txt | 2 +- Bindings/thermal/qcom-spmi-temp-alarm.txt | 2 +- Bindings/thermal/qcom-tsens.yaml | 5 +- Bindings/thermal/qoriq-thermal.yaml | 114 ++ Bindings/thermal/rockchip-thermal.txt | 2 +- Bindings/thermal/tango-thermal.txt | 2 +- Bindings/thermal/thermal-cooling-devices.yaml | 6 +- Bindings/thermal/thermal-generic-adc.txt | 2 +- Bindings/thermal/thermal-idle.yaml | 45 +- Bindings/timer/fsl,imxgpt.yaml | 14 +- Bindings/timer/ingenic,sysost.yaml | 63 + Bindings/timer/ingenic,tcu.yaml | 47 +- Bindings/timer/mrvl,mmp-timer.yaml | 46 + Bindings/timer/sifive,clint.yaml | 60 + Bindings/timer/snps,dw-apb-timer.yaml | 4 +- Bindings/timer/ti,keystone-timer.txt | 2 +- Bindings/trivial-devices.yaml | 4 +- Bindings/usb/brcm,bdc.txt | 4 +- Bindings/usb/dwc2.yaml | 37 +- Bindings/usb/generic-ehci.yaml | 2 +- Bindings/usb/ingenic,jz4770-phy.yaml | 6 +- Bindings/usb/ingenic,musb.yaml | 8 +- Bindings/usb/nvidia,tegra-xudc.yaml | 10 +- Bindings/usb/renesas,usb-xhci.yaml | 86 + Bindings/usb/ti,j721e-usb.yaml | 6 +- Bindings/usb/ti,keystone-dwc3.yaml | 51 +- Bindings/usb/usb-xhci.txt | 18 - Bindings/vendor-prefixes.yaml | 19 +- Bindings/virtio/mmio.txt | 2 +- Bindings/watchdog/davinci-wdt.txt | 4 +- Bindings/watchdog/qcom-wdt.yaml | 48 + Bindings/watchdog/renesas,wdt.yaml | 1 + Bindings/watchdog/snps,dw-wdt.yaml | 90 + include/dt-bindings/clk/versaclock.h | 13 + include/dt-bindings/clock/actions,s500-cmu.h | 7 +- include/dt-bindings/clock/agilex-clock.h | 4 +- include/dt-bindings/clock/bcm3368-clock.h | 24 + include/dt-bindings/clock/bcm6318-clock.h | 42 + include/dt-bindings/clock/bcm63268-clock.h | 30 + include/dt-bindings/clock/bcm6328-clock.h | 19 + include/dt-bindings/clock/bcm6358-clock.h | 18 + include/dt-bindings/clock/bcm6362-clock.h | 26 + include/dt-bindings/clock/bcm6368-clock.h | 24 + include/dt-bindings/clock/g12a-clkc.h | 2 + include/dt-bindings/clock/ingenic,sysost.h | 12 + include/dt-bindings/clock/jz4780-cgu.h | 144 +- include/dt-bindings/clock/microchip,sparx5.h | 23 + include/dt-bindings/clock/qcom,apss-ipq.h | 12 + include/dt-bindings/clock/qcom,gcc-ipq8074.h | 4 + include/dt-bindings/clock/qcom,gcc-sc7180.h | 1 + include/dt-bindings/clock/qcom,gcc-sdm660.h | 1 + include/dt-bindings/clock/qcom,gpucc-sm8150.h | 33 + include/dt-bindings/clock/qcom,gpucc-sm8250.h | 34 + .../dt-bindings/clock/qcom,lpasscorecc-sc7180.h | 29 + include/dt-bindings/clock/qcom,rpmcc.h | 16 + include/dt-bindings/clock/r8a774e1-cpg-mssr.h | 59 + include/dt-bindings/clock/vf610-clock.h | 3 +- include/dt-bindings/clock/x1000-cgu.h | 2 + include/dt-bindings/clock/x1830-cgu.h | 2 + include/dt-bindings/dma/xlnx-zynqmp-dpdma.h | 16 + include/dt-bindings/gce/mt6779-gce.h | 222 +++ include/dt-bindings/iio/adc/ingenic,adc.h | 6 + include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h | 67 + include/dt-bindings/iio/qcom,spmi-adc7-pm8350b.h | 88 + include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h | 46 + include/dt-bindings/iio/qcom,spmi-adc7-pmr735a.h | 28 + include/dt-bindings/iio/qcom,spmi-adc7-pmr735b.h | 28 + include/dt-bindings/iio/qcom,spmi-vadc.h | 78 +- include/dt-bindings/leds/common.h | 5 +- include/dt-bindings/memory/mt6779-larb-port.h | 206 +++ include/dt-bindings/mux/mux-j721e-wiz.h | 53 + include/dt-bindings/mux/mux.h | 2 +- include/dt-bindings/phy/phy.h | 1 + include/dt-bindings/pinctrl/k3.h | 2 +- include/dt-bindings/pinctrl/mt6779-pinfunc.h | 1242 ++++++++++++++ include/dt-bindings/pinctrl/omap.h | 2 +- include/dt-bindings/power/qcom-rpmpd.h | 1 + include/dt-bindings/power/r8a774e1-sysc.h | 36 + .../dt-bindings/regulator/dlg,da9211-regulator.h | 16 + .../regulator/mediatek,mt6397-regulator.h | 15 + include/dt-bindings/reset/actions,s500-reset.h | 67 + include/dt-bindings/reset/ti-syscon.h | 2 +- include/dt-bindings/sound/qcom,q6asm.h | 4 + scripts/filter.sh | 2 + src/arc/hsdk.dts | 6 +- src/arm/am335x-baltos-ir2110.dts | 2 +- src/arm/am335x-baltos-ir3220.dts | 2 +- src/arm/am335x-baltos-ir5221.dts | 2 +- src/arm/am335x-baltos-leds.dtsi | 2 +- src/arm/am335x-baltos.dtsi | 2 +- src/arm/am335x-bone-common.dtsi | 2 +- src/arm/am335x-bone.dts | 2 +- src/arm/am335x-boneblack-common.dtsi | 2 +- src/arm/am335x-boneblack-wireless.dts | 2 +- src/arm/am335x-boneblack.dts | 146 +- src/arm/am335x-boneblue.dts | 2 +- src/arm/am335x-bonegreen-common.dtsi | 2 +- src/arm/am335x-bonegreen-wireless.dts | 2 +- src/arm/am335x-bonegreen.dts | 2 +- src/arm/am335x-chiliboard.dts | 2 +- src/arm/am335x-chilisom.dtsi | 2 +- src/arm/am335x-evm.dts | 2 +- src/arm/am335x-evmsk.dts | 2 +- src/arm/am335x-guardian.dts | 2 +- src/arm/am335x-icev2.dts | 2 +- src/arm/am335x-lxm.dts | 2 +- src/arm/am335x-netcan-plus-1xx.dts | 2 +- src/arm/am335x-netcom-plus-2xx.dts | 2 +- src/arm/am335x-netcom-plus-8xx.dts | 2 +- src/arm/am335x-osd3358-sm-red.dts | 4 +- src/arm/am335x-osd335x-common.dtsi | 2 +- src/arm/am335x-pdu001.dts | 2 +- src/arm/am335x-pocketbeagle.dts | 271 ++- src/arm/am335x-sancloud-bbe.dts | 2 +- src/arm/am33xx-l4.dtsi | 26 +- src/arm/am33xx.dtsi | 2 +- src/arm/am3517-craneboard.dts | 2 +- src/arm/am3517-evm-ui.dtsi | 2 +- src/arm/am3517-evm.dts | 2 +- src/arm/am3517.dtsi | 6 +- src/arm/am3874-iceboard.dts | 4 +- src/arm/am4372.dtsi | 4 +- src/arm/am437x-gp-evm.dts | 2 +- src/arm/am437x-idk-evm.dts | 2 +- src/arm/am437x-l4.dtsi | 2 - src/arm/am437x-sk-evm.dts | 2 +- src/arm/am43x-epos-evm.dts | 2 +- src/arm/am57-pruss.dtsi | 2 +- src/arm/am5718.dtsi | 2 +- src/arm/am571x-idk.dts | 2 +- src/arm/am5728.dtsi | 2 +- src/arm/am5729-beagleboneai.dts | 73 +- src/arm/am572x-idk-common.dtsi | 2 +- src/arm/am572x-idk.dts | 2 +- src/arm/am5748.dtsi | 2 +- src/arm/am574x-idk.dts | 2 +- src/arm/am57xx-beagle-x15-common.dtsi | 2 +- src/arm/am57xx-beagle-x15-revb1.dts | 2 +- src/arm/am57xx-beagle-x15-revc.dts | 2 +- src/arm/am57xx-beagle-x15.dts | 2 +- src/arm/am57xx-idk-common.dtsi | 2 +- src/arm/arm-realview-eb-mp.dtsi | 2 +- src/arm/arm-realview-pb1176.dts | 2 +- src/arm/arm-realview-pb11mp.dts | 2 +- src/arm/arm-realview-pbx-a9.dts | 2 +- src/arm/armada-370-dlink-dns327l.dts | 5 +- src/arm/aspeed-bmc-amd-ethanolx.dts | 219 +++ src/arm/aspeed-bmc-facebook-cmm.dts | 1231 +++++++++++++- src/arm/aspeed-bmc-facebook-wedge40.dts | 42 +- src/arm/aspeed-bmc-ibm-rainier.dts | 466 +++++- src/arm/aspeed-bmc-opp-mihawk.dts | 152 ++ src/arm/aspeed-bmc-opp-tacoma.dts | 79 +- src/arm/aspeed-bmc-opp-witherspoon.dts | 11 + src/arm/aspeed-g5.dtsi | 5 +- src/arm/aspeed-g6.dtsi | 15 +- src/arm/at91-sam9x60ek.dts | 13 +- src/arm/at91-sama5d2_icp.dts | 2 +- src/arm/at91-sama5d2_xplained.dts | 30 +- src/arm/at91-sama5d3_xplained.dts | 2 +- src/arm/bcm-cygnus.dtsi | 2 +- src/arm/bcm-hr2.dtsi | 4 +- src/arm/bcm-nsp.dtsi | 4 +- src/arm/bcm21664.dtsi | 2 +- src/arm/bcm2711-rpi-4-b.dts | 5 + src/arm/bcm2711.dtsi | 15 + src/arm/bcm2835-rpi.dtsi | 2 +- src/arm/bcm4708-luxul-xap-1510.dts | 25 + src/arm/bcm4708-luxul-xwc-1000.dts | 20 + src/arm/bcm47081-luxul-xap-1410.dts | 20 + src/arm/bcm47081-luxul-xwr-1200.dts | 40 + src/arm/bcm47094-luxul-xap-1610.dts | 25 + src/arm/bcm47094-luxul-xwc-2000.dts | 20 + src/arm/bcm47094-luxul-xwr-3100.dts | 40 + src/arm/bcm47094-luxul-xwr-3150-v1.dts | 40 + src/arm/bcm5301x.dtsi | 2 +- src/arm/berlin2.dtsi | 2 +- src/arm/berlin2cd.dtsi | 2 +- src/arm/berlin2q.dtsi | 2 +- src/arm/da850-evm.dts | 2 +- src/arm/dra7-dspeve-thermal.dtsi | 2 +- src/arm/dra7-evm-common.dtsi | 2 +- src/arm/dra7-evm.dts | 2 +- src/arm/dra7-iva-thermal.dtsi | 2 +- src/arm/dra7-l4.dtsi | 4 - src/arm/dra7.dtsi | 2 +- src/arm/dra71-evm.dts | 2 +- src/arm/dra71x.dtsi | 2 +- src/arm/dra72-evm-common.dtsi | 2 +- src/arm/dra72-evm-revc.dts | 2 +- src/arm/dra72-evm-tps65917.dtsi | 4 +- src/arm/dra72-evm.dts | 2 +- src/arm/dra72x-mmc-iodelay.dtsi | 2 +- src/arm/dra72x.dtsi | 2 +- src/arm/dra74x-mmc-iodelay.dtsi | 2 +- src/arm/dra74x.dtsi | 60 +- src/arm/dra76-evm.dts | 2 +- src/arm/dra76x.dtsi | 2 +- src/arm/exynos3250-artik5.dtsi | 41 + src/arm/exynos3250.dtsi | 47 +- src/arm/exynos4.dtsi | 70 +- src/arm/exynos4210-trats.dts | 98 +- src/arm/exynos4210-universal_c210.dts | 28 +- src/arm/exynos4210.dtsi | 2 +- src/arm/exynos4412-origen.dts | 21 +- src/arm/exynos4412.dtsi | 2 +- src/arm/exynos5250-arndale.dts | 86 +- src/arm/exynos5250.dtsi | 92 +- src/arm/exynos5410-pinctrl.dtsi | 2 +- src/arm/exynos5410.dtsi | 46 +- src/arm/exynos5420-smdk5420.dts | 53 +- src/arm/exynos5420.dtsi | 130 +- src/arm/exynos5422-odroid-core.dtsi | 6 - src/arm/exynos5800.dtsi | 6 +- src/arm/hi3620.dtsi | 2 +- src/arm/hisi-x5hd2.dtsi | 2 +- src/arm/imx1.dtsi | 2 +- src/arm/imx23.dtsi | 2 +- src/arm/imx25.dtsi | 14 +- src/arm/imx27.dtsi | 10 +- src/arm/imx28.dtsi | 2 +- src/arm/imx31.dtsi | 8 +- src/arm/imx35.dtsi | 10 +- src/arm/imx50.dtsi | 12 +- src/arm/imx51-ts4800.dts | 1 + src/arm/imx51.dtsi | 14 +- src/arm/imx53-kp.dtsi | 8 + src/arm/imx53-m53evk.dts | 1 + src/arm/imx53-ppd.dts | 51 +- src/arm/imx53-tqma53.dtsi | 8 + src/arm/imx53-tx53.dtsi | 1 - src/arm/imx53.dtsi | 14 +- src/arm/imx6dl-aristainetos_4.dts | 1 + src/arm/imx6dl-aristainetos_7.dts | 1 + src/arm/imx6dl-mamoj.dts | 1 + src/arm/imx6dl-prtrvt.dts | 184 +++ src/arm/imx6dl-prtvt7.dts | 411 +++++ src/arm/imx6dl-yapp4-common.dtsi | 1 - src/arm/imx6q-ba16.dtsi | 1 + src/arm/imx6q-dhcom-pdk2.dts | 1 - src/arm/imx6q-display5.dtsi | 1 - src/arm/imx6q-kp.dtsi | 2 + src/arm/imx6q-logicpd.dts | 2 +- src/arm/imx6q-mccmon6.dts | 1 - src/arm/imx6q-novena.dts | 1 + src/arm/imx6q-pistachio.dts | 1 + src/arm/imx6q-prti6q.dts | 543 +++++++ src/arm/imx6q-prtwd2.dts | 188 +++ src/arm/imx6q-tbs2910.dts | 14 +- src/arm/imx6q-var-dt6customboard.dts | 1 + src/arm/imx6qdl-apalis.dtsi | 1 + src/arm/imx6qdl-apf6dev.dtsi | 1 + src/arm/imx6qdl-aristainetos2.dtsi | 1 + src/arm/imx6qdl-colibri.dtsi | 2 +- src/arm/imx6qdl-cubox-i.dtsi | 1 + src/arm/imx6qdl-emcon.dtsi | 3 + src/arm/imx6qdl-gw51xx.dtsi | 151 +- src/arm/imx6qdl-gw52xx.dtsi | 160 +- src/arm/imx6qdl-gw53xx.dtsi | 166 +- src/arm/imx6qdl-gw54xx.dtsi | 168 +- src/arm/imx6qdl-gw551x.dtsi | 147 +- src/arm/imx6qdl-gw552x.dtsi | 153 +- src/arm/imx6qdl-gw553x.dtsi | 141 +- src/arm/imx6qdl-gw560x.dtsi | 165 +- src/arm/imx6qdl-gw5903.dtsi | 141 +- src/arm/imx6qdl-gw5904.dtsi | 142 +- src/arm/imx6qdl-gw5907.dtsi | 142 +- src/arm/imx6qdl-gw5910.dtsi | 160 +- src/arm/imx6qdl-gw5912.dtsi | 148 +- src/arm/imx6qdl-gw5913.dtsi | 153 +- src/arm/imx6qdl-icore.dtsi | 1 + src/arm/imx6qdl-nit6xlite.dtsi | 2 + src/arm/imx6qdl-nitrogen6_max.dtsi | 3 + src/arm/imx6qdl-nitrogen6_som2.dtsi | 2 + src/arm/imx6qdl-nitrogen6x.dtsi | 2 + src/arm/imx6qdl-phytec-mira.dtsi | 1 + src/arm/imx6qdl-prti6q.dtsi | 163 ++ src/arm/imx6qdl-sabreauto.dtsi | 1 + src/arm/imx6qdl-sabrelite.dtsi | 3 + src/arm/imx6qdl-sabresd.dtsi | 15 +- src/arm/imx6qdl-savageboard.dtsi | 1 + src/arm/imx6qdl-tx6.dtsi | 2 - src/arm/imx6qdl-zii-rdu2.dtsi | 2 + src/arm/imx6qdl.dtsi | 45 +- src/arm/imx6qp-sabreauto.dts | 4 + src/arm/imx6qp-sabresd.dts | 4 + src/arm/imx6sl-evk.dts | 1 + src/arm/imx6sl.dtsi | 40 +- src/arm/imx6sll-evk.dts | 1 + src/arm/imx6sll.dtsi | 38 +- src/arm/imx6sx-nitrogen6sx.dts | 1 + src/arm/imx6sx-pinfunc.h | 2 +- src/arm/imx6sx-sabreauto.dts | 96 ++ src/arm/imx6sx-sdb-mqs.dts | 48 + src/arm/imx6sx-sdb.dtsi | 31 + src/arm/imx6sx-softing-vining-2000.dts | 3 + src/arm/imx6sx.dtsi | 80 +- src/arm/imx6ul-14x14-evk.dtsi | 1 + src/arm/imx6ul-ccimx6ulsbcpro.dts | 1 + src/arm/imx6ul-geam.dts | 1 + src/arm/imx6ul-imx6ull-opos6uldev.dtsi | 1 + src/arm/imx6ul-isiot.dtsi | 1 + src/arm/imx6ul-kontron-n6310-s-43.dts | 1 + src/arm/imx6ul-kontron-n6x1x-s.dtsi | 1 + src/arm/imx6ul-pico.dtsi | 1 + src/arm/imx6ul-tx6ul.dtsi | 1 - src/arm/imx6ul.dtsi | 67 +- src/arm/imx6ull-colibri.dtsi | 4 - src/arm/imx6ull-myir-mys-6ulx-eval.dts | 18 + src/arm/imx6ull-myir-mys-6ulx.dtsi | 238 +++ src/arm/imx7d-zii-rmu2.dts | 2 +- src/arm/imx7s.dtsi | 28 +- src/arm/imx7ulp.dtsi | 10 +- src/arm/infinity-msc313-breadbee_crust.dts | 25 + src/arm/infinity-msc313.dtsi | 14 + src/arm/infinity.dtsi | 11 + src/arm/infinity3-msc313e-breadbee.dts | 25 + src/arm/infinity3-msc313e.dtsi | 14 + src/arm/infinity3.dtsi | 11 + src/arm/kirkwood-b3.dts | 2 +- src/arm/logicpd-som-lv-baseboard.dtsi | 29 +- src/arm/logicpd-torpedo-baseboard.dtsi | 2 + src/arm/ls1021a.dtsi | 19 +- src/arm/mercury5-ssc8336n-midrived08.dts | 25 + src/arm/mercury5-ssc8336n.dtsi | 14 + src/arm/mercury5.dtsi | 11 + src/arm/meson.dtsi | 7 + src/arm/meson8.dtsi | 32 + src/arm/meson8b-ec100.dts | 25 + src/arm/meson8b-odroidc1.dts | 26 + src/arm/meson8b.dtsi | 47 + src/arm/meson8m2.dtsi | 23 + src/arm/mmp2-olpc-xo-1-75.dts | 78 +- src/arm/mmp2.dtsi | 89 +- src/arm/mmp3-dell-ariel.dts | 8 + src/arm/mmp3.dtsi | 25 + src/arm/motorola-mapphone-common.dtsi | 4 +- src/arm/mstar-v7.dtsi | 107 ++ src/arm/omap2.dtsi | 2 +- src/arm/omap2420-h4.dts | 2 +- src/arm/omap2420.dtsi | 2 +- src/arm/omap2430-sdp.dts | 2 +- src/arm/omap2430.dtsi | 2 +- src/arm/omap3-beagle-xm-ab.dts | 2 +- src/arm/omap3-beagle-xm.dts | 2 +- src/arm/omap3-beagle.dts | 2 +- src/arm/omap3-cpu-thermal.dtsi | 2 +- src/arm/omap3-evm-37xx.dts | 2 +- src/arm/omap3-evm.dts | 2 +- src/arm/omap3-ha-common.dtsi | 2 +- src/arm/omap3-ha-lcd.dts | 2 +- src/arm/omap3-ha.dts | 2 +- src/arm/omap3-ldp.dts | 2 +- src/arm/omap3-n900.dts | 6 +- src/arm/omap3-tao3530.dtsi | 8 +- src/arm/omap3-thunder.dts | 2 +- src/arm/omap3-zoom3.dts | 2 +- src/arm/omap3.dtsi | 59 +- src/arm/omap3430-sdp.dts | 2 +- src/arm/omap34xx.dtsi | 2 +- src/arm/omap36xx.dtsi | 2 +- src/arm/omap4-cpu-thermal.dtsi | 2 +- src/arm/omap4-l4-abe.dtsi | 20 +- src/arm/omap4-l4.dtsi | 37 +- src/arm/omap4-panda-a4.dts | 2 +- src/arm/omap4-panda-common.dtsi | 36 +- src/arm/omap4-panda-es.dts | 2 +- src/arm/omap4-panda.dts | 2 +- src/arm/omap4-sdp-es23plus.dts | 2 +- src/arm/omap4-sdp.dts | 6 +- src/arm/omap4-var-som-om44.dtsi | 2 +- src/arm/omap4.dtsi | 33 +- src/arm/omap443x.dtsi | 2 +- src/arm/omap4460.dtsi | 2 +- src/arm/omap5-board-common.dtsi | 2 +- src/arm/omap5-core-thermal.dtsi | 2 +- src/arm/omap5-gpu-thermal.dtsi | 2 +- src/arm/omap5-l4-abe.dtsi | 20 +- src/arm/omap5-l4.dtsi | 38 +- src/arm/omap5-uevm.dts | 36 +- src/arm/omap5.dtsi | 47 +- src/arm/qcom-ipq8064-rb3011.dts | 308 ++++ src/arm/qcom-ipq8064.dtsi | 115 ++ src/arm/r7s72100.dtsi | 4 +- src/arm/r7s9210.dtsi | 4 +- src/arm/r8a73a4.dtsi | 6 +- src/arm/r8a7740.dtsi | 6 +- src/arm/r8a7742-iwg21d-q7-dbcm-ca.dts | 97 ++ src/arm/r8a7742-iwg21d-q7.dts | 187 +++ src/arm/r8a7742.dtsi | 854 ++++++++++ src/arm/r8a7743.dtsi | 6 +- src/arm/r8a7744.dtsi | 6 +- src/arm/r8a7745.dtsi | 6 +- src/arm/r8a77470.dtsi | 6 +- src/arm/r8a7778.dtsi | 9 +- src/arm/r8a7779.dtsi | 8 +- src/arm/r8a7790-lager.dts | 1 - src/arm/r8a7790.dtsi | 8 +- src/arm/r8a7791-koelsch.dts | 1 - src/arm/r8a7791-porter.dts | 1 - src/arm/r8a7791.dtsi | 6 +- src/arm/r8a7792.dtsi | 2 +- src/arm/r8a7793-gose.dts | 5 +- src/arm/r8a7793.dtsi | 6 +- src/arm/r8a7794-alt.dts | 1 - src/arm/r8a7794-silk.dts | 1 - src/arm/r8a7794.dtsi | 6 +- src/arm/r9a06g032.dtsi | 2 +- src/arm/rk3036.dtsi | 1 + src/arm/rk322x.dtsi | 7 +- src/arm/rk3288-rock-pi-n8.dts | 17 + src/arm/rk3288-veyron-jaq.dts | 17 +- src/arm/rk3288-veyron-jerry.dts | 2 +- src/arm/rk3288-veyron-mighty.dts | 6 +- src/arm/rk3288-veyron-minnie.dts | 2 +- src/arm/rk3288-veyron-pinky.dts | 6 +- src/arm/rk3288-veyron-sdmmc.dtsi | 2 +- src/arm/rk3288-veyron-speedy.dts | 2 +- src/arm/rk3288-vmarc-som.dtsi | 322 ++++ src/arm/rk3288-vyasa.dts | 3 +- src/arm/rk3288.dtsi | 20 +- src/arm/rk3xxx.dtsi | 3 + src/arm/rockchip-radxa-dalang-carrier.dtsi | 97 +- src/arm/rv1108.dtsi | 13 +- src/arm/s5pv210-aries.dtsi | 90 +- src/arm/s5pv210-fascinate4g.dts | 17 + src/arm/s5pv210-pinctrl.dtsi | 2 + src/arm/sam9x60.dtsi | 7 + src/arm/sama5d2.dtsi | 12 +- src/arm/sh73a0.dtsi | 7 +- src/arm/socfpga.dtsi | 2 + src/arm/socfpga_arria10.dtsi | 4 +- src/arm/socfpga_arria10_socdk.dtsi | 5 + src/arm/ste-ab8500.dtsi | 14 +- src/arm/ste-dbx5x0.dtsi | 2 +- src/arm/ste-nomadik-stn8815.dtsi | 2 +- src/arm/ste-ux500-samsung-golden.dts | 45 + src/arm/ste-ux500-samsung-skomer.dts | 4 +- src/arm/stm32429i-eval.dts | 10 +- src/arm/stm32746g-eval.dts | 8 +- src/arm/stm32f4-pinctrl.dtsi | 85 +- src/arm/stm32f429-disco.dts | 97 +- src/arm/stm32f429.dtsi | 22 +- src/arm/stm32f469-disco.dts | 8 +- src/arm/stm32f746.dtsi | 7 +- src/arm/stm32f769-disco.dts | 4 +- src/arm/stm32h743-pinctrl.dtsi | 10 +- src/arm/stm32h743.dtsi | 7 +- src/arm/stm32mp15-pinctrl.dtsi | 258 ++- src/arm/stm32mp151.dtsi | 4 +- src/arm/stm32mp157a-dk1.dts | 2 + src/arm/stm32mp157c-dk2.dts | 11 + src/arm/stm32mp157c-ed1.dts | 4 +- src/arm/stm32mp157c-ev1.dts | 15 + src/arm/stm32mp15xx-dkx.dtsi | 38 +- src/arm/sun8i-h3-orangepi-zero-plus2.dts | 38 + src/arm/sunxi-bananapi-m2-plus-v1.2.dtsi | 18 +- src/arm/sunxi-libretech-all-h3-cc.dtsi | 12 + src/arm/tegra114-dalmore.dts | 149 +- src/arm/tegra114-roth.dts | 141 +- src/arm/tegra114-tn7.dts | 84 +- src/arm/tegra114.dtsi | 48 +- src/arm/tegra124-apalis-eval.dts | 4 +- src/arm/tegra124-apalis-v1.2-eval.dts | 4 +- src/arm/tegra124-apalis-v1.2.dtsi | 5 +- src/arm/tegra124-apalis.dtsi | 5 +- src/arm/tegra124-jetson-tk1.dts | 263 ++- src/arm/tegra124-nyan-big.dts | 3 +- src/arm/tegra124-nyan-blaze.dts | 1 + src/arm/tegra124-nyan.dtsi | 283 ++-- src/arm/tegra124-venice2.dts | 284 ++-- src/arm/tegra124.dtsi | 59 +- src/arm/tegra20-acer-a500-picasso.dts | 1438 ++++++++++++++++ src/arm/tegra20-colibri-eval-v3.dts | 2 +- src/arm/tegra20-colibri-iris.dts | 2 +- src/arm/tegra20-cpu-opp-microvolt.dtsi | 98 +- src/arm/tegra20-cpu-opp.dtsi | 98 +- src/arm/tegra20-harmony.dts | 140 +- src/arm/tegra20-medcom-wide.dts | 68 +- src/arm/tegra20-paz00.dts | 61 +- src/arm/tegra20-plutux.dts | 66 +- src/arm/tegra20-seaboard.dts | 152 +- src/arm/tegra20-tamonten.dtsi | 39 +- src/arm/tegra20-tec.dts | 66 +- src/arm/tegra20-trimslice.dts | 104 +- src/arm/tegra20-ventana.dts | 106 +- src/arm/tegra20.dtsi | 91 +- src/arm/tegra30-apalis-eval.dts | 4 +- src/arm/tegra30-apalis-v1.1-eval.dts | 8 +- src/arm/tegra30-apalis-v1.1.dtsi | 5 +- src/arm/tegra30-apalis.dtsi | 5 +- src/arm/tegra30-asus-nexus7-grouper-E1565.dts | 9 + src/arm/tegra30-asus-nexus7-grouper-PM269.dts | 9 + src/arm/tegra30-asus-nexus7-grouper-common.dtsi | 1232 ++++++++++++++ .../tegra30-asus-nexus7-grouper-maxim-pmic.dtsi | 185 +++ ...tegra30-asus-nexus7-grouper-memory-timings.dtsi | 1565 ++++++++++++++++++ src/arm/tegra30-asus-nexus7-grouper-ti-pmic.dtsi | 149 ++ src/arm/tegra30-asus-nexus7-grouper.dtsi | 149 ++ src/arm/tegra30-asus-nexus7-tilapia-E1565.dts | 9 + ...tegra30-asus-nexus7-tilapia-memory-timings.dtsi | 325 ++++ src/arm/tegra30-asus-nexus7-tilapia.dtsi | 235 +++ src/arm/tegra30-beaver.dts | 212 ++- src/arm/tegra30-cardhu-a02.dts | 128 +- src/arm/tegra30-cardhu-a04.dts | 149 +- src/arm/tegra30-cardhu.dtsi | 280 ++-- src/arm/tegra30-colibri-eval-v3.dts | 2 +- src/arm/tegra30-colibri.dtsi | 5 +- src/arm/tegra30-cpu-opp-microvolt.dtsi | 398 ++--- *** 96662 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Jan 14 15:26:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 403014E5D82 for ; Thu, 14 Jan 2021 15:26: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGp7L1DV2z4Vv1; Thu, 14 Jan 2021 15:26: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 1C4024459; Thu, 14 Jan 2021 15:26: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 10EFQMj2019587; Thu, 14 Jan 2021 15:26:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EFQMn4019586; Thu, 14 Jan 2021 15:26:22 GMT (envelope-from git) Date: Thu, 14 Jan 2021 15:26:22 GMT Message-Id: <202101141526.10EFQMn4019586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Emmanuel Vadot Subject: git: eb2847f6f299 - Create tag vendor/device-tree/5.9 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/tags/vendor/device-tree/5.9 X-Git-Reftype: annotated tag X-Git-Commit: eb2847f6f299aef9b9ad3eb4224f7652bea3727f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 15:26:22 -0000 The annotated tag vendor/device-tree/5.9 has been created by manu: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/device-tree/5.9 tag vendor/device-tree/5.9 Tagger: Emmanuel Vadot TaggerDate: 2021-01-14 15:25:32 +0000 Tag import of device tree files from Linux 5.9 commit 5ee353c36d3c9c7f63df7c7671875e73fba70958 Author: Emmanuel Vadot AuthorDate: 2021-01-14 15:25:07 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-14 15:25:07 +0000 Import device tree files from Linux 5.9 From owner-dev-commits-src-all@freebsd.org Thu Jan 14 15:42:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D1104E61B9; Thu, 14 Jan 2021 15:42: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGpTW42nkz4XCx; Thu, 14 Jan 2021 15:42:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 7567E4325; Thu, 14 Jan 2021 15:42:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f173.google.com with SMTP id y15so3780743qtv.5; Thu, 14 Jan 2021 07:42:07 -0800 (PST) X-Gm-Message-State: AOAM531RNx52jUcXBHBuex6Re44OGfniooTwdN0b8Jx9o+C7MZwt5nVT k61XMCAwzFajOjeTpeCm+8FKzikCKZmc02nTel8= X-Google-Smtp-Source: ABdhPJzPZ4rLkftyec3w/hWcZkn3LMS9wA35T0IEvUYC9nKXHwFQolIDRRDdSUA4nbp3jnnxJlCDqcct1lAvH+W7njg= X-Received: by 2002:ac8:48d9:: with SMTP id l25mr1767852qtr.60.1610638926818; Thu, 14 Jan 2021 07:42:06 -0800 (PST) MIME-Version: 1.0 References: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> <41f18274-d3c7-409e-5e47-4722c024e994@FreeBSD.org> <20210114160150.1c929cd2e9beceecf182184f@bidouilliste.com> In-Reply-To: <20210114160150.1c929cd2e9beceecf182184f@bidouilliste.com> From: Kyle Evans Date: Thu, 14 Jan 2021 09:41:54 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases To: Emmanuel Vadot Cc: Renato Botelho , Emmanuel Vadot , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 15:42:07 -0000 On Thu, Jan 14, 2021 at 9:02 AM Emmanuel Vadot wrote: > > On Thu, 14 Jan 2021 11:59:25 -0300 > Renato Botelho wrote: > > > On 14/01/21 10:00, Emmanuel Vadot wrote: > > > The branch main has been updated by manu: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 > > > > > > commit aef769614f921660cb0262412426034cf5395ae5 > > > Author: Emmanuel Vadot > > > AuthorDate: 2021-01-14 12:56:38 +0000 > > > Commit: Emmanuel Vadot > > > CommitDate: 2021-01-14 13:00:04 +0000 > > > > > > pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases > > > > > > The current postfix conversions are: > > > > > > CURRENT / STABLE -> .sYYYYMMDDhhmmss > > > ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 > > > BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 > > > RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 > > > PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p > > > RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 > > > > Wouldn't it be necessary to add timestamp information on PRERELEASE as > > done on CURRENT/STABLE ? > > Yes it would, this wasn't one of the reason for the revert but it was > brough to me after. > -STABLE should always be .sYYYYMMDDhhmmss even when in the PRERELEASE > phase. I had a chance to play with it a little bit, and my proposal is: 1.) Drop -PRERELEASE as a non-CURRENT/STABLE versioning scheme in the pkg versions 2.) Use .plYYYYMMDDhhmmss instead of .sYYYYMMDDhhmmss for CURRENT/STABLE (.pl sorts before all others in the pkg version scheme quite intentionally) 3.) Reinstate all of the others as committed here This basically works; it's a little kludgy during a release process up until the version on -STABLE is bumped up to the next minor if you're trying to hop off an alpha/beta/rc back to stable, but I think that's acceptable. It's a narrow window in which your slide over to -STABLE is considered a downgrade since it gets bumped promptly at the conclusion of the release cycle. root@viper:~/pkg/libpkg# pkg version -t 13.0.a1 13.0.b1 < root@viper:~/pkg/libpkg# pkg version -t 13.0.b1 13.0.rc1 < root@viper:~/pkg/libpkg# pkg version -t 13.0.rc1 13.0 < Thanks, Kyle Evans From owner-dev-commits-src-all@freebsd.org Thu Jan 14 15:44:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 391AF4E5FC6 for ; Thu, 14 Jan 2021 15:44:35 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGpXM15cbz4X8b for ; Thu, 14 Jan 2021 15:44:35 +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 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 132C44AB1 for ; Thu, 14 Jan 2021 15:44:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f178.google.com with SMTP id v126so8514719qkd.11 for ; Thu, 14 Jan 2021 07:44:35 -0800 (PST) X-Gm-Message-State: AOAM530bRPWIyen/oNrWUhFn4QO6Xz7s1Xe/dhhKFCRxkY1MKiIpHumL ibnEb1iDSgrdH8evllUtrC0yOj7beD1rGgnQEcA= X-Received: by 2002:ae9:e517:: with SMTP id w23mt7924258qkf.34.1610639074702; Thu, 14 Jan 2021 07:44:34 -0800 (PST) MIME-Version: 1.0 References: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> <41f18274-d3c7-409e-5e47-4722c024e994@FreeBSD.org> <20210114160150.1c929cd2e9beceecf182184f@bidouilliste.com> In-Reply-To: From: Kyle Evans Date: Thu, 14 Jan 2021 09:44:22 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases Cc: Emmanuel Vadot , Renato Botelho , Emmanuel Vadot , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 15:44:35 -0000 On Thu, Jan 14, 2021 at 9:41 AM Kyle Evans wrote: > > On Thu, Jan 14, 2021 at 9:02 AM Emmanuel Vadot wrote: > > > > On Thu, 14 Jan 2021 11:59:25 -0300 > > Renato Botelho wrote: > > > > > On 14/01/21 10:00, Emmanuel Vadot wrote: > > > > The branch main has been updated by manu: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 > > > > > > > > commit aef769614f921660cb0262412426034cf5395ae5 > > > > Author: Emmanuel Vadot > > > > AuthorDate: 2021-01-14 12:56:38 +0000 > > > > Commit: Emmanuel Vadot > > > > CommitDate: 2021-01-14 13:00:04 +0000 > > > > > > > > pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases > > > > > > > > The current postfix conversions are: > > > > > > > > CURRENT / STABLE -> .sYYYYMMDDhhmmss > > > > ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 > > > > BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 > > > > RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 > > > > PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p > > > > RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 > > > > > > Wouldn't it be necessary to add timestamp information on PRERELEASE as > > > done on CURRENT/STABLE ? > > > > Yes it would, this wasn't one of the reason for the revert but it was > > brough to me after. > > -STABLE should always be .sYYYYMMDDhhmmss even when in the PRERELEASE > > phase. > > I had a chance to play with it a little bit, and my proposal is: > > 1.) Drop -PRERELEASE as a non-CURRENT/STABLE versioning scheme in the > pkg versions > 2.) Use .plYYYYMMDDhhmmss instead of .sYYYYMMDDhhmmss for > CURRENT/STABLE (.pl sorts before all others in the pkg version scheme > quite intentionally) > 3.) Reinstate all of the others as committed here > > This basically works; it's a little kludgy during a release process up > until the version on -STABLE is bumped up to the next minor if you're > trying to hop off an alpha/beta/rc back to stable, but I think that's > acceptable. It's a narrow window in which your slide over to -STABLE > is considered a downgrade since it gets bumped promptly at the > conclusion of the release cycle. > > root@viper:~/pkg/libpkg# pkg version -t 13.0.a1 13.0.b1 > < > root@viper:~/pkg/libpkg# pkg version -t 13.0.b1 13.0.rc1 > < > root@viper:~/pkg/libpkg# pkg version -t 13.0.rc1 13.0 > < I omitted the first step, which is arguably the most important one: root@viper:~/pkg/libpkg# pkg version -t 13.0.pl2021011313063 13.0.a1 < From owner-dev-commits-src-all@freebsd.org Thu Jan 14 15:48:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0CF7F4E6426; Thu, 14 Jan 2021 15:48:52 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGpdH2sKlz4XZF; Thu, 14 Jan 2021 15:48:51 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1610639328; 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=2/hktHRsnHVSHaRwvCRyDZewKgzs3gPMnryg8p6VlRQ=; b=pC3v21CFPjBXoWNCUoTQtBvhQF3P3QnZ59bpG5ZFpdIfMddF9AmD3HjM4sV+dCwTGeV5le 7fBpZ0qC5oiJrBsibzqgXOj+SkxADZB/4fuOLh+iH1tIk+/xg8W58Gu3eEmNr4P3tuWnTC SXpBaUi2qjewXwqQr8ZRTF/jevz0ee0= Received: from skull.home.blih.net (lfbn-idf2-1-745-114.w86-247.abo.wanadoo.fr [86.247.192.114]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 60f2867b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 14 Jan 2021 15:48:48 +0000 (UTC) Date: Thu, 14 Jan 2021 16:48:48 +0100 From: Emmanuel Vadot To: Kyle Evans Cc: Renato Botelho , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases Message-Id: <20210114164848.607e82e8f1612cb504b0a64f@bidouilliste.com> In-Reply-To: References: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> <41f18274-d3c7-409e-5e47-4722c024e994@FreeBSD.org> <20210114160150.1c929cd2e9beceecf182184f@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DGpdH2sKlz4XZF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 15:48:52 -0000 On Thu, 14 Jan 2021 09:44:22 -0600 Kyle Evans wrote: > On Thu, Jan 14, 2021 at 9:41 AM Kyle Evans wrote: > > > > On Thu, Jan 14, 2021 at 9:02 AM Emmanuel Vadot wrote: > > > > > > On Thu, 14 Jan 2021 11:59:25 -0300 > > > Renato Botelho wrote: > > > > > > > On 14/01/21 10:00, Emmanuel Vadot wrote: > > > > > The branch main has been updated by manu: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 > > > > > > > > > > commit aef769614f921660cb0262412426034cf5395ae5 > > > > > Author: Emmanuel Vadot > > > > > AuthorDate: 2021-01-14 12:56:38 +0000 > > > > > Commit: Emmanuel Vadot > > > > > CommitDate: 2021-01-14 13:00:04 +0000 > > > > > > > > > > pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases > > > > > > > > > > The current postfix conversions are: > > > > > > > > > > CURRENT / STABLE -> .sYYYYMMDDhhmmss > > > > > ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 > > > > > BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 > > > > > RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 > > > > > PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p > > > > > RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 > > > > > > > > Wouldn't it be necessary to add timestamp information on PRERELEASE as > > > > done on CURRENT/STABLE ? > > > > > > Yes it would, this wasn't one of the reason for the revert but it was > > > brough to me after. > > > -STABLE should always be .sYYYYMMDDhhmmss even when in the PRERELEASE > > > phase. > > > > I had a chance to play with it a little bit, and my proposal is: > > > > 1.) Drop -PRERELEASE as a non-CURRENT/STABLE versioning scheme in the > > pkg versions > > 2.) Use .plYYYYMMDDhhmmss instead of .sYYYYMMDDhhmmss for > > CURRENT/STABLE (.pl sorts before all others in the pkg version scheme > > quite intentionally) > > 3.) Reinstate all of the others as committed here > > > > This basically works; it's a little kludgy during a release process up > > until the version on -STABLE is bumped up to the next minor if you're > > trying to hop off an alpha/beta/rc back to stable, but I think that's > > acceptable. It's a narrow window in which your slide over to -STABLE > > is considered a downgrade since it gets bumped promptly at the > > conclusion of the release cycle. > > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.a1 13.0.b1 > > < > > root@viper:~/pkg/libpkg# pkg version -t 13.0.b1 13.0.rc1 > > < > > root@viper:~/pkg/libpkg# pkg version -t 13.0.rc1 13.0 > > < > > I omitted the first step, which is arguably the most important one: > > root@viper:~/pkg/libpkg# pkg version -t 13.0.pl2021011313063 13.0.a1 > < Seems good to me, now if only I knew what 'pl' stands for that would be good :) Can you do a patch or should I ? -- Emmanuel Vadot From owner-dev-commits-src-all@freebsd.org Thu Jan 14 15:58:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD76A4E64B3; Thu, 14 Jan 2021 15:58:47 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGprl3k7Cz4Y9b; Thu, 14 Jan 2021 15:58:47 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 6D5C84CED; Thu, 14 Jan 2021 15:58:47 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id 2so3800241qtt.10; Thu, 14 Jan 2021 07:58:47 -0800 (PST) X-Gm-Message-State: AOAM530bafvmPUYiAa3XXYCU/giL2ndicTNQgtd4fuunUyzCQzj3e2+w CP6jJNgBiJPdIvD9kRb6CNNAx+j3RJUy/1xu8uk= X-Google-Smtp-Source: ABdhPJzJOVZeXe9dd545PiJlNWr6DP4tGuE7Zb7J+PtJeDbQCsmL21brTWkEf6AOTks02yy0yDy/6ZYkn7e8cjr31qc= X-Received: by 2002:aed:2e25:: with SMTP id j34mr7420781qtd.242.1610639927034; Thu, 14 Jan 2021 07:58:47 -0800 (PST) MIME-Version: 1.0 References: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> <41f18274-d3c7-409e-5e47-4722c024e994@FreeBSD.org> <20210114160150.1c929cd2e9beceecf182184f@bidouilliste.com> <20210114164848.607e82e8f1612cb504b0a64f@bidouilliste.com> In-Reply-To: <20210114164848.607e82e8f1612cb504b0a64f@bidouilliste.com> From: Kyle Evans Date: Thu, 14 Jan 2021 09:58:34 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases To: Emmanuel Vadot Cc: Kyle Evans , Renato Botelho , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 15:58:47 -0000 On Thu, Jan 14, 2021 at 9:48 AM Emmanuel Vadot wrote: > > On Thu, 14 Jan 2021 09:44:22 -0600 > Kyle Evans wrote: > > > On Thu, Jan 14, 2021 at 9:41 AM Kyle Evans wrote: > > > > > > On Thu, Jan 14, 2021 at 9:02 AM Emmanuel Vadot wrote: > > > > > > > > On Thu, 14 Jan 2021 11:59:25 -0300 > > > > Renato Botelho wrote: > > > > > > > > > On 14/01/21 10:00, Emmanuel Vadot wrote: > > > > > > The branch main has been updated by manu: > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 > > > > > > > > > > > > commit aef769614f921660cb0262412426034cf5395ae5 > > > > > > Author: Emmanuel Vadot > > > > > > AuthorDate: 2021-01-14 12:56:38 +0000 > > > > > > Commit: Emmanuel Vadot > > > > > > CommitDate: 2021-01-14 13:00:04 +0000 > > > > > > > > > > > > pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases > > > > > > > > > > > > The current postfix conversions are: > > > > > > > > > > > > CURRENT / STABLE -> .sYYYYMMDDhhmmss > > > > > > ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 > > > > > > BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 > > > > > > RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 > > > > > > PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p > > > > > > RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 > > > > > > > > > > Wouldn't it be necessary to add timestamp information on PRERELEASE as > > > > > done on CURRENT/STABLE ? > > > > > > > > Yes it would, this wasn't one of the reason for the revert but it was > > > > brough to me after. > > > > -STABLE should always be .sYYYYMMDDhhmmss even when in the PRERELEASE > > > > phase. > > > > > > I had a chance to play with it a little bit, and my proposal is: > > > > > > 1.) Drop -PRERELEASE as a non-CURRENT/STABLE versioning scheme in the > > > pkg versions > > > 2.) Use .plYYYYMMDDhhmmss instead of .sYYYYMMDDhhmmss for > > > CURRENT/STABLE (.pl sorts before all others in the pkg version scheme > > > quite intentionally) > > > 3.) Reinstate all of the others as committed here > > > > > > This basically works; it's a little kludgy during a release process up > > > until the version on -STABLE is bumped up to the next minor if you're > > > trying to hop off an alpha/beta/rc back to stable, but I think that's > > > acceptable. It's a narrow window in which your slide over to -STABLE > > > is considered a downgrade since it gets bumped promptly at the > > > conclusion of the release cycle. > > > > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.a1 13.0.b1 > > > < > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.b1 13.0.rc1 > > > < > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.rc1 13.0 > > > < > > > > I omitted the first step, which is arguably the most important one: > > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.pl2021011313063 13.0.a1 > > < > > Seems good to me, now if only I knew what 'pl' stands for that would > be good :) > Can you do a patch or should I ? > Phew, I'm glad I'm not the only one. :-) I'm going to call it "(pl)aceholder," but I hadn't seen any indication of its actual meaning when it arrived back in '04 (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=56961) I'll whip up a patch later today. Thanks, Kyle Evans From owner-dev-commits-src-all@freebsd.org Thu Jan 14 16:04:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 551284E6EC5; Thu, 14 Jan 2021 16:04: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGpzC20g0z4Yfp; Thu, 14 Jan 2021 16:04: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 37A0A4D32; Thu, 14 Jan 2021 16:04: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 10EG4N2b070991; Thu, 14 Jan 2021 16:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EG4NHV070990; Thu, 14 Jan 2021 16:04:23 GMT (envelope-from git) Date: Thu, 14 Jan 2021 16:04:23 GMT Message-Id: <202101141604.10EG4NHV070990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: a67522b22dd9 - main - gitignore: expand list of ignored files 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: a67522b22dd9d062aa6702a826c856f388d8744a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 16:04:23 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=a67522b22dd9d062aa6702a826c856f388d8744a commit a67522b22dd9d062aa6702a826c856f388d8744a Author: Roger Pau Monné AuthorDate: 2021-01-11 17:31:56 +0000 Commit: Roger Pau Monné CommitDate: 2021-01-14 16:03:57 +0000 gitignore: expand list of ignored files Add the *.swp and *~ pattern for vim temporary files. Expand the cscope ones to include all files possibly generated by cscope and also add some known object formats. Also remove the leading '?' from cscope.out, or else it doesn't match the cscope.out file generated by default (as it expects an extra character in front). Reviewed by: gjb, uqs, lwhsu Sponsored by: Citrix Systems R&D Differential Revision: https://reviews.freebsd.org/D28095 --- .gitignore | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5a022fb8f837..c674e06fda50 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ +*.a +*.core +*.o +*.so +*.swp +*~ _.tinderbox.* _.universe-toolchain _.amd64.* @@ -15,5 +21,7 @@ GPATH GRTAGS GTAGS ID +cscope.files +cscope.in.out cscope.out -?cscope.out +cscope.po.out From owner-dev-commits-src-all@freebsd.org Thu Jan 14 16:46:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2FEC4E7D5F; Thu, 14 Jan 2021 16: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGqvV4X5xz4cTn; Thu, 14 Jan 2021 16: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 89EA25787; Thu, 14 Jan 2021 16: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 10EGkEPN023621; Thu, 14 Jan 2021 16: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 10EGkEfk023620; Thu, 14 Jan 2021 16:46:14 GMT (envelope-from git) Date: Thu, 14 Jan 2021 16:46:14 GMT Message-Id: <202101141646.10EGkEfk023620@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: 90cc8706ccb2 - main - iwm(4): Add support for Intel Killer(R) Wireless-AC 1550i 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: 90cc8706ccb2da130c0b1a28434a9ec5d4c80d81 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 16:46:14 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=90cc8706ccb2da130c0b1a28434a9ec5d4c80d81 commit 90cc8706ccb2da130c0b1a28434a9ec5d4c80d81 Author: Mark Johnston AuthorDate: 2021-01-14 16:41:28 +0000 Commit: Mark Johnston CommitDate: 2021-01-14 16:41:28 +0000 iwm(4): Add support for Intel Killer(R) Wireless-AC 1550i PR: 252578 Submitted by: shu MFC after: 1 week --- sys/dev/iwm/if_iwm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 2029ddd6038c..b89c895efb50 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -5878,6 +5878,7 @@ iwm_intr(void *arg) #define PCI_PRODUCT_INTEL_WL_8265_1 0x24fd #define PCI_PRODUCT_INTEL_WL_9560_1 0x9df0 #define PCI_PRODUCT_INTEL_WL_9560_2 0xa370 +#define PCI_PRODUCT_INTEL_WL_9560_3 0x31dc #define PCI_PRODUCT_INTEL_WL_9260_1 0x2526 static const struct iwm_devices { @@ -5898,6 +5899,7 @@ static const struct iwm_devices { { PCI_PRODUCT_INTEL_WL_8265_1, &iwm8265_cfg }, { PCI_PRODUCT_INTEL_WL_9560_1, &iwm9560_cfg }, { PCI_PRODUCT_INTEL_WL_9560_2, &iwm9560_cfg }, + { PCI_PRODUCT_INTEL_WL_9560_3, &iwm9560_cfg }, { PCI_PRODUCT_INTEL_WL_9260_1, &iwm9260_cfg }, }; From owner-dev-commits-src-all@freebsd.org Thu Jan 14 16:46:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C04924E7A75; Thu, 14 Jan 2021 16: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGqvW55mHz4cVt; Thu, 14 Jan 2021 16: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 A1EB751D8; Thu, 14 Jan 2021 16: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 10EGkFH2023642; Thu, 14 Jan 2021 16: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 10EGkFoq023641; Thu, 14 Jan 2021 16:46:15 GMT (envelope-from git) Date: Thu, 14 Jan 2021 16:46:15 GMT Message-Id: <202101141646.10EGkFoq023641@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: e3d06599bc06 - main - libifconfig: Add a symbol map 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: e3d06599bc06303f9420d74e47bb5032e1102d3c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 16:46:15 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e3d06599bc06303f9420d74e47bb5032e1102d3c commit e3d06599bc06303f9420d74e47bb5032e1102d3c Author: Mark Johnston AuthorDate: 2021-01-14 16:41:28 +0000 Commit: Mark Johnston CommitDate: 2021-01-14 16:41:28 +0000 libifconfig: Add a symbol map This is a no-op for now since libifconfig is only built as a static lib. Reviewed by: freqlabs, kp, adrian Differential Revision: https://reviews.freebsd.org/D28119 --- lib/libifconfig/Makefile | 4 +++ lib/libifconfig/Symbol.map | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile index 73c5166ffb2c..73dad36c1dc5 100644 --- a/lib/libifconfig/Makefile +++ b/lib/libifconfig/Makefile @@ -8,6 +8,10 @@ LIBADD= m SHLIBDIR?= /lib SHLIB_MAJOR= 1 + +VERSION_DEF= ${LIBCSRCDIR}/Versions.def +SYMBOL_MAPS= ${.CURDIR}/Symbol.map + SRCS= libifconfig.c \ libifconfig_bridge.c \ libifconfig_carp.c \ diff --git a/lib/libifconfig/Symbol.map b/lib/libifconfig/Symbol.map new file mode 100644 index 000000000000..fd147554f085 --- /dev/null +++ b/lib/libifconfig/Symbol.map @@ -0,0 +1,74 @@ +FBSD_1.6 { + ifconfig_bridge_get_bridge_status; + ifconfig_bridge_free_bridge_status; + ifconfig_carp_get_info; + ifconfig_close; + ifconfig_create_interface; + ifconfig_create_interface_vlan; + ifconfig_destroy_interface; + ifconfig_err_errno; + ifconfig_err_errtype; + ifconfig_err_ioctlreq; + ifconfig_foreach_ifaddr; + ifconfig_foreach_interface; + ifconfig_get_capability; + ifconfig_get_description; + ifconfig_get_fib; + ifconfig_get_groups; + ifconfig_get_ifstatus; + ifconfig_get_metric; + ifconfig_get_mtu; + ifconfig_get_nd6; + ifconfig_get_orig_name; + ifconfig_inet_get_addrinfo; + ifconfig_inet6_get_addrinfo; + ifconfig_lagg_free_lagg_status; + ifconfig_lagg_get_lagg_status; + ifconfig_lagg_get_laggport_status; + ifconfig_list_cloners; + ifconfig_media_get_mediareq; + ifconfig_media_get_options_string; + ifconfig_media_get_status; + ifconfig_media_get_subtype; + ifconfig_media_get_type; + ifconfig_open; + ifconfig_set_capability; + ifconfig_set_description; + ifconfig_set_fib; + ifconfig_set_metric; + ifconfig_set_mtu; + ifconfig_set_name; + ifconfig_set_vlantag; + ifconfig_sfp_channel_count; + ifconfig_sfp_dump_region_count; + ifconfig_sfp_free_sfp_status; + ifconfig_sfp_get_sfp_dump; + ifconfig_sfp_get_sfp_info; + ifconfig_sfp_get_sfp_info_strings; + ifconfig_sfp_get_sfp_status; + ifconfig_sfp_get_sfp_vendor_info; + ifconfig_sfp_physical_spec; + ifconfig_unset_description; + + bias_mA; + power_dBm; + power_mW; + + /* Auto-generated. */ + ifconfig_sfp_cab_tech_description; + ifconfig_sfp_cab_tech_symbol; + ifconfig_sfp_conn_description; + ifconfig_sfp_conn_symbol; + ifconfig_sfp_eth_10g_description; + ifconfig_sfp_eth_10g_symbol; + ifconfig_sfp_eth_1040g_description; + ifconfig_sfp_eth_1040g_symbol; + ifconfig_sfp_eth_description; + ifconfig_sfp_eth_symbol; + ifconfig_sfp_eth_ext_description; + ifconfig_sfp_eth_ext_symbol; + ifconfig_sfp_fc_speed_description; + ifconfig_sfp_fc_speed_symbol; + ifconfig_sfp_rev_description; + ifconfig_sfp_rev_symbol; +}; From owner-dev-commits-src-all@freebsd.org Thu Jan 14 16:46:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A27DA4E7CAD; Thu, 14 Jan 2021 16:46: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGqvY03h0z4cTr; Thu, 14 Jan 2021 16:46: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 DC79051D9; Thu, 14 Jan 2021 16:46: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 10EGkGSu023664; Thu, 14 Jan 2021 16:46:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EGkGt9023663; Thu, 14 Jan 2021 16:46:16 GMT (envelope-from git) Date: Thu, 14 Jan 2021 16:46:16 GMT Message-Id: <202101141646.10EGkGt9023663@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: 95ee7d9b879c - main - qat: Fix DH895XCC firmware module autoloading 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: 95ee7d9b879ce42088277c85d85e61f6c79674ad Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 16:46:17 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=95ee7d9b879ce42088277c85d85e61f6c79674ad commit 95ee7d9b879ce42088277c85d85e61f6c79674ad Author: Mark Johnston AuthorDate: 2021-01-14 16:41:28 +0000 Commit: Mark Johnston CommitDate: 2021-01-14 16:41:28 +0000 qat: Fix DH895XCC firmware module autoloading MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) --- sys/dev/qat/qat_dh895xccreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/qat/qat_dh895xccreg.h b/sys/dev/qat/qat_dh895xccreg.h index 35dfb483e529..5d57d82a597e 100644 --- a/sys/dev/qat/qat_dh895xccreg.h +++ b/sys/dev/qat/qat_dh895xccreg.h @@ -109,7 +109,7 @@ /* AE firmware */ #define AE_FW_PROD_TYPE_DH895XCC 0x00400000 -#define AE_FW_MOF_NAME_DH895XCC "qat_895xccfw" +#define AE_FW_MOF_NAME_DH895XCC "qat_dh895xccfw" #define AE_FW_MMP_NAME_DH895XCC "qat_895xcc_mmp" #define AE_FW_UOF_NAME_DH895XCC "icp_qat_ae.uof" From owner-dev-commits-src-all@freebsd.org Thu Jan 14 16:46:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5189B4E7FA0; Thu, 14 Jan 2021 16:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGqvc5rjYz4cfQ; Thu, 14 Jan 2021 16:46: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 1A722554A; Thu, 14 Jan 2021 16:46: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 10EGkJuT023704; Thu, 14 Jan 2021 16:46:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EGkJKN023703; Thu, 14 Jan 2021 16:46:19 GMT (envelope-from git) Date: Thu, 14 Jan 2021 16:46:19 GMT Message-Id: <202101141646.10EGkJKN023703@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: 6483fc224b1a - main - qat: Free counters during detach 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: 6483fc224b1a68528a65c16e9d8e55e2b5535ee9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 16:46:23 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6483fc224b1a68528a65c16e9d8e55e2b5535ee9 commit 6483fc224b1a68528a65c16e9d8e55e2b5535ee9 Author: Mark Johnston AuthorDate: 2021-01-14 16:41:28 +0000 Commit: Mark Johnston CommitDate: 2021-01-14 16:41:28 +0000 qat: Free counters during detach MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) --- sys/dev/qat/qat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/qat/qat.c b/sys/dev/qat/qat.c index 6f74ff3b4bc1..1e533d1bebcc 100644 --- a/sys/dev/qat/qat.c +++ b/sys/dev/qat/qat.c @@ -1611,6 +1611,11 @@ qat_crypto_deinit(struct qat_softc *sc) struct qat_crypto_bank *qcb; int bank; + counter_u64_free(sc->sc_sym_alloc_failures); + counter_u64_free(sc->sc_ring_full_restarts); + counter_u64_free(sc->sc_gcm_aad_updates); + counter_u64_free(sc->sc_gcm_aad_restarts); + if (qcy->qcy_banks != NULL) { for (bank = 0; bank < qcy->qcy_num_banks; bank++) { qcb = &qcy->qcy_banks[bank]; From owner-dev-commits-src-all@freebsd.org Thu Jan 14 16:46:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AF674E8011; Thu, 14 Jan 2021 16:46: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGqvZ4Cgfz4chJ; Thu, 14 Jan 2021 16: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 EC9075637; Thu, 14 Jan 2021 16:46: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 10EGkHWt023683; Thu, 14 Jan 2021 16: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 10EGkHwx023682; Thu, 14 Jan 2021 16:46:17 GMT (envelope-from git) Date: Thu, 14 Jan 2021 16:46:17 GMT Message-Id: <202101141646.10EGkHwx023682@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: a33b29a0447b - main - qat: Count request allocation failures 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: a33b29a0447b24a054ecc48e51355d2abf7e6b5b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 16:46:19 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a33b29a0447b24a054ecc48e51355d2abf7e6b5b commit a33b29a0447b24a054ecc48e51355d2abf7e6b5b Author: Mark Johnston AuthorDate: 2021-01-14 16:41:28 +0000 Commit: Mark Johnston CommitDate: 2021-01-14 16:41:28 +0000 qat: Count request allocation failures This can be useful for troubleshooting performance problems. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) --- sys/dev/qat/qat.c | 5 +++++ sys/dev/qat/qatvar.h | 1 + 2 files changed, 6 insertions(+) diff --git a/sys/dev/qat/qat.c b/sys/dev/qat/qat.c index 68cb17078c25..6f74ff3b4bc1 100644 --- a/sys/dev/qat/qat.c +++ b/sys/dev/qat/qat.c @@ -1596,6 +1596,10 @@ qat_crypto_init(struct qat_softc *sc) SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ring_full", CTLFLAG_RD, &sc->sc_ring_full_restarts, "Requests deferred due to in-flight max reached"); + sc->sc_sym_alloc_failures = counter_u64_alloc(M_WAITOK); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "sym_alloc_failures", + CTLFLAG_RD, &sc->sc_sym_alloc_failures, + "Request allocation failures"); return 0; } @@ -2069,6 +2073,7 @@ qat_process(device_t dev, struct cryptop *crp, int hint) qsc = qat_crypto_alloc_sym_cookie(qcb); if (qsc == NULL) { + counter_u64_add(sc->sc_sym_alloc_failures, 1); error = ENOBUFS; goto fail2; } diff --git a/sys/dev/qat/qatvar.h b/sys/dev/qat/qatvar.h index f3245ad725b6..3326dc268fc1 100644 --- a/sys/dev/qat/qatvar.h +++ b/sys/dev/qat/qatvar.h @@ -818,6 +818,7 @@ struct qat_softc { counter_u64_t sc_gcm_aad_restarts; counter_u64_t sc_gcm_aad_updates; counter_u64_t sc_ring_full_restarts; + counter_u64_t sc_sym_alloc_failures; /* Firmware */ void *sc_fw_mof; /* mof data */ From owner-dev-commits-src-all@freebsd.org Thu Jan 14 17:03:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB14C4E86EE; Thu, 14 Jan 2021 17: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGrHy4wWsz4fL1; Thu, 14 Jan 2021 17: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 9BA64517C; Thu, 14 Jan 2021 17:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10EH3wG8048881; Thu, 14 Jan 2021 17:03:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EH3wFi048880; Thu, 14 Jan 2021 17:03:58 GMT (envelope-from git) Date: Thu, 14 Jan 2021 17:03:58 GMT Message-Id: <202101141703.10EH3wFi048880@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: 6eebda3bbad9 - main - Split out the NODEBUG options to a common file 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: 6eebda3bbad96ab6ef001781ee1b6de45af062a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 17:03:58 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=6eebda3bbad96ab6ef001781ee1b6de45af062a2 commit 6eebda3bbad96ab6ef001781ee1b6de45af062a2 Author: Andrew Turner AuthorDate: 2021-01-14 10:54:18 +0000 Commit: Andrew Turner CommitDate: 2021-01-14 16:57:53 +0000 Split out the NODEBUG options to a common file This is the superset of the nooptions found in the -DEBUG kernels. Reviewed by: emaste, manu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28152 --- sys/amd64/conf/GENERIC-NODEBUG | 13 +------------ sys/arm/conf/GENERIC-NODEBUG | 8 +------- sys/arm64/conf/GENERIC-NODEBUG | 12 +----------- sys/conf/std.nodebug | 23 +++++++++++++++++++++++ sys/i386/conf/GENERIC-NODEBUG | 8 +------- sys/powerpc/conf/GENERIC-NODEBUG | 8 +------- sys/riscv/conf/GENERIC-NODEBUG | 12 +----------- 7 files changed, 29 insertions(+), 55 deletions(-) diff --git a/sys/amd64/conf/GENERIC-NODEBUG b/sys/amd64/conf/GENERIC-NODEBUG index 1f17382b3214..332cf85eb372 100644 --- a/sys/amd64/conf/GENERIC-NODEBUG +++ b/sys/amd64/conf/GENERIC-NODEBUG @@ -27,17 +27,6 @@ # $FreeBSD$ include GENERIC +include "../../conf/std.nodebug" ident GENERIC-NODEBUG - -nooptions INVARIANTS -nooptions INVARIANT_SUPPORT -nooptions WITNESS -nooptions WITNESS_SKIPSPIN -nooptions BUF_TRACKING -nooptions DEADLKRES -nooptions FULL_BUF_TRACKING -nooptions COVERAGE -nooptions KCOV -nooptions MALLOC_DEBUG_MAXZONES -nooptions QUEUE_MACRO_DEBUG_TRASH diff --git a/sys/arm/conf/GENERIC-NODEBUG b/sys/arm/conf/GENERIC-NODEBUG index ab5eb00d4fc9..6e60deff7569 100644 --- a/sys/arm/conf/GENERIC-NODEBUG +++ b/sys/arm/conf/GENERIC-NODEBUG @@ -27,12 +27,6 @@ # $FreeBSD$ include GENERIC +include "../../conf/std.nodebug" ident GENERIC-NODEBUG - -nooptions INVARIANTS -nooptions INVARIANT_SUPPORT -nooptions WITNESS -nooptions WITNESS_SKIPSPIN -nooptions DEADLKRES -nooptions MALLOC_DEBUG_MAXZONES diff --git a/sys/arm64/conf/GENERIC-NODEBUG b/sys/arm64/conf/GENERIC-NODEBUG index 7d23884ef90b..8b99852be971 100644 --- a/sys/arm64/conf/GENERIC-NODEBUG +++ b/sys/arm64/conf/GENERIC-NODEBUG @@ -27,16 +27,6 @@ # $FreeBSD$ include GENERIC +include "../../conf/std.nodebug" ident GENERIC-NODEBUG - -nooptions INVARIANTS -nooptions INVARIANT_SUPPORT -nooptions WITNESS -nooptions WITNESS_SKIPSPIN -nooptions DEADLKRES -nooptions USB_DEBUG -nooptions HID_DEBUG -nooptions COVERAGE -nooptions KCOV -nooptions MALLOC_DEBUG_MAXZONES diff --git a/sys/conf/std.nodebug b/sys/conf/std.nodebug new file mode 100644 index 000000000000..53a7fc6b2f81 --- /dev/null +++ b/sys/conf/std.nodebug @@ -0,0 +1,23 @@ +# +# std.nodebug -- Disable the debug options found in the GENERIC kernel config. +# + +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions BUF_TRACKING +nooptions FULL_BUF_TRACKING +nooptions DEADLKRES +nooptions COVERAGE +nooptions KCOV +nooptions MALLOC_DEBUG_MAXZONES +nooptions QUEUE_MACRO_DEBUG_TRASH + +# USB debugging +nooptions USB_DEBUG +nooptions HID_DEBUG + +# CAM debugging +nooptions CAMDEBUG +nooptions CAM_DEBUG_FLAGS diff --git a/sys/i386/conf/GENERIC-NODEBUG b/sys/i386/conf/GENERIC-NODEBUG index be20edf1763c..d09663e1b9db 100644 --- a/sys/i386/conf/GENERIC-NODEBUG +++ b/sys/i386/conf/GENERIC-NODEBUG @@ -27,12 +27,6 @@ # $FreeBSD$ include GENERIC +include "../../conf/std.nodebug" ident GENERIC-NODEBUG - -nooptions INVARIANTS -nooptions INVARIANT_SUPPORT -nooptions WITNESS -nooptions WITNESS_SKIPSPIN -nooptions DEADLKRES -nooptions MALLOC_DEBUG_MAXZONES diff --git a/sys/powerpc/conf/GENERIC-NODEBUG b/sys/powerpc/conf/GENERIC-NODEBUG index 983219e0b02a..b86116253d78 100644 --- a/sys/powerpc/conf/GENERIC-NODEBUG +++ b/sys/powerpc/conf/GENERIC-NODEBUG @@ -27,12 +27,6 @@ # $FreeBSD$ include GENERIC +include "../../conf/std.nodebug" ident GENERIC-NODEBUG - -nooptions INVARIANTS -nooptions INVARIANT_SUPPORT -nooptions WITNESS -nooptions WITNESS_SKIPSPIN -nooptions DEADLKRES -nooptions MALLOC_DEBUG_MAXZONES diff --git a/sys/riscv/conf/GENERIC-NODEBUG b/sys/riscv/conf/GENERIC-NODEBUG index 644ce0d4e0c6..9b1d9fe5a9af 100644 --- a/sys/riscv/conf/GENERIC-NODEBUG +++ b/sys/riscv/conf/GENERIC-NODEBUG @@ -27,16 +27,6 @@ # $FreeBSD$ include GENERIC +include "../../conf/std.nodebug" ident GENERIC-NODEBUG - -nooptions INVARIANTS -nooptions INVARIANT_SUPPORT -nooptions WITNESS -nooptions WITNESS_SKIPSPIN -nooptions BUF_TRACKING -nooptions DEADLKRES -nooptions FULL_BUF_TRACKING -nooptions COVERAGE -nooptions KCOV -nooptions MALLOC_DEBUG_MAXZONES From owner-dev-commits-src-all@freebsd.org Thu Jan 14 18:13:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 170954EA168; Thu, 14 Jan 2021 18:13: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGsrk0B01z4k89; Thu, 14 Jan 2021 18:13: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 ED58163D8; Thu, 14 Jan 2021 18:13: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 10EIDvn2039470; Thu, 14 Jan 2021 18:13:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EIDv8o039469; Thu, 14 Jan 2021 18:13:57 GMT (envelope-from git) Date: Thu, 14 Jan 2021 18:13:57 GMT Message-Id: <202101141813.10EIDv8o039469@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: 54c743e5b291 - main - Fix a typo 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: 54c743e5b29163cb0ee8504b8fb947db5c38497c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 18:13:58 -0000 The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=54c743e5b29163cb0ee8504b8fb947db5c38497c commit 54c743e5b29163cb0ee8504b8fb947db5c38497c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-01-14 18:12:55 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-01-14 18:12:55 +0000 Fix a typo "and" is not a flag. MFC after: 3 days --- usr.sbin/daemon/daemon.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index a0481f742b1e..c4f20548d4a2 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2020 +.Dd January 14, 2021 .Dt DAEMON 8 .Os .Sh NAME @@ -86,7 +86,8 @@ Append output from the daemonized process to .Pa output_file . If the file does not exist, it is created with permissions 0600. When this option is used together with options -.Fl c and +.Fl c +and .Fl H the absolute path needs to be provided to ensure .Nm From owner-dev-commits-src-all@freebsd.org Thu Jan 14 18:32:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB8594EA7A9; Thu, 14 Jan 2021 18:32: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGtGK5tY0z4lKH; Thu, 14 Jan 2021 18: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 BCE7C6BAA; Thu, 14 Jan 2021 18: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 10EIWfc9064842; Thu, 14 Jan 2021 18: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 10EIWfEK064839; Thu, 14 Jan 2021 18:32:41 GMT (envelope-from git) Date: Thu, 14 Jan 2021 18:32:41 GMT Message-Id: <202101141832.10EIWfEK064839@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: 15760e084c6a - stable/12 - pfctl: Call ifa_load() before ifa_grouplookup() 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: 15760e084c6a4bcc4d135e4a4e1204b35f72c062 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 18:32:41 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=15760e084c6a4bcc4d135e4a4e1204b35f72c062 commit 15760e084c6a4bcc4d135e4a4e1204b35f72c062 Author: Kristof Provost AuthorDate: 2020-04-19 15:37:13 +0000 Commit: Kristof Provost CommitDate: 2021-01-14 13:04:22 +0000 pfctl: Call ifa_load() before ifa_grouplookup() ifa_grouplookup() uses the data loaded in ifa_load() (through is_a_group()), so we must call ifa_load() before we can rely on any of the data it populates. Submitted by: Nick Rogers MFC after: 1 week Sponsored by: RG Nets (cherry picked from commit 8fd675d8a0538544a85483f7a9bed2bd48382926) --- sbin/pfctl/pfctl_parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 120178c50087..2efb97285798 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1456,15 +1456,16 @@ ifa_lookup(char *ifa_name, int flags) int got4 = 0, got6 = 0; const char *last_if = NULL; + /* first load iftab and isgroup_map */ + if (iftab == NULL) + ifa_load(); + if ((h = ifa_grouplookup(ifa_name, flags)) != NULL) return (h); if (!strncmp(ifa_name, "self", IFNAMSIZ)) ifa_name = NULL; - if (iftab == NULL) - ifa_load(); - for (p = iftab; p; p = p->next) { if (ifa_skip_if(ifa_name, p)) continue; From owner-dev-commits-src-all@freebsd.org Thu Jan 14 19:09:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 835B84EB333; Thu, 14 Jan 2021 19:09:10 +0000 (UTC) (envelope-from rpokala@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGv4Q3Hvsz4nFb; Thu, 14 Jan 2021 19:09:10 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id A2C2B6311; Thu, 14 Jan 2021 19:09:09 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.45.21011103 Date: Thu, 14 Jan 2021 11:09:04 -0800 Subject: Re: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases From: Ravi Pokala To: Kyle Evans , Emmanuel Vadot CC: Renato Botelho , src-committers , , Message-ID: Thread-Topic: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases References: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> <41f18274-d3c7-409e-5e47-4722c024e994@FreeBSD.org> <20210114160150.1c929cd2e9beceecf182184f@bidouilliste.com> <20210114164848.607e82e8f1612cb504b0a64f@bidouilliste.com> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 19:09:10 -0000 -----Original Message----- From: on behalf of Kyle Evans Date: 2021-01-14, Thursday at 07:58 To: Emmanuel Vadot Cc: Kyle Evans , Renato Botelho , src-committers , , Subject: Re: git: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases On Thu, Jan 14, 2021 at 9:48 AM Emmanuel Vadot wrote: > > On Thu, 14 Jan 2021 09:44:22 -0600 > Kyle Evans wrote: > > > On Thu, Jan 14, 2021 at 9:41 AM Kyle Evans wrote: > > > > > > On Thu, Jan 14, 2021 at 9:02 AM Emmanuel Vadot wrote: > > > > > > > > On Thu, 14 Jan 2021 11:59:25 -0300 > > > > Renato Botelho wrote: > > > > > > > > > On 14/01/21 10:00, Emmanuel Vadot wrote: > > > > > > The branch main has been updated by manu: > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 > > > > > > > > > > > > commit aef769614f921660cb0262412426034cf5395ae5 > > > > > > Author: Emmanuel Vadot > > > > > > AuthorDate: 2021-01-14 12:56:38 +0000 > > > > > > Commit: Emmanuel Vadot > > > > > > CommitDate: 2021-01-14 13:00:04 +0000 > > > > > > > > > > > > pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases > > > > > > > > > > > > The current postfix conversions are: > > > > > > > > > > > > CURRENT / STABLE -> .sYYYYMMDDhhmmss > > > > > > ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 > > > > > > BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 > > > > > > RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 > > > > > > PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p > > > > > > RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 > > > > > > > > > > Wouldn't it be necessary to add timestamp information on PRERELEASE as > > > > > done on CURRENT/STABLE ? > > > > > > > > Yes it would, this wasn't one of the reason for the revert but it was > > > > brough to me after. > > > > -STABLE should always be .sYYYYMMDDhhmmss even when in the PRERELEASE > > > > phase. > > > > > > I had a chance to play with it a little bit, and my proposal is: > > > > > > 1.) Drop -PRERELEASE as a non-CURRENT/STABLE versioning scheme in the > > > pkg versions > > > 2.) Use .plYYYYMMDDhhmmss instead of .sYYYYMMDDhhmmss for > > > CURRENT/STABLE (.pl sorts before all others in the pkg version scheme > > > quite intentionally) > > > 3.) Reinstate all of the others as committed here > > > > > > This basically works; it's a little kludgy during a release process up > > > until the version on -STABLE is bumped up to the next minor if you're > > > trying to hop off an alpha/beta/rc back to stable, but I think that's > > > acceptable. It's a narrow window in which your slide over to -STABLE > > > is considered a downgrade since it gets bumped promptly at the > > > conclusion of the release cycle. > > > > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.a1 13.0.b1 > > > < > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.b1 13.0.rc1 > > > < > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.rc1 13.0 > > > < > > > > I omitted the first step, which is arguably the most important one: > > > > root@viper:~/pkg/libpkg# pkg version -t 13.0.pl2021011313063 13.0.a1 > > < > > Seems good to me, now if only I knew what 'pl' stands for that would > be good :) > Can you do a patch or should I ? > Phew, I'm glad I'm not the only one. :-) I'm going to call it "(pl)aceholder," but I hadn't seen any indication of its actual meaning when it arrived back in '04 (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=56961) Unless there's already code looking for "pl", I would suggest "pr" for prerelease. -Ravi (rpokala@) I'll whip up a patch later today. Thanks, Kyle Evans From owner-dev-commits-src-all@freebsd.org Thu Jan 14 19:11:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21B434EB3DF for ; Thu, 14 Jan 2021 19:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGv6d27yQz4ns6; Thu, 14 Jan 2021 19: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 9DD9F7484; Thu, 14 Jan 2021 19:11: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 10EJB3Xt013328; Thu, 14 Jan 2021 19: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 10EJB3sR013327; Thu, 14 Jan 2021 19:11:03 GMT (envelope-from git) Date: Thu, 14 Jan 2021 19:11:03 GMT Message-Id: <202101141911.10EJB3sR013327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 854bb992e777 - Create tag vendor/llvm-project/llvmorg-11.0.1-0-g43ff75f2c3fe 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-11.0.1-0-g43ff75f2c3fe X-Git-Reftype: annotated tag X-Git-Commit: 854bb992e77708cd5da04e9033b26d8fb0077434 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 19:11:06 -0000 The annotated tag vendor/llvm-project/llvmorg-11.0.1-0-g43ff75f2c3fe has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-11.0.1-0-g43ff75f2c3fe tag vendor/llvm-project/llvmorg-11.0.1-0-g43ff75f2c3fe Tagger: Dimitry Andric TaggerDate: 2021-01-14 19:06:38 +0000 Tag llvm-project branch release/11.x llvmorg-11.0.1-0-g43ff75f2c3fe (aka 11.0.1 release). commit 1de062e1e530408f5a06466742b26722c230c024 Author: Dimitry Andric AuthorDate: 2021-01-02 21:13:33 +0000 Commit: Dimitry Andric CommitDate: 2021-01-02 21:13:33 +0000 Vendor import of llvm-project branch release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2). From owner-dev-commits-src-all@freebsd.org Thu Jan 14 19:39:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD88B4EC20D; Thu, 14 Jan 2021 19:39: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGvlL5RqMz4qyK; Thu, 14 Jan 2021 19: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 ADA18744D; Thu, 14 Jan 2021 19: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 10EJdQFc043932; Thu, 14 Jan 2021 19: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 10EJdQQw043931; Thu, 14 Jan 2021 19:39:26 GMT (envelope-from git) Date: Thu, 14 Jan 2021 19:39:26 GMT Message-Id: <202101141939.10EJdQQw043931@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: d2b3ceddccac - main - tcp: add sysctl to tolerate TCP segments missing timestamps 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: d2b3ceddccac60b563f642898e3a314647666a10 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 19:39:26 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d2b3ceddccac60b563f642898e3a314647666a10 commit d2b3ceddccac60b563f642898e3a314647666a10 Author: Michael Tuexen AuthorDate: 2021-01-13 21:48:17 +0000 Commit: Michael Tuexen CommitDate: 2021-01-14 18:28:25 +0000 tcp: add sysctl to tolerate TCP segments missing timestamps When timestamp support has been negotiated, TCP segements received without a timestamp should be discarded. However, there are broken TCP implementations (for example, stacks used by Omniswitch 63xx and 64xx models), which send TCP segments without timestamps although they negotiated timestamp support. This patch adds a sysctl variable which tolerates such TCP segments and allows to interoperate with broken stacks. Reviewed by: jtl@, rscheff@ Differential Revision: https://reviews.freebsd.org/D28142 Sponsored by: Netflix, Inc. PR: 252449 MFC after: 1 week --- share/man/man4/tcp.4 | 23 ++++++++++++++++++++--- sys/netinet/tcp_input.c | 5 +++-- sys/netinet/tcp_stacks/bbr.c | 5 +++-- sys/netinet/tcp_stacks/rack.c | 5 +++-- sys/netinet/tcp_subr.c | 5 +++++ sys/netinet/tcp_syncache.c | 26 +++++++++++++++++++------- sys/netinet/tcp_timewait.c | 5 +++-- sys/netinet/tcp_var.h | 2 ++ 8 files changed, 58 insertions(+), 18 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 24b2e2d24d19..dee4040c0a98 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd December 19, 2020 +.Dd January 14, 2021 .Dt TCP 4 .Os .Sh NAME @@ -369,8 +369,17 @@ MIB. .Bl -tag -width ".Va TCPCTL_DO_RFC1323" .It Dv TCPCTL_DO_RFC1323 .Pq Va rfc1323 -Implement the window scaling and timestamp options of RFC 1323 +Implement the window scaling and timestamp options of RFC 1323/RFC 7323 (default is true). +.It Va tolerate_missing_ts +Tolerate the missing of timestamps (RFC 1323/RFC 7323) for +.Tn TCP +segments belonging to +.Tn TCP +connections for which support of +.Tn TCP +timestamps has been negotiated. +(default is 0, i.e., the missing of timestamps is not tolerated). .It Dv TCPCTL_MSSDFLT .Pq Va mssdflt The default value used for the maximum segment size @@ -728,12 +737,20 @@ when trying to use a TCP function block that is not available; .Xr tcp_functions 9 .Rs .%A "V. Jacobson" -.%A "R. Braden" +.%A "B. Braden" .%A "D. Borman" .%T "TCP Extensions for High Performance" .%O "RFC 1323" .Re .Rs +.%A "D. Borman" +.%A "B. Braden" +.%A "V. Jacobson" +.%A "R. Scheffenegger" +.%T "TCP Extensions for High Performance" +.%O "RFC 7323" +.Re +.Rs .%A "A. Heffernan" .%T "Protection of BGP Sessions via the TCP MD5 Signature Option" .%O "RFC 2385" diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index dda37d4795c9..283d42b594bd 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1692,11 +1692,12 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment, unless it is a RST segment. + * the segment, unless it is a RST segment or missing timestamps are + * tolerated. * See section 3.2 of RFC 7323. */ if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { - if ((thflags & TH_RST) != 0) { + if (((thflags & TH_RST) != 0) || V_tcp_tolerate_missing_ts) { if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: Timestamp missing, " "segment processed normally\n", diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index e59d9b9ff168..49ed7e992fba 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -11463,11 +11463,12 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment, unless it is a RST segment. + * the segment, unless it is a RST segment or missing timestamps are + * tolerated. * See section 3.2 of RFC 7323. */ if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS) && - ((thflags & TH_RST) == 0)) { + ((thflags & TH_RST) == 0) && (V_tcp_tolerate_missing_ts == 0)) { retval = 0; goto done_with_input; } diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 7c81e8b3a2bc..8e00cae85496 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -10879,11 +10879,12 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment, unless it is a RST segment. + * the segment, unless it is a RST segment or missing timestamps are + * tolerated. * See section 3.2 of RFC 7323. */ if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS) && - ((thflags & TH_RST) == 0)) { + ((thflags & TH_RST) == 0) && (V_tcp_tolerate_missing_ts == 0)) { way_out = 5; retval = 0; goto done_with_input; diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b1ccb9a1acbe..b39d2b43d3a2 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -256,6 +256,11 @@ SYSCTL_INT(_net_inet_tcp, TCPCTL_DO_RFC1323, rfc1323, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_rfc1323), 0, "Enable rfc1323 (high performance TCP) extensions"); +VNET_DEFINE(int, tcp_tolerate_missing_ts) = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tolerate_missing_ts, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_tolerate_missing_ts), 0, + "Tolerate missing TCP timestamps"); + VNET_DEFINE(int, tcp_ts_offset_per_conn) = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, ts_offset_per_conn, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_ts_offset_per_conn), 0, diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 4697374084ab..e59a41fc1102 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1231,18 +1231,30 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment. + * the segment, unless the missing timestamps are tolerated. * See section 3.2 of RFC 7323. */ if ((sc->sc_flags & SCF_TIMESTAMP) && !(to->to_flags & TOF_TS)) { - SCH_UNLOCK(sch); - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: Timestamp missing, " - "segment silently dropped\n", s, __func__); - free(s, M_TCPLOG); + if (V_tcp_tolerate_missing_ts) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, + "%s; %s: Timestamp missing, " + "segment processed normally\n", + s, __func__); + free(s, M_TCPLOG); + } + } else { + SCH_UNLOCK(sch); + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, + "%s; %s: Timestamp missing, " + "segment silently dropped\n", + s, __func__); + free(s, M_TCPLOG); + } + return (-1); /* Do not send RST */ } - return (-1); /* Do not send RST */ } /* diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index d7e3cce44b89..f98927b196fc 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -451,10 +451,11 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment. + * the segment, unless the missing timestamps are tolerated. * See section 3.2 of RFC 7323. */ - if (((to->to_flags & TOF_TS) == 0) && (tw->t_recent != 0)) { + if (((to->to_flags & TOF_TS) == 0) && (tw->t_recent != 0) && + (V_tcp_tolerate_missing_ts == 0)) { goto drop; } diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index d9235f23706c..6e22d75ac441 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -840,6 +840,7 @@ VNET_DECLARE(int, tcp_do_autosndbuf); VNET_DECLARE(int, tcp_do_ecn); VNET_DECLARE(int, tcp_do_newcwv); VNET_DECLARE(int, tcp_do_rfc1323); +VNET_DECLARE(int, tcp_tolerate_missing_ts); VNET_DECLARE(int, tcp_do_rfc3042); VNET_DECLARE(int, tcp_do_rfc3390); VNET_DECLARE(int, tcp_do_rfc3465); @@ -883,6 +884,7 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) #define V_tcp_do_ecn VNET(tcp_do_ecn) #define V_tcp_do_rfc1323 VNET(tcp_do_rfc1323) +#define V_tcp_tolerate_missing_ts VNET(tcp_tolerate_missing_ts) #define V_tcp_ts_offset_per_conn VNET(tcp_ts_offset_per_conn) #define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) #define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) From owner-dev-commits-src-all@freebsd.org Thu Jan 14 20:06:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 166534EC1EE; Thu, 14 Jan 2021 20:06: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGwLY6qcHz4ryS; Thu, 14 Jan 2021 20:06: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 DD4D176FC; Thu, 14 Jan 2021 20:06: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 10EK6TCg082401; Thu, 14 Jan 2021 20:06:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EK6Tn1082400; Thu, 14 Jan 2021 20:06:29 GMT (envelope-from git) Date: Thu, 14 Jan 2021 20:06:29 GMT Message-Id: <202101142006.10EK6Tn1082400@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: b62f6dfaed3d - main - hid: Replace USBHID_ENABLED kernel config option with loader tunable 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: b62f6dfaed3d0189c1853f26b773c3afed203463 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 20:06:30 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b62f6dfaed3d0189c1853f26b773c3afed203463 commit b62f6dfaed3d0189c1853f26b773c3afed203463 Author: Vladimir Kondratyev AuthorDate: 2021-01-12 19:36:21 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-01-14 20:04:47 +0000 hid: Replace USBHID_ENABLED kernel config option with loader tunable usbhid(4) is disabled by default to avoid conflicts with existing USB HID drivers. To enable it place following lines to /boot/loader.conf: hw.usb.usbhid.enable=1 usbhid_load="YES" Suggested by: jhb Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D28124 --- share/man/man4/usbhid.4 | 9 ++++++++- sys/amd64/conf/GENERIC | 3 --- sys/conf/NOTES | 3 --- sys/conf/options | 1 - sys/dev/usb/input/uhid.c | 2 -- sys/dev/usb/input/ukbd.c | 2 -- sys/dev/usb/input/ums.c | 2 -- sys/dev/usb/input/usbhid.c | 15 +++++++-------- sys/dev/usb/input/wmt.c | 4 ---- sys/i386/conf/GENERIC | 3 --- 10 files changed, 15 insertions(+), 29 deletions(-) diff --git a/share/man/man4/usbhid.4 b/share/man/man4/usbhid.4 index a8905dc76ea8..1b9e61ce1cad 100644 --- a/share/man/man4/usbhid.4 +++ b/share/man/man4/usbhid.4 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 21, 2020 +.Dd January 12, 2021 .Dt USBHID 4 .Os .Sh NAME @@ -54,6 +54,13 @@ variables and .Xr loader 8 tunables: .Bl -tag -width indent +.It Va hw.usb.usbhid.enable +Enable +.Nm +and make its priority greater than other USB HID drivers have. +Default is 0. +.El +.Bl -tag -width indent .It Va hw.usb.usbhid.debug Debug output level, where 0 is debugging disabled and larger values increase debug message verbosity. diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 393fec26d423..c9ab23bb91b5 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -385,6 +385,3 @@ device uinput # install /dev/uinput cdev options HID_DEBUG # enable debug msgs device hid # Generic HID support options IICHID_SAMPLING # Workaround missing GPIO INTR support -#device usbhid # USB transport support. -#device hidbus # HID bus (required by usbhid/iichid) -#options USBHID_ENABLED # Prefer usbhid to other USB drivers diff --git a/sys/conf/NOTES b/sys/conf/NOTES index b377f845e793..1a8059a2e5c0 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2594,9 +2594,6 @@ options UVSCOM_DEFAULT_OPKTSIZE=8 # default output packet size options UVSCOM_INTR_INTERVAL=100 # interrupt pipe interval # in milliseconds -# options for usbhid: -options USBHID_ENABLED # Prefer usbhid to other USBHID drivers - ##################################################################### # FireWire support diff --git a/sys/conf/options b/sys/conf/options index e69ee92d1136..77979b72fe58 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -669,7 +669,6 @@ UKBD_DFLT_KEYMAP opt_ukbd.h UPLCOM_INTR_INTERVAL opt_uplcom.h UVSCOM_DEFAULT_OPKTSIZE opt_uvscom.h UVSCOM_INTR_INTERVAL opt_uvscom.h -USBHID_ENABLED opt_usb.h # options for the Realtek rtwn driver RTWN_DEBUG opt_rtwn.h diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index e5eae534a6d0..97f9b1c8edea 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -923,6 +923,4 @@ DRIVER_MODULE(uhid, uhub, uhid_driver, uhid_devclass, NULL, 0); MODULE_DEPEND(uhid, usb, 1, 1, 1); MODULE_DEPEND(uhid, hid, 1, 1, 1); MODULE_VERSION(uhid, 1); -#ifndef USBHID_ENABLED USB_PNP_HOST_INFO(uhid_devs); -#endif diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index 0edacbefcbfc..3314a3b3e70f 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -2192,6 +2192,4 @@ MODULE_DEPEND(ukbd, hid, 1, 1, 1); MODULE_DEPEND(ukbd, evdev, 1, 1, 1); #endif MODULE_VERSION(ukbd, 1); -#ifndef USBHID_ENABLED USB_PNP_HOST_INFO(ukbd_devs); -#endif diff --git a/sys/dev/usb/input/ums.c b/sys/dev/usb/input/ums.c index 248478770942..6b7c3d526ad0 100644 --- a/sys/dev/usb/input/ums.c +++ b/sys/dev/usb/input/ums.c @@ -1220,6 +1220,4 @@ MODULE_DEPEND(ums, hid, 1, 1, 1); MODULE_DEPEND(ums, evdev, 1, 1, 1); #endif MODULE_VERSION(ums, 1); -#ifndef USBHID_ENABLED USB_PNP_HOST_INFO(ums_devs); -#endif diff --git a/sys/dev/usb/input/usbhid.c b/sys/dev/usb/input/usbhid.c index ab856dc14d75..70b1f4ae99c2 100644 --- a/sys/dev/usb/input/usbhid.c +++ b/sys/dev/usb/input/usbhid.c @@ -75,10 +75,12 @@ __FBSDID("$FreeBSD$"); #include "hid_if.h" +static SYSCTL_NODE(_hw_usb, OID_AUTO, usbhid, CTLFLAG_RW, 0, "USB usbhid"); +static int usbhid_enable = 0; +SYSCTL_INT(_hw_usb_usbhid, OID_AUTO, enable, CTLFLAG_RWTUN, + &usbhid_enable, 0, "Enable usbhid and prefer it to other USB HID drivers"); #ifdef USB_DEBUG static int usbhid_debug = 0; - -static SYSCTL_NODE(_hw_usb, OID_AUTO, usbhid, CTLFLAG_RW, 0, "USB usbhid"); SYSCTL_INT(_hw_usb_usbhid, OID_AUTO, debug, CTLFLAG_RWTUN, &usbhid_debug, 0, "Debug level"); #endif @@ -664,6 +666,9 @@ usbhid_probe(device_t dev) DPRINTFN(11, "\n"); + if (usbhid_enable == 0) + return (ENXIO); + if (uaa->usb_mode != USB_MODE_HOST) return (ENXIO); @@ -683,11 +688,7 @@ usbhid_probe(device_t dev) if (hid_test_quirk(&sc->sc_hw, HQ_HID_IGNORE)) return (ENXIO); -#ifdef USBHID_ENABLED return (BUS_PROBE_GENERIC + 1); -#else - return (BUS_PROBE_GENERIC - 1); -#endif } static int @@ -781,6 +782,4 @@ MODULE_DEPEND(usbhid, usb, 1, 1, 1); MODULE_DEPEND(usbhid, hid, 1, 1, 1); MODULE_DEPEND(usbhid, hidbus, 1, 1, 1); MODULE_VERSION(usbhid, 1); -#ifdef USBHID_ENABLED USB_PNP_HOST_INFO(usbhid_devs); -#endif diff --git a/sys/dev/usb/input/wmt.c b/sys/dev/usb/input/wmt.c index 79ed5a2b8f82..8191c6ff9369 100644 --- a/sys/dev/usb/input/wmt.c +++ b/sys/dev/usb/input/wmt.c @@ -1009,13 +1009,11 @@ wmt_set_input_mode(struct wmt_softc *sc, enum wmt_input_mode mode) return (err); } -#ifndef USBHID_ENABLED static const STRUCT_USB_HOST_ID wmt_devs[] = { /* generic HID class w/o boot interface */ {USB_IFACE_CLASS(UICLASS_HID), USB_IFACE_SUBCLASS(0),}, }; -#endif static devclass_t wmt_devclass; @@ -1038,6 +1036,4 @@ MODULE_DEPEND(wmt, usb, 1, 1, 1); MODULE_DEPEND(wmt, hid, 1, 1, 1); MODULE_DEPEND(wmt, evdev, 1, 1, 1); MODULE_VERSION(wmt, 1); -#ifndef USBHID_ENABLED USB_PNP_HOST_INFO(wmt_devs); -#endif diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index b65235ca9668..9ce338f5a181 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -354,6 +354,3 @@ device uinput # install /dev/uinput cdev options HID_DEBUG # enable debug msgs device hid # Generic HID support options IICHID_SAMPLING # Workaround missing GPIO INTR support -#device usbhid # USB transport support. -#device hidbus # HID bus (required by usbhid/iichid) -#options USBHID_ENABLED # Prefer usbhid to other USB drivers From owner-dev-commits-src-all@freebsd.org Thu Jan 14 20:06:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B8994EC831; Thu, 14 Jan 2021 20:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGwLb0fz4z4rsx; Thu, 14 Jan 2021 20:06: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 0A0817CAE; Thu, 14 Jan 2021 20:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10EK6Uje082423; Thu, 14 Jan 2021 20:06:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EK6UTE082422; Thu, 14 Jan 2021 20:06:30 GMT (envelope-from git) Date: Thu, 14 Jan 2021 20:06:30 GMT Message-Id: <202101142006.10EK6UTE082422@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: b360682ac940 - main - hid: Add missing input enter/exit epoch pairs. 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: b360682ac940a4cef1c922c33d685db24a67c96b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 20:06:31 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b360682ac940a4cef1c922c33d685db24a67c96b commit b360682ac940a4cef1c922c33d685db24a67c96b Author: Vladimir Kondratyev AuthorDate: 2021-01-14 19:48:53 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-01-14 20:04:47 +0000 hid: Add missing input enter/exit epoch pairs. This was affecting unloading keyboard driver and kdb-related code. --- sys/dev/evdev/cdev.c | 5 +++++ sys/dev/hid/hkbd.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/sys/dev/evdev/cdev.c b/sys/dev/evdev/cdev.c index ec60a12dbf2d..91536c119fb4 100644 --- a/sys/dev/evdev/cdev.c +++ b/sys/dev/evdev/cdev.c @@ -396,6 +396,7 @@ evdev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct evdev_dev *evdev = dev->si_drv1; struct evdev_client *client; struct input_keymap_entry *ke; + struct epoch_tracker et; int ret, len, limit, type_num; uint32_t code; size_t nvalues; @@ -415,7 +416,11 @@ evdev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, EVDEV_LOCK(evdev); if (evdev->ev_kdb_active) { evdev->ev_kdb_active = false; + if (evdev->ev_lock_type == EV_LOCK_EXT_EPOCH) + epoch_enter_preempt(INPUT_EPOCH, &et); evdev_restore_after_kdb(evdev); + if (evdev->ev_lock_type == EV_LOCK_EXT_EPOCH) + epoch_exit_preempt(INPUT_EPOCH, &et); } EVDEV_UNLOCK(evdev); } diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index 63dd626cdef9..6f4b71dd49b6 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -598,16 +598,22 @@ static void hkbd_timeout(void *arg) { struct hkbd_softc *sc = arg; +#ifdef EVDEV_SUPPORT struct epoch_tracker et; +#endif HKBD_LOCK_ASSERT(sc); sc->sc_time_ms += sc->sc_delay; sc->sc_delay = 0; +#ifdef EVDEV_SUPPORT epoch_enter_preempt(INPUT_EPOCH, &et); +#endif hkbd_interrupt(sc); +#ifdef EVDEV_SUPPORT epoch_exit_preempt(INPUT_EPOCH, &et); +#endif /* Make sure any leftover key events gets read out */ taskqueue_enqueue(taskqueue_swi_giant, &sc->sc_task); @@ -1023,6 +1029,9 @@ static int hkbd_detach(device_t dev) { struct hkbd_softc *sc = device_get_softc(dev); +#ifdef EVDEV_SUPPORT + struct epoch_tracker et; +#endif int error; SYSCONS_LOCK_ASSERT(); @@ -1045,7 +1054,13 @@ hkbd_detach(device_t dev) /* process releasing of all keys */ HKBD_LOCK(sc); +#ifdef EVDEV_SUPPORT + epoch_enter_preempt(INPUT_EPOCH, &et); +#endif hkbd_interrupt(sc); +#ifdef EVDEV_SUPPORT + epoch_exit_preempt(INPUT_EPOCH, &et); +#endif HKBD_UNLOCK(sc); taskqueue_drain(taskqueue_swi_giant, &sc->sc_task); } From owner-dev-commits-src-all@freebsd.org Thu Jan 14 20:11:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E643A4EC3FD; Thu, 14 Jan 2021 20:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGwS06C22z4sXp; Thu, 14 Jan 2021 20:11: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 C79A47E48; Thu, 14 Jan 2021 20:11: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 10EKBCFh091336; Thu, 14 Jan 2021 20:11:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EKBCWs091335; Thu, 14 Jan 2021 20:11:12 GMT (envelope-from git) Date: Thu, 14 Jan 2021 20:11:12 GMT Message-Id: <202101142011.10EKBCWs091335@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: 3dfcb70b6ae9 - main - elfctl: add backwards compatibility for "no" prefixes 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: 3dfcb70b6ae9bcb9fd6a66721bebdb8c6a53c329 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 20:11:13 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3dfcb70b6ae9bcb9fd6a66721bebdb8c6a53c329 commit 3dfcb70b6ae9bcb9fd6a66721bebdb8c6a53c329 Author: Ed Maste AuthorDate: 2021-01-13 19:21:38 +0000 Commit: Ed Maste CommitDate: 2021-01-14 20:09:08 +0000 elfctl: add backwards compatibility for "no" prefixes I am going to prefix opt-out ELF feature flag names with "no" to make their meaning more clear (review D28139), but there are some uses of the existing names already (e.g., the PR referenced below). For now accept the older, unprefixed name as well, and emit a warning. We can revert this after FreeBSD 13 branches. % elfctl -e +aslr foo elfctl: interpreting aslr as noaslr; please specify noaslr PR: 239873 (related) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28140 --- usr.bin/elfctl/elfctl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c index 9d75c002d82c..570bdba2e2be 100644 --- a/usr.bin/elfctl/elfctl.c +++ b/usr.bin/elfctl/elfctl.c @@ -232,6 +232,16 @@ convert_to_feature_val(char *feature_str, uint32_t *feature_val) input |= featurelist[i].value; break; } + /* XXX Backwards compatibility for "no"-prefix flags. */ + if (strncmp(featurelist[i].alias, "no", 2) == 0 && + strcmp(featurelist[i].alias + 2, feature) == 0) { + input |= featurelist[i].value; + warnx( + "interpreting %s as %s; please specify %s", + feature, featurelist[i].alias, + featurelist[i].alias); + break; + } } if (i == len) { warnx("%s is not a valid feature", feature); From owner-dev-commits-src-all@freebsd.org Thu Jan 14 20:11:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E0824EC933; Thu, 14 Jan 2021 20: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGwS17065z4sNC; Thu, 14 Jan 2021 20: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 E2CA77B74; Thu, 14 Jan 2021 20: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 10EKBDS5091358; Thu, 14 Jan 2021 20: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 10EKBDGK091357; Thu, 14 Jan 2021 20:11:13 GMT (envelope-from git) Date: Thu, 14 Jan 2021 20:11:13 GMT Message-Id: <202101142011.10EKBDGK091357@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: c763f99d11fd - main - elfctl: prefix disable flags with "no" 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: c763f99d11fdc9641308124c4a030c90b6a7fdbb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 20:11:14 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c763f99d11fdc9641308124c4a030c90b6a7fdbb commit c763f99d11fdc9641308124c4a030c90b6a7fdbb Author: Ed Maste AuthorDate: 2021-01-13 18:08:31 +0000 Commit: Ed Maste CommitDate: 2021-01-14 20:09:13 +0000 elfctl: prefix disable flags with "no" Some ELF feature flags indicate a request to opt-out of some feature, for example NT_FREEBSD_FCTL_ASLR_DISABLE indicates that ASLR should be disabled for the tagged binary. Using "aslr" as the short name for the flag is confusing as it seems to indicate a request for ASLR to be enabled. Rename "noaslr", and make a similar change for other opt-out flags. Reviewed by: bapt, manu, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28139 --- usr.bin/elfctl/elfctl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c index 570bdba2e2be..20a2c5b95444 100644 --- a/usr.bin/elfctl/elfctl.c +++ b/usr.bin/elfctl/elfctl.c @@ -62,13 +62,14 @@ struct ControlFeatures { }; static struct ControlFeatures featurelist[] = { - { "aslr", NT_FREEBSD_FCTL_ASLR_DISABLE, "Disable ASLR" }, - { "protmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE, + { "noaslr", NT_FREEBSD_FCTL_ASLR_DISABLE, "Disable ASLR" }, + { "noprotmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE, "Disable implicit PROT_MAX" }, - { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, + { "nostackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, { "wxneeded", NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" }, { "la48", NT_FREEBSD_FCTL_LA48, "amd64: Limit user VA to 48bit" }, - { "aslrstkgap", NT_FREEBSD_FCTL_ASG_DISABLE, "Disable ASLR stack gap" }, + { "noaslrstkgap", NT_FREEBSD_FCTL_ASG_DISABLE, + "Disable ASLR stack gap" }, }; static struct option long_opts[] = { From owner-dev-commits-src-all@freebsd.org Thu Jan 14 20:47:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E2F04ED349; Thu, 14 Jan 2021 20:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGxFd0nw5z4vTY; Thu, 14 Jan 2021 20:47: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 0E2851091A; Thu, 14 Jan 2021 20:47: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 10EKlGFh034712; Thu, 14 Jan 2021 20:47:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EKlG2J034711; Thu, 14 Jan 2021 20:47:16 GMT (envelope-from git) Date: Thu, 14 Jan 2021 20:47:16 GMT Message-Id: <202101142047.10EKlG2J034711@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: 39b7445e15cd - main - Merge llvm-project llvmorg-11.0.1-0-g43ff75f2c3f (aka 11.0.1 release) 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: 39b7445e15cd114383bb0c2f4bbbe46e4b2bd752 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 20:47:17 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=39b7445e15cd114383bb0c2f4bbbe46e4b2bd752 commit 39b7445e15cd114383bb0c2f4bbbe46e4b2bd752 Author: Dimitry Andric AuthorDate: 2021-01-14 20:45:55 +0000 Commit: Dimitry Andric CommitDate: 2021-01-14 20:46:44 +0000 Merge llvm-project llvmorg-11.0.1-0-g43ff75f2c3f (aka 11.0.1 release) There were no functional changes after 11.0.1 rc2, so only the version strings changed. MFC after: 4 weeks X-MFC-With: r364284 --- lib/clang/include/VCSVersion.inc | 8 ++++---- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 16f1fd230e26..47df397ce238 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,14 +1,14 @@ // $FreeBSD$ -#define LLVM_REVISION "llvmorg-11.0.1-rc2-0-g43ff75f2c3f" +#define LLVM_REVISION "llvmorg-11.0.1-0-g43ff75f2c3fe" #define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-11.0.1-rc2-0-g43ff75f2c3f" +#define CLANG_REVISION "llvmorg-11.0.1-0-g43ff75f2c3fe" #define CLANG_REPOSITORY "git@github.com:llvm/llvm-project.git" // - -#define LLD_REVISION "llvmorg-11.0.1-rc2-0-g43ff75f2c3f-1300007" +#define LLD_REVISION "llvmorg-11.0.1-0-g43ff75f2c3fe-1300007" #define LLD_REPOSITORY "FreeBSD" -#define LLDB_REVISION "llvmorg-11.0.1-rc2-0-g43ff75f2c3f" +#define LLDB_REVISION "llvmorg-11.0.1-0-g43ff75f2c3fe" #define LLDB_REPOSITORY "git@github.com:llvm/llvm-project.git" diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 8792ed618a69..c0c69da2c62d 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "llvmorg-11.0.1-rc2-0-g43ff75f2c3f" +#define LLVM_REVISION "llvmorg-11.0.1-0-g43ff75f2c3fe" #define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git" From owner-dev-commits-src-all@freebsd.org Thu Jan 14 21:00:32 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9196F4EDCC9; Thu, 14 Jan 2021 21:00: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGxXw3htgz3Cjj; Thu, 14 Jan 2021 21:00: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 71C2F10947; Thu, 14 Jan 2021 21:00: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 10EL0WTP055436; Thu, 14 Jan 2021 21:00:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EL0W2x055435; Thu, 14 Jan 2021 21:00:32 GMT (envelope-from git) Date: Thu, 14 Jan 2021 21:00:32 GMT Message-Id: <202101142100.10EL0W2x055435@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: 4b27f6043538 - main - Note aesni/armv8crypto in GENERIC, W^X, and AES-XTS for armv8crypto. 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: 4b27f6043538536eb65e92efd64859b978ad6a81 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 21:00:32 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4b27f6043538536eb65e92efd64859b978ad6a81 commit 4b27f6043538536eb65e92efd64859b978ad6a81 Author: John Baldwin AuthorDate: 2021-01-14 20:59:37 +0000 Commit: John Baldwin CommitDate: 2021-01-14 20:59:37 +0000 Note aesni/armv8crypto in GENERIC, W^X, and AES-XTS for armv8crypto. --- RELNOTES | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/RELNOTES b/RELNOTES index 1ad103a640d3..75eb55143267 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,22 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +074a91f746bd: + The aesni(4) and armv8crypto(4) devices are now included in + GENERIC on amd64, i386, and arm64. + +2e1c94aa1fd5: + Add support for enforcing W^X mapping policy for user + processes. The policy is not enforced by default but can be + enabled by setting the kern.elf32.allow_wx and + kern.elf64_allow_wx sysctls to 1. Individual binaries can be + exempted from the policy by elfctl(9) via the wxneeded + feature. + +4979620ece98: + Add AES-XTS support to armv8crypto(4) providing accelerated + software support for the default GELI cipher on arm64 systems. + r368667: GDB 6.1.1 was removed. Users of crashinfo(8) should install the gdb package or devel/gdb port. From owner-dev-commits-src-all@freebsd.org Thu Jan 14 21:09:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E91124EDEC6; Thu, 14 Jan 2021 21:09:40 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGxlS55g5z3D4q; Thu, 14 Jan 2021 21:09:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:e1b6:dbc5:b10c:cb23]) (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 47E696FA9; Thu, 14 Jan 2021 21:09:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 074a91f746bd - main - Enable accelerated AES-XTS software crypto in GENERIC. To: Alan Somers Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101132113.10DLDQt9005004@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Thu, 14 Jan 2021 13:09:35 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 21:09:41 -0000 On 1/13/21 1:18 PM, Alan Somers wrote: > On Wed, Jan 13, 2021 at 2:13 PM John Baldwin wrote: > >> The branch main has been updated by jhb: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=074a91f746bd80498a4c815aa795e5dc51b12121 >> >> commit 074a91f746bd80498a4c815aa795e5dc51b12121 >> Author: John Baldwin >> AuthorDate: 2021-01-13 21:13:01 +0000 >> Commit: John Baldwin >> CommitDate: 2021-01-13 21:13:01 +0000 >> >> Enable accelerated AES-XTS software crypto in GENERIC. >> >> In particular, using GELI on a root filesystem will only use >> accelerated software crypto drivers if they are available before the >> root filesystem is mounted. While these modules can be loaded from >> the loader, including them in GENERIC provides a better out-of-the-box >> experience for users. >> >> Both aesni(4) and armv8crypto(4) provide accelerated implementations >> of the default cipher used by GELI (AES-XTS) in addition to other >> ciphers. >> >> Reviewed by: mhorne, allanjude, markj >> Differential Revision: https://reviews.freebsd.org/D28100 >> >> > How about an entry in UPDATING? Added one in RELNTOES (missed adding a Relnotes: yes tag). I don't know if we add an entry to UPDATING each time GENERIC changes? I guess people could remove lines they might have added to loader.conf to avoid a spurious warning if they are using GENERIC instead of a custom kernel. -- John Baldwin From owner-dev-commits-src-all@freebsd.org Thu Jan 14 21:46:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E75A74EED6C; Thu, 14 Jan 2021 21:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGyYq6Bgfz3HDM; Thu, 14 Jan 2021 21: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 C774C11559; Thu, 14 Jan 2021 21: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 10ELkNnY012732; Thu, 14 Jan 2021 21: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 10ELkNsb012731; Thu, 14 Jan 2021 21:46:23 GMT (envelope-from git) Date: Thu, 14 Jan 2021 21:46:23 GMT Message-Id: <202101142146.10ELkNsb012731@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: 8818758a6ea7 - main - RELNOTES: correct elfctl(1) man page section 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: 8818758a6ea72e43951acb3e81630483a55b72e4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 21:46:24 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8818758a6ea72e43951acb3e81630483a55b72e4 commit 8818758a6ea72e43951acb3e81630483a55b72e4 Author: Ed Maste AuthorDate: 2021-01-14 21:45:58 +0000 Commit: Ed Maste CommitDate: 2021-01-14 21:45:58 +0000 RELNOTES: correct elfctl(1) man page section --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 75eb55143267..585cf68dc2a2 100644 --- a/RELNOTES +++ b/RELNOTES @@ -19,7 +19,7 @@ Changes to this file should not be MFCed. processes. The policy is not enforced by default but can be enabled by setting the kern.elf32.allow_wx and kern.elf64_allow_wx sysctls to 1. Individual binaries can be - exempted from the policy by elfctl(9) via the wxneeded + exempted from the policy by elfctl(1) via the wxneeded feature. 4979620ece98: From owner-dev-commits-src-all@freebsd.org Fri Jan 15 00:47:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA0C14D33A3; Fri, 15 Jan 2021 00:47: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 4DH2Zp5Qh7z3jPV; Fri, 15 Jan 2021 00:47: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 AD25113C02; Fri, 15 Jan 2021 00:47: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 10F0lUBF046513; Fri, 15 Jan 2021 00:47:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10F0lU45046512; Fri, 15 Jan 2021 00:47:30 GMT (envelope-from git) Date: Fri, 15 Jan 2021 00:47:30 GMT Message-Id: <202101150047.10F0lU45046512@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: d1949353e5f5 - main - uart: Improve console specification parsing 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: d1949353e5f57678f227b0b283cb63f367174e96 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 00:47:30 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d1949353e5f57678f227b0b283cb63f367174e96 commit d1949353e5f57678f227b0b283cb63f367174e96 Author: Warner Losh AuthorDate: 2021-01-14 20:43:15 +0000 Commit: Warner Losh CommitDate: 2021-01-15 00:47:04 +0000 uart: Improve console specification parsing Print warning when we can't parse a console specification (this may not appear on the console, but will appear in dmesg). Also, accept key:value and key=value. There's no reason not to and it makes this more forgiving of mistakes. Reviewed by: rpokala@ Differential Revision: https://reviews.freebsd.org/D28168 --- sys/dev/uart/uart_subr.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c index 96d7735ea0ed..e6dec58d7705 100644 --- a/sys/dev/uart/uart_subr.c +++ b/sys/dev/uart/uart_subr.c @@ -172,7 +172,7 @@ uart_parse_tag(const char **p) out: *p += 2; - if ((*p)[0] != ':') + if ((*p)[0] != ':' && (*p)[0] != '=') return (-1); (*p)++; return (tag); @@ -283,25 +283,22 @@ uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class) di->bas.rclk = uart_parse_long(&spec); break; default: - freeenv(cp); - return (EINVAL); + goto inval; } if (*spec == '\0') break; - if (*spec != ',') { - freeenv(cp); - return (EINVAL); - } + if (*spec != ',') + goto inval; spec++; } - freeenv(cp); /* * If we still have an invalid address, the specification must be * missing an I/O port or memory address. We don't like that. */ if (addr == ~0U) - return (EINVAL); + goto inval; + freeenv(cp); /* * Accept only the well-known baudrates. Any invalid baudrate @@ -327,4 +324,8 @@ uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class) error = bus_space_map(di->bas.bst, addr, uart_getrange(class), 0, &di->bas.bsh); return (error); +inval: + printf("warning: bad uart specification: %s\n", cp); + freeenv(cp); + return (EINVAL); } From owner-dev-commits-src-all@freebsd.org Fri Jan 15 01:33:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E30F4D4162; Fri, 15 Jan 2021 01:33: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 4DH3bd0MhXz3lds; Fri, 15 Jan 2021 01:33: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 E8B78143BD; Fri, 15 Jan 2021 01:33: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 10F1XGxC011395; Fri, 15 Jan 2021 01:33:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10F1XG8x011394; Fri, 15 Jan 2021 01:33:16 GMT (envelope-from git) Date: Fri, 15 Jan 2021 01:33:16 GMT Message-Id: <202101150133.10F1XG8x011394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: b14cfecbf0ed - main - pkgfs_open: follow symlinks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b14cfecbf0ed04c841aa594dede3668b0a36344a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 01:33:17 -0000 The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b14cfecbf0ed04c841aa594dede3668b0a36344a commit b14cfecbf0ed04c841aa594dede3668b0a36344a Author: Simon J. Gerraty AuthorDate: 2021-01-15 01:33:05 +0000 Commit: Simon J. Gerraty CommitDate: 2021-01-15 01:33:05 +0000 pkgfs_open: follow symlinks Caller is not interested in symlinks follow them. Throw an error if too many links encountered. Reviewed by: stevek Sponsored by: Juniper Networks --This line, and those below, will be ignored-- > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Empty fields above will be automatically removed. Change-Id: I4ef92ff256f503c620dc5bba79ed93b32cb2330d --- stand/libsa/pkgfs.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/stand/libsa/pkgfs.c b/stand/libsa/pkgfs.c index 8018edd60d57..ffa16309ee6a 100644 --- a/stand/libsa/pkgfs.c +++ b/stand/libsa/pkgfs.c @@ -199,7 +199,7 @@ static int new_package(int, struct package **); static struct tarfile *scan_tarfile(struct package *, struct tarfile *); static int -pkg_open(const char *fn, struct open_file *f) +pkg_open_follow(const char *fn, struct open_file *f, int lnks) { struct tarfile *tf; @@ -242,6 +242,17 @@ pkg_open(const char *fn, struct open_file *f) if (strcmp(fn, tf->tf_hdr.ut_name) == 0) { f->f_fsdata = tf; tf->tf_fp = 0; /* Reset the file pointer. */ + DBG(("%s: found %s type %c\n", __func__, + fn, tf->tf_hdr.ut_typeflag[0])); + if (tf->tf_hdr.ut_typeflag[0] == '2') { + /* we have a symlink + * Note: ut_linkname is only 100 chars! + */ + if (lnks++ >= 8) + return (EMLINK); + return pkg_open_follow(tf->tf_hdr.ut_linkname, + f, lnks); + } return (0); } tf = scan_tarfile(package, tf); @@ -249,6 +260,12 @@ pkg_open(const char *fn, struct open_file *f) return (errno); } +static int +pkg_open(const char *fn, struct open_file *f) +{ + return pkg_open_follow(fn, f, 0); +} + static int pkg_close(struct open_file *f) { From owner-dev-commits-src-all@freebsd.org Fri Jan 15 07:27:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFE5B4DAF01; Fri, 15 Jan 2021 07: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 4DHCSd4cWDz4XGk; Fri, 15 Jan 2021 07: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 7FF1E18C03; Fri, 15 Jan 2021 07: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 10F7RjOs066812; Fri, 15 Jan 2021 07: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 10F7Rj6t066811; Fri, 15 Jan 2021 07:27:45 GMT (envelope-from git) Date: Fri, 15 Jan 2021 07:27:45 GMT Message-Id: <202101150727.10F7Rj6t066811@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: 0074d2118ac2 - stable/12 - linuxkpi: handle ARI 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/12 X-Git-Reftype: branch X-Git-Commit: 0074d2118ac24f23b43bc1923cc588dfebd73548 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 07:27:45 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0074d2118ac24f23b43bc1923cc588dfebd73548 commit 0074d2118ac24f23b43bc1923cc588dfebd73548 Author: Konstantin Belousov AuthorDate: 2021-01-04 21:41:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-15 06:57:01 +0000 linuxkpi: handle ARI (cherry picked from commit de27805fee0bbe3b714615b1df4cf0b8ebbc39b9) --- sys/compat/linuxkpi/common/src/linux_pci.c | 21 +++++++++++++++------ sys/conf/kmod.mk | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index d3b64e07b980..e73b324c47fb 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -64,6 +64,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "pcib_if.h" + static device_probe_t linux_pci_probe; static device_attach_t linux_pci_attach; static device_detach_t linux_pci_detach; @@ -234,12 +236,16 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, struct pci_bus *pbus; struct pci_devinfo *dinfo; device_t parent; + uintptr_t rid; int error; + bool isdrm; linux_set_current(curthread); - if (pdrv != NULL && pdrv->isdrm) { - parent = device_get_parent(dev); + parent = device_get_parent(dev); + isdrm = pdrv != NULL && pdrv->isdrm; + + if (isdrm) { dinfo = device_get_ivars(parent); device_set_ivars(dev, dinfo); } else { @@ -249,7 +255,11 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, pdev->dev.parent = &linux_root_device; pdev->dev.bsddev = dev; INIT_LIST_HEAD(&pdev->dev.irqents); - pdev->devfn = PCI_DEVFN(pci_get_slot(dev), pci_get_function(dev)); + if (isdrm) + PCI_GET_ID(device_get_parent(parent), parent, PCI_ID_RID, &rid); + else + PCI_GET_ID(parent, dev, PCI_ID_RID, &rid); + pdev->devfn = rid; pdev->device = dinfo->cfg.device; pdev->vendor = dinfo->cfg.vendor; pdev->subsystem_vendor = dinfo->cfg.subvendor; @@ -474,9 +484,8 @@ pci_resource_start(struct pci_dev *pdev, int bar) if ((rle = linux_pci_get_bar(pdev, bar)) == NULL) return (0); - dev = pci_find_dbsf(pdev->bus->domain, pdev->bus->number, - PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); - MPASS(dev != NULL); + 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); diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index fce55e529e29..610484ba7e36 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -113,6 +113,7 @@ LINUXKPI_GENSRCS+= \ device_if.h \ pci_if.h \ pci_iov_if.h \ + pcib_if.h \ vnode_if.h \ usb_if.h \ opt_usb.h \ From owner-dev-commits-src-all@freebsd.org Fri Jan 15 09:47:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86C294DF3B9; Fri, 15 Jan 2021 09:47: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 4DHGZ13Kd2z4gwM; Fri, 15 Jan 2021 09:47: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 64E5A1A80A; Fri, 15 Jan 2021 09:47: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 10F9lbZx048104; Fri, 15 Jan 2021 09:47:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10F9lb2b048103; Fri, 15 Jan 2021 09:47:37 GMT (envelope-from git) Date: Fri, 15 Jan 2021 09:47:37 GMT Message-Id: <202101150947.10F9lb2b048103@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: 94611a838866 - main - Add missing no-ctfconvert to C generation rules 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: 94611a838866cba8d7366a3107724af98c75e953 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 09:47:37 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=94611a838866cba8d7366a3107724af98c75e953 commit 94611a838866cba8d7366a3107724af98c75e953 Author: Andrew Turner AuthorDate: 2021-01-14 15:34:30 +0000 Commit: Andrew Turner CommitDate: 2021-01-15 09:41:41 +0000 Add missing no-ctfconvert to C generation rules Stop running ctfconvert over generated C files in the kernel by marking them with no-ctfconvert. This fixes warnings from ctfconvert trying to parse C files: ctfconvert: file.c: Couldn't read ehdr: Invalid argument Reviewed by: emaste, mmel Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28156 --- sys/conf/files | 98 ++++++++++++++++++++++++++-------------------------- sys/conf/files.amd64 | 2 +- sys/conf/files.arm64 | 4 +-- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 1765e217fcf6..e641b79d9c46 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1492,7 +1492,7 @@ dev/cxgbe/cudbg/fastlz_api.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" t4fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "t4fw_cfg.c" t4fw_cfg.fwo optional cxgbe \ dependency "t4fw_cfg.fw" \ @@ -1526,7 +1526,7 @@ t4fw.fw optional cxgbe \ clean "t4fw.fw" t5fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t5fw_cfg.fw:t5fw_cfg t5fw_cfg_uwire.fw:t5fw_cfg_uwire t5fw.fw:t5fw -mt5fw_cfg -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "t5fw_cfg.c" t5fw_cfg.fwo optional cxgbe \ dependency "t5fw_cfg.fw" \ @@ -1560,7 +1560,7 @@ t5fw.fw optional cxgbe \ clean "t5fw.fw" t6fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t6fw_cfg.fw:t6fw_cfg t6fw_cfg_uwire.fw:t6fw_cfg_uwire t6fw.fw:t6fw -mt6fw_cfg -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "t6fw_cfg.c" t6fw_cfg.fwo optional cxgbe \ dependency "t6fw_cfg.fw" \ @@ -1895,7 +1895,7 @@ dev/ips/ips_pci.c optional ips pci dev/ipw/if_ipw.c optional ipw ipwbssfw.c optional ipwbssfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_bss.fw:ipw_bss:130 -lintel_ipw -mipw_bss -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "ipwbssfw.c" ipw_bss.fwo optional ipwbssfw | ipwfw \ dependency "ipw_bss.fw" \ @@ -1909,7 +1909,7 @@ ipw_bss.fw optional ipwbssfw | ipwfw \ clean "ipw_bss.fw" ipwibssfw.c optional ipwibssfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_ibss.fw:ipw_ibss:130 -lintel_ipw -mipw_ibss -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "ipwibssfw.c" ipw_ibss.fwo optional ipwibssfw | ipwfw \ dependency "ipw_ibss.fw" \ @@ -1923,7 +1923,7 @@ ipw_ibss.fw optional ipwibssfw | ipwfw \ clean "ipw_ibss.fw" ipwmonitorfw.c optional ipwmonitorfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_monitor.fw:ipw_monitor:130 -lintel_ipw -mipw_monitor -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "ipwmonitorfw.c" ipw_monitor.fwo optional ipwmonitorfw | ipwfw \ dependency "ipw_monitor.fw" \ @@ -1957,7 +1957,7 @@ dev/ispfw/ispfw.c optional ispfw dev/iwi/if_iwi.c optional iwi iwibssfw.c optional iwibssfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_bss.fw:iwi_bss:300 -lintel_iwi -miwi_bss -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwibssfw.c" iwi_bss.fwo optional iwibssfw | iwifw \ dependency "iwi_bss.fw" \ @@ -1971,7 +1971,7 @@ iwi_bss.fw optional iwibssfw | iwifw \ clean "iwi_bss.fw" iwiibssfw.c optional iwiibssfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_ibss.fw:iwi_ibss:300 -lintel_iwi -miwi_ibss -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwiibssfw.c" iwi_ibss.fwo optional iwiibssfw | iwifw \ dependency "iwi_ibss.fw" \ @@ -1985,7 +1985,7 @@ iwi_ibss.fw optional iwiibssfw | iwifw \ clean "iwi_ibss.fw" iwimonitorfw.c optional iwimonitorfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_monitor.fw:iwi_monitor:300 -lintel_iwi -miwi_monitor -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwimonitorfw.c" iwi_monitor.fwo optional iwimonitorfw | iwifw \ dependency "iwi_monitor.fw" \ @@ -2018,7 +2018,7 @@ dev/iwm/if_iwm_time_event.c optional iwm dev/iwm/if_iwm_util.c optional iwm iwm3160fw.c optional iwm3160fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm3160.fw:iwm3160fw -miwm3160fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwm3160fw.c" iwm3160fw.fwo optional iwm3160fw | iwmfw \ dependency "iwm3160.fw" \ @@ -2032,7 +2032,7 @@ iwm3160.fw optional iwm3160fw | iwmfw \ clean "iwm3160.fw" iwm3168fw.c optional iwm3168fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm3168.fw:iwm3168fw -miwm3168fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwm3168fw.c" iwm3168fw.fwo optional iwm3168fw | iwmfw \ dependency "iwm3168.fw" \ @@ -2046,7 +2046,7 @@ iwm3168.fw optional iwm3168fw | iwmfw \ clean "iwm3168.fw" iwm7260fw.c optional iwm7260fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7260.fw:iwm7260fw -miwm7260fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwm7260fw.c" iwm7260fw.fwo optional iwm7260fw | iwmfw \ dependency "iwm7260.fw" \ @@ -2060,7 +2060,7 @@ iwm7260.fw optional iwm7260fw | iwmfw \ clean "iwm7260.fw" iwm7265fw.c optional iwm7265fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7265.fw:iwm7265fw -miwm7265fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwm7265fw.c" iwm7265fw.fwo optional iwm7265fw | iwmfw \ dependency "iwm7265.fw" \ @@ -2074,7 +2074,7 @@ iwm7265.fw optional iwm7265fw | iwmfw \ clean "iwm7265.fw" iwm7265Dfw.c optional iwm7265Dfw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7265D.fw:iwm7265Dfw -miwm7265Dfw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwm7265Dfw.c" iwm7265Dfw.fwo optional iwm7265Dfw | iwmfw \ dependency "iwm7265D.fw" \ @@ -2088,7 +2088,7 @@ iwm7265D.fw optional iwm7265Dfw | iwmfw \ clean "iwm7265D.fw" iwm8000Cfw.c optional iwm8000Cfw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8000C.fw:iwm8000Cfw -miwm8000Cfw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwm8000Cfw.c" iwm8000Cfw.fwo optional iwm8000Cfw | iwmfw \ dependency "iwm8000C.fw" \ @@ -2107,7 +2107,7 @@ iwm8265.fw optional iwm8265fw | iwmfw \ clean "iwm8265.fw" iwm8265fw.c optional iwm8265fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8265.fw:iwm8265fw -miwm8265fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwm8265fw.c" iwm8265fw.fwo optional iwm8265fw | iwmfw \ dependency "iwm8265.fw" \ @@ -2117,7 +2117,7 @@ iwm8265fw.fwo optional iwm8265fw | iwmfw \ dev/iwn/if_iwn.c optional iwn iwn1000fw.c optional iwn1000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw -miwn1000fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn1000fw.c" iwn1000fw.fwo optional iwn1000fw | iwnfw \ dependency "iwn1000.fw" \ @@ -2131,7 +2131,7 @@ iwn1000.fw optional iwn1000fw | iwnfw \ clean "iwn1000.fw" iwn100fw.c optional iwn100fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn100.fw:iwn100fw -miwn100fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn100fw.c" iwn100fw.fwo optional iwn100fw | iwnfw \ dependency "iwn100.fw" \ @@ -2145,7 +2145,7 @@ iwn100.fw optional iwn100fw | iwnfw \ clean "iwn100.fw" iwn105fw.c optional iwn105fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn105.fw:iwn105fw -miwn105fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn105fw.c" iwn105fw.fwo optional iwn105fw | iwnfw \ dependency "iwn105.fw" \ @@ -2159,7 +2159,7 @@ iwn105.fw optional iwn105fw | iwnfw \ clean "iwn105.fw" iwn135fw.c optional iwn135fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn135.fw:iwn135fw -miwn135fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn135fw.c" iwn135fw.fwo optional iwn135fw | iwnfw \ dependency "iwn135.fw" \ @@ -2173,7 +2173,7 @@ iwn135.fw optional iwn135fw | iwnfw \ clean "iwn135.fw" iwn2000fw.c optional iwn2000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2000.fw:iwn2000fw -miwn2000fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn2000fw.c" iwn2000fw.fwo optional iwn2000fw | iwnfw \ dependency "iwn2000.fw" \ @@ -2187,7 +2187,7 @@ iwn2000.fw optional iwn2000fw | iwnfw \ clean "iwn2000.fw" iwn2030fw.c optional iwn2030fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2030.fw:iwn2030fw -miwn2030fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn2030fw.c" iwn2030fw.fwo optional iwn2030fw | iwnfw \ dependency "iwn2030.fw" \ @@ -2201,7 +2201,7 @@ iwn2030.fw optional iwn2030fw | iwnfw \ clean "iwn2030.fw" iwn4965fw.c optional iwn4965fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn4965.fw:iwn4965fw -miwn4965fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn4965fw.c" iwn4965fw.fwo optional iwn4965fw | iwnfw \ dependency "iwn4965.fw" \ @@ -2215,7 +2215,7 @@ iwn4965.fw optional iwn4965fw | iwnfw \ clean "iwn4965.fw" iwn5000fw.c optional iwn5000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5000.fw:iwn5000fw -miwn5000fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn5000fw.c" iwn5000fw.fwo optional iwn5000fw | iwnfw \ dependency "iwn5000.fw" \ @@ -2229,7 +2229,7 @@ iwn5000.fw optional iwn5000fw | iwnfw \ clean "iwn5000.fw" iwn5150fw.c optional iwn5150fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5150.fw:iwn5150fw -miwn5150fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn5150fw.c" iwn5150fw.fwo optional iwn5150fw | iwnfw \ dependency "iwn5150.fw" \ @@ -2243,7 +2243,7 @@ iwn5150.fw optional iwn5150fw | iwnfw \ clean "iwn5150.fw" iwn6000fw.c optional iwn6000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000.fw:iwn6000fw -miwn6000fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn6000fw.c" iwn6000fw.fwo optional iwn6000fw | iwnfw \ dependency "iwn6000.fw" \ @@ -2257,7 +2257,7 @@ iwn6000.fw optional iwn6000fw | iwnfw \ clean "iwn6000.fw" iwn6000g2afw.c optional iwn6000g2afw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2a.fw:iwn6000g2afw -miwn6000g2afw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn6000g2afw.c" iwn6000g2afw.fwo optional iwn6000g2afw | iwnfw \ dependency "iwn6000g2a.fw" \ @@ -2271,7 +2271,7 @@ iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ clean "iwn6000g2a.fw" iwn6000g2bfw.c optional iwn6000g2bfw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2b.fw:iwn6000g2bfw -miwn6000g2bfw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn6000g2bfw.c" iwn6000g2bfw.fwo optional iwn6000g2bfw | iwnfw \ dependency "iwn6000g2b.fw" \ @@ -2285,7 +2285,7 @@ iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ clean "iwn6000g2b.fw" iwn6050fw.c optional iwn6050fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6050.fw:iwn6050fw -miwn6050fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "iwn6050fw.c" iwn6050fw.fwo optional iwn6050fw | iwnfw \ dependency "iwn6050.fw" \ @@ -2390,7 +2390,7 @@ dev/liquidio/lio_sysctl.c optional lio \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" lio.c optional lio \ compile-with "${AWK} -f $S/tools/fw_stub.awk lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "lio.c" lio_23xx_nic.bin.fw.fwo optional lio \ dependency "lio_23xx_nic.bin.fw" \ @@ -2513,7 +2513,7 @@ dev/mwl/if_mwl_pci.c optional mwl pci dev/mwl/mwlhal.c optional mwl mwlfw.c optional mwlfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot -mmwl -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "mwlfw.c" mw88W8363.fwo optional mwlfw \ dependency "mw88W8363.fw" \ @@ -2777,7 +2777,7 @@ dev/ral/rt2860.c optional ral dev/ral/if_ral_pci.c optional ral pci rt2561fw.c optional rt2561fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561.fw:rt2561fw -mrt2561 -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rt2561fw.c" rt2561fw.fwo optional rt2561fw | ralfw \ dependency "rt2561.fw" \ @@ -2791,7 +2791,7 @@ rt2561.fw optional rt2561fw | ralfw \ clean "rt2561.fw" rt2561sfw.c optional rt2561sfw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561s.fw:rt2561sfw -mrt2561s -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rt2561sfw.c" rt2561sfw.fwo optional rt2561sfw | ralfw \ dependency "rt2561s.fw" \ @@ -2805,7 +2805,7 @@ rt2561s.fw optional rt2561sfw | ralfw \ clean "rt2561s.fw" rt2661fw.c optional rt2661fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2661.fw:rt2661fw -mrt2661 -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rt2661fw.c" rt2661fw.fwo optional rt2661fw | ralfw \ dependency "rt2661.fw" \ @@ -2819,7 +2819,7 @@ rt2661.fw optional rt2661fw | ralfw \ clean "rt2661.fw" rt2860fw.c optional rt2860fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2860.fw:rt2860fw -mrt2860 -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rt2860fw.c" rt2860fw.fwo optional rt2860fw | ralfw \ dependency "rt2860.fw" \ @@ -2950,7 +2950,7 @@ dev/rtwn/rtl8821a/usb/r21au_dfs.c optional rtwn_usb dev/rtwn/rtl8821a/usb/r21au_init.c optional rtwn_usb rtwn-rtl8188eefw.c optional rtwn-rtl8188eefw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8188eefw.fw:rtwn-rtl8188eefw:111 -mrtwn-rtl8188eefw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8188eefw.c" rtwn-rtl8188eefw.fwo optional rtwn-rtl8188eefw | rtwnfw \ dependency "rtwn-rtl8188eefw.fw" \ @@ -2964,7 +2964,7 @@ rtwn-rtl8188eefw.fw optional rtwn-rtl8188eefw | rtwnfw \ clean "rtwn-rtl8188eefw.fw" rtwn-rtl8188eufw.c optional rtwn-rtl8188eufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8188eufw.fw:rtwn-rtl8188eufw:111 -mrtwn-rtl8188eufw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8188eufw.c" rtwn-rtl8188eufw.fwo optional rtwn-rtl8188eufw | rtwnfw \ dependency "rtwn-rtl8188eufw.fw" \ @@ -2978,7 +2978,7 @@ rtwn-rtl8188eufw.fw optional rtwn-rtl8188eufw | rtwnfw \ clean "rtwn-rtl8188eufw.fw" rtwn-rtl8192cfwE.c optional rtwn-rtl8192cfwE | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwE.fw:rtwn-rtl8192cfwE:111 -mrtwn-rtl8192cfwE -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwE.c" rtwn-rtl8192cfwE.fwo optional rtwn-rtl8192cfwE | rtwnfw \ dependency "rtwn-rtl8192cfwE.fw" \ @@ -2992,7 +2992,7 @@ rtwn-rtl8192cfwE.fw optional rtwn-rtl8192cfwE | rtwnfw \ clean "rtwn-rtl8192cfwE.fw" rtwn-rtl8192cfwE_B.c optional rtwn-rtl8192cfwE_B | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwE_B.fw:rtwn-rtl8192cfwE_B:111 -mrtwn-rtl8192cfwE_B -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwE_B.c" rtwn-rtl8192cfwE_B.fwo optional rtwn-rtl8192cfwE_B | rtwnfw \ dependency "rtwn-rtl8192cfwE_B.fw" \ @@ -3006,7 +3006,7 @@ rtwn-rtl8192cfwE_B.fw optional rtwn-rtl8192cfwE_B | rtwnfw \ clean "rtwn-rtl8192cfwE_B.fw" rtwn-rtl8192cfwT.c optional rtwn-rtl8192cfwT | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwT.fw:rtwn-rtl8192cfwT:111 -mrtwn-rtl8192cfwT -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwT.c" rtwn-rtl8192cfwT.fwo optional rtwn-rtl8192cfwT | rtwnfw \ dependency "rtwn-rtl8192cfwT.fw" \ @@ -3020,7 +3020,7 @@ rtwn-rtl8192cfwT.fw optional rtwn-rtl8192cfwT | rtwnfw \ clean "rtwn-rtl8192cfwT.fw" rtwn-rtl8192cfwU.c optional rtwn-rtl8192cfwU | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwU.fw:rtwn-rtl8192cfwU:111 -mrtwn-rtl8192cfwU -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwU.c" rtwn-rtl8192cfwU.fwo optional rtwn-rtl8192cfwU | rtwnfw \ dependency "rtwn-rtl8192cfwU.fw" \ @@ -3034,7 +3034,7 @@ rtwn-rtl8192cfwU.fw optional rtwn-rtl8192cfwU | rtwnfw \ clean "rtwn-rtl8192cfwU.fw" rtwn-rtl8192eufw.c optional rtwn-rtl8192eufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192eufw.fw:rtwn-rtl8192eufw:111 -mrtwn-rtl8192eufw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8192eufw.c" rtwn-rtl8192eufw.fwo optional rtwn-rtl8192eufw | rtwnfw \ dependency "rtwn-rtl8192eufw.fw" \ @@ -3048,7 +3048,7 @@ rtwn-rtl8192eufw.fw optional rtwn-rtl8192eufw | rtwnfw \ clean "rtwn-rtl8192eufw.fw" rtwn-rtl8812aufw.c optional rtwn-rtl8812aufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8812aufw.fw:rtwn-rtl8812aufw:111 -mrtwn-rtl8812aufw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8812aufw.c" rtwn-rtl8812aufw.fwo optional rtwn-rtl8812aufw | rtwnfw \ dependency "rtwn-rtl8812aufw.fw" \ @@ -3062,7 +3062,7 @@ rtwn-rtl8812aufw.fw optional rtwn-rtl8812aufw | rtwnfw \ clean "rtwn-rtl8812aufw.fw" rtwn-rtl8821aufw.c optional rtwn-rtl8821aufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8821aufw.fw:rtwn-rtl8821aufw:111 -mrtwn-rtl8821aufw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rtwn-rtl8821aufw.c" rtwn-rtl8821aufw.fwo optional rtwn-rtl8821aufw | rtwnfw \ dependency "rtwn-rtl8821aufw.fw" \ @@ -3339,7 +3339,7 @@ dev/usb/net/uhso.c optional uhso dev/usb/wlan/if_rsu.c optional rsu rsu-rtl8712fw.c optional rsu-rtl8712fw | rsufw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rsu-rtl8712fw.fw:rsu-rtl8712fw:120 -mrsu-rtl8712fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "rsu-rtl8712fw.c" rsu-rtl8712fw.fwo optional rsu-rtl8712fw | rsufw \ dependency "rsu-rtl8712fw.fw" \ @@ -3355,7 +3355,7 @@ dev/usb/wlan/if_rum.c optional rum dev/usb/wlan/if_run.c optional run runfw.c optional runfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk run.fw:runfw -mrunfw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "runfw.c" runfw.fwo optional runfw \ dependency "run.fw" \ @@ -3502,7 +3502,7 @@ dev/watchdog/watchdog.c standard dev/wpi/if_wpi.c optional wpi pci wpifw.c optional wpifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk wpi.fw:wpifw:153229 -mwpi -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "wpifw.c" wpifw.fwo optional wpifw \ dependency "wpi.fw" \ @@ -3999,12 +3999,12 @@ gssd.h optional kgssapi \ gssd_xdr.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "gssd_xdr.c" gssd_clnt.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "gssd_clnt.c" kgssapi/gss_accept_sec_context.c optional kgssapi kgssapi/gss_add_oid_set_member.c optional kgssapi diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index a049d9469834..ddd4e07b365c 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -191,7 +191,7 @@ dev/ice/ice_switch.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031000 -mice_ddp -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ dependency "ice_ddp.fw" \ diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 030c02233910..8ee422f23e26 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -344,7 +344,7 @@ dev/ice/ice_switch.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031000 -mice_ddp -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ dependency "ice_ddp.fw" \ @@ -480,7 +480,7 @@ dev/ffec/if_ffec.c optional ffec tegra210_xusb_fw.c optional tegra210_xusb_fw \ dependency "$S/conf/files.arm64" \ compile-with "${AWK} -f $S/tools/fw_stub.awk tegra210_xusb.fw:tegra210_xusb_fw -mtegra210_xusb_fw -c${.TARGET}" \ - no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "tegra210_xusb_fw.c" tegra210_xusb.fwo optional tegra210_xusb_fw \ From owner-dev-commits-src-all@freebsd.org Fri Jan 15 11:29:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9CB494E18F3; Fri, 15 Jan 2021 11:29: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 4DHJqh42NCz4nkT; Fri, 15 Jan 2021 11:29: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 7D1AB1BC96; Fri, 15 Jan 2021 11:29: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 10FBTaxm080115; Fri, 15 Jan 2021 11:29:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FBTZoF080110; Fri, 15 Jan 2021 11:29:35 GMT (envelope-from git) Date: Fri, 15 Jan 2021 11:29:35 GMT Message-Id: <202101151129.10FBTZoF080110@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: c66ec88fed84 - main - Add 'sys/contrib/device-tree/' from commit '5ee353c36d3c9c7f63df7c7671875e73fba70958' 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: c66ec88fed842fbaad62c30d510644ceb7bd2d71 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 11:29:36 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c66ec88fed842fbaad62c30d510644ceb7bd2d71 commit c66ec88fed842fbaad62c30d510644ceb7bd2d71 Merge: 94611a838866 5ee353c36d3c Author: Emmanuel Vadot AuthorDate: 2021-01-15 11:28:57 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 11:28:57 +0000 Add 'sys/contrib/device-tree/' from commit '5ee353c36d3c9c7f63df7c7671875e73fba70958' git-subtree-dir: sys/contrib/device-tree git-subtree-mainline: 94611a838866cba8d7366a3107724af98c75e953 git-subtree-split: 5ee353c36d3c9c7f63df7c7671875e73fba70958 sys/contrib/device-tree/Bindings/.gitignore | 3 + sys/contrib/device-tree/Bindings/ABI.rst | 42 + sys/contrib/device-tree/Bindings/Makefile | 73 + sys/contrib/device-tree/Bindings/arc/archs-pct.txt | 17 + sys/contrib/device-tree/Bindings/arc/axs101.txt | 7 + sys/contrib/device-tree/Bindings/arc/axs103.txt | 8 + sys/contrib/device-tree/Bindings/arc/eznps.txt | 7 + sys/contrib/device-tree/Bindings/arc/hsdk.txt | 7 + sys/contrib/device-tree/Bindings/arc/pct.txt | 20 + sys/contrib/device-tree/Bindings/arm/actions.yaml | 38 + .../device-tree/Bindings/arm/al,alpine.yaml | 21 + sys/contrib/device-tree/Bindings/arm/altera.yaml | 20 + .../Bindings/arm/altera/socfpga-clk-manager.yaml | 33 + .../arm/altera/socfpga-sdram-controller.txt | 12 + .../Bindings/arm/altera/socfpga-sdram-edac.txt | 15 + .../Bindings/arm/altera/socfpga-system.txt | 25 + .../device-tree/Bindings/arm/amazon,al.yaml | 33 + .../device-tree/Bindings/arm/amlogic,scpi.txt | 27 + sys/contrib/device-tree/Bindings/arm/amlogic.yaml | 174 + .../arm/amlogic/amlogic,meson-gx-ao-secure.yaml | 54 + .../Bindings/arm/amlogic/analog-top.txt | 20 + .../device-tree/Bindings/arm/amlogic/assist.txt | 17 + .../device-tree/Bindings/arm/amlogic/bootrom.txt | 17 + .../device-tree/Bindings/arm/amlogic/pmu.txt | 18 + sys/contrib/device-tree/Bindings/arm/apm/scu.txt | 17 + .../device-tree/Bindings/arm/arm,integrator.yaml | 86 + .../device-tree/Bindings/arm/arm,realview.yaml | 123 + sys/contrib/device-tree/Bindings/arm/arm,scmi.txt | 197 + sys/contrib/device-tree/Bindings/arm/arm,scpi.txt | 219 + .../device-tree/Bindings/arm/arm,versatile.yaml | 71 + .../Bindings/arm/arm,vexpress-juno.yaml | 219 + .../device-tree/Bindings/arm/arm-dsu-pmu.txt | 27 + .../device-tree/Bindings/arm/atmel-at91.yaml | 186 + .../device-tree/Bindings/arm/atmel-sysregs.txt | 193 + sys/contrib/device-tree/Bindings/arm/axis.txt | 29 + sys/contrib/device-tree/Bindings/arm/axxia.yaml | 19 + .../device-tree/Bindings/arm/bcm/bcm2835.yaml | 54 + .../Bindings/arm/bcm/brcm,bcm11351.yaml | 21 + .../Bindings/arm/bcm/brcm,bcm21664.yaml | 21 + .../Bindings/arm/bcm/brcm,bcm23550.yaml | 21 + .../device-tree/Bindings/arm/bcm/brcm,bcm4708.yaml | 88 + .../device-tree/Bindings/arm/bcm/brcm,bcm63138.txt | 85 + .../device-tree/Bindings/arm/bcm/brcm,brcmstb.txt | 265 + .../device-tree/Bindings/arm/bcm/brcm,cygnus.yaml | 29 + .../device-tree/Bindings/arm/bcm/brcm,hr2.yaml | 28 + .../device-tree/Bindings/arm/bcm/brcm,ns2.yaml | 23 + .../device-tree/Bindings/arm/bcm/brcm,nsp.yaml | 36 + .../Bindings/arm/bcm/brcm,stingray.yaml | 24 + .../Bindings/arm/bcm/brcm,vulcan-soc.yaml | 22 + .../arm/bcm/raspberrypi,bcm2835-firmware.txt | 14 + .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 68 + sys/contrib/device-tree/Bindings/arm/bitmain.yaml | 18 + sys/contrib/device-tree/Bindings/arm/calxeda.yaml | 22 + .../device-tree/Bindings/arm/calxeda/hb-sregs.yaml | 49 + .../device-tree/Bindings/arm/calxeda/l2ecc.yaml | 42 + .../device-tree/Bindings/arm/cavium-thunder.txt | 10 + .../device-tree/Bindings/arm/cavium-thunder2.txt | 8 + sys/contrib/device-tree/Bindings/arm/cci.txt | 224 + .../Bindings/arm/coresight-cpu-debug.txt | 49 + .../device-tree/Bindings/arm/coresight-cti.yaml | 330 + sys/contrib/device-tree/Bindings/arm/coresight.txt | 394 ++ .../device-tree/Bindings/arm/cpu-capacity.txt | 238 + .../Bindings/arm/cpu-enable-method/al,alpine-smp | 80 + .../arm/cpu-enable-method/marvell,berlin-smp | 41 + .../arm/cpu-enable-method/nuvoton,npcm750-smp | 42 + sys/contrib/device-tree/Bindings/arm/cpus.yaml | 535 ++ .../device-tree/Bindings/arm/digicolor.yaml | 16 + .../Bindings/arm/firmware/linaro,optee-tz.txt | 31 + .../device-tree/Bindings/arm/firmware/sdei.txt | 42 + .../arm/firmware/tlm,trusted-foundations.txt | 20 + .../Bindings/arm/freescale/fsl,imx7ulp-pm.txt | 23 + .../Bindings/arm/freescale/fsl,imx7ulp-sim.txt | 16 + .../Bindings/arm/freescale/fsl,layerscape-dcfg.txt | 19 + .../Bindings/arm/freescale/fsl,layerscape-scfg.txt | 19 + .../device-tree/Bindings/arm/freescale/fsl,scu.txt | 270 + .../arm/freescale/fsl,vf610-mscm-cpucfg.txt | 14 + .../Bindings/arm/freescale/fsl,vf610-mscm-ir.txt | 30 + .../device-tree/Bindings/arm/freescale/m4if.txt | 12 + .../device-tree/Bindings/arm/freescale/tigerp.txt | 12 + sys/contrib/device-tree/Bindings/arm/fsl.yaml | 529 ++ sys/contrib/device-tree/Bindings/arm/fw-cfg.txt | 38 + sys/contrib/device-tree/Bindings/arm/gemini.txt | 108 + .../Bindings/arm/hisilicon/hi3519-sysctrl.txt | 14 + .../arm/hisilicon/hisilicon-low-pin-count.txt | 33 + .../Bindings/arm/hisilicon/hisilicon.txt | 319 + .../device-tree/Bindings/arm/idle-states.yaml | 661 ++ .../device-tree/Bindings/arm/intel,keembay.yaml | 19 + .../device-tree/Bindings/arm/intel-ixp4xx.yaml | 22 + sys/contrib/device-tree/Bindings/arm/juno,scpi.txt | 26 + .../device-tree/Bindings/arm/keystone/keystone.txt | 42 + .../Bindings/arm/keystone/ti,k3-sci-common.yaml | 44 + .../device-tree/Bindings/arm/keystone/ti,sci.txt | 86 + sys/contrib/device-tree/Bindings/arm/l2c2x0.yaml | 242 + .../Bindings/arm/marvell/98dx3236-resume-ctrl.txt | 16 + .../device-tree/Bindings/arm/marvell/98dx3236.txt | 23 + .../arm/marvell/ap80x-system-controller.txt | 177 + .../Bindings/arm/marvell/armada-370-xp-pmsu.txt | 21 + .../Bindings/arm/marvell/armada-370-xp.txt | 24 + .../Bindings/arm/marvell/armada-375.txt | 9 + .../Bindings/arm/marvell/armada-37xx.txt | 58 + .../arm/marvell/armada-380-mpcore-soc-ctrl.txt | 14 + .../Bindings/arm/marvell/armada-38x.txt | 27 + .../Bindings/arm/marvell/armada-39x.txt | 31 + .../Bindings/arm/marvell/armada-7k-8k.yaml | 61 + .../Bindings/arm/marvell/armada-8kp.txt | 15 + .../Bindings/arm/marvell/armada-cpu-reset.txt | 14 + .../Bindings/arm/marvell/coherency-fabric.txt | 48 + .../arm/marvell/cp110-system-controller.txt | 234 + .../device-tree/Bindings/arm/marvell/kirkwood.txt | 27 + .../Bindings/arm/marvell/marvell,dove.txt | 22 + .../Bindings/arm/marvell/marvell,kirkwood.txt | 105 + .../Bindings/arm/marvell/marvell,orion5x.txt | 25 + .../Bindings/arm/marvell/mvebu-cpu-config.txt | 20 + .../arm/marvell/mvebu-system-controller.txt | 18 + sys/contrib/device-tree/Bindings/arm/mediatek.yaml | 122 + .../Bindings/arm/mediatek/mediatek,apmixedsys.txt | 33 + .../Bindings/arm/mediatek/mediatek,audsys.txt | 37 + .../Bindings/arm/mediatek/mediatek,bdpsys.txt | 24 + .../Bindings/arm/mediatek/mediatek,camsys.txt | 24 + .../Bindings/arm/mediatek/mediatek,ethsys.txt | 27 + .../Bindings/arm/mediatek/mediatek,g3dsys.txt | 30 + .../Bindings/arm/mediatek/mediatek,hifsys.txt | 26 + .../Bindings/arm/mediatek/mediatek,imgsys.txt | 29 + .../Bindings/arm/mediatek/mediatek,infracfg.txt | 40 + .../Bindings/arm/mediatek/mediatek,ipesys.txt | 22 + .../Bindings/arm/mediatek/mediatek,ipu.txt | 43 + .../Bindings/arm/mediatek/mediatek,jpgdecsys.txt | 22 + .../Bindings/arm/mediatek/mediatek,mcucfg.txt | 23 + .../Bindings/arm/mediatek/mediatek,mfgcfg.txt | 24 + .../Bindings/arm/mediatek/mediatek,mipi0a.txt | 28 + .../Bindings/arm/mediatek/mediatek,mmsys.txt | 30 + .../Bindings/arm/mediatek/mediatek,pciesys.txt | 25 + .../Bindings/arm/mediatek/mediatek,pericfg.yaml | 65 + .../Bindings/arm/mediatek/mediatek,sgmiisys.txt | 23 + .../Bindings/arm/mediatek/mediatek,ssusbsys.txt | 25 + .../Bindings/arm/mediatek/mediatek,topckgen.txt | 33 + .../Bindings/arm/mediatek/mediatek,vcodecsys.txt | 27 + .../Bindings/arm/mediatek/mediatek,vdecsys.txt | 28 + .../Bindings/arm/mediatek/mediatek,vencltsys.txt | 22 + .../Bindings/arm/mediatek/mediatek,vencsys.txt | 26 + .../device-tree/Bindings/arm/microchip,sparx5.yaml | 65 + sys/contrib/device-tree/Bindings/arm/moxart.yaml | 19 + .../device-tree/Bindings/arm/mrvl/feroceon.txt | 16 + .../device-tree/Bindings/arm/mrvl/mrvl.yaml | 38 + .../device-tree/Bindings/arm/mrvl/tauros2.txt | 17 + .../Bindings/arm/msm/qcom,idle-state.txt | 84 + .../device-tree/Bindings/arm/msm/qcom,kpss-acc.txt | 49 + .../device-tree/Bindings/arm/msm/qcom,kpss-gcc.txt | 44 + .../device-tree/Bindings/arm/msm/qcom,llcc.yaml | 57 + .../device-tree/Bindings/arm/msm/qcom,saw2.txt | 57 + sys/contrib/device-tree/Bindings/arm/msm/ssbi.txt | 18 + .../Bindings/arm/mstar/mstar,l3bridge.yaml | 44 + .../device-tree/Bindings/arm/mstar/mstar.yaml | 33 + sys/contrib/device-tree/Bindings/arm/npcm/npcm.txt | 6 + .../Bindings/arm/nvidia,tegra194-ccplex.yaml | 69 + .../device-tree/Bindings/arm/nxp/lpc32xx.yaml | 24 + .../device-tree/Bindings/arm/omap/counter.txt | 15 + .../device-tree/Bindings/arm/omap/crossbar.txt | 55 + sys/contrib/device-tree/Bindings/arm/omap/ctrl.txt | 82 + sys/contrib/device-tree/Bindings/arm/omap/dmm.txt | 22 + sys/contrib/device-tree/Bindings/arm/omap/dsp.txt | 14 + sys/contrib/device-tree/Bindings/arm/omap/iva.txt | 19 + .../device-tree/Bindings/arm/omap/l3-noc.txt | 23 + sys/contrib/device-tree/Bindings/arm/omap/l4.txt | 37 + sys/contrib/device-tree/Bindings/arm/omap/mpu.txt | 54 + sys/contrib/device-tree/Bindings/arm/omap/omap.txt | 222 + sys/contrib/device-tree/Bindings/arm/omap/prcm.txt | 63 + .../device-tree/Bindings/arm/omap/prm-inst.txt | 29 + sys/contrib/device-tree/Bindings/arm/oxnas.txt | 14 + sys/contrib/device-tree/Bindings/arm/picoxcell.txt | 24 + sys/contrib/device-tree/Bindings/arm/pmu.yaml | 96 + .../device-tree/Bindings/arm/primecell.yaml | 36 + sys/contrib/device-tree/Bindings/arm/psci.yaml | 268 + sys/contrib/device-tree/Bindings/arm/qcom.yaml | 168 + sys/contrib/device-tree/Bindings/arm/rda.yaml | 20 + sys/contrib/device-tree/Bindings/arm/realtek.yaml | 57 + .../device-tree/Bindings/arm/renesas,prr.yaml | 37 + sys/contrib/device-tree/Bindings/arm/renesas.yaml | 290 + sys/contrib/device-tree/Bindings/arm/rockchip.yaml | 558 ++ .../device-tree/Bindings/arm/rockchip/pmu.txt | 16 + .../device-tree/Bindings/arm/rtsm-dcscb.txt | 19 + .../Bindings/arm/samsung/exynos-chipid.yaml | 40 + .../device-tree/Bindings/arm/samsung/pmu.yaml | 107 + .../Bindings/arm/samsung/samsung-boards.yaml | 182 + .../arm/samsung/samsung-secure-firmware.yaml | 33 + .../device-tree/Bindings/arm/samsung/sysreg.yaml | 45 + sys/contrib/device-tree/Bindings/arm/scu.txt | 28 + sys/contrib/device-tree/Bindings/arm/secure.txt | 70 + sys/contrib/device-tree/Bindings/arm/sirf.yaml | 27 + .../Bindings/arm/socionext/milbeaut.yaml | 22 + .../socionext/socionext,uniphier-system-cache.yaml | 102 + .../Bindings/arm/socionext/uniphier.yaml | 62 + sys/contrib/device-tree/Bindings/arm/sp810.txt | 46 + sys/contrib/device-tree/Bindings/arm/spe-pmu.txt | 20 + .../device-tree/Bindings/arm/spear-misc.txt | 9 + sys/contrib/device-tree/Bindings/arm/spear.yaml | 25 + .../device-tree/Bindings/arm/sprd/sprd.yaml | 33 + .../device-tree/Bindings/arm/ste-nomadik.txt | 38 + sys/contrib/device-tree/Bindings/arm/ste-u300.txt | 46 + sys/contrib/device-tree/Bindings/arm/sti.yaml | 23 + .../device-tree/Bindings/arm/stm32/st,mlahb.yaml | 70 + .../Bindings/arm/stm32/st,stm32-syscon.yaml | 55 + .../device-tree/Bindings/arm/stm32/stm32.yaml | 53 + sys/contrib/device-tree/Bindings/arm/sunxi.yaml | 885 +++ .../arm/sunxi/allwinner,sun4i-a10-mbus.yaml | 72 + sys/contrib/device-tree/Bindings/arm/swir.txt | 12 + sys/contrib/device-tree/Bindings/arm/syna.txt | 105 + sys/contrib/device-tree/Bindings/arm/tegra.yaml | 121 + .../device-tree/Bindings/arm/tegra/nvidia,nvec.txt | 21 + .../Bindings/arm/tegra/nvidia,tegra186-pmc.txt | 132 + .../Bindings/arm/tegra/nvidia,tegra20-ahb.txt | 17 + .../Bindings/arm/tegra/nvidia,tegra20-flowctrl.txt | 18 + .../Bindings/arm/tegra/nvidia,tegra20-pmc.yaml | 353 ++ .../Bindings/arm/tegra/nvidia,tegra30-actmon.txt | 32 + sys/contrib/device-tree/Bindings/arm/ti/k3.txt | 26 + .../device-tree/Bindings/arm/ti/nspire.yaml | 24 + .../device-tree/Bindings/arm/ti/ti,davinci.yaml | 26 + sys/contrib/device-tree/Bindings/arm/ux500.yaml | 36 + .../device-tree/Bindings/arm/ux500/boards.txt | 83 + .../Bindings/arm/ux500/power_domain.txt | 35 + .../device-tree/Bindings/arm/versatile-sysreg.txt | 10 + .../device-tree/Bindings/arm/vexpress-scc.txt | 33 + .../device-tree/Bindings/arm/vexpress-sysreg.txt | 103 + sys/contrib/device-tree/Bindings/arm/vt8500.yaml | 23 + .../Bindings/arm/vt8500/via,vt8500-pmc.txt | 13 + sys/contrib/device-tree/Bindings/arm/xen.txt | 60 + sys/contrib/device-tree/Bindings/arm/xilinx.yaml | 114 + .../device-tree/Bindings/arm/zte,sysctrl.txt | 30 + sys/contrib/device-tree/Bindings/arm/zte.yaml | 26 + sys/contrib/device-tree/Bindings/ata/ahci-ceva.txt | 59 + .../device-tree/Bindings/ata/ahci-da850.txt | 18 + .../device-tree/Bindings/ata/ahci-dm816.txt | 21 + .../device-tree/Bindings/ata/ahci-fsl-qoriq.txt | 21 + sys/contrib/device-tree/Bindings/ata/ahci-mtk.txt | 51 + .../device-tree/Bindings/ata/ahci-platform.txt | 79 + sys/contrib/device-tree/Bindings/ata/ahci-st.txt | 35 + .../Bindings/ata/allwinner,sun4i-a10-ahci.yaml | 47 + .../Bindings/ata/allwinner,sun8i-r40-ahci.yaml | 67 + sys/contrib/device-tree/Bindings/ata/apm-xgene.txt | 77 + .../device-tree/Bindings/ata/atmel-at91_cf.txt | 19 + .../device-tree/Bindings/ata/brcm,sata-brcm.txt | 45 + .../Bindings/ata/cavium-compact-flash.txt | 30 + .../Bindings/ata/cortina,gemini-sata-bridge.txt | 55 + .../device-tree/Bindings/ata/exynos-sata.txt | 30 + .../device-tree/Bindings/ata/faraday,ftide010.yaml | 89 + sys/contrib/device-tree/Bindings/ata/fsl-sata.txt | 28 + sys/contrib/device-tree/Bindings/ata/imx-pata.txt | 16 + sys/contrib/device-tree/Bindings/ata/imx-sata.txt | 37 + sys/contrib/device-tree/Bindings/ata/marvell.txt | 22 + .../Bindings/ata/nvidia,tegra124-ahci.txt | 44 + .../device-tree/Bindings/ata/pata-arasan.txt | 37 + .../device-tree/Bindings/ata/pata-common.yaml | 50 + sys/contrib/device-tree/Bindings/ata/qcom-sata.txt | 48 + .../Bindings/ata/renesas,rcar-sata.yaml | 72 + .../device-tree/Bindings/ata/sata-common.yaml | 50 + .../device-tree/Bindings/ata/sata_highbank.yaml | 92 + .../Bindings/auxdisplay/arm-charlcd.txt | 18 + .../Bindings/auxdisplay/hit,hd44780.yaml | 96 + .../Bindings/auxdisplay/img-ascii-lcd.txt | 17 + .../device-tree/Bindings/board/fsl-board.txt | 81 + .../Bindings/bus/allwinner,sun50i-a64-de2.yaml | 84 + .../Bindings/bus/allwinner,sun8i-a23-rsb.yaml | 79 + .../Bindings/bus/arm,integrator-ap-lm.yaml | 83 + .../device-tree/Bindings/bus/baikal,bt1-apb.yaml | 90 + .../device-tree/Bindings/bus/baikal,bt1-axi.yaml | 107 + .../device-tree/Bindings/bus/brcm,bus-axi.txt | 53 + .../device-tree/Bindings/bus/brcm,gisb-arb.txt | 33 + sys/contrib/device-tree/Bindings/bus/imx-weim.txt | 112 + sys/contrib/device-tree/Bindings/bus/moxtet.txt | 46 + .../device-tree/Bindings/bus/mti,mips-cdmm.yaml | 35 + .../device-tree/Bindings/bus/mvebu-mbus.txt | 276 + .../Bindings/bus/nvidia,tegra20-gmi.txt | 128 + .../Bindings/bus/nvidia,tegra210-aconnect.txt | 44 + .../device-tree/Bindings/bus/omap-ocp2scp.txt | 29 + sys/contrib/device-tree/Bindings/bus/qcom,ebi2.txt | 138 + .../device-tree/Bindings/bus/renesas,bsc.yaml | 60 + .../device-tree/Bindings/bus/simple-pm-bus.yaml | 75 + .../bus/socionext,uniphier-system-bus.yaml | 96 + .../device-tree/Bindings/bus/ti,da850-mstpri.txt | 20 + sys/contrib/device-tree/Bindings/bus/ti-sysc.txt | 139 + sys/contrib/device-tree/Bindings/bus/ts-nbus.txt | 50 + sys/contrib/device-tree/Bindings/c6x/clocks.txt | 40 + sys/contrib/device-tree/Bindings/c6x/dscr.txt | 127 + sys/contrib/device-tree/Bindings/c6x/emifa.txt | 62 + sys/contrib/device-tree/Bindings/c6x/soc.txt | 28 + sys/contrib/device-tree/Bindings/chosen.txt | 137 + .../Bindings/chrome/google,cros-ec-typec.yaml | 54 + .../device-tree/Bindings/clock/actions,owl-cmu.txt | 52 + .../clock/allwinner,sun4i-a10-ahb-clk.yaml | 108 + .../clock/allwinner,sun4i-a10-apb0-clk.yaml | 50 + .../clock/allwinner,sun4i-a10-apb1-clk.yaml | 52 + .../clock/allwinner,sun4i-a10-axi-clk.yaml | 61 + .../Bindings/clock/allwinner,sun4i-a10-ccu.yaml | 142 + .../clock/allwinner,sun4i-a10-cpu-clk.yaml | 52 + .../clock/allwinner,sun4i-a10-display-clk.yaml | 57 + .../clock/allwinner,sun4i-a10-gates-clk.yaml | 152 + .../clock/allwinner,sun4i-a10-mbus-clk.yaml | 63 + .../clock/allwinner,sun4i-a10-mmc-clk.yaml | 87 + .../clock/allwinner,sun4i-a10-mod0-clk.yaml | 80 + .../clock/allwinner,sun4i-a10-mod1-clk.yaml | 57 + .../clock/allwinner,sun4i-a10-osc-clk.yaml | 51 + .../clock/allwinner,sun4i-a10-pll1-clk.yaml | 71 + .../clock/allwinner,sun4i-a10-pll3-clk.yaml | 50 + .../clock/allwinner,sun4i-a10-pll5-clk.yaml | 53 + .../clock/allwinner,sun4i-a10-pll6-clk.yaml | 53 + .../clock/allwinner,sun4i-a10-tcon-ch0-clk.yaml | 77 + .../clock/allwinner,sun4i-a10-usb-clk.yaml | 166 + .../Bindings/clock/allwinner,sun4i-a10-ve-clk.yaml | 55 + .../clock/allwinner,sun5i-a13-ahb-clk.yaml | 52 + .../clock/allwinner,sun6i-a31-pll6-clk.yaml | 53 + .../clock/allwinner,sun7i-a20-gmac-clk.yaml | 51 + .../clock/allwinner,sun7i-a20-out-clk.yaml | 52 + .../clock/allwinner,sun8i-a83t-de2-clk.yaml | 76 + .../clock/allwinner,sun8i-h3-bus-gates-clk.yaml | 103 + .../clock/allwinner,sun9i-a80-ahb-clk.yaml | 52 + .../clock/allwinner,sun9i-a80-apb0-clk.yaml | 63 + .../clock/allwinner,sun9i-a80-cpus-clk.yaml | 52 + .../clock/allwinner,sun9i-a80-de-clks.yaml | 67 + .../Bindings/clock/allwinner,sun9i-a80-gt-clk.yaml | 52 + .../clock/allwinner,sun9i-a80-mmc-config-clk.yaml | 68 + .../clock/allwinner,sun9i-a80-pll4-clk.yaml | 50 + .../clock/allwinner,sun9i-a80-usb-clocks.yaml | 59 + .../clock/allwinner,sun9i-a80-usb-mod-clk.yaml | 60 + .../clock/allwinner,sun9i-a80-usb-phy-clk.yaml | 60 + .../device-tree/Bindings/clock/alphascale,acc.txt | 114 + .../device-tree/Bindings/clock/altr_socfpga.txt | 30 + .../Bindings/clock/amlogic,axg-audio-clkc.txt | 59 + .../Bindings/clock/amlogic,gxbb-aoclkc.txt | 64 + .../Bindings/clock/amlogic,gxbb-clkc.txt | 53 + .../Bindings/clock/amlogic,meson8-ddr-clkc.yaml | 50 + .../Bindings/clock/amlogic,meson8b-clkc.txt | 51 + .../Bindings/clock/arm,syscon-icst.yaml | 103 + .../Bindings/clock/armada3700-periph-clock.txt | 71 + .../Bindings/clock/armada3700-tbg-clock.txt | 27 + .../Bindings/clock/armada3700-xtal-clock.txt | 29 + sys/contrib/device-tree/Bindings/clock/artpec6.txt | 41 + .../device-tree/Bindings/clock/at91-clock.txt | 58 + .../device-tree/Bindings/clock/axi-clkgen.txt | 25 + .../Bindings/clock/axs10x-i2s-pll-clock.txt | 25 + .../Bindings/clock/baikal,bt1-ccu-div.yaml | 188 + .../Bindings/clock/baikal,bt1-ccu-pll.yaml | 131 + .../Bindings/clock/bitmain,bm1880-clk.yaml | 76 + .../Bindings/clock/brcm,bcm2711-dvp.yaml | 47 + .../Bindings/clock/brcm,bcm2835-aux-clock.txt | 31 + .../Bindings/clock/brcm,bcm2835-cprman.txt | 60 + .../Bindings/clock/brcm,bcm53573-ilp.txt | 36 + .../Bindings/clock/brcm,bcm63xx-clocks.txt | 24 + .../Bindings/clock/brcm,iproc-clocks.txt | 313 + .../device-tree/Bindings/clock/brcm,kona-ccu.txt | 138 + .../device-tree/Bindings/clock/calxeda.yaml | 82 + .../Bindings/clock/cirrus,lochnagar.yaml | 78 + .../Bindings/clock/clk-exynos-audss.txt | 103 + .../Bindings/clock/clk-palmas-clk32kg-clocks.txt | 35 + .../Bindings/clock/clk-s5pv210-audss.txt | 53 + .../device-tree/Bindings/clock/clock-bindings.txt | 186 + .../device-tree/Bindings/clock/clps711x-clock.txt | 19 + .../device-tree/Bindings/clock/cs2000-cp.txt | 22 + .../device-tree/Bindings/clock/csr,atlas7-car.txt | 55 + .../Bindings/clock/dove-divider-clock.txt | 28 + .../device-tree/Bindings/clock/efm32-clock.txt | 11 + .../Bindings/clock/exynos3250-clock.txt | 57 + .../device-tree/Bindings/clock/exynos4-clock.txt | 86 + .../Bindings/clock/exynos5250-clock.txt | 41 + .../Bindings/clock/exynos5260-clock.txt | 190 + .../Bindings/clock/exynos5410-clock.txt | 50 + .../Bindings/clock/exynos5420-clock.txt | 42 + .../Bindings/clock/exynos5433-clock.txt | 507 ++ .../device-tree/Bindings/clock/exynos7-clock.txt | 108 + .../device-tree/Bindings/clock/fixed-clock.yaml | 44 + .../Bindings/clock/fixed-factor-clock.yaml | 55 + .../Bindings/clock/fixed-mmio-clock.txt | 24 + .../device-tree/Bindings/clock/fsl,plldig.yaml | 58 + .../device-tree/Bindings/clock/fsl,sai-clock.yaml | 55 + .../Bindings/clock/fujitsu,mb86s70-crg11.txt | 26 + .../device-tree/Bindings/clock/gpio-gate-clock.txt | 21 + .../device-tree/Bindings/clock/gpio-mux-clock.txt | 19 + .../device-tree/Bindings/clock/hi3620-clock.txt | 20 + .../device-tree/Bindings/clock/hi3660-clock.txt | 47 + .../device-tree/Bindings/clock/hi3670-clock.txt | 43 + .../device-tree/Bindings/clock/hi6220-clock.txt | 52 + .../device-tree/Bindings/clock/hisi-crg.txt | 50 + .../device-tree/Bindings/clock/hix5hd2-clock.txt | 30 + .../device-tree/Bindings/clock/idt,versaclock5.txt | 92 + .../Bindings/clock/idt,versaclock5.yaml | 154 + .../Bindings/clock/img,boston-clock.txt | 31 + .../device-tree/Bindings/clock/imx1-clock.yaml | 51 + .../device-tree/Bindings/clock/imx21-clock.yaml | 51 + .../device-tree/Bindings/clock/imx23-clock.yaml | 92 + .../device-tree/Bindings/clock/imx25-clock.yaml | 186 + .../device-tree/Bindings/clock/imx27-clock.yaml | 55 + .../device-tree/Bindings/clock/imx28-clock.yaml | 115 + .../device-tree/Bindings/clock/imx31-clock.yaml | 120 + .../device-tree/Bindings/clock/imx35-clock.yaml | 139 + .../device-tree/Bindings/clock/imx5-clock.yaml | 65 + .../device-tree/Bindings/clock/imx6q-clock.yaml | 71 + .../device-tree/Bindings/clock/imx6sl-clock.yaml | 47 + .../device-tree/Bindings/clock/imx6sll-clock.yaml | 65 + .../device-tree/Bindings/clock/imx6sx-clock.yaml | 69 + .../device-tree/Bindings/clock/imx6ul-clock.yaml | 65 + .../device-tree/Bindings/clock/imx7d-clock.yaml | 65 + .../device-tree/Bindings/clock/imx7ulp-clock.txt | 103 + .../Bindings/clock/imx7ulp-pcc-clock.yaml | 121 + .../Bindings/clock/imx7ulp-scg-clock.yaml | 99 + .../device-tree/Bindings/clock/imx8mm-clock.yaml | 68 + .../device-tree/Bindings/clock/imx8mn-clock.yaml | 70 + .../device-tree/Bindings/clock/imx8mp-clock.yaml | 70 + .../device-tree/Bindings/clock/imx8mq-clock.yaml | 72 + .../device-tree/Bindings/clock/imx8qxp-lpcg.yaml | 73 + .../device-tree/Bindings/clock/ingenic,cgu.yaml | 124 + .../device-tree/Bindings/clock/intc_stratix10.txt | 20 + .../device-tree/Bindings/clock/intel,agilex.yaml | 46 + .../device-tree/Bindings/clock/intel,cgu-lgm.yaml | 44 + .../device-tree/Bindings/clock/keystone-gate.txt | 29 + .../device-tree/Bindings/clock/keystone-pll.txt | 84 + .../device-tree/Bindings/clock/lpc1850-ccu.txt | 77 + .../device-tree/Bindings/clock/lpc1850-cgu.txt | 131 + .../Bindings/clock/lpc1850-creg-clk.txt | 52 + .../Bindings/clock/lsi,axm5516-clks.txt | 29 + .../device-tree/Bindings/clock/marvell,berlin.txt | 31 + .../Bindings/clock/marvell,mmp2-audio-clock.yaml | 75 + .../Bindings/clock/marvell,mmp2-clock.yaml | 69 + .../device-tree/Bindings/clock/marvell,pxa168.txt | 21 + .../device-tree/Bindings/clock/marvell,pxa1928.txt | 21 + .../device-tree/Bindings/clock/marvell,pxa910.txt | 21 + .../device-tree/Bindings/clock/maxim,max77686.txt | 114 + .../device-tree/Bindings/clock/maxim,max9485.txt | 59 + .../device-tree/Bindings/clock/microchip,pic32.txt | 39 + .../Bindings/clock/microchip,sparx5-dpll.yaml | 52 + .../device-tree/Bindings/clock/milbeaut-clock.yaml | 75 + .../Bindings/clock/moxa,moxart-clock.txt | 48 + .../Bindings/clock/mvebu-core-clock.txt | 87 + .../Bindings/clock/mvebu-corediv-clock.txt | 23 + .../device-tree/Bindings/clock/mvebu-cpu-clock.txt | 23 + .../Bindings/clock/mvebu-gated-clock.txt | 205 + .../device-tree/Bindings/clock/nspire-clock.txt | 24 + .../Bindings/clock/nuvoton,npcm750-clk.txt | 100 + .../Bindings/clock/nvidia,tegra114-car.txt | 63 + .../Bindings/clock/nvidia,tegra124-car.txt | 107 + .../Bindings/clock/nvidia,tegra124-dfll.txt | 155 + .../Bindings/clock/nvidia,tegra20-car.txt | 63 + .../Bindings/clock/nvidia,tegra210-car.txt | 56 + .../Bindings/clock/nvidia,tegra30-car.txt | 63 + .../device-tree/Bindings/clock/nxp,lpc3220-clk.txt | 30 + .../Bindings/clock/nxp,lpc3220-usb-clk.txt | 22 + .../device-tree/Bindings/clock/oxnas,stdclk.txt | 28 + .../device-tree/Bindings/clock/pistachio-clock.txt | 123 + .../device-tree/Bindings/clock/prima2-clock.txt | 73 + .../device-tree/Bindings/clock/pwm-clock.txt | 26 + .../device-tree/Bindings/clock/pxa-clock.txt | 15 + .../device-tree/Bindings/clock/qca,ath79-pll.txt | 33 + .../device-tree/Bindings/clock/qcom,a53pll.yaml | 59 + .../device-tree/Bindings/clock/qcom,camcc.txt | 18 + .../Bindings/clock/qcom,gcc-apq8064.yaml | 85 + .../Bindings/clock/qcom,gcc-ipq8074.yaml | 53 + .../Bindings/clock/qcom,gcc-msm8996.yaml | 70 + .../Bindings/clock/qcom,gcc-msm8998.yaml | 95 + .../Bindings/clock/qcom,gcc-qcs404.yaml | 53 + .../Bindings/clock/qcom,gcc-sc7180.yaml | 77 + .../Bindings/clock/qcom,gcc-sm8150.yaml | 74 + .../Bindings/clock/qcom,gcc-sm8250.yaml | 72 + .../device-tree/Bindings/clock/qcom,gcc.yaml | 92 + .../device-tree/Bindings/clock/qcom,gpucc.yaml | 82 + .../device-tree/Bindings/clock/qcom,hfpll.txt | 60 + .../device-tree/Bindings/clock/qcom,krait-cc.txt | 34 + .../device-tree/Bindings/clock/qcom,lcc.txt | 22 + .../device-tree/Bindings/clock/qcom,lpasscc.txt | 26 + .../device-tree/Bindings/clock/qcom,mmcc.yaml | 104 + .../Bindings/clock/qcom,msm8996-apcc.yaml | 54 + .../Bindings/clock/qcom,msm8998-gpucc.yaml | 68 + .../device-tree/Bindings/clock/qcom,q6sstopcc.yaml | 43 + .../device-tree/Bindings/clock/qcom,rpmcc.txt | 57 + .../device-tree/Bindings/clock/qcom,rpmhcc.yaml | 52 + .../Bindings/clock/qcom,sc7180-dispcc.yaml | 86 + .../Bindings/clock/qcom,sc7180-gpucc.yaml | 74 + .../Bindings/clock/qcom,sc7180-lpasscorecc.yaml | 108 + .../Bindings/clock/qcom,sc7180-mss.yaml | 62 + .../Bindings/clock/qcom,sc7180-videocc.yaml | 65 + .../Bindings/clock/qcom,sdm845-dispcc.yaml | 101 + .../Bindings/clock/qcom,sdm845-gpucc.yaml | 74 + .../Bindings/clock/qcom,sdm845-videocc.yaml | 65 + .../Bindings/clock/qcom,spmi-clkdiv.txt | 59 + .../device-tree/Bindings/clock/qcom,turingcc.txt | 19 + .../device-tree/Bindings/clock/qoriq-clock.txt | 211 + .../Bindings/clock/renesas,cpg-clocks.yaml | 241 + .../Bindings/clock/renesas,cpg-div6-clock.yaml | 60 + .../Bindings/clock/renesas,cpg-mssr.yaml | 121 + .../Bindings/clock/renesas,cpg-mstp-clocks.yaml | 82 + .../Bindings/clock/renesas,emev2-smu.txt | 98 + .../Bindings/clock/renesas,h8300-div-clock.txt | 24 + .../Bindings/clock/renesas,h8s2678-pll-clock.txt | 23 + .../Bindings/clock/renesas,r8a73a4-cpg-clocks.txt | 33 + .../Bindings/clock/renesas,r8a7740-cpg-clocks.txt | 41 + .../Bindings/clock/renesas,r8a7778-cpg-clocks.txt | 47 + .../Bindings/clock/renesas,r8a7779-cpg-clocks.txt | 49 + .../Bindings/clock/renesas,r9a06g032-sysctrl.txt | 46 + .../Bindings/clock/renesas,rcar-usb2-clock-sel.txt | 68 + .../Bindings/clock/renesas,rz-cpg-clocks.txt | 53 + .../Bindings/clock/renesas,sh73a0-cpg-clocks.txt | 35 + .../Bindings/clock/rockchip,px30-cru.txt | 70 + .../Bindings/clock/rockchip,rk3036-cru.txt | 56 + .../Bindings/clock/rockchip,rk3128-cru.txt | 58 + .../Bindings/clock/rockchip,rk3188-cru.txt | 61 + .../Bindings/clock/rockchip,rk3228-cru.txt | 58 + .../Bindings/clock/rockchip,rk3288-cru.txt | 67 + .../Bindings/clock/rockchip,rk3308-cru.txt | 60 + .../Bindings/clock/rockchip,rk3328-cru.txt | 58 + .../Bindings/clock/rockchip,rk3368-cru.txt | 61 + .../Bindings/clock/rockchip,rk3399-cru.txt | 68 + .../Bindings/clock/rockchip,rv1108-cru.txt | 59 + .../device-tree/Bindings/clock/samsung,s2mps11.txt | 49 + .../Bindings/clock/samsung,s3c2410-clock.txt | 49 + .../Bindings/clock/samsung,s3c2412-clock.txt | 49 + .../Bindings/clock/samsung,s3c2443-clock.txt | 55 + .../Bindings/clock/samsung,s3c64xx-clock.txt | 76 + .../Bindings/clock/samsung,s5pv210-clock.txt | 77 + .../Bindings/clock/sifive/fu540-prci.txt | 46 + .../device-tree/Bindings/clock/silabs,si514.txt | 24 + .../device-tree/Bindings/clock/silabs,si5341.txt | 171 + .../device-tree/Bindings/clock/silabs,si5351.txt | 126 + .../device-tree/Bindings/clock/silabs,si544.txt | 25 + .../device-tree/Bindings/clock/silabs,si570.txt | 39 + .../Bindings/clock/snps,hsdk-pll-clock.txt | 28 + .../device-tree/Bindings/clock/snps,pll-clock.txt | 28 + .../Bindings/clock/socionext,uniphier-clock.yaml | 94 + .../device-tree/Bindings/clock/sprd,sc9860-clk.txt | 63 + .../Bindings/clock/sprd,sc9863a-clk.yaml | 101 + .../device-tree/Bindings/clock/st,nomadik.txt | 104 + .../device-tree/Bindings/clock/st,stm32-rcc.txt | 138 + .../device-tree/Bindings/clock/st,stm32h7-rcc.txt | 71 + .../Bindings/clock/st,stm32mp1-rcc.yaml | 79 + .../Bindings/clock/st/st,clkgen-mux.txt | 32 + .../Bindings/clock/st/st,clkgen-pll.txt | 37 + .../device-tree/Bindings/clock/st/st,clkgen.txt | 68 + .../device-tree/Bindings/clock/st/st,flexgen.txt | 123 + .../device-tree/Bindings/clock/st/st,quadfs.txt | 45 + .../Bindings/clock/ste-u300-syscon-clock.txt | 80 + .../Bindings/clock/stericsson,abx500.txt | 20 + .../device-tree/Bindings/clock/tango4-clock.txt | 23 + .../Bindings/clock/ti,am654-ehrpwm-tbclk.yaml | 35 + .../device-tree/Bindings/clock/ti,cdce706.txt | 42 + .../device-tree/Bindings/clock/ti,cdce925.txt | 53 + .../device-tree/Bindings/clock/ti,sci-clk.txt | 36 + .../device-tree/Bindings/clock/ti-clkctrl.txt | 61 + .../Bindings/clock/ti-keystone-pllctrl.txt | 20 + .../device-tree/Bindings/clock/ti/adpll.txt | 41 + sys/contrib/device-tree/Bindings/clock/ti/apll.txt | 45 + .../device-tree/Bindings/clock/ti/autoidle.txt | 39 + .../device-tree/Bindings/clock/ti/clockdomain.txt | 24 + .../device-tree/Bindings/clock/ti/composite.txt | 54 + .../Bindings/clock/ti/davinci/da8xx-cfgchip.txt | 93 + .../device-tree/Bindings/clock/ti/davinci/pll.txt | 96 + .../device-tree/Bindings/clock/ti/davinci/psc.txt | 71 + .../device-tree/Bindings/clock/ti/divider.txt | 117 + sys/contrib/device-tree/Bindings/clock/ti/dpll.txt | 85 + .../device-tree/Bindings/clock/ti/dra7-atl.txt | 94 + .../device-tree/Bindings/clock/ti/fapll.txt | 33 + .../Bindings/clock/ti/fixed-factor-clock.txt | 43 + sys/contrib/device-tree/Bindings/clock/ti/gate.txt | 106 + .../device-tree/Bindings/clock/ti/interface.txt | 56 + sys/contrib/device-tree/Bindings/clock/ti/mux.txt | 79 + sys/contrib/device-tree/Bindings/clock/ux500.txt | 64 + .../device-tree/Bindings/clock/vf610-clock.txt | 41 + sys/contrib/device-tree/Bindings/clock/vt8500.txt | 74 + sys/contrib/device-tree/Bindings/clock/xgene.txt | 131 + .../Bindings/clock/xlnx,versal-clk.yaml | 64 + .../device-tree/Bindings/clock/xlnx,zynqmp-clk.txt | 63 + .../device-tree/Bindings/clock/zx296702-clk.txt | 34 + .../device-tree/Bindings/clock/zx296718-clk.txt | 37 + .../device-tree/Bindings/clock/zynq-7000.txt | 110 + .../device-tree/Bindings/common-properties.txt | 85 + .../connector/samsung,usb-connector-11pin.txt | 49 + .../Bindings/connector/usb-connector.yaml | 235 + .../device-tree/Bindings/counter/ftm-quaddec.txt | 18 + .../device-tree/Bindings/counter/ti-eqep.yaml | 50 + .../device-tree/Bindings/cpu/cpu-topology.txt | 553 ++ .../Bindings/cpufreq/brcm,stb-avs-cpu-freq.txt | 76 + .../device-tree/Bindings/cpufreq/cpufreq-dt.txt | 61 + .../Bindings/cpufreq/cpufreq-mediatek.txt | 243 + .../Bindings/cpufreq/cpufreq-qcom-hw.txt | 172 + .../device-tree/Bindings/cpufreq/cpufreq-spear.txt | 42 + .../device-tree/Bindings/cpufreq/cpufreq-st.txt | 91 + .../Bindings/cpufreq/imx-cpufreq-dt.txt | 37 + .../Bindings/cpufreq/nvidia,tegra124-cpufreq.txt | 40 + .../Bindings/cpufreq/nvidia,tegra20-cpufreq.txt | 56 + .../device-tree/Bindings/cpufreq/ti-cpufreq.txt | 132 + .../crypto/allwinner,sun4i-a10-crypto.yaml | 81 + .../Bindings/crypto/allwinner,sun8i-ce.yaml | 88 + .../Bindings/crypto/allwinner,sun8i-ss.yaml | 60 + .../device-tree/Bindings/crypto/amd-ccp.txt | 17 + .../Bindings/crypto/amlogic,gxl-crypto.yaml | 52 + .../device-tree/Bindings/crypto/arm-cryptocell.txt | 25 + .../device-tree/Bindings/crypto/artpec6-crypto.txt | 16 + .../device-tree/Bindings/crypto/atmel-crypto.txt | 68 + .../Bindings/crypto/brcm,spu-crypto.txt | 22 + .../device-tree/Bindings/crypto/fsl-dcp.txt | 18 + .../device-tree/Bindings/crypto/fsl-imx-sahara.txt | 15 + .../device-tree/Bindings/crypto/fsl-imx-scc.txt | 21 + .../device-tree/Bindings/crypto/fsl-sec2.txt | 65 + .../device-tree/Bindings/crypto/fsl-sec4.txt | 553 ++ .../device-tree/Bindings/crypto/fsl-sec6.txt | 157 + .../Bindings/crypto/hisilicon,hip07-sec.txt | 67 + .../device-tree/Bindings/crypto/img-hash.txt | 27 + .../Bindings/crypto/inside-secure-safexcel.txt | 40 + .../device-tree/Bindings/crypto/marvell-cesa.txt | 44 + .../Bindings/crypto/mediatek-crypto.txt | 25 + .../device-tree/Bindings/crypto/mv_cesa.txt | 32 + .../device-tree/Bindings/crypto/omap-aes.txt | 31 + .../device-tree/Bindings/crypto/omap-des.txt | 30 + .../device-tree/Bindings/crypto/omap-sham.txt | 28 + .../device-tree/Bindings/crypto/picochip-spacc.txt | 21 + .../device-tree/Bindings/crypto/qcom,prng.txt | 19 + .../device-tree/Bindings/crypto/qcom-qce.txt | 25 + .../Bindings/crypto/rockchip-crypto.txt | 28 + .../Bindings/crypto/samsung-slimsss.yaml | 47 + .../device-tree/Bindings/crypto/samsung-sss.yaml | 58 + .../device-tree/Bindings/crypto/st,stm32-crc.yaml | 38 + .../device-tree/Bindings/crypto/st,stm32-cryp.yaml | 51 + .../device-tree/Bindings/crypto/st,stm32-hash.yaml | 68 + .../device-tree/Bindings/crypto/ti,sa2ul.yaml | 76 + .../Bindings/crypto/xlnx,zynqmp-aes.yaml | 37 + sys/contrib/device-tree/Bindings/csky/cpus.txt | 73 + sys/contrib/device-tree/Bindings/csky/pmu.txt | 38 + .../device-tree/Bindings/ddr/lpddr2-timings.txt | 52 + sys/contrib/device-tree/Bindings/ddr/lpddr2.txt | 102 + .../device-tree/Bindings/ddr/lpddr3-timings.txt | 58 + sys/contrib/device-tree/Bindings/ddr/lpddr3.txt | 101 + .../Bindings/devfreq/event/exynos-nocp.txt | 26 + .../Bindings/devfreq/event/exynos-ppmu.txt | 169 + .../Bindings/devfreq/event/rockchip-dfi.txt | 18 + .../device-tree/Bindings/devfreq/exynos-bus.txt | 421 ++ .../device-tree/Bindings/devfreq/rk3399_dmc.txt | 215 + .../allwinner,sun4i-a10-display-backend.yaml | 291 + .../allwinner,sun4i-a10-display-engine.yaml | 113 + .../allwinner,sun4i-a10-display-frontend.yaml | 138 + .../Bindings/display/allwinner,sun4i-a10-hdmi.yaml | 183 + .../Bindings/display/allwinner,sun4i-a10-tcon.yaml | 685 ++ .../display/allwinner,sun4i-a10-tv-encoder.yaml | 58 + .../Bindings/display/allwinner,sun6i-a31-drc.yaml | 138 + .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 134 + .../display/allwinner,sun8i-a83t-de2-mixer.yaml | 121 + .../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 273 + .../display/allwinner,sun8i-a83t-hdmi-phy.yaml | 117 + .../display/allwinner,sun8i-r40-tcon-top.yaml | 382 ++ .../Bindings/display/allwinner,sun9i-a80-deu.yaml | 133 + .../Bindings/display/amlogic,meson-dw-hdmi.yaml | 148 + .../Bindings/display/amlogic,meson-vpu.yaml | 139 + .../device-tree/Bindings/display/arm,hdlcd.txt | 79 + .../device-tree/Bindings/display/arm,komeda.txt | 78 + .../device-tree/Bindings/display/arm,malidp.txt | 68 + .../device-tree/Bindings/display/arm,pl11x.txt | 110 + .../Bindings/display/armada/marvell,dove-lcd.txt | 30 + .../device-tree/Bindings/display/atmel,lcdc.txt | 88 + .../Bindings/display/atmel/hlcdc-dc.txt | 75 + .../device-tree/Bindings/display/brcm,bcm-vc4.txt | 174 + .../Bindings/display/brcm,bcm2835-dpi.yaml | 62 + .../Bindings/display/brcm,bcm2835-dsi0.yaml | 84 + .../Bindings/display/brcm,bcm2835-hdmi.yaml | 79 + .../Bindings/display/brcm,bcm2835-hvs.yaml | 37 + .../Bindings/display/brcm,bcm2835-pixelvalve0.yaml | 40 + .../Bindings/display/brcm,bcm2835-txp.yaml | 37 + .../Bindings/display/brcm,bcm2835-v3d.yaml | 42 + .../Bindings/display/brcm,bcm2835-vc4.yaml | 34 + .../Bindings/display/brcm,bcm2835-vec.yaml | 44 + .../Bindings/display/bridge/adi,adv7511.txt | 143 + .../Bindings/display/bridge/analogix,anx7814.yaml | 119 + .../Bindings/display/bridge/analogix_dp.txt | 51 + .../Bindings/display/bridge/anx6345.yaml | 104 + .../Bindings/display/bridge/cdns,dsi.txt | 112 + .../Bindings/display/bridge/chrontel,ch7033.yaml | 77 + .../Bindings/display/bridge/dw_hdmi.txt | 33 + .../Bindings/display/bridge/ite,it6505.yaml | 91 + .../Bindings/display/bridge/lvds-codec.yaml | 139 + .../bridge/megachips-stdpxxxx-ge-b850v3-fw.txt | 91 + .../Bindings/display/bridge/nwl-dsi.yaml | 226 + .../device-tree/Bindings/display/bridge/ps8622.txt | 31 + .../Bindings/display/bridge/ps8640.yaml | 120 + .../Bindings/display/bridge/ptn3460.txt | 39 + .../Bindings/display/bridge/renesas,dw-hdmi.txt | 86 + .../Bindings/display/bridge/renesas,lvds.txt | 85 + .../Bindings/display/bridge/renesas,lvds.yaml | 248 + .../Bindings/display/bridge/sii902x.txt | 74 + .../Bindings/display/bridge/sii9234.txt | 49 + .../Bindings/display/bridge/sil-sii8620.txt | 33 + .../Bindings/display/bridge/simple-bridge.yaml | 99 + .../Bindings/display/bridge/snps,dw-mipi-dsi.yaml | 68 + .../Bindings/display/bridge/tda998x.txt | 54 + .../display/bridge/thine,thc63lvd1024.yaml | 121 + .../Bindings/display/bridge/ti,sn65dsi86.txt | 87 + .../Bindings/display/bridge/ti,sn65dsi86.yaml | 293 + .../Bindings/display/bridge/ti,tfp410.txt | 66 + .../Bindings/display/bridge/ti,tfp410.yaml | 131 + .../Bindings/display/bridge/toshiba,tc358764.txt | 35 + .../Bindings/display/bridge/toshiba,tc358767.txt | 54 + .../Bindings/display/bridge/toshiba,tc358768.yaml | 159 + .../Bindings/display/cirrus,clps711x-fb.txt | 47 + .../display/connector/analog-tv-connector.txt | 31 + .../display/connector/analog-tv-connector.yaml | 52 + .../Bindings/display/connector/dvi-connector.txt | 36 + .../Bindings/display/connector/dvi-connector.yaml | 70 + .../Bindings/display/connector/hdmi-connector.txt | 31 + .../Bindings/display/connector/hdmi-connector.yaml | 64 + .../Bindings/display/connector/vga-connector.txt | 36 + .../Bindings/display/connector/vga-connector.yaml | 46 + .../Bindings/display/dsi-controller.yaml | 91 + .../Bindings/display/exynos/exynos-mic.txt | 51 + .../Bindings/display/exynos/exynos5433-decon.txt | 60 + .../Bindings/display/exynos/exynos7-decon.txt | 65 + .../Bindings/display/exynos/exynos_dp.txt | 112 + .../Bindings/display/exynos/exynos_dsim.txt | 90 + .../Bindings/display/exynos/exynos_hdmi.txt | 64 + .../Bindings/display/exynos/exynos_hdmiddc.txt | 15 + .../Bindings/display/exynos/exynos_hdmiphy.txt | 15 + .../Bindings/display/exynos/exynos_mixer.txt | 26 + .../Bindings/display/exynos/samsung-fimd.txt | 107 + .../Bindings/display/faraday,tve200.txt | 54 + .../device-tree/Bindings/display/fsl,dcu.txt | 34 + .../device-tree/Bindings/display/fsl,tcon.txt | 17 + .../Bindings/display/google,goldfish-fb.txt | 17 + .../device-tree/Bindings/display/himax,hx8357d.txt | 26 + .../Bindings/display/hisilicon/dw-dsi.txt | 72 + .../Bindings/display/hisilicon/hisi-ade.txt | 64 + .../device-tree/Bindings/display/ht16k33.txt | 40 + .../Bindings/display/ilitek,ili9225.txt | 25 + .../Bindings/display/ilitek,ili9341.txt | 27 + .../Bindings/display/ilitek,ili9486.yaml | 73 + .../Bindings/display/imx/fsl,imx-fb.txt | 57 + .../Bindings/display/imx/fsl-imx-drm.txt | 162 + .../device-tree/Bindings/display/imx/hdmi.txt | 65 + .../device-tree/Bindings/display/imx/ldb.txt | 147 + .../device-tree/Bindings/display/ingenic,ipu.yaml | 65 + .../device-tree/Bindings/display/ingenic,lcd.txt | 45 + .../device-tree/Bindings/display/ingenic,lcd.yaml | 126 + .../Bindings/display/marvell,pxa2xx-lcdc.txt | 36 + .../Bindings/display/marvell,pxa300-gcu.txt | 17 + .../Bindings/display/mediatek/mediatek,disp.txt | 209 + .../Bindings/display/mediatek/mediatek,dpi.txt | 42 + .../Bindings/display/mediatek/mediatek,dsi.txt | 72 + .../Bindings/display/mediatek/mediatek,hdmi.txt | 148 + .../device-tree/Bindings/display/mipi-dsi-bus.txt | 235 + .../device-tree/Bindings/display/msm/dpu.txt | 141 + .../device-tree/Bindings/display/msm/dsi.txt | 247 + .../device-tree/Bindings/display/msm/edp.txt | 56 + .../device-tree/Bindings/display/msm/gmu.yaml | 123 + .../device-tree/Bindings/display/msm/gpu.txt | 150 + .../device-tree/Bindings/display/msm/hdmi.txt | 99 + .../device-tree/Bindings/display/msm/mdp4.txt | 114 + .../device-tree/Bindings/display/msm/mdp5.txt | 160 + .../Bindings/display/multi-inno,mi0283qt.txt | 27 + sys/contrib/device-tree/Bindings/display/mxsfb.txt | 87 + .../display/panel/advantech,idk-1110wr.yaml | 69 + .../display/panel/advantech,idk-2121wr.yaml | 122 + .../display/panel/arm,versatile-tft-panel.yaml | 54 + .../display/panel/armadeus,st0700-adapt.yaml | 33 + .../display/panel/asus,z00t-tm5p5-nt35596.yaml | 56 + .../display/panel/bananapi,s070wv20-ct16.yaml | 31 + .../Bindings/display/panel/boe,himax8279d.yaml | 59 + .../Bindings/display/panel/boe,tv101wum-nl6.yaml | 82 + .../Bindings/display/panel/display-timing.txt | 1 + .../Bindings/display/panel/display-timings.yaml | 77 + .../Bindings/display/panel/dlc,dlc0700yzg-1.yaml | 31 + .../Bindings/display/panel/elida,kd35t133.yaml | 49 + .../display/panel/feixin,k101-im2ba02.yaml | 55 + .../display/panel/feiyang,fy07024di26a30d.yaml | 58 + .../Bindings/display/panel/ilitek,ili9322.yaml | 70 + .../Bindings/display/panel/ilitek,ili9881c.yaml | 49 + .../display/panel/innolux,ee101ia-01d.yaml | 31 + .../Bindings/display/panel/innolux,p079zca.txt | 22 + .../Bindings/display/panel/innolux,p097pfg.yaml | 56 + .../display/panel/innolux,p120zdg-bf1.yaml | 43 + .../Bindings/display/panel/jdi,lt070me05000.yaml | 69 + .../display/panel/kingdisplay,kd035g6-54nt.yaml | 65 + .../display/panel/leadtek,ltk050h3146w.yaml | 51 + .../display/panel/leadtek,ltk500hd1829.yaml | 50 + .../Bindings/display/panel/lg,lg4573.yaml | 45 + .../Bindings/display/panel/lgphilips,lb035q02.yaml | 59 + .../Bindings/display/panel/logicpd,type28.yaml | 42 + .../device-tree/Bindings/display/panel/lvds.yaml | 115 + .../display/panel/mitsubishi,aa104xd12.yaml | 75 + .../display/panel/mitsubishi,aa121td01.yaml | 74 + .../Bindings/display/panel/nec,nl8048hl11.yaml | 62 + .../Bindings/display/panel/novatek,nt35510.yaml | 56 + .../display/panel/olimex,lcd-olinuxino.yaml | 70 + .../Bindings/display/panel/orisetech,otm8009a.yaml | 53 + .../Bindings/display/panel/panel-common.yaml | 166 + .../Bindings/display/panel/panel-dpi.yaml | 71 + .../Bindings/display/panel/panel-dsi-cm.txt | 29 + .../Bindings/display/panel/panel-dsi-cm.yaml | 86 + .../Bindings/display/panel/panel-simple-dsi.yaml | 83 + .../Bindings/display/panel/panel-simple.yaml | 300 + .../Bindings/display/panel/panel-timing.yaml | 215 + .../Bindings/display/panel/pda,91-00156-a0.yaml | 31 + .../panel/raspberrypi,7inch-touchscreen.yaml | 71 + .../Bindings/display/panel/raydium,rm67191.yaml | 75 + .../Bindings/display/panel/raydium,rm68200.yaml | 56 + .../display/panel/rocktech,jh057n00900.txt | 23 + .../display/panel/rocktech,jh057n00900.yaml | 71 + .../Bindings/display/panel/ronbo,rb070d30.yaml | 51 + .../display/panel/samsung,amoled-mipi-dsi.yaml | 65 + .../Bindings/display/panel/samsung,ld9040.yaml | 107 + .../Bindings/display/panel/samsung,s6d16d0.yaml | 56 + .../Bindings/display/panel/samsung,s6e63m0.yaml | 60 + .../display/panel/samsung,s6e88a0-ams452ef01.yaml | 50 + .../Bindings/display/panel/samsung,s6e8aa0.txt | 56 + .../Bindings/display/panel/samsung,s6e8aa0.yaml | 100 + .../Bindings/display/panel/seiko,43wvf1g.yaml | 50 + .../Bindings/display/panel/sgd,gktw70sdae4se.yaml | 68 + .../Bindings/display/panel/sharp,ld-d5116z01b.yaml | 30 + .../Bindings/display/panel/sharp,lq101r1sx01.txt | 49 + .../Bindings/display/panel/sharp,lq101r1sx01.yaml | 87 + .../Bindings/display/panel/sharp,lq150x1lg11.yaml | 58 + .../Bindings/display/panel/sharp,ls037v7dw01.yaml | 68 + .../Bindings/display/panel/sharp,ls043t1le01.yaml | 51 + .../Bindings/display/panel/sitronix,st7701.yaml | 69 + .../Bindings/display/panel/sitronix,st7789v.yaml | 63 + .../Bindings/display/panel/sony,acx424akp.yaml | 49 + .../Bindings/display/panel/sony,acx565akm.yaml | 57 + .../display/panel/startek,startek-kd050c.yaml | 33 + .../display/panel/tfc,s9700rtwv43tr-01b.yaml | 33 + .../Bindings/display/panel/ti,nspire.yaml | 36 + .../device-tree/Bindings/display/panel/tpo,td.yaml | 65 + .../Bindings/display/panel/tpo,tpg110.yaml | 101 + .../Bindings/display/panel/visionox,rm69299.yaml | 57 + .../Bindings/display/panel/xinpeng,xpp055c272.yaml | 50 + .../device-tree/Bindings/display/renesas,cmm.yaml | 67 + .../device-tree/Bindings/display/renesas,du.txt | 139 + .../device-tree/Bindings/display/repaper.txt | 52 + .../display/rockchip/analogix_dp-rockchip.txt | 98 + .../Bindings/display/rockchip/cdn-dp-rockchip.txt | 74 + .../Bindings/display/rockchip/dw_hdmi-rockchip.txt | 74 + .../display/rockchip/dw_mipi_dsi_rockchip.txt | 92 + .../display/rockchip/inno_hdmi-rockchip.txt | 49 + .../display/rockchip/rockchip,rk3066-hdmi.yaml | 140 + .../Bindings/display/rockchip/rockchip-drm.yaml | 40 + .../Bindings/display/rockchip/rockchip-lvds.txt | 92 + .../Bindings/display/rockchip/rockchip-vop.yaml | 134 + .../Bindings/display/simple-framebuffer.yaml | 179 + .../Bindings/display/sitronix,st7586.txt | 22 + .../Bindings/display/sitronix,st7735r.yaml | 78 + .../device-tree/Bindings/display/sm501fb.txt | 32 + .../device-tree/Bindings/display/snps,arcpgu.txt | 35 + .../device-tree/Bindings/display/ssd1289fb.txt | 13 + .../device-tree/Bindings/display/ssd1307fb.txt | 59 + .../device-tree/Bindings/display/st,stih4xx.txt | 241 + .../device-tree/Bindings/display/st,stm32-dsi.yaml | 149 + .../Bindings/display/st,stm32-ltdc.yaml | 81 + .../device-tree/Bindings/display/ste,mcde.txt | 104 + .../display/tegra/nvidia,tegra114-mipi.txt | 41 + .../display/tegra/nvidia,tegra20-host1x.txt | 466 ++ .../Bindings/display/ti/ti,am65x-dss.yaml | 151 + .../Bindings/display/ti/ti,dra7-dss.txt | 74 + .../Bindings/display/ti/ti,j721e-dss.yaml | 208 + .../Bindings/display/ti/ti,k2g-dss.yaml | 106 + .../Bindings/display/ti/ti,omap-dss.txt | 211 + .../Bindings/display/ti/ti,omap2-dss.txt | 58 + .../Bindings/display/ti/ti,omap3-dss.txt | 87 + .../Bindings/display/ti/ti,omap4-dss.txt | 119 + .../Bindings/display/ti/ti,omap5-dss.txt | 100 + .../device-tree/Bindings/display/ti/ti,opa362.txt | 38 + .../Bindings/display/ti/ti,tpd12s015.txt | 44 + .../device-tree/Bindings/display/tilcdc/panel.txt | 66 + .../device-tree/Bindings/display/tilcdc/tilcdc.txt | 82 + .../device-tree/Bindings/display/truly,nt35597.txt | 59 + .../device-tree/Bindings/display/via,vt8500-fb.txt | 36 + .../Bindings/display/wm,prizm-ge-rops.txt | 13 + .../device-tree/Bindings/display/wm,wm8505-fb.txt | 33 + .../Bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 174 + .../device-tree/Bindings/display/zte,vou.txt | 120 + .../device-tree/Bindings/dma/adi,axi-dmac.txt | 61 + .../Bindings/dma/allwinner,sun4i-a10-dma.yaml | 55 + .../Bindings/dma/allwinner,sun50i-a64-dma.yaml | 86 + .../Bindings/dma/allwinner,sun6i-a31-dma.yaml | 62 + .../device-tree/Bindings/dma/apm-xgene-dma.txt | 47 + sys/contrib/device-tree/Bindings/dma/arm-pl08x.txt | 59 + sys/contrib/device-tree/Bindings/dma/arm-pl330.txt | 49 + sys/contrib/device-tree/Bindings/dma/atmel-dma.txt | 42 + .../device-tree/Bindings/dma/atmel-xdma.txt | 52 + .../device-tree/Bindings/dma/brcm,bcm2835-dma.txt | 83 + .../device-tree/Bindings/dma/brcm,iproc-sba.txt | 29 + .../device-tree/Bindings/dma/dma-common.yaml | 51 + .../device-tree/Bindings/dma/dma-controller.yaml | 35 + .../device-tree/Bindings/dma/dma-router.yaml | 50 + sys/contrib/device-tree/Bindings/dma/dma.txt | 1 + sys/contrib/device-tree/Bindings/dma/fsl-edma.txt | 111 + .../device-tree/Bindings/dma/fsl-imx-dma.txt | 48 + .../device-tree/Bindings/dma/fsl-imx-sdma.txt | 117 + .../device-tree/Bindings/dma/fsl-mxs-dma.txt | 60 + sys/contrib/device-tree/Bindings/dma/fsl-qdma.txt | 58 + .../device-tree/Bindings/dma/img-mdc-dma.txt | 57 + .../device-tree/Bindings/dma/ingenic,dma.yaml | 80 + sys/contrib/device-tree/Bindings/dma/k3dma.txt | 47 + .../device-tree/Bindings/dma/lpc1850-dmamux.txt | 54 + .../Bindings/dma/milbeaut-m10v-hdmac.txt | 32 + .../Bindings/dma/milbeaut-m10v-xdmac.txt | 24 + sys/contrib/device-tree/Bindings/dma/mmp-dma.txt | 79 + .../device-tree/Bindings/dma/moxa,moxart-dma.txt | 45 + .../device-tree/Bindings/dma/mpc512x-dma.txt | 29 + sys/contrib/device-tree/Bindings/dma/mtk-hsdma.txt | 33 + .../device-tree/Bindings/dma/mtk-uart-apdma.txt | 55 + sys/contrib/device-tree/Bindings/dma/mv-xor-v2.txt | 28 + sys/contrib/device-tree/Bindings/dma/mv-xor.txt | 40 + .../Bindings/dma/nvidia,tegra20-apbdma.txt | 44 + .../Bindings/dma/nvidia,tegra210-adma.txt | 56 + sys/contrib/device-tree/Bindings/dma/owl-dma.txt | 47 + sys/contrib/device-tree/Bindings/dma/owl-dma.yaml | 79 + sys/contrib/device-tree/Bindings/dma/qcom_adm.txt | 61 + .../device-tree/Bindings/dma/qcom_bam_dma.txt | 50 + .../device-tree/Bindings/dma/qcom_hidma_mgmt.txt | 95 + .../device-tree/Bindings/dma/renesas,nbpfaxi.txt | 69 + .../Bindings/dma/renesas,rcar-dmac.yaml | 151 + .../device-tree/Bindings/dma/renesas,shdma.txt | 84 + .../device-tree/Bindings/dma/renesas,usb-dmac.yaml | 104 + .../Bindings/dma/sifive,fu540-c000-pdma.yaml | 57 + .../device-tree/Bindings/dma/sirfsoc-dma.txt | 44 + .../Bindings/dma/snps,dma-spear1340.yaml | 176 + .../device-tree/Bindings/dma/snps,dw-axi-dmac.txt | 39 + sys/contrib/device-tree/Bindings/dma/snps-dma.txt | 69 + .../Bindings/dma/socionext,uniphier-mio-dmac.yaml | 63 + .../Bindings/dma/socionext,uniphier-xdmac.yaml | 62 + sys/contrib/device-tree/Bindings/dma/sprd-dma.txt | 41 + .../device-tree/Bindings/dma/st,stm32-dma.yaml | 107 + .../device-tree/Bindings/dma/st,stm32-dmamux.yaml | 52 + .../device-tree/Bindings/dma/st,stm32-mdma.yaml | 105 + sys/contrib/device-tree/Bindings/dma/st_fdma.txt | 86 + .../device-tree/Bindings/dma/ste-coh901318.txt | 32 + sys/contrib/device-tree/Bindings/dma/ste-dma40.txt | 138 + .../device-tree/Bindings/dma/ti-dma-crossbar.txt | 68 + sys/contrib/device-tree/Bindings/dma/ti-edma.txt | 238 + .../device-tree/Bindings/dma/ti/k3-udma.yaml | 182 + .../device-tree/Bindings/dma/xilinx/xilinx_dma.txt | 124 + .../Bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml | 68 + .../device-tree/Bindings/dma/xilinx/zynqmp_dma.txt | 26 + sys/contrib/device-tree/Bindings/dma/zxdma.txt | 38 + sys/contrib/device-tree/Bindings/dsp/fsl,dsp.yaml | 93 + .../device-tree/Bindings/edac/apm-xgene-edac.txt | 112 + .../Bindings/edac/aspeed-sdram-edac.txt | 25 + sys/contrib/device-tree/Bindings/edac/dmc-520.yaml | 59 + .../device-tree/Bindings/edac/socfpga-eccmgr.txt | 383 ++ sys/contrib/device-tree/Bindings/eeprom/at24.txt | 1 + sys/contrib/device-tree/Bindings/eeprom/at24.yaml | 188 + sys/contrib/device-tree/Bindings/eeprom/at25.txt | 45 + .../device-tree/Bindings/example-schema.yaml | 232 + .../device-tree/Bindings/extcon/extcon-fsa9480.txt | 21 + .../device-tree/Bindings/extcon/extcon-max3355.txt | 21 + .../device-tree/Bindings/extcon/extcon-palmas.txt | 22 + .../device-tree/Bindings/extcon/extcon-ptn5150.txt | 27 + .../device-tree/Bindings/extcon/extcon-rt8973a.txt | 23 + .../device-tree/Bindings/extcon/extcon-sm5502.txt | 21 + .../Bindings/extcon/extcon-usb-gpio.txt | 21 + .../Bindings/extcon/extcon-usbc-cros-ec.yaml | 55 + .../Bindings/extcon/qcom,pm8941-misc.txt | 41 + .../device-tree/Bindings/extcon/wlf,arizona.yaml | 125 + .../device-tree/Bindings/firmware/coreboot.txt | 33 + .../Bindings/firmware/cznic,turris-mox-rwtm.txt | 19 + .../intel,ixp4xx-network-processing-engine.yaml | 45 + .../Bindings/firmware/intel,stratix10-svc.txt | 57 + .../Bindings/firmware/meson/meson_sm.txt | 15 + .../Bindings/firmware/nvidia,tegra186-bpmp.txt | 107 + .../Bindings/firmware/nvidia,tegra210-bpmp.txt | 35 + .../device-tree/Bindings/firmware/qcom,scm.txt | 47 + .../firmware/xilinx/xlnx,zynqmp-firmware.txt | 44 + .../Bindings/fpga/altera-fpga2sdram-bridge.txt | 13 + .../Bindings/fpga/altera-freeze-bridge.txt | 20 + .../Bindings/fpga/altera-hps2fpga-bridge.txt | 36 + .../Bindings/fpga/altera-passive-serial.txt | 29 + .../device-tree/Bindings/fpga/altera-pr-ip.txt | 12 + .../Bindings/fpga/altera-socfpga-a10-fpga-mgr.txt | 19 + .../Bindings/fpga/altera-socfpga-fpga-mgr.txt | 17 + .../device-tree/Bindings/fpga/fpga-bridge.txt | 13 + .../device-tree/Bindings/fpga/fpga-region.txt | 496 ++ .../Bindings/fpga/intel-stratix10-soc-fpga-mgr.txt | 18 + *** 48154 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Fri Jan 15 11:47:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6D774E2434; Fri, 15 Jan 2021 11: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 4DHKCn5Gdtz4pqp; Fri, 15 Jan 2021 11: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 A7E671BFDF; Fri, 15 Jan 2021 11:47: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 10FBl1ax005522; Fri, 15 Jan 2021 11:47:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FBl1I6005521; Fri, 15 Jan 2021 11:47:01 GMT (envelope-from git) Date: Fri, 15 Jan 2021 11:47:01 GMT Message-Id: <202101151147.10FBl1I6005521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 0974bfa3a8da - main - loader: do not update palette in text mode (real fix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0974bfa3a8da2201b0a415e72593552f5ac59379 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 11:47:01 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=0974bfa3a8da2201b0a415e72593552f5ac59379 commit 0974bfa3a8da2201b0a415e72593552f5ac59379 Author: Toomas Soome AuthorDate: 2021-01-15 12:58:12 +0000 Commit: Toomas Soome CommitDate: 2021-01-15 13:43:14 +0000 loader: do not update palette in text mode (real fix) Apparently palette update while in text mode, will cause some adapters to end up with blank display. Previous update had condition reversed. --- stand/i386/libi386/vidconsole.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c index b42a476ef85e..e17885cb7b0c 100644 --- a/stand/i386/libi386/vidconsole.c +++ b/stand/i386/libi386/vidconsole.c @@ -939,7 +939,7 @@ cons_update_mode(bool use_gfx_mode) gfx_state.tg_fb.fb_mask_green >> goff, goff, gfx_state.tg_fb.fb_mask_blue >> boff, boff); - if (gfx_state.tg_ctype == CT_INDEXED && !use_gfx_mode) + if (gfx_state.tg_ctype == CT_INDEXED && use_gfx_mode) vidc_load_palette(); teken_set_winsize(&gfx_state.tg_teken, &gfx_state.tg_tp); From owner-dev-commits-src-all@freebsd.org Fri Jan 15 13:06:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F13B44E542C; Fri, 15 Jan 2021 13:06:04 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHLz02JDsz4vWy; Fri, 15 Jan 2021 13:06:04 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x334.google.com with SMTP id m187so1031489wme.2; Fri, 15 Jan 2021 05:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=s7/uEtzPEkZuC4zP8CAtRedDxLZucxFmJAkJXJoboRs=; b=XSfe89bM9+DAxofJJJNZdeQh/0UKkIADHx7wcZ0y9+5sE9e1cHk+AmPgfYDnbCV+Hm pDbKTHp/BOn9uTKFDvn07Z8yYXZx3yV0+dbERRFqcv7Ziy9Fa+3yBhDFxNtuHFna7iw9 xv5f2rt9cBWPNycvs62+KvzOyPG0/ffGx1kgFOLSd2ZUIPcTSXWtUFHRuP4RCkraPpMT HjO4xT+FaS9GuC6GzNFyUGswTpU+BEF1pBWoCP7mrCmIQ1sV9O4k069k8HQvTxWgY5JS 1l7t4wbKAyt2DMoG+h3uOc4MDBsqymorlbSFHZHfxm1SvCyUdbcMOM2Gmsb3VttDIAOK D//w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=s7/uEtzPEkZuC4zP8CAtRedDxLZucxFmJAkJXJoboRs=; b=SQFz8fNPid0UGCRijMycvI46wVCBgb1drjQEPzA21DI8b5N7eCyywPQLjsCU1/CAdt nwUxU5audzSX9Y4jU3N+K/m7p/q1Vz/kHkwtJykXDiK2oVaD8SECUXlCdy5W9ZMzOFT0 rbasTY7DNGdaF588EnhMjdbrSPW982T74mBATQExROjhZw87Fo7wNJiJelvlZXX3gcPC hyWuOVSmROZSM4l9+WSGNpbms2Uu8JyGSf+UhX+WMZDIo+uk3ooqkIKrAf0H7pWmArgK G95KnzTCZXC46Afra6CR641L+snGxMsBKfzBtp/r5TEDQRrUKi5sp8h8u0jDAkmjKvLH lO7w== X-Gm-Message-State: AOAM533GYjbmfj1hR+kuUE+ULbw0v3AuUoPwAw+2ZJOnTRD+YhSUVJnZ 8RCCY2mH7EcGCK5opCuVxaj4c/ZBq3ZcI0byk8Otkiq4 X-Google-Smtp-Source: ABdhPJz43eaBUq4Hj9GUfnLtYlFEfT5viA7wWAzGkiDwHpXxAwSCmJ2Q/Kxl/KLLZR2olPmegKEgyH1Gb6fGFznvdFc= X-Received: by 2002:a1c:68d5:: with SMTP id d204mr8593527wmc.178.1610715962009; Fri, 15 Jan 2021 05:06:02 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Fri, 15 Jan 2021 05:06:00 -0800 (PST) In-Reply-To: <202101140558.10E5wMNW079125@gitrepo.freebsd.org> References: <202101140558.10E5wMNW079125@gitrepo.freebsd.org> From: Mateusz Guzik Date: Fri, 15 Jan 2021 14:06:00 +0100 Message-ID: Subject: Re: git: 0495ed398c4f - main - contrib/lua: update to 5.4.2 To: Kyle Evans 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: 4DHLz02JDsz4vWy X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=XSfe89bM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::334 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::334:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::334:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::334:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 13:06:05 -0000 There is some garbage shown by the boot loader since this commit. Screenshot from VirtualBox: https://people.freebsd.org/~mjg/loader_artifact.png An additional fixup is needed to see it: commit 0974bfa3a8da2201b0a415e72593552f5ac59379 (HEAD -> main, freebsd/main, freebsd/HEAD) Author: Toomas Soome Date: Fri Jan 15 14:58:12 2021 +0200 loader: do not update palette in text mode (real fix) otherwise the screen is blank. On 1/14/21, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=0495ed398c4f64013bab2327eb13a303e1f90c13 > > commit 0495ed398c4f64013bab2327eb13a303e1f90c13 > Merge: 7ae27c2d6c4f 0ea45b9cd43c > Author: Kyle Evans > AuthorDate: 2021-01-14 05:56:18 +0000 > Commit: Kyle Evans > CommitDate: 2021-01-14 05:56:18 +0000 > > contrib/lua: update to 5.4.2 > > Merge commit '0ea45b9cd43ce1247eb3eee9bfd5cee3d19068e7' into main > > contrib/lua/Makefile | 30 +- > contrib/lua/README | 2 +- > contrib/lua/doc/contents.html | 81 +- > contrib/lua/doc/lua.1 | 93 +- > contrib/lua/doc/manual.html | 3260 > ++++++++++++++++++++++++++-------------- > contrib/lua/doc/readme.html | 115 +- > contrib/lua/src/Makefile | 83 +- > contrib/lua/src/lapi.c | 706 +++++---- > contrib/lua/src/lapi.h | 27 +- > contrib/lua/src/lauxlib.c | 385 ++--- > contrib/lua/src/lauxlib.h | 54 +- > contrib/lua/src/lbaselib.c | 139 +- > contrib/lua/src/lbitlib.c | 233 --- > contrib/lua/src/lcode.c | 1141 ++++++++++---- > contrib/lua/src/lcode.h | 34 +- > contrib/lua/src/lcorolib.c | 89 +- > contrib/lua/src/lctype.c | 43 +- > contrib/lua/src/lctype.h | 18 +- > contrib/lua/src/ldblib.c | 94 +- > contrib/lua/src/ldebug.c | 462 ++++-- > contrib/lua/src/ldebug.h | 21 +- > contrib/lua/src/ldo.c | 559 +++---- > contrib/lua/src/ldo.h | 38 +- > contrib/lua/src/ldump.c | 197 +-- > contrib/lua/src/lfunc.c | 223 ++- > contrib/lua/src/lfunc.h | 50 +- > contrib/lua/src/lgc.c | 1387 +++++++++++------ > contrib/lua/src/lgc.h | 128 +- > contrib/lua/src/linit.c | 7 +- > contrib/lua/src/liolib.c | 121 +- > contrib/lua/src/ljumptab.h | 112 ++ > contrib/lua/src/llex.c | 74 +- > contrib/lua/src/llex.h | 12 +- > contrib/lua/src/llimits.h | 134 +- > contrib/lua/src/lmathlib.c | 433 +++++- > contrib/lua/src/lmem.c | 178 ++- > contrib/lua/src/lmem.h | 72 +- > contrib/lua/src/loadlib.c | 261 ++-- > contrib/lua/src/lobject.c | 340 +++-- > contrib/lua/src/lobject.h | 737 ++++++--- > contrib/lua/src/lopcodes.c | 190 ++- > contrib/lua/src/lopcodes.h | 401 +++-- > contrib/lua/src/lopnames.h | 103 ++ > contrib/lua/src/loslib.c | 85 +- > contrib/lua/src/lparser.c | 967 ++++++++---- > contrib/lua/src/lparser.h | 80 +- > contrib/lua/src/lprefix.h | 4 +- > contrib/lua/src/lstate.c | 221 ++- > contrib/lua/src/lstate.h | 202 ++- > contrib/lua/src/lstring.c | 135 +- > contrib/lua/src/lstring.h | 22 +- > contrib/lua/src/lstrlib.c | 504 +++++-- > contrib/lua/src/ltable.c | 692 ++++++--- > contrib/lua/src/ltable.h | 22 +- > contrib/lua/src/ltablib.c | 52 +- > contrib/lua/src/ltm.c | 173 ++- > contrib/lua/src/ltm.h | 37 +- > contrib/lua/src/lua.c | 439 +++--- > contrib/lua/src/lua.h | 60 +- > contrib/lua/src/luac.c | 470 ++++-- > contrib/lua/src/luaconf.h.dist | 253 ++-- > contrib/lua/src/lualib.h | 5 +- > contrib/lua/src/lundump.c | 266 ++-- > contrib/lua/src/lundump.h | 8 +- > contrib/lua/src/lutf8lib.c | 117 +- > contrib/lua/src/lvm.c | 1762 ++++++++++++++-------- > contrib/lua/src/lvm.h | 91 +- > contrib/lua/src/lzio.c | 2 +- > contrib/lua/src/lzio.h | 2 +- > lib/liblua/Makefile | 2 +- > lib/liblua/luaconf.h | 248 ++- > stand/liblua/luaconf.h | 244 ++- > 72 files changed, 12945 insertions(+), 7087 deletions(-) > > diff --cc contrib/lua/Makefile > index a2820e04fe24,000000000000..36447a0f61c7 > mode 100644,000000..100644 > --- a/contrib/lua/Makefile > +++ b/contrib/lua/Makefile > @@@ -1,114 -1,0 +1,106 @@@ > +# Makefile for installing Lua > +# See doc/readme.html for installation and customization instructions. > + > +# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT > ======================= > + > +# Your platform. See PLATS for possible values. > - PLAT= none > ++PLAT= guess > + > +# Where to install. The installation starts in the src and doc > directories, > +# so take care if INSTALL_TOP is not an absolute path. See the local > target. > +# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with > +# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. > +INSTALL_TOP= /usr/local > +INSTALL_BIN= $(INSTALL_TOP)/bin > +INSTALL_INC= $(INSTALL_TOP)/include > +INSTALL_LIB= $(INSTALL_TOP)/lib > +INSTALL_MAN= $(INSTALL_TOP)/man/man1 > +INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V > +INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V > + > +# How to install. If your install program does not support "-p", then > +# you may have to run ranlib on the installed liblua.a. > +INSTALL= install -p > +INSTALL_EXEC= $(INSTALL) -m 0755 > +INSTALL_DATA= $(INSTALL) -m 0644 > +# > +# If you don't have "install" you can use "cp" instead. > +# INSTALL= cp -p > +# INSTALL_EXEC= $(INSTALL) > +# INSTALL_DATA= $(INSTALL) > + > +# Other utilities. > +MKDIR= mkdir -p > +RM= rm -f > + > +# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE > ======= > + > +# Convenience platforms targets. > - PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris > ++PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw > posix solaris > + > +# What to install. > +TO_BIN= lua luac > +TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp > +TO_LIB= liblua.a > +TO_MAN= lua.1 luac.1 > + > +# Lua version and release. > - V= 5.3 > - R= $V.6 > ++V= 5.4 > ++R= $V.2 > + > +# Targets start here. > +all: $(PLAT) > + > - $(PLATS) clean: > - cd src && $(MAKE) $@ > - > - test: dummy > - src/lua -v > ++$(PLATS) help test clean: > ++ @cd src && $(MAKE) $@ > + > +install: dummy > + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) > $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) > + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) > + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) > + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) > + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) > + > +uninstall: > + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) > + cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC) > + cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB) > + cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN) > + > +local: > + $(MAKE) install INSTALL_TOP=../install > + > - none: > - @echo "Please do 'make PLATFORM' where PLATFORM is one of these:" > - @echo " $(PLATS)" > - @echo "See doc/readme.html for complete instructions." > - > - # make may get confused with test/ and install/ > ++# make may get confused with install/ if it does not support .PHONY. > +dummy: > + > - # echo config parameters > ++# Echo config parameters. > +echo: > + @cd src && $(MAKE) -s echo > + @echo "PLAT= $(PLAT)" > + @echo "V= $V" > + @echo "R= $R" > + @echo "TO_BIN= $(TO_BIN)" > + @echo "TO_INC= $(TO_INC)" > + @echo "TO_LIB= $(TO_LIB)" > + @echo "TO_MAN= $(TO_MAN)" > + @echo "INSTALL_TOP= $(INSTALL_TOP)" > + @echo "INSTALL_BIN= $(INSTALL_BIN)" > + @echo "INSTALL_INC= $(INSTALL_INC)" > + @echo "INSTALL_LIB= $(INSTALL_LIB)" > + @echo "INSTALL_MAN= $(INSTALL_MAN)" > + @echo "INSTALL_LMOD= $(INSTALL_LMOD)" > + @echo "INSTALL_CMOD= $(INSTALL_CMOD)" > + @echo "INSTALL_EXEC= $(INSTALL_EXEC)" > + @echo "INSTALL_DATA= $(INSTALL_DATA)" > + > - # echo pkg-config data > ++# Echo pkg-config data. > +pc: > + @echo "version=$R" > + @echo "prefix=$(INSTALL_TOP)" > + @echo "libdir=$(INSTALL_LIB)" > + @echo "includedir=$(INSTALL_INC)" > + > - # list targets that do not create files (but not all makes understand > .PHONY) > - .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho > ++# Targets that do not create files (not all makes understand .PHONY). > ++.PHONY: all $(PLATS) help test clean install uninstall local dummy echo > pc > + > +# (end of Makefile) > diff --cc contrib/lua/README > index f8bdb6f41d00,000000000000..bc8a9d737d26 > mode 100644,000000..100644 > --- a/contrib/lua/README > +++ b/contrib/lua/README > @@@ -1,6 -1,0 +1,6 @@@ > + > - This is Lua 5.3.6, released on 14 Sep 2020. > ++This is Lua 5.4.2, released on 13 Nov 2020. > + > +For installation instructions, license details, and > +further information about Lua, see doc/readme.html. > + > diff --cc contrib/lua/src/ljumptab.h > index 000000000000,8306f250ccb6..8306f250ccb6 > mode 000000,100644..100644 > --- a/contrib/lua/src/ljumptab.h > +++ b/contrib/lua/src/ljumptab.h > diff --cc contrib/lua/src/lopnames.h > index 000000000000,965cec9bf2fa..965cec9bf2fa > mode 000000,100644..100644 > --- a/contrib/lua/src/lopnames.h > +++ b/contrib/lua/src/lopnames.h > diff --cc contrib/lua/src/lstrlib.c > index 28064960818f,000000000000..ed88abdb4db2 > mode 100644,000000..100644 > --- a/contrib/lua/src/lstrlib.c > +++ b/contrib/lua/src/lstrlib.c > @@@ -1,1605 -1,0 +1,1825 @@@ > +/* > - ** $Id: lstrlib.c,v 1.254.1.1 2017/04/19 17:29:57 roberto Exp $ > ++** $Id: lstrlib.c $ > +** Standard library for string operations and pattern-matching > +** See Copyright Notice in lua.h > +*/ > + > +#define lstrlib_c > +#define LUA_LIB > + > +#include "lprefix.h" > + > + > +#include > +#include > +#include > +#include > ++#include > +#include > +#include > +#include > +#include > + > +#include "lua.h" > + > +#include "lauxlib.h" > +#include "lualib.h" > + > + > +/* > +** maximum number of captures that a pattern can do during > +** pattern-matching. This limit is arbitrary, but must fit in > +** an unsigned char. > +*/ > +#if !defined(LUA_MAXCAPTURES) > +#define LUA_MAXCAPTURES 32 > +#endif > + > + > +/* macro to 'unsign' a character */ > +#define uchar(c) ((unsigned char)(c)) > + > + > +/* > +** Some sizes are better limited to fit in 'int', but must also fit in > +** 'size_t'. (We assume that 'lua_Integer' cannot be smaller than 'int'.) > +*/ > +#define MAX_SIZET ((size_t)(~(size_t)0)) > + > +#define MAXSIZE \ > + (sizeof(size_t) < sizeof(int) ? MAX_SIZET : (size_t)(INT_MAX)) > + > + > + > + > +static int str_len (lua_State *L) { > + size_t l; > + luaL_checklstring(L, 1, &l); > + lua_pushinteger(L, (lua_Integer)l); > + return 1; > +} > + > + > - /* translate a relative string position: negative means back from end */ > - static lua_Integer posrelat (lua_Integer pos, size_t len) { > - if (pos >= 0) return pos; > - else if (0u - (size_t)pos > len) return 0; > - else return (lua_Integer)len + pos + 1; > ++/* > ++** translate a relative initial string position > ++** (negative means back from end): clip result to [1, inf). > ++** The length of any string in Lua must fit in a lua_Integer, > ++** so there are no overflows in the casts. > ++** The inverted comparison avoids a possible overflow > ++** computing '-pos'. > ++*/ > ++static size_t posrelatI (lua_Integer pos, size_t len) { > ++ if (pos > 0) > ++ return (size_t)pos; > ++ else if (pos == 0) > ++ return 1; > ++ else if (pos < -(lua_Integer)len) /* inverted comparison */ > ++ return 1; /* clip to 1 */ > ++ else return len + (size_t)pos + 1; > ++} > ++ > ++ > ++/* > ++** Gets an optional ending string position from argument 'arg', > ++** with default value 'def'. > ++** Negative means back from end: clip result to [0, len] > ++*/ > ++static size_t getendpos (lua_State *L, int arg, lua_Integer def, > ++ size_t len) { > ++ lua_Integer pos = luaL_optinteger(L, arg, def); > ++ if (pos > (lua_Integer)len) > ++ return len; > ++ else if (pos >= 0) > ++ return (size_t)pos; > ++ else if (pos < -(lua_Integer)len) > ++ return 0; > ++ else return len + (size_t)pos + 1; > +} > + > + > +static int str_sub (lua_State *L) { > + size_t l; > + const char *s = luaL_checklstring(L, 1, &l); > - lua_Integer start = posrelat(luaL_checkinteger(L, 2), l); > - lua_Integer end = posrelat(luaL_optinteger(L, 3, -1), l); > - if (start < 1) start = 1; > - if (end > (lua_Integer)l) end = l; > ++ size_t start = posrelatI(luaL_checkinteger(L, 2), l); > ++ size_t end = getendpos(L, 3, -1, l); > + if (start <= end) > - lua_pushlstring(L, s + start - 1, (size_t)(end - start) + 1); > ++ lua_pushlstring(L, s + start - 1, (end - start) + 1); > + else lua_pushliteral(L, ""); > + return 1; > +} > + > + > +static int str_reverse (lua_State *L) { > + size_t l, i; > + luaL_Buffer b; > + const char *s = luaL_checklstring(L, 1, &l); > + char *p = luaL_buffinitsize(L, &b, l); > + for (i = 0; i < l; i++) > + p[i] = s[l - i - 1]; > + luaL_pushresultsize(&b, l); > + return 1; > +} > + > + > +static int str_lower (lua_State *L) { > + size_t l; > + size_t i; > + luaL_Buffer b; > + const char *s = luaL_checklstring(L, 1, &l); > + char *p = luaL_buffinitsize(L, &b, l); > + for (i=0; i + p[i] = tolower(uchar(s[i])); > + luaL_pushresultsize(&b, l); > + return 1; > +} > + > + > +static int str_upper (lua_State *L) { > + size_t l; > + size_t i; > + luaL_Buffer b; > + const char *s = luaL_checklstring(L, 1, &l); > + char *p = luaL_buffinitsize(L, &b, l); > + for (i=0; i + p[i] = toupper(uchar(s[i])); > + luaL_pushresultsize(&b, l); > + return 1; > +} > + > + > +static int str_rep (lua_State *L) { > + size_t l, lsep; > + const char *s = luaL_checklstring(L, 1, &l); > + lua_Integer n = luaL_checkinteger(L, 2); > + const char *sep = luaL_optlstring(L, 3, "", &lsep); > + if (n <= 0) lua_pushliteral(L, ""); > + else if (l + lsep < l || l + lsep > MAXSIZE / n) /* may overflow? */ > + return luaL_error(L, "resulting string too large"); > + else { > + size_t totallen = (size_t)n * l + (size_t)(n - 1) * lsep; > + luaL_Buffer b; > + char *p = luaL_buffinitsize(L, &b, totallen); > + while (n-- > 1) { /* first n-1 copies (followed by separator) */ > + memcpy(p, s, l * sizeof(char)); p += l; > + if (lsep > 0) { /* empty 'memcpy' is not that cheap */ > + memcpy(p, sep, lsep * sizeof(char)); > + p += lsep; > + } > + } > + memcpy(p, s, l * sizeof(char)); /* last copy (not followed by > separator) */ > + luaL_pushresultsize(&b, totallen); > + } > + return 1; > +} > + > + > +static int str_byte (lua_State *L) { > + size_t l; > + const char *s = luaL_checklstring(L, 1, &l); > - lua_Integer posi = posrelat(luaL_optinteger(L, 2, 1), l); > - lua_Integer pose = posrelat(luaL_optinteger(L, 3, posi), l); > ++ lua_Integer pi = luaL_optinteger(L, 2, 1); > ++ size_t posi = posrelatI(pi, l); > ++ size_t pose = getendpos(L, 3, pi, l); > + int n, i; > - if (posi < 1) posi = 1; > - if (pose > (lua_Integer)l) pose = l; > + if (posi > pose) return 0; /* empty interval; return no values */ > - if (pose - posi >= INT_MAX) /* arithmetic overflow? */ > ++ if (pose - posi >= (size_t)INT_MAX) /* arithmetic overflow? */ > + return luaL_error(L, "string slice too long"); > + n = (int)(pose - posi) + 1; > + luaL_checkstack(L, n, "string slice too long"); > + for (i=0; i + lua_pushinteger(L, uchar(s[posi+i-1])); > + return n; > +} > + > + > +static int str_char (lua_State *L) { > + int n = lua_gettop(L); /* number of arguments */ > + int i; > + luaL_Buffer b; > + char *p = luaL_buffinitsize(L, &b, n); > + for (i=1; i<=n; i++) { > - lua_Integer c = luaL_checkinteger(L, i); > - luaL_argcheck(L, uchar(c) == c, i, "value out of range"); > ++ lua_Unsigned c = (lua_Unsigned)luaL_checkinteger(L, i); > ++ luaL_argcheck(L, c <= (lua_Unsigned)UCHAR_MAX, i, "value out of > range"); > + p[i - 1] = uchar(c); > + } > + luaL_pushresultsize(&b, n); > + return 1; > +} > + > + > - static int writer (lua_State *L, const void *b, size_t size, void *B) { > - (void)L; > - luaL_addlstring((luaL_Buffer *) B, (const char *)b, size); > ++/* > ++** Buffer to store the result of 'string.dump'. It must be initialized > ++** after the call to 'lua_dump', to ensure that the function is on the > ++** top of the stack when 'lua_dump' is called. ('luaL_buffinit' might > ++** push stuff.) > ++*/ > ++struct str_Writer { > ++ int init; /* true iff buffer has been initialized */ > ++ luaL_Buffer B; > ++}; > ++ > ++ > ++static int writer (lua_State *L, const void *b, size_t size, void *ud) { > ++ struct str_Writer *state = (struct str_Writer *)ud; > ++ if (!state->init) { > ++ state->init = 1; > ++ luaL_buffinit(L, &state->B); > ++ } > ++ luaL_addlstring(&state->B, (const char *)b, size); > + return 0; > +} > + > + > +static int str_dump (lua_State *L) { > - luaL_Buffer b; > ++ struct str_Writer state; > + int strip = lua_toboolean(L, 2); > + luaL_checktype(L, 1, LUA_TFUNCTION); > - lua_settop(L, 1); > - luaL_buffinit(L,&b); > - if (lua_dump(L, writer, &b, strip) != 0) > ++ lua_settop(L, 1); /* ensure function is on the top of the stack */ > ++ state.init = 0; > ++ if (lua_dump(L, writer, &state, strip) != 0) > + return luaL_error(L, "unable to dump given function"); > - luaL_pushresult(&b); > ++ luaL_pushresult(&state.B); > + return 1; > +} > + > + > + > ++/* > ++** {====================================================== > ++** METAMETHODS > ++** ======================================================= > ++*/ > ++ > ++#if defined(LUA_NOCVTS2N) /* { */ > ++ > ++/* no coercion from strings to numbers */ > ++ > ++static const luaL_Reg stringmetamethods[] = { > ++ {"__index", NULL}, /* placeholder */ > ++ {NULL, NULL} > ++}; > ++ > ++#else /* }{ */ > ++ > ++static int tonum (lua_State *L, int arg) { > ++ if (lua_type(L, arg) == LUA_TNUMBER) { /* already a number? */ > ++ lua_pushvalue(L, arg); > ++ return 1; > ++ } > ++ else { /* check whether it is a numerical string */ > ++ size_t len; > ++ const char *s = lua_tolstring(L, arg, &len); > ++ return (s != NULL && lua_stringtonumber(L, s) == len + 1); > ++ } > ++} > ++ > ++ > ++static void trymt (lua_State *L, const char *mtname) { > ++ lua_settop(L, 2); /* back to the original arguments */ > ++ if (lua_type(L, 2) == LUA_TSTRING || !luaL_getmetafield(L, 2, mtname)) > ++ luaL_error(L, "attempt to %s a '%s' with a '%s'", mtname + 2, > ++ luaL_typename(L, -2), luaL_typename(L, -1)); > ++ lua_insert(L, -3); /* put metamethod before arguments */ > ++ lua_call(L, 2, 1); /* call metamethod */ > ++} > ++ > ++ > ++static int arith (lua_State *L, int op, const char *mtname) { > ++ if (tonum(L, 1) && tonum(L, 2)) > ++ lua_arith(L, op); /* result will be on the top */ > ++ else > ++ trymt(L, mtname); > ++ return 1; > ++} > ++ > ++ > ++static int arith_add (lua_State *L) { > ++ return arith(L, LUA_OPADD, "__add"); > ++} > ++ > ++static int arith_sub (lua_State *L) { > ++ return arith(L, LUA_OPSUB, "__sub"); > ++} > ++ > ++static int arith_mul (lua_State *L) { > ++ return arith(L, LUA_OPMUL, "__mul"); > ++} > ++ > ++static int arith_mod (lua_State *L) { > ++ return arith(L, LUA_OPMOD, "__mod"); > ++} > ++ > ++static int arith_pow (lua_State *L) { > ++ return arith(L, LUA_OPPOW, "__pow"); > ++} > ++ > ++static int arith_div (lua_State *L) { > ++ return arith(L, LUA_OPDIV, "__div"); > ++} > ++ > ++static int arith_idiv (lua_State *L) { > ++ return arith(L, LUA_OPIDIV, "__idiv"); > ++} > ++ > ++static int arith_unm (lua_State *L) { > ++ return arith(L, LUA_OPUNM, "__unm"); > ++} > ++ > ++ > ++static const luaL_Reg stringmetamethods[] = { > ++ {"__add", arith_add}, > ++ {"__sub", arith_sub}, > ++ {"__mul", arith_mul}, > ++ {"__mod", arith_mod}, > ++ {"__pow", arith_pow}, > ++ {"__div", arith_div}, > ++ {"__idiv", arith_idiv}, > ++ {"__unm", arith_unm}, > ++ {"__index", NULL}, /* placeholder */ > ++ {NULL, NULL} > ++}; > ++ > ++#endif /* } */ > ++ > ++/* }====================================================== */ > ++ > +/* > +** {====================================================== > +** PATTERN MATCHING > +** ======================================================= > +*/ > + > + > +#define CAP_UNFINISHED (-1) > +#define CAP_POSITION (-2) > + > + > +typedef struct MatchState { > + const char *src_init; /* init of source string */ > + const char *src_end; /* end ('\0') of source string */ > + const char *p_end; /* end ('\0') of pattern */ > + lua_State *L; > + int matchdepth; /* control for recursive depth (to avoid C stack > overflow) */ > + unsigned char level; /* total number of captures (finished or > unfinished) */ > + struct { > + const char *init; > + ptrdiff_t len; > + } capture[LUA_MAXCAPTURES]; > +} MatchState; > + > + > +/* recursive function */ > +static const char *match (MatchState *ms, const char *s, const char *p); > + > + > +/* maximum recursion depth for 'match' */ > +#if !defined(MAXCCALLS) > +#define MAXCCALLS 200 > +#endif > + > + > +#define L_ESC '%' > +#define SPECIALS "^$*+?.([%-" > + > + > +static int check_capture (MatchState *ms, int l) { > + l -= '1'; > + if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED) > + return luaL_error(ms->L, "invalid capture index %%%d", l + 1); > + return l; > +} > + > + > +static int capture_to_close (MatchState *ms) { > + int level = ms->level; > + for (level--; level>=0; level--) > + if (ms->capture[level].len == CAP_UNFINISHED) return level; > + return luaL_error(ms->L, "invalid pattern capture"); > +} > + > + > +static const char *classend (MatchState *ms, const char *p) { > + switch (*p++) { > + case L_ESC: { > + if (p == ms->p_end) > + luaL_error(ms->L, "malformed pattern (ends with '%%')"); > + return p+1; > + } > + case '[': { > + if (*p == '^') p++; > + do { /* look for a ']' */ > + if (p == ms->p_end) > + luaL_error(ms->L, "malformed pattern (missing ']')"); > + if (*(p++) == L_ESC && p < ms->p_end) > + p++; /* skip escapes (e.g. '%]') */ > + } while (*p != ']'); > + return p+1; > + } > + default: { > + return p; > + } > + } > +} > + > + > +static int match_class (int c, int cl) { > + int res; > + switch (tolower(cl)) { > + case 'a' : res = isalpha(c); break; > + case 'c' : res = iscntrl(c); break; > + case 'd' : res = isdigit(c); break; > + case 'g' : res = isgraph(c); break; > + case 'l' : res = islower(c); break; > + case 'p' : res = ispunct(c); break; > + case 's' : res = isspace(c); break; > + case 'u' : res = isupper(c); break; > + case 'w' : res = isalnum(c); break; > + case 'x' : res = isxdigit(c); break; > + case 'z' : res = (c == 0); break; /* deprecated option */ > + default: return (cl == c); > + } > + return (islower(cl) ? res : !res); > +} > + > + > +static int matchbracketclass (int c, const char *p, const char *ec) { > + int sig = 1; > + if (*(p+1) == '^') { > + sig = 0; > + p++; /* skip the '^' */ > + } > + while (++p < ec) { > + if (*p == L_ESC) { > + p++; > + if (match_class(c, uchar(*p))) > + return sig; > + } > + else if ((*(p+1) == '-') && (p+2 < ec)) { > + p+=2; > + if (uchar(*(p-2)) <= c && c <= uchar(*p)) > + return sig; > + } > + else if (uchar(*p) == c) return sig; > + } > + return !sig; > +} > + > + > +static int singlematch (MatchState *ms, const char *s, const char *p, > + const char *ep) { > + if (s >= ms->src_end) > + return 0; > + else { > + int c = uchar(*s); > + switch (*p) { > + case '.': return 1; /* matches any char */ > + case L_ESC: return match_class(c, uchar(*(p+1))); > + case '[': return matchbracketclass(c, p, ep-1); > + default: return (uchar(*p) == c); > + } > + } > +} > + > + > +static const char *matchbalance (MatchState *ms, const char *s, > + const char *p) { > + if (p >= ms->p_end - 1) > + luaL_error(ms->L, "malformed pattern (missing arguments to '%%b')"); > + if (*s != *p) return NULL; > + else { > + int b = *p; > + int e = *(p+1); > + int cont = 1; > + while (++s < ms->src_end) { > + if (*s == e) { > + if (--cont == 0) return s+1; > + } > + else if (*s == b) cont++; > + } > + } > + return NULL; /* string ends out of balance */ > +} > + > + > +static const char *max_expand (MatchState *ms, const char *s, > + const char *p, const char *ep) { > + ptrdiff_t i = 0; /* counts maximum expand for item */ > + while (singlematch(ms, s + i, p, ep)) > + i++; > + /* keeps trying to match with the maximum repetitions */ > + while (i>=0) { > + const char *res = match(ms, (s+i), ep+1); > + if (res) return res; > + i--; /* else didn't match; reduce 1 repetition to try again */ > + } > + return NULL; > +} > + > + > +static const char *min_expand (MatchState *ms, const char *s, > + const char *p, const char *ep) { > + for (;;) { > + const char *res = match(ms, s, ep+1); > + if (res != NULL) > + return res; > + else if (singlematch(ms, s, p, ep)) > + s++; /* try with one more repetition */ > + else return NULL; > + } > +} > + > + > +static const char *start_capture (MatchState *ms, const char *s, > + const char *p, int what) { > + const char *res; > + int level = ms->level; > + if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures"); > + ms->capture[level].init = s; > + ms->capture[level].len = what; > + ms->level = level+1; > + if ((res=match(ms, s, p)) == NULL) /* match failed? */ > + ms->level--; /* undo capture */ > + return res; > +} > + > + > +static const char *end_capture (MatchState *ms, const char *s, > + const char *p) { > + int l = capture_to_close(ms); > + const char *res; > + ms->capture[l].len = s - ms->capture[l].init; /* close capture */ > + if ((res = match(ms, s, p)) == NULL) /* match failed? */ > + ms->capture[l].len = CAP_UNFINISHED; /* undo capture */ > + return res; > +} > + > + > +static const char *match_capture (MatchState *ms, const char *s, int l) { > + size_t len; > + l = check_capture(ms, l); > + len = ms->capture[l].len; > + if ((size_t)(ms->src_end-s) >= len && > + memcmp(ms->capture[l].init, s, len) == 0) > + return s+len; > + else return NULL; > +} > + > + > +static const char *match (MatchState *ms, const char *s, const char *p) { > + if (ms->matchdepth-- == 0) > + luaL_error(ms->L, "pattern too complex"); > + init: /* using goto's to optimize tail recursion */ > + if (p != ms->p_end) { /* end of pattern? */ > + switch (*p) { > + case '(': { /* start capture */ > + if (*(p + 1) == ')') /* position capture? */ > + s = start_capture(ms, s, p + 2, CAP_POSITION); > + else > + s = start_capture(ms, s, p + 1, CAP_UNFINISHED); > + break; > + } > + case ')': { /* end capture */ > + s = end_capture(ms, s, p + 1); > + break; > + } > + case '$': { > + if ((p + 1) != ms->p_end) /* is the '$' the last char in pattern? > */ > + goto dflt; /* no; go to default */ > + s = (s == ms->src_end) ? s : NULL; /* check end of string */ > + break; > + } > + case L_ESC: { /* escaped sequences not in the format class[*+?-]? > */ > + switch (*(p + 1)) { > + case 'b': { /* balanced string? */ > + s = matchbalance(ms, s, p + 2); > + if (s != NULL) { > + p += 4; goto init; /* return match(ms, s, p + 4); */ > + } /* else fail (s == NULL) */ > + break; > + } > + case 'f': { /* frontier? */ > + const char *ep; char previous; > + p += 2; > + if (*p != '[') > + luaL_error(ms->L, "missing '[' after '%%f' in pattern"); > + ep = classend(ms, p); /* points to what is next */ > + previous = (s == ms->src_init) ? '\0' : *(s - 1); > + if (!matchbracketclass(uchar(previous), p, ep - 1) && > + matchbracketclass(uchar(*s), p, ep - 1)) { > + p = ep; goto init; /* return match(ms, s, ep); */ > + } > + s = NULL; /* match failed */ > + break; > + } > + case '0': case '1': case '2': case '3': > + case '4': case '5': case '6': case '7': > + case '8': case '9': { /* capture results (%0-%9)? */ > + s = match_capture(ms, s, uchar(*(p + 1))); > + if (s != NULL) { > + p += 2; goto init; /* return match(ms, s, p + 2) */ > + } > + break; > + } > + default: goto dflt; > + } > + break; > + } > + default: dflt: { /* pattern class plus optional suffix */ > + const char *ep = classend(ms, p); /* points to optional suffix > */ > + /* does not match at least once? */ > + if (!singlematch(ms, s, p, ep)) { > + if (*ep == '*' || *ep == '?' || *ep == '-') { /* accept empty? > */ > + p = ep + 1; goto init; /* return match(ms, s, ep + 1); */ > + } > + else /* '+' or no suffix */ > + s = NULL; /* fail */ > + } > + else { /* matched once */ > + switch (*ep) { /* handle optional suffix */ > + case '?': { /* optional */ > + const char *res; > + if ((res = match(ms, s + 1, ep + 1)) != NULL) > + s = res; > + else { > + p = ep + 1; goto init; /* else return match(ms, s, ep + > 1); */ > + } > + break; > + } > + case '+': /* 1 or more repetitions */ > + s++; /* 1 match already done */ > + /* FALLTHROUGH */ > + case '*': /* 0 or more repetitions */ > + s = max_expand(ms, s, p, ep); > + break; > + case '-': /* 0 or more repetitions (minimum) */ > + s = min_expand(ms, s, p, ep); > + break; > + default: /* no suffix */ > + s++; p = ep; goto init; /* return match(ms, s + 1, ep); */ > + } > + } > + break; > + } > + } > + } > + ms->matchdepth++; > + return s; > +} > + > + > + > +static const char *lmemfind (const char *s1, size_t l1, > + const char *s2, size_t l2) { > + if (l2 == 0) return s1; /* empty strings are everywhere */ > + else if (l2 > l1) return NULL; /* avoids a negative 'l1' */ > + else { > + const char *init; /* to search for a '*s2' inside 's1' */ > + l2--; /* 1st char will be checked by 'memchr' */ > + l1 = l1-l2; /* 's2' cannot be found after that */ > + while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) > { > + init++; /* 1st char is already checked */ > + if (memcmp(init, s2+1, l2) == 0) > + return init-1; > + else { /* correct 'l1' and 's1' to try again */ > + l1 -= init-s1; > + s1 = init; > + } > + } > + return NULL; /* not found */ > + } > +} > + > + > - static void push_onecapture (MatchState *ms, int i, const char *s, > - const char *e) { > ++/* > ++** get information about the i-th capture. If there are no captures > ++** and 'i==0', return information about the whole match, which > ++** is the range 's'..'e'. If the capture is a string, return > ++** its length and put its address in '*cap'. If it is an integer > ++** (a position), push it on the stack and return CAP_POSITION. > ++*/ > ++static size_t get_onecapture (MatchState *ms, int i, const char *s, > ++ const char *e, const char **cap) { > + if (i >= ms->level) { > - if (i == 0) /* ms->level == 0, too */ > - lua_pushlstring(ms->L, s, e - s); /* add whole match */ > - else > ++ if (i != 0) > + luaL_error(ms->L, "invalid capture index %%%d", i + 1); > ++ *cap = s; > ++ return e - s; > + } > + else { > *** 6490 LINES SKIPPED *** > _______________________________________________ > dev-commits-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > To unsubscribe, send any mail to > "dev-commits-src-all-unsubscribe@freebsd.org" > -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Fri Jan 15 13:58:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 384FE4E6AD1; Fri, 15 Jan 2021 13:58: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 4DHN7S13gtz4ysQ; Fri, 15 Jan 2021 13:58: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 1724B1D572; Fri, 15 Jan 2021 13:58: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 10FDwSoj074804; Fri, 15 Jan 2021 13:58:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FDwSWe074803; Fri, 15 Jan 2021 13:58:28 GMT (envelope-from git) Date: Fri, 15 Jan 2021 13:58:28 GMT Message-Id: <202101151358.10FDwSWe074803@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: 58e169ab14cf - main - arm64: Add the dts include directory to the includes dir 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: 58e169ab14cf57af9a0401dac3f903ce7f01f347 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 13:58:28 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=58e169ab14cf57af9a0401dac3f903ce7f01f347 commit 58e169ab14cf57af9a0401dac3f903ce7f01f347 Author: Emmanuel Vadot AuthorDate: 2021-01-15 13:15:31 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 13:15:31 +0000 arm64: Add the dts include directory to the includes dir We do that for arm so we can directly #include --- sys/conf/Makefile.arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index d48826197dbd..08b5a5fc90b7 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -25,7 +25,7 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -INCLUDES+= -I$S/contrib/libfdt +INCLUDES+= -I$S/contrib/libfdt -I$S/gnu/dts/include # 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 From owner-dev-commits-src-all@freebsd.org Fri Jan 15 13:58:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 872614E6C28; Fri, 15 Jan 2021 13:58: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 4DHN7T25XRz501s; Fri, 15 Jan 2021 13:58: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 3AB791DAEE; Fri, 15 Jan 2021 13:58: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 10FDwToQ074822; Fri, 15 Jan 2021 13:58:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FDwTu2074821; Fri, 15 Jan 2021 13:58:29 GMT (envelope-from git) Date: Fri, 15 Jan 2021 13:58:29 GMT Message-Id: <202101151358.10FDwTu2074821@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: 8a7a4683b083 - main - arm: arm64: Directly use #include 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: 8a7a4683b0832ea18c028588a3c49946d499c371 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 13:58:29 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8a7a4683b0832ea18c028588a3c49946d499c371 commit 8a7a4683b0832ea18c028588a3c49946d499c371 Author: Emmanuel Vadot AuthorDate: 2021-01-15 13:17:03 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 13:17:03 +0000 arm: arm64: Directly use #include We have it in the includes path and this will help the transition to the new device-tree import in sys/contrib --- sys/arm/allwinner/clkng/ccu_a10.c | 6 +++--- sys/arm/allwinner/clkng/ccu_a64.c | 4 ++-- sys/arm/allwinner/clkng/ccu_a83t.c | 4 ++-- sys/arm/allwinner/clkng/ccu_de2.c | 4 ++-- sys/arm/allwinner/clkng/ccu_h3.c | 4 ++-- sys/arm/allwinner/clkng/ccu_h6.c | 4 ++-- sys/arm/allwinner/clkng/ccu_h6_r.c | 4 ++-- sys/arm/allwinner/clkng/ccu_sun8i_r.c | 4 ++-- sys/arm/mv/mv_cp110_icu.c | 2 +- sys/arm/nvidia/as3722.c | 2 +- sys/arm/nvidia/as3722_regulators.c | 2 +- sys/arm/nvidia/drm2/tegra_drm_subr.c | 2 +- sys/arm/nvidia/tegra124/tegra124_car.c | 2 +- sys/arm/nvidia/tegra124/tegra124_clk_per.c | 2 +- sys/arm/nvidia/tegra124/tegra124_clk_pll.c | 2 +- sys/arm/nvidia/tegra124/tegra124_clk_super.c | 2 +- sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 2 +- sys/arm/nvidia/tegra_soctherm.c | 2 +- sys/arm/ti/ti_sysc.c | 2 +- 19 files changed, 28 insertions(+), 28 deletions(-) diff --git a/sys/arm/allwinner/clkng/ccu_a10.c b/sys/arm/allwinner/clkng/ccu_a10.c index 288ac10b43f5..182a19f35e98 100644 --- a/sys/arm/allwinner/clkng/ccu_a10.c +++ b/sys/arm/allwinner/clkng/ccu_a10.c @@ -49,9 +49,9 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include +#include +#include +#include /* Non-exported resets */ /* Non-exported clocks */ diff --git a/sys/arm/allwinner/clkng/ccu_a64.c b/sys/arm/allwinner/clkng/ccu_a64.c index 859862b2b477..41f531596475 100644 --- a/sys/arm/allwinner/clkng/ccu_a64.c +++ b/sys/arm/allwinner/clkng/ccu_a64.c @@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include /* Non-exported clocks */ diff --git a/sys/arm/allwinner/clkng/ccu_a83t.c b/sys/arm/allwinner/clkng/ccu_a83t.c index bf8dcb13399a..c32b1d624161 100644 --- a/sys/arm/allwinner/clkng/ccu_a83t.c +++ b/sys/arm/allwinner/clkng/ccu_a83t.c @@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include /* Non-exported clocks */ diff --git a/sys/arm/allwinner/clkng/ccu_de2.c b/sys/arm/allwinner/clkng/ccu_de2.c index 7e699cce36a8..84a2681abeb9 100644 --- a/sys/arm/allwinner/clkng/ccu_de2.c +++ b/sys/arm/allwinner/clkng/ccu_de2.c @@ -55,8 +55,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include enum CCU_DE2 { H3_CCU = 1, diff --git a/sys/arm/allwinner/clkng/ccu_h3.c b/sys/arm/allwinner/clkng/ccu_h3.c index c5f182b81a3f..72e257c98d73 100644 --- a/sys/arm/allwinner/clkng/ccu_h3.c +++ b/sys/arm/allwinner/clkng/ccu_h3.c @@ -57,8 +57,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include /* Non-exported resets */ #define RST_BUS_SCR 53 diff --git a/sys/arm/allwinner/clkng/ccu_h6.c b/sys/arm/allwinner/clkng/ccu_h6.c index 5dd1816fab15..dbecaaff0e6b 100644 --- a/sys/arm/allwinner/clkng/ccu_h6.c +++ b/sys/arm/allwinner/clkng/ccu_h6.c @@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include /* Non-exported clocks */ #define CLK_OSC_12M 0 diff --git a/sys/arm/allwinner/clkng/ccu_h6_r.c b/sys/arm/allwinner/clkng/ccu_h6_r.c index 98fcd2b47c9b..1f1ca8c1054a 100644 --- a/sys/arm/allwinner/clkng/ccu_h6_r.c +++ b/sys/arm/allwinner/clkng/ccu_h6_r.c @@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include /* Non-exported clocks */ #define CLK_R_AHB 1 diff --git a/sys/arm/allwinner/clkng/ccu_sun8i_r.c b/sys/arm/allwinner/clkng/ccu_sun8i_r.c index cc3b5bff2cf7..05558f4dc73e 100644 --- a/sys/arm/allwinner/clkng/ccu_sun8i_r.c +++ b/sys/arm/allwinner/clkng/ccu_sun8i_r.c @@ -53,8 +53,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include /* Non-exported clocks */ #define CLK_AHB0 1 diff --git a/sys/arm/mv/mv_cp110_icu.c b/sys/arm/mv/mv_cp110_icu.c index 41e727ccc695..12dd6989e339 100644 --- a/sys/arm/mv/mv_cp110_icu.c +++ b/sys/arm/mv/mv_cp110_icu.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "pic_if.h" #define ICU_GRP_NSR 0x0 diff --git a/sys/arm/nvidia/as3722.c b/sys/arm/nvidia/as3722.c index 21dae2d7c695..60301c78a2fb 100644 --- a/sys/arm/nvidia/as3722.c +++ b/sys/arm/nvidia/as3722.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "clock_if.h" #include "regdev_if.h" diff --git a/sys/arm/nvidia/as3722_regulators.c b/sys/arm/nvidia/as3722_regulators.c index d6cb5c529177..3e463f0f5de7 100644 --- a/sys/arm/nvidia/as3722_regulators.c +++ b/sys/arm/nvidia/as3722_regulators.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "as3722.h" diff --git a/sys/arm/nvidia/drm2/tegra_drm_subr.c b/sys/arm/nvidia/drm2/tegra_drm_subr.c index ab883445a2e1..813da9c7b18c 100644 --- a/sys/arm/nvidia/drm2/tegra_drm_subr.c +++ b/sys/arm/nvidia/drm2/tegra_drm_subr.c @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include int tegra_drm_connector_get_modes(struct drm_connector *connector) diff --git a/sys/arm/nvidia/tegra124/tegra124_car.c b/sys/arm/nvidia/tegra124/tegra124_car.c index 7e776720a2e6..89f3e392c0bc 100644 --- a/sys/arm/nvidia/tegra124/tegra124_car.c +++ b/sys/arm/nvidia/tegra124/tegra124_car.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "clkdev_if.h" #include "hwreset_if.h" diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_per.c b/sys/arm/nvidia/tegra124/tegra124_clk_per.c index f1a36a447c1c..4d68e8b22daf 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_per.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_per.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include "tegra124_car.h" /* The TEGRA124_CLK_XUSB_GATE is missing in current diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_pll.c b/sys/arm/nvidia/tegra124/tegra124_clk_pll.c index 7e04c39dcee7..82b34fd71203 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_pll.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_pll.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include "tegra124_car.h" /* #define TEGRA_PLL_DEBUG */ diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_super.c b/sys/arm/nvidia/tegra124/tegra124_clk_super.c index 808a262ad653..43582508edea 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_super.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_super.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include "tegra124_car.h" /* Flags */ diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index 52b3eb6a8962..f41234197335 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include "phydev_if.h" diff --git a/sys/arm/nvidia/tegra_soctherm.c b/sys/arm/nvidia/tegra_soctherm.c index d82b07488838..d90e97e59159 100644 --- a/sys/arm/nvidia/tegra_soctherm.c +++ b/sys/arm/nvidia/tegra_soctherm.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "tegra_soctherm_if.h" /* Per sensors registers - base is 0x0c0*/ diff --git a/sys/arm/ti/ti_sysc.c b/sys/arm/ti/ti_sysc.c index 171520643c13..b16158aa5d83 100644 --- a/sys/arm/ti/ti_sysc.c +++ b/sys/arm/ti/ti_sysc.c @@ -120,7 +120,7 @@ static const char * reg_names[] = { "rev", "sysc", "syss" }; #define REG_MAX 3 /* master idle / slave idle mode defined in 8.1.3.2.1 / 8.1.3.2.2 */ -#include +#include #define SYSC_IDLE_MAX 4 struct sysc_reg { From owner-dev-commits-src-all@freebsd.org Fri Jan 15 14:26:55 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F101C4E7235; Fri, 15 Jan 2021 14:26: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 4DHNmH67VDz51SK; Fri, 15 Jan 2021 14:26: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 C50371DDC3; Fri, 15 Jan 2021 14:26: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 10FEQtqo013687; Fri, 15 Jan 2021 14:26:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FEQtYF013686; Fri, 15 Jan 2021 14:26:55 GMT (envelope-from git) Date: Fri, 15 Jan 2021 14:26:55 GMT Message-Id: <202101151426.10FEQtYF013686@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: e7c49bf5d78c - stable/12 - clang-format libc string functions imported from musl 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: e7c49bf5d78cca59832d568c282a296a3f74529f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 14:26:56 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e7c49bf5d78cca59832d568c282a296a3f74529f commit e7c49bf5d78cca59832d568c282a296a3f74529f Author: Ed Maste AuthorDate: 2020-11-18 22:01:34 +0000 Commit: Ed Maste CommitDate: 2021-01-15 14:25:35 +0000 clang-format libc string functions imported from musl We have adopted these and don't consider them 'contrib' code, so bring them closer to style(9). This is a followon to r315467 and r351700. Sponsored by: The FreeBSD Foundation (cherry picked from commit 4874ddfd373c582d9cd7fe915d2259295d75d1e5) --- lib/libc/string/memchr.c | 25 ++++---- lib/libc/string/memmem.c | 147 ++++++++++++++++++++++++++++------------------- lib/libc/string/strstr.c | 147 +++++++++++++++++++++++++++++------------------ 3 files changed, 194 insertions(+), 125 deletions(-) diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c index d89d09775272..4b5d6f6a4c8a 100644 --- a/lib/libc/string/memchr.c +++ b/lib/libc/string/memchr.c @@ -25,30 +25,35 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include +#include +#include #define SS (sizeof(size_t)) -#define ALIGN (sizeof(size_t)-1) -#define ONES ((size_t)-1/UCHAR_MAX) -#define HIGHS (ONES * (UCHAR_MAX/2+1)) -#define HASZERO(x) (((x)-ONES) & ~(x) & HIGHS) +#define ALIGN (sizeof(size_t) - 1) +#define ONES ((size_t)-1 / UCHAR_MAX) +#define HIGHS (ONES * (UCHAR_MAX / 2 + 1)) +#define HASZERO(x) (((x)-ONES) & ~(x)&HIGHS) -void *memchr(const void *src, int c, size_t n) +void * +memchr(const void *src, int c, size_t n) { const unsigned char *s = src; c = (unsigned char)c; #ifdef __GNUC__ - for (; ((uintptr_t)s & ALIGN) && n && *s != c; s++, n--); + for (; ((uintptr_t)s & ALIGN) && n && *s != c; s++, n--) + ; if (n && *s != c) { typedef size_t __attribute__((__may_alias__)) word; const word *w; size_t k = ONES * c; - for (w = (const void *)s; n>=SS && !HASZERO(*w^k); w++, n-=SS); + for (w = (const void *)s; n >= SS && !HASZERO(*w ^ k); + w++, n -= SS) + ; s = (const void *)w; } #endif - for (; n && *s != c; s++, n--); + for (; n && *s != c; s++, n--) + ; return n ? (void *)s : 0; } diff --git a/lib/libc/string/memmem.c b/lib/libc/string/memmem.c index e0a65a6a3f91..27863b9db623 100644 --- a/lib/libc/string/memmem.c +++ b/lib/libc/string/memmem.c @@ -25,40 +25,47 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include -static char *twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) +static char * +twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) { - uint16_t nw = n[0]<<8 | n[1], hw = h[0]<<8 | h[1]; - for (h+=2, k-=2; k; k--, hw = hw<<8 | *h++) - if (hw == nw) return (char *)h-2; - return hw == nw ? (char *)h-2 : 0; + uint16_t nw = n[0] << 8 | n[1], hw = h[0] << 8 | h[1]; + for (h += 2, k -= 2; k; k--, hw = hw << 8 | *h++) + if (hw == nw) + return (char *)h - 2; + return hw == nw ? (char *)h - 2 : 0; } -static char *threebyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) +static char * +threebyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) { - uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8; - uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8; - for (h+=3, k-=3; k; k--, hw = (hw|*h++)<<8) - if (hw == nw) return (char *)h-3; - return hw == nw ? (char *)h-3 : 0; + uint32_t nw = n[0] << 24 | n[1] << 16 | n[2] << 8; + uint32_t hw = h[0] << 24 | h[1] << 16 | h[2] << 8; + for (h += 3, k -= 3; k; k--, hw = (hw | *h++) << 8) + if (hw == nw) + return (char *)h - 3; + return hw == nw ? (char *)h - 3 : 0; } -static char *fourbyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) +static char * +fourbyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) { - uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3]; - uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8 | h[3]; - for (h+=4, k-=4; k; k--, hw = hw<<8 | *h++) - if (hw == nw) return (char *)h-4; - return hw == nw ? (char *)h-4 : 0; + uint32_t nw = n[0] << 24 | n[1] << 16 | n[2] << 8 | n[3]; + uint32_t hw = h[0] << 24 | h[1] << 16 | h[2] << 8 | h[3]; + for (h += 4, k -= 4; k; k--, hw = hw << 8 | *h++) + if (hw == nw) + return (char *)h - 4; + return hw == nw ? (char *)h - 4 : 0; } -#define MAX(a,b) ((a)>(b)?(a):(b)) -#define MIN(a,b) ((a)<(b)?(a):(b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define BITOP(a,b,op) \ - ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a)))) +#define BITOP(a, b, op) \ + ((a)[(size_t)(b) / (8 * sizeof *(a))] op \ + (size_t)1 << ((size_t)(b) % (8 * sizeof *(a)))) /* * Two Way string search algorithm, with a bad shift table applied to the last @@ -68,25 +75,30 @@ static char *fourbyte_memmem(const unsigned char *h, size_t k, const unsigned ch * Reference: CROCHEMORE M., PERRIN D., 1991, Two-way string-matching, * Journal of the ACM 38(3):651-675 */ -static char *twoway_memmem(const unsigned char *h, const unsigned char *z, const unsigned char *n, size_t l) +static char * +twoway_memmem(const unsigned char *h, const unsigned char *z, + const unsigned char *n, size_t l) { size_t i, ip, jp, k, p, ms, p0, mem, mem0; size_t byteset[32 / sizeof(size_t)] = { 0 }; size_t shift[256]; /* Computing length of needle and fill shift table */ - for (i=0; i n[jp+k]) { + } else + k++; + } else if (n[ip + k] > n[jp + k]) { jp += k; k = 1; p = jp - ip; @@ -99,14 +111,17 @@ static char *twoway_memmem(const unsigned char *h, const unsigned char *z, const p0 = p; /* And with the opposite comparison */ - ip = -1; jp = 0; k = p = 1; - while (jp+k ms+1) ms = ip; - else p = p0; + if (ip + 1 > ms + 1) + ms = ip; + else + p = p0; /* Periodic needle? */ - if (memcmp(n, n+p, ms+1)) { + if (memcmp(n, n + p, ms + 1)) { mem0 = 0; - p = MAX(ms, l-ms-1) + 1; - } else mem0 = l-p; + p = MAX(ms, l - ms - 1) + 1; + } else + mem0 = l - p; mem = 0; /* Search loop */ for (;;) { /* If remainder of haystack is shorter than needle, done */ - if (z-h < l) return 0; + if (z - h < l) + return 0; /* Check last byte first; advance by shift on mismatch */ - if (BITOP(byteset, h[l-1], &)) { - k = l-shift[h[l-1]]; + if (BITOP(byteset, h[l - 1], &)) { + k = l - shift[h[l - 1]]; if (k) { - if (mem0 && mem && k < p) k = l-p; + if (mem0 && mem && k < p) + k = l - p; h += k; mem = 0; continue; @@ -146,38 +166,49 @@ static char *twoway_memmem(const unsigned char *h, const unsigned char *z, const } /* Compare right half */ - for (k=MAX(ms+1,mem); kmem && n[k-1] == h[k-1]; k--); - if (k <= mem) return (char *)h; + for (k = ms + 1; k > mem && n[k - 1] == h[k - 1]; k--) + ; + if (k <= mem) + return (char *)h; h += p; mem = mem0; } } -void *memmem(const void *h0, size_t k, const void *n0, size_t l) +void * +memmem(const void *h0, size_t k, const void *n0, size_t l) { const unsigned char *h = h0, *n = n0; /* Return immediately on empty needle */ - if (!l) return (void *)h; + if (!l) + return (void *)h; /* Return immediately when needle is longer than haystack */ - if (k __FBSDID("$FreeBSD$"); -#include #include +#include -static char *twobyte_strstr(const unsigned char *h, const unsigned char *n) +static char * +twobyte_strstr(const unsigned char *h, const unsigned char *n) { - uint16_t nw = n[0]<<8 | n[1], hw = h[0]<<8 | h[1]; - for (h++; *h && hw != nw; hw = hw<<8 | *++h); - return *h ? (char *)h-1 : 0; + uint16_t nw = n[0] << 8 | n[1], hw = h[0] << 8 | h[1]; + for (h++; *h && hw != nw; hw = hw << 8 | *++h) + ; + return *h ? (char *)h - 1 : 0; } -static char *threebyte_strstr(const unsigned char *h, const unsigned char *n) +static char * +threebyte_strstr(const unsigned char *h, const unsigned char *n) { - uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8; - uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8; - for (h+=2; *h && hw != nw; hw = (hw|*++h)<<8); - return *h ? (char *)h-2 : 0; + uint32_t nw = n[0] << 24 | n[1] << 16 | n[2] << 8; + uint32_t hw = h[0] << 24 | h[1] << 16 | h[2] << 8; + for (h += 2; *h && hw != nw; hw = (hw | *++h) << 8) + ; + return *h ? (char *)h - 2 : 0; } -static char *fourbyte_strstr(const unsigned char *h, const unsigned char *n) +static char * +fourbyte_strstr(const unsigned char *h, const unsigned char *n) { - uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3]; - uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8 | h[3]; - for (h+=3; *h && hw != nw; hw = hw<<8 | *++h); - return *h ? (char *)h-3 : 0; + uint32_t nw = n[0] << 24 | n[1] << 16 | n[2] << 8 | n[3]; + uint32_t hw = h[0] << 24 | h[1] << 16 | h[2] << 8 | h[3]; + for (h += 3; *h && hw != nw; hw = hw << 8 | *++h) + ; + return *h ? (char *)h - 3 : 0; } -#define MAX(a,b) ((a)>(b)?(a):(b)) -#define MIN(a,b) ((a)<(b)?(a):(b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define BITOP(a,b,op) \ - ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a)))) +#define BITOP(a, b, op) \ + ((a)[(size_t)(b) / (8 * sizeof *(a))] op \ + (size_t)1 << ((size_t)(b) % (8 * sizeof *(a)))) /* * Two Way string search algorithm, with a bad shift table applied to the last @@ -65,7 +72,8 @@ static char *fourbyte_strstr(const unsigned char *h, const unsigned char *n) * Reference: CROCHEMORE M., PERRIN D., 1991, Two-way string-matching, * Journal of the ACM 38(3):651-675 */ -static char *twoway_strstr(const unsigned char *h, const unsigned char *n) +static char * +twoway_strstr(const unsigned char *h, const unsigned char *n) { const unsigned char *z; size_t l, ip, jp, k, p, ms, p0, mem, mem0; @@ -73,19 +81,23 @@ static char *twoway_strstr(const unsigned char *h, const unsigned char *n) size_t shift[256]; /* Computing length of needle and fill shift table */ - for (l=0; n[l] && h[l]; l++) - BITOP(byteset, n[l], |=), shift[n[l]] = l+1; - if (n[l]) return 0; /* hit the end of h */ + for (l = 0; n[l] && h[l]; l++) + BITOP(byteset, n[l], |=), shift[n[l]] = l + 1; + if (n[l]) + return 0; /* hit the end of h */ /* Compute maximal suffix */ - ip = -1; jp = 0; k = p = 1; - while (jp+k n[jp+k]) { + } else + k++; + } else if (n[ip + k] > n[jp + k]) { jp += k; k = 1; p = jp - ip; @@ -98,14 +110,17 @@ static char *twoway_strstr(const unsigned char *h, const unsigned char *n) p0 = p; /* And with the opposite comparison */ - ip = -1; jp = 0; k = p = 1; - while (jp+k ms+1) ms = ip; - else p = p0; + if (ip + 1 > ms + 1) + ms = ip; + else + p = p0; /* Periodic needle? */ - if (memcmp(n, n+p, ms+1)) { + if (memcmp(n, n + p, ms + 1)) { mem0 = 0; - p = MAX(ms, l-ms-1) + 1; - } else mem0 = l-p; + p = MAX(ms, l - ms - 1) + 1; + } else + mem0 = l - p; mem = 0; /* Initialize incremental end-of-haystack pointer */ @@ -130,21 +148,24 @@ static char *twoway_strstr(const unsigned char *h, const unsigned char *n) /* Search loop */ for (;;) { /* Update incremental end-of-haystack pointer */ - if (z-h < l) { + if (z - h < l) { /* Fast estimate for MIN(l,63) */ size_t grow = l | 63; const unsigned char *z2 = memchr(z, 0, grow); if (z2) { z = z2; - if (z-h < l) return 0; - } else z += grow; + if (z - h < l) + return 0; + } else + z += grow; } /* Check last byte first; advance by shift on mismatch */ - if (BITOP(byteset, h[l-1], &)) { - k = l-shift[h[l-1]]; + if (BITOP(byteset, h[l - 1], &)) { + k = l - shift[h[l - 1]]; if (k) { - if (k < mem) k = mem; + if (k < mem) + k = mem; h += k; mem = 0; continue; @@ -156,34 +177,46 @@ static char *twoway_strstr(const unsigned char *h, const unsigned char *n) } /* Compare right half */ - for (k=MAX(ms+1,mem); n[k] && n[k] == h[k]; k++); + for (k = MAX(ms + 1, mem); n[k] && n[k] == h[k]; k++) + ; if (n[k]) { - h += k-ms; + h += k - ms; mem = 0; continue; } /* Compare left half */ - for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--); - if (k <= mem) return (char *)h; + for (k = ms + 1; k > mem && n[k - 1] == h[k - 1]; k--) + ; + if (k <= mem) + return (char *)h; h += p; mem = mem0; } } -char *strstr(const char *h, const char *n) +char * +strstr(const char *h, const char *n) { /* Return immediately on empty needle */ - if (!n[0]) return (char *)h; + if (!n[0]) + return (char *)h; /* Use faster algorithms for short needles */ h = strchr(h, *n); - if (!h || !n[1]) return (char *)h; - if (!h[1]) return 0; - if (!n[2]) return twobyte_strstr((void *)h, (void *)n); - if (!h[2]) return 0; - if (!n[3]) return threebyte_strstr((void *)h, (void *)n); - if (!h[3]) return 0; - if (!n[4]) return fourbyte_strstr((void *)h, (void *)n); + if (!h || !n[1]) + return (char *)h; + if (!h[1]) + return 0; + if (!n[2]) + return twobyte_strstr((void *)h, (void *)n); + if (!h[2]) + return 0; + if (!n[3]) + return threebyte_strstr((void *)h, (void *)n); + if (!h[3]) + return 0; + if (!n[4]) + return fourbyte_strstr((void *)h, (void *)n); return twoway_strstr((void *)h, (void *)n); } From owner-dev-commits-src-all@freebsd.org Fri Jan 15 14:26:56 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F09BE4E6AB8; Fri, 15 Jan 2021 14:26: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 4DHNmJ6Y2Xz51Cf; Fri, 15 Jan 2021 14:26: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 D45631D9DE; Fri, 15 Jan 2021 14:26: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 10FEQuqL013709; Fri, 15 Jan 2021 14:26:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FEQuD1013708; Fri, 15 Jan 2021 14:26:56 GMT (envelope-from git) Date: Fri, 15 Jan 2021 14:26:56 GMT Message-Id: <202101151426.10FEQuD1013708@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: 13bc5a7358e5 - stable/12 - libc: optimize memmem two-way bad character shift 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: 13bc5a7358e5a39feec12b77b097c70dd111305e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 14:26:57 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=13bc5a7358e5a39feec12b77b097c70dd111305e commit 13bc5a7358e5a39feec12b77b097c70dd111305e Author: Ed Maste AuthorDate: 2020-11-19 00:02:12 +0000 Commit: Ed Maste CommitDate: 2021-01-15 14:25:35 +0000 libc: optimize memmem two-way bad character shift first, the condition (mem && k < p) is redundant, because mem being nonzero implies the needle is periodic with period exactly p, in which case any byte that appears in the needle must appear in the last p bytes of the needle, bounding the shift (k) by p. second, the whole point of replacing the shift k by mem (=l-p) is to prevent shifting by less than mem when discarding the memory on shift, in which case linear time could not be guaranteed. but as written, the check also replaced shifts greater than mem by mem, reducing the benefit of the shift. there is no possible benefit to this reduction of the shift; since mem is being cleared, the full shift is valid and more optimal. so only replace the shift by mem when it would be less than mem. musl commits: 8f5a820d147da36bcdbddd201b35d293699dacd8 122d67f846cb0be2c9e1c3880db9eb9545bbe38c Obtained from: musl (cherry picked from commit 7dbcd06e63101d51e6a777f7315cfde794411e53) --- lib/libc/string/memmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/string/memmem.c b/lib/libc/string/memmem.c index 27863b9db623..9e7bf94b1464 100644 --- a/lib/libc/string/memmem.c +++ b/lib/libc/string/memmem.c @@ -153,8 +153,8 @@ twoway_memmem(const unsigned char *h, const unsigned char *z, if (BITOP(byteset, h[l - 1], &)) { k = l - shift[h[l - 1]]; if (k) { - if (mem0 && mem && k < p) - k = l - p; + if (k < mem) + k = mem; h += k; mem = 0; continue; From owner-dev-commits-src-all@freebsd.org Fri Jan 15 14:26:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6EA664E731A; Fri, 15 Jan 2021 14:26: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 4DHNmL1Y4jz5128; Fri, 15 Jan 2021 14:26: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 08DB21D9DF; Fri, 15 Jan 2021 14:26: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 10FEQvbL013728; Fri, 15 Jan 2021 14: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 10FEQvqE013727; Fri, 15 Jan 2021 14:26:57 GMT (envelope-from git) Date: Fri, 15 Jan 2021 14:26:57 GMT Message-Id: <202101151426.10FEQvqE013727@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: 56880a501396 - stable/12 - libc: fix undefined behavior from signed overflow in strstr and memmem 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: 56880a50139647318a123d67fe459ca840351729 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 14:26:59 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=56880a50139647318a123d67fe459ca840351729 commit 56880a50139647318a123d67fe459ca840351729 Author: Ed Maste AuthorDate: 2020-11-19 00:03:15 +0000 Commit: Ed Maste CommitDate: 2021-01-15 14:25:35 +0000 libc: fix undefined behavior from signed overflow in strstr and memmem unsigned char promotes to int, which can overflow when shifted left by 24 bits or more. this has been reported multiple times but then forgotten. it's expected to be benign UB, but can trap when built with explicit overflow catching (ubsan or similar). fix it now. note that promotion to uint32_t is safe and portable even outside of the assumptions usually made in musl, since either uint32_t has rank at least unsigned int, so that no further default promotions happen, or int is wide enough that the shift can't overflow. this is a desirable property to have in case someone wants to reuse the code elsewhere. musl commit: 593caa456309714402ca4cb77c3770f4c24da9da Obtained from: musl (cherry picked from commit 33482dae89c26158a22ccb3b7f2ca6e6652f29b4) --- lib/libc/string/memmem.c | 8 ++++---- lib/libc/string/strstr.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libc/string/memmem.c b/lib/libc/string/memmem.c index 9e7bf94b1464..be52763e2652 100644 --- a/lib/libc/string/memmem.c +++ b/lib/libc/string/memmem.c @@ -41,8 +41,8 @@ twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) static char * threebyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) { - uint32_t nw = n[0] << 24 | n[1] << 16 | n[2] << 8; - uint32_t hw = h[0] << 24 | h[1] << 16 | h[2] << 8; + uint32_t nw = (uint32_t)n[0] << 24 | n[1] << 16 | n[2] << 8; + uint32_t hw = (uint32_t)h[0] << 24 | h[1] << 16 | h[2] << 8; for (h += 3, k -= 3; k; k--, hw = (hw | *h++) << 8) if (hw == nw) return (char *)h - 3; @@ -52,8 +52,8 @@ threebyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) static char * fourbyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) { - uint32_t nw = n[0] << 24 | n[1] << 16 | n[2] << 8 | n[3]; - uint32_t hw = h[0] << 24 | h[1] << 16 | h[2] << 8 | h[3]; + uint32_t nw = (uint32_t)n[0] << 24 | n[1] << 16 | n[2] << 8 | n[3]; + uint32_t hw = (uint32_t)h[0] << 24 | h[1] << 16 | h[2] << 8 | h[3]; for (h += 4, k -= 4; k; k--, hw = hw << 8 | *h++) if (hw == nw) return (char *)h - 4; diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c index d726aff1f1c3..72f8abb9e200 100644 --- a/lib/libc/string/strstr.c +++ b/lib/libc/string/strstr.c @@ -40,8 +40,8 @@ twobyte_strstr(const unsigned char *h, const unsigned char *n) static char * threebyte_strstr(const unsigned char *h, const unsigned char *n) { - uint32_t nw = n[0] << 24 | n[1] << 16 | n[2] << 8; - uint32_t hw = h[0] << 24 | h[1] << 16 | h[2] << 8; + uint32_t nw = (uint32_t)n[0] << 24 | n[1] << 16 | n[2] << 8; + uint32_t hw = (uint32_t)h[0] << 24 | h[1] << 16 | h[2] << 8; for (h += 2; *h && hw != nw; hw = (hw | *++h) << 8) ; return *h ? (char *)h - 2 : 0; @@ -50,8 +50,8 @@ threebyte_strstr(const unsigned char *h, const unsigned char *n) static char * fourbyte_strstr(const unsigned char *h, const unsigned char *n) { - uint32_t nw = n[0] << 24 | n[1] << 16 | n[2] << 8 | n[3]; - uint32_t hw = h[0] << 24 | h[1] << 16 | h[2] << 8 | h[3]; + uint32_t nw = (uint32_t)n[0] << 24 | n[1] << 16 | n[2] << 8 | n[3]; + uint32_t hw = (uint32_t)h[0] << 24 | h[1] << 16 | h[2] << 8 | h[3]; for (h += 3; *h && hw != nw; hw = hw << 8 | *++h) ; return *h ? (char *)h - 3 : 0; From owner-dev-commits-src-all@freebsd.org Fri Jan 15 14:27:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25EDE4E731D; Fri, 15 Jan 2021 14:27: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 4DHNmP51pTz51LL; Fri, 15 Jan 2021 14:27: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 518301DB79; Fri, 15 Jan 2021 14:27: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 10FER02E013772; Fri, 15 Jan 2021 14:27:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FER076013771; Fri, 15 Jan 2021 14:27:00 GMT (envelope-from git) Date: Fri, 15 Jan 2021 14:27:00 GMT Message-Id: <202101151427.10FER076013771@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: c586a84d56f3 - stable/12 - cmp: use C99 bool for flags 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: c586a84d56f37eee73d880172ec7f2a8152e58ab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 14:27:02 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c586a84d56f37eee73d880172ec7f2a8152e58ab commit c586a84d56f37eee73d880172ec7f2a8152e58ab Author: Ed Maste AuthorDate: 2021-01-11 00:02:55 +0000 Commit: Ed Maste CommitDate: 2021-01-15 14:25:36 +0000 cmp: use C99 bool for flags Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28072 (cherry picked from commit 1f7661742de650bcb6b9124ee3da7e94c8650c4b) --- usr.bin/cmp/cmp.c | 27 ++++++++++++++------------- usr.bin/cmp/extern.h | 2 +- usr.bin/cmp/link.c | 1 + usr.bin/cmp/misc.c | 1 + 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index e1f9fb6823ef..c762f1346abf 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" -int lflag, sflag, xflag, zflag; +bool lflag, sflag, xflag, zflag; static const struct option long_opts[] = { @@ -77,7 +77,8 @@ main(int argc, char *argv[]) { struct stat sb1, sb2; off_t skip1, skip2; - int ch, fd1, fd2, oflag, special; + int ch, fd1, fd2, oflag; + bool special; const char *file1, *file2; oflag = O_RDONLY; @@ -87,18 +88,18 @@ main(int argc, char *argv[]) oflag |= O_NOFOLLOW; break; case 'l': /* print all differences */ - lflag = 1; + lflag = true; break; case 's': /* silent run */ - sflag = 1; - zflag = 1; + sflag = true; + zflag = true; break; case 'x': /* hex output */ - lflag = 1; - xflag = 1; + lflag = true; + xflag = true; break; case 'z': /* compare size first */ - zflag = 1; + zflag = true; break; case '?': default: @@ -120,9 +121,9 @@ main(int argc, char *argv[]) err(ERR_EXIT, "unable to limit rights on stderr"); /* Backward compatibility -- handle "-" meaning stdin. */ - special = 0; + special = false; if (strcmp(file1 = argv[0], "-") == 0) { - special = 1; + special = true; fd1 = STDIN_FILENO; file1 = "stdin"; } else if ((fd1 = open(file1, oflag, 0)) < 0 && errno != EMLINK) { @@ -135,7 +136,7 @@ main(int argc, char *argv[]) if (special) errx(ERR_EXIT, "standard input may only be specified once"); - special = 1; + special = true; fd2 = STDIN_FILENO; file2 = "stdin"; } else if ((fd2 = open(file2, oflag, 0)) < 0 && errno != EMLINK) { @@ -174,7 +175,7 @@ main(int argc, char *argv[]) exit(ERR_EXIT); } if (!S_ISREG(sb1.st_mode)) - special = 1; + special = true; else { if (fstat(fd2, &sb2)) { if (!sflag) @@ -183,7 +184,7 @@ main(int argc, char *argv[]) exit(ERR_EXIT); } if (!S_ISREG(sb2.st_mode)) - special = 1; + special = true; } } diff --git a/usr.bin/cmp/extern.h b/usr.bin/cmp/extern.h index 84507b1929dc..82c5ea42b175 100644 --- a/usr.bin/cmp/extern.h +++ b/usr.bin/cmp/extern.h @@ -44,4 +44,4 @@ void c_special(int, const char *, off_t, int, const char *, off_t); void diffmsg(const char *, const char *, off_t, off_t); void eofmsg(const char *); -extern int lflag, sflag, xflag, zflag; +extern bool lflag, sflag, xflag, zflag; diff --git a/usr.bin/cmp/link.c b/usr.bin/cmp/link.c index 3aecf4f10738..9193147e830e 100644 --- a/usr.bin/cmp/link.c +++ b/usr.bin/cmp/link.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/usr.bin/cmp/misc.c b/usr.bin/cmp/misc.c index a99ab4facb73..1e84f0d7a527 100644 --- a/usr.bin/cmp/misc.c +++ b/usr.bin/cmp/misc.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include From owner-dev-commits-src-all@freebsd.org Fri Jan 15 14:27:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CB264E6AD6; Fri, 15 Jan 2021 14:27: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 4DHNmN1X0bz516X; Fri, 15 Jan 2021 14:26: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 316721DF17; Fri, 15 Jan 2021 14:26:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10FEQxPP013750; Fri, 15 Jan 2021 14:26:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FEQxZh013749; Fri, 15 Jan 2021 14:26:59 GMT (envelope-from git) Date: Fri, 15 Jan 2021 14:26:59 GMT Message-Id: <202101151426.10FEQxZh013749@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: 7366c22508e9 - stable/12 - diff: honour flags with -q 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: 7366c22508e98357a17664b683841b47d268b5f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 14:27:01 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7366c22508e98357a17664b683841b47d268b5f8 commit 7366c22508e98357a17664b683841b47d268b5f8 Author: Ed Maste AuthorDate: 2021-01-09 16:22:28 +0000 Commit: Ed Maste CommitDate: 2021-01-15 14:25:35 +0000 diff: honour flags with -q Previously -q (just print a line when files differ) ignored flags like -w (ignore whitespace). Avoid the D_BRIEF short-circuit when flags are in effect. PR: 252515 Reported by: Scott Aitken Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28064 (cherry picked from commit 12a8d3027d414abd15798de1b6d8b01151bdac50) --- usr.bin/diff/diffreg.c | 4 +++- usr.bin/diff/tests/diff_test.sh | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 74c0df7dce30..7d2b20b43def 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -369,7 +369,9 @@ diffreg(char *file1, char *file2, int flags, int capsicum) goto closem; } - if (diff_format == D_BRIEF && ignore_pats == NULL) { + if (diff_format == D_BRIEF && ignore_pats == NULL && + (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE|D_STRIPCR)) == 0) + { rval = D_DIFFER; status |= 1; goto closem; diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 9f460231f480..7ee88d1fe607 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -9,6 +9,7 @@ atf_test_case group_format atf_test_case side_by_side atf_test_case brief_format atf_test_case b230049 +atf_test_case b252515 atf_test_case Bflag atf_test_case Nflag atf_test_case tabsize @@ -65,6 +66,14 @@ b230049_body() b230049_a.in b230049_b.in } +b252515_body() +{ + printf 'a b\n' > b252515_a.in + printf 'a b\n' > b252515_b.in + atf_check -o empty -s eq:0 \ + diff -qw b252515_a.in b252515_b.in +} + header_body() { export TZ=UTC @@ -228,6 +237,7 @@ atf_init_test_cases() atf_add_test_case side_by_side atf_add_test_case brief_format atf_add_test_case b230049 + atf_add_test_case b252515 atf_add_test_case Bflag atf_add_test_case Nflag atf_add_test_case tabsize From owner-dev-commits-src-all@freebsd.org Fri Jan 15 14:27:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F96C4E71E4; Fri, 15 Jan 2021 14:27: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 4DHNmQ6nRBz51LP; Fri, 15 Jan 2021 14:27: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 605A21D9E0; Fri, 15 Jan 2021 14:27: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 10FER18k013790; Fri, 15 Jan 2021 14:27:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FER1KJ013789; Fri, 15 Jan 2021 14:27:01 GMT (envelope-from git) Date: Fri, 15 Jan 2021 14:27:01 GMT Message-Id: <202101151427.10FER1KJ013789@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: 23b5fa56a182 - stable/12 - cmp: fix -s (silent) when used with skip offsets 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: 23b5fa56a182574fef416caeb55e6c735087e411 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 14:27:03 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=23b5fa56a182574fef416caeb55e6c735087e411 commit 23b5fa56a182574fef416caeb55e6c735087e411 Author: Ed Maste AuthorDate: 2021-01-11 00:02:56 +0000 Commit: Ed Maste CommitDate: 2021-01-15 14:25:36 +0000 cmp: fix -s (silent) when used with skip offsets -s causes cmp to print nothing for differing files, for use when only the exit status is of interest. -z compares the file size first, for regular files, and fails the comparison early if they do not match. Prior to this change -s implied -z as an optimization, but this is not valid when file offsets are specified. Now, enable the -z optimization for -s only if both skip arguments are not provided / 0. Note that using -z with differing skip values will currently always fail. We may want to compare size1 - skip1 with size2 - skip2 instaead, and in any case the man page should be clarified. PR: 252542 Fixes: 3e6902efc802ab57fc4e9bf798f2d271b152e7f9 Reported by: William Ahern Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28071 (cherry picked from commit 80445b7a3f738e0b0a33ee7a11905a275346a6de) --- usr.bin/cmp/cmp.c | 4 +++- usr.bin/cmp/tests/cmp_test2.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index c762f1346abf..47f9b671985c 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -92,7 +92,6 @@ main(int argc, char *argv[]) break; case 's': /* silent run */ sflag = true; - zflag = true; break; case 'x': /* hex output */ lflag = true; @@ -149,6 +148,9 @@ main(int argc, char *argv[]) skip1 = argc > 2 ? strtol(argv[2], NULL, 0) : 0; skip2 = argc == 4 ? strtol(argv[3], NULL, 0) : 0; + if (sflag && skip1 == 0 && skip2 == 0) + zflag = true; + if (fd1 == -1) { if (fd2 == -1) { c_link(file1, skip1, file2, skip2); diff --git a/usr.bin/cmp/tests/cmp_test2.sh b/usr.bin/cmp/tests/cmp_test2.sh index 2b0d66382d36..7f9801fc92bd 100755 --- a/usr.bin/cmp/tests/cmp_test2.sh +++ b/usr.bin/cmp/tests/cmp_test2.sh @@ -62,8 +62,22 @@ symlink_body() { atf_check -s not-exit:0 -o ignore -e ignore cmp -h a.lnk adup.lnk } +atf_test_case pr252542 +pr252542_head() +{ + atf_set "descr" "Test cmp(1) -s with file offset skips" +} +pr252542_body() +{ + echo -n '1234567890' > a + echo -n 'abc567890' > b + atf_check -s exit:0 cmp -s a b 4 3 + atf_check -s exit:1 -o ignore cmp -z a b 4 3 +} + atf_init_test_cases() { atf_add_test_case special atf_add_test_case symlink + atf_add_test_case pr252542 } From owner-dev-commits-src-all@freebsd.org Fri Jan 15 14:54:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B3A34E831F; Fri, 15 Jan 2021 14:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHPMn0mFQz53cM; Fri, 15 Jan 2021 14:54: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 0D0451E691; Fri, 15 Jan 2021 14:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10FEsCPM051637; Fri, 15 Jan 2021 14:54:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FEsCwZ051636; Fri, 15 Jan 2021 14:54:12 GMT (envelope-from git) Date: Fri, 15 Jan 2021 14:54:12 GMT Message-Id: <202101151454.10FEsCwZ051636@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: 006e2b2b8285 - main - Add Intel Gemini Lake AHCI ID. 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: 006e2b2b8285842216ceb914a4cf828c89c2d7f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 14:54:13 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=006e2b2b8285842216ceb914a4cf828c89c2d7f7 commit 006e2b2b8285842216ceb914a4cf828c89c2d7f7 Author: Alexander Motin AuthorDate: 2021-01-15 14:53:35 +0000 Commit: Alexander Motin CommitDate: 2021-01-15 14:53:35 +0000 Add Intel Gemini Lake AHCI ID. Submitted by: Dmitry Luhtionov MFC after: 1 week --- sys/dev/ahci/ahci_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 51b1c68cb462..85dc3bf272be 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -184,6 +184,7 @@ static const struct { {0x1f3e8086, 0x00, "Intel Avoton (RAID)", 0}, {0x1f3f8086, 0x00, "Intel Avoton (RAID)", 0}, {0x23a38086, 0x00, "Intel Coleto Creek", 0}, + {0x31e38086, 0x00, "Intel Gemini Lake", 0}, {0x5ae38086, 0x00, "Intel Apollo Lake", 0}, {0x8c028086, 0x00, "Intel Lynx Point", 0}, {0x8c038086, 0x00, "Intel Lynx Point", 0}, From owner-dev-commits-src-all@freebsd.org Fri Jan 15 14:57:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6E6F4E8162; Fri, 15 Jan 2021 14:57: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 4DHPS15G2pz54CF; Fri, 15 Jan 2021 14: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 A75D71E66E; Fri, 15 Jan 2021 14: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 10FEvr2m052338; Fri, 15 Jan 2021 14: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 10FEvrug052337; Fri, 15 Jan 2021 14:57:53 GMT (envelope-from git) Date: Fri, 15 Jan 2021 14:57:53 GMT Message-Id: <202101151457.10FEvrug052337@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: 510cc421263f - main - Unify Intel CODEC naming. 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: 510cc421263fa807a72c9b4b8d9a4091a96d9648 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 14:57:53 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=510cc421263fa807a72c9b4b8d9a4091a96d9648 commit 510cc421263fa807a72c9b4b8d9a4091a96d9648 Author: Alexander Motin AuthorDate: 2021-01-15 14:56:15 +0000 Commit: Alexander Motin CommitDate: 2021-01-15 14:56:15 +0000 Unify Intel CODEC naming. Submitted by: Dmitry Luhtionov MFC after: 1 week --- sys/dev/sound/pci/hda/hdacc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index 002ef298590f..3b1ca7ea61e5 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -382,16 +382,16 @@ static const struct { { HDA_CODEC_INTELKBLK, 0, "Intel Kaby Lake" }, { HDA_CODEC_INTELJLK, 0, "Intel Jasper Lake" }, { HDA_CODEC_INTELELLK, 0, "Intel Elkhart Lake" }, - { HDA_CODEC_INTELCT, 0, "Intel CedarTrail" }, + { HDA_CODEC_INTELCT, 0, "Intel Cedar Trail" }, { HDA_CODEC_INTELVV2, 0, "Intel Valleyview2" }, { HDA_CODEC_INTELBR, 0, "Intel Braswell" }, { HDA_CODEC_INTELCL, 0, "Intel Crestline" }, { HDA_CODEC_INTELBXTN, 0, "Intel Broxton" }, - { HDA_CODEC_INTELCNLK, 0, "Intel Cannonlake" }, - { HDA_CODEC_INTELGMLK, 0, "Intel Geminilake" }, - { HDA_CODEC_INTELGMLK1, 0, "Intel Geminilake" }, - { HDA_CODEC_INTELICLK, 0, "Intel Icelake" }, - { HDA_CODEC_INTELTGLK, 0, "Intel Tigerlake" }, + { HDA_CODEC_INTELCNLK, 0, "Intel Cannon Lake" }, + { HDA_CODEC_INTELGMLK, 0, "Intel Gemini Lake" }, + { HDA_CODEC_INTELGMLK1, 0, "Intel Gemini Lake" }, + { HDA_CODEC_INTELICLK, 0, "Intel Ice Lake" }, + { HDA_CODEC_INTELTGLK, 0, "Intel Tiger Lake" }, { HDA_CODEC_SII1390, 0, "Silicon Image SiI1390" }, { HDA_CODEC_SII1392, 0, "Silicon Image SiI1392" }, /* Unknown CODECs */ From owner-dev-commits-src-all@freebsd.org Fri Jan 15 15:13:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBA7E4E8C5F; Fri, 15 Jan 2021 15:13:10 +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 4DHPnf6HGbz5599; Fri, 15 Jan 2021 15:13:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id CABF5F9F6; Fri, 15 Jan 2021 15:13:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f177.google.com with SMTP id b64so11902745qkc.12; Fri, 15 Jan 2021 07:13:10 -0800 (PST) X-Gm-Message-State: AOAM533xRta9vM03I9RrVwiMMXkE+E2GF6jjg6wXhHlJtUOnwdsq57Pk rZbO2XfFmCaFlmsB9CmjTUKhMsfRxKx491U+WUw= X-Google-Smtp-Source: ABdhPJzLNLFvhD7V7h5NS6/V//XO0dQADJ/aH2L84uVmn7RWNs29Eubzg7BQnFa99j95MoMfGjqiweYsFedsLDkxBPk= X-Received: by 2002:ae9:e517:: with SMTP id w23mr12823548qkf.34.1610723590369; Fri, 15 Jan 2021 07:13:10 -0800 (PST) MIME-Version: 1.0 References: <202101140558.10E5wMNW079125@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Fri, 15 Jan 2021 09:12:57 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0495ed398c4f - main - contrib/lua: update to 5.4.2 To: Mateusz Guzik Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Warner Losh Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 15:13:11 -0000 On Fri, Jan 15, 2021 at 7:06 AM Mateusz Guzik wrote: > > There is some garbage shown by the boot loader since this commit. > Screenshot from VirtualBox: > https://people.freebsd.org/~mjg/loader_artifact.png > > An additional fixup is needed to see it: > commit 0974bfa3a8da2201b0a415e72593552f5ac59379 (HEAD -> main, > freebsd/main, freebsd/HEAD) > Author: Toomas Soome > Date: Fri Jan 15 14:58:12 2021 +0200 > > loader: do not update palette in text mode (real fix) > > otherwise the screen is blank. > The patch below will fix it (assuming we're both looking at the "Welcome to FreeBSD" misposition + leading garbage); there's clearly an additional hack needed with Lua 5.4 to make sure that we don't get a "float" (of course it's floored because we can't do floating point here) from division, but this comes up so rarely that I'm not sure it's worth specifically hacking around. Notably, below is the only place that stock lualoader does arithmetic that results in a "float" and, IMHO, it really should be a floor division like this anyways to be more explicit that we're flooring it. I'll push something to fix it within a couple hours. CC imp@, I'm leaning towards just pushing the below and not hacking lua further, but a second opinion would be appreciated. diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 3ace3884ff8..6062d7e87a0 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -283,7 +283,7 @@ local function drawbox() end end if menu_header_x == nil then - menu_header_x = x + (w / 2) - (#menu_header / 2) + menu_header_x = x + (w // 2) - (#menu_header // 2) end screen.setcursor(menu_header_x, y) printc(menu_header) From owner-dev-commits-src-all@freebsd.org Fri Jan 15 15:21:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CA9B4E8E5C; Fri, 15 Jan 2021 15:21:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHPys2S0sz55hX; Fri, 15 Jan 2021 15:21:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x336.google.com with SMTP id c124so7686998wma.5; Fri, 15 Jan 2021 07:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=r1DikPeAbbC61jncLgrYmI0v9n3QpuWFwXL1XFc5Pnw=; b=vDJR+Llfa/kTK+j904Si2/cpDQJ93J046GOAQiRgLS+4hNhfvjMq80ZMz0s8Jg+8Sn EiVpswsibLTSxpXkipkycN4uk9Pmi0j/ezNRviYjFPHOuZhfhmbVX4WZIDy0asw7aOFi esA/57s5uncKBpTRKDsNZWOrfau+e/IhuuaF8xgU7dXx01VJtScKfeA/X2AOh9mVLRUX deeDU2RG9CTOBqePP2c7EgciHtsG71s95fdcbgI8i7jzi/fLrAbU/5Cmc36zlC1SCWsc RDUy29y5lXdQ/6zSfy1b2eEo9/N+wX0/JsH3Ym8uO9tUxf9q9Y8SUPubIPAVj6zw112c ttoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=r1DikPeAbbC61jncLgrYmI0v9n3QpuWFwXL1XFc5Pnw=; b=e2loXO2xAirP1oeV7IPMFxzU+EsujA442AQ/e1IzvE1LTd4zpbYF+7VOBZEGee/H1k 6Yxi60MTCON34QP5KyUHLgqhOCZQRIzgN7ZR6AaD75F0LjjK0VkqDdH2PkG8QvTpXjW1 HuJ198wRjtFm4Kz0ZKhRLdHj4vckNNDQ0a8Dk7UhxzTNZXz4PjLUcTPjr/KozrdrPvD5 E4V5+u/t8j/VuaSq052/urZbFERgQqaZuQAKpECcsHEFebWQOkoRCj+7HXLolvYFZAS8 SR8dzALNSsa4TiuyD/aQUAttH8VZtdNf+a5qq9oKIeLDP451wOn+Jt0AkKhH6Y88XWk7 Q/AQ== X-Gm-Message-State: AOAM532MYLlKafxEY8Dq4yDxQExMDW/WSgZKHo8qMWPBKatvot2A7KD1 L+dHiRH81omJ83q45EG5qiJVEztrpNaKmuo7JfuLcjNl X-Google-Smtp-Source: ABdhPJzzf9taLJgiT/TmeJs1438dJJlwiinaktpvihKs4CMq951rwMHjqT78s3o6k2R3sMmIFbDTd8HxJr7rbB970s8= X-Received: by 2002:a7b:c773:: with SMTP id x19mr8991331wmk.127.1610724067313; Fri, 15 Jan 2021 07:21:07 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Fri, 15 Jan 2021 07:21:06 -0800 (PST) In-Reply-To: References: <202101140558.10E5wMNW079125@gitrepo.freebsd.org> From: Mateusz Guzik Date: Fri, 15 Jan 2021 16:21:06 +0100 Message-ID: Subject: Re: git: 0495ed398c4f - main - contrib/lua: update to 5.4.2 To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Warner Losh Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DHPys2S0sz55hX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 15:21:09 -0000 I confirm this fixes it. On 1/15/21, Kyle Evans wrote: > On Fri, Jan 15, 2021 at 7:06 AM Mateusz Guzik wrote: >> >> There is some garbage shown by the boot loader since this commit. >> Screenshot from VirtualBox: >> https://people.freebsd.org/~mjg/loader_artifact.png >> >> An additional fixup is needed to see it: >> commit 0974bfa3a8da2201b0a415e72593552f5ac59379 (HEAD -> main, >> freebsd/main, freebsd/HEAD) >> Author: Toomas Soome >> Date: Fri Jan 15 14:58:12 2021 +0200 >> >> loader: do not update palette in text mode (real fix) >> >> otherwise the screen is blank. >> > > The patch below will fix it (assuming we're both looking at the > "Welcome to FreeBSD" misposition + leading garbage); there's clearly > an additional hack needed with Lua 5.4 to make sure that we don't get > a "float" (of course it's floored because we can't do floating point > here) from division, but this comes up so rarely that I'm not sure > it's worth specifically hacking around. Notably, below is the only > place that stock lualoader does arithmetic that results in a "float" > and, IMHO, it really should be a floor division like this anyways to > be more explicit that we're flooring it. > > I'll push something to fix it within a couple hours. CC imp@, I'm > leaning towards just pushing the below and not hacking lua further, > but a second opinion would be appreciated. > > diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua > index 3ace3884ff8..6062d7e87a0 100644 > --- a/stand/lua/drawer.lua > +++ b/stand/lua/drawer.lua > @@ -283,7 +283,7 @@ local function drawbox() > end > end > if menu_header_x == nil then > - menu_header_x = x + (w / 2) - (#menu_header / 2) > + menu_header_x = x + (w // 2) - (#menu_header // 2) > end > screen.setcursor(menu_header_x, y) > printc(menu_header) > -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Fri Jan 15 15:27:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E53434E9503; Fri, 15 Jan 2021 15:27:00 +0000 (UTC) (envelope-from danfe@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 4DHQ5c6Dpvz56QC; Fri, 15 Jan 2021 15:27:00 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1610724420; 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=e4cwWQ838M8p7zq5UY7+D8WcRW4ypob7UVQ5jYbjkrM=; b=xlGad4mqUVP1VFk50ZII1H7f94H94tV8DG5CP2IMiczytYztst3agYWN3iwg8Ymc1c5CP9 M4mhZw98sNIzwiR7xq/W7jkediNkqPit34BXkGMmr3fu3rGd+jGwC62H53jktYOogYkQOr AwT1TCYvJoBw3TYxa1vZj9/iutQ4aYkk/Ff2olMsfihfoucahQB8ZS0OjBYeZl3FI8RMDt xL3lKHV8TtY4lwoJfeA130Es///vkhov1sGMO2Twql7mz87yTRDIr8lTGdBMNWHzQD+pG5 83fiCXNAf66rR/Ye2uapB/TCbbwPaKzNTYkPH85kcR4wtKK8PazydohlfDZtqw== Received: by freefall.freebsd.org (Postfix, from userid 1033) id BE6206A30; Fri, 15 Jan 2021 15:27:00 +0000 (UTC) Date: Fri, 15 Jan 2021 15:27:00 +0000 From: Alexey Dokuchaev To: Kyle Evans Cc: Mateusz Guzik , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Warner Losh Subject: Re: git: 0495ed398c4f - main - contrib/lua: update to 5.4.2 Message-ID: <20210115152700.GA85455@FreeBSD.org> References: <202101140558.10E5wMNW079125@gitrepo.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=1610724420; 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=e4cwWQ838M8p7zq5UY7+D8WcRW4ypob7UVQ5jYbjkrM=; b=J4iWWfgGey3Y3oYtZILLdybXC8ps6BJzUnvKOdNKcLqR+r+MPVrhaiJaIbRXoacHsIxFb8 O4soBD99WWM6Qq68E8uoV38lnGa6+6sIwV0CV+Iso5uQaeG3HT5o95bBVhUqcfAIXPCT8g iNt0Ztnu2aJ40e0ocClL/4wOgtpX7soxtMaFKp+Oov5mctPfxbryWLU6axJoY3qo3iSxwe X+KXZ3AZpcB9XlvL0TgT6fhkjiZMWRRuZVtv12YbBGe3eBp//uJqG4e+Wel4z0JXtVbiV+ ZbdhPsVIJZGr6ne1qVo0IgtCdNkysT+3rRw/3xDiY7IIUmjy/TIUz7INxjEKNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1610724420; a=rsa-sha256; cv=none; b=h7C+IYMB2fn/4G9JhdncaPqoPoSt8aUd5sC4vIUbYExS4EHxwI3vBB26MbSH6Ov85ZvkKH NJs/YlWVuEd+L5J+zdliDNDkSKvi7V5MBYpHUDcy1aHoR4qhYzIeDqFhygBIoJAZj3UBZu Ql99m6443w7iFSJiPgJr8grsarLS9RNMBadA8tjZ/8jqVNSOnc6ugafu9Hr6UaOSNdAGUl Sh6gGvQUCqBbe+kFL1uOCuz8enTa4NOc/Fs+0uBd51E9F9JUc/u8mdmIr95OTXMXbeEgC3 REs8a1ACBtw/BY/ZDI7r4dlOJNlFn+kySs+yCzKoY/MgDk7//kVKYYhEaf8rpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 15:27:01 -0000 On Fri, Jan 15, 2021 at 09:12:57AM -0600, Kyle Evans wrote: > On Fri, Jan 15, 2021 at 7:06 AM Mateusz Guzik wrote: > > > > There is some garbage shown by the boot loader since this commit. > > Screenshot from VirtualBox: > > https://people.freebsd.org/~mjg/loader_artifact.png > > > > An additional fixup is needed to see it: > > commit 0974bfa3a8da2201b0a415e72593552f5ac59379 (HEAD -> main, > > freebsd/main, freebsd/HEAD) > > Author: Toomas Soome > > Date: Fri Jan 15 14:58:12 2021 +0200 > > > > loader: do not update palette in text mode (real fix) > > > > otherwise the screen is blank. > > > > The patch below will fix it (assuming we're both looking at the > "Welcome to FreeBSD" misposition + leading garbage); there's clearly Does it also fix the missing whitespace padding on the left of the "Welcome to FreeBSD" string frame title (I've seen screenshot where it is correctly padded on the right, but not on the left)? ./danfe From owner-dev-commits-src-all@freebsd.org Fri Jan 15 16:11:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B891E4EA931; Fri, 15 Jan 2021 16:11: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 4DHR5D4wsXz3Bqc; Fri, 15 Jan 2021 16:11: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 9C9F71F1C9; Fri, 15 Jan 2021 16:11: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 10FGBirL053134; Fri, 15 Jan 2021 16:11:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FGBi9Q053133; Fri, 15 Jan 2021 16:11:44 GMT (envelope-from git) Date: Fri, 15 Jan 2021 16:11:44 GMT Message-Id: <202101151611.10FGBi9Q053133@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: 0b92d1dd18c1 - main - riscv: fix kernel build 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: 0b92d1dd18c148740cf00b985e8641ad1670ba87 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 16:11:44 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0b92d1dd18c148740cf00b985e8641ad1670ba87 commit 0b92d1dd18c148740cf00b985e8641ad1670ba87 Author: Mitchell Horne AuthorDate: 2021-01-15 15:41:51 +0000 Commit: Mitchell Horne CommitDate: 2021-01-15 15:57:04 +0000 riscv: fix kernel build A more complete fix for this function is being worked on in D28054. Fix the uninitialized variable error so that builds can at least proceed. Reported by: several --- sys/cddl/dev/dtrace/riscv/dtrace_isa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c index aab6797be9b3..f8663b5bfeab 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c @@ -122,6 +122,7 @@ dtrace_getustack_common(uint64_t *pcstack, int pcstack_limit, uintptr_t pc, uintptr_t oldfp; int ret; + oldfp = fp; ret = 0; flags = (volatile uint16_t *)&cpu_core[curcpu].cpuc_dtrace_flags; @@ -157,6 +158,7 @@ dtrace_getustack_common(uint64_t *pcstack, int pcstack_limit, uintptr_t pc, cpu_core[curcpu].cpuc_dtrace_illval = fp; break; } + oldfp = fp; } return (ret); From owner-dev-commits-src-all@freebsd.org Fri Jan 15 19:10:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB8F34EFAA3; Fri, 15 Jan 2021 19: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 4DHW356N8hz3QVK; Fri, 15 Jan 2021 19: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 CDFAB217B3; Fri, 15 Jan 2021 19: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 10FJA9HJ078656; Fri, 15 Jan 2021 19: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 10FJA9Xi078654; Fri, 15 Jan 2021 19:10:09 GMT (envelope-from git) Date: Fri, 15 Jan 2021 19:10:09 GMT Message-Id: <202101151910.10FJA9Xi078654@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: 19775aa7bc35 - main - Re-apply f81b2b9a8abd to the new device-tree import 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: 19775aa7bc3507491447d487dccf6903b55ca46a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 19:10:10 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=19775aa7bc3507491447d487dccf6903b55ca46a commit 19775aa7bc3507491447d487dccf6903b55ca46a Author: Emmanuel Vadot AuthorDate: 2021-01-15 18:54:14 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 19:07:13 +0000 Re-apply f81b2b9a8abd to the new device-tree import --- sys/contrib/device-tree/src/arm/am33xx-l4.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi b/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi index 45de2ff6a777..49ccfe36ad77 100644 --- a/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi +++ b/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi @@ -1177,6 +1177,8 @@ compatible = "ti,am335x-timer"; reg = <0x0 0x400>; interrupts = <69>; + clocks = <&timer3_fck>; + clock-names = "fck"; }; }; @@ -1203,6 +1205,8 @@ reg = <0x0 0x400>; interrupts = <92>; ti,timer-pwm; + clocks = <&timer4_fck>; + clock-names = "fck"; }; }; @@ -1229,6 +1233,8 @@ reg = <0x0 0x400>; interrupts = <93>; ti,timer-pwm; + clocks = <&timer5_fck>; + clock-names = "fck"; }; }; @@ -1255,6 +1261,8 @@ reg = <0x0 0x400>; interrupts = <94>; ti,timer-pwm; + clocks = <&timer6_fck>; + clock-names = "fck"; }; }; @@ -1281,6 +1289,8 @@ reg = <0x0 0x400>; interrupts = <95>; ti,timer-pwm; + clocks = <&timer7_fck>; + clock-names = "fck"; }; }; From owner-dev-commits-src-all@freebsd.org Fri Jan 15 19:10:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E36084EFB88; Fri, 15 Jan 2021 19: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 4DHW345psPz3QMS; Fri, 15 Jan 2021 19: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 BA659214FD; Fri, 15 Jan 2021 19: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 10FJA8pJ078452; Fri, 15 Jan 2021 19: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 10FJA88A078449; Fri, 15 Jan 2021 19:10:08 GMT (envelope-from git) Date: Fri, 15 Jan 2021 19:10:08 GMT Message-Id: <202101151910.10FJA88A078449@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: 78abc9e2e6ed - main - Revert upstream commit 27c90e5e48d0 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: 78abc9e2e6edcc286136896c1793d40899750012 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 19:10:08 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=78abc9e2e6edcc286136896c1793d40899750012 commit 78abc9e2e6edcc286136896c1793d40899750012 Author: Emmanuel Vadot AuthorDate: 2021-01-15 18:02:37 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 19:07:08 +0000 Revert upstream commit 27c90e5e48d0 It changed the #pinctrl-cells value to be equal to 2 and the macro that generates the values. Based on the bindings docs a value of 2 is only acceptable if the node used pinctrl-single,bits and not pinctrl-single,pins This allow booting further on the beaglebone black with 5.9 DTS --- sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h | 2 +- sys/contrib/device-tree/src/arm/am33xx-l4.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h b/sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h index 2d2a8c737822..625718042413 100644 --- a/sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h +++ b/sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h @@ -65,7 +65,7 @@ #define DM814X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) #define DM816X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) #define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) -#define AM33XX_PADCONF(pa, conf, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) (conf) (mux) +#define AM33XX_PADCONF(pa, dir, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) ((dir) | (mux)) /* * Macros to allow using the offset from the padconf physical address diff --git a/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi b/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi index b88d0caa4b2d..45de2ff6a777 100644 --- a/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi +++ b/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi @@ -290,7 +290,7 @@ am33xx_pinmux: pinmux@800 { compatible = "pinctrl-single"; reg = <0x800 0x238>; - #pinctrl-cells = <2>; + #pinctrl-cells = <1>; pinctrl-single,register-width = <32>; pinctrl-single,function-mask = <0x7f>; }; From owner-dev-commits-src-all@freebsd.org Fri Jan 15 19:10:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2B284EFB8C; Fri, 15 Jan 2021 19:10: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 4DHW381bcJz3Qcf; Fri, 15 Jan 2021 19:10: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 159FB21999; Fri, 15 Jan 2021 19:10: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 10FJAB2Y079441; Fri, 15 Jan 2021 19:10:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FJABPW079435; Fri, 15 Jan 2021 19:10:11 GMT (envelope-from git) Date: Fri, 15 Jan 2021 19:10:11 GMT Message-Id: <202101151910.10FJABPW079435@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: 955b980bdfb2 - main - gpiokeys: Use the new device-tree vendor include 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: 955b980bdfb2be6949c3cf5235d8bad56a15bab9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 19:10:13 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=955b980bdfb2be6949c3cf5235d8bad56a15bab9 commit 955b980bdfb2be6949c3cf5235d8bad56a15bab9 Author: Emmanuel Vadot AuthorDate: 2021-01-15 18:26:34 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 19:07:24 +0000 gpiokeys: Use the new device-tree vendor include --- sys/dev/gpio/gpiokeys_codes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/gpio/gpiokeys_codes.c b/sys/dev/gpio/gpiokeys_codes.c index 8fb8b18f1a6f..e3077d505baf 100644 --- a/sys/dev/gpio/gpiokeys_codes.c +++ b/sys/dev/gpio/gpiokeys_codes.c @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include struct gpiokeys_codemap_entry { uint32_t linux_code; From owner-dev-commits-src-all@freebsd.org Fri Jan 15 19:10:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26ECC4EF94C; Fri, 15 Jan 2021 19: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 4DHW370FTfz3QZG; Fri, 15 Jan 2021 19:10: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 E852221826; Fri, 15 Jan 2021 19:10: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 10FJAAr7078960; Fri, 15 Jan 2021 19:10:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FJAAwC078953; Fri, 15 Jan 2021 19:10:10 GMT (envelope-from git) Date: Fri, 15 Jan 2021 19:10:10 GMT Message-Id: <202101151910.10FJAAwC078953@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: c38fe8789a17 - main - arm64: Directly use #include 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: c38fe8789a1753f9dd29508eb10f0946f442aad6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 19:10:11 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c38fe8789a1753f9dd29508eb10f0946f442aad6 commit c38fe8789a1753f9dd29508eb10f0946f442aad6 Author: Emmanuel Vadot AuthorDate: 2021-01-15 18:26:02 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 19:07:19 +0000 arm64: Directly use #include We have it in the includes path and this will help the transition to the new device-tree import in sys/contrib --- sys/arm64/nvidia/tegra210/max77620.c | 2 +- sys/arm64/nvidia/tegra210/max77620_regulators.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_car.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_clk_per.c | 4 ++-- sys/arm64/nvidia/tegra210/tegra210_clk_pll.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_clk_super.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/rockchip/clk/rk3288_cru.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/arm64/nvidia/tegra210/max77620.c b/sys/arm64/nvidia/tegra210/max77620.c index a4fddb25e5a2..d35948fbfb60 100644 --- a/sys/arm64/nvidia/tegra210/max77620.c +++ b/sys/arm64/nvidia/tegra210/max77620.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "clock_if.h" #include "regdev_if.h" diff --git a/sys/arm64/nvidia/tegra210/max77620_regulators.c b/sys/arm64/nvidia/tegra210/max77620_regulators.c index b70f96e2db4f..beb34405a90e 100644 --- a/sys/arm64/nvidia/tegra210/max77620_regulators.c +++ b/sys/arm64/nvidia/tegra210/max77620_regulators.c @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "max77620.h" diff --git a/sys/arm64/nvidia/tegra210/tegra210_car.c b/sys/arm64/nvidia/tegra210/tegra210_car.c index 20249942a7cc..36400aa88d1f 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_car.c +++ b/sys/arm64/nvidia/tegra210/tegra210_car.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "clkdev_if.h" #include "hwreset_if.h" diff --git a/sys/arm64/nvidia/tegra210/tegra210_clk_per.c b/sys/arm64/nvidia/tegra210/tegra210_clk_per.c index b2f45062c02f..302dd1d85fd3 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_clk_per.c +++ b/sys/arm64/nvidia/tegra210/tegra210_clk_per.c @@ -39,8 +39,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include #include "tegra210_car.h" diff --git a/sys/arm64/nvidia/tegra210/tegra210_clk_pll.c b/sys/arm64/nvidia/tegra210/tegra210_clk_pll.c index 88c3916f4eae..624404c3e074 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_clk_pll.c +++ b/sys/arm64/nvidia/tegra210/tegra210_clk_pll.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "tegra210_car.h" #if 0 diff --git a/sys/arm64/nvidia/tegra210/tegra210_clk_super.c b/sys/arm64/nvidia/tegra210/tegra210_clk_super.c index 63005165c9ba..2c35ab53a9df 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_clk_super.c +++ b/sys/arm64/nvidia/tegra210/tegra210_clk_super.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include "tegra210_car.h" struct super_mux_def { diff --git a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c index f3ad8cf53222..4ecbceb98049 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c +++ b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include "phynode_if.h" diff --git a/sys/arm64/rockchip/clk/rk3288_cru.c b/sys/arm64/rockchip/clk/rk3288_cru.c index ed7ee0f12b32..6a8c63137df7 100644 --- a/sys/arm64/rockchip/clk/rk3288_cru.c +++ b/sys/arm64/rockchip/clk/rk3288_cru.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #define CRU_SOFTRST_SIZE 12 From owner-dev-commits-src-all@freebsd.org Fri Jan 15 19:10:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D24044EFB99; Fri, 15 Jan 2021 19: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 4DHW394Y8bz3Qcr; Fri, 15 Jan 2021 19:10: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 277B721A11; Fri, 15 Jan 2021 19:10: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 10FJAD5x079944; Fri, 15 Jan 2021 19:10:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FJADng079938; Fri, 15 Jan 2021 19:10:13 GMT (envelope-from git) Date: Fri, 15 Jan 2021 19:10:13 GMT Message-Id: <202101151910.10FJADng079938@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: efdf807990c3 - main - Switch to the new device-tree vendor tree 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: efdf807990c3b58353286174e5e6bbd601a31c33 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 19:10:15 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=efdf807990c3b58353286174e5e6bbd601a31c33 commit efdf807990c3b58353286174e5e6bbd601a31c33 Author: Emmanuel Vadot AuthorDate: 2021-01-15 14:28:46 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 19:08:39 +0000 Switch to the new device-tree vendor tree The old vendor tree was never fully merged and doing partial merge isn't supported with git subtree merge so a new one was created. Switch the build to use the new DTS from sys/contrib/device-tree This also bump the DTS used to be in sync with Linux 5.9 While here change the way to get the linux version, simply hardcode the value in sys/dts/freebsd-compatible.dts and use awk to get that to put it in the CFLAGS. As a bonus we now have the bindings docs available in sys/contrib/device-tree/Bindings/ so no need to link to the Linux repo or to the vendor tree. --- sys/conf/Makefile.arm | 4 ++-- sys/conf/Makefile.arm64 | 2 +- sys/conf/dtb.build.mk | 2 +- sys/conf/files.arm64 | 2 +- sys/dts/freebsd-compatible.dts | 2 +- sys/tools/fdt/make_dtb.sh | 6 ++---- sys/tools/fdt/make_dtbo.sh | 4 ++-- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index cc827e88c44f..31dc542e8e6c 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -30,9 +30,9 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -INCLUDES+= -I$S/contrib/libfdt -I$S/gnu/dts/include +INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include -LINUX_DTS_VERSION!= make -C $S/gnu/dts/ -V LINUX_DTS_VERSION +LINUX_DTS_VERSION!= awk '/freebsd,dts-version/ { sub(/;$$/,"", $$NF); print $$NF }' $S/dts/freebsd-compatible.dts CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" .if !defined(DEBUG) && !defined(PROFLEVEL) diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index 08b5a5fc90b7..c7951872ca2d 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -25,7 +25,7 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -INCLUDES+= -I$S/contrib/libfdt -I$S/gnu/dts/include +INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include # 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 diff --git a/sys/conf/dtb.build.mk b/sys/conf/dtb.build.mk index edaa6db225c8..8d106615822f 100644 --- a/sys/conf/dtb.build.mk +++ b/sys/conf/dtb.build.mk @@ -32,7 +32,7 @@ DTB+= ${_dts:T:R:S/$/.dtb/} DTBO=${DTSO:T:R:S/$/.dtbo/} .SUFFIXES: .dtb .dts .dtbo .dtso -.PATH.dts: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE} +.PATH.dts: ${SYSDIR}/contrib/device-tree/src/${MACHINE} ${SYSDIR}/dts/${MACHINE} .PATH.dtso: ${SYSDIR}/dts/${MACHINE}/overlays .export DTC ECHO diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 8ee422f23e26..fb001f95a672 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -34,7 +34,7 @@ arm/allwinner/aw_dwc3.c optional aw_dwc3 fdt arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ - compile-with "${NORMAL_C} -I$S/gnu/dts/include" + compile-with "${NORMAL_C} -I$S/contrib/device-tree/include" arm/allwinner/aw_pwm.c optional aw_pwm fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt diff --git a/sys/dts/freebsd-compatible.dts b/sys/dts/freebsd-compatible.dts index d977cb2b30c8..3621ac45901a 100644 --- a/sys/dts/freebsd-compatible.dts +++ b/sys/dts/freebsd-compatible.dts @@ -1,3 +1,3 @@ / { - freebsd,dts-version = LINUX_DTS_VERSION; + freebsd,dts-version = "5.9"; }; diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh index 5c5968711661..09d0b3bd9f42 100755 --- a/sys/tools/fdt/make_dtb.sh +++ b/sys/tools/fdt/make_dtb.sh @@ -20,11 +20,9 @@ fi : "${ECHO:=echo}" : "${CPP:=cpp}" -LINUX_DTS_VERSION=$(make -C $S/gnu/dts -V LINUX_DTS_VERSION) - for d in ${dts}; do dtb="${dtb_path}/$(basename "$d" .dts).dtb" ${ECHO} "converting $d -> $dtb" - ${CPP} -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" -P -x assembler-with-cpp -I "$S/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -I "$S/gnu/dts/" -include "$d" -include "$S/dts/freebsd-compatible.dts" /dev/null | - ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/gnu/dts/${MACHINE}" -i "$S/gnu/dts/" + ${CPP} -P -x assembler-with-cpp -I "$S/contrib/device-tree/include" -I "$S/dts/${MACHINE}" -I "$S/contrib/device-tree/src/${MACHINE}" -I "$S/contrib/device-tree/src/" -include "$d" -include "$S/dts/freebsd-compatible.dts" /dev/null | + ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/contrib/device-tree/src/${MACHINE}" -i "$S/contrib/device-tree/src/" done diff --git a/sys/tools/fdt/make_dtbo.sh b/sys/tools/fdt/make_dtbo.sh index edc5d7fd8d41..1fcab87a6465 100755 --- a/sys/tools/fdt/make_dtbo.sh +++ b/sys/tools/fdt/make_dtbo.sh @@ -23,6 +23,6 @@ fi for d in ${dtso}; do dtb="${dtbo_path}/$(basename "$d" .dtso).dtbo" ${ECHO} "converting $d -> $dtb" - ${CPP} -P -x assembler-with-cpp -I "$S/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -include "$d" /dev/null | - ${DTC} -@ -O dtb -o "$dtb" -i "$S/dts/${MACHINE}" -i "$S/gnu/dts/${MACHINE}" + ${CPP} -P -x assembler-with-cpp -I "$S/contrib/device-tree/include" -I "$S/dts/${MACHINE}" -I "$S/contrib/device-tree/src/${MACHINE}" -include "$d" /dev/null | + ${DTC} -@ -O dtb -o "$dtb" -i "$S/dts/${MACHINE}" -i "$S/contrib/device-tree/src/${MACHINE}" done From owner-dev-commits-src-all@freebsd.org Fri Jan 15 19:10:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 442D44EFB2E; Fri, 15 Jan 2021 19:10: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 4DHW3R4fHyz3QbY; Fri, 15 Jan 2021 19:10: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 A814C21A12; Fri, 15 Jan 2021 19:10: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 10FJAMtT083724; Fri, 15 Jan 2021 19:10:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FJAEgs080434; Fri, 15 Jan 2021 19:10:14 GMT (envelope-from git) Date: Fri, 15 Jan 2021 19:10:14 GMT Message-Id: <202101151910.10FJAEgs080434@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: 7c84a7405bee - main - Remove the old dts imported tree. 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: 7c84a7405beede34cd07cf7753d72d1098532baf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 19:10:29 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=7c84a7405beede34cd07cf7753d72d1098532baf commit 7c84a7405beede34cd07cf7753d72d1098532baf Author: Emmanuel Vadot AuthorDate: 2021-01-15 18:12:04 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-15 19:09:55 +0000 Remove the old dts imported tree. The new one is in sys/contrib/device-tree --- sys/gnu/dts/FreeBSD-list | 77 - sys/gnu/dts/FreeBSD-upgrade | 24 - sys/gnu/dts/Makefile | 3 - sys/gnu/dts/arm/aks-cdu.dts | 122 - sys/gnu/dts/arm/alphascale-asm9260-devkit.dts | 13 - sys/gnu/dts/arm/alphascale-asm9260.dtsi | 64 - sys/gnu/dts/arm/alpine-db.dts | 35 - sys/gnu/dts/arm/alpine.dtsi | 176 - sys/gnu/dts/arm/am335x-baltos-ir2110.dts | 83 - sys/gnu/dts/arm/am335x-baltos-ir3220.dts | 125 - sys/gnu/dts/arm/am335x-baltos-ir5221.dts | 149 - sys/gnu/dts/arm/am335x-baltos-leds.dtsi | 47 - sys/gnu/dts/arm/am335x-baltos.dtsi | 402 -- sys/gnu/dts/arm/am335x-base0033.dts | 92 - sys/gnu/dts/arm/am335x-bone-common.dtsi | 399 -- sys/gnu/dts/arm/am335x-bone.dts | 23 - sys/gnu/dts/arm/am335x-boneblack-common.dtsi | 169 - sys/gnu/dts/arm/am335x-boneblack-wireless.dts | 110 - sys/gnu/dts/arm/am335x-boneblack.dts | 25 - sys/gnu/dts/arm/am335x-boneblue.dts | 421 -- sys/gnu/dts/arm/am335x-bonegreen-common.dtsi | 41 - sys/gnu/dts/arm/am335x-bonegreen-wireless.dts | 127 - sys/gnu/dts/arm/am335x-bonegreen.dts | 14 - sys/gnu/dts/arm/am335x-chiliboard.dts | 183 - sys/gnu/dts/arm/am335x-chilisom.dtsi | 175 - sys/gnu/dts/arm/am335x-cm-t335.dts | 513 -- sys/gnu/dts/arm/am335x-evm.dts | 777 --- sys/gnu/dts/arm/am335x-evmsk.dts | 719 --- sys/gnu/dts/arm/am335x-guardian.dts | 490 -- sys/gnu/dts/arm/am335x-icev2.dts | 512 -- sys/gnu/dts/arm/am335x-igep0033.dtsi | 300 - sys/gnu/dts/arm/am335x-lxm.dts | 345 - sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi | 227 - sys/gnu/dts/arm/am335x-moxa-uc-2101.dts | 69 - sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts | 503 -- sys/gnu/dts/arm/am335x-nano.dts | 474 -- sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts | 87 - sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts | 95 - sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts | 115 - sys/gnu/dts/arm/am335x-osd3358-sm-red.dts | 439 -- sys/gnu/dts/arm/am335x-osd335x-common.dtsi | 124 - sys/gnu/dts/arm/am335x-pcm-953.dtsi | 242 - sys/gnu/dts/arm/am335x-pdu001.dts | 575 -- sys/gnu/dts/arm/am335x-pepper.dts | 641 -- sys/gnu/dts/arm/am335x-phycore-rdk.dts | 28 - sys/gnu/dts/arm/am335x-phycore-som.dtsi | 341 - sys/gnu/dts/arm/am335x-pocketbeagle.dts | 214 - sys/gnu/dts/arm/am335x-regor-rdk.dts | 24 - sys/gnu/dts/arm/am335x-regor.dtsi | 202 - sys/gnu/dts/arm/am335x-sancloud-bbe.dts | 137 - sys/gnu/dts/arm/am335x-sbc-t335.dts | 176 - sys/gnu/dts/arm/am335x-shc.dts | 555 -- sys/gnu/dts/arm/am335x-sl50.dts | 717 --- sys/gnu/dts/arm/am335x-wega-rdk.dts | 23 - sys/gnu/dts/arm/am335x-wega.dtsi | 196 - sys/gnu/dts/arm/am33xx-clocks.dtsi | 676 -- sys/gnu/dts/arm/am33xx-l4.dtsi | 2127 ------- sys/gnu/dts/arm/am33xx.dtsi | 642 -- sys/gnu/dts/arm/am3517-craneboard.dts | 171 - sys/gnu/dts/arm/am3517-evm-ui.dtsi | 217 - sys/gnu/dts/arm/am3517-evm.dts | 322 - sys/gnu/dts/arm/am3517-som.dtsi | 234 - sys/gnu/dts/arm/am3517.dtsi | 193 - sys/gnu/dts/arm/am3517_mt_ventoux.dts | 24 - sys/gnu/dts/arm/am35xx-clocks.dtsi | 125 - sys/gnu/dts/arm/am3703.dtsi | 14 - sys/gnu/dts/arm/am3715.dtsi | 10 - sys/gnu/dts/arm/am3874-iceboard.dts | 489 -- sys/gnu/dts/arm/am4372.dtsi | 576 -- sys/gnu/dts/arm/am437x-cm-t43.dts | 420 -- sys/gnu/dts/arm/am437x-gp-evm.dts | 1114 ---- sys/gnu/dts/arm/am437x-idk-evm.dts | 536 -- sys/gnu/dts/arm/am437x-l4.dtsi | 2529 -------- sys/gnu/dts/arm/am437x-sbc-t43.dts | 177 - sys/gnu/dts/arm/am437x-sk-evm.dts | 896 --- sys/gnu/dts/arm/am43x-epos-evm.dts | 1013 --- sys/gnu/dts/arm/am43xx-clocks.dtsi | 883 --- sys/gnu/dts/arm/am57-pruss.dtsi | 50 - sys/gnu/dts/arm/am5718.dtsi | 33 - sys/gnu/dts/arm/am571x-idk.dts | 237 - sys/gnu/dts/arm/am5728.dtsi | 34 - sys/gnu/dts/arm/am5729-beagleboneai.dts | 731 --- sys/gnu/dts/arm/am572x-idk-common.dtsi | 203 - sys/gnu/dts/arm/am572x-idk.dts | 34 - sys/gnu/dts/arm/am5748.dtsi | 34 - sys/gnu/dts/arm/am574x-idk.dts | 46 - sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi | 640 -- sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts | 36 - sys/gnu/dts/arm/am57xx-beagle-x15-revc.dts | 31 - sys/gnu/dts/arm/am57xx-beagle-x15.dts | 38 - sys/gnu/dts/arm/am57xx-cl-som-am57x.dts | 622 -- sys/gnu/dts/arm/am57xx-commercial-grade.dtsi | 24 - sys/gnu/dts/arm/am57xx-idk-common.dtsi | 604 -- sys/gnu/dts/arm/am57xx-industrial-grade.dtsi | 24 - sys/gnu/dts/arm/am57xx-sbc-am57x.dts | 176 - sys/gnu/dts/arm/animeo_ip.dts | 196 - .../dts/arm/arm-realview-eb-11mp-bbrevd-ctrevb.dts | 32 - sys/gnu/dts/arm/arm-realview-eb-11mp-bbrevd.dts | 28 - sys/gnu/dts/arm/arm-realview-eb-11mp-ctrevb.dts | 93 - sys/gnu/dts/arm/arm-realview-eb-11mp-revb.dts | 93 - sys/gnu/dts/arm/arm-realview-eb-11mp.dts | 74 - sys/gnu/dts/arm/arm-realview-eb-a9mp-bbrevd.dts | 28 - sys/gnu/dts/arm/arm-realview-eb-a9mp.dts | 70 - sys/gnu/dts/arm/arm-realview-eb-bbrevd.dts | 29 - sys/gnu/dts/arm/arm-realview-eb-bbrevd.dtsi | 45 - sys/gnu/dts/arm/arm-realview-eb-mp.dtsi | 220 - sys/gnu/dts/arm/arm-realview-eb.dts | 166 - sys/gnu/dts/arm/arm-realview-eb.dtsi | 468 -- sys/gnu/dts/arm/arm-realview-pb1176.dts | 592 -- sys/gnu/dts/arm/arm-realview-pb11mp.dts | 718 --- sys/gnu/dts/arm/arm-realview-pba8.dts | 178 - sys/gnu/dts/arm/arm-realview-pbx-a9.dts | 228 - sys/gnu/dts/arm/arm-realview-pbx.dtsi | 577 -- sys/gnu/dts/arm/armada-370-db.dts | 244 - sys/gnu/dts/arm/armada-370-dlink-dns327l.dts | 331 - sys/gnu/dts/arm/armada-370-mirabox.dts | 184 - sys/gnu/dts/arm/armada-370-netgear-rn102.dts | 276 - sys/gnu/dts/arm/armada-370-netgear-rn104.dts | 302 - sys/gnu/dts/arm/armada-370-rd.dts | 258 - sys/gnu/dts/arm/armada-370-seagate-nas-2bay.dts | 33 - sys/gnu/dts/arm/armada-370-seagate-nas-4bay.dts | 131 - sys/gnu/dts/arm/armada-370-seagate-nas-xbay.dtsi | 239 - .../arm/armada-370-seagate-personal-cloud-2bay.dts | 48 - .../dts/arm/armada-370-seagate-personal-cloud.dts | 34 - .../dts/arm/armada-370-seagate-personal-cloud.dtsi | 175 - sys/gnu/dts/arm/armada-370-synology-ds213j.dts | 312 - sys/gnu/dts/arm/armada-370-xp.dtsi | 313 - sys/gnu/dts/arm/armada-370.dtsi | 419 -- sys/gnu/dts/arm/armada-375-db.dts | 182 - sys/gnu/dts/arm/armada-375.dtsi | 621 -- sys/gnu/dts/arm/armada-380.dtsi | 118 - sys/gnu/dts/arm/armada-385-clearfog-gtr-l8.dts | 115 - sys/gnu/dts/arm/armada-385-clearfog-gtr-s4.dts | 79 - sys/gnu/dts/arm/armada-385-clearfog-gtr.dtsi | 450 -- sys/gnu/dts/arm/armada-385-db-88f6820-amc.dts | 155 - sys/gnu/dts/arm/armada-385-db-ap.dts | 238 - sys/gnu/dts/arm/armada-385-linksys-caiman.dts | 144 - sys/gnu/dts/arm/armada-385-linksys-cobra.dts | 144 - sys/gnu/dts/arm/armada-385-linksys-rango.dts | 176 - sys/gnu/dts/arm/armada-385-linksys-shelby.dts | 144 - sys/gnu/dts/arm/armada-385-linksys.dtsi | 263 - sys/gnu/dts/arm/armada-385-synology-ds116.dts | 292 - sys/gnu/dts/arm/armada-385-turris-omnia.dts | 359 -- sys/gnu/dts/arm/armada-385.dtsi | 149 - sys/gnu/dts/arm/armada-388-clearfog-base.dts | 68 - sys/gnu/dts/arm/armada-388-clearfog-pro.dts | 14 - sys/gnu/dts/arm/armada-388-clearfog.dts | 180 - sys/gnu/dts/arm/armada-388-clearfog.dtsi | 245 - sys/gnu/dts/arm/armada-388-db.dts | 176 - sys/gnu/dts/arm/armada-388-gp.dts | 406 -- sys/gnu/dts/arm/armada-388-helios4.dts | 308 - sys/gnu/dts/arm/armada-388-rd.dts | 108 - sys/gnu/dts/arm/armada-388.dtsi | 37 - sys/gnu/dts/arm/armada-38x-solidrun-microsom.dtsi | 117 - sys/gnu/dts/arm/armada-38x.dtsi | 707 --- sys/gnu/dts/arm/armada-390-db.dts | 142 - sys/gnu/dts/arm/armada-390.dtsi | 23 - sys/gnu/dts/arm/armada-395-gp.dts | 136 - sys/gnu/dts/arm/armada-395.dtsi | 39 - sys/gnu/dts/arm/armada-398-db.dts | 134 - sys/gnu/dts/arm/armada-398.dtsi | 31 - sys/gnu/dts/arm/armada-39x.dtsi | 554 -- sys/gnu/dts/arm/armada-xp-98dx3236.dtsi | 346 - sys/gnu/dts/arm/armada-xp-98dx3336.dtsi | 39 - sys/gnu/dts/arm/armada-xp-98dx4251.dtsi | 54 - sys/gnu/dts/arm/armada-xp-axpwifiap.dts | 144 - sys/gnu/dts/arm/armada-xp-db-dxbc2.dts | 118 - sys/gnu/dts/arm/armada-xp-db-xc3-24g4xg.dts | 114 - sys/gnu/dts/arm/armada-xp-db.dts | 245 - sys/gnu/dts/arm/armada-xp-gp.dts | 230 - sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts | 293 - sys/gnu/dts/arm/armada-xp-linksys-mamba.dts | 399 -- sys/gnu/dts/arm/armada-xp-matrix.dts | 79 - sys/gnu/dts/arm/armada-xp-mv78230.dtsi | 207 - sys/gnu/dts/arm/armada-xp-mv78260.dtsi | 314 - sys/gnu/dts/arm/armada-xp-mv78460.dtsi | 353 -- sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts | 357 -- sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts | 211 - sys/gnu/dts/arm/armada-xp-synology-ds414.dts | 328 - sys/gnu/dts/arm/armada-xp.dtsi | 344 - sys/gnu/dts/arm/armv7-m.dtsi | 23 - sys/gnu/dts/arm/artpec6-devboard.dts | 69 - sys/gnu/dts/arm/artpec6.dtsi | 388 -- sys/gnu/dts/arm/aspeed-ast2500-evb.dts | 131 - sys/gnu/dts/arm/aspeed-ast2600-evb.dts | 219 - sys/gnu/dts/arm/aspeed-bmc-arm-centriq2400-rep.dts | 225 - .../dts/arm/aspeed-bmc-arm-stardragon4800-rep2.dts | 220 - sys/gnu/dts/arm/aspeed-bmc-facebook-cmm.dts | 348 - sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts | 408 -- sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts | 541 -- sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts | 148 - sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts | 140 - sys/gnu/dts/arm/aspeed-bmc-facebook-yamp.dts | 110 - sys/gnu/dts/arm/aspeed-bmc-facebook-yosemitev2.dts | 231 - sys/gnu/dts/arm/aspeed-bmc-ibm-rainier.dts | 679 -- sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts | 872 --- sys/gnu/dts/arm/aspeed-bmc-inspur-on5263m5.dts | 148 - sys/gnu/dts/arm/aspeed-bmc-intel-s2600wf.dts | 132 - sys/gnu/dts/arm/aspeed-bmc-lenovo-hr630.dts | 569 -- sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts | 666 -- sys/gnu/dts/arm/aspeed-bmc-microsoft-olympus.dts | 207 - sys/gnu/dts/arm/aspeed-bmc-opp-lanyang.dts | 329 - sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts | 1195 ---- sys/gnu/dts/arm/aspeed-bmc-opp-nicole.dts | 326 - sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts | 373 -- sys/gnu/dts/arm/aspeed-bmc-opp-romulus.dts | 354 -- sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts | 978 --- sys/gnu/dts/arm/aspeed-bmc-opp-tacoma.dts | 914 --- sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts | 248 - sys/gnu/dts/arm/aspeed-bmc-opp-witherspoon.dts | 693 -- sys/gnu/dts/arm/aspeed-bmc-opp-zaius.dts | 578 -- sys/gnu/dts/arm/aspeed-bmc-portwell-neptune.dts | 165 - sys/gnu/dts/arm/aspeed-bmc-quanta-q71l.dts | 518 -- sys/gnu/dts/arm/aspeed-g4.dtsi | 1435 ----- sys/gnu/dts/arm/aspeed-g5.dtsi | 1638 ----- sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi | 1174 ---- sys/gnu/dts/arm/aspeed-g6.dtsi | 930 --- .../dts/arm/ast2500-facebook-netbmc-common.dtsi | 95 - sys/gnu/dts/arm/at91-ariag25.dts | 182 - sys/gnu/dts/arm/at91-ariettag25.dts | 86 - sys/gnu/dts/arm/at91-cosino.dtsi | 151 - sys/gnu/dts/arm/at91-cosino_mega2560.dts | 74 - sys/gnu/dts/arm/at91-dvk_som60.dts | 95 - sys/gnu/dts/arm/at91-dvk_su60_somc.dtsi | 159 - sys/gnu/dts/arm/at91-dvk_su60_somc_lcm.dtsi | 90 - sys/gnu/dts/arm/at91-foxg20.dts | 167 - sys/gnu/dts/arm/at91-gatwick.dts | 121 - sys/gnu/dts/arm/at91-kizbox.dts | 177 - sys/gnu/dts/arm/at91-kizbox2-2.dts | 26 - sys/gnu/dts/arm/at91-kizbox2-common.dtsi | 258 - sys/gnu/dts/arm/at91-kizbox3-hs.dts | 309 - sys/gnu/dts/arm/at91-kizbox3_common.dtsi | 372 -- sys/gnu/dts/arm/at91-kizboxmini-base.dts | 24 - sys/gnu/dts/arm/at91-kizboxmini-common.dtsi | 170 - sys/gnu/dts/arm/at91-kizboxmini-mb.dts | 26 - sys/gnu/dts/arm/at91-kizboxmini-rd.dts | 49 - sys/gnu/dts/arm/at91-linea.dtsi | 71 - sys/gnu/dts/arm/at91-natte.dtsi | 244 - sys/gnu/dts/arm/at91-nattis-2-natte-2.dts | 306 - sys/gnu/dts/arm/at91-qil_a9260.dts | 214 - sys/gnu/dts/arm/at91-sam9_l9260.dts | 132 - sys/gnu/dts/arm/at91-sam9x60ek.dts | 675 -- sys/gnu/dts/arm/at91-sama5d27_som1.dtsi | 153 - sys/gnu/dts/arm/at91-sama5d27_som1_ek.dts | 532 -- sys/gnu/dts/arm/at91-sama5d27_wlsom1.dtsi | 296 - sys/gnu/dts/arm/at91-sama5d27_wlsom1_ek.dts | 270 - sys/gnu/dts/arm/at91-sama5d2_icp.dts | 767 --- sys/gnu/dts/arm/at91-sama5d2_ptc_ek.dts | 433 -- sys/gnu/dts/arm/at91-sama5d2_xplained.dts | 756 --- sys/gnu/dts/arm/at91-sama5d3_xplained.dts | 369 -- sys/gnu/dts/arm/at91-sama5d4_ma5d4.dtsi | 136 - sys/gnu/dts/arm/at91-sama5d4_ma5d4evk.dts | 164 - sys/gnu/dts/arm/at91-sama5d4_xplained.dts | 281 - sys/gnu/dts/arm/at91-sama5d4ek.dts | 323 - sys/gnu/dts/arm/at91-smartkiz.dts | 109 - sys/gnu/dts/arm/at91-som60.dtsi | 230 - sys/gnu/dts/arm/at91-tse850-3.dts | 302 - sys/gnu/dts/arm/at91-vinco.dts | 231 - sys/gnu/dts/arm/at91-wb45n.dts | 64 - sys/gnu/dts/arm/at91-wb45n.dtsi | 165 - sys/gnu/dts/arm/at91-wb50n.dts | 112 - sys/gnu/dts/arm/at91-wb50n.dtsi | 194 - sys/gnu/dts/arm/at91rm9200.dtsi | 720 --- sys/gnu/dts/arm/at91rm9200_pqfp.dtsi | 16 - sys/gnu/dts/arm/at91rm9200ek.dts | 147 - sys/gnu/dts/arm/at91sam9260.dtsi | 810 --- sys/gnu/dts/arm/at91sam9260ek.dts | 186 - sys/gnu/dts/arm/at91sam9261.dtsi | 658 -- sys/gnu/dts/arm/at91sam9261ek.dts | 241 - sys/gnu/dts/arm/at91sam9263.dtsi | 829 --- sys/gnu/dts/arm/at91sam9263ek.dts | 257 - sys/gnu/dts/arm/at91sam9g15.dtsi | 28 - sys/gnu/dts/arm/at91sam9g15ek.dts | 36 - sys/gnu/dts/arm/at91sam9g20.dtsi | 46 - sys/gnu/dts/arm/at91sam9g20ek.dts | 28 - sys/gnu/dts/arm/at91sam9g20ek_2mmc.dts | 54 - sys/gnu/dts/arm/at91sam9g20ek_common.dtsi | 255 - sys/gnu/dts/arm/at91sam9g25.dtsi | 34 - sys/gnu/dts/arm/at91sam9g25ek.dts | 65 - sys/gnu/dts/arm/at91sam9g35.dtsi | 33 - sys/gnu/dts/arm/at91sam9g35ek.dts | 41 - sys/gnu/dts/arm/at91sam9g45.dtsi | 1042 --- sys/gnu/dts/arm/at91sam9m10g45ek.dts | 391 -- sys/gnu/dts/arm/at91sam9n12.dtsi | 806 --- sys/gnu/dts/arm/at91sam9n12ek.dts | 285 - sys/gnu/dts/arm/at91sam9rl.dtsi | 876 --- sys/gnu/dts/arm/at91sam9rlek.dts | 272 - sys/gnu/dts/arm/at91sam9x25.dtsi | 35 - sys/gnu/dts/arm/at91sam9x25ek.dts | 35 - sys/gnu/dts/arm/at91sam9x35.dtsi | 34 - sys/gnu/dts/arm/at91sam9x35ek.dts | 41 - sys/gnu/dts/arm/at91sam9x5.dtsi | 997 --- sys/gnu/dts/arm/at91sam9x5_can.dtsi | 56 - sys/gnu/dts/arm/at91sam9x5_isi.dtsi | 62 - sys/gnu/dts/arm/at91sam9x5_lcd.dtsi | 147 - sys/gnu/dts/arm/at91sam9x5_macb0.dtsi | 57 - sys/gnu/dts/arm/at91sam9x5_macb1.dtsi | 45 - sys/gnu/dts/arm/at91sam9x5_usart3.dtsi | 59 - sys/gnu/dts/arm/at91sam9x5cm.dtsi | 144 - sys/gnu/dts/arm/at91sam9x5dm.dtsi | 96 - sys/gnu/dts/arm/at91sam9x5ek.dtsi | 165 - sys/gnu/dts/arm/at91sam9xe.dtsi | 23 - sys/gnu/dts/arm/atlas6-evb.dts | 78 - sys/gnu/dts/arm/atlas6.dtsi | 800 --- sys/gnu/dts/arm/atlas7-evb.dts | 127 - sys/gnu/dts/arm/atlas7.dtsi | 1955 ------ sys/gnu/dts/arm/axm5516-amarillo.dts | 47 - sys/gnu/dts/arm/axm5516-cpus.dtsi | 200 - sys/gnu/dts/arm/axm55xx.dtsi | 200 - sys/gnu/dts/arm/axp152.dtsi | 49 - sys/gnu/dts/arm/axp209.dtsi | 119 - sys/gnu/dts/arm/axp223.dtsi | 58 - sys/gnu/dts/arm/axp22x.dtsi | 170 - sys/gnu/dts/arm/axp809.dtsi | 53 - sys/gnu/dts/arm/axp81x.dtsi | 178 - sys/gnu/dts/arm/bcm-cygnus-clock.dtsi | 133 - sys/gnu/dts/arm/bcm-cygnus.dtsi | 624 -- sys/gnu/dts/arm/bcm-hr2.dtsi | 368 -- sys/gnu/dts/arm/bcm-nsp.dtsi | 659 -- sys/gnu/dts/arm/bcm11351.dtsi | 424 -- sys/gnu/dts/arm/bcm21664-garnet.dts | 57 - sys/gnu/dts/arm/bcm21664.dtsi | 357 -- sys/gnu/dts/arm/bcm23550-sparrow.dts | 81 - sys/gnu/dts/arm/bcm23550.dtsi | 415 -- sys/gnu/dts/arm/bcm2711-rpi-4-b.dts | 228 - sys/gnu/dts/arm/bcm2711.dtsi | 937 --- sys/gnu/dts/arm/bcm28155-ap.dts | 122 - sys/gnu/dts/arm/bcm2835-common.dtsi | 199 - sys/gnu/dts/arm/bcm2835-rpi-a-plus.dts | 128 - sys/gnu/dts/arm/bcm2835-rpi-a.dts | 123 - sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts | 130 - sys/gnu/dts/arm/bcm2835-rpi-b-rev2.dts | 123 - sys/gnu/dts/arm/bcm2835-rpi-b.dts | 118 - sys/gnu/dts/arm/bcm2835-rpi-cm1-io1.dts | 97 - sys/gnu/dts/arm/bcm2835-rpi-cm1.dtsi | 39 - sys/gnu/dts/arm/bcm2835-rpi-common.dtsi | 12 - sys/gnu/dts/arm/bcm2835-rpi-zero-w.dts | 151 - sys/gnu/dts/arm/bcm2835-rpi-zero.dts | 119 - sys/gnu/dts/arm/bcm2835-rpi.dtsi | 81 - sys/gnu/dts/arm/bcm2835.dtsi | 38 - sys/gnu/dts/arm/bcm2836-rpi-2-b.dts | 130 - sys/gnu/dts/arm/bcm2836-rpi.dtsi | 6 - sys/gnu/dts/arm/bcm2836.dtsi | 92 - sys/gnu/dts/arm/bcm2837-rpi-3-a-plus.dts | 180 - sys/gnu/dts/arm/bcm2837-rpi-3-b-plus.dts | 183 - sys/gnu/dts/arm/bcm2837-rpi-3-b.dts | 176 - sys/gnu/dts/arm/bcm2837-rpi-cm3-io3.dts | 96 - sys/gnu/dts/arm/bcm2837-rpi-cm3.dtsi | 61 - sys/gnu/dts/arm/bcm2837.dtsi | 95 - sys/gnu/dts/arm/bcm283x-rpi-lan7515.dtsi | 41 - sys/gnu/dts/arm/bcm283x-rpi-smsc9512.dtsi | 20 - sys/gnu/dts/arm/bcm283x-rpi-smsc9514.dtsi | 19 - sys/gnu/dts/arm/bcm283x-rpi-usb-host.dtsi | 3 - sys/gnu/dts/arm/bcm283x-rpi-usb-otg.dtsi | 11 - sys/gnu/dts/arm/bcm283x-rpi-usb-peripheral.dtsi | 7 - sys/gnu/dts/arm/bcm283x.dtsi | 509 -- sys/gnu/dts/arm/bcm4708-asus-rt-ac56u.dts | 95 - sys/gnu/dts/arm/bcm4708-asus-rt-ac68u.dts | 85 - sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts | 151 - sys/gnu/dts/arm/bcm4708-linksys-ea6300-v1.dts | 43 - sys/gnu/dts/arm/bcm4708-linksys-ea6500-v2.dts | 44 - sys/gnu/dts/arm/bcm4708-luxul-xap-1510.dts | 62 - sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts | 69 - sys/gnu/dts/arm/bcm4708-netgear-r6250.dts | 96 - sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts | 88 - sys/gnu/dts/arm/bcm4708-smartrg-sr400ac.dts | 163 - sys/gnu/dts/arm/bcm4708.dtsi | 48 - sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts | 79 - sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts | 123 - sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts | 109 - sys/gnu/dts/arm/bcm47081-luxul-xap-1410.dts | 62 - sys/gnu/dts/arm/bcm47081-luxul-xwr-1200.dts | 110 - sys/gnu/dts/arm/bcm47081-tplink-archer-c5-v2.dts | 132 - sys/gnu/dts/arm/bcm47081.dtsi | 37 - sys/gnu/dts/arm/bcm4709-asus-rt-ac87u.dts | 100 - sys/gnu/dts/arm/bcm4709-buffalo-wxr-1900dhp.dts | 134 - sys/gnu/dts/arm/bcm4709-linksys-ea9200.dts | 46 - sys/gnu/dts/arm/bcm4709-netgear-r7000.dts | 108 - sys/gnu/dts/arm/bcm4709-netgear-r8000.dts | 189 - sys/gnu/dts/arm/bcm4709-tplink-archer-c9-v1.dts | 139 - sys/gnu/dts/arm/bcm4709.dtsi | 11 - sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts | 120 - sys/gnu/dts/arm/bcm47094-linksys-panamera.dts | 270 - sys/gnu/dts/arm/bcm47094-luxul-abr-4500.dts | 65 - sys/gnu/dts/arm/bcm47094-luxul-xap-1610.dts | 56 - sys/gnu/dts/arm/bcm47094-luxul-xbr-4500.dts | 65 - sys/gnu/dts/arm/bcm47094-luxul-xwc-2000.dts | 54 - sys/gnu/dts/arm/bcm47094-luxul-xwr-3100.dts | 105 - sys/gnu/dts/arm/bcm47094-luxul-xwr-3150-v1.dts | 76 - sys/gnu/dts/arm/bcm47094-netgear-r8500.dts | 96 - sys/gnu/dts/arm/bcm47094-phicomm-k3.dts | 70 - sys/gnu/dts/arm/bcm47094.dtsi | 18 - sys/gnu/dts/arm/bcm47189-luxul-xap-1440.dts | 48 - sys/gnu/dts/arm/bcm47189-luxul-xap-810.dts | 85 - sys/gnu/dts/arm/bcm47189-tenda-ac9.dts | 107 - sys/gnu/dts/arm/bcm5301x-nand-cs0-bch1.dtsi | 14 - sys/gnu/dts/arm/bcm5301x-nand-cs0-bch4.dtsi | 12 - sys/gnu/dts/arm/bcm5301x-nand-cs0-bch8.dtsi | 17 - sys/gnu/dts/arm/bcm5301x-nand-cs0.dtsi | 21 - sys/gnu/dts/arm/bcm5301x.dtsi | 548 -- sys/gnu/dts/arm/bcm53340-ubnt-unifi-switch8.dts | 86 - sys/gnu/dts/arm/bcm53573.dtsi | 201 - sys/gnu/dts/arm/bcm59056.dtsi | 91 - sys/gnu/dts/arm/bcm63138.dtsi | 229 - sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts | 38 - sys/gnu/dts/arm/bcm7445.dtsi | 315 - sys/gnu/dts/arm/bcm911360_entphn.dts | 99 - sys/gnu/dts/arm/bcm911360k.dts | 52 - sys/gnu/dts/arm/bcm94708.dts | 49 - sys/gnu/dts/arm/bcm94709.dts | 49 - sys/gnu/dts/arm/bcm947189acdbmr.dts | 96 - sys/gnu/dts/arm/bcm953012er.dts | 95 - sys/gnu/dts/arm/bcm953012hr.dts | 102 - sys/gnu/dts/arm/bcm953012k.dts | 120 - sys/gnu/dts/arm/bcm958300k.dts | 77 - sys/gnu/dts/arm/bcm958305k.dts | 85 - sys/gnu/dts/arm/bcm958522er.dts | 180 - sys/gnu/dts/arm/bcm958525er.dts | 192 - sys/gnu/dts/arm/bcm958525xmc.dts | 212 - sys/gnu/dts/arm/bcm958622hr.dts | 229 - sys/gnu/dts/arm/bcm958623hr.dts | 233 - sys/gnu/dts/arm/bcm958625hr.dts | 256 - sys/gnu/dts/arm/bcm958625k.dts | 273 - sys/gnu/dts/arm/bcm963138dvt.dts | 52 - sys/gnu/dts/arm/bcm988312hr.dts | 229 - sys/gnu/dts/arm/bcm9hmidc.dtsi | 42 - sys/gnu/dts/arm/berlin2-sony-nsz-gs7.dts | 43 - sys/gnu/dts/arm/berlin2.dtsi | 540 -- sys/gnu/dts/arm/berlin2cd-google-chromecast.dts | 77 - sys/gnu/dts/arm/berlin2cd-valve-steamlink.dts | 79 - sys/gnu/dts/arm/berlin2cd.dtsi | 583 -- sys/gnu/dts/arm/berlin2q-marvell-dmp.dts | 144 - sys/gnu/dts/arm/berlin2q.dtsi | 666 -- sys/gnu/dts/arm/compulab-sb-som.dtsi | 46 - sys/gnu/dts/arm/cros-adc-thermistors.dtsi | 41 - sys/gnu/dts/arm/cros-ec-keyboard.dtsi | 107 - sys/gnu/dts/arm/cros-ec-sbs.dtsi | 52 - sys/gnu/dts/arm/cx92755.dtsi | 144 - sys/gnu/dts/arm/cx92755_equinox.dts | 86 - sys/gnu/dts/arm/da850-enbw-cmc.dts | 44 - sys/gnu/dts/arm/da850-evm.dts | 466 -- sys/gnu/dts/arm/da850-lcdk.dts | 425 -- sys/gnu/dts/arm/da850-lego-ev3.dts | 466 -- sys/gnu/dts/arm/da850.dtsi | 967 --- sys/gnu/dts/arm/dm3725.dtsi | 10 - sys/gnu/dts/arm/dm8148-evm.dts | 155 - sys/gnu/dts/arm/dm8148-t410.dts | 113 - sys/gnu/dts/arm/dm814x-clocks.dtsi | 379 -- sys/gnu/dts/arm/dm814x.dtsi | 789 --- sys/gnu/dts/arm/dm8168-evm.dts | 213 - sys/gnu/dts/arm/dm816x-clocks.dtsi | 276 - sys/gnu/dts/arm/dm816x.dtsi | 696 -- sys/gnu/dts/arm/dove-cm-a510.dtsi | 195 - sys/gnu/dts/arm/dove-cubox-es.dts | 13 - sys/gnu/dts/arm/dove-cubox.dts | 143 - sys/gnu/dts/arm/dove-d2plug.dts | 70 - sys/gnu/dts/arm/dove-d3plug.dts | 104 - sys/gnu/dts/arm/dove-dove-db.dts | 39 - sys/gnu/dts/arm/dove-sbc-a510.dts | 182 - sys/gnu/dts/arm/dove.dtsi | 805 --- sys/gnu/dts/arm/dra62x-clocks.dtsi | 45 - sys/gnu/dts/arm/dra62x-j5eco-evm.dts | 144 - sys/gnu/dts/arm/dra62x.dtsi | 23 - sys/gnu/dts/arm/dra7-dspeve-thermal.dtsi | 27 - sys/gnu/dts/arm/dra7-evm-common.dtsi | 265 - sys/gnu/dts/arm/dra7-evm.dts | 593 -- sys/gnu/dts/arm/dra7-ipu-dsp-common.dtsi | 39 - sys/gnu/dts/arm/dra7-iva-thermal.dtsi | 27 - sys/gnu/dts/arm/dra7-l4.dtsi | 4651 -------------- sys/gnu/dts/arm/dra7-mmc-iodelay.dtsi | 19 - sys/gnu/dts/arm/dra7.dtsi | 1092 ---- sys/gnu/dts/arm/dra71-evm.dts | 314 - sys/gnu/dts/arm/dra71x.dtsi | 17 - sys/gnu/dts/arm/dra72-evm-common.dtsi | 597 -- sys/gnu/dts/arm/dra72-evm-revc.dts | 157 - sys/gnu/dts/arm/dra72-evm-tps65917.dtsi | 151 - sys/gnu/dts/arm/dra72-evm.dts | 122 - sys/gnu/dts/arm/dra72x-mmc-iodelay.dtsi | 361 -- sys/gnu/dts/arm/dra72x.dtsi | 114 - sys/gnu/dts/arm/dra74-ipu-dsp-common.dtsi | 18 - sys/gnu/dts/arm/dra74x-mmc-iodelay.dtsi | 647 -- sys/gnu/dts/arm/dra74x.dtsi | 206 - sys/gnu/dts/arm/dra76-evm.dts | 604 -- sys/gnu/dts/arm/dra76x-mmc-iodelay.dtsi | 285 - sys/gnu/dts/arm/dra76x.dtsi | 135 - sys/gnu/dts/arm/dra7xx-clocks.dtsi | 1849 ------ sys/gnu/dts/arm/e60k02.dtsi | 304 - sys/gnu/dts/arm/ecx-2000.dts | 101 - sys/gnu/dts/arm/ecx-common.dtsi | 231 - sys/gnu/dts/arm/efm32gg-dk3750.dts | 88 - sys/gnu/dts/arm/efm32gg.dtsi | 177 - sys/gnu/dts/arm/elpida_ecb240abacn.dtsi | 68 - sys/gnu/dts/arm/emev2-kzm9d.dts | 115 - sys/gnu/dts/arm/emev2.dtsi | 289 - sys/gnu/dts/arm/ep7209.dtsi | 187 - sys/gnu/dts/arm/ep7211-edb7211.dts | 97 - sys/gnu/dts/arm/ep7211.dtsi | 8 - sys/gnu/dts/arm/ethernut5.dts | 118 - sys/gnu/dts/arm/evk-pro3.dts | 58 - sys/gnu/dts/arm/exynos-mfc-reserved-memory.dtsi | 32 - sys/gnu/dts/arm/exynos-syscon-restart.dtsi | 20 - sys/gnu/dts/arm/exynos3250-artik5-eval.dts | 39 - sys/gnu/dts/arm/exynos3250-artik5.dtsi | 381 -- sys/gnu/dts/arm/exynos3250-monk.dts | 639 -- sys/gnu/dts/arm/exynos3250-pinctrl.dtsi | 568 -- sys/gnu/dts/arm/exynos3250-rinato.dts | 914 --- sys/gnu/dts/arm/exynos3250.dtsi | 967 --- sys/gnu/dts/arm/exynos4-cpu-thermal.dtsi | 48 - sys/gnu/dts/arm/exynos4.dtsi | 1022 --- sys/gnu/dts/arm/exynos4210-i9100.dts | 768 --- sys/gnu/dts/arm/exynos4210-origen.dts | 338 - sys/gnu/dts/arm/exynos4210-pinctrl.dtsi | 863 --- sys/gnu/dts/arm/exynos4210-smdkv310.dts | 200 - sys/gnu/dts/arm/exynos4210-trats.dts | 515 -- sys/gnu/dts/arm/exynos4210-universal_c210.dts | 632 -- sys/gnu/dts/arm/exynos4210.dtsi | 523 -- sys/gnu/dts/arm/exynos4212.dtsi | 133 - sys/gnu/dts/arm/exynos4412-galaxy-s3.dtsi | 177 - sys/gnu/dts/arm/exynos4412-i9300.dts | 22 - sys/gnu/dts/arm/exynos4412-i9305.dts | 20 - sys/gnu/dts/arm/exynos4412-itop-elite.dts | 227 - sys/gnu/dts/arm/exynos4412-itop-scp-core.dtsi | 503 -- sys/gnu/dts/arm/exynos4412-midas.dtsi | 1375 ---- sys/gnu/dts/arm/exynos4412-n710x.dts | 80 - sys/gnu/dts/arm/exynos4412-odroid-common.dtsi | 573 -- sys/gnu/dts/arm/exynos4412-odroidu3.dts | 131 - sys/gnu/dts/arm/exynos4412-odroidx.dts | 109 - sys/gnu/dts/arm/exynos4412-odroidx2.dts | 22 - sys/gnu/dts/arm/exynos4412-origen.dts | 533 -- sys/gnu/dts/arm/exynos4412-pinctrl.dtsi | 979 --- sys/gnu/dts/arm/exynos4412-ppmu-common.dtsi | 47 - sys/gnu/dts/arm/exynos4412-prime.dtsi | 47 - sys/gnu/dts/arm/exynos4412-smdk4412.dts | 151 - sys/gnu/dts/arm/exynos4412-tiny4412.dts | 121 - sys/gnu/dts/arm/exynos4412-trats2.dts | 28 - sys/gnu/dts/arm/exynos4412.dtsi | 802 --- sys/gnu/dts/arm/exynos4415-pinctrl.dtsi | 573 -- sys/gnu/dts/arm/exynos4415.dtsi | 649 -- sys/gnu/dts/arm/exynos4x12-pinctrl.dtsi | 984 --- sys/gnu/dts/arm/exynos4x12.dtsi | 594 -- sys/gnu/dts/arm/exynos5.dtsi | 230 - sys/gnu/dts/arm/exynos5250-arndale.dts | 650 -- sys/gnu/dts/arm/exynos5250-pinctrl.dtsi | 833 --- sys/gnu/dts/arm/exynos5250-smdk5250.dts | 417 -- sys/gnu/dts/arm/exynos5250-snow-common.dtsi | 709 --- sys/gnu/dts/arm/exynos5250-snow-rev5.dts | 55 - sys/gnu/dts/arm/exynos5250-snow.dts | 51 - sys/gnu/dts/arm/exynos5250-spring.dts | 548 -- sys/gnu/dts/arm/exynos5250.dtsi | 1237 ---- sys/gnu/dts/arm/exynos5260-pinctrl.dtsi | 585 -- sys/gnu/dts/arm/exynos5260-xyref5260.dts | 90 - sys/gnu/dts/arm/exynos5260.dtsi | 401 -- sys/gnu/dts/arm/exynos5410-odroidxu.dts | 655 -- sys/gnu/dts/arm/exynos5410-pinctrl.dtsi | 624 -- sys/gnu/dts/arm/exynos5410-smdk5410.dts | 111 - sys/gnu/dts/arm/exynos5410.dtsi | 448 -- sys/gnu/dts/arm/exynos5420-arndale-octa.dts | 826 --- sys/gnu/dts/arm/exynos5420-cpus.dtsi | 131 - sys/gnu/dts/arm/exynos5420-peach-pit.dts | 1118 ---- sys/gnu/dts/arm/exynos5420-pinctrl.dtsi | 734 --- sys/gnu/dts/arm/exynos5420-smdk5420.dts | 421 -- sys/gnu/dts/arm/exynos5420-trip-points.dtsi | 31 - sys/gnu/dts/arm/exynos5420.dtsi | 1424 ----- sys/gnu/dts/arm/exynos5422-cpu-thermal.dtsi | 103 - sys/gnu/dts/arm/exynos5422-cpus.dtsi | 138 - sys/gnu/dts/arm/exynos5422-odroid-core.dtsi | 1076 ---- sys/gnu/dts/arm/exynos5422-odroidhc1.dts | 264 - sys/gnu/dts/arm/exynos5422-odroidxu3-audio.dtsi | 89 - sys/gnu/dts/arm/exynos5422-odroidxu3-common.dtsi | 505 -- sys/gnu/dts/arm/exynos5422-odroidxu3-lite.dts | 105 - sys/gnu/dts/arm/exynos5422-odroidxu3.dts | 72 - sys/gnu/dts/arm/exynos5422-odroidxu4.dts | 98 - sys/gnu/dts/arm/exynos54xx-odroidxu-leds.dtsi | 47 - sys/gnu/dts/arm/exynos54xx.dtsi | 210 - sys/gnu/dts/arm/exynos5800-peach-pi.dts | 1100 ---- sys/gnu/dts/arm/exynos5800.dtsi | 162 - sys/gnu/dts/arm/facebook-bmc-flash-layout.dtsi | 42 - sys/gnu/dts/arm/ge863-pro3.dtsi | 77 - sys/gnu/dts/arm/gemini-dlink-dir-685.dts | 511 -- sys/gnu/dts/arm/gemini-dlink-dns-313.dts | 304 - sys/gnu/dts/arm/gemini-nas4220b.dts | 189 - sys/gnu/dts/arm/gemini-rut1xx.dts | 148 - sys/gnu/dts/arm/gemini-sl93512r.dts | 312 - sys/gnu/dts/arm/gemini-sq201.dts | 304 - sys/gnu/dts/arm/gemini-wbd111.dts | 183 - sys/gnu/dts/arm/gemini-wbd222.dts | 195 - sys/gnu/dts/arm/gemini.dtsi | 449 -- sys/gnu/dts/arm/gr-peach-audiocamerashield.dtsi | 75 - sys/gnu/dts/arm/hi3519-demb.dts | 29 - sys/gnu/dts/arm/hi3519.dtsi | 174 - sys/gnu/dts/arm/hi3620-hi4511.dts | 647 -- sys/gnu/dts/arm/hi3620.dtsi | 567 -- sys/gnu/dts/arm/highbank.dts | 158 - sys/gnu/dts/arm/hip01-ca9x2.dts | 48 - sys/gnu/dts/arm/hip01.dtsi | 105 - sys/gnu/dts/arm/hip04-d01.dts | 29 - sys/gnu/dts/arm/hip04.dtsi | 986 --- sys/gnu/dts/arm/hisi-x5hd2-dkb.dts | 83 - sys/gnu/dts/arm/hisi-x5hd2.dtsi | 557 -- sys/gnu/dts/arm/ibm-power9-dual.dtsi | 248 - sys/gnu/dts/arm/imx1-ads.dts | 135 - sys/gnu/dts/arm/imx1-apf9328.dts | 124 - sys/gnu/dts/arm/imx1-pinfunc.h | 296 - sys/gnu/dts/arm/imx1.dtsi | 276 - sys/gnu/dts/arm/imx23-evk.dts | 145 - sys/gnu/dts/arm/imx23-olinuxino.dts | 131 - sys/gnu/dts/arm/imx23-pinfunc.h | 333 - sys/gnu/dts/arm/imx23-sansa.dts | 207 - sys/gnu/dts/arm/imx23-stmp378x_devb.dts | 76 - sys/gnu/dts/arm/imx23-xfi3.dts | 180 - sys/gnu/dts/arm/imx23.dtsi | 636 -- sys/gnu/dts/arm/imx25-eukrea-cpuimx25.dtsi | 66 - .../imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts | 65 - .../imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts | 37 - .../imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts | 37 - .../dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts | 174 - sys/gnu/dts/arm/imx25-karo-tx25.dts | 108 - sys/gnu/dts/arm/imx25-pdk.dts | 313 - sys/gnu/dts/arm/imx25-pinfunc.h | 636 -- sys/gnu/dts/arm/imx25.dtsi | 637 -- sys/gnu/dts/arm/imx27-apf27.dts | 112 - sys/gnu/dts/arm/imx27-apf27dev.dts | 256 - sys/gnu/dts/arm/imx27-eukrea-cpuimx27.dtsi | 284 - .../dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts | 266 - sys/gnu/dts/arm/imx27-pdk.dts | 191 - sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts | 162 - sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi | 97 - sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts | 319 - sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi | 344 - sys/gnu/dts/arm/imx27-pinfunc.h | 474 -- sys/gnu/dts/arm/imx27.dtsi | 593 -- sys/gnu/dts/arm/imx28-apf28.dts | 80 - sys/gnu/dts/arm/imx28-apf28dev.dts | 225 - sys/gnu/dts/arm/imx28-apx4devkit.dts | 240 - sys/gnu/dts/arm/imx28-cfa10036.dts | 140 - sys/gnu/dts/arm/imx28-cfa10037.dts | 83 - sys/gnu/dts/arm/imx28-cfa10049.dts | 428 -- sys/gnu/dts/arm/imx28-cfa10055.dts | 161 - sys/gnu/dts/arm/imx28-cfa10056.dts | 113 - sys/gnu/dts/arm/imx28-cfa10057.dts | 171 - sys/gnu/dts/arm/imx28-cfa10058.dts | 138 - sys/gnu/dts/arm/imx28-duckbill-2-485.dts | 184 - sys/gnu/dts/arm/imx28-duckbill-2-enocean.dts | 213 - sys/gnu/dts/arm/imx28-duckbill-2-spi.dts | 194 - sys/gnu/dts/arm/imx28-duckbill-2.dts | 178 - sys/gnu/dts/arm/imx28-duckbill.dts | 147 - sys/gnu/dts/arm/imx28-eukrea-mbmx283lc.dts | 64 - sys/gnu/dts/arm/imx28-eukrea-mbmx287lc.dts | 43 - sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi | 323 - sys/gnu/dts/arm/imx28-evk.dts | 360 -- sys/gnu/dts/arm/imx28-m28.dtsi | 56 - sys/gnu/dts/arm/imx28-m28cu3.dts | 266 - sys/gnu/dts/arm/imx28-m28evk.dts | 271 - sys/gnu/dts/arm/imx28-pinfunc.h | 506 -- sys/gnu/dts/arm/imx28-sps1.dts | 166 - sys/gnu/dts/arm/imx28-ts4600.dts | 74 - sys/gnu/dts/arm/imx28-tx28.dts | 749 --- sys/gnu/dts/arm/imx28.dtsi | 1330 ---- sys/gnu/dts/arm/imx31-bug.dts | 22 - sys/gnu/dts/arm/imx31-lite.dts | 178 - sys/gnu/dts/arm/imx31.dtsi | 370 -- sys/gnu/dts/arm/imx35-eukrea-cpuimx35.dtsi | 89 - .../dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts | 156 - sys/gnu/dts/arm/imx35-pdk.dts | 62 - sys/gnu/dts/arm/imx35-pinfunc.h | 966 --- sys/gnu/dts/arm/imx35.dtsi | 414 -- sys/gnu/dts/arm/imx50-evk.dts | 104 - sys/gnu/dts/arm/imx50-kobo-aura.dts | 258 - sys/gnu/dts/arm/imx50-pinfunc.h | 919 --- sys/gnu/dts/arm/imx50.dtsi | 499 -- sys/gnu/dts/arm/imx51-apf51.dts | 84 - sys/gnu/dts/arm/imx51-apf51dev.dts | 217 - sys/gnu/dts/arm/imx51-babbage.dts | 726 --- sys/gnu/dts/arm/imx51-digi-connectcore-jsk.dts | 118 - sys/gnu/dts/arm/imx51-digi-connectcore-som.dtsi | 389 -- sys/gnu/dts/arm/imx51-eukrea-cpuimx51.dtsi | 92 - .../dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts | 274 - sys/gnu/dts/arm/imx51-pinfunc.h | 768 --- sys/gnu/dts/arm/imx51-ts4800.dts | 330 - sys/gnu/dts/arm/imx51-zii-rdu1.dts | 894 --- sys/gnu/dts/arm/imx51-zii-scu2-mezz.dts | 457 -- sys/gnu/dts/arm/imx51-zii-scu3-esb.dts | 472 -- sys/gnu/dts/arm/imx51.dtsi | 654 -- sys/gnu/dts/arm/imx53-ard.dts | 179 - sys/gnu/dts/arm/imx53-cx9020.dts | 295 - sys/gnu/dts/arm/imx53-kp-ddc.dts | 146 - sys/gnu/dts/arm/imx53-kp-hsc.dts | 52 - sys/gnu/dts/arm/imx53-kp.dtsi | 189 - sys/gnu/dts/arm/imx53-m53.dtsi | 132 - sys/gnu/dts/arm/imx53-m53evk.dts | 370 -- sys/gnu/dts/arm/imx53-m53menlo.dts | 492 -- sys/gnu/dts/arm/imx53-mba53.dts | 249 - sys/gnu/dts/arm/imx53-pinfunc.h | 1189 ---- sys/gnu/dts/arm/imx53-ppd.dts | 1083 ---- sys/gnu/dts/arm/imx53-qsb-common.dtsi | 385 -- sys/gnu/dts/arm/imx53-qsb.dts | 111 - sys/gnu/dts/arm/imx53-qsrb.dts | 149 - sys/gnu/dts/arm/imx53-smd.dts | 346 - sys/gnu/dts/arm/imx53-tqma53.dtsi | 281 - sys/gnu/dts/arm/imx53-tx53-x03x.dts | 351 -- sys/gnu/dts/arm/imx53-tx53-x13x.dts | 262 - sys/gnu/dts/arm/imx53-tx53.dtsi | 596 -- sys/gnu/dts/arm/imx53-usbarmory.dts | 225 - sys/gnu/dts/arm/imx53-voipac-bsb.dts | 153 - sys/gnu/dts/arm/imx53-voipac-dmm-668.dtsi | 266 - sys/gnu/dts/arm/imx53.dtsi | 856 --- sys/gnu/dts/arm/imx6-logicpd-baseboard.dtsi | 561 -- sys/gnu/dts/arm/imx6-logicpd-som.dtsi | 369 -- sys/gnu/dts/arm/imx6dl-apf6dev.dts | 18 - sys/gnu/dts/arm/imx6dl-aristainetos2_4.dts | 158 - sys/gnu/dts/arm/imx6dl-aristainetos2_7.dts | 98 - sys/gnu/dts/arm/imx6dl-aristainetos_4.dts | 83 - sys/gnu/dts/arm/imx6dl-aristainetos_7.dts | 73 - sys/gnu/dts/arm/imx6dl-colibri-eval-v3.dts | 261 - sys/gnu/dts/arm/imx6dl-colibri-v1_1-eval-v3.dts | 31 - sys/gnu/dts/arm/imx6dl-cubox-i-emmc-som-v15.dts | 52 - sys/gnu/dts/arm/imx6dl-cubox-i-som-v15.dts | 51 - sys/gnu/dts/arm/imx6dl-cubox-i.dts | 51 - sys/gnu/dts/arm/imx6dl-dfi-fs700-m60.dts | 23 - sys/gnu/dts/arm/imx6dl-eckelmann-ci4x10.dts | 381 -- sys/gnu/dts/arm/imx6dl-emcon-avari.dts | 14 - sys/gnu/dts/arm/imx6dl-gw51xx.dts | 13 - sys/gnu/dts/arm/imx6dl-gw52xx.dts | 71 - sys/gnu/dts/arm/imx6dl-gw53xx.dts | 71 - sys/gnu/dts/arm/imx6dl-gw54xx.dts | 71 - sys/gnu/dts/arm/imx6dl-gw551x.dts | 55 - sys/gnu/dts/arm/imx6dl-gw552x.dts | 14 - sys/gnu/dts/arm/imx6dl-gw553x.dts | 55 - sys/gnu/dts/arm/imx6dl-gw560x.dts | 55 - sys/gnu/dts/arm/imx6dl-gw5903.dts | 55 - sys/gnu/dts/arm/imx6dl-gw5904.dts | 55 - sys/gnu/dts/arm/imx6dl-gw5907.dts | 14 - sys/gnu/dts/arm/imx6dl-gw5910.dts | 14 - sys/gnu/dts/arm/imx6dl-gw5912.dts | 13 - sys/gnu/dts/arm/imx6dl-gw5913.dts | 14 - .../dts/arm/imx6dl-hummingboard-emmc-som-v15.dts | 53 - sys/gnu/dts/arm/imx6dl-hummingboard-som-v15.dts | 52 - sys/gnu/dts/arm/imx6dl-hummingboard.dts | 52 - .../dts/arm/imx6dl-hummingboard2-emmc-som-v15.dts | 55 - sys/gnu/dts/arm/imx6dl-hummingboard2-som-v15.dts | 54 - sys/gnu/dts/arm/imx6dl-hummingboard2.dts | 53 - sys/gnu/dts/arm/imx6dl-icore-mipi.dts | 25 - sys/gnu/dts/arm/imx6dl-icore-rqs.dts | 15 - sys/gnu/dts/arm/imx6dl-icore.dts | 32 - sys/gnu/dts/arm/imx6dl-kontron-samx6i.dtsi | 12 - sys/gnu/dts/arm/imx6dl-mamoj.dts | 495 -- sys/gnu/dts/arm/imx6dl-nit6xlite.dts | 13 - sys/gnu/dts/arm/imx6dl-nitrogen6x.dts | 15 - sys/gnu/dts/arm/imx6dl-phytec-mira-rdk-nand.dts | 64 - sys/gnu/dts/arm/imx6dl-phytec-pbab01.dts | 13 - sys/gnu/dts/arm/imx6dl-phytec-pfla02.dtsi | 17 - sys/gnu/dts/arm/imx6dl-pico-dwarf.dts | 17 - sys/gnu/dts/arm/imx6dl-pico-hobbit.dts | 17 - sys/gnu/dts/arm/imx6dl-pico-nymph.dts | 17 - sys/gnu/dts/arm/imx6dl-pico-pi.dts | 17 - sys/gnu/dts/arm/imx6dl-pinfunc.h | 1088 ---- sys/gnu/dts/arm/imx6dl-rex-basic.dts | 27 - sys/gnu/dts/arm/imx6dl-riotboard.dts | 594 -- sys/gnu/dts/arm/imx6dl-sabreauto.dts | 28 - sys/gnu/dts/arm/imx6dl-sabrelite.dts | 55 - sys/gnu/dts/arm/imx6dl-sabresd.dts | 18 - sys/gnu/dts/arm/imx6dl-savageboard.dts | 51 - sys/gnu/dts/arm/imx6dl-ts4900.dts | 55 - sys/gnu/dts/arm/imx6dl-ts7970.dts | 56 - sys/gnu/dts/arm/imx6dl-tx6dl-comtft.dts | 79 - sys/gnu/dts/arm/imx6dl-tx6s-8034-mb7.dts | 48 - sys/gnu/dts/arm/imx6dl-tx6s-8034.dts | 70 - sys/gnu/dts/arm/imx6dl-tx6s-8035-mb7.dts | 48 - sys/gnu/dts/arm/imx6dl-tx6s-8035.dts | 86 - sys/gnu/dts/arm/imx6dl-tx6u-801x.dts | 50 - sys/gnu/dts/arm/imx6dl-tx6u-8033-mb7.dts | 48 - sys/gnu/dts/arm/imx6dl-tx6u-8033.dts | 82 - sys/gnu/dts/arm/imx6dl-tx6u-80xx-mb7.dts | 48 - sys/gnu/dts/arm/imx6dl-tx6u-811x.dts | 50 - sys/gnu/dts/arm/imx6dl-tx6u-81xx-mb7.dts | 48 - sys/gnu/dts/arm/imx6dl-udoo.dts | 14 - sys/gnu/dts/arm/imx6dl-wandboard-revb1.dts | 19 - sys/gnu/dts/arm/imx6dl-wandboard-revd1.dts | 19 - sys/gnu/dts/arm/imx6dl-wandboard.dts | 19 - sys/gnu/dts/arm/imx6dl-yapp4-common.dtsi | 623 -- sys/gnu/dts/arm/imx6dl-yapp4-draco.dts | 58 - sys/gnu/dts/arm/imx6dl-yapp4-hydra.dts | 50 - sys/gnu/dts/arm/imx6dl-yapp4-ursa.dts | 54 - sys/gnu/dts/arm/imx6dl.dtsi | 394 -- sys/gnu/dts/arm/imx6q-apalis-eval.dts | 273 - sys/gnu/dts/arm/imx6q-apalis-ixora-v1.1.dts | 274 - sys/gnu/dts/arm/imx6q-apalis-ixora.dts | 275 - sys/gnu/dts/arm/imx6q-apf6dev.dts | 22 - sys/gnu/dts/arm/imx6q-arm2.dts | 225 - sys/gnu/dts/arm/imx6q-b450v3.dts | 152 - sys/gnu/dts/arm/imx6q-b650v3.dts | 151 - sys/gnu/dts/arm/imx6q-b850v3.dts | 290 - sys/gnu/dts/arm/imx6q-ba16.dtsi | 639 -- sys/gnu/dts/arm/imx6q-bx50v3.dtsi | 394 -- sys/gnu/dts/arm/imx6q-cm-fx6.dts | 491 -- sys/gnu/dts/arm/imx6q-cubox-i-emmc-som-v15.dts | 60 - sys/gnu/dts/arm/imx6q-cubox-i-som-v15.dts | 59 - sys/gnu/dts/arm/imx6q-cubox-i.dts | 59 - sys/gnu/dts/arm/imx6q-dfi-fs700-m60.dts | 23 - sys/gnu/dts/arm/imx6q-dhcom-pdk2.dts | 270 - sys/gnu/dts/arm/imx6q-dhcom-som.dtsi | 475 -- .../arm/imx6q-display5-tianma-tm070-1280x768.dts | 51 - sys/gnu/dts/arm/imx6q-display5.dtsi | 597 -- sys/gnu/dts/arm/imx6q-dmo-edmqmx6.dts | 481 -- sys/gnu/dts/arm/imx6q-dms-ba16.dts | 139 - sys/gnu/dts/arm/imx6q-emcon-avari.dts | 14 - sys/gnu/dts/arm/imx6q-evi.dts | 517 -- sys/gnu/dts/arm/imx6q-gk802.dts | 179 - sys/gnu/dts/arm/imx6q-gw51xx.dts | 13 - sys/gnu/dts/arm/imx6q-gw52xx.dts | 75 - sys/gnu/dts/arm/imx6q-gw53xx.dts | 75 - sys/gnu/dts/arm/imx6q-gw5400-a.dts | 510 -- sys/gnu/dts/arm/imx6q-gw54xx.dts | 177 - sys/gnu/dts/arm/imx6q-gw551x.dts | 55 - sys/gnu/dts/arm/imx6q-gw552x.dts | 18 - sys/gnu/dts/arm/imx6q-gw553x.dts | 55 - sys/gnu/dts/arm/imx6q-gw560x.dts | 59 - sys/gnu/dts/arm/imx6q-gw5903.dts | 55 - sys/gnu/dts/arm/imx6q-gw5904.dts | 59 - sys/gnu/dts/arm/imx6q-gw5907.dts | 14 - sys/gnu/dts/arm/imx6q-gw5910.dts | 14 - sys/gnu/dts/arm/imx6q-gw5912.dts | 13 - sys/gnu/dts/arm/imx6q-gw5913.dts | 14 - sys/gnu/dts/arm/imx6q-h100.dts | 382 -- .../dts/arm/imx6q-hummingboard-emmc-som-v15.dts | 61 - sys/gnu/dts/arm/imx6q-hummingboard-som-v15.dts | 60 - sys/gnu/dts/arm/imx6q-hummingboard.dts | 60 - .../dts/arm/imx6q-hummingboard2-emmc-som-v15.dts | 63 - sys/gnu/dts/arm/imx6q-hummingboard2-som-v15.dts | 62 - sys/gnu/dts/arm/imx6q-hummingboard2.dts | 61 - sys/gnu/dts/arm/imx6q-icore-mipi.dts | 33 - sys/gnu/dts/arm/imx6q-icore-ofcap10.dts | 40 - sys/gnu/dts/arm/imx6q-icore-ofcap12.dts | 43 - sys/gnu/dts/arm/imx6q-icore-rqs.dts | 19 - sys/gnu/dts/arm/imx6q-icore.dts | 57 - sys/gnu/dts/arm/imx6q-kontron-samx6i.dtsi | 36 - sys/gnu/dts/arm/imx6q-kp-tpc.dts | 23 - sys/gnu/dts/arm/imx6q-kp.dtsi | 432 -- sys/gnu/dts/arm/imx6q-logicpd.dts | 130 - sys/gnu/dts/arm/imx6q-marsboard.dts | 417 -- sys/gnu/dts/arm/imx6q-mccmon6.dts | 470 -- sys/gnu/dts/arm/imx6q-nitrogen6_max.dts | 17 - sys/gnu/dts/arm/imx6q-nitrogen6_som2.dts | 17 - sys/gnu/dts/arm/imx6q-nitrogen6x.dts | 19 - sys/gnu/dts/arm/imx6q-novena.dts | 792 --- sys/gnu/dts/arm/imx6q-phytec-mira-rdk-emmc.dts | 72 - sys/gnu/dts/arm/imx6q-phytec-mira-rdk-nand.dts | 72 - sys/gnu/dts/arm/imx6q-phytec-pbab01.dts | 21 - sys/gnu/dts/arm/imx6q-phytec-pfla02.dtsi | 17 - sys/gnu/dts/arm/imx6q-pico-dwarf.dts | 17 - sys/gnu/dts/arm/imx6q-pico-hobbit.dts | 17 - sys/gnu/dts/arm/imx6q-pico-nymph.dts | 17 - sys/gnu/dts/arm/imx6q-pico-pi.dts | 17 - sys/gnu/dts/arm/imx6q-pinfunc.h | 1044 --- sys/gnu/dts/arm/imx6q-pistachio.dts | 694 -- sys/gnu/dts/arm/imx6q-rex-pro.dts | 31 - sys/gnu/dts/arm/imx6q-sabreauto.dts | 18 - sys/gnu/dts/arm/imx6q-sabrelite.dts | 59 - sys/gnu/dts/arm/imx6q-sabresd.dts | 23 - sys/gnu/dts/arm/imx6q-savageboard.dts | 55 - sys/gnu/dts/arm/imx6q-sbc6x.dts | 93 - sys/gnu/dts/arm/imx6q-tbs2910.dts | 388 -- sys/gnu/dts/arm/imx6q-ts4900.dts | 59 - sys/gnu/dts/arm/imx6q-ts7970.dts | 60 - sys/gnu/dts/arm/imx6q-tx6q-1010-comtft.dts | 79 - sys/gnu/dts/arm/imx6q-tx6q-1010.dts | 54 - sys/gnu/dts/arm/imx6q-tx6q-1020-comtft.dts | 110 - sys/gnu/dts/arm/imx6q-tx6q-1020.dts | 86 - sys/gnu/dts/arm/imx6q-tx6q-1036-mb7.dts | 48 - sys/gnu/dts/arm/imx6q-tx6q-1036.dts | 86 - sys/gnu/dts/arm/imx6q-tx6q-10x0-mb7.dts | 48 - sys/gnu/dts/arm/imx6q-tx6q-1110.dts | 58 - sys/gnu/dts/arm/imx6q-tx6q-11x0-mb7.dts | 48 - sys/gnu/dts/arm/imx6q-udoo.dts | 18 - sys/gnu/dts/arm/imx6q-utilite-pro.dts | 355 -- sys/gnu/dts/arm/imx6q-var-dt6customboard.dts | 234 - sys/gnu/dts/arm/imx6q-wandboard-revb1.dts | 23 - sys/gnu/dts/arm/imx6q-wandboard-revd1.dts | 23 - sys/gnu/dts/arm/imx6q-wandboard.dts | 23 - sys/gnu/dts/arm/imx6q-zii-rdu2.dts | 20 - sys/gnu/dts/arm/imx6q.dtsi | 548 -- sys/gnu/dts/arm/imx6qdl-apalis.dtsi | 952 --- sys/gnu/dts/arm/imx6qdl-apf6.dtsi | 152 - sys/gnu/dts/arm/imx6qdl-apf6dev.dtsi | 450 -- sys/gnu/dts/arm/imx6qdl-aristainetos.dtsi | 408 -- sys/gnu/dts/arm/imx6qdl-aristainetos2.dtsi | 626 -- sys/gnu/dts/arm/imx6qdl-colibri-v1_1-uhs.dtsi | 44 - sys/gnu/dts/arm/imx6qdl-colibri.dtsi | 864 --- sys/gnu/dts/arm/imx6qdl-cubox-i.dtsi | 269 - sys/gnu/dts/arm/imx6qdl-dfi-fs700-m60.dtsi | 201 - sys/gnu/dts/arm/imx6qdl-emcon-avari.dtsi | 177 - sys/gnu/dts/arm/imx6qdl-emcon.dtsi | 831 --- sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi | 499 -- sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi | 633 -- sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi | 617 -- sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi | 709 --- sys/gnu/dts/arm/imx6qdl-gw551x.dtsi | 563 -- sys/gnu/dts/arm/imx6qdl-gw552x.dtsi | 381 -- sys/gnu/dts/arm/imx6qdl-gw553x.dtsi | 599 -- sys/gnu/dts/arm/imx6qdl-gw560x.dtsi | 782 --- sys/gnu/dts/arm/imx6qdl-gw5903.dtsi | 655 -- sys/gnu/dts/arm/imx6qdl-gw5904.dtsi | 671 -- sys/gnu/dts/arm/imx6qdl-gw5907.dtsi | 399 -- sys/gnu/dts/arm/imx6qdl-gw5910.dtsi | 507 -- sys/gnu/dts/arm/imx6qdl-gw5912.dtsi | 461 -- sys/gnu/dts/arm/imx6qdl-gw5913.dtsi | 348 - sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi | 368 -- sys/gnu/dts/arm/imx6qdl-hummingboard2-emmc.dtsi | 72 - sys/gnu/dts/arm/imx6qdl-hummingboard2.dtsi | 577 -- sys/gnu/dts/arm/imx6qdl-icore-1.5.dtsi | 32 - sys/gnu/dts/arm/imx6qdl-icore-rqs.dtsi | 466 -- sys/gnu/dts/arm/imx6qdl-icore.dtsi | 430 -- sys/gnu/dts/arm/imx6qdl-kontron-samx6i.dtsi | 815 --- sys/gnu/dts/arm/imx6qdl-nit6xlite.dtsi | 570 -- sys/gnu/dts/arm/imx6qdl-nitrogen6_max.dtsi | 835 --- sys/gnu/dts/arm/imx6qdl-nitrogen6_som2.dtsi | 733 --- sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi | 680 -- sys/gnu/dts/arm/imx6qdl-phytec-mira.dtsi | 390 -- sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi | 175 - sys/gnu/dts/arm/imx6qdl-phytec-pfla02.dtsi | 445 -- sys/gnu/dts/arm/imx6qdl-phytec-phycore-som.dtsi | 290 - sys/gnu/dts/arm/imx6qdl-pico-dwarf.dtsi | 45 - sys/gnu/dts/arm/imx6qdl-pico-hobbit.dtsi | 37 - sys/gnu/dts/arm/imx6qdl-pico-nymph.dtsi | 54 - sys/gnu/dts/arm/imx6qdl-pico-pi.dtsi | 31 - sys/gnu/dts/arm/imx6qdl-pico.dtsi | 617 -- sys/gnu/dts/arm/imx6qdl-rex.dtsi | 367 -- sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi | 861 --- sys/gnu/dts/arm/imx6qdl-sabrelite.dtsi | 765 --- sys/gnu/dts/arm/imx6qdl-sabresd.dtsi | 824 --- sys/gnu/dts/arm/imx6qdl-savageboard.dtsi | 255 - sys/gnu/dts/arm/imx6qdl-sr-som-brcm.dtsi | 144 - sys/gnu/dts/arm/imx6qdl-sr-som-emmc.dtsi | 70 - sys/gnu/dts/arm/imx6qdl-sr-som-ti.dtsi | 171 - sys/gnu/dts/arm/imx6qdl-sr-som.dtsi | 132 - sys/gnu/dts/arm/imx6qdl-ts4900.dtsi | 479 -- sys/gnu/dts/arm/imx6qdl-ts7970.dtsi | 594 -- sys/gnu/dts/arm/imx6qdl-tx6-lcd.dtsi | 251 - sys/gnu/dts/arm/imx6qdl-tx6-lvds.dtsi | 286 - sys/gnu/dts/arm/imx6qdl-tx6-mb7.dtsi | 96 - sys/gnu/dts/arm/imx6qdl-tx6.dtsi | 811 --- sys/gnu/dts/arm/imx6qdl-udoo.dtsi | 324 - sys/gnu/dts/arm/imx6qdl-var-dart.dtsi | 504 -- sys/gnu/dts/arm/imx6qdl-wandboard-revb1.dtsi | 36 - sys/gnu/dts/arm/imx6qdl-wandboard-revc1.dtsi | 35 - sys/gnu/dts/arm/imx6qdl-wandboard-revd1.dtsi | 195 - sys/gnu/dts/arm/imx6qdl-wandboard.dtsi | 358 -- sys/gnu/dts/arm/imx6qdl-zii-rdu2.dtsi | 1140 ---- sys/gnu/dts/arm/imx6qdl.dtsi | 1382 ---- sys/gnu/dts/arm/imx6qp-nitrogen6_max.dts | 22 - sys/gnu/dts/arm/imx6qp-nitrogen6_som2.dts | 18 - sys/gnu/dts/arm/imx6qp-phytec-mira-rdk-nand.dts | 72 - sys/gnu/dts/arm/imx6qp-sabreauto.dts | 55 - sys/gnu/dts/arm/imx6qp-sabresd.dts | 55 - sys/gnu/dts/arm/imx6qp-tx6qp-8037-mb7.dts | 48 - sys/gnu/dts/arm/imx6qp-tx6qp-8037.dts | 86 - sys/gnu/dts/arm/imx6qp-tx6qp-8137-mb7.dts | 57 - sys/gnu/dts/arm/imx6qp-tx6qp-8137.dts | 90 - sys/gnu/dts/arm/imx6qp-wandboard-revd1.dts | 23 - sys/gnu/dts/arm/imx6qp-zii-rdu2.dts | 25 - sys/gnu/dts/arm/imx6qp.dtsi | 114 - sys/gnu/dts/arm/imx6sl-evk.dts | 648 -- sys/gnu/dts/arm/imx6sl-pinfunc.h | 1073 ---- sys/gnu/dts/arm/imx6sl-tolino-shine3.dts | 322 - sys/gnu/dts/arm/imx6sl-warp.dts | 234 - sys/gnu/dts/arm/imx6sl.dtsi | 1002 --- sys/gnu/dts/arm/imx6sll-evk.dts | 502 -- sys/gnu/dts/arm/imx6sll-kobo-clarahd.dts | 324 - sys/gnu/dts/arm/imx6sll-pinfunc.h | 880 --- sys/gnu/dts/arm/imx6sll.dtsi | 829 --- sys/gnu/dts/arm/imx6sx-nitrogen6sx.dts | 602 -- sys/gnu/dts/arm/imx6sx-pinfunc.h | 1668 ----- sys/gnu/dts/arm/imx6sx-sabreauto.dts | 461 -- *** 952091 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Fri Jan 15 19:13:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D532F4EFDCA; Fri, 15 Jan 2021 19:13: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 4DHW7C4yfSz3h00; Fri, 15 Jan 2021 19:13: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 9D8C721AB0; Fri, 15 Jan 2021 19:13: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 10FJDhE5088586; Fri, 15 Jan 2021 19:13:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FJDhdU088585; Fri, 15 Jan 2021 19:13:43 GMT (envelope-from git) Date: Fri, 15 Jan 2021 19:13:43 GMT Message-Id: <202101151913.10FJDhdU088585@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: f64329bcdc4f - main - Extract the logic from pmap_kextract 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: f64329bcdc4f7cf41c03bfbcf7e6a7525dad68fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 19:13:43 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f64329bcdc4f7cf41c03bfbcf7e6a7525dad68fd commit f64329bcdc4f7cf41c03bfbcf7e6a7525dad68fd Author: Andrew Turner AuthorDate: 2021-01-15 18:48:43 +0000 Commit: Andrew Turner CommitDate: 2021-01-15 19:08:01 +0000 Extract the logic from pmap_kextract This allows us to use it when we only need to check if the virtual address is valid. For example when checking if an address in the DMAP region is mapped. Reviewed by: kib, markj Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D27621 --- sys/arm64/arm64/pmap.c | 73 +++++++++++++++++++++++++++++++++++++--------- sys/arm64/include/armreg.h | 1 + sys/arm64/include/pmap.h | 1 + 3 files changed, 62 insertions(+), 13 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 86ab5cb43ae9..d4047fc84096 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1365,16 +1365,42 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) return (m); } -vm_paddr_t -pmap_kextract(vm_offset_t va) +/* + * Walks the page tables to translate a kernel virtual address to a + * physical address. Returns true if the kva is valid and stores the + * physical address in pa if it is not NULL. + */ +bool +pmap_klookup(vm_offset_t va, vm_paddr_t *pa) { pt_entry_t *pte, tpte; + register_t intr; + uint64_t par; + + /* + * Disable interrupts so we don't get interrupted between asking + * for address translation, and getting the result back. + */ + intr = intr_disable(); + par = arm64_address_translate_s1e1r(va); + intr_restore(intr); + + if (PAR_SUCCESS(par)) { + if (pa != NULL) + *pa = (par & PAR_PA_MASK) | (va & PAR_LOW_MASK); + return (true); + } + + /* + * Fall back to walking the page table. The address translation + * instruction may fail when the page is in a break-before-make + * sequence. As we only clear the valid bit in said sequence we + * can walk the page table to find the physical address. + */ - if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) - return (DMAP_TO_PHYS(va)); pte = pmap_l1(kernel_pmap, va); if (pte == NULL) - return (0); + return (false); /* * A concurrent pmap_update_entry() will clear the entry's valid bit @@ -1384,20 +1410,41 @@ pmap_kextract(vm_offset_t va) */ tpte = pmap_load(pte); if (tpte == 0) - return (0); - if ((tpte & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_BLOCK) - return ((tpte & ~ATTR_MASK) | (va & L1_OFFSET)); + return (false); + if ((tpte & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_BLOCK) { + if (pa != NULL) + *pa = (tpte & ~ATTR_MASK) | (va & L1_OFFSET); + return (true); + } pte = pmap_l1_to_l2(&tpte, va); tpte = pmap_load(pte); if (tpte == 0) - return (0); - if ((tpte & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_BLOCK) - return ((tpte & ~ATTR_MASK) | (va & L2_OFFSET)); + return (false); + if ((tpte & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_BLOCK) { + if (pa != NULL) + *pa = (tpte & ~ATTR_MASK) | (va & L2_OFFSET); + return (true); + } pte = pmap_l2_to_l3(&tpte, va); tpte = pmap_load(pte); if (tpte == 0) + return (false); + if (pa != NULL) + *pa = (tpte & ~ATTR_MASK) | (va & L3_OFFSET); + return (true); +} + +vm_paddr_t +pmap_kextract(vm_offset_t va) +{ + vm_paddr_t pa; + + if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) + return (DMAP_TO_PHYS(va)); + + if (pmap_klookup(va, &pa) == false) return (0); - return ((tpte & ~ATTR_MASK) | (va & L3_OFFSET)); + return (pa); } /*************************************************** @@ -6833,7 +6880,7 @@ pmap_fault(pmap_t pmap, uint64_t esr, uint64_t far) * critical section. Therefore, we must check the * address without acquiring the kernel pmap's lock. */ - if (pmap_kextract(far) != 0) + if (pmap_klookup(far, NULL)) rv = KERN_SUCCESS; } else { PMAP_LOCK(pmap); diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 35a8f6dd488b..201d7559320b 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -743,6 +743,7 @@ #define PAR_F (0x1 << PAR_F_SHIFT) #define PAR_SUCCESS(x) (((x) & PAR_F) == 0) /* When PAR_F == 0 (success) */ +#define PAR_LOW_MASK 0xfff #define PAR_SH_SHIFT 7 #define PAR_SH_MASK (0x3 << PAR_SH_SHIFT) #define PAR_NS_SHIFT 9 diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index 059d188ff847..b05fee999c73 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -167,6 +167,7 @@ void pmap_bootstrap(vm_offset_t, vm_offset_t, vm_paddr_t, vm_size_t); int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode); void pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode); void pmap_kenter_device(vm_offset_t, vm_size_t, vm_paddr_t); +bool pmap_klookup(vm_offset_t va, vm_paddr_t *pa); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kremove(vm_offset_t); void pmap_kremove_device(vm_offset_t, vm_size_t); From owner-dev-commits-src-all@freebsd.org Fri Jan 15 19:33:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E21DA4F05F1; Fri, 15 Jan 2021 19:33:48 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHWZM5TBGz3jGc; Fri, 15 Jan 2021 19:33:47 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1610739218; h=from:from:reply-to:subject: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=zFL3/vS0KP69HTtU3kwUcc44y7OEitL0+xtZgavRMB0=; b=IaHpp1wj/jo+kcxTk3TCN+NUKB4il/JQeD1sT2R8mbH1tYbWIHvtC+Gr4kmnA7199RNFyG 6prpryj68wrZNPqibfVKO1gTQJw26eMzoh498iKttdi08n0jl2sYBmzcHhFo+jWP4RbaE+ Pq6fL92CW6WQ7I5CpvnxXkPpjRFxPuw= Received: from skull.home.blih.net (lfbn-idf2-1-745-114.w86-247.abo.wanadoo.fr [86.247.192.114]) by mx.blih.net (OpenSMTPD) with ESMTPSA id c71a0d96 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 15 Jan 2021 19:33:38 +0000 (UTC) Date: Fri, 15 Jan 2021 20:33:38 +0100 From: Emmanuel Vadot To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 78abc9e2e6ed - main - Revert upstream commit 27c90e5e48d0 Message-Id: <20210115203338.d18bef00225008b820a4cd99@bidouilliste.com> In-Reply-To: <202101151910.10FJA88A078449@gitrepo.freebsd.org> References: <202101151910.10FJA88A078449@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DHWZM5TBGz3jGc X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=IaHpp1wj; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.83.155.74:from]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.3.32:email]; SPAMHAUS_ZRD(0.00)[212.83.155.74:from:127.0.2.255]; DBL_PROHIBIT(0.00)[0.0.3.32:email]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 19:33:48 -0000 On Fri, 15 Jan 2021 19:10:08 GMT Emmanuel Vadot wrote: > The branch main has been updated by manu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=78abc9e2e6edcc286136896c1793d40899750012 > > commit 78abc9e2e6edcc286136896c1793d40899750012 > Author: Emmanuel Vadot > AuthorDate: 2021-01-15 18:02:37 +0000 > Commit: Emmanuel Vadot > CommitDate: 2021-01-15 19:07:08 +0000 > > Revert upstream commit 27c90e5e48d0 > > It changed the #pinctrl-cells value to be equal to 2 and the macro > that generates the values. > Based on the bindings docs a value of 2 is only acceptable if the node > used pinctrl-single,bits and not pinctrl-single,pins > > This allow booting further on the beaglebone black with 5.9 DTS > --- > sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h | 2 +- > sys/contrib/device-tree/src/arm/am33xx-l4.dtsi | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h b/sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h > index 2d2a8c737822..625718042413 100644 > --- a/sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h > +++ b/sys/contrib/device-tree/include/dt-bindings/pinctrl/omap.h > @@ -65,7 +65,7 @@ > #define DM814X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) > #define DM816X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) > #define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) > -#define AM33XX_PADCONF(pa, conf, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) (conf) (mux) > +#define AM33XX_PADCONF(pa, dir, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) ((dir) | (mux)) > > /* > * Macros to allow using the offset from the padconf physical address > diff --git a/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi b/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi > index b88d0caa4b2d..45de2ff6a777 100644 > --- a/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi > +++ b/sys/contrib/device-tree/src/arm/am33xx-l4.dtsi > @@ -290,7 +290,7 @@ > am33xx_pinmux: pinmux@800 { > compatible = "pinctrl-single"; > reg = <0x800 0x238>; > - #pinctrl-cells = <2>; > + #pinctrl-cells = <1>; > pinctrl-single,register-width = <32>; > pinctrl-single,function-mask = <0x7f>; > }; The issue was reported upstream. https://lists.infradead.org/pipermail/linux-arm-kernel/2021-January/631852.html Also we don't have support for pinctrl-single,bits in the TI code so even if they did the right thing that would have break for us. -- Emmanuel Vadot From owner-dev-commits-src-all@freebsd.org Fri Jan 15 20:23:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 754E14F193B; Fri, 15 Jan 2021 20:23: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 4DHXgy21KGz3ly7; Fri, 15 Jan 2021 20:23: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 37E7A22A1A; Fri, 15 Jan 2021 20:23: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 10FKNgte080105; Fri, 15 Jan 2021 20:23:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FKNgbO080104; Fri, 15 Jan 2021 20:23:42 GMT (envelope-from git) Date: Fri, 15 Jan 2021 20:23:42 GMT Message-Id: <202101152023.10FKNgbO080104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: aefe30c54371 - main - cat: capsicumize it MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aefe30c5437159a5399bdbc1974d6fbf40f2ba0f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 20:23:42 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=aefe30c5437159a5399bdbc1974d6fbf40f2ba0f commit aefe30c5437159a5399bdbc1974d6fbf40f2ba0f Author: Mariusz Zaborski AuthorDate: 2021-01-15 20:22:29 +0000 Commit: Mariusz Zaborski CommitDate: 2021-01-15 20:23:42 +0000 cat: capsicumize it Reviewed by: markj, arichardson Differential Revision: https://reviews.freebsd.org/D28083 --- bin/cat/Makefile | 7 +++++ bin/cat/cat.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++--- tools/build/Makefile | 1 + 3 files changed, 93 insertions(+), 4 deletions(-) diff --git a/bin/cat/Makefile b/bin/cat/Makefile index cba55d2870bb..abfdcbcfbb2e 100644 --- a/bin/cat/Makefile +++ b/bin/cat/Makefile @@ -15,4 +15,11 @@ CFLAGS+=-DBOOTSTRAP_CAT HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +.if ${MK_CASPER} != "no" && !defined(RESCUE) && !defined(BOOTSTRAPPING) +LIBADD+= casper +LIBADD+= cap_fileargs +LIBADD+= cap_net +CFLAGS+=-DWITH_CASPER +.endif + .include diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 40d91b243bd4..58f7c15cc9cb 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95"; #include __FBSDID("$FreeBSD$"); +#include #include #include #ifndef NO_UDOM_SUPPORT @@ -56,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #endif +#include #include #include #include @@ -68,9 +70,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + static int bflag, eflag, lflag, nflag, sflag, tflag, vflag; static int rval; static const char *filename; +static fileargs_t *fa; static void usage(void) __dead2; static void scanfiles(char *argv[], int cooked); @@ -80,6 +87,8 @@ static void cook_cat(FILE *); static void raw_cat(int); #ifndef NO_UDOM_SUPPORT +static cap_channel_t *capnet; + static int udom_open(const char *path, int flags); #endif @@ -112,6 +121,53 @@ static int udom_open(const char *path, int flags); #define SUPPORTED_FLAGS "belnstuv" #endif +#ifndef NO_UDOM_SUPPORT +static void +init_casper_net(cap_channel_t *casper) +{ + cap_net_limit_t *limit; + int familylimit; + + capnet = cap_service_open(casper, "system.net"); + if (capnet == NULL) + err(EXIT_FAILURE, "unable to create network service"); + + limit = cap_net_limit_init(capnet, CAPNET_NAME2ADDR | + CAPNET_CONNECTDNS); + if (limit == NULL) + err(EXIT_FAILURE, "unable to create limits"); + + familylimit = AF_LOCAL; + cap_net_limit_name2addr_family(limit, &familylimit, 1); + + if (cap_net_limit(limit) < 0) + err(EXIT_FAILURE, "unable to apply limits"); +} +#endif + +static void +init_casper(int argc, char *argv[]) +{ + cap_channel_t *casper; + cap_rights_t rights; + + casper = cap_init(); + if (casper == NULL) + err(EXIT_FAILURE, "unable to create Casper"); + + fa = fileargs_cinit(casper, argc, argv, O_RDONLY, 0, + cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL), + FA_OPEN | FA_REALPATH); + if (fa == NULL) + err(EXIT_FAILURE, "unable to create fileargs"); + +#ifndef NO_UDOM_SUPPORT + init_casper_net(casper); +#endif + + cap_close(casper); +} + int main(int argc, char *argv[]) { @@ -150,6 +206,7 @@ main(int argc, char *argv[]) usage(); } argv += optind; + argc -= optind; if (lflag) { stdout_lock.l_len = 0; @@ -160,6 +217,13 @@ main(int argc, char *argv[]) err(EXIT_FAILURE, "stdout"); } + init_casper(argc, argv); + + caph_cache_catpages(); + + if (caph_enter_casper() < 0) + err(EXIT_FAILURE, "capsicum"); + if (bflag || eflag || nflag || sflag || tflag || vflag) scanfiles(argv, 1); else @@ -196,7 +260,7 @@ scanfiles(char *argv[], int cooked __unused) fd = STDIN_FILENO; } else { filename = path; - fd = open(path, O_RDONLY); + fd = fileargs_open(fa, path); #ifndef NO_UDOM_SUPPORT if (fd < 0 && errno == EOPNOTSUPP) fd = udom_open(path, O_RDONLY); @@ -366,20 +430,25 @@ udom_open(const char *path, int flags) char rpath[PATH_MAX]; int fd = -1; int error; + cap_rights_t rights; /* * Construct the unix domain socket address and attempt to connect. */ bzero(&hints, sizeof(hints)); hints.ai_family = AF_LOCAL; - if (realpath(path, rpath) == NULL) + + if (fileargs_realpath(fa, path, rpath) == NULL) return (-1); - error = getaddrinfo(rpath, NULL, &hints, &res0); + + error = cap_getaddrinfo(capnet, rpath, NULL, &hints, &res0); if (error) { warn("%s", gai_strerror(error)); errno = EINVAL; return (-1); } + cap_rights_init(&rights, CAP_CONNECT, CAP_READ, CAP_WRITE, + CAP_SHUTDOWN, CAP_FSTAT, CAP_FCNTL); for (res = res0; res != NULL; res = res->ai_next) { fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); @@ -387,7 +456,11 @@ udom_open(const char *path, int flags) freeaddrinfo(res0); return (-1); } - error = connect(fd, res->ai_addr, res->ai_addrlen); + if (caph_rights_limit(fd, &rights) < 0) { + close(fd); + return (-1); + } + error = cap_connect(capnet, fd, res->ai_addr, res->ai_addrlen); if (error == 0) break; else { @@ -403,16 +476,24 @@ udom_open(const char *path, int flags) if (fd >= 0) { switch(flags & O_ACCMODE) { case O_RDONLY: + cap_rights_clear(&rights, CAP_WRITE); if (shutdown(fd, SHUT_WR) == -1) warn(NULL); break; case O_WRONLY: + cap_rights_clear(&rights, CAP_READ); if (shutdown(fd, SHUT_RD) == -1) warn(NULL); break; default: break; } + + cap_rights_clear(&rights, CAP_CONNECT, CAP_SHUTDOWN); + if (caph_rights_limit(fd, &rights) < 0) { + close(fd); + return (-1); + } } return (fd); } diff --git a/tools/build/Makefile b/tools/build/Makefile index 28257a2ea2e5..c0c1786d4bfa 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -202,6 +202,7 @@ CLEANFILES+= subr_capability.c .endif CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h +CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_net/cap_net.h .if empty(SRCS) SRCS= dummy.c From owner-dev-commits-src-all@freebsd.org Fri Jan 15 20:44:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B32244F2540; Fri, 15 Jan 2021 20:44: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 4DHY7y4YBxz3nFy; Fri, 15 Jan 2021 20:44: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 8F0DD22AFA; Fri, 15 Jan 2021 20:44: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 10FKiURU006618; Fri, 15 Jan 2021 20:44:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FKiUS3006617; Fri, 15 Jan 2021 20:44:30 GMT (envelope-from git) Date: Fri, 15 Jan 2021 20:44:30 GMT Message-Id: <202101152044.10FKiUS3006617@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: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a different way, not via rc sequence change. 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: 7e4eca7136eaa35e15f67682468f09aa7127b543 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 20:44:30 -0000 The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468f09aa7127b543 commit 7e4eca7136eaa35e15f67682468f09aa7127b543 Author: Gleb Smirnoff AuthorDate: 2021-01-11 20:13:41 +0000 Commit: Gleb Smirnoff CommitDate: 2021-01-15 20:44:06 +0000 Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a different way, not via rc sequence change. Discussed with: brooks Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D28097 --- libexec/rc/rc.d/tmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp index 3b75ec0338ef..a61321e058ee 100755 --- a/libexec/rc/rc.d/tmp +++ b/libexec/rc/rc.d/tmp @@ -28,7 +28,7 @@ # # PROVIDE: tmp -# REQUIRE: mountcritremote +# REQUIRE: mountcritlocal . /etc/rc.subr From owner-dev-commits-src-all@freebsd.org Fri Jan 15 20:44:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE14C4F2792; Fri, 15 Jan 2021 20:44: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 4DHY7z57FTz3njc; Fri, 15 Jan 2021 20:44: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 A2D4C22AFB; Fri, 15 Jan 2021 20:44: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 10FKiVRT006640; Fri, 15 Jan 2021 20:44:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FKiVCD006639; Fri, 15 Jan 2021 20:44:31 GMT (envelope-from git) Date: Fri, 15 Jan 2021 20:44:31 GMT Message-Id: <202101152044.10FKiVCD006639@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: 4f48fd7c5677 - main - Add 'tmp' to the list of FILESYSTEMS dependencies. Some scripts that depend on FILESYSTEMS run mktemp(1). For systems that have read-only root this is broken until memory disk based /tmp is instantiated. At least 'os-release' and 'motd' are subject to this problem. 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: 4f48fd7c5677c6640cac59706d0340348a5f1d64 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 20:44:31 -0000 The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=4f48fd7c5677c6640cac59706d0340348a5f1d64 commit 4f48fd7c5677c6640cac59706d0340348a5f1d64 Author: Gleb Smirnoff AuthorDate: 2021-01-11 19:11:29 +0000 Commit: Gleb Smirnoff CommitDate: 2021-01-15 20:44:06 +0000 Add 'tmp' to the list of FILESYSTEMS dependencies. Some scripts that depend on FILESYSTEMS run mktemp(1). For systems that have read-only root this is broken until memory disk based /tmp is instantiated. At least 'os-release' and 'motd' are subject to this problem. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D28097 --- libexec/rc/rc.d/FILESYSTEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/FILESYSTEMS b/libexec/rc/rc.d/FILESYSTEMS index c44bbe126e3e..996d8ada987a 100755 --- a/libexec/rc/rc.d/FILESYSTEMS +++ b/libexec/rc/rc.d/FILESYSTEMS @@ -4,7 +4,7 @@ # # PROVIDE: FILESYSTEMS -# REQUIRE: root mountcritlocal cleanvar +# REQUIRE: root mountcritlocal cleanvar tmp # This is a dummy dependency, for services which require filesystems # to be mounted before starting. It also serves as the default early / From owner-dev-commits-src-all@freebsd.org Fri Jan 15 20:49:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D387F4F28B8; Fri, 15 Jan 2021 20:49: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 4DHYG55fbFz3p5T; Fri, 15 Jan 2021 20:49: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 B523C22D96; Fri, 15 Jan 2021 20:49: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 10FKnnoJ007684; Fri, 15 Jan 2021 20:49:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FKnnLI007683; Fri, 15 Jan 2021 20:49:49 GMT (envelope-from git) Date: Fri, 15 Jan 2021 20:49:49 GMT Message-Id: <202101152049.10FKnnLI007683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: c664d8dfc3dd - main - cat: Fix potential memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c664d8dfc3dd65611f63ca8277841a29a46260f1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 20:49:49 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=c664d8dfc3dd65611f63ca8277841a29a46260f1 commit c664d8dfc3dd65611f63ca8277841a29a46260f1 Author: Mariusz Zaborski AuthorDate: 2021-01-15 20:48:39 +0000 Commit: Mariusz Zaborski CommitDate: 2021-01-15 20:49:52 +0000 cat: Fix potential memory leak This was introduced in aefe30c5437159a5399bdbc1974d6fbf40f2ba0f. --- bin/cat/cat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 58f7c15cc9cb..cdfc983610de 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -458,6 +458,7 @@ udom_open(const char *path, int flags) } if (caph_rights_limit(fd, &rights) < 0) { close(fd); + freeaddrinfo(res0); return (-1); } error = cap_connect(capnet, fd, res->ai_addr, res->ai_addrlen); From owner-dev-commits-src-all@freebsd.org Fri Jan 15 20:59:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A5EF4F2B6A; Fri, 15 Jan 2021 20:59: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 4DHYT50F75z3pmj; Fri, 15 Jan 2021 20:59: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 EF1ED23172; Fri, 15 Jan 2021 20:59: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 10FKxKWC020957; Fri, 15 Jan 2021 20:59:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10FKxKCs020956; Fri, 15 Jan 2021 20:59:20 GMT (envelope-from git) Date: Fri, 15 Jan 2021 20:59:20 GMT Message-Id: <202101152059.10FKxKCs020956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vincenzo Maffione Subject: git: b791b5763f2b - stable/12 - netmap: pkt-gen: fix offset hex formatting 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/stable/12 X-Git-Reftype: branch X-Git-Commit: b791b5763f2bf3a3e8c45e00f66f5a63f2a12bf1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 20:59:21 -0000 The branch stable/12 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=b791b5763f2bf3a3e8c45e00f66f5a63f2a12bf1 commit b791b5763f2bf3a3e8c45e00f66f5a63f2a12bf1 Author: Vincenzo Maffione AuthorDate: 2021-01-12 22:02:28 +0000 Commit: Vincenzo Maffione CommitDate: 2021-01-15 20:58:56 +0000 netmap: pkt-gen: fix offset hex formatting PR: 252594 Reported by: brpoole@vt.edu MFC after: 3 days --- tools/tools/netmap/pkt-gen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tools/netmap/pkt-gen.c b/tools/tools/netmap/pkt-gen.c index e6237b8ba281..55504c09ae58 100644 --- a/tools/tools/netmap/pkt-gen.c +++ b/tools/tools/netmap/pkt-gen.c @@ -3176,17 +3176,17 @@ main(int arc, char **argv) struct netmap_if *nifp = g.nmd->nifp; struct nmreq_register *req = &g.nmd->reg; - D("nifp at offset %"PRIu64", %d tx %d rx region %d", + D("nifp at offset %"PRIu64" ntxqs %d nrxqs %d memid %d", req->nr_offset, req->nr_tx_rings, req->nr_rx_rings, req->nr_mem_id); for (i = 0; i < req->nr_tx_rings + req->nr_host_tx_rings; i++) { struct netmap_ring *ring = NETMAP_TXRING(nifp, i); - D(" TX%d at 0x%p slots %d", i, + D(" TX%d at offset %p slots %d", i, (void *)((char *)ring - (char *)nifp), ring->num_slots); } for (i = 0; i < req->nr_rx_rings + req->nr_host_rx_rings; i++) { struct netmap_ring *ring = NETMAP_RXRING(nifp, i); - D(" RX%d at 0x%p slots %d", i, + D(" RX%d at offset %p slots %d", i, (void *)((char *)ring - (char *)nifp), ring->num_slots); } } From owner-dev-commits-src-all@freebsd.org Fri Jan 15 21:02:51 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5BF24F2BD0; Fri, 15 Jan 2021 21:02: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 4DHYY74DZZz3q9s; Fri, 15 Jan 2021 21:02: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 6EC5C22B61; Fri, 15 Jan 2021 21: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 10FL2p08033058; Fri, 15 Jan 2021 21: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 10FL2phB033056; Fri, 15 Jan 2021 21:02:51 GMT (envelope-from git) Date: Fri, 15 Jan 2021 21:02:51 GMT Message-Id: <202101152102.10FL2phB033056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 994e1f40f6db - main - lualoader: use floor division to get correct type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 994e1f40f6db059290cf4a8203c2b9eea22d9a38 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 21:02:51 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=994e1f40f6db059290cf4a8203c2b9eea22d9a38 commit 994e1f40f6db059290cf4a8203c2b9eea22d9a38 Author: Kyle Evans AuthorDate: 2021-01-15 14:15:40 +0000 Commit: Kyle Evans CommitDate: 2021-01-15 21:02:38 +0000 lualoader: use floor division to get correct type This fixes the positioning of the "Welcome to FreeBSD" heading, which was misplaced after the recent update to Lua 5.4. The issue was previously masked by a compatibility knob in Lua 5.3 that would cause float-tagged numbers to render faithfully without the decimal component. Lua 5.4 dropped that and ensures that it always prints a decimal component, even if it has to append a ".0" to the value. Standard division produces a "float", floor division (//) can be used to guarantee an integer. Floating point operations have been completely ripped out of the liblua compiled for the bootloader, so this is a nop. This is decidedly better than trying to hack out the float tag entirely. Reported-by: mjg, probably others MFC-after: 3 days --- stand/lua/drawer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 3ace3884ff8a..6062d7e87a03 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -283,7 +283,7 @@ local function drawbox() end end if menu_header_x == nil then - menu_header_x = x + (w / 2) - (#menu_header / 2) + menu_header_x = x + (w // 2) - (#menu_header // 2) end screen.setcursor(menu_header_x, y) printc(menu_header) From owner-dev-commits-src-all@freebsd.org Sat Jan 16 00:01:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02D5E4F60F6; Sat, 16 Jan 2021 00:01: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 4DHdVq6jrJz4Tfg; Sat, 16 Jan 2021 00:01: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 D958B25630; Sat, 16 Jan 2021 00:01: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 10G017LO062993; Sat, 16 Jan 2021 00:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G017rm062992; Sat, 16 Jan 2021 00:01:07 GMT (envelope-from git) Date: Sat, 16 Jan 2021 00:01:07 GMT Message-Id: <202101160001.10G017rm062992@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: 173779b98f10 - main - Eliminate lock order reversal in UFS when unmounting filesystems with snapshots. 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: 173779b98f104d52ca77e104fee5e4abd09bea58 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 00:01:08 -0000 The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=173779b98f104d52ca77e104fee5e4abd09bea58 commit 173779b98f104d52ca77e104fee5e4abd09bea58 Author: Kirk McKusick AuthorDate: 2021-01-16 00:00:17 +0000 Commit: Kirk McKusick CommitDate: 2021-01-16 00:03:01 +0000 Eliminate lock order reversal in UFS when unmounting filesystems with snapshots. Each vnode has an embedded lock that controls access to its contents. However vnodes describing a UFS snapshot all share a single snapshot lock to coordinate their access and update. As part of mounting a UFS filesystem with snapshots, each of the vnodes describing a snapshot has its individual lock replaced with the snapshot lock. When the filesystem is unmounted the vnode's original lock is returned replacing the snapshot lock. The lock order reversal happens because vnode locks must be acquired before snapshot locks. When unmounting we must lock both the snapshot lock and the vnode lock before swapping them so that the vnode will be continuously locked during the swap. For each vnode representing a snapshot, we must first acquire the snapshot lock to ensure exclusive access to it and its original lock. We then face a lock order reversal when we try to acquire the original vnode lock. The problem is eliminated by doing a non-blocking exclusive lock on the original lock which will always succeed since there are no users of that lock. Sponsored by: Netflix --- sys/ufs/ffs/ffs_snapshot.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 201dbf6000de..32dc47653d18 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -2142,7 +2142,16 @@ ffs_snapshot_unmount(mp) xp->i_nextsnap.tqe_prev = 0; lockmgr(&sn->sn_lock, LK_INTERLOCK | LK_EXCLUSIVE, VI_MTX(devvp)); - lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL); + /* + * Avoid LOR with above snapshot lock. The LK_NOWAIT should + * never fail as the lock is currently unused. Rather than + * panic, we recover by doing the blocking lock. + */ + if (lockmgr(&vp->v_lock, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0) { + printf("ffs_snapshot_unmount: Unexpected LK_NOWAIT " + "failure\n"); + lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL); + } KASSERT(vp->v_vnlock == &sn->sn_lock, ("ffs_snapshot_unmount: lost lock mutation")); vp->v_vnlock = &vp->v_lock; From owner-dev-commits-src-all@freebsd.org Sat Jan 16 00:32:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B0C64F7935; Sat, 16 Jan 2021 00:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHfCD0GD4z4X0R; Sat, 16 Jan 2021 00:32: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 EFF922576F; Sat, 16 Jan 2021 00:32: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 10G0Wdxk005457; Sat, 16 Jan 2021 00:32:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G0WdCv005456; Sat, 16 Jan 2021 00:32:39 GMT (envelope-from git) Date: Sat, 16 Jan 2021 00:32:39 GMT Message-Id: <202101160032.10G0WdCv005456@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: 79a5c790bdf0 - main - Eliminate a locking panic when cleaning up UFS snapshots after a disk failure. 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: 79a5c790bdf08cb925693add4699f3e785c12bc6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 00:32:40 -0000 The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=79a5c790bdf08cb925693add4699f3e785c12bc6 commit 79a5c790bdf08cb925693add4699f3e785c12bc6 Author: Kirk McKusick AuthorDate: 2021-01-16 00:33:00 +0000 Commit: Kirk McKusick CommitDate: 2021-01-16 00:36:42 +0000 Eliminate a locking panic when cleaning up UFS snapshots after a disk failure. Each vnode has an embedded lock that controls access to its contents. However vnodes describing a UFS snapshot all share a single snapshot lock to coordinate their access and update. As part of mounting a UFS filesystem with snapshots, each of the vnodes describing a snapshot has its individual lock replaced with the snapshot lock. When the filesystem is unmounted the vnode's original lock is returned replacing the snapshot lock. When a disk fails while the UFS filesystem it contains is still mounted (for example when a thumb drive is removed) UFS forcibly unmounts the filesystem. The loss of the drive causes the GEOM subsystem to orphan the provider, but the consumer remains until the filesystem has finished with the unmount. Information describing the snapshot locks was being prematurely cleared during the orphaning causing the return of the snapshot vnode's original locks to fail. The fix is to not clear the needed information prematurely. Sponsored by: Netflix --- sys/kern/kern_conf.c | 1 - sys/ufs/ffs/ffs_vfsops.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index c38bbdb29f5f..5211422199bb 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -1172,7 +1172,6 @@ destroy_devl(struct cdev *dev) dev->si_drv1 = 0; dev->si_drv2 = 0; - bzero(&dev->__si_u, sizeof(dev->__si_u)); if (!(dev->si_flags & SI_ALIAS)) { /* Remove from cdevsw list */ diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 52b9b860f817..415bb4614c1a 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1035,6 +1035,7 @@ ffs_mountfs(odevvp, mp, td) VOP_UNLOCK(odevvp); KASSERT(devvp->v_type == VCHR, ("reclaimed devvp")); dev = devvp->v_rdev; + KASSERT(dev->si_snapdata == NULL, ("non-NULL snapshot data")); if (atomic_cmpset_acq_ptr((uintptr_t *)&dev->si_mountpt, 0, (uintptr_t)mp) == 0) { mntfs_freevp(devvp); From owner-dev-commits-src-all@freebsd.org Sat Jan 16 06:08:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1F714D4F63; Sat, 16 Jan 2021 06:08: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 4DHnfB4Gcnz4tVN; Sat, 16 Jan 2021 06:08: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 811F71E59; Sat, 16 Jan 2021 06:08: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 10G682O6036844; Sat, 16 Jan 2021 06:08:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G682wo036843; Sat, 16 Jan 2021 06:08:02 GMT (envelope-from git) Date: Sat, 16 Jan 2021 06:08:02 GMT Message-Id: <202101160608.10G682wo036843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: de661c9f8652 - main - bectl: tests: use -R instead of specifying altroot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de661c9f8652f6a51a6ca83d404d9170404990f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 06:08:02 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=de661c9f8652f6a51a6ca83d404d9170404990f8 commit de661c9f8652f6a51a6ca83d404d9170404990f8 Author: Kyle Evans AuthorDate: 2021-01-16 05:58:12 +0000 Commit: Kyle Evans CommitDate: 2021-01-16 06:07:50 +0000 bectl: tests: use -R instead of specifying altroot -R is currently shorthand for cachefile=none, altroot=. This is functionally the same, but perhaps more resilient to future changes that could be necessary that may be added when -R is specified. MFC after: 1 week --- sbin/bectl/tests/bectl_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/bectl/tests/bectl_test.sh b/sbin/bectl/tests/bectl_test.sh index 5e4a585b485a..36c92235b6d8 100755 --- a/sbin/bectl/tests/bectl_test.sh +++ b/sbin/bectl/tests/bectl_test.sh @@ -51,7 +51,7 @@ bectl_create_setup() kldload -n -q zfs || atf_skip "ZFS module not loaded on the current system" atf_check mkdir -p ${mnt} atf_check truncate -s 1G ${disk} - atf_check zpool create -o altroot=${mnt} ${zpool} ${disk} + atf_check zpool create -R ${mnt} ${zpool} ${disk} atf_check zfs create -o mountpoint=none ${zpool}/ROOT atf_check zfs create -o mountpoint=/ -o canmount=noauto \ ${zpool}/ROOT/default From owner-dev-commits-src-all@freebsd.org Sat Jan 16 06:08:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B41924D4CE8; Sat, 16 Jan 2021 06:08: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 4DHnfC4p2Jz4tSq; Sat, 16 Jan 2021 06:08: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 97A74228F; Sat, 16 Jan 2021 06:08: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 10G6838Q036866; Sat, 16 Jan 2021 06:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G683mL036865; Sat, 16 Jan 2021 06:08:03 GMT (envelope-from git) Date: Sat, 16 Jan 2021 06:08:03 GMT Message-Id: <202101160608.10G683mL036865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 6dd869c22bc4 - main - bectl: remove spurious aok variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6dd869c22bc4960b305a806867df7cfbc114f3a7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 06:08:03 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6dd869c22bc4960b305a806867df7cfbc114f3a7 commit 6dd869c22bc4960b305a806867df7cfbc114f3a7 Author: Kyle Evans AuthorDate: 2021-01-16 06:02:43 +0000 Commit: Kyle Evans CommitDate: 2021-01-16 06:07:50 +0000 bectl: remove spurious aok variable This rode in with the OpenZFS import. It may have been necessary at some point, but it is no longer and it breaks the WITHOUT_DYNAMICROOT build as it collides with the definition in libspl. Reported-by: Michael Dexter --- sbin/bectl/bectl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sbin/bectl/bectl.c b/sbin/bectl/bectl.c index d4573393130d..50229b4b96b7 100644 --- a/sbin/bectl/bectl.c +++ b/sbin/bectl/bectl.c @@ -60,8 +60,6 @@ static int bectl_cmd_unmount(int argc, char *argv[]); libbe_handle_t *be; -int aok; - int usage(bool explicit) { From owner-dev-commits-src-all@freebsd.org Sat Jan 16 06:08:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 378694D513A; Sat, 16 Jan 2021 06: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 4DHnfF04kDz4tpt; Sat, 16 Jan 2021 06:08: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 D10C11E5A; Sat, 16 Jan 2021 06:08: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 10G68440036885; Sat, 16 Jan 2021 06:08:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G684vH036884; Sat, 16 Jan 2021 06:08:04 GMT (envelope-from git) Date: Sat, 16 Jan 2021 06:08:04 GMT Message-Id: <202101160608.10G684vH036884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0bc776f3da70 - main - make check: suppress echo of kyua binary location MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0bc776f3da709e28bf0e22854da0467ea108be1a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 06:08:05 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0bc776f3da709e28bf0e22854da0467ea108be1a commit 0bc776f3da709e28bf0e22854da0467ea108be1a Author: Kyle Evans AuthorDate: 2021-01-16 06:06:49 +0000 Commit: Kyle Evans CommitDate: 2021-01-16 06:07:50 +0000 make check: suppress echo of kyua binary location 986deea5b518ee5bf6b8b1486056a21819bd8bd2 inadvertently removed this; fix it. --- share/mk/suite.test.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/suite.test.mk b/share/mk/suite.test.mk index e772ccd1b292..345aef554424 100644 --- a/share/mk/suite.test.mk +++ b/share/mk/suite.test.mk @@ -90,7 +90,7 @@ KYUA?= kyua # report bogus results unless the new binaries are put in place. realcheck: .PHONY - if ! which -s "${KYUA}"; then \ + @if ! which -s "${KYUA}"; then \ echo; \ echo "kyua binary not installed at expected location (${.TARGET})"; \ echo; \ From owner-dev-commits-src-all@freebsd.org Sat Jan 16 06:41:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B79024D5B62; Sat, 16 Jan 2021 06:41: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 4DHpP34sgSz3CH0; Sat, 16 Jan 2021 06:41: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 99DD228AF; Sat, 16 Jan 2021 06:41: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 10G6fh52086768; Sat, 16 Jan 2021 06:41:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G6fhk8086766; Sat, 16 Jan 2021 06:41:43 GMT (envelope-from git) Date: Sat, 16 Jan 2021 06:41:43 GMT Message-Id: <202101160641.10G6fhk8086766@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: ecdc6d1ddde6 - stable/12 - Add tcgetwinsize(3) and tcsetwinsize(3) to termios 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/12 X-Git-Reftype: branch X-Git-Commit: ecdc6d1ddde65a345904a9a805f9efd522da8eed Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 06:41:43 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ecdc6d1ddde65a345904a9a805f9efd522da8eed commit ecdc6d1ddde65a345904a9a805f9efd522da8eed Author: Konstantin Belousov AuthorDate: 2020-12-24 23:05:31 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-16 06:38:49 +0000 Add tcgetwinsize(3) and tcsetwinsize(3) to termios (cherry picked from commit 7d7fad7bd969fb464f64d34932234060cee112af) --- include/termios.h | 6 ++++++ lib/libc/gen/Symbol.map | 2 ++ lib/libc/gen/termios.c | 14 ++++++++++++++ sys/sys/_winsize.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/ttycom.h | 12 +----------- 5 files changed, 72 insertions(+), 11 deletions(-) diff --git a/include/termios.h b/include/termios.h index ce31d447f60a..9b808329a426 100644 --- a/include/termios.h +++ b/include/termios.h @@ -38,6 +38,9 @@ #include #include #include +#if __BSD_VISIBLE +#include +#endif #ifndef _PID_T_DECLARED typedef __pid_t pid_t; @@ -92,6 +95,9 @@ int tcsetsid(int, pid_t); void cfmakeraw(struct termios *); void cfmakesane(struct termios *); int cfsetspeed(struct termios *, speed_t); + +int tcgetwinsize(int, struct winsize *); +int tcsetwinsize(int, const struct winsize *); #endif __END_DECLS diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index cbc230c3f07f..22de2fd79755 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -429,6 +429,8 @@ FBSD_1.6 { sigandset; sigisemptyset; sigorset; + tcgetwinsize; + tcsetwinsize; }; FBSDprivate_1.0 { diff --git a/lib/libc/gen/termios.c b/lib/libc/gen/termios.c index 7b98c486f472..f072b2f045d9 100644 --- a/lib/libc/gen/termios.c +++ b/lib/libc/gen/termios.c @@ -275,3 +275,17 @@ tcflow(int fd, int action) } /* NOTREACHED */ } + +int +tcgetwinsize(int fd, struct winsize *w) +{ + + return (_ioctl(fd, TIOCGWINSZ, w)); +} + +int +tcsetwinsize(int fd, const struct winsize *w) +{ + + return (_ioctl(fd, TIOCSWINSZ, w)); +} diff --git a/sys/sys/_winsize.h b/sys/sys/_winsize.h new file mode 100644 index 000000000000..78d0b8a6ec38 --- /dev/null +++ b/sys/sys/_winsize.h @@ -0,0 +1,49 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1988, 1989, 1993, 1994 + * 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. + * + * @(#)ttycom.h 8.1 (Berkeley) 3/28/94 + * $FreeBSD$ + */ + +#ifndef _SYS__WINSIZE_H_ +#define _SYS__WINSIZE_H_ + +/* + * Window/terminal size structure. This information is stored by the kernel + * in order to provide a consistent interface, but is not used by the kernel. + */ +struct winsize { + unsigned short ws_row; /* rows, in characters */ + unsigned short ws_col; /* columns, in characters */ + unsigned short ws_xpixel; /* horizontal size, pixels */ + unsigned short ws_ypixel; /* vertical size, pixels */ +}; + +#endif /* !_SYS__WINSIZE_H_ */ diff --git a/sys/sys/ttycom.h b/sys/sys/ttycom.h index 5aabb074a009..a7309d4c5d6b 100644 --- a/sys/sys/ttycom.h +++ b/sys/sys/ttycom.h @@ -41,23 +41,13 @@ #define _SYS_TTYCOM_H_ #include +#include /* * Tty ioctl's except for those supported only for backwards compatibility * with the old tty driver. */ -/* - * Window/terminal size structure. This information is stored by the kernel - * in order to provide a consistent interface, but is not used by the kernel. - */ -struct winsize { - unsigned short ws_row; /* rows, in characters */ - unsigned short ws_col; /* columns, in characters */ - unsigned short ws_xpixel; /* horizontal size, pixels */ - unsigned short ws_ypixel; /* vertical size, pixels */ -}; - /* 0-2 compat */ /* 3-7 unused */ /* 8-10 compat */ From owner-dev-commits-src-all@freebsd.org Sat Jan 16 06:41:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E51414D5C5C; Sat, 16 Jan 2021 06:41: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 4DHpP45w22z3Bnj; Sat, 16 Jan 2021 06:41: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 BADEB25D3; Sat, 16 Jan 2021 06:41: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 10G6fi3U086789; Sat, 16 Jan 2021 06:41:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G6finf086788; Sat, 16 Jan 2021 06:41:44 GMT (envelope-from git) Date: Sat, 16 Jan 2021 06:41:44 GMT Message-Id: <202101160641.10G6finf086788@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: 8af3b2026a8e - stable/12 - tcgetwinsize(3): provide man page 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/12 X-Git-Reftype: branch X-Git-Commit: 8af3b2026a8eafba9f22d823c30900b019b813fe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 06:41:45 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8af3b2026a8eafba9f22d823c30900b019b813fe commit 8af3b2026a8eafba9f22d823c30900b019b813fe Author: Konstantin Belousov AuthorDate: 2021-01-01 22:28:42 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-16 06:39:15 +0000 tcgetwinsize(3): provide man page (cherry picked from commit 4e0c81c5fafb5b72cabc342f640aff6cac445853) --- lib/libc/gen/Makefile.inc | 2 + lib/libc/gen/tcgetwinsize.3 | 164 ++++++++++++++++++++++++++++++++++++++++++++ share/man/man4/termios.4 | 1 + 3 files changed, 167 insertions(+) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 264b079b9ed0..5431ea33f7c3 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -301,6 +301,7 @@ MAN+= alarm.3 \ syslog.3 \ tcgetpgrp.3 \ tcgetsid.3 \ + tcgetwinsize.3 \ tcsendbreak.3 \ tcsetattr.3 \ tcsetpgrp.3 \ @@ -516,6 +517,7 @@ MLINKS+=syslog.3 closelog.3 \ syslog.3 openlog.3 \ syslog.3 setlogmask.3 \ syslog.3 vsyslog.3 +MLINKS+=tcgetwinsize.3 tcsetwinsize.3 MLINKS+=tcsendbreak.3 tcdrain.3 \ tcsendbreak.3 tcflow.3 \ tcsendbreak.3 tcflush.3 diff --git a/lib/libc/gen/tcgetwinsize.3 b/lib/libc/gen/tcgetwinsize.3 new file mode 100644 index 000000000000..1bc96689c792 --- /dev/null +++ b/lib/libc/gen/tcgetwinsize.3 @@ -0,0 +1,164 @@ +.\"- +.\" Copyright (c) 2020 Soumendra Ganguly +.\" +.\" 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 COPYRIGHT HOLDER(S) ``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(S) 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. +.\" +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from P1003.1-202x, Draft 1.1, Draft Standard for Information Technology -- +.\" Portable Operating System Interface (POSIX), The Open Group Base +.\" Specifications Issue 8, Copyright (C) 2020 by the Institute of +.\" Electrical and Electronics Engineers, Inc and The Open Group. In the +.\" event of any discrepancy between this version and the original IEEE and +.\" The Open Group Standard, the original IEEE and The Open Group Standard is +.\" the referee document. The original Standard can be obtained online at +.\" http://www.opengroup.org/unix/online.html. +.\" +.\" $FreeBSD$ +.\" +.Dd December 28, 2020 +.Dt TCGETWINSIZE 3 +.Os +.Sh NAME +.Nm tcgetwinsize , +.Nm tcsetwinsize +.Nd get, set the size of a terminal window +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In termios.h +.Bd -literal +struct winsize { + unsigned short ws_row; /* number of rows, in characters */ + unsigned short ws_col; /* number of columns, in characters */ + unsigned short ws_xpixel; /* horizontal size, in pixels */ + unsigned short ws_ypixel; /* vertical size, in pixels */ +}; +.Ed +.Pp +.Ft int +.Fn tcgetwinsize "int fd" "struct winsize *w" +.Ft int +.Fn tcsetwinsize "int fd" "const struct winsize *w" +.Sh DESCRIPTION +The +.Fn tcgetwinsize +function gets the terminal window size of the terminal of which +.Fa fd +is an open file descriptor and stores it in the +.Vt winsize +structure of which +.Fa w +is a pointer. +.Pp +The +.Fn tcsetwinsize +function sets the terminal window size of the terminal of which +.Fa fd +is an open file descriptor from the +.Vt winsize +structure referenced by +.Fa w . +The change occurs immediately. +If the terminal window size of the terminal +is changed successfully to have a value that is different from the value that +it had before the +.Fn tcsetwinsize +call, then the +.Dv SIGWINCH +signal is sent to all those members of the foreground process group of the +terminal that have the terminal as their controlling terminal. +.Pp +The above declaration of +.Vt "struct winsize" +may not be literal. +It is provided only to list the accessible members. +Therefore, before calling +.Fn tcsetwinsize , +the members of the +.Vt winsize +structure must be initialized by calling +.Fn tcgetwinsize . +The information in a +.Vt winsize +structure is stored by the kernel in order to provide a consistent interface, +but it is not used by the kernel. +.Sh RETURN VALUE +.Rv -std tcgetwinsize tcsetwinsize +The terminal window size remains unchanged if +.Fn tcsetwinsize +fails. +.Pp +.Sh ERRORS +The following are the possible failure conditions: +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa fd +argument to +.Fn tcgetwinsize +or to +.Fn tcsetwinsize +is not a valid file descriptor. +.It Bq Er ENOTTY +The +.Fa fd +argument to +.Fn tcgetwinsize +or to +.Fn tcsetwinsize +is not associated with a character special device. +.It Bq Er EINVAL +The +.Fa w +argument to +.Fn tcsetwinsize +is not valid. +.It Bq Er EFAULT +The +.Fa w +argument to +.Fn tcgetwinsize +or to +.Fn tcsetwinsize +points outside the process's allocated address space. +.El +.Sh SEE ALSO +.Xr stty 1 , +.Xr ioctl 2 , +.Xr sigaction 2 , +.Xr termios 4 , +.Xr tty 4 +.Sh STANDARDS +The +.Fn tcgetwinsize +and +.Fn tcsetwinsize +functions are expected to conform to +.St -p1003.1 +Base Specifications, Issue 8. +The +.Fa ws_xpixel +and +.Fa ws_ypixel +members of +.Vt "struct winsize" +are FreeBSD extensions. diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index a08abfa12c66..81d76aa873fd 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -1575,6 +1575,7 @@ the values in the header .Sh SEE ALSO .Xr stty 1 , .Xr tcgetsid 3 , +.Xr tcgetwinsize 3, .Xr tcsendbreak 3 , .Xr tcsetattr 3 , .Xr tcsetsid 3 , From owner-dev-commits-src-all@freebsd.org Sat Jan 16 06:41:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93B0F4D5BE8; Sat, 16 Jan 2021 06:41: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 4DHpP617QLz3C7D; Sat, 16 Jan 2021 06:41: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 D15212444; Sat, 16 Jan 2021 06:41: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 10G6fj6b086811; Sat, 16 Jan 2021 06:41:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G6fjB9086810; Sat, 16 Jan 2021 06:41:45 GMT (envelope-from git) Date: Sat, 16 Jan 2021 06:41:45 GMT Message-Id: <202101160641.10G6fjB9086810@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: e88bf6998796 - stable/12 - x86 budma_bounce: style. 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/12 X-Git-Reftype: branch X-Git-Commit: e88bf6998796b7e286cc4c2590e09a4292b9c5c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 06:41:48 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e88bf6998796b7e286cc4c2590e09a4292b9c5c9 commit e88bf6998796b7e286cc4c2590e09a4292b9c5c9 Author: Konstantin Belousov AuthorDate: 2021-01-11 23:42:04 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-16 06:40:54 +0000 x86 budma_bounce: style. (cherry picked from commit 895ad33784e00fc9d601fd51f0571e0e02d9d146) --- sys/x86/x86/busdma_bounce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c index a66881e79b58..43cf37230d72 100644 --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -400,7 +400,7 @@ bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) * A dmamap to for use with dmamap_load is also allocated. */ static int -bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, +bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, bus_dmamap_t *mapp) { vm_memattr_t attr; From owner-dev-commits-src-all@freebsd.org Sat Jan 16 08:12:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D0F44D7F72; Sat, 16 Jan 2021 08:12:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHrQ30dj5z3H59; Sat, 16 Jan 2021 08:12:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x42f.google.com with SMTP id c5so11480505wrp.6; Sat, 16 Jan 2021 00:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iTtT+ROStJcco86TGrTO241PzQPeruEKcjFX28QKpuk=; b=NDfhPEa4ffdrjADNWtfjPrffqO4/NeSqWtyDW050QH0KCUO2wsTVvTyOPxrZ/EW3OP vpAw43+/BS6NzMiQKQ9WsDiXtSb49IVsbFQtfQRjR1Pe+vCxTzQHCxrOQDuupqghbSNA Yp8ZchENbYF6T/IcM4h2Az//KwOcvJXAqCf25HjWgzKvh+gks3rLGHKx+CAN+qA0QDBh ypZiJoHU3i2JIQAp0E5bXp2B1eB0HCAIFEhrVMQLOzF33omJFCL4+BYv5gP0WYJz77ue 9BxG9gb/GIWdfiratcN0POD4kL+TYU6t6VfVVmCzpIrD0rxbbnBUESUUY9P+crUkA6Vf zP7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=iTtT+ROStJcco86TGrTO241PzQPeruEKcjFX28QKpuk=; b=AGLgFYYL7ojsekmqJfYwYmNJBENH0Q3Pr/upFFSVJAi0NzIWkRgKugOtKMUo5lX2Pi Hu7r7LQJEE1H2u738SKyG6ugdEMSxQd+MuUcvKAf1kyMmUHmsjSd2X55oHyhRJ9B/JY2 Jwec0WbLCIwN8mr+EsizYymqVUaL7JJjh2uSkpmdDVu5sMSIlDcpqS2sCR8TWcTijHNN LezwqpbbgQywR5DNmJZLZg2NY1uU5FqVW4OJMdkmUT3xTJcry2VpAb8b7qaNc/ydjff7 XXa1fJ632BRZcSIWiXNebip6rJust2sDPMKWKB6LYnzuQqTiSLwsTxoKmnqVGb3m/qYh KAXw== X-Gm-Message-State: AOAM531Q7nQW8TrnKnQUyxwunzCTzO/qMov+GWOya1YmmvijqnUJZmEW q2s/JgY80uy6Pps7QPku4e6/Syo3PyVj9I6bfPqRQ7jG X-Google-Smtp-Source: ABdhPJwBZTq3uFvo1JMDmcmRbA226cCLvXI+97GP/bbWgTVl8hwh/nIhequAhz9sY3Ut7ttXsS2/BYQj5/4OjpZ87FM= X-Received: by 2002:a5d:4e92:: with SMTP id e18mr17498028wru.66.1610784760615; Sat, 16 Jan 2021 00:12:40 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Sat, 16 Jan 2021 00:12:39 -0800 (PST) In-Reply-To: <202101152023.10FKNgbO080104@gitrepo.freebsd.org> References: <202101152023.10FKNgbO080104@gitrepo.freebsd.org> From: Mateusz Guzik Date: Sat, 16 Jan 2021 09:12:39 +0100 Message-ID: Subject: Re: git: aefe30c54371 - main - cat: capsicumize it To: Mariusz Zaborski Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston , Alex Richardson Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DHrQ30dj5z3H59 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 08:12:43 -0000 I have to strongly disagree with this change. truss -f cat /etc/motd immediately reveals most peculiar overhead which comes with it. Some examples: - pdfork is called 3 times and fork 1 time, spawning 4 processes in total - the file is opened twice: 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) = 5 (0x5) 5548: cap_rights_limit(5,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) = 0 (0x0) 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) = 7 (0x7) 5548: cap_rights_limit(7,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) = 0 (0x0) - there is an enormous number of sendto/recvfrom instead of everything happening in just one go Key points: - the functionality provided by casper definitely induces way more overhead than it should. - regardless of the above, I find patching tools like tail and cat in this manner to be highly questionable. Ultimately whatever security may or may not have been gained it always have to be gauged against actual impact and it does not look it is worth it in this case. Even if someone was to put cat in capability mode, for something as trivial a opening one file, cat could just do it without all the other overhead and then enter the sandbox. That said, I think this change (and possibly similar changes to other tooling) should be reverted. Regardless of what happens here, casper needs a lot of work before it is deemed usable. My $0,03. On 1/15/21, Mariusz Zaborski wrote: > The branch main has been updated by oshogbo: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=aefe30c5437159a5399bdbc1974d6fbf40f2ba0f > > commit aefe30c5437159a5399bdbc1974d6fbf40f2ba0f > Author: Mariusz Zaborski > AuthorDate: 2021-01-15 20:22:29 +0000 > Commit: Mariusz Zaborski > CommitDate: 2021-01-15 20:23:42 +0000 > > cat: capsicumize it > > Reviewed by: markj, arichardson > Differential Revision: https://reviews.freebsd.org/D28083 > --- > bin/cat/Makefile | 7 +++++ > bin/cat/cat.c | 89 > +++++++++++++++++++++++++++++++++++++++++++++++++--- > tools/build/Makefile | 1 + > 3 files changed, 93 insertions(+), 4 deletions(-) > > diff --git a/bin/cat/Makefile b/bin/cat/Makefile > index cba55d2870bb..abfdcbcfbb2e 100644 > --- a/bin/cat/Makefile > +++ b/bin/cat/Makefile > @@ -15,4 +15,11 @@ CFLAGS+=-DBOOTSTRAP_CAT > HAS_TESTS= > SUBDIR.${MK_TESTS}+= tests > > +.if ${MK_CASPER} != "no" && !defined(RESCUE) && !defined(BOOTSTRAPPING) > +LIBADD+= casper > +LIBADD+= cap_fileargs > +LIBADD+= cap_net > +CFLAGS+=-DWITH_CASPER > +.endif > + > .include > diff --git a/bin/cat/cat.c b/bin/cat/cat.c > index 40d91b243bd4..58f7c15cc9cb 100644 > --- a/bin/cat/cat.c > +++ b/bin/cat/cat.c > @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) > 4/27/95"; > #include > __FBSDID("$FreeBSD$"); > > +#include > #include > #include > #ifndef NO_UDOM_SUPPORT > @@ -56,6 +57,7 @@ __FBSDID("$FreeBSD$"); > #include > #endif > > +#include > #include > #include > #include > @@ -68,9 +70,14 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > +#include > +#include > + > static int bflag, eflag, lflag, nflag, sflag, tflag, vflag; > static int rval; > static const char *filename; > +static fileargs_t *fa; > > static void usage(void) __dead2; > static void scanfiles(char *argv[], int cooked); > @@ -80,6 +87,8 @@ static void cook_cat(FILE *); > static void raw_cat(int); > > #ifndef NO_UDOM_SUPPORT > +static cap_channel_t *capnet; > + > static int udom_open(const char *path, int flags); > #endif > > @@ -112,6 +121,53 @@ static int udom_open(const char *path, int flags); > #define SUPPORTED_FLAGS "belnstuv" > #endif > > +#ifndef NO_UDOM_SUPPORT > +static void > +init_casper_net(cap_channel_t *casper) > +{ > + cap_net_limit_t *limit; > + int familylimit; > + > + capnet = cap_service_open(casper, "system.net"); > + if (capnet == NULL) > + err(EXIT_FAILURE, "unable to create network service"); > + > + limit = cap_net_limit_init(capnet, CAPNET_NAME2ADDR | > + CAPNET_CONNECTDNS); > + if (limit == NULL) > + err(EXIT_FAILURE, "unable to create limits"); > + > + familylimit = AF_LOCAL; > + cap_net_limit_name2addr_family(limit, &familylimit, 1); > + > + if (cap_net_limit(limit) < 0) > + err(EXIT_FAILURE, "unable to apply limits"); > +} > +#endif > + > +static void > +init_casper(int argc, char *argv[]) > +{ > + cap_channel_t *casper; > + cap_rights_t rights; > + > + casper = cap_init(); > + if (casper == NULL) > + err(EXIT_FAILURE, "unable to create Casper"); > + > + fa = fileargs_cinit(casper, argc, argv, O_RDONLY, 0, > + cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL), > + FA_OPEN | FA_REALPATH); > + if (fa == NULL) > + err(EXIT_FAILURE, "unable to create fileargs"); > + > +#ifndef NO_UDOM_SUPPORT > + init_casper_net(casper); > +#endif > + > + cap_close(casper); > +} > + > int > main(int argc, char *argv[]) > { > @@ -150,6 +206,7 @@ main(int argc, char *argv[]) > usage(); > } > argv += optind; > + argc -= optind; > > if (lflag) { > stdout_lock.l_len = 0; > @@ -160,6 +217,13 @@ main(int argc, char *argv[]) > err(EXIT_FAILURE, "stdout"); > } > > + init_casper(argc, argv); > + > + caph_cache_catpages(); > + > + if (caph_enter_casper() < 0) > + err(EXIT_FAILURE, "capsicum"); > + > if (bflag || eflag || nflag || sflag || tflag || vflag) > scanfiles(argv, 1); > else > @@ -196,7 +260,7 @@ scanfiles(char *argv[], int cooked __unused) > fd = STDIN_FILENO; > } else { > filename = path; > - fd = open(path, O_RDONLY); > + fd = fileargs_open(fa, path); > #ifndef NO_UDOM_SUPPORT > if (fd < 0 && errno == EOPNOTSUPP) > fd = udom_open(path, O_RDONLY); > @@ -366,20 +430,25 @@ udom_open(const char *path, int flags) > char rpath[PATH_MAX]; > int fd = -1; > int error; > + cap_rights_t rights; > > /* > * Construct the unix domain socket address and attempt to connect. > */ > bzero(&hints, sizeof(hints)); > hints.ai_family = AF_LOCAL; > - if (realpath(path, rpath) == NULL) > + > + if (fileargs_realpath(fa, path, rpath) == NULL) > return (-1); > - error = getaddrinfo(rpath, NULL, &hints, &res0); > + > + error = cap_getaddrinfo(capnet, rpath, NULL, &hints, &res0); > if (error) { > warn("%s", gai_strerror(error)); > errno = EINVAL; > return (-1); > } > + cap_rights_init(&rights, CAP_CONNECT, CAP_READ, CAP_WRITE, > + CAP_SHUTDOWN, CAP_FSTAT, CAP_FCNTL); > for (res = res0; res != NULL; res = res->ai_next) { > fd = socket(res->ai_family, res->ai_socktype, > res->ai_protocol); > @@ -387,7 +456,11 @@ udom_open(const char *path, int flags) > freeaddrinfo(res0); > return (-1); > } > - error = connect(fd, res->ai_addr, res->ai_addrlen); > + if (caph_rights_limit(fd, &rights) < 0) { > + close(fd); > + return (-1); > + } > + error = cap_connect(capnet, fd, res->ai_addr, res->ai_addrlen); > if (error == 0) > break; > else { > @@ -403,16 +476,24 @@ udom_open(const char *path, int flags) > if (fd >= 0) { > switch(flags & O_ACCMODE) { > case O_RDONLY: > + cap_rights_clear(&rights, CAP_WRITE); > if (shutdown(fd, SHUT_WR) == -1) > warn(NULL); > break; > case O_WRONLY: > + cap_rights_clear(&rights, CAP_READ); > if (shutdown(fd, SHUT_RD) == -1) > warn(NULL); > break; > default: > break; > } > + > + cap_rights_clear(&rights, CAP_CONNECT, CAP_SHUTDOWN); > + if (caph_rights_limit(fd, &rights) < 0) { > + close(fd); > + return (-1); > + } > } > return (fd); > } > diff --git a/tools/build/Makefile b/tools/build/Makefile > index 28257a2ea2e5..c0c1786d4bfa 100644 > --- a/tools/build/Makefile > +++ b/tools/build/Makefile > @@ -202,6 +202,7 @@ CLEANFILES+= subr_capability.c > .endif > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h > +CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_net/cap_net.h > > .if empty(SRCS) > SRCS= dummy.c > -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Sat Jan 16 08:23:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D189C4D87B4; Sat, 16 Jan 2021 08:23: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 4DHrfn5cKsz3Hp3; Sat, 16 Jan 2021 08:23: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 B2D0D3AF3; Sat, 16 Jan 2021 08:23: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 10G8Njgn016926; Sat, 16 Jan 2021 08:23:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G8NjEi016925; Sat, 16 Jan 2021 08:23:45 GMT (envelope-from git) Date: Sat, 16 Jan 2021 08:23:45 GMT Message-Id: <202101160823.10G8NjEi016925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: ad1ebbe5cea8 - main - loader: create local copy of mode list provided by vbeinfoblock MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad1ebbe5cea8ffac0037966990ddf0f80faa55d5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 08:23:45 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=ad1ebbe5cea8ffac0037966990ddf0f80faa55d5 commit ad1ebbe5cea8ffac0037966990ddf0f80faa55d5 Author: Toomas Soome AuthorDate: 2021-01-16 10:18:32 +0000 Commit: Toomas Soome CommitDate: 2021-01-16 10:23:22 +0000 loader: create local copy of mode list provided by vbeinfoblock Apparently some systems do corrupt mode list memory area, so we need to use local copy instead. --- stand/i386/libi386/vbe.c | 82 +++++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/stand/i386/libi386/vbe.c b/stand/i386/libi386/vbe.c index 6a70cfe6f3e9..8b2c74ade92e 100644 --- a/stand/i386/libi386/vbe.c +++ b/stand/i386/libi386/vbe.c @@ -48,12 +48,14 @@ static struct vbeinfoblock *vbe; static struct modeinfoblock *vbe_mode; + +static uint16_t *vbe_mode_list; +static size_t vbe_mode_list_size; + /* The default VGA color palette format is 6 bits per primary color. */ int palette_format = 6; #define VESA_MODE_BASE 0x100 -#define VESA_MODE_MAX 0x1ff -#define VESA_MODE_COUNT (VESA_MODE_MAX - VESA_MODE_BASE + 1) /* * palette array for 8-bit indexed colors. In this case, cmap does store @@ -545,9 +547,17 @@ mode_set(struct env_var *ev, int flags __unused, const void *value) return (0); } +static void * +vbe_farptr(uint32_t farptr) +{ + return (PTOV((((farptr & 0xffff0000) >> 12) + (farptr & 0xffff)))); +} + void vbe_init(void) { + uint16_t *p, *ml; + /* First set FB for text mode. */ gfx_state.tg_fb_type = FB_TEXT; gfx_state.tg_fb.fb_height = TEXT_ROWS; @@ -573,6 +583,27 @@ vbe_init(void) vbe_mode = NULL; } + /* + * Copy mode list. We must do this because some systems do + * corrupt the provided list (vbox 6.1 is one example). + */ + p = ml = vbe_farptr(vbe->VideoModePtr); + while(*p++ != 0xFFFF) + ; + + vbe_mode_list_size = (uintptr_t)p - (uintptr_t)ml; + vbe_mode_list = malloc(vbe_mode_list_size); + if (vbe_mode_list == NULL) { + free(vbe); + vbe = NULL; + free(vbe_mode); + vbe_mode = NULL; + } + bcopy(ml, vbe_mode_list, vbe_mode_list_size); + + /* reset VideoModePtr, so we will not have chance to use bad data. */ + vbe->VideoModePtr = 0; + env_setenv("screen.textmode", EV_VOLATILE, "1", mode_set, env_nounset); env_setenv("vbe_max_resolution", EV_VOLATILE, NULL, mode_set, @@ -717,12 +748,6 @@ vbe_set_mode(int modenum) return (0); } -static void * -vbe_farptr(uint32_t farptr) -{ - return (PTOV((((farptr & 0xffff0000) >> 12) + (farptr & 0xffff)))); -} - /* * Verify existance of mode number or find mode by * dimensions. If depth is not given, walk values 32, 24, 16, 8. @@ -731,15 +756,13 @@ static int vbe_find_mode_xydm(int x, int y, int depth, int m) { struct modeinfoblock mi; - uint32_t farptr; + uint16_t *farptr; uint16_t mode; - int safety, i; + int idx, nitems, i; memset(vbe, 0, sizeof (*vbe)); if (biosvbe_info(vbe) != VBE_SUCCESS) return (0); - if (vbe->VideoModePtr == 0) - return (0); if (m != -1) i = 8; @@ -748,17 +771,17 @@ vbe_find_mode_xydm(int x, int y, int depth, int m) else i = depth; + nitems = vbe_mode_list_size / sizeof(*vbe_mode_list); while (i > 0) { - farptr = vbe->VideoModePtr; - safety = 0; - while ((mode = *(uint16_t *)vbe_farptr(farptr)) != 0xffff) { - safety++; - farptr += 2; - if (safety == VESA_MODE_COUNT) + for (idx = 0; idx < nitems; idx++) { + mode = vbe_mode_list[idx]; + if (mode == 0xffff) break; + if (biosvbe_get_mode_info(mode, &mi) != VBE_SUCCESS) { continue; } + /* we only care about linear modes here */ if (vbe_mode_is_supported(&mi) == 0) continue; @@ -910,9 +933,8 @@ void vbe_modelist(int depth) { struct modeinfoblock mi; - uint32_t farptr; uint16_t mode; - int nmodes = 0, safety = 0; + int nmodes, idx, nentries; int ddc_caps; uint32_t width, height; bool edid = false; @@ -948,6 +970,7 @@ vbe_modelist(int depth) if (vbe_get_flatpanel(&width, &height)) printf(": Panel %dx%d\n", width, height); + nmodes = 0; memset(vbe, 0, sizeof (*vbe)); memcpy(vbe->VbeSignature, "VBE2", 4); if (biosvbe_info(vbe) != VBE_SUCCESS) @@ -958,26 +981,19 @@ vbe_modelist(int depth) vbe_print_vbe_info(vbe); printf("Modes: "); - farptr = vbe->VideoModePtr; - if (farptr == 0) - goto done; - - while ((mode = *(uint16_t *)vbe_farptr(farptr)) != 0xffff) { - safety++; - farptr += 2; - if (safety == VESA_MODE_COUNT) { - printf("[?] "); + nentries = vbe_mode_list_size / sizeof(*vbe_mode_list); + for (idx = 0; idx < nentries; idx++) { + mode = vbe_mode_list[idx]; + if (mode == 0xffff) break; - } + if (biosvbe_get_mode_info(mode, &mi) != VBE_SUCCESS) continue; + /* we only care about linear modes here */ if (vbe_mode_is_supported(&mi) == 0) continue; - /* we found some mode so reset safety counter */ - safety = 0; - /* apply requested filter */ if (depth != -1 && mi.BitsPerPixel != depth) continue; From owner-dev-commits-src-all@freebsd.org Sat Jan 16 08:29:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 483244D8479; Sat, 16 Jan 2021 08: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 4DHrnm1XxWz3J3c; Sat, 16 Jan 2021 08: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 27C243F1C; Sat, 16 Jan 2021 08: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 10G8TmNM018025; Sat, 16 Jan 2021 08:29:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G8TmEf018024; Sat, 16 Jan 2021 08:29:48 GMT (envelope-from git) Date: Sat, 16 Jan 2021 08:29:48 GMT Message-Id: <202101160829.10G8TmEf018024@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: 2968dde3de6f - main - axgbe: driver changes for netmap support 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: 2968dde3de6f6274517904add6a0a8e2e3f9662b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 08:29:48 -0000 The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=2968dde3de6f6274517904add6a0a8e2e3f9662b commit 2968dde3de6f6274517904add6a0a8e2e3f9662b Author: Vincenzo Maffione AuthorDate: 2021-01-16 08:23:19 +0000 Commit: Vincenzo Maffione CommitDate: 2021-01-16 08:29:33 +0000 axgbe: driver changes for netmap support AMD 10GbE hardware is designed to have two buffers per receive descriptor to support split header feature. For this purpose, the driver was designed to use 2 iflib freelists per receive queue. So, that buffers from 2 freelists are used to refill an entry in the receive descriptor. The current design holds good with regular data traffic. But, when netmap comes into play, the current design will not fit in. The current netmap interfaces and netmap implementation in iflib doesn't seem to accomodate the design of 2 freelists per receive queue. So, exercising Netmap capability with inbuilt tools like bridge, pkt-gen doesn't work with the 2 freelists driver design. So, the driver design is changed to accomodate the current netmap interfaces and netmap implementation in iflib by using single freelist per receive queue approach when Netmap capability is exercised without disturbing the current 2 freelists approach. The dev.ax.sph_enable tunable can be set to 0 to configure the single free list mode. Thanks to Stephan Dewt for his Initial set of code changes for the stated problem. Submitted by: rajesh1.kumar_amd.com Approved by: vmaffione MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D27797 --- sys/dev/axgbe/if_axgbe_pci.c | 100 +++++++++++++++++++++++++++++++----- sys/dev/axgbe/xgbe-dev.c | 33 +++++++++--- sys/dev/axgbe/xgbe-sysctl.c | 4 ++ sys/dev/axgbe/xgbe-txrx.c | 120 +++++++++++++++++++++++++++---------------- sys/dev/axgbe/xgbe.h | 6 +++ 5 files changed, 198 insertions(+), 65 deletions(-) diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c index 7c4645792321..fe42aaac6568 100644 --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -62,6 +63,7 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_AXGBE, "axgbe", "axgbe data"); extern struct if_txrx axgbe_txrx; +static int axgbe_sph_enable; /* Function prototypes */ static void *axgbe_register(device_t); @@ -252,16 +254,11 @@ static struct if_shared_ctx axgbe_sctx_init = { .isc_vendor_info = axgbe_vendor_info_array, .isc_driver_version = XGBE_DRV_VERSION, - .isc_nrxd_min = {XGBE_RX_DESC_CNT_MIN, XGBE_RX_DESC_CNT_MIN}, - .isc_nrxd_default = {XGBE_RX_DESC_CNT_DEFAULT, XGBE_RX_DESC_CNT_DEFAULT}, - .isc_nrxd_max = {XGBE_RX_DESC_CNT_MAX, XGBE_RX_DESC_CNT_MAX}, .isc_ntxd_min = {XGBE_TX_DESC_CNT_MIN}, .isc_ntxd_default = {XGBE_TX_DESC_CNT_DEFAULT}, .isc_ntxd_max = {XGBE_TX_DESC_CNT_MAX}, - .isc_nfl = 2, .isc_ntxqs = 1, - .isc_nrxqs = 2, .isc_flags = IFLIB_TSO_INIT_IP | IFLIB_NEED_SCRATCH | IFLIB_NEED_ZERO_CSUM | IFLIB_NEED_ETHER_PAD, }; @@ -269,6 +266,44 @@ static struct if_shared_ctx axgbe_sctx_init = { static void * axgbe_register(device_t dev) { + int axgbe_nfl; + int axgbe_nrxqs; + int error, i; + char *value = NULL; + + value = kern_getenv("dev.ax.sph_enable"); + if (value) { + axgbe_sph_enable = strtol(value, NULL, 10); + freeenv(value); + } else { + /* + * No tunable found, generate one with default values + * Note: only a reboot will reveal the new kenv + */ + error = kern_setenv("dev.ax.sph_enable", "1"); + if (error) { + printf("Error setting tunable, using default driver values\n"); + } + axgbe_sph_enable = 1; + } + + if (!axgbe_sph_enable) { + axgbe_nfl = 1; + axgbe_nrxqs = 1; + } else { + axgbe_nfl = 2; + axgbe_nrxqs = 2; + } + + axgbe_sctx_init.isc_nfl = axgbe_nfl; + axgbe_sctx_init.isc_nrxqs = axgbe_nrxqs; + + for (i = 0 ; i < axgbe_nrxqs ; i++) { + axgbe_sctx_init.isc_nrxd_min[i] = XGBE_RX_DESC_CNT_MIN; + axgbe_sctx_init.isc_nrxd_default[i] = XGBE_RX_DESC_CNT_DEFAULT; + axgbe_sctx_init.isc_nrxd_max[i] = XGBE_RX_DESC_CNT_MAX; + } + return (&axgbe_sctx_init); } @@ -1292,6 +1327,9 @@ axgbe_if_attach_post(if_ctx_t ctx) if_softc_ctx_t scctx = sc->scctx; int i, ret; + /* set split header support based on tunable */ + pdata->sph_enable = axgbe_sph_enable; + /* Initialize ECC timestamps */ pdata->tx_sec_period = ticks; pdata->tx_ded_period = ticks; @@ -1404,6 +1442,8 @@ axgbe_if_attach_post(if_ctx_t ctx) axgbe_sysctl_init(pdata); + axgbe_pci_init(pdata); + return (0); } /* axgbe_if_attach_post */ @@ -1491,7 +1531,12 @@ axgbe_pci_init(struct xgbe_prv_data *pdata) struct xgbe_phy_if *phy_if = &pdata->phy_if; struct xgbe_hw_if *hw_if = &pdata->hw_if; int ret = 0; - + + if (!__predict_false((test_bit(XGBE_DOWN, &pdata->dev_state)))) { + axgbe_printf(1, "%s: Starting when XGBE_UP\n", __func__); + return; + } + hw_if->init(pdata); ret = phy_if->phy_start(pdata); @@ -1656,7 +1701,11 @@ axgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *va, uint64_t *pa, int nrxqs, MPASS(scctx->isc_nrxqsets > 0); MPASS(scctx->isc_nrxqsets == nrxqsets); - MPASS(nrxqs == 2); + if (!pdata->sph_enable) { + MPASS(nrxqs == 1); + } else { + MPASS(nrxqs == 2); + } axgbe_printf(1, "%s: rxqsets %d/%d rxqs %d\n", __func__, scctx->isc_nrxqsets, nrxqsets, nrxqs); @@ -2258,15 +2307,40 @@ axgbe_if_media_change(if_ctx_t ctx) static int axgbe_if_promisc_set(if_ctx_t ctx, int flags) { - struct axgbe_if_softc *sc = iflib_get_softc(ctx); + struct axgbe_if_softc *sc = iflib_get_softc(ctx); + struct xgbe_prv_data *pdata = &sc->pdata; + struct ifnet *ifp = pdata->netdev; - if (XGMAC_IOREAD_BITS(&sc->pdata, MAC_PFR, PR) == 1) - return (0); + axgbe_printf(1, "%s: MAC_PFR 0x%x drv_flags 0x%x if_flags 0x%x\n", + __func__, XGMAC_IOREAD(pdata, MAC_PFR), ifp->if_drv_flags, ifp->if_flags); - XGMAC_IOWRITE_BITS(&sc->pdata, MAC_PFR, PR, 1); - XGMAC_IOWRITE_BITS(&sc->pdata, MAC_PFR, VTFE, 0); + if (ifp->if_flags & IFF_PPROMISC) { - return (0); + axgbe_printf(1, "User requested to enter promisc mode\n"); + + if (XGMAC_IOREAD_BITS(pdata, MAC_PFR, PR) == 1) { + axgbe_printf(1, "Already in promisc mode\n"); + return (0); + } + + axgbe_printf(1, "Entering promisc mode\n"); + XGMAC_IOWRITE_BITS(pdata, MAC_PFR, PR, 1); + XGMAC_IOWRITE_BITS(pdata, MAC_PFR, VTFE, 0); + } else { + + axgbe_printf(1, "User requested to leave promisc mode\n"); + + if (XGMAC_IOREAD_BITS(pdata, MAC_PFR, PR) == 0) { + axgbe_printf(1, "Already not in promisc mode\n"); + return (0); + } + + axgbe_printf(1, "Leaving promisc mode\n"); + XGMAC_IOWRITE_BITS(pdata, MAC_PFR, PR, 0); + XGMAC_IOWRITE_BITS(pdata, MAC_PFR, VTFE, 1); + } + + return (0); } static uint64_t diff --git a/sys/dev/axgbe/xgbe-dev.c b/sys/dev/axgbe/xgbe-dev.c index 1cfd557a4995..95161802ed8e 100644 --- a/sys/dev/axgbe/xgbe-dev.c +++ b/sys/dev/axgbe/xgbe-dev.c @@ -293,12 +293,14 @@ xgbe_config_tso_mode(struct xgbe_prv_data *pdata) { unsigned int i; + int tso_enabled = (if_getcapenable(pdata->netdev) & IFCAP_TSO); + for (i = 0; i < pdata->channel_count; i++) { if (!pdata->channel[i]->tx_ring) break; - axgbe_printf(0, "Enabling TSO in channel %d\n", i); - XGMAC_DMA_IOWRITE_BITS(pdata->channel[i], DMA_CH_TCR, TSE, 1); + axgbe_printf(1, "TSO in channel %d %s\n", i, tso_enabled ? "enabled" : "disabled"); + XGMAC_DMA_IOWRITE_BITS(pdata->channel[i], DMA_CH_TCR, TSE, tso_enabled ? 1 : 0); } } @@ -306,15 +308,33 @@ static void xgbe_config_sph_mode(struct xgbe_prv_data *pdata) { unsigned int i; + int sph_enable_flag = XGMAC_IOREAD_BITS(pdata, MAC_HWF1R, SPHEN); + + axgbe_printf(1, "sph_enable %d sph feature enabled?: %d\n", + pdata->sph_enable, sph_enable_flag); + + if (pdata->sph_enable && sph_enable_flag) + axgbe_printf(0, "SPH Enabled\n"); for (i = 0; i < pdata->channel_count; i++) { if (!pdata->channel[i]->rx_ring) break; + if (pdata->sph_enable && sph_enable_flag) { + /* Enable split header feature */ + XGMAC_DMA_IOWRITE_BITS(pdata->channel[i], DMA_CH_CR, SPH, 1); + } else { + /* Disable split header feature */ + XGMAC_DMA_IOWRITE_BITS(pdata->channel[i], DMA_CH_CR, SPH, 0); + } - XGMAC_DMA_IOWRITE_BITS(pdata->channel[i], DMA_CH_CR, SPH, 1); + /* per-channel confirmation of SPH being disabled/enabled */ + int val = XGMAC_DMA_IOREAD_BITS(pdata->channel[i], DMA_CH_CR, SPH); + axgbe_printf(0, "%s: SPH %s in channel %d\n", __func__, + (val ? "enabled" : "disabled"), i); } - XGMAC_IOWRITE_BITS(pdata, MAC_RCR, HDSMS, XGBE_SPH_HDSMS_SIZE); + if (pdata->sph_enable && sph_enable_flag) + XGMAC_IOWRITE_BITS(pdata, MAC_RCR, HDSMS, XGBE_SPH_HDSMS_SIZE); } static int @@ -953,8 +973,8 @@ xgbe_config_rx_mode(struct xgbe_prv_data *pdata) { unsigned int pr_mode, am_mode; - pr_mode = ((pdata->netdev->if_drv_flags & IFF_PPROMISC) != 0); - am_mode = ((pdata->netdev->if_drv_flags & IFF_ALLMULTI) != 0); + pr_mode = ((pdata->netdev->if_flags & IFF_PPROMISC) != 0); + am_mode = ((pdata->netdev->if_flags & IFF_ALLMULTI) != 0); xgbe_set_promiscuous_mode(pdata, pr_mode); xgbe_set_all_multicast_mode(pdata, am_mode); @@ -1352,7 +1372,6 @@ xgbe_dev_read(struct xgbe_channel *channel) if (XGMAC_GET_BITS_LE(rdesc->desc3, RX_NORMAL_DESC3, CTXT)) { /* TODO - Timestamp Context Descriptor */ - XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES, CONTEXT, 1); XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES, diff --git a/sys/dev/axgbe/xgbe-sysctl.c b/sys/dev/axgbe/xgbe-sysctl.c index eee7c61170de..a3e777e0ca26 100644 --- a/sys/dev/axgbe/xgbe-sysctl.c +++ b/sys/dev/axgbe/xgbe-sysctl.c @@ -1614,6 +1614,10 @@ axgbe_sysctl_init(struct xgbe_prv_data *pdata) SYSCTL_ADD_UINT(clist, top, OID_AUTO, "axgbe_debug_level", CTLFLAG_RWTUN, &pdata->debug_level, 0, "axgbe log level -- higher is verbose"); + SYSCTL_ADD_UINT(clist, top, OID_AUTO, "sph_enable", + CTLFLAG_RDTUN, &pdata->sph_enable, 1, + "shows the split header feature state (1 - enable, 0 - disable"); + SYSCTL_ADD_PROC(clist, top, OID_AUTO, "xgmac_register", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, pdata, 0, sysctl_xgmac_reg_addr_handler, "IU", diff --git a/sys/dev/axgbe/xgbe-txrx.c b/sys/dev/axgbe/xgbe-txrx.c index c6872e584f81..e798bfa37335 100644 --- a/sys/dev/axgbe/xgbe-txrx.c +++ b/sys/dev/axgbe/xgbe-txrx.c @@ -379,20 +379,9 @@ axgbe_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) axgbe_printf(1, "--> %s: flush txq %d pidx %d cur %d dirty %d\n", __func__, txqid, pidx, ring->cur, ring->dirty); - MPASS(ring->cur == pidx); - if (__predict_false(ring->cur != pidx)) { - axgbe_error("--> %s: cur(%d) ne pidx(%d)\n", __func__, - ring->cur, pidx); - } - - wmb(); - /* Ring Doorbell */ - if (XGMAC_DMA_IOREAD(channel, DMA_CH_TDTR_LO) != - lower_32_bits(rdata->rdata_paddr)) { - XGMAC_DMA_IOWRITE(channel, DMA_CH_TDTR_LO, - lower_32_bits(rdata->rdata_paddr)); - } + XGMAC_DMA_IOWRITE(channel, DMA_CH_TDTR_LO, + lower_32_bits(rdata->rdata_paddr)); } static int @@ -466,6 +455,7 @@ axgbe_isc_rxd_refill(void *arg, if_rxd_update_t iru) unsigned int inte; uint8_t count = iru->iru_count; int i, j; + bool config_intr = false; axgbe_printf(1, "--> %s: rxq %d fl %d pidx %d count %d ring cur %d " "dirty %d\n", __func__, iru->iru_qsidx, iru->iru_flidx, @@ -473,7 +463,7 @@ axgbe_isc_rxd_refill(void *arg, if_rxd_update_t iru) for (i = iru->iru_pidx, j = 0 ; j < count ; i++, j++) { - if (i == XGBE_RX_DESC_CNT_DEFAULT) + if (i == sc->scctx->isc_nrxd[0]) i = 0; rdata = XGBE_GET_DESC_DATA(ring, i); @@ -485,29 +475,42 @@ axgbe_isc_rxd_refill(void *arg, if_rxd_update_t iru) "pidx %d\n", __func__, ring->cur, ring->dirty, j, i); } - /* Assuming split header is enabled */ - if (iru->iru_flidx == 0) { + if (pdata->sph_enable) { + if (iru->iru_flidx == 0) { + + /* Fill header/buffer1 address */ + rdesc->desc0 = + cpu_to_le32(lower_32_bits(iru->iru_paddrs[j])); + rdesc->desc1 = + cpu_to_le32(upper_32_bits(iru->iru_paddrs[j])); + } else { + + /* Fill data/buffer2 address */ + rdesc->desc2 = + cpu_to_le32(lower_32_bits(iru->iru_paddrs[j])); + rdesc->desc3 = + cpu_to_le32(upper_32_bits(iru->iru_paddrs[j])); + config_intr = true; + } + } else { /* Fill header/buffer1 address */ - rdesc->desc0 = + rdesc->desc0 = rdesc->desc2 = cpu_to_le32(lower_32_bits(iru->iru_paddrs[j])); - rdesc->desc1 = + rdesc->desc1 = rdesc->desc3 = cpu_to_le32(upper_32_bits(iru->iru_paddrs[j])); - } else { - /* Fill data/buffer2 address */ - rdesc->desc2 = - cpu_to_le32(lower_32_bits(iru->iru_paddrs[j])); - rdesc->desc3 = - cpu_to_le32(upper_32_bits(iru->iru_paddrs[j])); + config_intr = true; + } + + if (config_intr) { if (!rx_usecs && !rx_frames) { /* No coalescing, interrupt for every descriptor */ inte = 1; } else { /* Set interrupt based on Rx frame coalescing setting */ - if (rx_frames && - !(((ring->dirty + 1) &(ring->rdesc_count - 1)) % rx_frames)) + if (rx_frames && !((ring->dirty + 1) % rx_frames)) inte = 1; else inte = 0; @@ -520,6 +523,8 @@ axgbe_isc_rxd_refill(void *arg, if_rxd_update_t iru) wmb(); ring->dirty = ((ring->dirty + 1) & (ring->rdesc_count - 1)); + + config_intr = false; } } @@ -539,15 +544,16 @@ axgbe_isc_rxd_flush(void *arg, uint16_t qsidx, uint8_t flidx, qidx_t pidx) axgbe_printf(1, "--> %s: rxq %d fl %d pidx %d cur %d dirty %d\n", __func__, qsidx, flidx, pidx, ring->cur, ring->dirty); - if (flidx == 1) { - - rdata = XGBE_GET_DESC_DATA(ring, pidx); + rdata = XGBE_GET_DESC_DATA(ring, pidx); + /* + * update RX descriptor tail pointer in hardware to indicate + * that new buffers are present in the allocated memory region + */ + if (!pdata->sph_enable || flidx == 1) { XGMAC_DMA_IOWRITE(channel, DMA_CH_RDTR_LO, lower_32_bits(rdata->rdata_paddr)); } - - wmb(); } static int @@ -560,12 +566,17 @@ axgbe_isc_rxd_available(void *arg, uint16_t qsidx, qidx_t idx, qidx_t budget) struct xgbe_ring_data *rdata; struct xgbe_ring_desc *rdesc; unsigned int cur; - int count; + int count = 0; uint8_t incomplete = 1, context_next = 0, running = 0; axgbe_printf(1, "--> %s: rxq %d idx %d budget %d cur %d dirty %d\n", __func__, qsidx, idx, budget, ring->cur, ring->dirty); + if (__predict_false(test_bit(XGBE_DOWN, &pdata->dev_state))) { + axgbe_printf(0, "%s: Polling when XGBE_DOWN\n", __func__); + return (count); + } + cur = ring->cur; for (count = 0; count <= budget; ) { @@ -609,11 +620,14 @@ static unsigned int xgbe_rx_buf1_len(struct xgbe_prv_data *pdata, struct xgbe_ring_data *rdata, struct xgbe_packet_data *packet) { + unsigned int ret = 0; - /* Always zero if not the first descriptor */ - if (!XGMAC_GET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES, FIRST)) { - axgbe_printf(1, "%s: Not First\n", __func__); - return (0); + if (pdata->sph_enable) { + /* Always zero if not the first descriptor */ + if (!XGMAC_GET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES, FIRST)) { + axgbe_printf(1, "%s: Not First\n", __func__); + return (0); + } } /* First descriptor with split header, return header length */ @@ -623,21 +637,33 @@ xgbe_rx_buf1_len(struct xgbe_prv_data *pdata, struct xgbe_ring_data *rdata, } /* First descriptor but not the last descriptor and no split header, - * so the full buffer was used + * so the full buffer was used, 256 represents the hardcoded value of + * a max header split defined in the hardware */ if (!XGMAC_GET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES, LAST)) { axgbe_printf(1, "%s: Not last %d\n", __func__, pdata->rx_buf_size); - return (256); + if (pdata->sph_enable) { + return (256); + } else { + return (pdata->rx_buf_size); + } } /* First descriptor and last descriptor and no split header, so - * calculate how much of the buffer was used + * calculate how much of the buffer was used, we can return the + * segment length or the remaining bytes of the packet */ axgbe_printf(1, "%s: pkt_len %d buf_size %d\n", __func__, rdata->rx.len, pdata->rx_buf_size); - return (min_t(unsigned int, 256, rdata->rx.len)); + if (pdata->sph_enable) { + ret = min_t(unsigned int, 256, rdata->rx.len); + } else { + ret = rdata->rx.len; + } + + return (ret); } static unsigned int @@ -712,8 +738,10 @@ read_again: /* Get the data length in the descriptor buffers */ buf1_len = xgbe_rx_buf1_len(pdata, rdata, packet); len += buf1_len; - buf2_len = xgbe_rx_buf2_len(pdata, rdata, packet, len); - len += buf2_len; + if (pdata->sph_enable) { + buf2_len = xgbe_rx_buf2_len(pdata, rdata, packet, len); + len += buf2_len; + } } else buf1_len = buf2_len = 0; @@ -724,8 +752,10 @@ read_again: axgbe_add_frag(pdata, ri, prev_cur, buf1_len, i, 0); i++; - axgbe_add_frag(pdata, ri, prev_cur, buf2_len, i, 1); - i++; + if (pdata->sph_enable) { + axgbe_add_frag(pdata, ri, prev_cur, buf2_len, i, 1); + i++; + } if (!last || context_next) goto read_again; @@ -758,7 +788,7 @@ read_again: } if (__predict_false(len == 0)) - axgbe_error("%s: Zero len packet\n", __func__); + axgbe_printf(1, "%s: Discarding Zero len packet\n", __func__); if (__predict_false(len > max_len)) axgbe_error("%s: Big packet %d/%d\n", __func__, len, max_len); diff --git a/sys/dev/axgbe/xgbe.h b/sys/dev/axgbe/xgbe.h index a5a78cd68c39..766c0c6f551a 100644 --- a/sys/dev/axgbe/xgbe.h +++ b/sys/dev/axgbe/xgbe.h @@ -1296,6 +1296,12 @@ struct xgbe_prv_data { uint64_t rx_coalesce_usecs; unsigned int debug_level; + + /* + * Toggles the split header feature. + * This requires a complete restart. + */ + unsigned int sph_enable; }; struct axgbe_if_softc { From owner-dev-commits-src-all@freebsd.org Sat Jan 16 08:38:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4A524D865A; Sat, 16 Jan 2021 08:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHs045ZvNz3JpT; Sat, 16 Jan 2021 08:38: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 A3F4E4037; Sat, 16 Jan 2021 08:38: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 10G8ciHP031608; Sat, 16 Jan 2021 08:38:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10G8ci4b031607; Sat, 16 Jan 2021 08:38:44 GMT (envelope-from git) Date: Sat, 16 Jan 2021 08:38:44 GMT Message-Id: <202101160838.10G8ci4b031607@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: fe258f23ef36 - main - Save on getpid in setproctitle by supporting -1 as curproc. 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: fe258f23ef3612f8230c4ed82f1efa511cc0524f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 08:38:44 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fe258f23ef3612f8230c4ed82f1efa511cc0524f commit fe258f23ef3612f8230c4ed82f1efa511cc0524f Author: Mateusz Guzik AuthorDate: 2021-01-16 08:26:17 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-16 08:36:54 +0000 Save on getpid in setproctitle by supporting -1 as curproc. --- lib/libc/gen/setproctitle.c | 28 ++++++++++++++++++++++++---- sys/kern/kern_proc.c | 6 +++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/setproctitle.c b/lib/libc/gen/setproctitle.c index b975fd72b649..991af38565cd 100644 --- a/lib/libc/gen/setproctitle.c +++ b/lib/libc/gen/setproctitle.c @@ -184,8 +184,18 @@ setproctitle_fast(const char *fmt, ...) oid[0] = CTL_KERN; oid[1] = KERN_PROC; oid[2] = KERN_PROC_ARGS; - oid[3] = getpid(); - sysctl(oid, 4, 0, 0, "", 0); + oid[3] = -1; + if (sysctl(oid, 4, 0, 0, "", 0) != 0) { + /* + * Temporary compat for kernels which don't support + * passing -1. + */ + oid[0] = CTL_KERN; + oid[1] = KERN_PROC; + oid[2] = KERN_PROC_ARGS; + oid[3] = getpid(); + sysctl(oid, 4, 0, 0, "", 0); + } fast_update = 1; } } @@ -206,8 +216,18 @@ setproctitle(const char *fmt, ...) oid[0] = CTL_KERN; oid[1] = KERN_PROC; oid[2] = KERN_PROC_ARGS; - oid[3] = getpid(); - sysctl(oid, 4, 0, 0, buf, strlen(buf) + 1); + oid[3] = -1; + if (sysctl(oid, 4, 0, 0, buf, strlen(buf) + 1) != 0) { + /* + * Temporary compat for kernels which don't support + * passing -1. + */ + oid[0] = CTL_KERN; + oid[1] = KERN_PROC; + oid[2] = KERN_PROC_ARGS; + oid[3] = getpid(); + sysctl(oid, 4, 0, 0, buf, strlen(buf) + 1); + } fast_update = 0; } } diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 269705205fbc..ae80ba9ed5ed 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2088,12 +2088,16 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS) if (namelen != 1) return (EINVAL); + p = curproc; pid = (pid_t)name[0]; + if (pid == -1) { + pid = p->p_pid; + } + /* * If the query is for this process and it is single-threaded, there * is nobody to modify pargs, thus we can just read. */ - p = curproc; if (pid == p->p_pid && p->p_numthreads == 1 && req->newptr == NULL && (pa = p->p_args) != NULL) return (SYSCTL_OUT(req, pa->ar_args, pa->ar_length)); From owner-dev-commits-src-all@freebsd.org Sat Jan 16 09:31:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4422C4D9C09; Sat, 16 Jan 2021 09:31: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 4DHt8v72J7z3LZS; Sat, 16 Jan 2021 09:31:27 +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 10G9VJHW051178 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 16 Jan 2021 11:31:22 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 10G9VJHW051178 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 10G9VJ07051177; Sat, 16 Jan 2021 11:31:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 16 Jan 2021 11:31:19 +0200 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fe258f23ef36 - main - Save on getpid in setproctitle by supporting -1 as curproc. Message-ID: References: <202101160838.10G8ci4b031607@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202101160838.10G8ci4b031607@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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DHt8v72J7z3LZS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 09:31:28 -0000 On Sat, Jan 16, 2021 at 08:38:44AM +0000, Mateusz Guzik wrote: > diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c > index 269705205fbc..ae80ba9ed5ed 100644 > --- a/sys/kern/kern_proc.c > +++ b/sys/kern/kern_proc.c > @@ -2088,12 +2088,16 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS) > if (namelen != 1) > return (EINVAL); > > + p = curproc; > pid = (pid_t)name[0]; > + if (pid == -1) { > + pid = p->p_pid; > + } If ever done, this should be done in pget(), to provide consistent interface for all kern.proc nodes. From owner-dev-commits-src-all@freebsd.org Sat Jan 16 10:07:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3C334DA43C; Sat, 16 Jan 2021 10:07:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHty53NNDz3N8Y; Sat, 16 Jan 2021 10:07:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x333.google.com with SMTP id o10so3244603wmc.1; Sat, 16 Jan 2021 02:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IkyI5U2LSWRdgJtnAv1Xniy7FQyhlwIPcLsRk6SvunM=; b=UeuvhxJXBby6cFsBVnEpqsPrqOX3PCpsFAAr1yEpChtePf+iB5GkyHTezNvku0fPvo O36zA2Hus7YuCxgBfqmm2biBu8TZ0KI27v108AJsmU2c7CJO/ObYvifiuJAPJ0yCLwVc /+ikgxETYj5kqWxrC02G9iATFyK0k5c7IIOQWLaGGAt9rOkyUJMSucSMlTq5OETDJhaw 3m8+Pmz8Fuh7nJzK5UIA1PdGPRYdPZTORZjMBAsC+KfG6nELlHIxYBig87CieSmk1ywX epbCW2obMWE2Ie9fwiwisWKZEkMXCTXfJNUh3+qhvdX4OAVjGSae//QIQYkQWCKG6zfZ Excg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IkyI5U2LSWRdgJtnAv1Xniy7FQyhlwIPcLsRk6SvunM=; b=ZKCa2GnTKV4tBbkQQhmKTxtjtCOck4m8RAFbUl9/J8i0tMgEpsU3Bc6PO9+4+Xi9/b Ia+UKf4eMWR8D7BWcphI5fqSWJCpttupNnILChYyIJJGe749QvfFb9l0z1hb03hdTJKl N7eBUykmjk5ukRpExiHEEem2Mk1u5a8jvnVb0089cxPE2jUV6FjOv/x5AoZ4uaI16DuZ cVGfe9ksy9A7do3w0EZ02vgltSBLNzKd+cdSH5OLtwrn+Hd+1gjDuLprmUnAazAea6zI zfP9uX+78CH7Ho6ztVgCkEZC+xmT3UWs64XwcXCKHilxe84qz3gv2zkFGKT1+s+MEatu aMiQ== X-Gm-Message-State: AOAM533CVQghyHLFc3NQz5QwYZdBFJaDMWfI42WvVwFV4bitcfFpBBSJ iU/++76PSQUb5A6vXEUjVksTVxjMCzVDOrhPf1rz+Ig/ X-Google-Smtp-Source: ABdhPJzEEMtgKU+S76tlZnpYNaF/bRYzG0nIifNepB+hToue0L+WZql/asU5wnUiKh1yj3G0hYldhsctMwvMwA3gH38= X-Received: by 2002:a1c:2c4:: with SMTP id 187mr12815406wmc.187.1610791626977; Sat, 16 Jan 2021 02:07:06 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Sat, 16 Jan 2021 02:07:05 -0800 (PST) In-Reply-To: <202101151910.10FJAEgs080434@gitrepo.freebsd.org> References: <202101151910.10FJAEgs080434@gitrepo.freebsd.org> From: Mateusz Guzik Date: Sat, 16 Jan 2021 11:07:05 +0100 Message-ID: Subject: Re: git: 7c84a7405bee - main - Remove the old dts imported tree. To: Emmanuel Vadot Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DHty53NNDz3N8Y X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 10:07:09 -0000 I did not check which commit specifically is responsible, but riscv fails to build: /usr/src/sys/riscv/sifive/fu540_prci.c:54:10: fatal error: 'gnu/dts/include/dt-bindings/clock/sifive-fu540-prci.h' file not found #include ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. On 1/15/21, Emmanuel Vadot wrote: > The branch main has been updated by manu: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=7c84a7405beede34cd07cf7753d72d1098532baf > > commit 7c84a7405beede34cd07cf7753d72d1098532baf > Author: Emmanuel Vadot > AuthorDate: 2021-01-15 18:12:04 +0000 > Commit: Emmanuel Vadot > CommitDate: 2021-01-15 19:09:55 +0000 > > Remove the old dts imported tree. > > The new one is in sys/contrib/device-tree > --- > sys/gnu/dts/FreeBSD-list | 77 - > sys/gnu/dts/FreeBSD-upgrade | 24 - > sys/gnu/dts/Makefile | 3 - > sys/gnu/dts/arm/aks-cdu.dts | 122 - > sys/gnu/dts/arm/alphascale-asm9260-devkit.dts | 13 - > sys/gnu/dts/arm/alphascale-asm9260.dtsi | 64 - > sys/gnu/dts/arm/alpine-db.dts | 35 - > sys/gnu/dts/arm/alpine.dtsi | 176 - > sys/gnu/dts/arm/am335x-baltos-ir2110.dts | 83 - > sys/gnu/dts/arm/am335x-baltos-ir3220.dts | 125 - > sys/gnu/dts/arm/am335x-baltos-ir5221.dts | 149 - > sys/gnu/dts/arm/am335x-baltos-leds.dtsi | 47 - > sys/gnu/dts/arm/am335x-baltos.dtsi | 402 -- > sys/gnu/dts/arm/am335x-base0033.dts | 92 - > sys/gnu/dts/arm/am335x-bone-common.dtsi | 399 -- > sys/gnu/dts/arm/am335x-bone.dts | 23 - > sys/gnu/dts/arm/am335x-boneblack-common.dtsi | 169 - > sys/gnu/dts/arm/am335x-boneblack-wireless.dts | 110 - > sys/gnu/dts/arm/am335x-boneblack.dts | 25 - > sys/gnu/dts/arm/am335x-boneblue.dts | 421 -- > sys/gnu/dts/arm/am335x-bonegreen-common.dtsi | 41 - > sys/gnu/dts/arm/am335x-bonegreen-wireless.dts | 127 - > sys/gnu/dts/arm/am335x-bonegreen.dts | 14 - > sys/gnu/dts/arm/am335x-chiliboard.dts | 183 - > sys/gnu/dts/arm/am335x-chilisom.dtsi | 175 - > sys/gnu/dts/arm/am335x-cm-t335.dts | 513 -- > sys/gnu/dts/arm/am335x-evm.dts | 777 --- > sys/gnu/dts/arm/am335x-evmsk.dts | 719 --- > sys/gnu/dts/arm/am335x-guardian.dts | 490 -- > sys/gnu/dts/arm/am335x-icev2.dts | 512 -- > sys/gnu/dts/arm/am335x-igep0033.dtsi | 300 - > sys/gnu/dts/arm/am335x-lxm.dts | 345 - > sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi | 227 - > sys/gnu/dts/arm/am335x-moxa-uc-2101.dts | 69 - > sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts | 503 -- > sys/gnu/dts/arm/am335x-nano.dts | 474 -- > sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts | 87 - > sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts | 95 - > sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts | 115 - > sys/gnu/dts/arm/am335x-osd3358-sm-red.dts | 439 -- > sys/gnu/dts/arm/am335x-osd335x-common.dtsi | 124 - > sys/gnu/dts/arm/am335x-pcm-953.dtsi | 242 - > sys/gnu/dts/arm/am335x-pdu001.dts | 575 -- > sys/gnu/dts/arm/am335x-pepper.dts | 641 -- > sys/gnu/dts/arm/am335x-phycore-rdk.dts | 28 - > sys/gnu/dts/arm/am335x-phycore-som.dtsi | 341 - > sys/gnu/dts/arm/am335x-pocketbeagle.dts | 214 - > sys/gnu/dts/arm/am335x-regor-rdk.dts | 24 - > sys/gnu/dts/arm/am335x-regor.dtsi | 202 - > sys/gnu/dts/arm/am335x-sancloud-bbe.dts | 137 - > sys/gnu/dts/arm/am335x-sbc-t335.dts | 176 - > sys/gnu/dts/arm/am335x-shc.dts | 555 -- > sys/gnu/dts/arm/am335x-sl50.dts | 717 --- > sys/gnu/dts/arm/am335x-wega-rdk.dts | 23 - > sys/gnu/dts/arm/am335x-wega.dtsi | 196 - > sys/gnu/dts/arm/am33xx-clocks.dtsi | 676 -- > sys/gnu/dts/arm/am33xx-l4.dtsi | 2127 ------- > sys/gnu/dts/arm/am33xx.dtsi | 642 -- > sys/gnu/dts/arm/am3517-craneboard.dts | 171 - > sys/gnu/dts/arm/am3517-evm-ui.dtsi | 217 - > sys/gnu/dts/arm/am3517-evm.dts | 322 - > sys/gnu/dts/arm/am3517-som.dtsi | 234 - > sys/gnu/dts/arm/am3517.dtsi | 193 - > sys/gnu/dts/arm/am3517_mt_ventoux.dts | 24 - > sys/gnu/dts/arm/am35xx-clocks.dtsi | 125 - > sys/gnu/dts/arm/am3703.dtsi | 14 - > sys/gnu/dts/arm/am3715.dtsi | 10 - > sys/gnu/dts/arm/am3874-iceboard.dts | 489 -- > sys/gnu/dts/arm/am4372.dtsi | 576 -- > sys/gnu/dts/arm/am437x-cm-t43.dts | 420 -- > sys/gnu/dts/arm/am437x-gp-evm.dts | 1114 ---- > sys/gnu/dts/arm/am437x-idk-evm.dts | 536 -- > sys/gnu/dts/arm/am437x-l4.dtsi | 2529 -------- > sys/gnu/dts/arm/am437x-sbc-t43.dts | 177 - > sys/gnu/dts/arm/am437x-sk-evm.dts | 896 --- > sys/gnu/dts/arm/am43x-epos-evm.dts | 1013 --- > sys/gnu/dts/arm/am43xx-clocks.dtsi | 883 --- > sys/gnu/dts/arm/am57-pruss.dtsi | 50 - > sys/gnu/dts/arm/am5718.dtsi | 33 - > sys/gnu/dts/arm/am571x-idk.dts | 237 - > sys/gnu/dts/arm/am5728.dtsi | 34 - > sys/gnu/dts/arm/am5729-beagleboneai.dts | 731 --- > sys/gnu/dts/arm/am572x-idk-common.dtsi | 203 - > sys/gnu/dts/arm/am572x-idk.dts | 34 - > sys/gnu/dts/arm/am5748.dtsi | 34 - > sys/gnu/dts/arm/am574x-idk.dts | 46 - > sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi | 640 -- > sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts | 36 - > sys/gnu/dts/arm/am57xx-beagle-x15-revc.dts | 31 - > sys/gnu/dts/arm/am57xx-beagle-x15.dts | 38 - > sys/gnu/dts/arm/am57xx-cl-som-am57x.dts | 622 -- > sys/gnu/dts/arm/am57xx-commercial-grade.dtsi | 24 - > sys/gnu/dts/arm/am57xx-idk-common.dtsi | 604 -- > sys/gnu/dts/arm/am57xx-industrial-grade.dtsi | 24 - > sys/gnu/dts/arm/am57xx-sbc-am57x.dts | 176 - > sys/gnu/dts/arm/animeo_ip.dts | 196 - > .../dts/arm/arm-realview-eb-11mp-bbrevd-ctrevb.dts | 32 - > sys/gnu/dts/arm/arm-realview-eb-11mp-bbrevd.dts | 28 - > sys/gnu/dts/arm/arm-realview-eb-11mp-ctrevb.dts | 93 - > sys/gnu/dts/arm/arm-realview-eb-11mp-revb.dts | 93 - > sys/gnu/dts/arm/arm-realview-eb-11mp.dts | 74 - > sys/gnu/dts/arm/arm-realview-eb-a9mp-bbrevd.dts | 28 - > sys/gnu/dts/arm/arm-realview-eb-a9mp.dts | 70 - > sys/gnu/dts/arm/arm-realview-eb-bbrevd.dts | 29 - > sys/gnu/dts/arm/arm-realview-eb-bbrevd.dtsi | 45 - > sys/gnu/dts/arm/arm-realview-eb-mp.dtsi | 220 - > sys/gnu/dts/arm/arm-realview-eb.dts | 166 - > sys/gnu/dts/arm/arm-realview-eb.dtsi | 468 -- > sys/gnu/dts/arm/arm-realview-pb1176.dts | 592 -- > sys/gnu/dts/arm/arm-realview-pb11mp.dts | 718 --- > sys/gnu/dts/arm/arm-realview-pba8.dts | 178 - > sys/gnu/dts/arm/arm-realview-pbx-a9.dts | 228 - > sys/gnu/dts/arm/arm-realview-pbx.dtsi | 577 -- > sys/gnu/dts/arm/armada-370-db.dts | 244 - > sys/gnu/dts/arm/armada-370-dlink-dns327l.dts | 331 - > sys/gnu/dts/arm/armada-370-mirabox.dts | 184 - > sys/gnu/dts/arm/armada-370-netgear-rn102.dts | 276 - > sys/gnu/dts/arm/armada-370-netgear-rn104.dts | 302 - > sys/gnu/dts/arm/armada-370-rd.dts | 258 - > sys/gnu/dts/arm/armada-370-seagate-nas-2bay.dts | 33 - > sys/gnu/dts/arm/armada-370-seagate-nas-4bay.dts | 131 - > sys/gnu/dts/arm/armada-370-seagate-nas-xbay.dtsi | 239 - > .../arm/armada-370-seagate-personal-cloud-2bay.dts | 48 - > .../dts/arm/armada-370-seagate-personal-cloud.dts | 34 - > .../dts/arm/armada-370-seagate-personal-cloud.dtsi | 175 - > sys/gnu/dts/arm/armada-370-synology-ds213j.dts | 312 - > sys/gnu/dts/arm/armada-370-xp.dtsi | 313 - > sys/gnu/dts/arm/armada-370.dtsi | 419 -- > sys/gnu/dts/arm/armada-375-db.dts | 182 - > sys/gnu/dts/arm/armada-375.dtsi | 621 -- > sys/gnu/dts/arm/armada-380.dtsi | 118 - > sys/gnu/dts/arm/armada-385-clearfog-gtr-l8.dts | 115 - > sys/gnu/dts/arm/armada-385-clearfog-gtr-s4.dts | 79 - > sys/gnu/dts/arm/armada-385-clearfog-gtr.dtsi | 450 -- > sys/gnu/dts/arm/armada-385-db-88f6820-amc.dts | 155 - > sys/gnu/dts/arm/armada-385-db-ap.dts | 238 - > sys/gnu/dts/arm/armada-385-linksys-caiman.dts | 144 - > sys/gnu/dts/arm/armada-385-linksys-cobra.dts | 144 - > sys/gnu/dts/arm/armada-385-linksys-rango.dts | 176 - > sys/gnu/dts/arm/armada-385-linksys-shelby.dts | 144 - > sys/gnu/dts/arm/armada-385-linksys.dtsi | 263 - > sys/gnu/dts/arm/armada-385-synology-ds116.dts | 292 - > sys/gnu/dts/arm/armada-385-turris-omnia.dts | 359 -- > sys/gnu/dts/arm/armada-385.dtsi | 149 - > sys/gnu/dts/arm/armada-388-clearfog-base.dts | 68 - > sys/gnu/dts/arm/armada-388-clearfog-pro.dts | 14 - > sys/gnu/dts/arm/armada-388-clearfog.dts | 180 - > sys/gnu/dts/arm/armada-388-clearfog.dtsi | 245 - > sys/gnu/dts/arm/armada-388-db.dts | 176 - > sys/gnu/dts/arm/armada-388-gp.dts | 406 -- > sys/gnu/dts/arm/armada-388-helios4.dts | 308 - > sys/gnu/dts/arm/armada-388-rd.dts | 108 - > sys/gnu/dts/arm/armada-388.dtsi | 37 - > sys/gnu/dts/arm/armada-38x-solidrun-microsom.dtsi | 117 - > sys/gnu/dts/arm/armada-38x.dtsi | 707 --- > sys/gnu/dts/arm/armada-390-db.dts | 142 - > sys/gnu/dts/arm/armada-390.dtsi | 23 - > sys/gnu/dts/arm/armada-395-gp.dts | 136 - > sys/gnu/dts/arm/armada-395.dtsi | 39 - > sys/gnu/dts/arm/armada-398-db.dts | 134 - > sys/gnu/dts/arm/armada-398.dtsi | 31 - > sys/gnu/dts/arm/armada-39x.dtsi | 554 -- > sys/gnu/dts/arm/armada-xp-98dx3236.dtsi | 346 - > sys/gnu/dts/arm/armada-xp-98dx3336.dtsi | 39 - > sys/gnu/dts/arm/armada-xp-98dx4251.dtsi | 54 - > sys/gnu/dts/arm/armada-xp-axpwifiap.dts | 144 - > sys/gnu/dts/arm/armada-xp-db-dxbc2.dts | 118 - > sys/gnu/dts/arm/armada-xp-db-xc3-24g4xg.dts | 114 - > sys/gnu/dts/arm/armada-xp-db.dts | 245 - > sys/gnu/dts/arm/armada-xp-gp.dts | 230 - > sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts | 293 - > sys/gnu/dts/arm/armada-xp-linksys-mamba.dts | 399 -- > sys/gnu/dts/arm/armada-xp-matrix.dts | 79 - > sys/gnu/dts/arm/armada-xp-mv78230.dtsi | 207 - > sys/gnu/dts/arm/armada-xp-mv78260.dtsi | 314 - > sys/gnu/dts/arm/armada-xp-mv78460.dtsi | 353 -- > sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts | 357 -- > sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts | 211 - > sys/gnu/dts/arm/armada-xp-synology-ds414.dts | 328 - > sys/gnu/dts/arm/armada-xp.dtsi | 344 - > sys/gnu/dts/arm/armv7-m.dtsi | 23 - > sys/gnu/dts/arm/artpec6-devboard.dts | 69 - > sys/gnu/dts/arm/artpec6.dtsi | 388 -- > sys/gnu/dts/arm/aspeed-ast2500-evb.dts | 131 - > sys/gnu/dts/arm/aspeed-ast2600-evb.dts | 219 - > sys/gnu/dts/arm/aspeed-bmc-arm-centriq2400-rep.dts | 225 - > .../dts/arm/aspeed-bmc-arm-stardragon4800-rep2.dts | 220 - > sys/gnu/dts/arm/aspeed-bmc-facebook-cmm.dts | 348 - > sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts | 408 -- > sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts | 541 -- > sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts | 148 - > sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts | 140 - > sys/gnu/dts/arm/aspeed-bmc-facebook-yamp.dts | 110 - > sys/gnu/dts/arm/aspeed-bmc-facebook-yosemitev2.dts | 231 - > sys/gnu/dts/arm/aspeed-bmc-ibm-rainier.dts | 679 -- > sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts | 872 --- > sys/gnu/dts/arm/aspeed-bmc-inspur-on5263m5.dts | 148 - > sys/gnu/dts/arm/aspeed-bmc-intel-s2600wf.dts | 132 - > sys/gnu/dts/arm/aspeed-bmc-lenovo-hr630.dts | 569 -- > sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts | 666 -- > sys/gnu/dts/arm/aspeed-bmc-microsoft-olympus.dts | 207 - > sys/gnu/dts/arm/aspeed-bmc-opp-lanyang.dts | 329 - > sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts | 1195 ---- > sys/gnu/dts/arm/aspeed-bmc-opp-nicole.dts | 326 - > sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts | 373 -- > sys/gnu/dts/arm/aspeed-bmc-opp-romulus.dts | 354 -- > sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts | 978 --- > sys/gnu/dts/arm/aspeed-bmc-opp-tacoma.dts | 914 --- > sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts | 248 - > sys/gnu/dts/arm/aspeed-bmc-opp-witherspoon.dts | 693 -- > sys/gnu/dts/arm/aspeed-bmc-opp-zaius.dts | 578 -- > sys/gnu/dts/arm/aspeed-bmc-portwell-neptune.dts | 165 - > sys/gnu/dts/arm/aspeed-bmc-quanta-q71l.dts | 518 -- > sys/gnu/dts/arm/aspeed-g4.dtsi | 1435 ----- > sys/gnu/dts/arm/aspeed-g5.dtsi | 1638 ----- > sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi | 1174 ---- > sys/gnu/dts/arm/aspeed-g6.dtsi | 930 --- > .../dts/arm/ast2500-facebook-netbmc-common.dtsi | 95 - > sys/gnu/dts/arm/at91-ariag25.dts | 182 - > sys/gnu/dts/arm/at91-ariettag25.dts | 86 - > sys/gnu/dts/arm/at91-cosino.dtsi | 151 - > sys/gnu/dts/arm/at91-cosino_mega2560.dts | 74 - > sys/gnu/dts/arm/at91-dvk_som60.dts | 95 - > sys/gnu/dts/arm/at91-dvk_su60_somc.dtsi | 159 - > sys/gnu/dts/arm/at91-dvk_su60_somc_lcm.dtsi | 90 - > sys/gnu/dts/arm/at91-foxg20.dts | 167 - > sys/gnu/dts/arm/at91-gatwick.dts | 121 - > sys/gnu/dts/arm/at91-kizbox.dts | 177 - > sys/gnu/dts/arm/at91-kizbox2-2.dts | 26 - > sys/gnu/dts/arm/at91-kizbox2-common.dtsi | 258 - > sys/gnu/dts/arm/at91-kizbox3-hs.dts | 309 - > sys/gnu/dts/arm/at91-kizbox3_common.dtsi | 372 -- > sys/gnu/dts/arm/at91-kizboxmini-base.dts | 24 - > sys/gnu/dts/arm/at91-kizboxmini-common.dtsi | 170 - > sys/gnu/dts/arm/at91-kizboxmini-mb.dts | 26 - > sys/gnu/dts/arm/at91-kizboxmini-rd.dts | 49 - > sys/gnu/dts/arm/at91-linea.dtsi | 71 - > sys/gnu/dts/arm/at91-natte.dtsi | 244 - > sys/gnu/dts/arm/at91-nattis-2-natte-2.dts | 306 - > sys/gnu/dts/arm/at91-qil_a9260.dts | 214 - > sys/gnu/dts/arm/at91-sam9_l9260.dts | 132 - > sys/gnu/dts/arm/at91-sam9x60ek.dts | 675 -- > sys/gnu/dts/arm/at91-sama5d27_som1.dtsi | 153 - > sys/gnu/dts/arm/at91-sama5d27_som1_ek.dts | 532 -- > sys/gnu/dts/arm/at91-sama5d27_wlsom1.dtsi | 296 - > sys/gnu/dts/arm/at91-sama5d27_wlsom1_ek.dts | 270 - > sys/gnu/dts/arm/at91-sama5d2_icp.dts | 767 --- > sys/gnu/dts/arm/at91-sama5d2_ptc_ek.dts | 433 -- > sys/gnu/dts/arm/at91-sama5d2_xplained.dts | 756 --- > sys/gnu/dts/arm/at91-sama5d3_xplained.dts | 369 -- > sys/gnu/dts/arm/at91-sama5d4_ma5d4.dtsi | 136 - > sys/gnu/dts/arm/at91-sama5d4_ma5d4evk.dts | 164 - > sys/gnu/dts/arm/at91-sama5d4_xplained.dts | 281 - > sys/gnu/dts/arm/at91-sama5d4ek.dts | 323 - > sys/gnu/dts/arm/at91-smartkiz.dts | 109 - > sys/gnu/dts/arm/at91-som60.dtsi | 230 - > sys/gnu/dts/arm/at91-tse850-3.dts | 302 - > sys/gnu/dts/arm/at91-vinco.dts | 231 - > sys/gnu/dts/arm/at91-wb45n.dts | 64 - > sys/gnu/dts/arm/at91-wb45n.dtsi | 165 - > sys/gnu/dts/arm/at91-wb50n.dts | 112 - > sys/gnu/dts/arm/at91-wb50n.dtsi | 194 - > sys/gnu/dts/arm/at91rm9200.dtsi | 720 --- > sys/gnu/dts/arm/at91rm9200_pqfp.dtsi | 16 - > sys/gnu/dts/arm/at91rm9200ek.dts | 147 - > sys/gnu/dts/arm/at91sam9260.dtsi | 810 --- > sys/gnu/dts/arm/at91sam9260ek.dts | 186 - > sys/gnu/dts/arm/at91sam9261.dtsi | 658 -- > sys/gnu/dts/arm/at91sam9261ek.dts | 241 - > sys/gnu/dts/arm/at91sam9263.dtsi | 829 --- > sys/gnu/dts/arm/at91sam9263ek.dts | 257 - > sys/gnu/dts/arm/at91sam9g15.dtsi | 28 - > sys/gnu/dts/arm/at91sam9g15ek.dts | 36 - > sys/gnu/dts/arm/at91sam9g20.dtsi | 46 - > sys/gnu/dts/arm/at91sam9g20ek.dts | 28 - > sys/gnu/dts/arm/at91sam9g20ek_2mmc.dts | 54 - > sys/gnu/dts/arm/at91sam9g20ek_common.dtsi | 255 - > sys/gnu/dts/arm/at91sam9g25.dtsi | 34 - > sys/gnu/dts/arm/at91sam9g25ek.dts | 65 - > sys/gnu/dts/arm/at91sam9g35.dtsi | 33 - > sys/gnu/dts/arm/at91sam9g35ek.dts | 41 - > sys/gnu/dts/arm/at91sam9g45.dtsi | 1042 --- > sys/gnu/dts/arm/at91sam9m10g45ek.dts | 391 -- > sys/gnu/dts/arm/at91sam9n12.dtsi | 806 --- > sys/gnu/dts/arm/at91sam9n12ek.dts | 285 - > sys/gnu/dts/arm/at91sam9rl.dtsi | 876 --- > sys/gnu/dts/arm/at91sam9rlek.dts | 272 - > sys/gnu/dts/arm/at91sam9x25.dtsi | 35 - > sys/gnu/dts/arm/at91sam9x25ek.dts | 35 - > sys/gnu/dts/arm/at91sam9x35.dtsi | 34 - > sys/gnu/dts/arm/at91sam9x35ek.dts | 41 - > sys/gnu/dts/arm/at91sam9x5.dtsi | 997 --- > sys/gnu/dts/arm/at91sam9x5_can.dtsi | 56 - > sys/gnu/dts/arm/at91sam9x5_isi.dtsi | 62 - > sys/gnu/dts/arm/at91sam9x5_lcd.dtsi | 147 - > sys/gnu/dts/arm/at91sam9x5_macb0.dtsi | 57 - > sys/gnu/dts/arm/at91sam9x5_macb1.dtsi | 45 - > sys/gnu/dts/arm/at91sam9x5_usart3.dtsi | 59 - > sys/gnu/dts/arm/at91sam9x5cm.dtsi | 144 - > sys/gnu/dts/arm/at91sam9x5dm.dtsi | 96 - > sys/gnu/dts/arm/at91sam9x5ek.dtsi | 165 - > sys/gnu/dts/arm/at91sam9xe.dtsi | 23 - > sys/gnu/dts/arm/atlas6-evb.dts | 78 - > sys/gnu/dts/arm/atlas6.dtsi | 800 --- > sys/gnu/dts/arm/atlas7-evb.dts | 127 - > sys/gnu/dts/arm/atlas7.dtsi | 1955 ------ > sys/gnu/dts/arm/axm5516-amarillo.dts | 47 - > sys/gnu/dts/arm/axm5516-cpus.dtsi | 200 - > sys/gnu/dts/arm/axm55xx.dtsi | 200 - > sys/gnu/dts/arm/axp152.dtsi | 49 - > sys/gnu/dts/arm/axp209.dtsi | 119 - > sys/gnu/dts/arm/axp223.dtsi | 58 - > sys/gnu/dts/arm/axp22x.dtsi | 170 - > sys/gnu/dts/arm/axp809.dtsi | 53 - > sys/gnu/dts/arm/axp81x.dtsi | 178 - > sys/gnu/dts/arm/bcm-cygnus-clock.dtsi | 133 - > sys/gnu/dts/arm/bcm-cygnus.dtsi | 624 -- > sys/gnu/dts/arm/bcm-hr2.dtsi | 368 -- > sys/gnu/dts/arm/bcm-nsp.dtsi | 659 -- > sys/gnu/dts/arm/bcm11351.dtsi | 424 -- > sys/gnu/dts/arm/bcm21664-garnet.dts | 57 - > sys/gnu/dts/arm/bcm21664.dtsi | 357 -- > sys/gnu/dts/arm/bcm23550-sparrow.dts | 81 - > sys/gnu/dts/arm/bcm23550.dtsi | 415 -- > sys/gnu/dts/arm/bcm2711-rpi-4-b.dts | 228 - > sys/gnu/dts/arm/bcm2711.dtsi | 937 --- > sys/gnu/dts/arm/bcm28155-ap.dts | 122 - > sys/gnu/dts/arm/bcm2835-common.dtsi | 199 - > sys/gnu/dts/arm/bcm2835-rpi-a-plus.dts | 128 - > sys/gnu/dts/arm/bcm2835-rpi-a.dts | 123 - > sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts | 130 - > sys/gnu/dts/arm/bcm2835-rpi-b-rev2.dts | 123 - > sys/gnu/dts/arm/bcm2835-rpi-b.dts | 118 - > sys/gnu/dts/arm/bcm2835-rpi-cm1-io1.dts | 97 - > sys/gnu/dts/arm/bcm2835-rpi-cm1.dtsi | 39 - > sys/gnu/dts/arm/bcm2835-rpi-common.dtsi | 12 - > sys/gnu/dts/arm/bcm2835-rpi-zero-w.dts | 151 - > sys/gnu/dts/arm/bcm2835-rpi-zero.dts | 119 - > sys/gnu/dts/arm/bcm2835-rpi.dtsi | 81 - > sys/gnu/dts/arm/bcm2835.dtsi | 38 - > sys/gnu/dts/arm/bcm2836-rpi-2-b.dts | 130 - > sys/gnu/dts/arm/bcm2836-rpi.dtsi | 6 - > sys/gnu/dts/arm/bcm2836.dtsi | 92 - > sys/gnu/dts/arm/bcm2837-rpi-3-a-plus.dts | 180 - > sys/gnu/dts/arm/bcm2837-rpi-3-b-plus.dts | 183 - > sys/gnu/dts/arm/bcm2837-rpi-3-b.dts | 176 - > sys/gnu/dts/arm/bcm2837-rpi-cm3-io3.dts | 96 - > sys/gnu/dts/arm/bcm2837-rpi-cm3.dtsi | 61 - > sys/gnu/dts/arm/bcm2837.dtsi | 95 - > sys/gnu/dts/arm/bcm283x-rpi-lan7515.dtsi | 41 - > sys/gnu/dts/arm/bcm283x-rpi-smsc9512.dtsi | 20 - > sys/gnu/dts/arm/bcm283x-rpi-smsc9514.dtsi | 19 - > sys/gnu/dts/arm/bcm283x-rpi-usb-host.dtsi | 3 - > sys/gnu/dts/arm/bcm283x-rpi-usb-otg.dtsi | 11 - > sys/gnu/dts/arm/bcm283x-rpi-usb-peripheral.dtsi | 7 - > sys/gnu/dts/arm/bcm283x.dtsi | 509 -- > sys/gnu/dts/arm/bcm4708-asus-rt-ac56u.dts | 95 - > sys/gnu/dts/arm/bcm4708-asus-rt-ac68u.dts | 85 - > sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts | 151 - > sys/gnu/dts/arm/bcm4708-linksys-ea6300-v1.dts | 43 - > sys/gnu/dts/arm/bcm4708-linksys-ea6500-v2.dts | 44 - > sys/gnu/dts/arm/bcm4708-luxul-xap-1510.dts | 62 - > sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts | 69 - > sys/gnu/dts/arm/bcm4708-netgear-r6250.dts | 96 - > sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts | 88 - > sys/gnu/dts/arm/bcm4708-smartrg-sr400ac.dts | 163 - > sys/gnu/dts/arm/bcm4708.dtsi | 48 - > sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts | 79 - > sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts | 123 - > sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts | 109 - > sys/gnu/dts/arm/bcm47081-luxul-xap-1410.dts | 62 - > sys/gnu/dts/arm/bcm47081-luxul-xwr-1200.dts | 110 - > sys/gnu/dts/arm/bcm47081-tplink-archer-c5-v2.dts | 132 - > sys/gnu/dts/arm/bcm47081.dtsi | 37 - > sys/gnu/dts/arm/bcm4709-asus-rt-ac87u.dts | 100 - > sys/gnu/dts/arm/bcm4709-buffalo-wxr-1900dhp.dts | 134 - > sys/gnu/dts/arm/bcm4709-linksys-ea9200.dts | 46 - > sys/gnu/dts/arm/bcm4709-netgear-r7000.dts | 108 - > sys/gnu/dts/arm/bcm4709-netgear-r8000.dts | 189 - > sys/gnu/dts/arm/bcm4709-tplink-archer-c9-v1.dts | 139 - > sys/gnu/dts/arm/bcm4709.dtsi | 11 - > sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts | 120 - > sys/gnu/dts/arm/bcm47094-linksys-panamera.dts | 270 - > sys/gnu/dts/arm/bcm47094-luxul-abr-4500.dts | 65 - > sys/gnu/dts/arm/bcm47094-luxul-xap-1610.dts | 56 - > sys/gnu/dts/arm/bcm47094-luxul-xbr-4500.dts | 65 - > sys/gnu/dts/arm/bcm47094-luxul-xwc-2000.dts | 54 - > sys/gnu/dts/arm/bcm47094-luxul-xwr-3100.dts | 105 - > sys/gnu/dts/arm/bcm47094-luxul-xwr-3150-v1.dts | 76 - > sys/gnu/dts/arm/bcm47094-netgear-r8500.dts | 96 - > sys/gnu/dts/arm/bcm47094-phicomm-k3.dts | 70 - > sys/gnu/dts/arm/bcm47094.dtsi | 18 - > sys/gnu/dts/arm/bcm47189-luxul-xap-1440.dts | 48 - > sys/gnu/dts/arm/bcm47189-luxul-xap-810.dts | 85 - > sys/gnu/dts/arm/bcm47189-tenda-ac9.dts | 107 - > sys/gnu/dts/arm/bcm5301x-nand-cs0-bch1.dtsi | 14 - > sys/gnu/dts/arm/bcm5301x-nand-cs0-bch4.dtsi | 12 - > sys/gnu/dts/arm/bcm5301x-nand-cs0-bch8.dtsi | 17 - > sys/gnu/dts/arm/bcm5301x-nand-cs0.dtsi | 21 - > sys/gnu/dts/arm/bcm5301x.dtsi | 548 -- > sys/gnu/dts/arm/bcm53340-ubnt-unifi-switch8.dts | 86 - > sys/gnu/dts/arm/bcm53573.dtsi | 201 - > sys/gnu/dts/arm/bcm59056.dtsi | 91 - > sys/gnu/dts/arm/bcm63138.dtsi | 229 - > sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts | 38 - > sys/gnu/dts/arm/bcm7445.dtsi | 315 - > sys/gnu/dts/arm/bcm911360_entphn.dts | 99 - > sys/gnu/dts/arm/bcm911360k.dts | 52 - > sys/gnu/dts/arm/bcm94708.dts | 49 - > sys/gnu/dts/arm/bcm94709.dts | 49 - > sys/gnu/dts/arm/bcm947189acdbmr.dts | 96 - > sys/gnu/dts/arm/bcm953012er.dts | 95 - > sys/gnu/dts/arm/bcm953012hr.dts | 102 - > sys/gnu/dts/arm/bcm953012k.dts | 120 - > sys/gnu/dts/arm/bcm958300k.dts | 77 - > sys/gnu/dts/arm/bcm958305k.dts | 85 - > sys/gnu/dts/arm/bcm958522er.dts | 180 - > sys/gnu/dts/arm/bcm958525er.dts | 192 - > sys/gnu/dts/arm/bcm958525xmc.dts | 212 - > sys/gnu/dts/arm/bcm958622hr.dts | 229 - > sys/gnu/dts/arm/bcm958623hr.dts | 233 - > sys/gnu/dts/arm/bcm958625hr.dts | 256 - > sys/gnu/dts/arm/bcm958625k.dts | 273 - > sys/gnu/dts/arm/bcm963138dvt.dts | 52 - > sys/gnu/dts/arm/bcm988312hr.dts | 229 - > sys/gnu/dts/arm/bcm9hmidc.dtsi | 42 - > sys/gnu/dts/arm/berlin2-sony-nsz-gs7.dts | 43 - > sys/gnu/dts/arm/berlin2.dtsi | 540 -- > sys/gnu/dts/arm/berlin2cd-google-chromecast.dts | 77 - > sys/gnu/dts/arm/berlin2cd-valve-steamlink.dts | 79 - > sys/gnu/dts/arm/berlin2cd.dtsi | 583 -- > sys/gnu/dts/arm/berlin2q-marvell-dmp.dts | 144 - > sys/gnu/dts/arm/berlin2q.dtsi | 666 -- > sys/gnu/dts/arm/compulab-sb-som.dtsi | 46 - > sys/gnu/dts/arm/cros-adc-thermistors.dtsi | 41 - > sys/gnu/dts/arm/cros-ec-keyboard.dtsi | 107 - > sys/gnu/dts/arm/cros-ec-sbs.dtsi | 52 - > sys/gnu/dts/arm/cx92755.dtsi | 144 - > sys/gnu/dts/arm/cx92755_equinox.dts | 86 - > sys/gnu/dts/arm/da850-enbw-cmc.dts | 44 - > sys/gnu/dts/arm/da850-evm.dts | 466 -- > sys/gnu/dts/arm/da850-lcdk.dts | 425 -- > sys/gnu/dts/arm/da850-lego-ev3.dts | 466 -- > sys/gnu/dts/arm/da850.dtsi | 967 --- > sys/gnu/dts/arm/dm3725.dtsi | 10 - > sys/gnu/dts/arm/dm8148-evm.dts | 155 - > sys/gnu/dts/arm/dm8148-t410.dts | 113 - > sys/gnu/dts/arm/dm814x-clocks.dtsi | 379 -- > sys/gnu/dts/arm/dm814x.dtsi | 789 --- > sys/gnu/dts/arm/dm8168-evm.dts | 213 - > sys/gnu/dts/arm/dm816x-clocks.dtsi | 276 - > sys/gnu/dts/arm/dm816x.dtsi | 696 -- > sys/gnu/dts/arm/dove-cm-a510.dtsi | 195 - > sys/gnu/dts/arm/dove-cubox-es.dts | 13 - > sys/gnu/dts/arm/dove-cubox.dts | 143 - > sys/gnu/dts/arm/dove-d2plug.dts | 70 - > sys/gnu/dts/arm/dove-d3plug.dts | 104 - > sys/gnu/dts/arm/dove-dove-db.dts | 39 - > sys/gnu/dts/arm/dove-sbc-a510.dts | 182 - > sys/gnu/dts/arm/dove.dtsi | 805 --- > sys/gnu/dts/arm/dra62x-clocks.dtsi | 45 - > sys/gnu/dts/arm/dra62x-j5eco-evm.dts | 144 - > sys/gnu/dts/arm/dra62x.dtsi | 23 - > sys/gnu/dts/arm/dra7-dspeve-thermal.dtsi | 27 - > sys/gnu/dts/arm/dra7-evm-common.dtsi | 265 - > sys/gnu/dts/arm/dra7-evm.dts | 593 -- > sys/gnu/dts/arm/dra7-ipu-dsp-common.dtsi | 39 - > sys/gnu/dts/arm/dra7-iva-thermal.dtsi | 27 - > sys/gnu/dts/arm/dra7-l4.dtsi | 4651 -------------- > sys/gnu/dts/arm/dra7-mmc-iodelay.dtsi | 19 - > sys/gnu/dts/arm/dra7.dtsi | 1092 ---- > sys/gnu/dts/arm/dra71-evm.dts | 314 - > sys/gnu/dts/arm/dra71x.dtsi | 17 - > sys/gnu/dts/arm/dra72-evm-common.dtsi | 597 -- > sys/gnu/dts/arm/dra72-evm-revc.dts | 157 - > sys/gnu/dts/arm/dra72-evm-tps65917.dtsi | 151 - > sys/gnu/dts/arm/dra72-evm.dts | 122 - > sys/gnu/dts/arm/dra72x-mmc-iodelay.dtsi | 361 -- > sys/gnu/dts/arm/dra72x.dtsi | 114 - > sys/gnu/dts/arm/dra74-ipu-dsp-common.dtsi | 18 - > sys/gnu/dts/arm/dra74x-mmc-iodelay.dtsi | 647 -- > sys/gnu/dts/arm/dra74x.dtsi | 206 - > sys/gnu/dts/arm/dra76-evm.dts | 604 -- > sys/gnu/dts/arm/dra76x-mmc-iodelay.dtsi | 285 - > sys/gnu/dts/arm/dra76x.dtsi | 135 - > sys/gnu/dts/arm/dra7xx-clocks.dtsi | 1849 ------ > sys/gnu/dts/arm/e60k02.dtsi | 304 - > sys/gnu/dts/arm/ecx-2000.dts | 101 - > sys/gnu/dts/arm/ecx-common.dtsi | 231 - > sys/gnu/dts/arm/efm32gg-dk3750.dts | 88 - > sys/gnu/dts/arm/efm32gg.dtsi | 177 - > sys/gnu/dts/arm/elpida_ecb240abacn.dtsi | 68 - > sys/gnu/dts/arm/emev2-kzm9d.dts | 115 - > sys/gnu/dts/arm/emev2.dtsi | 289 - > sys/gnu/dts/arm/ep7209.dtsi | 187 - > sys/gnu/dts/arm/ep7211-edb7211.dts | 97 - > sys/gnu/dts/arm/ep7211.dtsi | 8 - > sys/gnu/dts/arm/ethernut5.dts | 118 - > sys/gnu/dts/arm/evk-pro3.dts | 58 - > sys/gnu/dts/arm/exynos-mfc-reserved-memory.dtsi | 32 - > sys/gnu/dts/arm/exynos-syscon-restart.dtsi | 20 - > sys/gnu/dts/arm/exynos3250-artik5-eval.dts | 39 - > sys/gnu/dts/arm/exynos3250-artik5.dtsi | 381 -- > sys/gnu/dts/arm/exynos3250-monk.dts | 639 -- > sys/gnu/dts/arm/exynos3250-pinctrl.dtsi | 568 -- > sys/gnu/dts/arm/exynos3250-rinato.dts | 914 --- > sys/gnu/dts/arm/exynos3250.dtsi | 967 --- > sys/gnu/dts/arm/exynos4-cpu-thermal.dtsi | 48 - > sys/gnu/dts/arm/exynos4.dtsi | 1022 --- > sys/gnu/dts/arm/exynos4210-i9100.dts | 768 --- > sys/gnu/dts/arm/exynos4210-origen.dts | 338 - > sys/gnu/dts/arm/exynos4210-pinctrl.dtsi | 863 --- > sys/gnu/dts/arm/exynos4210-smdkv310.dts | 200 - > sys/gnu/dts/arm/exynos4210-trats.dts | 515 -- > sys/gnu/dts/arm/exynos4210-universal_c210.dts | 632 -- > sys/gnu/dts/arm/exynos4210.dtsi | 523 -- > sys/gnu/dts/arm/exynos4212.dtsi | 133 - > sys/gnu/dts/arm/exynos4412-galaxy-s3.dtsi | 177 - > sys/gnu/dts/arm/exynos4412-i9300.dts | 22 - > sys/gnu/dts/arm/exynos4412-i9305.dts | 20 - > sys/gnu/dts/arm/exynos4412-itop-elite.dts | 227 - > sys/gnu/dts/arm/exynos4412-itop-scp-core.dtsi | 503 -- > sys/gnu/dts/arm/exynos4412-midas.dtsi | 1375 ---- > sys/gnu/dts/arm/exynos4412-n710x.dts | 80 - > sys/gnu/dts/arm/exynos4412-odroid-common.dtsi | 573 -- > sys/gnu/dts/arm/exynos4412-odroidu3.dts | 131 - > sys/gnu/dts/arm/exynos4412-odroidx.dts | 109 - > sys/gnu/dts/arm/exynos4412-odroidx2.dts | 22 - > sys/gnu/dts/arm/exynos4412-origen.dts | 533 -- > sys/gnu/dts/arm/exynos4412-pinctrl.dtsi | 979 --- > sys/gnu/dts/arm/exynos4412-ppmu-common.dtsi | 47 - > sys/gnu/dts/arm/exynos4412-prime.dtsi | 47 - > sys/gnu/dts/arm/exynos4412-smdk4412.dts | 151 - > sys/gnu/dts/arm/exynos4412-tiny4412.dts | 121 - > sys/gnu/dts/arm/exynos4412-trats2.dts | 28 - > sys/gnu/dts/arm/exynos4412.dtsi | 802 --- > sys/gnu/dts/arm/exynos4415-pinctrl.dtsi | 573 -- > sys/gnu/dts/arm/exynos4415.dtsi | 649 -- > sys/gnu/dts/arm/exynos4x12-pinctrl.dtsi | 984 --- > sys/gnu/dts/arm/exynos4x12.dtsi | 594 -- > sys/gnu/dts/arm/exynos5.dtsi | 230 - > sys/gnu/dts/arm/exynos5250-arndale.dts | 650 -- > sys/gnu/dts/arm/exynos5250-pinctrl.dtsi | 833 --- > sys/gnu/dts/arm/exynos5250-smdk5250.dts | 417 -- > sys/gnu/dts/arm/exynos5250-snow-common.dtsi | 709 --- > sys/gnu/dts/arm/exynos5250-snow-rev5.dts | 55 - > sys/gnu/dts/arm/exynos5250-snow.dts | 51 - > sys/gnu/dts/arm/exynos5250-spring.dts | 548 -- > sys/gnu/dts/arm/exynos5250.dtsi | 1237 ---- > sys/gnu/dts/arm/exynos5260-pinctrl.dtsi | 585 -- > sys/gnu/dts/arm/exynos5260-xyref5260.dts | 90 - > sys/gnu/dts/arm/exynos5260.dtsi | 401 -- > sys/gnu/dts/arm/exynos5410-odroidxu.dts | 655 -- > sys/gnu/dts/arm/exynos5410-pinctrl.dtsi | 624 -- > sys/gnu/dts/arm/exynos5410-smdk5410.dts | 111 - > sys/gnu/dts/arm/exynos5410.dtsi | 448 -- > sys/gnu/dts/arm/exynos5420-arndale-octa.dts | 826 --- > sys/gnu/dts/arm/exynos5420-cpus.dtsi | 131 - > sys/gnu/dts/arm/exynos5420-peach-pit.dts | 1118 ---- > sys/gnu/dts/arm/exynos5420-pinctrl.dtsi | 734 --- > sys/gnu/dts/arm/exynos5420-smdk5420.dts | 421 -- > sys/gnu/dts/arm/exynos5420-trip-points.dtsi | 31 - > sys/gnu/dts/arm/exynos5420.dtsi | 1424 ----- > sys/gnu/dts/arm/exynos5422-cpu-thermal.dtsi | 103 - > sys/gnu/dts/arm/exynos5422-cpus.dtsi | 138 - > sys/gnu/dts/arm/exynos5422-odroid-core.dtsi | 1076 ---- > sys/gnu/dts/arm/exynos5422-odroidhc1.dts | 264 - > sys/gnu/dts/arm/exynos5422-odroidxu3-audio.dtsi | 89 - > sys/gnu/dts/arm/exynos5422-odroidxu3-common.dtsi | 505 -- > sys/gnu/dts/arm/exynos5422-odroidxu3-lite.dts | 105 - > sys/gnu/dts/arm/exynos5422-odroidxu3.dts | 72 - > sys/gnu/dts/arm/exynos5422-odroidxu4.dts | 98 - > sys/gnu/dts/arm/exynos54xx-odroidxu-leds.dtsi | 47 - > sys/gnu/dts/arm/exynos54xx.dtsi | 210 - > sys/gnu/dts/arm/exynos5800-peach-pi.dts | 1100 ---- > sys/gnu/dts/arm/exynos5800.dtsi | 162 - > sys/gnu/dts/arm/facebook-bmc-flash-layout.dtsi | 42 - > sys/gnu/dts/arm/ge863-pro3.dtsi | 77 - > sys/gnu/dts/arm/gemini-dlink-dir-685.dts | 511 -- > sys/gnu/dts/arm/gemini-dlink-dns-313.dts | 304 - > sys/gnu/dts/arm/gemini-nas4220b.dts | 189 - > sys/gnu/dts/arm/gemini-rut1xx.dts | 148 - > sys/gnu/dts/arm/gemini-sl93512r.dts | 312 - > sys/gnu/dts/arm/gemini-sq201.dts | 304 - > sys/gnu/dts/arm/gemini-wbd111.dts | 183 - > sys/gnu/dts/arm/gemini-wbd222.dts | 195 - > sys/gnu/dts/arm/gemini.dtsi | 449 -- > sys/gnu/dts/arm/gr-peach-audiocamerashield.dtsi | 75 - > sys/gnu/dts/arm/hi3519-demb.dts | 29 - > sys/gnu/dts/arm/hi3519.dtsi | 174 - > sys/gnu/dts/arm/hi3620-hi4511.dts | 647 -- > sys/gnu/dts/arm/hi3620.dtsi | 567 -- > sys/gnu/dts/arm/highbank.dts | 158 - > sys/gnu/dts/arm/hip01-ca9x2.dts | 48 - > sys/gnu/dts/arm/hip01.dtsi | 105 - > sys/gnu/dts/arm/hip04-d01.dts | 29 - > sys/gnu/dts/arm/hip04.dtsi | 986 --- > sys/gnu/dts/arm/hisi-x5hd2-dkb.dts | 83 - > sys/gnu/dts/arm/hisi-x5hd2.dtsi | 557 -- > sys/gnu/dts/arm/ibm-power9-dual.dtsi | 248 - > sys/gnu/dts/arm/imx1-ads.dts | 135 - > sys/gnu/dts/arm/imx1-apf9328.dts | 124 - > sys/gnu/dts/arm/imx1-pinfunc.h | 296 - > sys/gnu/dts/arm/imx1.dtsi | 276 - > sys/gnu/dts/arm/imx23-evk.dts | 145 - > sys/gnu/dts/arm/imx23-olinuxino.dts | 131 - > sys/gnu/dts/arm/imx23-pinfunc.h | 333 - > sys/gnu/dts/arm/imx23-sansa.dts | 207 - > sys/gnu/dts/arm/imx23-stmp378x_devb.dts | 76 - > sys/gnu/dts/arm/imx23-xfi3.dts | 180 - > sys/gnu/dts/arm/imx23.dtsi | 636 -- > sys/gnu/dts/arm/imx25-eukrea-cpuimx25.dtsi | 66 - > .../imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts | 65 - > .../imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts | 37 - > .../imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts | 37 - > .../dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts | 174 - > sys/gnu/dts/arm/imx25-karo-tx25.dts | 108 - > sys/gnu/dts/arm/imx25-pdk.dts | 313 - > sys/gnu/dts/arm/imx25-pinfunc.h | 636 -- > sys/gnu/dts/arm/imx25.dtsi | 637 -- > sys/gnu/dts/arm/imx27-apf27.dts | 112 - > sys/gnu/dts/arm/imx27-apf27dev.dts | 256 - > sys/gnu/dts/arm/imx27-eukrea-cpuimx27.dtsi | 284 - > .../dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts | 266 - > sys/gnu/dts/arm/imx27-pdk.dts | 191 - > sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts | 162 - > sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi | 97 - > sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts | 319 - > sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi | 344 - > sys/gnu/dts/arm/imx27-pinfunc.h | 474 -- > sys/gnu/dts/arm/imx27.dtsi | 593 -- > sys/gnu/dts/arm/imx28-apf28.dts | 80 - > sys/gnu/dts/arm/imx28-apf28dev.dts | 225 - > sys/gnu/dts/arm/imx28-apx4devkit.dts | 240 - > sys/gnu/dts/arm/imx28-cfa10036.dts | 140 - > sys/gnu/dts/arm/imx28-cfa10037.dts | 83 - > sys/gnu/dts/arm/imx28-cfa10049.dts | 428 -- > sys/gnu/dts/arm/imx28-cfa10055.dts | 161 - > sys/gnu/dts/arm/imx28-cfa10056.dts | 113 - > sys/gnu/dts/arm/imx28-cfa10057.dts | 171 - > sys/gnu/dts/arm/imx28-cfa10058.dts | 138 - > sys/gnu/dts/arm/imx28-duckbill-2-485.dts | 184 - > sys/gnu/dts/arm/imx28-duckbill-2-enocean.dts | 213 - > sys/gnu/dts/arm/imx28-duckbill-2-spi.dts | 194 - > sys/gnu/dts/arm/imx28-duckbill-2.dts | 178 - > sys/gnu/dts/arm/imx28-duckbill.dts | 147 - > sys/gnu/dts/arm/imx28-eukrea-mbmx283lc.dts | 64 - > sys/gnu/dts/arm/imx28-eukrea-mbmx287lc.dts | 43 - > sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi | 323 - > sys/gnu/dts/arm/imx28-evk.dts | 360 -- > sys/gnu/dts/arm/imx28-m28.dtsi | 56 - > sys/gnu/dts/arm/imx28-m28cu3.dts | 266 - > sys/gnu/dts/arm/imx28-m28evk.dts | 271 - > sys/gnu/dts/arm/imx28-pinfunc.h | 506 -- > sys/gnu/dts/arm/imx28-sps1.dts | 166 - > sys/gnu/dts/arm/imx28-ts4600.dts | 74 - > sys/gnu/dts/arm/imx28-tx28.dts | 749 --- > sys/gnu/dts/arm/imx28.dtsi | 1330 ---- > sys/gnu/dts/arm/imx31-bug.dts | 22 - > sys/gnu/dts/arm/imx31-lite.dts | 178 - > sys/gnu/dts/arm/imx31.dtsi | 370 -- > sys/gnu/dts/arm/imx35-eukrea-cpuimx35.dtsi | 89 - > .../dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts | 156 - > sys/gnu/dts/arm/imx35-pdk.dts | 62 - > sys/gnu/dts/arm/imx35-pinfunc.h | 966 --- > sys/gnu/dts/arm/imx35.dtsi | 414 -- > sys/gnu/dts/arm/imx50-evk.dts | 104 - > sys/gnu/dts/arm/imx50-kobo-aura.dts | 258 - > sys/gnu/dts/arm/imx50-pinfunc.h | 919 --- > sys/gnu/dts/arm/imx50.dtsi | 499 -- > sys/gnu/dts/arm/imx51-apf51.dts | 84 - > sys/gnu/dts/arm/imx51-apf51dev.dts | 217 - > sys/gnu/dts/arm/imx51-babbage.dts | 726 --- > sys/gnu/dts/arm/imx51-digi-connectcore-jsk.dts | 118 - > sys/gnu/dts/arm/imx51-digi-connectcore-som.dtsi | 389 -- > sys/gnu/dts/arm/imx51-eukrea-cpuimx51.dtsi | 92 - > .../dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts | 274 - > sys/gnu/dts/arm/imx51-pinfunc.h | 768 --- > sys/gnu/dts/arm/imx51-ts4800.dts | 330 - > sys/gnu/dts/arm/imx51-zii-rdu1.dts | 894 --- > sys/gnu/dts/arm/imx51-zii-scu2-mezz.dts | 457 -- > sys/gnu/dts/arm/imx51-zii-scu3-esb.dts | 472 -- > sys/gnu/dts/arm/imx51.dtsi | 654 -- > sys/gnu/dts/arm/imx53-ard.dts | 179 - > sys/gnu/dts/arm/imx53-cx9020.dts | 295 - > sys/gnu/dts/arm/imx53-kp-ddc.dts | 146 - > sys/gnu/dts/arm/imx53-kp-hsc.dts | 52 - > sys/gnu/dts/arm/imx53-kp.dtsi | 189 - > sys/gnu/dts/arm/imx53-m53.dtsi | 132 - > sys/gnu/dts/arm/imx53-m53evk.dts | 370 -- > sys/gnu/dts/arm/imx53-m53menlo.dts | 492 -- > sys/gnu/dts/arm/imx53-mba53.dts | 249 - > sys/gnu/dts/arm/imx53-pinfunc.h | 1189 ---- > sys/gnu/dts/arm/imx53-ppd.dts | 1083 ---- > sys/gnu/dts/arm/imx53-qsb-common.dtsi | 385 -- > sys/gnu/dts/arm/imx53-qsb.dts | 111 - > sys/gnu/dts/arm/imx53-qsrb.dts | 149 - > sys/gnu/dts/arm/imx53-smd.dts | 346 - > sys/gnu/dts/arm/imx53-tqma53.dtsi | 281 - > sys/gnu/dts/arm/imx53-tx53-x03x.dts | 351 -- > sys/gnu/dts/arm/imx53-tx53-x13x.dts | 262 - > sys/gnu/dts/arm/imx53-tx53.dtsi | 596 -- > sys/gnu/dts/arm/imx53-usbarmory.dts | 225 - > sys/gnu/dts/arm/imx53-voipac-bsb.dts | 153 - > sys/gnu/dts/arm/imx53-voipac-dmm-668.dtsi | 266 - > sys/gnu/dts/arm/imx53.dtsi | 856 --- > sys/gnu/dts/arm/imx6-logicpd-baseboard.dtsi | 561 -- > sys/gnu/dts/arm/imx6-logicpd-som.dtsi | 369 -- > sys/gnu/dts/arm/imx6dl-apf6dev.dts | 18 - > sys/gnu/dts/arm/imx6dl-aristainetos2_4.dts | 158 - > sys/gnu/dts/arm/imx6dl-aristainetos2_7.dts | 98 - > sys/gnu/dts/arm/imx6dl-aristainetos_4.dts | 83 - > sys/gnu/dts/arm/imx6dl-aristainetos_7.dts | 73 - > sys/gnu/dts/arm/imx6dl-colibri-eval-v3.dts | 261 - > sys/gnu/dts/arm/imx6dl-colibri-v1_1-eval-v3.dts | 31 - > sys/gnu/dts/arm/imx6dl-cubox-i-emmc-som-v15.dts | 52 - > sys/gnu/dts/arm/imx6dl-cubox-i-som-v15.dts | 51 - > sys/gnu/dts/arm/imx6dl-cubox-i.dts | 51 - > sys/gnu/dts/arm/imx6dl-dfi-fs700-m60.dts | 23 - > sys/gnu/dts/arm/imx6dl-eckelmann-ci4x10.dts | 381 -- > sys/gnu/dts/arm/imx6dl-emcon-avari.dts | 14 - > sys/gnu/dts/arm/imx6dl-gw51xx.dts | 13 - > sys/gnu/dts/arm/imx6dl-gw52xx.dts | 71 - > sys/gnu/dts/arm/imx6dl-gw53xx.dts | 71 - > sys/gnu/dts/arm/imx6dl-gw54xx.dts | 71 - > sys/gnu/dts/arm/imx6dl-gw551x.dts | 55 - > sys/gnu/dts/arm/imx6dl-gw552x.dts | 14 - > sys/gnu/dts/arm/imx6dl-gw553x.dts | 55 - > sys/gnu/dts/arm/imx6dl-gw560x.dts | 55 - > sys/gnu/dts/arm/imx6dl-gw5903.dts | 55 - > sys/gnu/dts/arm/imx6dl-gw5904.dts | 55 - > sys/gnu/dts/arm/imx6dl-gw5907.dts | 14 - > sys/gnu/dts/arm/imx6dl-gw5910.dts | 14 - > sys/gnu/dts/arm/imx6dl-gw5912.dts | 13 - > sys/gnu/dts/arm/imx6dl-gw5913.dts | 14 - > .../dts/arm/imx6dl-hummingboard-emmc-som-v15.dts | 53 - > sys/gnu/dts/arm/imx6dl-hummingboard-som-v15.dts | 52 - > sys/gnu/dts/arm/imx6dl-hummingboard.dts | 52 - > .../dts/arm/imx6dl-hummingboard2-emmc-som-v15.dts | 55 - > sys/gnu/dts/arm/imx6dl-hummingboard2-som-v15.dts | 54 - > sys/gnu/dts/arm/imx6dl-hummingboard2.dts | 53 - > sys/gnu/dts/arm/imx6dl-icore-mipi.dts | 25 - > sys/gnu/dts/arm/imx6dl-icore-rqs.dts | 15 - > sys/gnu/dts/arm/imx6dl-icore.dts | 32 - > sys/gnu/dts/arm/imx6dl-kontron-samx6i.dtsi | 12 - > sys/gnu/dts/arm/imx6dl-mamoj.dts | 495 -- > sys/gnu/dts/arm/imx6dl-nit6xlite.dts | 13 - > sys/gnu/dts/arm/imx6dl-nitrogen6x.dts | 15 - > sys/gnu/dts/arm/imx6dl-phytec-mira-rdk-nand.dts | 64 - > sys/gnu/dts/arm/imx6dl-phytec-pbab01.dts | 13 - > sys/gnu/dts/arm/imx6dl-phytec-pfla02.dtsi | 17 - > sys/gnu/dts/arm/imx6dl-pico-dwarf.dts | 17 - > sys/gnu/dts/arm/imx6dl-pico-hobbit.dts | 17 - > sys/gnu/dts/arm/imx6dl-pico-nymph.dts | 17 - > sys/gnu/dts/arm/imx6dl-pico-pi.dts | 17 - > sys/gnu/dts/arm/imx6dl-pinfunc.h | 1088 ---- > sys/gnu/dts/arm/imx6dl-rex-basic.dts | 27 - > sys/gnu/dts/arm/imx6dl-riotboard.dts | 594 -- > sys/gnu/dts/arm/imx6dl-sabreauto.dts | 28 - > sys/gnu/dts/arm/imx6dl-sabrelite.dts | 55 - > sys/gnu/dts/arm/imx6dl-sabresd.dts | 18 - > sys/gnu/dts/arm/imx6dl-savageboard.dts | 51 - > sys/gnu/dts/arm/imx6dl-ts4900.dts | 55 - > sys/gnu/dts/arm/imx6dl-ts7970.dts | 56 - > sys/gnu/dts/arm/imx6dl-tx6dl-comtft.dts | 79 - > sys/gnu/dts/arm/imx6dl-tx6s-8034-mb7.dts | 48 - > sys/gnu/dts/arm/imx6dl-tx6s-8034.dts | 70 - > sys/gnu/dts/arm/imx6dl-tx6s-8035-mb7.dts | 48 - > sys/gnu/dts/arm/imx6dl-tx6s-8035.dts | 86 - > sys/gnu/dts/arm/imx6dl-tx6u-801x.dts | 50 - > sys/gnu/dts/arm/imx6dl-tx6u-8033-mb7.dts | 48 - > sys/gnu/dts/arm/imx6dl-tx6u-8033.dts | 82 - > sys/gnu/dts/arm/imx6dl-tx6u-80xx-mb7.dts | 48 - > sys/gnu/dts/arm/imx6dl-tx6u-811x.dts | 50 - > sys/gnu/dts/arm/imx6dl-tx6u-81xx-mb7.dts | 48 - > sys/gnu/dts/arm/imx6dl-udoo.dts | 14 - > sys/gnu/dts/arm/imx6dl-wandboard-revb1.dts | 19 - > sys/gnu/dts/arm/imx6dl-wandboard-revd1.dts | 19 - > sys/gnu/dts/arm/imx6dl-wandboard.dts | 19 - > sys/gnu/dts/arm/imx6dl-yapp4-common.dtsi | 623 -- > sys/gnu/dts/arm/imx6dl-yapp4-draco.dts | 58 - > sys/gnu/dts/arm/imx6dl-yapp4-hydra.dts | 50 - > sys/gnu/dts/arm/imx6dl-yapp4-ursa.dts | 54 - > sys/gnu/dts/arm/imx6dl.dtsi | 394 -- > sys/gnu/dts/arm/imx6q-apalis-eval.dts | 273 - > sys/gnu/dts/arm/imx6q-apalis-ixora-v1.1.dts | 274 - > sys/gnu/dts/arm/imx6q-apalis-ixora.dts | 275 - > sys/gnu/dts/arm/imx6q-apf6dev.dts | 22 - > sys/gnu/dts/arm/imx6q-arm2.dts | 225 - > sys/gnu/dts/arm/imx6q-b450v3.dts | 152 - > sys/gnu/dts/arm/imx6q-b650v3.dts | 151 - > sys/gnu/dts/arm/imx6q-b850v3.dts | 290 - > sys/gnu/dts/arm/imx6q-ba16.dtsi | 639 -- > sys/gnu/dts/arm/imx6q-bx50v3.dtsi | 394 -- > sys/gnu/dts/arm/imx6q-cm-fx6.dts | 491 -- > sys/gnu/dts/arm/imx6q-cubox-i-emmc-som-v15.dts | 60 - > sys/gnu/dts/arm/imx6q-cubox-i-som-v15.dts | 59 - > sys/gnu/dts/arm/imx6q-cubox-i.dts | 59 - > sys/gnu/dts/arm/imx6q-dfi-fs700-m60.dts | 23 - > sys/gnu/dts/arm/imx6q-dhcom-pdk2.dts | 270 - > sys/gnu/dts/arm/imx6q-dhcom-som.dtsi | 475 -- > .../arm/imx6q-display5-tianma-tm070-1280x768.dts | 51 - > sys/gnu/dts/arm/imx6q-display5.dtsi | 597 -- > sys/gnu/dts/arm/imx6q-dmo-edmqmx6.dts | 481 -- > sys/gnu/dts/arm/imx6q-dms-ba16.dts | 139 - > sys/gnu/dts/arm/imx6q-emcon-avari.dts | 14 - > sys/gnu/dts/arm/imx6q-evi.dts | 517 -- > sys/gnu/dts/arm/imx6q-gk802.dts | 179 - > sys/gnu/dts/arm/imx6q-gw51xx.dts | 13 - > sys/gnu/dts/arm/imx6q-gw52xx.dts | 75 - > sys/gnu/dts/arm/imx6q-gw53xx.dts | 75 - > sys/gnu/dts/arm/imx6q-gw5400-a.dts | 510 -- > sys/gnu/dts/arm/imx6q-gw54xx.dts | 177 - > sys/gnu/dts/arm/imx6q-gw551x.dts | 55 - > sys/gnu/dts/arm/imx6q-gw552x.dts | 18 - > sys/gnu/dts/arm/imx6q-gw553x.dts | 55 - > sys/gnu/dts/arm/imx6q-gw560x.dts | 59 - > sys/gnu/dts/arm/imx6q-gw5903.dts | 55 - > sys/gnu/dts/arm/imx6q-gw5904.dts | 59 - > sys/gnu/dts/arm/imx6q-gw5907.dts | 14 - > sys/gnu/dts/arm/imx6q-gw5910.dts | 14 - > sys/gnu/dts/arm/imx6q-gw5912.dts | 13 - > sys/gnu/dts/arm/imx6q-gw5913.dts | 14 - > sys/gnu/dts/arm/imx6q-h100.dts | 382 -- > .../dts/arm/imx6q-hummingboard-emmc-som-v15.dts | 61 - > sys/gnu/dts/arm/imx6q-hummingboard-som-v15.dts | 60 - > sys/gnu/dts/arm/imx6q-hummingboard.dts | 60 - > .../dts/arm/imx6q-hummingboard2-emmc-som-v15.dts | 63 - > sys/gnu/dts/arm/imx6q-hummingboard2-som-v15.dts | 62 - > sys/gnu/dts/arm/imx6q-hummingboard2.dts | 61 - > sys/gnu/dts/arm/imx6q-icore-mipi.dts | 33 - > sys/gnu/dts/arm/imx6q-icore-ofcap10.dts | 40 - > sys/gnu/dts/arm/imx6q-icore-ofcap12.dts | 43 - > sys/gnu/dts/arm/imx6q-icore-rqs.dts | 19 - > sys/gnu/dts/arm/imx6q-icore.dts | 57 - > sys/gnu/dts/arm/imx6q-kontron-samx6i.dtsi | 36 - > sys/gnu/dts/arm/imx6q-kp-tpc.dts | 23 - > sys/gnu/dts/arm/imx6q-kp.dtsi | 432 -- > sys/gnu/dts/arm/imx6q-logicpd.dts | 130 - > sys/gnu/dts/arm/imx6q-marsboard.dts | 417 -- > sys/gnu/dts/arm/imx6q-mccmon6.dts | 470 -- > sys/gnu/dts/arm/imx6q-nitrogen6_max.dts | 17 - > sys/gnu/dts/arm/imx6q-nitrogen6_som2.dts | 17 - > sys/gnu/dts/arm/imx6q-nitrogen6x.dts | 19 - > sys/gnu/dts/arm/imx6q-novena.dts | 792 --- > sys/gnu/dts/arm/imx6q-phytec-mira-rdk-emmc.dts | 72 - > sys/gnu/dts/arm/imx6q-phytec-mira-rdk-nand.dts | 72 - > sys/gnu/dts/arm/imx6q-phytec-pbab01.dts | 21 - > sys/gnu/dts/arm/imx6q-phytec-pfla02.dtsi | 17 - > sys/gnu/dts/arm/imx6q-pico-dwarf.dts | 17 - > sys/gnu/dts/arm/imx6q-pico-hobbit.dts | 17 - > sys/gnu/dts/arm/imx6q-pico-nymph.dts | 17 - > sys/gnu/dts/arm/imx6q-pico-pi.dts | 17 - > sys/gnu/dts/arm/imx6q-pinfunc.h | 1044 --- > sys/gnu/dts/arm/imx6q-pistachio.dts | 694 -- > sys/gnu/dts/arm/imx6q-rex-pro.dts | 31 - > sys/gnu/dts/arm/imx6q-sabreauto.dts | 18 - > sys/gnu/dts/arm/imx6q-sabrelite.dts | 59 - > sys/gnu/dts/arm/imx6q-sabresd.dts | 23 - > sys/gnu/dts/arm/imx6q-savageboard.dts | 55 - > sys/gnu/dts/arm/imx6q-sbc6x.dts | 93 - > sys/gnu/dts/arm/imx6q-tbs2910.dts | 388 -- > sys/gnu/dts/arm/imx6q-ts4900.dts | 59 - > sys/gnu/dts/arm/imx6q-ts7970.dts | 60 - > sys/gnu/dts/arm/imx6q-tx6q-1010-comtft.dts | 79 - > sys/gnu/dts/arm/imx6q-tx6q-1010.dts | 54 - > sys/gnu/dts/arm/imx6q-tx6q-1020-comtft.dts | 110 - > sys/gnu/dts/arm/imx6q-tx6q-1020.dts | 86 - > sys/gnu/dts/arm/imx6q-tx6q-1036-mb7.dts | 48 - > sys/gnu/dts/arm/imx6q-tx6q-1036.dts | 86 - > sys/gnu/dts/arm/imx6q-tx6q-10x0-mb7.dts | 48 - > sys/gnu/dts/arm/imx6q-tx6q-1110.dts | 58 - > sys/gnu/dts/arm/imx6q-tx6q-11x0-mb7.dts | 48 - > sys/gnu/dts/arm/imx6q-udoo.dts | 18 - > sys/gnu/dts/arm/imx6q-utilite-pro.dts | 355 -- > sys/gnu/dts/arm/imx6q-var-dt6customboard.dts | 234 - > sys/gnu/dts/arm/imx6q-wandboard-revb1.dts | 23 - > sys/gnu/dts/arm/imx6q-wandboard-revd1.dts | 23 - > sys/gnu/dts/arm/imx6q-wandboard.dts | 23 - > sys/gnu/dts/arm/imx6q-zii-rdu2.dts | 20 - > sys/gnu/dts/arm/imx6q.dtsi | 548 -- > sys/gnu/dts/arm/imx6qdl-apalis.dtsi | 952 --- > sys/gnu/dts/arm/imx6qdl-apf6.dtsi | 152 - > sys/gnu/dts/arm/imx6qdl-apf6dev.dtsi | 450 -- > sys/gnu/dts/arm/imx6qdl-aristainetos.dtsi | 408 -- > sys/gnu/dts/arm/imx6qdl-aristainetos2.dtsi | 626 -- > sys/gnu/dts/arm/imx6qdl-colibri-v1_1-uhs.dtsi | 44 - > sys/gnu/dts/arm/imx6qdl-colibri.dtsi | 864 --- > sys/gnu/dts/arm/imx6qdl-cubox-i.dtsi | 269 - > sys/gnu/dts/arm/imx6qdl-dfi-fs700-m60.dtsi | 201 - > sys/gnu/dts/arm/imx6qdl-emcon-avari.dtsi | 177 - > sys/gnu/dts/arm/imx6qdl-emcon.dtsi | 831 --- > sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi | 499 -- > sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi | 633 -- > sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi | 617 -- > sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi | 709 --- > sys/gnu/dts/arm/imx6qdl-gw551x.dtsi | 563 -- > sys/gnu/dts/arm/imx6qdl-gw552x.dtsi | 381 -- > sys/gnu/dts/arm/imx6qdl-gw553x.dtsi | 599 -- > sys/gnu/dts/arm/imx6qdl-gw560x.dtsi | 782 --- > sys/gnu/dts/arm/imx6qdl-gw5903.dtsi | 655 -- > sys/gnu/dts/arm/imx6qdl-gw5904.dtsi | 671 -- > sys/gnu/dts/arm/imx6qdl-gw5907.dtsi | 399 -- > sys/gnu/dts/arm/imx6qdl-gw5910.dtsi | 507 -- > sys/gnu/dts/arm/imx6qdl-gw5912.dtsi | 461 -- > sys/gnu/dts/arm/imx6qdl-gw5913.dtsi | 348 - > sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi | 368 -- > sys/gnu/dts/arm/imx6qdl-hummingboard2-emmc.dtsi | 72 - > sys/gnu/dts/arm/imx6qdl-hummingboard2.dtsi | 577 -- > sys/gnu/dts/arm/imx6qdl-icore-1.5.dtsi | 32 - > sys/gnu/dts/arm/imx6qdl-icore-rqs.dtsi | 466 -- > sys/gnu/dts/arm/imx6qdl-icore.dtsi | 430 -- > sys/gnu/dts/arm/imx6qdl-kontron-samx6i.dtsi | 815 --- > sys/gnu/dts/arm/imx6qdl-nit6xlite.dtsi | 570 -- > sys/gnu/dts/arm/imx6qdl-nitrogen6_max.dtsi | 835 --- > sys/gnu/dts/arm/imx6qdl-nitrogen6_som2.dtsi | 733 --- > sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi | 680 -- > sys/gnu/dts/arm/imx6qdl-phytec-mira.dtsi | 390 -- > sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi | 175 - > sys/gnu/dts/arm/imx6qdl-phytec-pfla02.dtsi | 445 -- > sys/gnu/dts/arm/imx6qdl-phytec-phycore-som.dtsi | 290 - > sys/gnu/dts/arm/imx6qdl-pico-dwarf.dtsi | 45 - > sys/gnu/dts/arm/imx6qdl-pico-hobbit.dtsi | 37 - > sys/gnu/dts/arm/imx6qdl-pico-nymph.dtsi | 54 - > sys/gnu/dts/arm/imx6qdl-pico-pi.dtsi | 31 - > sys/gnu/dts/arm/imx6qdl-pico.dtsi | 617 -- > sys/gnu/dts/arm/imx6qdl-rex.dtsi | 367 -- > sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi | 861 --- > sys/gnu/dts/arm/imx6qdl-sabrelite.dtsi | 765 --- > sys/gnu/dts/arm/imx6qdl-sabresd.dtsi | 824 --- > sys/gnu/dts/arm/imx6qdl-savageboard.dtsi | 255 - > sys/gnu/dts/arm/imx6qdl-sr-som-brcm.dtsi | 144 - > sys/gnu/dts/arm/imx6qdl-sr-som-emmc.dtsi | 70 - > sys/gnu/dts/arm/imx6qdl-sr-som-ti.dtsi | 171 - > sys/gnu/dts/arm/imx6qdl-sr-som.dtsi | 132 - > sys/gnu/dts/arm/imx6qdl-ts4900.dtsi | 479 -- > sys/gnu/dts/arm/imx6qdl-ts7970.dtsi | 594 -- > sys/gnu/dts/arm/imx6qdl-tx6-lcd.dtsi | 251 - > sys/gnu/dts/arm/imx6qdl-tx6-lvds.dtsi | 286 - > sys/gnu/dts/arm/imx6qdl-tx6-mb7.dtsi | 96 - > sys/gnu/dts/arm/imx6qdl-tx6.dtsi | 811 --- > sys/gnu/dts/arm/imx6qdl-udoo.dtsi | 324 - > sys/gnu/dts/arm/imx6qdl-var-dart.dtsi | 504 -- > sys/gnu/dts/arm/imx6qdl-wandboard-revb1.dtsi | 36 - > sys/gnu/dts/arm/imx6qdl-wandboard-revc1.dtsi | 35 - > sys/gnu/dts/arm/imx6qdl-wandboard-revd1.dtsi | 195 - > sys/gnu/dts/arm/imx6qdl-wandboard.dtsi | 358 -- > sys/gnu/dts/arm/imx6qdl-zii-rdu2.dtsi | 1140 ---- > sys/gnu/dts/arm/imx6qdl.dtsi | 1382 ---- > sys/gnu/dts/arm/imx6qp-nitrogen6_max.dts | 22 - > sys/gnu/dts/arm/imx6qp-nitrogen6_som2.dts | 18 - > sys/gnu/dts/arm/imx6qp-phytec-mira-rdk-nand.dts | 72 - > sys/gnu/dts/arm/imx6qp-sabreauto.dts | 55 - > sys/gnu/dts/arm/imx6qp-sabresd.dts | 55 - > sys/gnu/dts/arm/imx6qp-tx6qp-8037-mb7.dts | 48 - > sys/gnu/dts/arm/imx6qp-tx6qp-8037.dts | 86 - > sys/gnu/dts/arm/imx6qp-tx6qp-8137-mb7.dts | 57 - > sys/gnu/dts/arm/imx6qp-tx6qp-8137.dts | 90 - > sys/gnu/dts/arm/imx6qp-wandboard-revd1.dts | 23 - > sys/gnu/dts/arm/imx6qp-zii-rdu2.dts | 25 - > sys/gnu/dts/arm/imx6qp.dtsi | 114 - > sys/gnu/dts/arm/imx6sl-evk.dts | 648 -- > sys/gnu/dts/arm/imx6sl-pinfunc.h | 1073 ---- > sys/gnu/dts/arm/imx6sl-tolino-shine3.dts | 322 - > sys/gnu/dts/arm/imx6sl-warp.dts | 234 - > sys/gnu/dts/arm/imx6sl.dtsi | 1002 --- > sys/gnu/dts/arm/imx6sll-evk.dts | 502 -- > sys/gnu/dts/arm/imx6sll-kobo-clarahd.dts | 324 - > sys/gnu/dts/arm/imx6sll-pinfunc.h | 880 --- > sys/gnu/dts/arm/imx6sll.dtsi | 829 --- > sys/gnu/dts/arm/imx6sx-nitrogen6sx.dts | 602 -- > sys/gnu/dts/arm/imx6sx-pinfunc.h | 1668 ----- > sys/gnu/dts/arm/imx6sx-sabreauto.dts | 461 -- > *** 952091 LINES SKIPPED *** > -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Sat Jan 16 10:34:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F39A04DAD73; Sat, 16 Jan 2021 10:34: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 4DHvYs6bV7z3Phx; Sat, 16 Jan 2021 10:34: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 D53FF5A78; Sat, 16 Jan 2021 10:34: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 10GAYfKr088432; Sat, 16 Jan 2021 10:34:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GAYf3W088431; Sat, 16 Jan 2021 10:34:41 GMT (envelope-from git) Date: Sat, 16 Jan 2021 10:34:41 GMT Message-Id: <202101161034.10GAYf3W088431@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: 384bd0b5b0c4 - main - riscv: Add the device-tree path to the include path 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: 384bd0b5b0c41d67abb65a16c534d509a416b635 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 10:34:42 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=384bd0b5b0c41d67abb65a16c534d509a416b635 commit 384bd0b5b0c41d67abb65a16c534d509a416b635 Author: Emmanuel Vadot AuthorDate: 2021-01-16 10:31:17 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-16 10:31:17 +0000 riscv: Add the device-tree path to the include path --- sys/conf/Makefile.riscv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/Makefile.riscv b/sys/conf/Makefile.riscv index 06ce602f25e8..d4b1e6934ae8 100644 --- a/sys/conf/Makefile.riscv +++ b/sys/conf/Makefile.riscv @@ -26,7 +26,7 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -INCLUDES+= -I$S/contrib/libfdt +INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include # Set the ELF LMA to the address that OpenSBI's fw_jump jumps to. This allows # us to load the kernel with the -kernel flag in QEMU without having to embed From owner-dev-commits-src-all@freebsd.org Sat Jan 16 10:34:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D8984DAEE8; Sat, 16 Jan 2021 10:34: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 4DHvYv0RNGz3PYf; Sat, 16 Jan 2021 10:34: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 01EA156EF; Sat, 16 Jan 2021 10:34: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 10GAYgZN088457; Sat, 16 Jan 2021 10:34:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GAYgnn088456; Sat, 16 Jan 2021 10:34:42 GMT (envelope-from git) Date: Sat, 16 Jan 2021 10:34:42 GMT Message-Id: <202101161034.10GAYgnn088456@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: fa67846c6f52 - main - riscv: Fix build by using the correct device-tree include path 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: fa67846c6f523a09a22495b945e3367baa8526a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 10:34:43 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fa67846c6f523a09a22495b945e3367baa8526a2 commit fa67846c6f523a09a22495b945e3367baa8526a2 Author: Emmanuel Vadot AuthorDate: 2021-01-16 10:31:39 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-16 10:31:39 +0000 riscv: Fix build by using the correct device-tree include path --- sys/riscv/sifive/fu540_prci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/riscv/sifive/fu540_prci.c b/sys/riscv/sifive/fu540_prci.c index e8e0740def92..133cdba26d10 100644 --- a/sys/riscv/sifive/fu540_prci.c +++ b/sys/riscv/sifive/fu540_prci.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include static struct ofw_compat_data compat_data[] = { { "sifive,aloeprci0", 1 }, From owner-dev-commits-src-all@freebsd.org Sat Jan 16 10:34:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B34E4DAFCA; Sat, 16 Jan 2021 10:34: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 4DHvYw2747z3PgT; Sat, 16 Jan 2021 10:34: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 26EE056F0; Sat, 16 Jan 2021 10:34: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 10GAYiDF088476; Sat, 16 Jan 2021 10:34:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GAYiYw088475; Sat, 16 Jan 2021 10:34:44 GMT (envelope-from git) Date: Sat, 16 Jan 2021 10:34:44 GMT Message-Id: <202101161034.10GAYiYw088475@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: a0ee5920bee2 - main - mips: Add the device-tree path to the include paths 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: a0ee5920bee25b8621da55e6b2b563714a92ccb7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 10:34:44 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=a0ee5920bee25b8621da55e6b2b563714a92ccb7 commit a0ee5920bee25b8621da55e6b2b563714a92ccb7 Author: Emmanuel Vadot AuthorDate: 2021-01-16 10:33:37 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-16 10:33:37 +0000 mips: Add the device-tree path to the include paths --- sys/conf/Makefile.mips | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/Makefile.mips b/sys/conf/Makefile.mips index 0060ad7f03d3..add27c1752a1 100644 --- a/sys/conf/Makefile.mips +++ b/sys/conf/Makefile.mips @@ -28,7 +28,7 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -INCLUDES+= -I$S/contrib/libfdt +INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include LDSCRIPT_NAME?=ldscript.$M SYSTEM_LD:= ${SYSTEM_LD:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}} From owner-dev-commits-src-all@freebsd.org Sat Jan 16 10:34:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 688944DAF30; Sat, 16 Jan 2021 10:34: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 4DHvYx6s2tz3Pss; Sat, 16 Jan 2021 10:34: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 55868582F; Sat, 16 Jan 2021 10:34: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 10GAYjAF088498; Sat, 16 Jan 2021 10:34:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GAYj2v088497; Sat, 16 Jan 2021 10:34:45 GMT (envelope-from git) Date: Sat, 16 Jan 2021 10:34:45 GMT Message-Id: <202101161034.10GAYj2v088497@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: 8ca9ff4f28d2 - main - mips: Fix build by using the correct device-tree include path 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: 8ca9ff4f28d2055741e423d1c7befe178b3d6faf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 10:34:46 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8ca9ff4f28d2055741e423d1c7befe178b3d6faf commit 8ca9ff4f28d2055741e423d1c7befe178b3d6faf Author: Emmanuel Vadot AuthorDate: 2021-01-16 10:34:10 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-16 10:34:10 +0000 mips: Fix build by using the correct device-tree include path --- sys/mips/ingenic/jz4780_clock.c | 2 +- sys/mips/ingenic/jz4780_gpio.c | 2 +- sys/mips/mediatek/mtk_gpio_v1.c | 2 +- sys/mips/mediatek/mtk_gpio_v2.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/mips/ingenic/jz4780_clock.c b/sys/mips/ingenic/jz4780_clock.c index 7a6a989d5e93..f743e193c7a9 100644 --- a/sys/mips/ingenic/jz4780_clock.c +++ b/sys/mips/ingenic/jz4780_clock.c @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #include "clkdev_if.h" -#include +#include /********************************************************************** * JZ4780 CGU clock domain diff --git a/sys/mips/ingenic/jz4780_gpio.c b/sys/mips/ingenic/jz4780_gpio.c index fe1de7ccb915..77d1f5baaa3a 100644 --- a/sys/mips/ingenic/jz4780_gpio.c +++ b/sys/mips/ingenic/jz4780_gpio.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "jz4780_gpio_if.h" #include "gpio_if.h" diff --git a/sys/mips/mediatek/mtk_gpio_v1.c b/sys/mips/mediatek/mtk_gpio_v1.c index 2771c6610d35..8c7df30f81e3 100644 --- a/sys/mips/mediatek/mtk_gpio_v1.c +++ b/sys/mips/mediatek/mtk_gpio_v1.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "gpio_if.h" #include "pic_if.h" diff --git a/sys/mips/mediatek/mtk_gpio_v2.c b/sys/mips/mediatek/mtk_gpio_v2.c index cd1708261fd4..677c42c64c0b 100644 --- a/sys/mips/mediatek/mtk_gpio_v2.c +++ b/sys/mips/mediatek/mtk_gpio_v2.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "gpio_if.h" #include "pic_if.h" From owner-dev-commits-src-all@freebsd.org Sat Jan 16 10:35:54 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16F714DB0D0; Sat, 16 Jan 2021 10:35:54 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHvbF1W4Pz3QCh; Sat, 16 Jan 2021 10:35:52 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1610793350; 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=Df6uucAJmHLxvk/V7om8Z6dqOYsA+PwFYOevFZ5ITaI=; b=Yyrp6ajcW+hQs3VQiGlzznEX2/E1iBJ+chWsfM+Qlbe9oGrAgO6MOCBx2Gk9Lyqnv0j1LM OvZPw6+vjhN2BdJe7vJM4RqwUwJzrqA5cIsjuzsOQZnYvGkGszBpm2keAScA2cDXrjOKK3 VFV/gPE1FemIXfyElh2y/kEFlg5XXjo= Received: from amy.home (lfbn-idf2-1-745-114.w86-247.abo.wanadoo.fr [86.247.192.114]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 970568c7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 16 Jan 2021 10:35:50 +0000 (UTC) Date: Sat, 16 Jan 2021 11:35:50 +0100 From: Emmanuel Vadot To: Mateusz Guzik Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7c84a7405bee - main - Remove the old dts imported tree. Message-Id: <20210116113550.4cffdf66508c93cd5da4be72@bidouilliste.com> In-Reply-To: References: <202101151910.10FJAEgs080434@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DHvbF1W4Pz3QCh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 10:35:54 -0000 On Sat, 16 Jan 2021 11:07:05 +0100 Mateusz Guzik wrote: > I did not check which commit specifically is responsible, but riscv > fails to build: > > /usr/src/sys/riscv/sifive/fu540_prci.c:54:10: fatal error: > 'gnu/dts/include/dt-bindings/clock/sifive-fu540-prci.h' file not found > #include > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated. > Should be fixed by fa67846c6f523a0, sorry I forgot about riscv and mips > On 1/15/21, Emmanuel Vadot wrote: > > The branch main has been updated by manu: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=7c84a7405beede34cd07cf7753d72d1098532baf > > > > commit 7c84a7405beede34cd07cf7753d72d1098532baf > > Author: Emmanuel Vadot > > AuthorDate: 2021-01-15 18:12:04 +0000 > > Commit: Emmanuel Vadot > > CommitDate: 2021-01-15 19:09:55 +0000 > > > > Remove the old dts imported tree. > > > > The new one is in sys/contrib/device-tree > > --- > > sys/gnu/dts/FreeBSD-list | 77 - > > sys/gnu/dts/FreeBSD-upgrade | 24 - > > sys/gnu/dts/Makefile | 3 - > > sys/gnu/dts/arm/aks-cdu.dts | 122 - > > sys/gnu/dts/arm/alphascale-asm9260-devkit.dts | 13 - > > sys/gnu/dts/arm/alphascale-asm9260.dtsi | 64 - > > sys/gnu/dts/arm/alpine-db.dts | 35 - > > sys/gnu/dts/arm/alpine.dtsi | 176 - > > sys/gnu/dts/arm/am335x-baltos-ir2110.dts | 83 - > > sys/gnu/dts/arm/am335x-baltos-ir3220.dts | 125 - > > sys/gnu/dts/arm/am335x-baltos-ir5221.dts | 149 - > > sys/gnu/dts/arm/am335x-baltos-leds.dtsi | 47 - > > sys/gnu/dts/arm/am335x-baltos.dtsi | 402 -- > > sys/gnu/dts/arm/am335x-base0033.dts | 92 - > > sys/gnu/dts/arm/am335x-bone-common.dtsi | 399 -- > > sys/gnu/dts/arm/am335x-bone.dts | 23 - > > sys/gnu/dts/arm/am335x-boneblack-common.dtsi | 169 - > > sys/gnu/dts/arm/am335x-boneblack-wireless.dts | 110 - > > sys/gnu/dts/arm/am335x-boneblack.dts | 25 - > > sys/gnu/dts/arm/am335x-boneblue.dts | 421 -- > > sys/gnu/dts/arm/am335x-bonegreen-common.dtsi | 41 - > > sys/gnu/dts/arm/am335x-bonegreen-wireless.dts | 127 - > > sys/gnu/dts/arm/am335x-bonegreen.dts | 14 - > > sys/gnu/dts/arm/am335x-chiliboard.dts | 183 - > > sys/gnu/dts/arm/am335x-chilisom.dtsi | 175 - > > sys/gnu/dts/arm/am335x-cm-t335.dts | 513 -- > > sys/gnu/dts/arm/am335x-evm.dts | 777 --- > > sys/gnu/dts/arm/am335x-evmsk.dts | 719 --- > > sys/gnu/dts/arm/am335x-guardian.dts | 490 -- > > sys/gnu/dts/arm/am335x-icev2.dts | 512 -- > > sys/gnu/dts/arm/am335x-igep0033.dtsi | 300 - > > sys/gnu/dts/arm/am335x-lxm.dts | 345 - > > sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi | 227 - > > sys/gnu/dts/arm/am335x-moxa-uc-2101.dts | 69 - > > sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts | 503 -- > > sys/gnu/dts/arm/am335x-nano.dts | 474 -- > > sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts | 87 - > > sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts | 95 - > > sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts | 115 - > > sys/gnu/dts/arm/am335x-osd3358-sm-red.dts | 439 -- > > sys/gnu/dts/arm/am335x-osd335x-common.dtsi | 124 - > > sys/gnu/dts/arm/am335x-pcm-953.dtsi | 242 - > > sys/gnu/dts/arm/am335x-pdu001.dts | 575 -- > > sys/gnu/dts/arm/am335x-pepper.dts | 641 -- > > sys/gnu/dts/arm/am335x-phycore-rdk.dts | 28 - > > sys/gnu/dts/arm/am335x-phycore-som.dtsi | 341 - > > sys/gnu/dts/arm/am335x-pocketbeagle.dts | 214 - > > sys/gnu/dts/arm/am335x-regor-rdk.dts | 24 - > > sys/gnu/dts/arm/am335x-regor.dtsi | 202 - > > sys/gnu/dts/arm/am335x-sancloud-bbe.dts | 137 - > > sys/gnu/dts/arm/am335x-sbc-t335.dts | 176 - > > sys/gnu/dts/arm/am335x-shc.dts | 555 -- > > sys/gnu/dts/arm/am335x-sl50.dts | 717 --- > > sys/gnu/dts/arm/am335x-wega-rdk.dts | 23 - > > sys/gnu/dts/arm/am335x-wega.dtsi | 196 - > > sys/gnu/dts/arm/am33xx-clocks.dtsi | 676 -- > > sys/gnu/dts/arm/am33xx-l4.dtsi | 2127 ------- > > sys/gnu/dts/arm/am33xx.dtsi | 642 -- > > sys/gnu/dts/arm/am3517-craneboard.dts | 171 - > > sys/gnu/dts/arm/am3517-evm-ui.dtsi | 217 - > > sys/gnu/dts/arm/am3517-evm.dts | 322 - > > sys/gnu/dts/arm/am3517-som.dtsi | 234 - > > sys/gnu/dts/arm/am3517.dtsi | 193 - > > sys/gnu/dts/arm/am3517_mt_ventoux.dts | 24 - > > sys/gnu/dts/arm/am35xx-clocks.dtsi | 125 - > > sys/gnu/dts/arm/am3703.dtsi | 14 - > > sys/gnu/dts/arm/am3715.dtsi | 10 - > > sys/gnu/dts/arm/am3874-iceboard.dts | 489 -- > > sys/gnu/dts/arm/am4372.dtsi | 576 -- > > sys/gnu/dts/arm/am437x-cm-t43.dts | 420 -- > > sys/gnu/dts/arm/am437x-gp-evm.dts | 1114 ---- > > sys/gnu/dts/arm/am437x-idk-evm.dts | 536 -- > > sys/gnu/dts/arm/am437x-l4.dtsi | 2529 -------- > > sys/gnu/dts/arm/am437x-sbc-t43.dts | 177 - > > sys/gnu/dts/arm/am437x-sk-evm.dts | 896 --- > > sys/gnu/dts/arm/am43x-epos-evm.dts | 1013 --- > > sys/gnu/dts/arm/am43xx-clocks.dtsi | 883 --- > > sys/gnu/dts/arm/am57-pruss.dtsi | 50 - > > sys/gnu/dts/arm/am5718.dtsi | 33 - > > sys/gnu/dts/arm/am571x-idk.dts | 237 - > > sys/gnu/dts/arm/am5728.dtsi | 34 - > > sys/gnu/dts/arm/am5729-beagleboneai.dts | 731 --- > > sys/gnu/dts/arm/am572x-idk-common.dtsi | 203 - > > sys/gnu/dts/arm/am572x-idk.dts | 34 - > > sys/gnu/dts/arm/am5748.dtsi | 34 - > > sys/gnu/dts/arm/am574x-idk.dts | 46 - > > sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi | 640 -- > > sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts | 36 - > > sys/gnu/dts/arm/am57xx-beagle-x15-revc.dts | 31 - > > sys/gnu/dts/arm/am57xx-beagle-x15.dts | 38 - > > sys/gnu/dts/arm/am57xx-cl-som-am57x.dts | 622 -- > > sys/gnu/dts/arm/am57xx-commercial-grade.dtsi | 24 - > > sys/gnu/dts/arm/am57xx-idk-common.dtsi | 604 -- > > sys/gnu/dts/arm/am57xx-industrial-grade.dtsi | 24 - > > sys/gnu/dts/arm/am57xx-sbc-am57x.dts | 176 - > > sys/gnu/dts/arm/animeo_ip.dts | 196 - > > .../dts/arm/arm-realview-eb-11mp-bbrevd-ctrevb.dts | 32 - > > sys/gnu/dts/arm/arm-realview-eb-11mp-bbrevd.dts | 28 - > > sys/gnu/dts/arm/arm-realview-eb-11mp-ctrevb.dts | 93 - > > sys/gnu/dts/arm/arm-realview-eb-11mp-revb.dts | 93 - > > sys/gnu/dts/arm/arm-realview-eb-11mp.dts | 74 - > > sys/gnu/dts/arm/arm-realview-eb-a9mp-bbrevd.dts | 28 - > > sys/gnu/dts/arm/arm-realview-eb-a9mp.dts | 70 - > > sys/gnu/dts/arm/arm-realview-eb-bbrevd.dts | 29 - > > sys/gnu/dts/arm/arm-realview-eb-bbrevd.dtsi | 45 - > > sys/gnu/dts/arm/arm-realview-eb-mp.dtsi | 220 - > > sys/gnu/dts/arm/arm-realview-eb.dts | 166 - > > sys/gnu/dts/arm/arm-realview-eb.dtsi | 468 -- > > sys/gnu/dts/arm/arm-realview-pb1176.dts | 592 -- > > sys/gnu/dts/arm/arm-realview-pb11mp.dts | 718 --- > > sys/gnu/dts/arm/arm-realview-pba8.dts | 178 - > > sys/gnu/dts/arm/arm-realview-pbx-a9.dts | 228 - > > sys/gnu/dts/arm/arm-realview-pbx.dtsi | 577 -- > > sys/gnu/dts/arm/armada-370-db.dts | 244 - > > sys/gnu/dts/arm/armada-370-dlink-dns327l.dts | 331 - > > sys/gnu/dts/arm/armada-370-mirabox.dts | 184 - > > sys/gnu/dts/arm/armada-370-netgear-rn102.dts | 276 - > > sys/gnu/dts/arm/armada-370-netgear-rn104.dts | 302 - > > sys/gnu/dts/arm/armada-370-rd.dts | 258 - > > sys/gnu/dts/arm/armada-370-seagate-nas-2bay.dts | 33 - > > sys/gnu/dts/arm/armada-370-seagate-nas-4bay.dts | 131 - > > sys/gnu/dts/arm/armada-370-seagate-nas-xbay.dtsi | 239 - > > .../arm/armada-370-seagate-personal-cloud-2bay.dts | 48 - > > .../dts/arm/armada-370-seagate-personal-cloud.dts | 34 - > > .../dts/arm/armada-370-seagate-personal-cloud.dtsi | 175 - > > sys/gnu/dts/arm/armada-370-synology-ds213j.dts | 312 - > > sys/gnu/dts/arm/armada-370-xp.dtsi | 313 - > > sys/gnu/dts/arm/armada-370.dtsi | 419 -- > > sys/gnu/dts/arm/armada-375-db.dts | 182 - > > sys/gnu/dts/arm/armada-375.dtsi | 621 -- > > sys/gnu/dts/arm/armada-380.dtsi | 118 - > > sys/gnu/dts/arm/armada-385-clearfog-gtr-l8.dts | 115 - > > sys/gnu/dts/arm/armada-385-clearfog-gtr-s4.dts | 79 - > > sys/gnu/dts/arm/armada-385-clearfog-gtr.dtsi | 450 -- > > sys/gnu/dts/arm/armada-385-db-88f6820-amc.dts | 155 - > > sys/gnu/dts/arm/armada-385-db-ap.dts | 238 - > > sys/gnu/dts/arm/armada-385-linksys-caiman.dts | 144 - > > sys/gnu/dts/arm/armada-385-linksys-cobra.dts | 144 - > > sys/gnu/dts/arm/armada-385-linksys-rango.dts | 176 - > > sys/gnu/dts/arm/armada-385-linksys-shelby.dts | 144 - > > sys/gnu/dts/arm/armada-385-linksys.dtsi | 263 - > > sys/gnu/dts/arm/armada-385-synology-ds116.dts | 292 - > > sys/gnu/dts/arm/armada-385-turris-omnia.dts | 359 -- > > sys/gnu/dts/arm/armada-385.dtsi | 149 - > > sys/gnu/dts/arm/armada-388-clearfog-base.dts | 68 - > > sys/gnu/dts/arm/armada-388-clearfog-pro.dts | 14 - > > sys/gnu/dts/arm/armada-388-clearfog.dts | 180 - > > sys/gnu/dts/arm/armada-388-clearfog.dtsi | 245 - > > sys/gnu/dts/arm/armada-388-db.dts | 176 - > > sys/gnu/dts/arm/armada-388-gp.dts | 406 -- > > sys/gnu/dts/arm/armada-388-helios4.dts | 308 - > > sys/gnu/dts/arm/armada-388-rd.dts | 108 - > > sys/gnu/dts/arm/armada-388.dtsi | 37 - > > sys/gnu/dts/arm/armada-38x-solidrun-microsom.dtsi | 117 - > > sys/gnu/dts/arm/armada-38x.dtsi | 707 --- > > sys/gnu/dts/arm/armada-390-db.dts | 142 - > > sys/gnu/dts/arm/armada-390.dtsi | 23 - > > sys/gnu/dts/arm/armada-395-gp.dts | 136 - > > sys/gnu/dts/arm/armada-395.dtsi | 39 - > > sys/gnu/dts/arm/armada-398-db.dts | 134 - > > sys/gnu/dts/arm/armada-398.dtsi | 31 - > > sys/gnu/dts/arm/armada-39x.dtsi | 554 -- > > sys/gnu/dts/arm/armada-xp-98dx3236.dtsi | 346 - > > sys/gnu/dts/arm/armada-xp-98dx3336.dtsi | 39 - > > sys/gnu/dts/arm/armada-xp-98dx4251.dtsi | 54 - > > sys/gnu/dts/arm/armada-xp-axpwifiap.dts | 144 - > > sys/gnu/dts/arm/armada-xp-db-dxbc2.dts | 118 - > > sys/gnu/dts/arm/armada-xp-db-xc3-24g4xg.dts | 114 - > > sys/gnu/dts/arm/armada-xp-db.dts | 245 - > > sys/gnu/dts/arm/armada-xp-gp.dts | 230 - > > sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts | 293 - > > sys/gnu/dts/arm/armada-xp-linksys-mamba.dts | 399 -- > > sys/gnu/dts/arm/armada-xp-matrix.dts | 79 - > > sys/gnu/dts/arm/armada-xp-mv78230.dtsi | 207 - > > sys/gnu/dts/arm/armada-xp-mv78260.dtsi | 314 - > > sys/gnu/dts/arm/armada-xp-mv78460.dtsi | 353 -- > > sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts | 357 -- > > sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts | 211 - > > sys/gnu/dts/arm/armada-xp-synology-ds414.dts | 328 - > > sys/gnu/dts/arm/armada-xp.dtsi | 344 - > > sys/gnu/dts/arm/armv7-m.dtsi | 23 - > > sys/gnu/dts/arm/artpec6-devboard.dts | 69 - > > sys/gnu/dts/arm/artpec6.dtsi | 388 -- > > sys/gnu/dts/arm/aspeed-ast2500-evb.dts | 131 - > > sys/gnu/dts/arm/aspeed-ast2600-evb.dts | 219 - > > sys/gnu/dts/arm/aspeed-bmc-arm-centriq2400-rep.dts | 225 - > > .../dts/arm/aspeed-bmc-arm-stardragon4800-rep2.dts | 220 - > > sys/gnu/dts/arm/aspeed-bmc-facebook-cmm.dts | 348 - > > sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts | 408 -- > > sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts | 541 -- > > sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts | 148 - > > sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts | 140 - > > sys/gnu/dts/arm/aspeed-bmc-facebook-yamp.dts | 110 - > > sys/gnu/dts/arm/aspeed-bmc-facebook-yosemitev2.dts | 231 - > > sys/gnu/dts/arm/aspeed-bmc-ibm-rainier.dts | 679 -- > > sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts | 872 --- > > sys/gnu/dts/arm/aspeed-bmc-inspur-on5263m5.dts | 148 - > > sys/gnu/dts/arm/aspeed-bmc-intel-s2600wf.dts | 132 - > > sys/gnu/dts/arm/aspeed-bmc-lenovo-hr630.dts | 569 -- > > sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts | 666 -- > > sys/gnu/dts/arm/aspeed-bmc-microsoft-olympus.dts | 207 - > > sys/gnu/dts/arm/aspeed-bmc-opp-lanyang.dts | 329 - > > sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts | 1195 ---- > > sys/gnu/dts/arm/aspeed-bmc-opp-nicole.dts | 326 - > > sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts | 373 -- > > sys/gnu/dts/arm/aspeed-bmc-opp-romulus.dts | 354 -- > > sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts | 978 --- > > sys/gnu/dts/arm/aspeed-bmc-opp-tacoma.dts | 914 --- > > sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts | 248 - > > sys/gnu/dts/arm/aspeed-bmc-opp-witherspoon.dts | 693 -- > > sys/gnu/dts/arm/aspeed-bmc-opp-zaius.dts | 578 -- > > sys/gnu/dts/arm/aspeed-bmc-portwell-neptune.dts | 165 - > > sys/gnu/dts/arm/aspeed-bmc-quanta-q71l.dts | 518 -- > > sys/gnu/dts/arm/aspeed-g4.dtsi | 1435 ----- > > sys/gnu/dts/arm/aspeed-g5.dtsi | 1638 ----- > > sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi | 1174 ---- > > sys/gnu/dts/arm/aspeed-g6.dtsi | 930 --- > > .../dts/arm/ast2500-facebook-netbmc-common.dtsi | 95 - > > sys/gnu/dts/arm/at91-ariag25.dts | 182 - > > sys/gnu/dts/arm/at91-ariettag25.dts | 86 - > > sys/gnu/dts/arm/at91-cosino.dtsi | 151 - > > sys/gnu/dts/arm/at91-cosino_mega2560.dts | 74 - > > sys/gnu/dts/arm/at91-dvk_som60.dts | 95 - > > sys/gnu/dts/arm/at91-dvk_su60_somc.dtsi | 159 - > > sys/gnu/dts/arm/at91-dvk_su60_somc_lcm.dtsi | 90 - > > sys/gnu/dts/arm/at91-foxg20.dts | 167 - > > sys/gnu/dts/arm/at91-gatwick.dts | 121 - > > sys/gnu/dts/arm/at91-kizbox.dts | 177 - > > sys/gnu/dts/arm/at91-kizbox2-2.dts | 26 - > > sys/gnu/dts/arm/at91-kizbox2-common.dtsi | 258 - > > sys/gnu/dts/arm/at91-kizbox3-hs.dts | 309 - > > sys/gnu/dts/arm/at91-kizbox3_common.dtsi | 372 -- > > sys/gnu/dts/arm/at91-kizboxmini-base.dts | 24 - > > sys/gnu/dts/arm/at91-kizboxmini-common.dtsi | 170 - > > sys/gnu/dts/arm/at91-kizboxmini-mb.dts | 26 - > > sys/gnu/dts/arm/at91-kizboxmini-rd.dts | 49 - > > sys/gnu/dts/arm/at91-linea.dtsi | 71 - > > sys/gnu/dts/arm/at91-natte.dtsi | 244 - > > sys/gnu/dts/arm/at91-nattis-2-natte-2.dts | 306 - > > sys/gnu/dts/arm/at91-qil_a9260.dts | 214 - > > sys/gnu/dts/arm/at91-sam9_l9260.dts | 132 - > > sys/gnu/dts/arm/at91-sam9x60ek.dts | 675 -- > > sys/gnu/dts/arm/at91-sama5d27_som1.dtsi | 153 - > > sys/gnu/dts/arm/at91-sama5d27_som1_ek.dts | 532 -- > > sys/gnu/dts/arm/at91-sama5d27_wlsom1.dtsi | 296 - > > sys/gnu/dts/arm/at91-sama5d27_wlsom1_ek.dts | 270 - > > sys/gnu/dts/arm/at91-sama5d2_icp.dts | 767 --- > > sys/gnu/dts/arm/at91-sama5d2_ptc_ek.dts | 433 -- > > sys/gnu/dts/arm/at91-sama5d2_xplained.dts | 756 --- > > sys/gnu/dts/arm/at91-sama5d3_xplained.dts | 369 -- > > sys/gnu/dts/arm/at91-sama5d4_ma5d4.dtsi | 136 - > > sys/gnu/dts/arm/at91-sama5d4_ma5d4evk.dts | 164 - > > sys/gnu/dts/arm/at91-sama5d4_xplained.dts | 281 - > > sys/gnu/dts/arm/at91-sama5d4ek.dts | 323 - > > sys/gnu/dts/arm/at91-smartkiz.dts | 109 - > > sys/gnu/dts/arm/at91-som60.dtsi | 230 - > > sys/gnu/dts/arm/at91-tse850-3.dts | 302 - > > sys/gnu/dts/arm/at91-vinco.dts | 231 - > > sys/gnu/dts/arm/at91-wb45n.dts | 64 - > > sys/gnu/dts/arm/at91-wb45n.dtsi | 165 - > > sys/gnu/dts/arm/at91-wb50n.dts | 112 - > > sys/gnu/dts/arm/at91-wb50n.dtsi | 194 - > > sys/gnu/dts/arm/at91rm9200.dtsi | 720 --- > > sys/gnu/dts/arm/at91rm9200_pqfp.dtsi | 16 - > > sys/gnu/dts/arm/at91rm9200ek.dts | 147 - > > sys/gnu/dts/arm/at91sam9260.dtsi | 810 --- > > sys/gnu/dts/arm/at91sam9260ek.dts | 186 - > > sys/gnu/dts/arm/at91sam9261.dtsi | 658 -- > > sys/gnu/dts/arm/at91sam9261ek.dts | 241 - > > sys/gnu/dts/arm/at91sam9263.dtsi | 829 --- > > sys/gnu/dts/arm/at91sam9263ek.dts | 257 - > > sys/gnu/dts/arm/at91sam9g15.dtsi | 28 - > > sys/gnu/dts/arm/at91sam9g15ek.dts | 36 - > > sys/gnu/dts/arm/at91sam9g20.dtsi | 46 - > > sys/gnu/dts/arm/at91sam9g20ek.dts | 28 - > > sys/gnu/dts/arm/at91sam9g20ek_2mmc.dts | 54 - > > sys/gnu/dts/arm/at91sam9g20ek_common.dtsi | 255 - > > sys/gnu/dts/arm/at91sam9g25.dtsi | 34 - > > sys/gnu/dts/arm/at91sam9g25ek.dts | 65 - > > sys/gnu/dts/arm/at91sam9g35.dtsi | 33 - > > sys/gnu/dts/arm/at91sam9g35ek.dts | 41 - > > sys/gnu/dts/arm/at91sam9g45.dtsi | 1042 --- > > sys/gnu/dts/arm/at91sam9m10g45ek.dts | 391 -- > > sys/gnu/dts/arm/at91sam9n12.dtsi | 806 --- > > sys/gnu/dts/arm/at91sam9n12ek.dts | 285 - > > sys/gnu/dts/arm/at91sam9rl.dtsi | 876 --- > > sys/gnu/dts/arm/at91sam9rlek.dts | 272 - > > sys/gnu/dts/arm/at91sam9x25.dtsi | 35 - > > sys/gnu/dts/arm/at91sam9x25ek.dts | 35 - > > sys/gnu/dts/arm/at91sam9x35.dtsi | 34 - > > sys/gnu/dts/arm/at91sam9x35ek.dts | 41 - > > sys/gnu/dts/arm/at91sam9x5.dtsi | 997 --- > > sys/gnu/dts/arm/at91sam9x5_can.dtsi | 56 - > > sys/gnu/dts/arm/at91sam9x5_isi.dtsi | 62 - > > sys/gnu/dts/arm/at91sam9x5_lcd.dtsi | 147 - > > sys/gnu/dts/arm/at91sam9x5_macb0.dtsi | 57 - > > sys/gnu/dts/arm/at91sam9x5_macb1.dtsi | 45 - > > sys/gnu/dts/arm/at91sam9x5_usart3.dtsi | 59 - > > sys/gnu/dts/arm/at91sam9x5cm.dtsi | 144 - > > sys/gnu/dts/arm/at91sam9x5dm.dtsi | 96 - > > sys/gnu/dts/arm/at91sam9x5ek.dtsi | 165 - > > sys/gnu/dts/arm/at91sam9xe.dtsi | 23 - > > sys/gnu/dts/arm/atlas6-evb.dts | 78 - > > sys/gnu/dts/arm/atlas6.dtsi | 800 --- > > sys/gnu/dts/arm/atlas7-evb.dts | 127 - > > sys/gnu/dts/arm/atlas7.dtsi | 1955 ------ > > sys/gnu/dts/arm/axm5516-amarillo.dts | 47 - > > sys/gnu/dts/arm/axm5516-cpus.dtsi | 200 - > > sys/gnu/dts/arm/axm55xx.dtsi | 200 - > > sys/gnu/dts/arm/axp152.dtsi | 49 - > > sys/gnu/dts/arm/axp209.dtsi | 119 - > > sys/gnu/dts/arm/axp223.dtsi | 58 - > > sys/gnu/dts/arm/axp22x.dtsi | 170 - > > sys/gnu/dts/arm/axp809.dtsi | 53 - > > sys/gnu/dts/arm/axp81x.dtsi | 178 - > > sys/gnu/dts/arm/bcm-cygnus-clock.dtsi | 133 - > > sys/gnu/dts/arm/bcm-cygnus.dtsi | 624 -- > > sys/gnu/dts/arm/bcm-hr2.dtsi | 368 -- > > sys/gnu/dts/arm/bcm-nsp.dtsi | 659 -- > > sys/gnu/dts/arm/bcm11351.dtsi | 424 -- > > sys/gnu/dts/arm/bcm21664-garnet.dts | 57 - > > sys/gnu/dts/arm/bcm21664.dtsi | 357 -- > > sys/gnu/dts/arm/bcm23550-sparrow.dts | 81 - > > sys/gnu/dts/arm/bcm23550.dtsi | 415 -- > > sys/gnu/dts/arm/bcm2711-rpi-4-b.dts | 228 - > > sys/gnu/dts/arm/bcm2711.dtsi | 937 --- > > sys/gnu/dts/arm/bcm28155-ap.dts | 122 - > > sys/gnu/dts/arm/bcm2835-common.dtsi | 199 - > > sys/gnu/dts/arm/bcm2835-rpi-a-plus.dts | 128 - > > sys/gnu/dts/arm/bcm2835-rpi-a.dts | 123 - > > sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts | 130 - > > sys/gnu/dts/arm/bcm2835-rpi-b-rev2.dts | 123 - > > sys/gnu/dts/arm/bcm2835-rpi-b.dts | 118 - > > sys/gnu/dts/arm/bcm2835-rpi-cm1-io1.dts | 97 - > > sys/gnu/dts/arm/bcm2835-rpi-cm1.dtsi | 39 - > > sys/gnu/dts/arm/bcm2835-rpi-common.dtsi | 12 - > > sys/gnu/dts/arm/bcm2835-rpi-zero-w.dts | 151 - > > sys/gnu/dts/arm/bcm2835-rpi-zero.dts | 119 - > > sys/gnu/dts/arm/bcm2835-rpi.dtsi | 81 - > > sys/gnu/dts/arm/bcm2835.dtsi | 38 - > > sys/gnu/dts/arm/bcm2836-rpi-2-b.dts | 130 - > > sys/gnu/dts/arm/bcm2836-rpi.dtsi | 6 - > > sys/gnu/dts/arm/bcm2836.dtsi | 92 - > > sys/gnu/dts/arm/bcm2837-rpi-3-a-plus.dts | 180 - > > sys/gnu/dts/arm/bcm2837-rpi-3-b-plus.dts | 183 - > > sys/gnu/dts/arm/bcm2837-rpi-3-b.dts | 176 - > > sys/gnu/dts/arm/bcm2837-rpi-cm3-io3.dts | 96 - > > sys/gnu/dts/arm/bcm2837-rpi-cm3.dtsi | 61 - > > sys/gnu/dts/arm/bcm2837.dtsi | 95 - > > sys/gnu/dts/arm/bcm283x-rpi-lan7515.dtsi | 41 - > > sys/gnu/dts/arm/bcm283x-rpi-smsc9512.dtsi | 20 - > > sys/gnu/dts/arm/bcm283x-rpi-smsc9514.dtsi | 19 - > > sys/gnu/dts/arm/bcm283x-rpi-usb-host.dtsi | 3 - > > sys/gnu/dts/arm/bcm283x-rpi-usb-otg.dtsi | 11 - > > sys/gnu/dts/arm/bcm283x-rpi-usb-peripheral.dtsi | 7 - > > sys/gnu/dts/arm/bcm283x.dtsi | 509 -- > > sys/gnu/dts/arm/bcm4708-asus-rt-ac56u.dts | 95 - > > sys/gnu/dts/arm/bcm4708-asus-rt-ac68u.dts | 85 - > > sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts | 151 - > > sys/gnu/dts/arm/bcm4708-linksys-ea6300-v1.dts | 43 - > > sys/gnu/dts/arm/bcm4708-linksys-ea6500-v2.dts | 44 - > > sys/gnu/dts/arm/bcm4708-luxul-xap-1510.dts | 62 - > > sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts | 69 - > > sys/gnu/dts/arm/bcm4708-netgear-r6250.dts | 96 - > > sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts | 88 - > > sys/gnu/dts/arm/bcm4708-smartrg-sr400ac.dts | 163 - > > sys/gnu/dts/arm/bcm4708.dtsi | 48 - > > sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts | 79 - > > sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts | 123 - > > sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts | 109 - > > sys/gnu/dts/arm/bcm47081-luxul-xap-1410.dts | 62 - > > sys/gnu/dts/arm/bcm47081-luxul-xwr-1200.dts | 110 - > > sys/gnu/dts/arm/bcm47081-tplink-archer-c5-v2.dts | 132 - > > sys/gnu/dts/arm/bcm47081.dtsi | 37 - > > sys/gnu/dts/arm/bcm4709-asus-rt-ac87u.dts | 100 - > > sys/gnu/dts/arm/bcm4709-buffalo-wxr-1900dhp.dts | 134 - > > sys/gnu/dts/arm/bcm4709-linksys-ea9200.dts | 46 - > > sys/gnu/dts/arm/bcm4709-netgear-r7000.dts | 108 - > > sys/gnu/dts/arm/bcm4709-netgear-r8000.dts | 189 - > > sys/gnu/dts/arm/bcm4709-tplink-archer-c9-v1.dts | 139 - > > sys/gnu/dts/arm/bcm4709.dtsi | 11 - > > sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts | 120 - > > sys/gnu/dts/arm/bcm47094-linksys-panamera.dts | 270 - > > sys/gnu/dts/arm/bcm47094-luxul-abr-4500.dts | 65 - > > sys/gnu/dts/arm/bcm47094-luxul-xap-1610.dts | 56 - > > sys/gnu/dts/arm/bcm47094-luxul-xbr-4500.dts | 65 - > > sys/gnu/dts/arm/bcm47094-luxul-xwc-2000.dts | 54 - > > sys/gnu/dts/arm/bcm47094-luxul-xwr-3100.dts | 105 - > > sys/gnu/dts/arm/bcm47094-luxul-xwr-3150-v1.dts | 76 - > > sys/gnu/dts/arm/bcm47094-netgear-r8500.dts | 96 - > > sys/gnu/dts/arm/bcm47094-phicomm-k3.dts | 70 - > > sys/gnu/dts/arm/bcm47094.dtsi | 18 - > > sys/gnu/dts/arm/bcm47189-luxul-xap-1440.dts | 48 - > > sys/gnu/dts/arm/bcm47189-luxul-xap-810.dts | 85 - > > sys/gnu/dts/arm/bcm47189-tenda-ac9.dts | 107 - > > sys/gnu/dts/arm/bcm5301x-nand-cs0-bch1.dtsi | 14 - > > sys/gnu/dts/arm/bcm5301x-nand-cs0-bch4.dtsi | 12 - > > sys/gnu/dts/arm/bcm5301x-nand-cs0-bch8.dtsi | 17 - > > sys/gnu/dts/arm/bcm5301x-nand-cs0.dtsi | 21 - > > sys/gnu/dts/arm/bcm5301x.dtsi | 548 -- > > sys/gnu/dts/arm/bcm53340-ubnt-unifi-switch8.dts | 86 - > > sys/gnu/dts/arm/bcm53573.dtsi | 201 - > > sys/gnu/dts/arm/bcm59056.dtsi | 91 - > > sys/gnu/dts/arm/bcm63138.dtsi | 229 - > > sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts | 38 - > > sys/gnu/dts/arm/bcm7445.dtsi | 315 - > > sys/gnu/dts/arm/bcm911360_entphn.dts | 99 - > > sys/gnu/dts/arm/bcm911360k.dts | 52 - > > sys/gnu/dts/arm/bcm94708.dts | 49 - > > sys/gnu/dts/arm/bcm94709.dts | 49 - > > sys/gnu/dts/arm/bcm947189acdbmr.dts | 96 - > > sys/gnu/dts/arm/bcm953012er.dts | 95 - > > sys/gnu/dts/arm/bcm953012hr.dts | 102 - > > sys/gnu/dts/arm/bcm953012k.dts | 120 - > > sys/gnu/dts/arm/bcm958300k.dts | 77 - > > sys/gnu/dts/arm/bcm958305k.dts | 85 - > > sys/gnu/dts/arm/bcm958522er.dts | 180 - > > sys/gnu/dts/arm/bcm958525er.dts | 192 - > > sys/gnu/dts/arm/bcm958525xmc.dts | 212 - > > sys/gnu/dts/arm/bcm958622hr.dts | 229 - > > sys/gnu/dts/arm/bcm958623hr.dts | 233 - > > sys/gnu/dts/arm/bcm958625hr.dts | 256 - > > sys/gnu/dts/arm/bcm958625k.dts | 273 - > > sys/gnu/dts/arm/bcm963138dvt.dts | 52 - > > sys/gnu/dts/arm/bcm988312hr.dts | 229 - > > sys/gnu/dts/arm/bcm9hmidc.dtsi | 42 - > > sys/gnu/dts/arm/berlin2-sony-nsz-gs7.dts | 43 - > > sys/gnu/dts/arm/berlin2.dtsi | 540 -- > > sys/gnu/dts/arm/berlin2cd-google-chromecast.dts | 77 - > > sys/gnu/dts/arm/berlin2cd-valve-steamlink.dts | 79 - > > sys/gnu/dts/arm/berlin2cd.dtsi | 583 -- > > sys/gnu/dts/arm/berlin2q-marvell-dmp.dts | 144 - > > sys/gnu/dts/arm/berlin2q.dtsi | 666 -- > > sys/gnu/dts/arm/compulab-sb-som.dtsi | 46 - > > sys/gnu/dts/arm/cros-adc-thermistors.dtsi | 41 - > > sys/gnu/dts/arm/cros-ec-keyboard.dtsi | 107 - > > sys/gnu/dts/arm/cros-ec-sbs.dtsi | 52 - > > sys/gnu/dts/arm/cx92755.dtsi | 144 - > > sys/gnu/dts/arm/cx92755_equinox.dts | 86 - > > sys/gnu/dts/arm/da850-enbw-cmc.dts | 44 - > > sys/gnu/dts/arm/da850-evm.dts | 466 -- > > sys/gnu/dts/arm/da850-lcdk.dts | 425 -- > > sys/gnu/dts/arm/da850-lego-ev3.dts | 466 -- > > sys/gnu/dts/arm/da850.dtsi | 967 --- > > sys/gnu/dts/arm/dm3725.dtsi | 10 - > > sys/gnu/dts/arm/dm8148-evm.dts | 155 - > > sys/gnu/dts/arm/dm8148-t410.dts | 113 - > > sys/gnu/dts/arm/dm814x-clocks.dtsi | 379 -- > > sys/gnu/dts/arm/dm814x.dtsi | 789 --- > > sys/gnu/dts/arm/dm8168-evm.dts | 213 - > > sys/gnu/dts/arm/dm816x-clocks.dtsi | 276 - > > sys/gnu/dts/arm/dm816x.dtsi | 696 -- > > sys/gnu/dts/arm/dove-cm-a510.dtsi | 195 - > > sys/gnu/dts/arm/dove-cubox-es.dts | 13 - > > sys/gnu/dts/arm/dove-cubox.dts | 143 - > > sys/gnu/dts/arm/dove-d2plug.dts | 70 - > > sys/gnu/dts/arm/dove-d3plug.dts | 104 - > > sys/gnu/dts/arm/dove-dove-db.dts | 39 - > > sys/gnu/dts/arm/dove-sbc-a510.dts | 182 - > > sys/gnu/dts/arm/dove.dtsi | 805 --- > > sys/gnu/dts/arm/dra62x-clocks.dtsi | 45 - > > sys/gnu/dts/arm/dra62x-j5eco-evm.dts | 144 - > > sys/gnu/dts/arm/dra62x.dtsi | 23 - > > sys/gnu/dts/arm/dra7-dspeve-thermal.dtsi | 27 - > > sys/gnu/dts/arm/dra7-evm-common.dtsi | 265 - > > sys/gnu/dts/arm/dra7-evm.dts | 593 -- > > sys/gnu/dts/arm/dra7-ipu-dsp-common.dtsi | 39 - > > sys/gnu/dts/arm/dra7-iva-thermal.dtsi | 27 - > > sys/gnu/dts/arm/dra7-l4.dtsi | 4651 -------------- > > sys/gnu/dts/arm/dra7-mmc-iodelay.dtsi | 19 - > > sys/gnu/dts/arm/dra7.dtsi | 1092 ---- > > sys/gnu/dts/arm/dra71-evm.dts | 314 - > > sys/gnu/dts/arm/dra71x.dtsi | 17 - > > sys/gnu/dts/arm/dra72-evm-common.dtsi | 597 -- > > sys/gnu/dts/arm/dra72-evm-revc.dts | 157 - > > sys/gnu/dts/arm/dra72-evm-tps65917.dtsi | 151 - > > sys/gnu/dts/arm/dra72-evm.dts | 122 - > > sys/gnu/dts/arm/dra72x-mmc-iodelay.dtsi | 361 -- > > sys/gnu/dts/arm/dra72x.dtsi | 114 - > > sys/gnu/dts/arm/dra74-ipu-dsp-common.dtsi | 18 - > > sys/gnu/dts/arm/dra74x-mmc-iodelay.dtsi | 647 -- > > sys/gnu/dts/arm/dra74x.dtsi | 206 - > > sys/gnu/dts/arm/dra76-evm.dts | 604 -- > > sys/gnu/dts/arm/dra76x-mmc-iodelay.dtsi | 285 - > > sys/gnu/dts/arm/dra76x.dtsi | 135 - > > sys/gnu/dts/arm/dra7xx-clocks.dtsi | 1849 ------ > > sys/gnu/dts/arm/e60k02.dtsi | 304 - > > sys/gnu/dts/arm/ecx-2000.dts | 101 - > > sys/gnu/dts/arm/ecx-common.dtsi | 231 - > > sys/gnu/dts/arm/efm32gg-dk3750.dts | 88 - > > sys/gnu/dts/arm/efm32gg.dtsi | 177 - > > sys/gnu/dts/arm/elpida_ecb240abacn.dtsi | 68 - > > sys/gnu/dts/arm/emev2-kzm9d.dts | 115 - > > sys/gnu/dts/arm/emev2.dtsi | 289 - > > sys/gnu/dts/arm/ep7209.dtsi | 187 - > > sys/gnu/dts/arm/ep7211-edb7211.dts | 97 - > > sys/gnu/dts/arm/ep7211.dtsi | 8 - > > sys/gnu/dts/arm/ethernut5.dts | 118 - > > sys/gnu/dts/arm/evk-pro3.dts | 58 - > > sys/gnu/dts/arm/exynos-mfc-reserved-memory.dtsi | 32 - > > sys/gnu/dts/arm/exynos-syscon-restart.dtsi | 20 - > > sys/gnu/dts/arm/exynos3250-artik5-eval.dts | 39 - > > sys/gnu/dts/arm/exynos3250-artik5.dtsi | 381 -- > > sys/gnu/dts/arm/exynos3250-monk.dts | 639 -- > > sys/gnu/dts/arm/exynos3250-pinctrl.dtsi | 568 -- > > sys/gnu/dts/arm/exynos3250-rinato.dts | 914 --- > > sys/gnu/dts/arm/exynos3250.dtsi | 967 --- > > sys/gnu/dts/arm/exynos4-cpu-thermal.dtsi | 48 - > > sys/gnu/dts/arm/exynos4.dtsi | 1022 --- > > sys/gnu/dts/arm/exynos4210-i9100.dts | 768 --- > > sys/gnu/dts/arm/exynos4210-origen.dts | 338 - > > sys/gnu/dts/arm/exynos4210-pinctrl.dtsi | 863 --- > > sys/gnu/dts/arm/exynos4210-smdkv310.dts | 200 - > > sys/gnu/dts/arm/exynos4210-trats.dts | 515 -- > > sys/gnu/dts/arm/exynos4210-universal_c210.dts | 632 -- > > sys/gnu/dts/arm/exynos4210.dtsi | 523 -- > > sys/gnu/dts/arm/exynos4212.dtsi | 133 - > > sys/gnu/dts/arm/exynos4412-galaxy-s3.dtsi | 177 - > > sys/gnu/dts/arm/exynos4412-i9300.dts | 22 - > > sys/gnu/dts/arm/exynos4412-i9305.dts | 20 - > > sys/gnu/dts/arm/exynos4412-itop-elite.dts | 227 - > > sys/gnu/dts/arm/exynos4412-itop-scp-core.dtsi | 503 -- > > sys/gnu/dts/arm/exynos4412-midas.dtsi | 1375 ---- > > sys/gnu/dts/arm/exynos4412-n710x.dts | 80 - > > sys/gnu/dts/arm/exynos4412-odroid-common.dtsi | 573 -- > > sys/gnu/dts/arm/exynos4412-odroidu3.dts | 131 - > > sys/gnu/dts/arm/exynos4412-odroidx.dts | 109 - > > sys/gnu/dts/arm/exynos4412-odroidx2.dts | 22 - > > sys/gnu/dts/arm/exynos4412-origen.dts | 533 -- > > sys/gnu/dts/arm/exynos4412-pinctrl.dtsi | 979 --- > > sys/gnu/dts/arm/exynos4412-ppmu-common.dtsi | 47 - > > sys/gnu/dts/arm/exynos4412-prime.dtsi | 47 - > > sys/gnu/dts/arm/exynos4412-smdk4412.dts | 151 - > > sys/gnu/dts/arm/exynos4412-tiny4412.dts | 121 - > > sys/gnu/dts/arm/exynos4412-trats2.dts | 28 - > > sys/gnu/dts/arm/exynos4412.dtsi | 802 --- > > sys/gnu/dts/arm/exynos4415-pinctrl.dtsi | 573 -- > > sys/gnu/dts/arm/exynos4415.dtsi | 649 -- > > sys/gnu/dts/arm/exynos4x12-pinctrl.dtsi | 984 --- > > sys/gnu/dts/arm/exynos4x12.dtsi | 594 -- > > sys/gnu/dts/arm/exynos5.dtsi | 230 - > > sys/gnu/dts/arm/exynos5250-arndale.dts | 650 -- > > sys/gnu/dts/arm/exynos5250-pinctrl.dtsi | 833 --- > > sys/gnu/dts/arm/exynos5250-smdk5250.dts | 417 -- > > sys/gnu/dts/arm/exynos5250-snow-common.dtsi | 709 --- > > sys/gnu/dts/arm/exynos5250-snow-rev5.dts | 55 - > > sys/gnu/dts/arm/exynos5250-snow.dts | 51 - > > sys/gnu/dts/arm/exynos5250-spring.dts | 548 -- > > sys/gnu/dts/arm/exynos5250.dtsi | 1237 ---- > > sys/gnu/dts/arm/exynos5260-pinctrl.dtsi | 585 -- > > sys/gnu/dts/arm/exynos5260-xyref5260.dts | 90 - > > sys/gnu/dts/arm/exynos5260.dtsi | 401 -- > > sys/gnu/dts/arm/exynos5410-odroidxu.dts | 655 -- > > sys/gnu/dts/arm/exynos5410-pinctrl.dtsi | 624 -- > > sys/gnu/dts/arm/exynos5410-smdk5410.dts | 111 - > > sys/gnu/dts/arm/exynos5410.dtsi | 448 -- > > sys/gnu/dts/arm/exynos5420-arndale-octa.dts | 826 --- > > sys/gnu/dts/arm/exynos5420-cpus.dtsi | 131 - > > sys/gnu/dts/arm/exynos5420-peach-pit.dts | 1118 ---- > > sys/gnu/dts/arm/exynos5420-pinctrl.dtsi | 734 --- > > sys/gnu/dts/arm/exynos5420-smdk5420.dts | 421 -- > > sys/gnu/dts/arm/exynos5420-trip-points.dtsi | 31 - > > sys/gnu/dts/arm/exynos5420.dtsi | 1424 ----- > > sys/gnu/dts/arm/exynos5422-cpu-thermal.dtsi | 103 - > > sys/gnu/dts/arm/exynos5422-cpus.dtsi | 138 - > > sys/gnu/dts/arm/exynos5422-odroid-core.dtsi | 1076 ---- > > sys/gnu/dts/arm/exynos5422-odroidhc1.dts | 264 - > > sys/gnu/dts/arm/exynos5422-odroidxu3-audio.dtsi | 89 - > > sys/gnu/dts/arm/exynos5422-odroidxu3-common.dtsi | 505 -- > > sys/gnu/dts/arm/exynos5422-odroidxu3-lite.dts | 105 - > > sys/gnu/dts/arm/exynos5422-odroidxu3.dts | 72 - > > sys/gnu/dts/arm/exynos5422-odroidxu4.dts | 98 - > > sys/gnu/dts/arm/exynos54xx-odroidxu-leds.dtsi | 47 - > > sys/gnu/dts/arm/exynos54xx.dtsi | 210 - > > sys/gnu/dts/arm/exynos5800-peach-pi.dts | 1100 ---- > > sys/gnu/dts/arm/exynos5800.dtsi | 162 - > > sys/gnu/dts/arm/facebook-bmc-flash-layout.dtsi | 42 - > > sys/gnu/dts/arm/ge863-pro3.dtsi | 77 - > > sys/gnu/dts/arm/gemini-dlink-dir-685.dts | 511 -- > > sys/gnu/dts/arm/gemini-dlink-dns-313.dts | 304 - > > sys/gnu/dts/arm/gemini-nas4220b.dts | 189 - > > sys/gnu/dts/arm/gemini-rut1xx.dts | 148 - > > sys/gnu/dts/arm/gemini-sl93512r.dts | 312 - > > sys/gnu/dts/arm/gemini-sq201.dts | 304 - > > sys/gnu/dts/arm/gemini-wbd111.dts | 183 - > > sys/gnu/dts/arm/gemini-wbd222.dts | 195 - > > sys/gnu/dts/arm/gemini.dtsi | 449 -- > > sys/gnu/dts/arm/gr-peach-audiocamerashield.dtsi | 75 - > > sys/gnu/dts/arm/hi3519-demb.dts | 29 - > > sys/gnu/dts/arm/hi3519.dtsi | 174 - > > sys/gnu/dts/arm/hi3620-hi4511.dts | 647 -- > > sys/gnu/dts/arm/hi3620.dtsi | 567 -- > > sys/gnu/dts/arm/highbank.dts | 158 - > > sys/gnu/dts/arm/hip01-ca9x2.dts | 48 - > > sys/gnu/dts/arm/hip01.dtsi | 105 - > > sys/gnu/dts/arm/hip04-d01.dts | 29 - > > sys/gnu/dts/arm/hip04.dtsi | 986 --- > > sys/gnu/dts/arm/hisi-x5hd2-dkb.dts | 83 - > > sys/gnu/dts/arm/hisi-x5hd2.dtsi | 557 -- > > sys/gnu/dts/arm/ibm-power9-dual.dtsi | 248 - > > sys/gnu/dts/arm/imx1-ads.dts | 135 - > > sys/gnu/dts/arm/imx1-apf9328.dts | 124 - > > sys/gnu/dts/arm/imx1-pinfunc.h | 296 - > > sys/gnu/dts/arm/imx1.dtsi | 276 - > > sys/gnu/dts/arm/imx23-evk.dts | 145 - > > sys/gnu/dts/arm/imx23-olinuxino.dts | 131 - > > sys/gnu/dts/arm/imx23-pinfunc.h | 333 - > > sys/gnu/dts/arm/imx23-sansa.dts | 207 - > > sys/gnu/dts/arm/imx23-stmp378x_devb.dts | 76 - > > sys/gnu/dts/arm/imx23-xfi3.dts | 180 - > > sys/gnu/dts/arm/imx23.dtsi | 636 -- > > sys/gnu/dts/arm/imx25-eukrea-cpuimx25.dtsi | 66 - > > .../imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts | 65 - > > .../imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts | 37 - > > .../imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts | 37 - > > .../dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts | 174 - > > sys/gnu/dts/arm/imx25-karo-tx25.dts | 108 - > > sys/gnu/dts/arm/imx25-pdk.dts | 313 - > > sys/gnu/dts/arm/imx25-pinfunc.h | 636 -- > > sys/gnu/dts/arm/imx25.dtsi | 637 -- > > sys/gnu/dts/arm/imx27-apf27.dts | 112 - > > sys/gnu/dts/arm/imx27-apf27dev.dts | 256 - > > sys/gnu/dts/arm/imx27-eukrea-cpuimx27.dtsi | 284 - > > .../dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts | 266 - > > sys/gnu/dts/arm/imx27-pdk.dts | 191 - > > sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts | 162 - > > sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi | 97 - > > sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts | 319 - > > sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi | 344 - > > sys/gnu/dts/arm/imx27-pinfunc.h | 474 -- > > sys/gnu/dts/arm/imx27.dtsi | 593 -- > > sys/gnu/dts/arm/imx28-apf28.dts | 80 - > > sys/gnu/dts/arm/imx28-apf28dev.dts | 225 - > > sys/gnu/dts/arm/imx28-apx4devkit.dts | 240 - > > sys/gnu/dts/arm/imx28-cfa10036.dts | 140 - > > sys/gnu/dts/arm/imx28-cfa10037.dts | 83 - > > sys/gnu/dts/arm/imx28-cfa10049.dts | 428 -- > > sys/gnu/dts/arm/imx28-cfa10055.dts | 161 - > > sys/gnu/dts/arm/imx28-cfa10056.dts | 113 - > > sys/gnu/dts/arm/imx28-cfa10057.dts | 171 - > > sys/gnu/dts/arm/imx28-cfa10058.dts | 138 - > > sys/gnu/dts/arm/imx28-duckbill-2-485.dts | 184 - > > sys/gnu/dts/arm/imx28-duckbill-2-enocean.dts | 213 - > > sys/gnu/dts/arm/imx28-duckbill-2-spi.dts | 194 - > > sys/gnu/dts/arm/imx28-duckbill-2.dts | 178 - > > sys/gnu/dts/arm/imx28-duckbill.dts | 147 - > > sys/gnu/dts/arm/imx28-eukrea-mbmx283lc.dts | 64 - > > sys/gnu/dts/arm/imx28-eukrea-mbmx287lc.dts | 43 - > > sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi | 323 - > > sys/gnu/dts/arm/imx28-evk.dts | 360 -- > > sys/gnu/dts/arm/imx28-m28.dtsi | 56 - > > sys/gnu/dts/arm/imx28-m28cu3.dts | 266 - > > sys/gnu/dts/arm/imx28-m28evk.dts | 271 - > > sys/gnu/dts/arm/imx28-pinfunc.h | 506 -- > > sys/gnu/dts/arm/imx28-sps1.dts | 166 - > > sys/gnu/dts/arm/imx28-ts4600.dts | 74 - > > sys/gnu/dts/arm/imx28-tx28.dts | 749 --- > > sys/gnu/dts/arm/imx28.dtsi | 1330 ---- > > sys/gnu/dts/arm/imx31-bug.dts | 22 - > > sys/gnu/dts/arm/imx31-lite.dts | 178 - > > sys/gnu/dts/arm/imx31.dtsi | 370 -- > > sys/gnu/dts/arm/imx35-eukrea-cpuimx35.dtsi | 89 - > > .../dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts | 156 - > > sys/gnu/dts/arm/imx35-pdk.dts | 62 - > > sys/gnu/dts/arm/imx35-pinfunc.h | 966 --- > > sys/gnu/dts/arm/imx35.dtsi | 414 -- > > sys/gnu/dts/arm/imx50-evk.dts | 104 - > > sys/gnu/dts/arm/imx50-kobo-aura.dts | 258 - > > sys/gnu/dts/arm/imx50-pinfunc.h | 919 --- > > sys/gnu/dts/arm/imx50.dtsi | 499 -- > > sys/gnu/dts/arm/imx51-apf51.dts | 84 - > > sys/gnu/dts/arm/imx51-apf51dev.dts | 217 - > > sys/gnu/dts/arm/imx51-babbage.dts | 726 --- > > sys/gnu/dts/arm/imx51-digi-connectcore-jsk.dts | 118 - > > sys/gnu/dts/arm/imx51-digi-connectcore-som.dtsi | 389 -- > > sys/gnu/dts/arm/imx51-eukrea-cpuimx51.dtsi | 92 - > > .../dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts | 274 - > > sys/gnu/dts/arm/imx51-pinfunc.h | 768 --- > > sys/gnu/dts/arm/imx51-ts4800.dts | 330 - > > sys/gnu/dts/arm/imx51-zii-rdu1.dts | 894 --- > > sys/gnu/dts/arm/imx51-zii-scu2-mezz.dts | 457 -- > > sys/gnu/dts/arm/imx51-zii-scu3-esb.dts | 472 -- > > sys/gnu/dts/arm/imx51.dtsi | 654 -- > > sys/gnu/dts/arm/imx53-ard.dts | 179 - > > sys/gnu/dts/arm/imx53-cx9020.dts | 295 - > > sys/gnu/dts/arm/imx53-kp-ddc.dts | 146 - > > sys/gnu/dts/arm/imx53-kp-hsc.dts | 52 - > > sys/gnu/dts/arm/imx53-kp.dtsi | 189 - > > sys/gnu/dts/arm/imx53-m53.dtsi | 132 - > > sys/gnu/dts/arm/imx53-m53evk.dts | 370 -- > > sys/gnu/dts/arm/imx53-m53menlo.dts | 492 -- > > sys/gnu/dts/arm/imx53-mba53.dts | 249 - > > sys/gnu/dts/arm/imx53-pinfunc.h | 1189 ---- > > sys/gnu/dts/arm/imx53-ppd.dts | 1083 ---- > > sys/gnu/dts/arm/imx53-qsb-common.dtsi | 385 -- > > sys/gnu/dts/arm/imx53-qsb.dts | 111 - > > sys/gnu/dts/arm/imx53-qsrb.dts | 149 - > > sys/gnu/dts/arm/imx53-smd.dts | 346 - > > sys/gnu/dts/arm/imx53-tqma53.dtsi | 281 - > > sys/gnu/dts/arm/imx53-tx53-x03x.dts | 351 -- > > sys/gnu/dts/arm/imx53-tx53-x13x.dts | 262 - > > sys/gnu/dts/arm/imx53-tx53.dtsi | 596 -- > > sys/gnu/dts/arm/imx53-usbarmory.dts | 225 - > > sys/gnu/dts/arm/imx53-voipac-bsb.dts | 153 - > > sys/gnu/dts/arm/imx53-voipac-dmm-668.dtsi | 266 - > > sys/gnu/dts/arm/imx53.dtsi | 856 --- > > sys/gnu/dts/arm/imx6-logicpd-baseboard.dtsi | 561 -- > > sys/gnu/dts/arm/imx6-logicpd-som.dtsi | 369 -- > > sys/gnu/dts/arm/imx6dl-apf6dev.dts | 18 - > > sys/gnu/dts/arm/imx6dl-aristainetos2_4.dts | 158 - > > sys/gnu/dts/arm/imx6dl-aristainetos2_7.dts | 98 - > > sys/gnu/dts/arm/imx6dl-aristainetos_4.dts | 83 - > > sys/gnu/dts/arm/imx6dl-aristainetos_7.dts | 73 - > > sys/gnu/dts/arm/imx6dl-colibri-eval-v3.dts | 261 - > > sys/gnu/dts/arm/imx6dl-colibri-v1_1-eval-v3.dts | 31 - > > sys/gnu/dts/arm/imx6dl-cubox-i-emmc-som-v15.dts | 52 - > > sys/gnu/dts/arm/imx6dl-cubox-i-som-v15.dts | 51 - > > sys/gnu/dts/arm/imx6dl-cubox-i.dts | 51 - > > sys/gnu/dts/arm/imx6dl-dfi-fs700-m60.dts | 23 - > > sys/gnu/dts/arm/imx6dl-eckelmann-ci4x10.dts | 381 -- > > sys/gnu/dts/arm/imx6dl-emcon-avari.dts | 14 - > > sys/gnu/dts/arm/imx6dl-gw51xx.dts | 13 - > > sys/gnu/dts/arm/imx6dl-gw52xx.dts | 71 - > > sys/gnu/dts/arm/imx6dl-gw53xx.dts | 71 - > > sys/gnu/dts/arm/imx6dl-gw54xx.dts | 71 - > > sys/gnu/dts/arm/imx6dl-gw551x.dts | 55 - > > sys/gnu/dts/arm/imx6dl-gw552x.dts | 14 - > > sys/gnu/dts/arm/imx6dl-gw553x.dts | 55 - > > sys/gnu/dts/arm/imx6dl-gw560x.dts | 55 - > > sys/gnu/dts/arm/imx6dl-gw5903.dts | 55 - > > sys/gnu/dts/arm/imx6dl-gw5904.dts | 55 - > > sys/gnu/dts/arm/imx6dl-gw5907.dts | 14 - > > sys/gnu/dts/arm/imx6dl-gw5910.dts | 14 - > > sys/gnu/dts/arm/imx6dl-gw5912.dts | 13 - > > sys/gnu/dts/arm/imx6dl-gw5913.dts | 14 - > > .../dts/arm/imx6dl-hummingboard-emmc-som-v15.dts | 53 - > > sys/gnu/dts/arm/imx6dl-hummingboard-som-v15.dts | 52 - > > sys/gnu/dts/arm/imx6dl-hummingboard.dts | 52 - > > .../dts/arm/imx6dl-hummingboard2-emmc-som-v15.dts | 55 - > > sys/gnu/dts/arm/imx6dl-hummingboard2-som-v15.dts | 54 - > > sys/gnu/dts/arm/imx6dl-hummingboard2.dts | 53 - > > sys/gnu/dts/arm/imx6dl-icore-mipi.dts | 25 - > > sys/gnu/dts/arm/imx6dl-icore-rqs.dts | 15 - > > sys/gnu/dts/arm/imx6dl-icore.dts | 32 - > > sys/gnu/dts/arm/imx6dl-kontron-samx6i.dtsi | 12 - > > sys/gnu/dts/arm/imx6dl-mamoj.dts | 495 -- > > sys/gnu/dts/arm/imx6dl-nit6xlite.dts | 13 - > > sys/gnu/dts/arm/imx6dl-nitrogen6x.dts | 15 - > > sys/gnu/dts/arm/imx6dl-phytec-mira-rdk-nand.dts | 64 - > > sys/gnu/dts/arm/imx6dl-phytec-pbab01.dts | 13 - > > sys/gnu/dts/arm/imx6dl-phytec-pfla02.dtsi | 17 - > > sys/gnu/dts/arm/imx6dl-pico-dwarf.dts | 17 - > > sys/gnu/dts/arm/imx6dl-pico-hobbit.dts | 17 - > > sys/gnu/dts/arm/imx6dl-pico-nymph.dts | 17 - > > sys/gnu/dts/arm/imx6dl-pico-pi.dts | 17 - > > sys/gnu/dts/arm/imx6dl-pinfunc.h | 1088 ---- > > sys/gnu/dts/arm/imx6dl-rex-basic.dts | 27 - > > sys/gnu/dts/arm/imx6dl-riotboard.dts | 594 -- > > sys/gnu/dts/arm/imx6dl-sabreauto.dts | 28 - > > sys/gnu/dts/arm/imx6dl-sabrelite.dts | 55 - > > sys/gnu/dts/arm/imx6dl-sabresd.dts | 18 - > > sys/gnu/dts/arm/imx6dl-savageboard.dts | 51 - > > sys/gnu/dts/arm/imx6dl-ts4900.dts | 55 - > > sys/gnu/dts/arm/imx6dl-ts7970.dts | 56 - > > sys/gnu/dts/arm/imx6dl-tx6dl-comtft.dts | 79 - > > sys/gnu/dts/arm/imx6dl-tx6s-8034-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6dl-tx6s-8034.dts | 70 - > > sys/gnu/dts/arm/imx6dl-tx6s-8035-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6dl-tx6s-8035.dts | 86 - > > sys/gnu/dts/arm/imx6dl-tx6u-801x.dts | 50 - > > sys/gnu/dts/arm/imx6dl-tx6u-8033-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6dl-tx6u-8033.dts | 82 - > > sys/gnu/dts/arm/imx6dl-tx6u-80xx-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6dl-tx6u-811x.dts | 50 - > > sys/gnu/dts/arm/imx6dl-tx6u-81xx-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6dl-udoo.dts | 14 - > > sys/gnu/dts/arm/imx6dl-wandboard-revb1.dts | 19 - > > sys/gnu/dts/arm/imx6dl-wandboard-revd1.dts | 19 - > > sys/gnu/dts/arm/imx6dl-wandboard.dts | 19 - > > sys/gnu/dts/arm/imx6dl-yapp4-common.dtsi | 623 -- > > sys/gnu/dts/arm/imx6dl-yapp4-draco.dts | 58 - > > sys/gnu/dts/arm/imx6dl-yapp4-hydra.dts | 50 - > > sys/gnu/dts/arm/imx6dl-yapp4-ursa.dts | 54 - > > sys/gnu/dts/arm/imx6dl.dtsi | 394 -- > > sys/gnu/dts/arm/imx6q-apalis-eval.dts | 273 - > > sys/gnu/dts/arm/imx6q-apalis-ixora-v1.1.dts | 274 - > > sys/gnu/dts/arm/imx6q-apalis-ixora.dts | 275 - > > sys/gnu/dts/arm/imx6q-apf6dev.dts | 22 - > > sys/gnu/dts/arm/imx6q-arm2.dts | 225 - > > sys/gnu/dts/arm/imx6q-b450v3.dts | 152 - > > sys/gnu/dts/arm/imx6q-b650v3.dts | 151 - > > sys/gnu/dts/arm/imx6q-b850v3.dts | 290 - > > sys/gnu/dts/arm/imx6q-ba16.dtsi | 639 -- > > sys/gnu/dts/arm/imx6q-bx50v3.dtsi | 394 -- > > sys/gnu/dts/arm/imx6q-cm-fx6.dts | 491 -- > > sys/gnu/dts/arm/imx6q-cubox-i-emmc-som-v15.dts | 60 - > > sys/gnu/dts/arm/imx6q-cubox-i-som-v15.dts | 59 - > > sys/gnu/dts/arm/imx6q-cubox-i.dts | 59 - > > sys/gnu/dts/arm/imx6q-dfi-fs700-m60.dts | 23 - > > sys/gnu/dts/arm/imx6q-dhcom-pdk2.dts | 270 - > > sys/gnu/dts/arm/imx6q-dhcom-som.dtsi | 475 -- > > .../arm/imx6q-display5-tianma-tm070-1280x768.dts | 51 - > > sys/gnu/dts/arm/imx6q-display5.dtsi | 597 -- > > sys/gnu/dts/arm/imx6q-dmo-edmqmx6.dts | 481 -- > > sys/gnu/dts/arm/imx6q-dms-ba16.dts | 139 - > > sys/gnu/dts/arm/imx6q-emcon-avari.dts | 14 - > > sys/gnu/dts/arm/imx6q-evi.dts | 517 -- > > sys/gnu/dts/arm/imx6q-gk802.dts | 179 - > > sys/gnu/dts/arm/imx6q-gw51xx.dts | 13 - > > sys/gnu/dts/arm/imx6q-gw52xx.dts | 75 - > > sys/gnu/dts/arm/imx6q-gw53xx.dts | 75 - > > sys/gnu/dts/arm/imx6q-gw5400-a.dts | 510 -- > > sys/gnu/dts/arm/imx6q-gw54xx.dts | 177 - > > sys/gnu/dts/arm/imx6q-gw551x.dts | 55 - > > sys/gnu/dts/arm/imx6q-gw552x.dts | 18 - > > sys/gnu/dts/arm/imx6q-gw553x.dts | 55 - > > sys/gnu/dts/arm/imx6q-gw560x.dts | 59 - > > sys/gnu/dts/arm/imx6q-gw5903.dts | 55 - > > sys/gnu/dts/arm/imx6q-gw5904.dts | 59 - > > sys/gnu/dts/arm/imx6q-gw5907.dts | 14 - > > sys/gnu/dts/arm/imx6q-gw5910.dts | 14 - > > sys/gnu/dts/arm/imx6q-gw5912.dts | 13 - > > sys/gnu/dts/arm/imx6q-gw5913.dts | 14 - > > sys/gnu/dts/arm/imx6q-h100.dts | 382 -- > > .../dts/arm/imx6q-hummingboard-emmc-som-v15.dts | 61 - > > sys/gnu/dts/arm/imx6q-hummingboard-som-v15.dts | 60 - > > sys/gnu/dts/arm/imx6q-hummingboard.dts | 60 - > > .../dts/arm/imx6q-hummingboard2-emmc-som-v15.dts | 63 - > > sys/gnu/dts/arm/imx6q-hummingboard2-som-v15.dts | 62 - > > sys/gnu/dts/arm/imx6q-hummingboard2.dts | 61 - > > sys/gnu/dts/arm/imx6q-icore-mipi.dts | 33 - > > sys/gnu/dts/arm/imx6q-icore-ofcap10.dts | 40 - > > sys/gnu/dts/arm/imx6q-icore-ofcap12.dts | 43 - > > sys/gnu/dts/arm/imx6q-icore-rqs.dts | 19 - > > sys/gnu/dts/arm/imx6q-icore.dts | 57 - > > sys/gnu/dts/arm/imx6q-kontron-samx6i.dtsi | 36 - > > sys/gnu/dts/arm/imx6q-kp-tpc.dts | 23 - > > sys/gnu/dts/arm/imx6q-kp.dtsi | 432 -- > > sys/gnu/dts/arm/imx6q-logicpd.dts | 130 - > > sys/gnu/dts/arm/imx6q-marsboard.dts | 417 -- > > sys/gnu/dts/arm/imx6q-mccmon6.dts | 470 -- > > sys/gnu/dts/arm/imx6q-nitrogen6_max.dts | 17 - > > sys/gnu/dts/arm/imx6q-nitrogen6_som2.dts | 17 - > > sys/gnu/dts/arm/imx6q-nitrogen6x.dts | 19 - > > sys/gnu/dts/arm/imx6q-novena.dts | 792 --- > > sys/gnu/dts/arm/imx6q-phytec-mira-rdk-emmc.dts | 72 - > > sys/gnu/dts/arm/imx6q-phytec-mira-rdk-nand.dts | 72 - > > sys/gnu/dts/arm/imx6q-phytec-pbab01.dts | 21 - > > sys/gnu/dts/arm/imx6q-phytec-pfla02.dtsi | 17 - > > sys/gnu/dts/arm/imx6q-pico-dwarf.dts | 17 - > > sys/gnu/dts/arm/imx6q-pico-hobbit.dts | 17 - > > sys/gnu/dts/arm/imx6q-pico-nymph.dts | 17 - > > sys/gnu/dts/arm/imx6q-pico-pi.dts | 17 - > > sys/gnu/dts/arm/imx6q-pinfunc.h | 1044 --- > > sys/gnu/dts/arm/imx6q-pistachio.dts | 694 -- > > sys/gnu/dts/arm/imx6q-rex-pro.dts | 31 - > > sys/gnu/dts/arm/imx6q-sabreauto.dts | 18 - > > sys/gnu/dts/arm/imx6q-sabrelite.dts | 59 - > > sys/gnu/dts/arm/imx6q-sabresd.dts | 23 - > > sys/gnu/dts/arm/imx6q-savageboard.dts | 55 - > > sys/gnu/dts/arm/imx6q-sbc6x.dts | 93 - > > sys/gnu/dts/arm/imx6q-tbs2910.dts | 388 -- > > sys/gnu/dts/arm/imx6q-ts4900.dts | 59 - > > sys/gnu/dts/arm/imx6q-ts7970.dts | 60 - > > sys/gnu/dts/arm/imx6q-tx6q-1010-comtft.dts | 79 - > > sys/gnu/dts/arm/imx6q-tx6q-1010.dts | 54 - > > sys/gnu/dts/arm/imx6q-tx6q-1020-comtft.dts | 110 - > > sys/gnu/dts/arm/imx6q-tx6q-1020.dts | 86 - > > sys/gnu/dts/arm/imx6q-tx6q-1036-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6q-tx6q-1036.dts | 86 - > > sys/gnu/dts/arm/imx6q-tx6q-10x0-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6q-tx6q-1110.dts | 58 - > > sys/gnu/dts/arm/imx6q-tx6q-11x0-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6q-udoo.dts | 18 - > > sys/gnu/dts/arm/imx6q-utilite-pro.dts | 355 -- > > sys/gnu/dts/arm/imx6q-var-dt6customboard.dts | 234 - > > sys/gnu/dts/arm/imx6q-wandboard-revb1.dts | 23 - > > sys/gnu/dts/arm/imx6q-wandboard-revd1.dts | 23 - > > sys/gnu/dts/arm/imx6q-wandboard.dts | 23 - > > sys/gnu/dts/arm/imx6q-zii-rdu2.dts | 20 - > > sys/gnu/dts/arm/imx6q.dtsi | 548 -- > > sys/gnu/dts/arm/imx6qdl-apalis.dtsi | 952 --- > > sys/gnu/dts/arm/imx6qdl-apf6.dtsi | 152 - > > sys/gnu/dts/arm/imx6qdl-apf6dev.dtsi | 450 -- > > sys/gnu/dts/arm/imx6qdl-aristainetos.dtsi | 408 -- > > sys/gnu/dts/arm/imx6qdl-aristainetos2.dtsi | 626 -- > > sys/gnu/dts/arm/imx6qdl-colibri-v1_1-uhs.dtsi | 44 - > > sys/gnu/dts/arm/imx6qdl-colibri.dtsi | 864 --- > > sys/gnu/dts/arm/imx6qdl-cubox-i.dtsi | 269 - > > sys/gnu/dts/arm/imx6qdl-dfi-fs700-m60.dtsi | 201 - > > sys/gnu/dts/arm/imx6qdl-emcon-avari.dtsi | 177 - > > sys/gnu/dts/arm/imx6qdl-emcon.dtsi | 831 --- > > sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi | 499 -- > > sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi | 633 -- > > sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi | 617 -- > > sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi | 709 --- > > sys/gnu/dts/arm/imx6qdl-gw551x.dtsi | 563 -- > > sys/gnu/dts/arm/imx6qdl-gw552x.dtsi | 381 -- > > sys/gnu/dts/arm/imx6qdl-gw553x.dtsi | 599 -- > > sys/gnu/dts/arm/imx6qdl-gw560x.dtsi | 782 --- > > sys/gnu/dts/arm/imx6qdl-gw5903.dtsi | 655 -- > > sys/gnu/dts/arm/imx6qdl-gw5904.dtsi | 671 -- > > sys/gnu/dts/arm/imx6qdl-gw5907.dtsi | 399 -- > > sys/gnu/dts/arm/imx6qdl-gw5910.dtsi | 507 -- > > sys/gnu/dts/arm/imx6qdl-gw5912.dtsi | 461 -- > > sys/gnu/dts/arm/imx6qdl-gw5913.dtsi | 348 - > > sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi | 368 -- > > sys/gnu/dts/arm/imx6qdl-hummingboard2-emmc.dtsi | 72 - > > sys/gnu/dts/arm/imx6qdl-hummingboard2.dtsi | 577 -- > > sys/gnu/dts/arm/imx6qdl-icore-1.5.dtsi | 32 - > > sys/gnu/dts/arm/imx6qdl-icore-rqs.dtsi | 466 -- > > sys/gnu/dts/arm/imx6qdl-icore.dtsi | 430 -- > > sys/gnu/dts/arm/imx6qdl-kontron-samx6i.dtsi | 815 --- > > sys/gnu/dts/arm/imx6qdl-nit6xlite.dtsi | 570 -- > > sys/gnu/dts/arm/imx6qdl-nitrogen6_max.dtsi | 835 --- > > sys/gnu/dts/arm/imx6qdl-nitrogen6_som2.dtsi | 733 --- > > sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi | 680 -- > > sys/gnu/dts/arm/imx6qdl-phytec-mira.dtsi | 390 -- > > sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi | 175 - > > sys/gnu/dts/arm/imx6qdl-phytec-pfla02.dtsi | 445 -- > > sys/gnu/dts/arm/imx6qdl-phytec-phycore-som.dtsi | 290 - > > sys/gnu/dts/arm/imx6qdl-pico-dwarf.dtsi | 45 - > > sys/gnu/dts/arm/imx6qdl-pico-hobbit.dtsi | 37 - > > sys/gnu/dts/arm/imx6qdl-pico-nymph.dtsi | 54 - > > sys/gnu/dts/arm/imx6qdl-pico-pi.dtsi | 31 - > > sys/gnu/dts/arm/imx6qdl-pico.dtsi | 617 -- > > sys/gnu/dts/arm/imx6qdl-rex.dtsi | 367 -- > > sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi | 861 --- > > sys/gnu/dts/arm/imx6qdl-sabrelite.dtsi | 765 --- > > sys/gnu/dts/arm/imx6qdl-sabresd.dtsi | 824 --- > > sys/gnu/dts/arm/imx6qdl-savageboard.dtsi | 255 - > > sys/gnu/dts/arm/imx6qdl-sr-som-brcm.dtsi | 144 - > > sys/gnu/dts/arm/imx6qdl-sr-som-emmc.dtsi | 70 - > > sys/gnu/dts/arm/imx6qdl-sr-som-ti.dtsi | 171 - > > sys/gnu/dts/arm/imx6qdl-sr-som.dtsi | 132 - > > sys/gnu/dts/arm/imx6qdl-ts4900.dtsi | 479 -- > > sys/gnu/dts/arm/imx6qdl-ts7970.dtsi | 594 -- > > sys/gnu/dts/arm/imx6qdl-tx6-lcd.dtsi | 251 - > > sys/gnu/dts/arm/imx6qdl-tx6-lvds.dtsi | 286 - > > sys/gnu/dts/arm/imx6qdl-tx6-mb7.dtsi | 96 - > > sys/gnu/dts/arm/imx6qdl-tx6.dtsi | 811 --- > > sys/gnu/dts/arm/imx6qdl-udoo.dtsi | 324 - > > sys/gnu/dts/arm/imx6qdl-var-dart.dtsi | 504 -- > > sys/gnu/dts/arm/imx6qdl-wandboard-revb1.dtsi | 36 - > > sys/gnu/dts/arm/imx6qdl-wandboard-revc1.dtsi | 35 - > > sys/gnu/dts/arm/imx6qdl-wandboard-revd1.dtsi | 195 - > > sys/gnu/dts/arm/imx6qdl-wandboard.dtsi | 358 -- > > sys/gnu/dts/arm/imx6qdl-zii-rdu2.dtsi | 1140 ---- > > sys/gnu/dts/arm/imx6qdl.dtsi | 1382 ---- > > sys/gnu/dts/arm/imx6qp-nitrogen6_max.dts | 22 - > > sys/gnu/dts/arm/imx6qp-nitrogen6_som2.dts | 18 - > > sys/gnu/dts/arm/imx6qp-phytec-mira-rdk-nand.dts | 72 - > > sys/gnu/dts/arm/imx6qp-sabreauto.dts | 55 - > > sys/gnu/dts/arm/imx6qp-sabresd.dts | 55 - > > sys/gnu/dts/arm/imx6qp-tx6qp-8037-mb7.dts | 48 - > > sys/gnu/dts/arm/imx6qp-tx6qp-8037.dts | 86 - > > sys/gnu/dts/arm/imx6qp-tx6qp-8137-mb7.dts | 57 - > > sys/gnu/dts/arm/imx6qp-tx6qp-8137.dts | 90 - > > sys/gnu/dts/arm/imx6qp-wandboard-revd1.dts | 23 - > > sys/gnu/dts/arm/imx6qp-zii-rdu2.dts | 25 - > > sys/gnu/dts/arm/imx6qp.dtsi | 114 - > > sys/gnu/dts/arm/imx6sl-evk.dts | 648 -- > > sys/gnu/dts/arm/imx6sl-pinfunc.h | 1073 ---- > > sys/gnu/dts/arm/imx6sl-tolino-shine3.dts | 322 - > > sys/gnu/dts/arm/imx6sl-warp.dts | 234 - > > sys/gnu/dts/arm/imx6sl.dtsi | 1002 --- > > sys/gnu/dts/arm/imx6sll-evk.dts | 502 -- > > sys/gnu/dts/arm/imx6sll-kobo-clarahd.dts | 324 - > > sys/gnu/dts/arm/imx6sll-pinfunc.h | 880 --- > > sys/gnu/dts/arm/imx6sll.dtsi | 829 --- > > sys/gnu/dts/arm/imx6sx-nitrogen6sx.dts | 602 -- > > sys/gnu/dts/arm/imx6sx-pinfunc.h | 1668 ----- > > sys/gnu/dts/arm/imx6sx-sabreauto.dts | 461 -- > > *** 952091 LINES SKIPPED *** > > > > > -- > Mateusz Guzik -- Emmanuel Vadot From owner-dev-commits-src-all@freebsd.org Sat Jan 16 11:58:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF97A4DC363; Sat, 16 Jan 2021 11:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHxQS4RdKz3jfx; Sat, 16 Jan 2021 11:58: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 8B6BF66B1; Sat, 16 Jan 2021 11:58: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 10GBwOeJ093100; Sat, 16 Jan 2021 11:58:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GBwO66093099; Sat, 16 Jan 2021 11:58:24 GMT (envelope-from git) Date: Sat, 16 Jan 2021 11:58:24 GMT Message-Id: <202101161158.10GBwO66093099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 6e8062c855d1 - main - cat: persistent errno MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e8062c855d19d1cbbd65b6843449f22791c3a0a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 11:58:24 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=6e8062c855d19d1cbbd65b6843449f22791c3a0a commit 6e8062c855d19d1cbbd65b6843449f22791c3a0a Author: Mariusz Zaborski AuthorDate: 2021-01-16 11:55:42 +0000 Commit: Mariusz Zaborski CommitDate: 2021-01-16 11:55:42 +0000 cat: persistent errno There is no guarantee that after close(2)/free the errno will remain persistent. The caller of the udom_open function depends on the errno for reporting errors. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D28185 --- bin/cat/cat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index cdfc983610de..8ba6f6261ad4 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -429,7 +429,7 @@ udom_open(const char *path, int flags) struct addrinfo hints, *res, *res0; char rpath[PATH_MAX]; int fd = -1; - int error; + int error, serrno; cap_rights_t rights; /* @@ -453,18 +453,23 @@ udom_open(const char *path, int flags) fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (fd < 0) { + serrno = errno; freeaddrinfo(res0); + errno = serrno; return (-1); } if (caph_rights_limit(fd, &rights) < 0) { + serrno = errno; close(fd); freeaddrinfo(res0); + errno = serrno; return (-1); } error = cap_connect(capnet, fd, res->ai_addr, res->ai_addrlen); if (error == 0) break; else { + serrno = errno; close(fd); fd = -1; } @@ -492,9 +497,13 @@ udom_open(const char *path, int flags) cap_rights_clear(&rights, CAP_CONNECT, CAP_SHUTDOWN); if (caph_rights_limit(fd, &rights) < 0) { + serrno = errno; close(fd); + errno = serrno; return (-1); } + } else { + errno = serrno; } return (fd); } From owner-dev-commits-src-all@freebsd.org Sat Jan 16 11:58:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C2BA34DC369; Sat, 16 Jan 2021 11:58: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 4DHxQT5CZKz3k4f; Sat, 16 Jan 2021 11:58: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 A5E34666F; Sat, 16 Jan 2021 11:58: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 10GBwP27093120; Sat, 16 Jan 2021 11:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GBwPtb093119; Sat, 16 Jan 2021 11:58:25 GMT (envelope-from git) Date: Sat, 16 Jan 2021 11:58:25 GMT Message-Id: <202101161158.10GBwPtb093119@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: de57c3d88258 - main - cat: style nits MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de57c3d8825896ee6dfbb4934095459f6836bf65 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 11:58:25 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=de57c3d8825896ee6dfbb4934095459f6836bf65 commit de57c3d8825896ee6dfbb4934095459f6836bf65 Author: Mariusz Zaborski AuthorDate: 2021-01-16 11:58:23 +0000 Commit: Mariusz Zaborski CommitDate: 2021-01-16 11:58:23 +0000 cat: style nits --- bin/cat/cat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 8ba6f6261ad4..764c97c7ad43 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -428,8 +428,7 @@ udom_open(const char *path, int flags) { struct addrinfo hints, *res, *res0; char rpath[PATH_MAX]; - int fd = -1; - int error, serrno; + int fd, error, serrno; cap_rights_t rights; /* @@ -437,6 +436,7 @@ udom_open(const char *path, int flags) */ bzero(&hints, sizeof(hints)); hints.ai_family = AF_LOCAL; + fd = -1; if (fileargs_realpath(fa, path, rpath) == NULL) return (-1); From owner-dev-commits-src-all@freebsd.org Sat Jan 16 14:49:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 245F04E0838; Sat, 16 Jan 2021 14:49:05 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4DJ1CM5v0zz3tHk; Sat, 16 Jan 2021 14:49:03 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id 10GEmuI4095908; Sat, 16 Jan 2021 08:48:56 -0600 (CST) (envelope-from mike@karels.net) Message-Id: <202101161448.10GEmuI4095908@mail.karels.net> To: Mateusz Guzik cc: Mariusz Zaborski , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston , Alex Richardson From: Mike Karels Reply-to: mike@karels.net Subject: Re: git: aefe30c54371 - main - cat: capsicumize it In-reply-to: Your message of Sat, 16 Jan 2021 09:12:39 +0100. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <95906.1610808536.1@mail.karels.net> Content-Transfer-Encoding: quoted-printable Date: Sat, 16 Jan 2021 08:48:56 -0600 X-Rspamd-Queue-Id: 4DJ1CM5v0zz3tHk X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-3.19 / 15.00]; HAS_REPLYTO(0.00)[mike@karels.net]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[216.160.39.52:from]; DMARC_NA(0.00)[karels.net]; SPAMHAUS_ZRD(0.00)[216.160.39.52:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.994]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 14:49:05 -0000 Mateusz wrote: > I have to strongly disagree with this change. > truss -f cat /etc/motd immediately reveals most peculiar overhead > which comes with it. > Some examples: > - pdfork is called 3 times and fork 1 time, spawning 4 processes in tota= l > - the file is opened twice: > 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) =3D 5 (0x5) > 5548: cap_rights_limit(5,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) =3D 0 (0x0) > 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) =3D 7 (0x7) > 5548: cap_rights_limit(7,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) =3D 0 (0x0) > - there is an enormous number of sendto/recvfrom instead of everything > happening in just one go > Key points: > - the functionality provided by casper definitely induces way more > overhead than it should. > - regardless of the above, I find patching tools like tail and cat in > this manner to be highly questionable. Ultimately whatever security > may or may not have been gained it always have to be gauged against > actual impact and it does not look it is worth it in this case. > Even if someone was to put cat in capability mode, for something as > trivial a opening one file, cat could just do it without all the other > overhead and then enter the sandbox. > That said, I think this change (and possibly similar changes to other > tooling) should be reverted. Regardless of what happens here, casper > needs a lot of work before it is deemed usable. > My $0,03. I also question this change. Using capsicum makes sense for something like tcpdump, which usually runs as root, uses privileged facilities, and interprets external data that could potentially subvert it in the worst case. It also has a fairly high startup cost that can be amortized over its runtime. Cat is nothing like this, so I wonder what the motivati= on was for the change. It's not obvious to me that there is any significant value in capsicumizing, and there are obviously significant costs. Mike > On 1/15/21, Mariusz Zaborski wrote: > > The branch main has been updated by oshogbo: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=3Daefe30c5437159a5399bdbc1974d= 6fbf40f2ba0f > > > > commit aefe30c5437159a5399bdbc1974d6fbf40f2ba0f > > Author: Mariusz Zaborski > > AuthorDate: 2021-01-15 20:22:29 +0000 > > Commit: Mariusz Zaborski > > CommitDate: 2021-01-15 20:23:42 +0000 > > > > cat: capsicumize it > > > > Reviewed by: markj, arichardson > > Differential Revision: https://reviews.freebsd.org/D28083 From owner-dev-commits-src-all@freebsd.org Sat Jan 16 15:10:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E643F4E0F3F; Sat, 16 Jan 2021 15:10:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJ1gj1twjz3ty1; Sat, 16 Jan 2021 15:10:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id 0nDGlbdCTbYg30nDIlGIIA; Sat, 16 Jan 2021 08:10:07 -0700 X-Authority-Analysis: v=2.4 cv=Q4RsX66a c=1 sm=1 tr=0 ts=600301cf a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=EmqxpYm9HcoA:10 a=1QTDH3R-AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=_2UG1ppqKbt8MebEjyEA:9 a=CjuIK1q_8ugA:10 a=A7PbjfUNzwAiWwc5k9lq:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 737CB8E5; Sat, 16 Jan 2021 07:10:01 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 10GF9xON022324; Sat, 16 Jan 2021 07:10:00 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202101161510.10GF9xON022324@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: mike@karels.net cc: Mateusz Guzik , Mariusz Zaborski , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston , Alex Richardson Subject: Re: git: aefe30c54371 - main - cat: capsicumize it In-reply-to: <202101161448.10GEmuI4095908@mail.karels.net> References: <202101161448.10GEmuI4095908@mail.karels.net> Comments: In-reply-to Mike Karels message dated "Sat, 16 Jan 2021 08:48:56 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 16 Jan 2021 07:09:59 -0800 X-CMAE-Envelope: MS4xfK8jN9VrElUNMvTbIH38ZoBSiyGFOdIFaXshzxUpXe59ns32YE2SkfpPh96FwZyUyrGjPnWRC3VTHQkY1pBefNxQLILyYj9sKK6ARO4TCi9Xip922LWW 65kxMXbm+7+fEhQ5LqMc/uD3KpiDhrFIQYudI360mb5yhwwqrr48XK7AQjrD1GzqrUCqDsPYB7nHeFHpXgkbANSV61BVI6iFCy+I8gIU95r02Z+Vsoy8UX0R VpQ/XrWR2UxjnQByHBXfLLtR5UGMbOkUI+/5HN9Ds0a1tcrrq5JQFDglcyTznRtb6s6ag7icYfIlOD0cKan7Si8Bx5lfvn5mGohNcIOlKmOCgk3M8t2BOqRy oW9uwKPQRHWvmOSk8kNfFODm0dYjL4SRyclRo3TyUGA0VNrFNSk53vKfbJTjhkfJffk53ErSlyKF1zkuxuBoumM5Ab3q784c02l8Lop3vE4wKpmIlF4= X-Rspamd-Queue-Id: 4DJ1gj1twjz3ty1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 15:10:10 -0000 In message <202101161448.10GEmuI4095908@mail.karels.net>, Mike Karels writes: > Mateusz wrote: > > I have to strongly disagree with this change. > > > truss -f cat /etc/motd immediately reveals most peculiar overhead > > which comes with it. > > > Some examples: > > - pdfork is called 3 times and fork 1 time, spawning 4 processes in total > > - the file is opened twice: > > 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) = 5 (0x5) > > 5548: cap_rights_limit(5,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) = 0 (0x0) > > 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) = 7 (0x7) > > 5548: cap_rights_limit(7,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) = 0 (0x0) > > - there is an enormous number of sendto/recvfrom instead of everything > > happening in just one go > > > Key points: > > - the functionality provided by casper definitely induces way more > > overhead than it should. > > - regardless of the above, I find patching tools like tail and cat in > > this manner to be highly questionable. Ultimately whatever security > > may or may not have been gained it always have to be gauged against > > actual impact and it does not look it is worth it in this case. > > > Even if someone was to put cat in capability mode, for something as > > trivial a opening one file, cat could just do it without all the other > > overhead and then enter the sandbox. > > > That said, I think this change (and possibly similar changes to other > > tooling) should be reverted. Regardless of what happens here, casper > > needs a lot of work before it is deemed usable. > > > My $0,03. > > I also question this change. Using capsicum makes sense for something > like tcpdump, which usually runs as root, uses privileged facilities, tcpdump can drop its privileges. Various Linux distros and vendors do this. I have a patch in my tree that will do this. > and interprets external data that could potentially subvert it in the > worst case. It also has a fairly high startup cost that can be amortized > over its runtime. Cat is nothing like this, so I wonder what the motivation > was for the change. It's not obvious to me that there is any significant > value in capsicumizing, and there are obviously significant costs. Agreed. > > Mike -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. > > > On 1/15/21, Mariusz Zaborski wrote: > > > The branch main has been updated by oshogbo: > > > > > > URL: > > > https://cgit.FreeBSD.org/src/commit/?id=aefe30c5437159a5399bdbc1974d6fbf4 > 0f2ba0f > > > > > > commit aefe30c5437159a5399bdbc1974d6fbf40f2ba0f > > > Author: Mariusz Zaborski > > > AuthorDate: 2021-01-15 20:22:29 +0000 > > > Commit: Mariusz Zaborski > > > CommitDate: 2021-01-15 20:23:42 +0000 > > > > > > cat: capsicumize it > > > > > > Reviewed by: markj, arichardson > > > Differential Revision: https://reviews.freebsd.org/D28083 > > > From owner-dev-commits-src-all@freebsd.org Sat Jan 16 16:26:51 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59EAD4E44AA; Sat, 16 Jan 2021 16:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJ3NC28Ncz4Vps; Sat, 16 Jan 2021 16:26: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 3218E11D72; Sat, 16 Jan 2021 16:26: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 10GGQpMv045048; Sat, 16 Jan 2021 16:26:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GGQpok045047; Sat, 16 Jan 2021 16:26:51 GMT (envelope-from git) Date: Sat, 16 Jan 2021 16:26:51 GMT Message-Id: <202101161626.10GGQpok045047@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: 7593c13e180f - main - Add libclang_rt.profile-powerpc64le.a to (Optional)?ObsoleteFiles.inc 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: 7593c13e180f64a19ff4fc611f5e8955e7836466 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 16:26:51 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7593c13e180f64a19ff4fc611f5e8955e7836466 commit 7593c13e180f64a19ff4fc611f5e8955e7836466 Author: Dimitry Andric AuthorDate: 2021-01-16 16:25:56 +0000 Commit: Dimitry Andric CommitDate: 2021-01-16 16:25:56 +0000 Add libclang_rt.profile-powerpc64le.a to (Optional)?ObsoleteFiles.inc On little-endian PowerPC64, this prevented /usr/lib/clang/11.0.0 being cleaned up completely after upgrading to clang 11.0.1. Noticed by: pkubaj MFC after: 4 weeks X-MFC-With: r364284 --- ObsoleteFiles.inc | 1 + tools/build/mk/OptionalObsoleteFiles.inc | 1 + 2 files changed, 2 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index cf8b2ed118ab..c83227b87ef7 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -265,6 +265,7 @@ OLD_FILES+=usr/lib/clang/11.0.0/lib/freebsd/libclang_rt.profile-armhf.a OLD_FILES+=usr/lib/clang/11.0.0/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/11.0.0/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/11.0.0/lib/freebsd/libclang_rt.profile-powerpc64.a +OLD_FILES+=usr/lib/clang/11.0.0/lib/freebsd/libclang_rt.profile-powerpc64le.a OLD_FILES+=usr/lib/clang/11.0.0/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/11.0.0/lib/freebsd/libclang_rt.safestack-aarch64.a OLD_FILES+=usr/lib/clang/11.0.0/lib/freebsd/libclang_rt.safestack-i386.a diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 5a20fe366faf..0484ad6fa30a 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1462,6 +1462,7 @@ OLD_FILES+=usr/lib/clang/11.0.1/lib/freebsd/libclang_rt.profile-armhf.a OLD_FILES+=usr/lib/clang/11.0.1/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/11.0.1/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/11.0.1/lib/freebsd/libclang_rt.profile-powerpc64.a +OLD_FILES+=usr/lib/clang/11.0.1/lib/freebsd/libclang_rt.profile-powerpc64le.a OLD_FILES+=usr/lib/clang/11.0.1/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/11.0.1/lib/freebsd/libclang_rt.safestack-aarch64.a OLD_FILES+=usr/lib/clang/11.0.1/lib/freebsd/libclang_rt.safestack-i386.a From owner-dev-commits-src-all@freebsd.org Sat Jan 16 19:14:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 521804E83EE; Sat, 16 Jan 2021 19:14: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 4DJ75z1sGsz4hFZ; Sat, 16 Jan 2021 19:14: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 32B47143A8; Sat, 16 Jan 2021 19:14: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 10GJElOR066798; Sat, 16 Jan 2021 19:14:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GJEl9n066797; Sat, 16 Jan 2021 19:14:47 GMT (envelope-from git) Date: Sat, 16 Jan 2021 19:14:47 GMT Message-Id: <202101161914.10GJEl9n066797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 3ddf7eade0e9 - main - loader.efi: Use Blt with gop as default MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ddf7eade0e9e770a78f190bee00c2a7ba256ef5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 19:14:47 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=3ddf7eade0e9e770a78f190bee00c2a7ba256ef5 commit 3ddf7eade0e9e770a78f190bee00c2a7ba256ef5 Author: Toomas Soome AuthorDate: 2021-01-16 15:35:51 +0000 Commit: Toomas Soome CommitDate: 2021-01-16 15:39:40 +0000 loader.efi: Use Blt with gop as default System with FB address 0x4000000000 does not draw, Blt() is doing fine. I think, we can assume the Blt will usually work. --- stand/common/gfx_fb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 76fd8855a5be..9342521fd0cf 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -710,8 +710,11 @@ gfxfb_blt(void *BltBuffer, GFXFB_BLT_OPERATION BltOperation, EFI_STATUS status; EFI_GRAPHICS_OUTPUT *gop = gfx_state.tg_private; - if (gop != NULL && (gop->Mode->Info->PixelFormat == PixelBltOnly || - gfx_state.tg_fb.fb_addr == 0)) { + /* + * We assume Blt() does work, if not, we will need to build + * exception list case by case. + */ + if (gop != NULL) { switch (BltOperation) { case GfxFbBltVideoFill: status = gop->Blt(gop, BltBuffer, EfiBltVideoFill, From owner-dev-commits-src-all@freebsd.org Sat Jan 16 21:06:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF5524EAD9E; Sat, 16 Jan 2021 21:06: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 4DJ9ZY4b5dz4p95; Sat, 16 Jan 2021 21:06: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 9051615A0F; Sat, 16 Jan 2021 21:06: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 10GL6DAH010466; Sat, 16 Jan 2021 21:06:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GL6DFW010465; Sat, 16 Jan 2021 21:06:13 GMT (envelope-from git) Date: Sat, 16 Jan 2021 21:06:13 GMT Message-Id: <202101162106.10GL6DFW010465@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: c6a112cf84d2 - main - service.8: Provide example for adding completions to (t)csh 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: c6a112cf84d2bf55101c0fb61c4fd1e3cf5d3cc8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 21:06:13 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c6a112cf84d2bf55101c0fb61c4fd1e3cf5d3cc8 commit c6a112cf84d2bf55101c0fb61c4fd1e3cf5d3cc8 Author: Daniel Ebdrup Jensen AuthorDate: 2021-01-16 20:55:20 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-01-16 21:05:29 +0000 service.8: Provide example for adding completions to (t)csh service(8) has an example for bash completion, however bash is third party and in /usr/share/examples/csh/dot.cshrc is a working example for csh. Since I use (t)csh, I've tested it, and it works for me. PR: 179497 Submitted by: ohauer@ Reviewed by: kp (tentatively) Differential Revision: https://reviews.freebsd.org/D28197 --- usr.sbin/service/service.8 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/service/service.8 b/usr.sbin/service/service.8 index 27d3948ed62e..a804ec390b6b 100644 --- a/usr.sbin/service/service.8 +++ b/usr.sbin/service/service.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 23, 2020 +.Dd January 16, 2021 .Dt SERVICE 8 .Os .Sh NAME @@ -130,6 +130,13 @@ service -rv .Ed .Pp The following programmable completion entry can be used in +.Xr csh 1 +for the names and common commands of the rc.d scripts: +.Dl "complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' \e" +.Dl " 'n/*/(start stop reload restart \e" +.Dl " status rcvar onestart onestop)/'" +.Pp +The following programmable completion entry can be use in .Xr bash 1 for the names of the rc.d scripts: .Bd -literal -offset -ident From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:21:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 783A54ED3DC; Sat, 16 Jan 2021 22:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJCFp32m1z4vFJ; Sat, 16 Jan 2021 22:21: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 5AF6B16C17; Sat, 16 Jan 2021 22:21: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 10GMLoar013698; Sat, 16 Jan 2021 22:21:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GMLorL013697; Sat, 16 Jan 2021 22:21:50 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:21:50 GMT Message-Id: <202101162221.10GMLorL013697@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: bce5d6aa2485 - main - service.8: Use entire section of literally displayed text 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: bce5d6aa2485925c37240289a5479812a5bb46ff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:21:50 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bce5d6aa2485925c37240289a5479812a5bb46ff commit bce5d6aa2485925c37240289a5479812a5bb46ff Author: Daniel Ebdrup Jensen AuthorDate: 2021-01-16 21:19:20 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-01-16 22:21:05 +0000 service.8: Use entire section of literally displayed text .Dl indents literal display text for one line, but .Bd can do it for a whole subsection. Pointy hat to: debdrup Reported by: 0mp Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D28198 --- usr.sbin/service/service.8 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/service/service.8 b/usr.sbin/service/service.8 index a804ec390b6b..329bcb823f1d 100644 --- a/usr.sbin/service/service.8 +++ b/usr.sbin/service/service.8 @@ -132,9 +132,11 @@ service -rv The following programmable completion entry can be used in .Xr csh 1 for the names and common commands of the rc.d scripts: -.Dl "complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' \e" -.Dl " 'n/*/(start stop reload restart \e" -.Dl " status rcvar onestart onestop)/'" +.Bd -literal -offset indent +complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' \e + 'n/*/(start stop reload restart \e + status rcvar onestart onestop)/' +.Ed .Pp The following programmable completion entry can be use in .Xr bash 1 From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:42:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25A6C4ED4F2; Sat, 16 Jan 2021 22: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 4DJCjy0Qtfz3CJY; Sat, 16 Jan 2021 22: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 0122117087; Sat, 16 Jan 2021 22: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 10GMgjOb039626; Sat, 16 Jan 2021 22:42:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GMgj08039625; Sat, 16 Jan 2021 22:42:45 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:42:45 GMT Message-Id: <202101162242.10GMgj08039625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 81728a538d24 - main - Split rtinit() into multiple functions. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81728a538d24f483d0986850fa3f51d5d84d8f26 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:42:46 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=81728a538d24f483d0986850fa3f51d5d84d8f26 commit 81728a538d24f483d0986850fa3f51d5d84d8f26 Author: Alexander V. Chernikov AuthorDate: 2021-01-09 00:19:25 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-16 22:42:41 +0000 Split rtinit() into multiple functions. rtinit[1]() is a function used to add or remove interface address prefix routes, similar to ifa_maintain_loopback_route(). It was intended to be family-agnostic. There is a problem with this approach in reality. 1) IPv6 code does not use it for the ifa routes. There is a separate layer, nd6_prelist_(), providing interface for maintaining interface routes. Its part, responsible for the actual route table interaction, mimics rtenty() code. 2) rtinit tries to combine multiple actions in the same function: constructing proper route attributes and handling iterations over multiple fibs, for the non-zero net.add_addr_allfibs use case. It notably increases the code complexity. 3) dstaddr handling. flags parameter re-uses RTF_ flags. As there is no special flag for p2p connections, host routes and p2p routes are handled in the same way. Additionally, mapping IFA flags to RTF flags makes the interface pretty messy. It make rtinit() to clash with ifa_mainain_loopback_route() for IPV4 interface aliases. 4) rtinit() is the last customer passing non-masked prefixes to rib_action(), complicating rib_action() implementation. 5) rtinit() coupled ifa announce/withdrawal notifications, producing "false positive" ifa messages in certain corner cases. To address all these points, the following has been done: * rtinit() has been split into multiple functions: - Route attribute construction were moved to the per-address-family functions, dealing with (2), (3) and (4). - funnction providing net.add_addr_allfibs handling and route rtsock notificaions is the new routing table inteface. - rtsock ifa notificaion has been moved out as well. resulting set of funcion are only responsible for the actual route notifications. Side effects: * /32 alias does not result in interface routes (/32 route and "host" route) * RTF_PINNED is now set for IPv6 prefixes corresponding to the interface addresses Differential revision: https://reviews.freebsd.org/D28186 --- sys/net/if_spppsubr.c | 10 +- sys/net/route.c | 24 ----- sys/net/route.h | 5 - sys/net/route/route_ctl.h | 1 + sys/net/route/route_ifaddrs.c | 192 ++++++++------------------------- sys/netinet/in.c | 133 +++++++++++++++++++++-- sys/netinet/in_var.h | 1 + sys/netinet/raw_ip.c | 4 +- sys/netinet6/in6.c | 54 +++++++++- sys/netinet6/nd6_rtr.c | 165 ++++++++++------------------ tests/sys/net/routing/test_rtsock_l3.c | 5 +- 11 files changed, 294 insertions(+), 300 deletions(-) diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 5a18147f14a7..fbf7b0ea8f4c 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -4881,9 +4882,12 @@ sppp_set_ip_addr(struct sppp *sp, u_long src) if (ifa != NULL) { int error; + int fibnum = ifp->if_fib; + rt_addrmsg(RTM_DELETE, ifa, fibnum); /* delete old route */ - error = rtinit(ifa, (int)RTM_DELETE, RTF_HOST); + ia = ifatoia(ifa); + error = in_handle_ifaddr_route(RTM_DELETE, ia); if (debug && error) { log(LOG_DEBUG, SPP_FMT "sppp_set_ip_addr: rtinit DEL failed, error=%d\n", SPP_ARGS(ifp), error); @@ -4891,14 +4895,14 @@ sppp_set_ip_addr(struct sppp *sp, u_long src) /* set new address */ si->sin_addr.s_addr = htonl(src); - ia = ifatoia(ifa); IN_IFADDR_WLOCK(); LIST_REMOVE(ia, ia_hash); LIST_INSERT_HEAD(INADDR_HASH(si->sin_addr.s_addr), ia, ia_hash); IN_IFADDR_WUNLOCK(); + rt_addrmsg(RTM_ADD, ifa, fibnum); /* add new route */ - error = rtinit(ifa, (int)RTM_ADD, RTF_HOST); + error = in_handle_ifaddr_route(RTM_ADD, ia); if (debug && error) { log(LOG_DEBUG, SPP_FMT "sppp_set_ip_addr: rtinit ADD failed, error=%d", SPP_ARGS(ifp), error); diff --git a/sys/net/route.c b/sys/net/route.c index b3383f90789b..7e087569d45f 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -767,27 +767,3 @@ rt_routemsg_info(int cmd, struct rt_addrinfo *info, int fibnum) return (rtsock_routemsg_info(cmd, info, fibnum)); } - -/* - * This is called to generate messages from the routing socket - * indicating a network interface has had addresses associated with it. - */ -void -rt_newaddrmsg_fib(int cmd, struct ifaddr *ifa, struct rtentry *rt, int fibnum) -{ - - KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, - ("unexpected cmd %u", cmd)); - KASSERT((fibnum >= 0 && fibnum < rt_numfibs), - ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); - - if (cmd == RTM_ADD) { - rt_addrmsg(cmd, ifa, fibnum); - if (rt != NULL) - rt_routemsg(cmd, rt, nhop_select(rt->rt_nhop, 0), fibnum); - } else { - if (rt != NULL) - rt_routemsg(cmd, rt, nhop_select(rt->rt_nhop, 0), fibnum); - rt_addrmsg(cmd, ifa, fibnum); - } -} diff --git a/sys/net/route.h b/sys/net/route.h index 96a8e78ecb3a..f9928ab6a776 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -415,7 +415,6 @@ void rt_ifannouncemsg(struct ifnet *, int); void rt_ifmsg(struct ifnet *); void rt_missmsg(int, struct rt_addrinfo *, int, int); void rt_missmsg_fib(int, struct rt_addrinfo *, int, int, int); -void rt_newaddrmsg_fib(int, struct ifaddr *, struct rtentry *, int); int rt_addrmsg(int, struct ifaddr *, int); int rt_routemsg(int, struct rtentry *, struct nhop_object *, int); int rt_routemsg_info(int, struct rt_addrinfo *, int); @@ -433,10 +432,6 @@ void rt_updatemtu(struct ifnet *); void rt_flushifroutes_af(struct ifnet *, int); void rt_flushifroutes(struct ifnet *ifp); -/* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */ -/* Thes are used by old code not yet converted to use multiple FIBS */ -int rtinit(struct ifaddr *, int, int); - /* XXX MRT NEW VERSIONS THAT USE FIBs * For now the protocol indepedent versions are the same as the AF_INET ones * but this will change.. diff --git a/sys/net/route/route_ctl.h b/sys/net/route/route_ctl.h index c52c6b96e126..ecbc9ee91dc0 100644 --- a/sys/net/route/route_ctl.h +++ b/sys/net/route/route_ctl.h @@ -52,6 +52,7 @@ int rib_change_route(uint32_t fibnum, struct rt_addrinfo *info, struct rib_cmd_info *rc); int rib_action(uint32_t fibnum, int action, struct rt_addrinfo *info, struct rib_cmd_info *rc); +int rib_handle_ifaddr_info(uint32_t fibnum, int cmd, struct rt_addrinfo *info); typedef void route_notification_t(struct rib_cmd_info *rc, void *); void rib_decompose_notification(struct rib_cmd_info *rc, diff --git a/sys/net/route/route_ifaddrs.c b/sys/net/route/route_ifaddrs.c index 967aa5d75e68..6e264327d66d 100644 --- a/sys/net/route/route_ifaddrs.c +++ b/sys/net/route/route_ifaddrs.c @@ -65,176 +65,74 @@ SYSCTL_UINT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(rt_add_addr_allfibs), 0, ""); /* - * Set up a routing table entry, normally - * for an interface. + * Executes routing tables change specified by @cmd and @info for the fib + * @fibnum. Generates routing message on success. + * Note: it assumes there is only single route (interface route) for the + * provided prefix. + * Returns 0 on success or errno. */ -static inline int -rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum) +static int +rib_handle_ifaddr_one(uint32_t fibnum, int cmd, struct rt_addrinfo *info) { - RIB_RLOCK_TRACKER; - struct epoch_tracker et; - struct sockaddr *dst; - struct sockaddr *netmask; struct rib_cmd_info rc; - struct rt_addrinfo info; - int error = 0; - int startfib, endfib; - struct sockaddr_storage ss; - int didwork = 0; - int a_failure = 0; - struct sockaddr_dl_short sdl; - struct rib_head *rnh; + struct nhop_object *nh; + int error; - if (flags & RTF_HOST) { - dst = ifa->ifa_dstaddr; - netmask = NULL; - } else { - dst = ifa->ifa_addr; - netmask = ifa->ifa_netmask; - } - if (dst->sa_len == 0) - return(EINVAL); - switch (dst->sa_family) { - case AF_INET6: - case AF_INET: - /* We support multiple FIBs. */ - break; - default: - fibnum = RT_DEFAULT_FIB; - break; - } - if (fibnum == RT_ALL_FIBS) { - if (V_rt_add_addr_allfibs == 0 && cmd == (int)RTM_ADD) - startfib = endfib = ifa->ifa_ifp->if_fib; - else { - startfib = 0; - endfib = rt_numfibs - 1; - } - } else { - KASSERT((fibnum < rt_numfibs), ("rtinit1: bad fibnum")); - startfib = fibnum; - endfib = fibnum; + error = rib_action(fibnum, cmd, info, &rc); + if (error == 0) { + if (cmd == RTM_ADD) + nh = nhop_select(rc.rc_nh_new, 0); + else + nh = nhop_select(rc.rc_nh_old, 0); + rt_routemsg(cmd, rc.rc_rt, nh, fibnum); } - /* - * If it's a delete, check that if it exists, - * it's on the correct interface or we might scrub - * a route to another ifa which would - * be confusing at best and possibly worse. - */ - if (cmd == RTM_DELETE) { - /* - * It's a delete, so it should already exist.. - * If it's a net, mask off the host bits - * (Assuming we have a mask) - * XXX this is kinda inet specific.. - */ - if (netmask != NULL) { - rt_maskedcopy(dst, (struct sockaddr *)&ss, netmask); - dst = (struct sockaddr *)&ss; - } - } - bzero(&sdl, sizeof(struct sockaddr_dl_short)); - sdl.sdl_family = AF_LINK; - sdl.sdl_len = sizeof(struct sockaddr_dl_short); - sdl.sdl_type = ifa->ifa_ifp->if_type; - sdl.sdl_index = ifa->ifa_ifp->if_index; - /* - * Now go through all the requested tables (fibs) and do the - * requested action. Realistically, this will either be fib 0 - * for protocols that don't do multiple tables or all the - * tables for those that do. - */ - for ( fibnum = startfib; fibnum <= endfib; fibnum++) { - if (cmd == RTM_DELETE) { - struct radix_node *rn; - /* - * Look up an rtentry that is in the routing tree and - * contains the correct info. - */ - rnh = rt_tables_get_rnh(fibnum, dst->sa_family); - if (rnh == NULL) - /* this table doesn't exist but others might */ - continue; - RIB_RLOCK(rnh); - rn = rnh->rnh_lookup(dst, netmask, &rnh->head); - error = (rn == NULL || - (rn->rn_flags & RNF_ROOT) || - RNTORT(rn)->rt_nhop->nh_ifa != ifa); - RIB_RUNLOCK(rnh); - if (error) { - /* this is only an error if bad on ALL tables */ - continue; - } - } - /* - * Do the actual request - */ - bzero((caddr_t)&info, sizeof(info)); - info.rti_ifa = ifa; - info.rti_flags = flags | - (ifa->ifa_flags & ~IFA_RTSELF) | RTF_PINNED; - info.rti_info[RTAX_DST] = dst; - info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&sdl; - info.rti_info[RTAX_NETMASK] = netmask; - NET_EPOCH_ENTER(et); - error = rib_action(fibnum, cmd, &info, &rc); - if (error == 0 && rc.rc_rt != NULL) { - /* - * notify any listening routing agents of the change - */ + return (error); +} - /* TODO: interface routes/aliases */ - rt_newaddrmsg_fib(cmd, ifa, rc.rc_rt, fibnum); - didwork = 1; +/* + * Adds/deletes interface prefix specified by @info to the routing table. + * If V_rt_add_addr_allfibs is set, iterates over all existing routing + * tables, otherwise uses fib in @fibnum. Generates routing message for + * each table. + * Returns 0 on success or errno. + */ +int +rib_handle_ifaddr_info(uint32_t fibnum, int cmd, struct rt_addrinfo *info) +{ + int error, last_error = 0; + bool didwork = false; + + if (V_rt_add_addr_allfibs == 0) { + error = rib_handle_ifaddr_one(fibnum, cmd, info); + didwork = (error == 0); + } else { + for (fibnum = 0; fibnum < V_rt_numfibs; fibnum++) { + error = rib_handle_ifaddr_one(fibnum, cmd, info); + if (error == 0) + didwork = true; + else + last_error = error; } - NET_EPOCH_EXIT(et); - if (error) - a_failure = error; } + if (cmd == RTM_DELETE) { if (didwork) { error = 0; } else { /* we only give an error if it wasn't in any table */ - error = ((flags & RTF_HOST) ? + error = ((info->rti_flags & RTF_HOST) ? EHOSTUNREACH : ENETUNREACH); } } else { - if (a_failure) { + if (last_error != 0) { /* return an error if any of them failed */ - error = a_failure; + error = last_error; } } return (error); } -/* - * Set up a routing table entry, normally - * for an interface. - */ -int -rtinit(struct ifaddr *ifa, int cmd, int flags) -{ - struct sockaddr *dst; - int fib = RT_DEFAULT_FIB; - - if (flags & RTF_HOST) { - dst = ifa->ifa_dstaddr; - } else { - dst = ifa->ifa_addr; - } - - switch (dst->sa_family) { - case AF_INET6: - case AF_INET: - /* We do support multiple FIBs. */ - fib = RT_ALL_FIBS; - break; - } - return (rtinit1(ifa, cmd, flags, fib)); -} - static int ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, struct sockaddr *ia) diff --git a/sys/netinet/in.c b/sys/netinet/in.c index cf6541dca879..d6c0c350dec5 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -709,6 +711,125 @@ in_gifaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct thread *td) return (0); } +static int +in_match_ifaddr(const struct rtentry *rt, const struct nhop_object *nh, void *arg) +{ + + if (nh->nh_ifa == (struct ifaddr *)arg) + return (1); + + return (0); +} + +static int +in_handle_prefix_route(uint32_t fibnum, int cmd, + struct sockaddr_in *dst, struct sockaddr_in *netmask, struct ifaddr *ifa) +{ + + NET_EPOCH_ASSERT(); + + /* Prepare gateway */ + struct sockaddr_dl_short sdl = { + .sdl_family = AF_LINK, + .sdl_len = sizeof(struct sockaddr_dl_short), + .sdl_type = ifa->ifa_ifp->if_type, + .sdl_index = ifa->ifa_ifp->if_index, + }; + + struct rt_addrinfo info = { + .rti_ifa = ifa, + .rti_flags = RTF_PINNED | ((netmask != NULL) ? 0 : RTF_HOST), + .rti_info = { + [RTAX_DST] = (struct sockaddr *)dst, + [RTAX_NETMASK] = (struct sockaddr *)netmask, + [RTAX_GATEWAY] = (struct sockaddr *)&sdl, + }, + /* Ensure we delete the prefix IFF prefix ifa matches */ + .rti_filter = in_match_ifaddr, + .rti_filterdata = ifa, + }; + + return (rib_handle_ifaddr_info(fibnum, cmd, &info)); +} + +/* + * Adds or delete interface route corresponding to @ifa. + * There can be multiple options: + * 1) Adding addr with prefix on non-p2p/non-lo interface. + * Example: 192.0.2.1/24. Action: add route towards + * 192.0.2.0/24 via this interface, using ifa as an address source. + * Note: route to 192.0.2.1 will be installed separately via + * ifa_maintain_loopback_route(). + * 2) Adding addr with "host" mask. + * Example: 192.0.2.2/32. In this case no action is performed, + * as the route should be installed by ifa_maintain_loopback_route(). + * Returns 0 to indicate success. + * 3) Adding address with or without prefix to p2p interface. + * Example: 10.0.0.1/24->10.0.0.2. In this case, all other addresses + * covered by prefix, does not make sense in the context of p2p link. + * Action: add route towards 10.0.0.2 via this interface, using ifa as an + * address source. + * Similar to (1), route to 10.0.0.1 will be installed by + * ifa_maintain_loopback_route(). + * 4) Adding address with or without prefix to loopback interface. + * Example: 192.0.2.1/24. In this case, trafic to non-host addresses cannot + * be forwarded, as it would introduce an infinite cycle. + * Similar to (2), perform no action and return 0. Loopback route + * will be installed by ifa_maintain_loopback_route(). + */ +int +in_handle_ifaddr_route(int cmd, struct in_ifaddr *ia) +{ + struct ifaddr *ifa = &ia->ia_ifa; + struct in_addr daddr, maddr; + struct sockaddr_in *pmask; + struct epoch_tracker et; + int error; + + /* Case 4: ignore loopbacks */ + if (ifa->ifa_ifp->if_flags & IFF_LOOPBACK) + return (0); + + if (ifa->ifa_ifp->if_flags & IFF_POINTOPOINT) { + /* Case 3: install route towards dst addr */ + daddr = ia->ia_dstaddr.sin_addr; + pmask = NULL; + maddr.s_addr = INADDR_BROADCAST; + } else { + daddr = ia->ia_addr.sin_addr; + pmask = &ia->ia_sockmask; + maddr = pmask->sin_addr; + + if (maddr.s_addr == INADDR_BROADCAST) { + /* Case 2: ignore /32 routes */ + return (0); + } + } + + struct sockaddr_in mask = { + .sin_family = AF_INET, + .sin_len = sizeof(struct sockaddr_in), + .sin_addr = maddr, + }; + + if (pmask != NULL) + pmask = &mask; + + struct sockaddr_in dst = { + .sin_family = AF_INET, + .sin_len = sizeof(struct sockaddr_in), + .sin_addr.s_addr = daddr.s_addr & maddr.s_addr, + }; + + uint32_t fibnum = ifa->ifa_ifp->if_fib; + NET_EPOCH_ENTER(et); + error = in_handle_prefix_route(fibnum, cmd, &dst, pmask, ifa); + NET_EPOCH_EXIT(et); + + return (error); +} + + #define rtinitflags(x) \ ((((x)->ia_ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) != 0) \ ? RTF_HOST : 0) @@ -785,7 +906,8 @@ in_addprefix(struct in_ifaddr *target, int flags) /* * No-one seem to have this prefix route, so we try to insert it. */ - error = rtinit(&target->ia_ifa, (int)RTM_ADD, flags); + rt_addrmsg(RTM_ADD, &target->ia_ifa, target->ia_ifp->if_fib); + error = in_handle_ifaddr_route(RTM_ADD, target); if (!error) target->ia_flags |= IFA_ROUTE; return (error); @@ -917,8 +1039,7 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags) if ((ia->ia_flags & IFA_ROUTE) == 0) { ifa_ref(&ia->ia_ifa); IN_IFADDR_RUNLOCK(&in_ifa_tracker); - error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, - rtinitflags(target)); + error = in_handle_ifaddr_route(RTM_DELETE, target); if (error == 0) target->ia_flags &= ~IFA_ROUTE; else @@ -927,8 +1048,7 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags) /* Scrub all entries IFF interface is different */ in_scrubprefixlle(target, target->ia_ifp != ia->ia_ifp, flags); - error = rtinit(&ia->ia_ifa, (int)RTM_ADD, - rtinitflags(ia) | RTF_UP); + error = in_handle_ifaddr_route(RTM_ADD, ia); if (error == 0) ia->ia_flags |= IFA_ROUTE; else @@ -948,7 +1068,8 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags) /* * As no-one seem to have this prefix, we can remove the route. */ - error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); + rt_addrmsg(RTM_DELETE, &target->ia_ifa, target->ia_ifp->if_fib); + error = in_handle_ifaddr_route(RTM_DELETE, target); if (error == 0) target->ia_flags &= ~IFA_ROUTE; else diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index fabd8e1ab50c..3a83c5e832ab 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -464,6 +464,7 @@ int in_control(struct socket *, u_long, caddr_t, struct ifnet *, int in_addprefix(struct in_ifaddr *, int); int in_scrubprefix(struct in_ifaddr *, u_int); void in_ifscrub_all(void); +int in_handle_ifaddr_route(int, struct in_ifaddr *); void ip_input(struct mbuf *); void ip_direct_input(struct mbuf *); void in_ifadown(struct ifaddr *ifa, int); diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index a63fc19587f9..c9def015343c 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -864,7 +865,8 @@ rip_ctlinput(int cmd, struct sockaddr *sa, void *vip) err = ifa_del_loopback_route((struct ifaddr *)ia, sa); - err = rtinit(&ia->ia_ifa, RTM_ADD, flags); + rt_addrmsg(RTM_ADD, &ia->ia_ifa, ia->ia_ifp->if_fib); + err = in_handle_ifaddr_route(RTM_ADD, ia); if (err == 0) ia->ia_flags |= IFA_ROUTE; diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 7c572e7b833b..b42cc16cdb6f 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1272,6 +1273,48 @@ in6_broadcast_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra, return (error); } +/* + * Adds or deletes interface route for p2p ifa. + * Returns 0 on success or errno. + */ +static int +in6_handle_dstaddr_rtrequest(int cmd, struct in6_ifaddr *ia) +{ + struct epoch_tracker et; + struct ifaddr *ifa = &ia->ia_ifa; + int error; + + /* Prepare gateway */ + struct sockaddr_dl_short sdl = { + .sdl_family = AF_LINK, + .sdl_len = sizeof(struct sockaddr_dl_short), + .sdl_type = ifa->ifa_ifp->if_type, + .sdl_index = ifa->ifa_ifp->if_index, + }; + + struct sockaddr_in6 dst = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(struct sockaddr_in6), + .sin6_addr = ia->ia_dstaddr.sin6_addr, + }; + + struct rt_addrinfo info = { + .rti_ifa = ifa, + .rti_flags = RTF_PINNED | RTF_HOST, + .rti_info = { + [RTAX_DST] = (struct sockaddr *)&dst, + [RTAX_GATEWAY] = (struct sockaddr *)&sdl, + }, + }; + /* Don't set additional per-gw filters on removal */ + + NET_EPOCH_ENTER(et); + error = rib_handle_ifaddr_info(ifa->ifa_ifp->if_fib, cmd, &info); + NET_EPOCH_EXIT(et); + + return (error); +} + void in6_purgeaddr(struct ifaddr *ifa) { @@ -1305,10 +1348,12 @@ in6_purgeaddr(struct ifaddr *ifa) in6_leavegroup(imm->i6mm_maddr, NULL); free(imm, M_IP6MADDR); } + /* Check if we need to remove p2p route */ plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ + if (ia->ia_dstaddr.sin6_family != AF_INET6) + plen = 0; if ((ia->ia_flags & IFA_ROUTE) && plen == 128) { - error = rtinit(&(ia->ia_ifa), RTM_DELETE, ia->ia_flags | - (ia->ia_dstaddr.sin6_family == AF_INET6 ? RTF_HOST : 0)); + error = in6_handle_dstaddr_rtrequest(RTM_DELETE, ia); if (error != 0) log(LOG_INFO, "%s: err=%d, destination address delete " "failed\n", __func__, error); @@ -1416,7 +1461,7 @@ in6_notify_ifa(struct ifnet *ifp, struct in6_ifaddr *ia, if (pdst->sin6_family == AF_INET6 && !IN6_ARE_ADDR_EQUAL(&pdst->sin6_addr, &ia->ia_dstaddr.sin6_addr)) { if ((ia->ia_flags & IFA_ROUTE) != 0 && - (rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST) != 0)) { + (in6_handle_dstaddr_rtrequest(RTM_DELETE, ia) != 0)) { nd6log((LOG_ERR, "in6_update_ifa_internal: failed to " "remove a route to the old destination: %s\n", ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr))); @@ -1436,13 +1481,12 @@ in6_notify_ifa(struct ifnet *ifp, struct in6_ifaddr *ia, plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && ia->ia_dstaddr.sin6_family == AF_INET6) { - int rtflags = RTF_UP | RTF_HOST; /* * Handle the case for ::1 . */ if (ifp->if_flags & IFF_LOOPBACK) ia->ia_flags |= IFA_RTSELF; - error = rtinit(&ia->ia_ifa, RTM_ADD, ia->ia_flags | rtflags); + error = in6_handle_dstaddr_rtrequest(RTM_ADD, ia); if (error) goto done; ia->ia_flags |= IFA_ROUTE; diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index c6317b1ea263..eca704dc2843 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -2020,73 +2020,61 @@ restart: ND6_ONLINK_UNLOCK(); } +/* + * Add or remove interface route specified by @dst, @netmask and @ifp. + * ifa can be NULL. + * Returns 0 on success + */ +static int +nd6_prefix_rtrequest(uint32_t fibnum, int cmd, struct sockaddr_in6 *dst, + struct sockaddr_in6 *netmask, struct ifnet *ifp, struct ifaddr *ifa) +{ + struct epoch_tracker et; + int error; + + /* Prepare gateway */ + struct sockaddr_dl_short sdl = { + .sdl_family = AF_LINK, + .sdl_len = sizeof(struct sockaddr_dl_short), + .sdl_type = ifp->if_type, + .sdl_index = ifp->if_index, + }; + + struct rt_addrinfo info = { + .rti_ifa = ifa, + .rti_flags = RTF_PINNED | ((netmask != NULL) ? 0 : RTF_HOST), + .rti_info = { + [RTAX_DST] = (struct sockaddr *)dst, + [RTAX_NETMASK] = (struct sockaddr *)netmask, + [RTAX_GATEWAY] = (struct sockaddr *)&sdl, + }, + }; + /* Don't set additional per-gw filters on removal */ + + NET_EPOCH_ENTER(et); + error = rib_handle_ifaddr_info(fibnum, cmd, &info); + NET_EPOCH_EXIT(et); + return (error); +} + static int nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, struct ifaddr *ifa) { - struct sockaddr_dl_short sdl; - struct sockaddr_in6 mask6; - u_long rtflags; - int error, a_failure, fibnum, maxfib; - - bzero(&mask6, sizeof(mask6)); - mask6.sin6_len = sizeof(mask6); - mask6.sin6_addr = pr->ndpr_mask; - rtflags = (ifa->ifa_flags & ~IFA_RTSELF) | RTF_UP; - - bzero(&sdl, sizeof(struct sockaddr_dl_short)); - sdl.sdl_len = sizeof(struct sockaddr_dl_short); - sdl.sdl_family = AF_LINK; - sdl.sdl_type = ifa->ifa_ifp->if_type; - sdl.sdl_index = ifa->ifa_ifp->if_index; - - if(V_rt_add_addr_allfibs) { - fibnum = 0; - maxfib = rt_numfibs; - } else { - fibnum = ifa->ifa_ifp->if_fib; - maxfib = fibnum + 1; - } - a_failure = 0; - for (; fibnum < maxfib; fibnum++) { - struct rt_addrinfo info; - struct rib_cmd_info rc; - - bzero((caddr_t)&info, sizeof(info)); - info.rti_flags = rtflags; - info.rti_info[RTAX_DST] = (struct sockaddr *)&pr->ndpr_prefix; - info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&sdl; - info.rti_info[RTAX_NETMASK] = (struct sockaddr *)&mask6; - - NET_EPOCH_ASSERT(); - error = rib_action(fibnum, RTM_ADD, &info, &rc); - if (error != 0) { - char ip6buf[INET6_ADDRSTRLEN]; - char ip6bufg[INET6_ADDRSTRLEN]; - char ip6bufm[INET6_ADDRSTRLEN]; - struct sockaddr_in6 *sin6; - - sin6 = (struct sockaddr_in6 *)ifa->ifa_addr; - nd6log((LOG_ERR, "%s: failed to add " - "route for a prefix (%s/%d) on %s, gw=%s, mask=%s, " - "flags=%lx errno = %d\n", __func__, - ip6_sprintf(ip6buf, &pr->ndpr_prefix.sin6_addr), - pr->ndpr_plen, if_name(pr->ndpr_ifp), - ip6_sprintf(ip6bufg, &sin6->sin6_addr), - ip6_sprintf(ip6bufm, &mask6.sin6_addr), - rtflags, error)); + int error; - /* Save last error to return, see rtinit(). */ - a_failure = error; - continue; - } + struct sockaddr_in6 mask6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(struct sockaddr_in6), + .sin6_addr = pr->ndpr_mask, + }; + struct sockaddr_in6 *pmask6 = (pr->ndpr_plen != 128) ? &mask6 : NULL; + error = nd6_prefix_rtrequest(pr->ndpr_ifp->if_fib, RTM_ADD, + &pr->ndpr_prefix, pmask6, pr->ndpr_ifp, ifa); + if (error == 0) pr->ndpr_stateflags |= NDPRF_ONLINK; - struct nhop_object *nh = nhop_select(rc.rc_nh_new, 0); - rt_routemsg(RTM_ADD, rc.rc_rt, nh, fibnum); - } - /* Return the last error we got. */ - return (a_failure); + return (error); } static int @@ -2178,11 +2166,10 @@ nd6_prefix_offlink(struct nd_prefix *pr) int error = 0; struct ifnet *ifp = pr->ndpr_ifp; struct nd_prefix *opr; - struct sockaddr_in6 sa6, mask6; + struct sockaddr_in6 sa6; char ip6buf[INET6_ADDRSTRLEN]; uint64_t genid; - int fibnum, maxfib, a_failure; - struct epoch_tracker et; + int a_failure; ND6_ONLINK_LOCK_ASSERT(); ND6_UNLOCK_ASSERT(); @@ -2190,50 +2177,16 @@ nd6_prefix_offlink(struct nd_prefix *pr) if ((pr->ndpr_stateflags & NDPRF_ONLINK) == 0) return (EEXIST); - bzero(&sa6, sizeof(sa6)); - sa6.sin6_family = AF_INET6; - sa6.sin6_len = sizeof(sa6); - bcopy(&pr->ndpr_prefix.sin6_addr, &sa6.sin6_addr, - sizeof(struct in6_addr)); - bzero(&mask6, sizeof(mask6)); - mask6.sin6_family = AF_INET6; - mask6.sin6_len = sizeof(sa6); - bcopy(&pr->ndpr_mask, &mask6.sin6_addr, sizeof(struct in6_addr)); - - if (V_rt_add_addr_allfibs) { - fibnum = 0; - maxfib = rt_numfibs; - } else { - fibnum = ifp->if_fib; - maxfib = fibnum + 1; - } + struct sockaddr_in6 mask6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(struct sockaddr_in6), + .sin6_addr = pr->ndpr_mask, + }; + struct sockaddr_in6 *pmask6 = (pr->ndpr_plen != 128) ? &mask6 : NULL; - a_failure = 0; - NET_EPOCH_ENTER(et); - for (; fibnum < maxfib; fibnum++) { - struct rt_addrinfo info; - struct rib_cmd_info rc; - - bzero((caddr_t)&info, sizeof(info)); - info.rti_flags = RTF_GATEWAY; - info.rti_info[RTAX_DST] = (struct sockaddr *)&sa6; - info.rti_info[RTAX_GATEWAY] = NULL; - info.rti_info[RTAX_NETMASK] = (struct sockaddr *)&mask6; - - NET_EPOCH_ASSERT(); - error = rib_action(fibnum, RTM_DELETE, &info, &rc); - if (error != 0) { - /* Save last error to return, see rtinit(). */ - a_failure = error; - continue; - } + error = nd6_prefix_rtrequest(ifp->if_fib, RTM_DELETE, + &pr->ndpr_prefix, pmask6, ifp, NULL); - /* report route deletion to the routing socket. */ - struct nhop_object *nh = nhop_select(rc.rc_nh_old, 0); - rt_routemsg(RTM_DELETE, rc.rc_rt, nh, fibnum); - } - NET_EPOCH_EXIT(et); - error = a_failure; a_failure = 1; if (error == 0) { pr->ndpr_stateflags &= ~NDPRF_ONLINK; @@ -2283,7 +2236,7 @@ restart: /* XXX: can we still set the NDPRF_ONLINK flag? */ nd6log((LOG_ERR, "%s: failed to delete route: %s/%d on %s (errno=%d)\n", - __func__, ip6_sprintf(ip6buf, &sa6.sin6_addr), + __func__, ip6_sprintf(ip6buf, &pr->ndpr_prefix.sin6_addr), pr->ndpr_plen, if_name(ifp), error)); } diff --git a/tests/sys/net/routing/test_rtsock_l3.c b/tests/sys/net/routing/test_rtsock_l3.c index daba6e5013e6..9486ac466965 100644 --- a/tests/sys/net/routing/test_rtsock_l3.c +++ b/tests/sys/net/routing/test_rtsock_l3.c @@ -1127,8 +1127,7 @@ ATF_TC_BODY(rtm_add_v6_gu_ifa_prefixroute_success, tc) /* gateway should be link sdl with ifindex of an address interface */ verify_link_gateway(rtm, c->ifindex); - /* TODO: PINNED? */ - int expected_rt_flags = RTF_UP | RTF_DONE; + int expected_rt_flags = RTF_UP | RTF_DONE | RTF_PINNED; verify_route_message_extra(rtm, c->ifindex, expected_rt_flags); } @@ -1257,7 +1256,7 @@ ATF_TC_BODY(rtm_del_v6_gu_ifa_prefixroute_success, tc) /* gateway should be link sdl with ifindex of an address interface */ verify_link_gateway(rtm, c->ifindex); - int expected_rt_flags = RTF_DONE; + int expected_rt_flags = RTF_DONE | RTF_PINNED; verify_route_message_extra(rtm, c->ifindex, expected_rt_flags); } From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:53:38 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDF284EDF83; Sat, 16 Jan 2021 22:53: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 4DJCyV4jRYz3CqN; Sat, 16 Jan 2021 22:53: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 82C8A170A9; Sat, 16 Jan 2021 22:53: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 10GMrcxB053217; Sat, 16 Jan 2021 22:53:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GMrcwd053216; Sat, 16 Jan 2021 22:53:38 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:53:38 GMT Message-Id: <202101162253.10GMrcwd053216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: d65427ad582c - main - sym(4): Remove remainder of SYM_SETUP_LP_PROBE_MAP support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d65427ad582cac085428a0b7cf805a8e6996a7a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:53:38 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=d65427ad582cac085428a0b7cf805a8e6996a7a4 commit d65427ad582cac085428a0b7cf805a8e6996a7a4 Author: Marius Strobl AuthorDate: 2020-12-27 18:38:58 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 22:53:12 +0000 sym(4): Remove remainder of SYM_SETUP_LP_PROBE_MAP support Missed in 221ac8f4cd823a2b047c2807e2cf744c7176dd1f and r339575 respectively. --- sys/dev/sym/sym_conf.h | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/sys/dev/sym/sym_conf.h b/sys/dev/sym/sym_conf.h index 9fd113cc1fc3..c5ce93864a6a 100644 --- a/sys/dev/sym/sym_conf.h +++ b/sys/dev/sym/sym_conf.h @@ -274,30 +274,4 @@ #define SYM_SETUP_MAX_LUN (8) #endif -/* - * Low priority probe map. - * - * This option is used as a bitmap to tell the driver - * about chips that are to be claimed with a low priority - * (-2000) by the probe method. This allows any other driver - * that may return some higher priority value for the same - * chips to take precedence over this driver (sym). - * This option may be used when both the ncr driver and this - * driver are configured. - * - * Bits are to be coded as follows: - * 0x01 -> 810a, 860 - * 0x02 -> 825a, 875, 885, 895 - * 0x04 -> 895a, 896, 1510d - * 0x08 -> 1010 - * 0x40 -> 810, 815, 825 - * - * For example, value 5 tells the driver to claim support - * for 810a, 860, 895a, 896 and 1510d with low priority, - * allowing the ncr driver to take precedence if configured. - */ -#ifndef SYM_SETUP_LP_PROBE_MAP -#define SYM_SETUP_LP_PROBE_MAP 0 -#endif - #endif /* SYM_CONF_H */ From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:53:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DF684EDCD9; Sat, 16 Jan 2021 22:53: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 4DJCyb6nDLz3Cqj; Sat, 16 Jan 2021 22:53: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 F2F341719E; Sat, 16 Jan 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 10GMrgqx053302; Sat, 16 Jan 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 10GMrgdw053301; Sat, 16 Jan 2021 22:53:42 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:53:42 GMT Message-Id: <202101162253.10GMrgdw053301@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: ee7231c92936 - main - targets: no longer depend on bt3cfw(8) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee7231c92936b17c592ad9d4dd92a560ff320191 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:53:47 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=ee7231c92936b17c592ad9d4dd92a560ff320191 commit ee7231c92936b17c592ad9d4dd92a560ff320191 Author: Marius Strobl AuthorDate: 2021-01-09 11:10:07 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 22:53:13 +0000 targets: no longer depend on bt3cfw(8) The latter has been removed in 23e124c78bcb46ac78d9f06449c4454f43732805. --- targets/pseudo/userland/Makefile.depend | 1 - 1 file changed, 1 deletion(-) diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend index ead4d94823bd..78b5c1e3a046 100644 --- a/targets/pseudo/userland/Makefile.depend +++ b/targets/pseudo/userland/Makefile.depend @@ -437,7 +437,6 @@ DIRDEPS+= \ usr.sbin/binmiscctl \ usr.sbin/bluetooth/ath3kfw \ usr.sbin/bluetooth/bcmfw \ - usr.sbin/bluetooth/bt3cfw \ usr.sbin/bluetooth/bthidcontrol \ usr.sbin/bluetooth/bthidd \ usr.sbin/bluetooth/btpand \ From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:53:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD78F4EDC55; Sat, 16 Jan 2021 22:53: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 4DJCyW4b05z3CyL; Sat, 16 Jan 2021 22:53: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 90F1C1738F; Sat, 16 Jan 2021 22:53: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 10GMrdA7053240; Sat, 16 Jan 2021 22:53:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GMrdIg053239; Sat, 16 Jan 2021 22:53:39 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:53:39 GMT Message-Id: <202101162253.10GMrdIg053239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: f83a5c238240 - main - hier.7/wlan.4: remove reference to wi(4) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f83a5c2382405cd7afd467b3bd1b41889360aa46 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:53:39 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=f83a5c2382405cd7afd467b3bd1b41889360aa46 commit f83a5c2382405cd7afd467b3bd1b41889360aa46 Author: Marius Strobl AuthorDate: 2021-01-09 10:52:40 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 22:53:12 +0000 hier.7/wlan.4: remove reference to wi(4) The latter has been removed in a21def4d568fd2f6723252c16e116b5e7d8125eb. --- share/man/man4/wlan.4 | 3 +-- share/man/man7/hier.7 | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 index f4384ccef4fa..2e0ebdb09c2f 100644 --- a/share/man/man4/wlan.4 +++ b/share/man/man4/wlan.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2015 +.Dd January 9, 2021 .Dt WLAN 4 .Os .Sh NAME @@ -191,7 +191,6 @@ Stations implementing earlier drafts (e.g., Linux) may be incompatible. .Xr upgt 4 , .Xr ural 4 , .Xr urtw 4 , -.Xr wi 4 , .Xr wlan_acl 4 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index ebf06d91936e..845c4a8a8f7c 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 23, 2020 +.Dd January 9, 2021 .Dt HIER 7 .Os .Sh NAME @@ -235,9 +235,6 @@ see .Xr ppbus 4 .It Pa usb/ USB subsystem -.It Pa wi/ -.Xr wi 4 -WaveLAN driver .El .It Pa fs/ .Bl -tag -width "kerberos5/" -compact From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:53:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 408AB4EDF0C; Sat, 16 Jan 2021 22:53: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 4DJCyX6VTKz3DBb; Sat, 16 Jan 2021 22:53: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 C339917044; Sat, 16 Jan 2021 22:53: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 10GMreh1053262; Sat, 16 Jan 2021 22:53:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GMresR053261; Sat, 16 Jan 2021 22:53:40 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:53:40 GMT Message-Id: <202101162253.10GMresR053261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: bb34c6390538 - main - bluetooth.device.conf.5/netgraph.4: remove reference to ng_bt3c(4) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb34c6390538499ac5adef3d545568d5773e8758 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:53:41 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=bb34c6390538499ac5adef3d545568d5773e8758 commit bb34c6390538499ac5adef3d545568d5773e8758 Author: Marius Strobl AuthorDate: 2021-01-09 11:01:39 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 22:53:12 +0000 bluetooth.device.conf.5/netgraph.4: remove reference to ng_bt3c(4) The latter has been removed in 23e124c78bcb46ac78d9f06449c4454f43732805. --- share/man/man4/netgraph.4 | 3 +-- share/man/man5/bluetooth.device.conf.5 | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/share/man/man4/netgraph.4 b/share/man/man4/netgraph.4 index b1a55ad8c3d6..6b850e27762a 100644 --- a/share/man/man4/netgraph.4 +++ b/share/man/man4/netgraph.4 @@ -36,7 +36,7 @@ .\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $ .\" $FreeBSD$ .\" -.Dd November 25, 2013 +.Dd January 9, 2021 .Dt NETGRAPH 4 .Os .Sh NAME @@ -1422,7 +1422,6 @@ common networking problems, solved using .Xr ng_bluetooth 4 , .Xr ng_bpf 4 , .Xr ng_bridge 4 , -.Xr ng_bt3c 4 , .Xr ng_btsocket 4 , .Xr ng_car 4 , .Xr ng_cisco 4 , diff --git a/share/man/man5/bluetooth.device.conf.5 b/share/man/man5/bluetooth.device.conf.5 index ea3553b07403..681bbd693146 100644 --- a/share/man/man5/bluetooth.device.conf.5 +++ b/share/man/man5/bluetooth.device.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2008 +.Dd January 9, 2021 .Dt BLUETOOTH.DEVICE.CONF 5 .Os .Sh NAME @@ -173,7 +173,6 @@ The file should be used to specify configuration parameters overrides for the second USB Bluetooth device. .Sh SEE ALSO -.Xr ng_bt3c 4 , .Xr ng_h4 4 , .Xr ng_hci 4 , .Xr ng_l2cap 4 , From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:53:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC8F24EE083; Sat, 16 Jan 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 4DJCyZ2T5wz3CwR; Sat, 16 Jan 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 E1E4717291; Sat, 16 Jan 2021 22:53: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 10GMrf71053280; Sat, 16 Jan 2021 22:53:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GMrfM7053279; Sat, 16 Jan 2021 22:53:41 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:53:41 GMT Message-Id: <202101162253.10GMrfM7053279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 33b486472ebd - main - bluetooth: remove support for bt3c(4) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33b486472ebd3225f98d812f53b914dbb77c6a4d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:53:46 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=33b486472ebd3225f98d812f53b914dbb77c6a4d commit 33b486472ebd3225f98d812f53b914dbb77c6a4d Author: Marius Strobl AuthorDate: 2021-01-09 11:07:37 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 22:53:13 +0000 bluetooth: remove support for bt3c(4) The latter has been removed in 23e124c78bcb46ac78d9f06449c4454f43732805. --- libexec/rc/rc.d/bluetooth | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libexec/rc/rc.d/bluetooth b/libexec/rc/rc.d/bluetooth index ac10719861ae..318428ba2fee 100755 --- a/libexec/rc/rc.d/bluetooth +++ b/libexec/rc/rc.d/bluetooth @@ -255,17 +255,6 @@ bluetooth_start() fi ;; - # 3Com Bluetooth Adapter 3CRWB60-A - btccc*) - hook="hook" - - # Obtain unit number from device. - unit=`expr ${dev} : 'btccc\([0-9]\{1,\}\)'` - if [ -z "${unit}" ]; then - err 1 "Unable to get bt3c unit number: ${dev}" - fi - ;; - # USB Bluetooth adapters ubt*) hook="hook" From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:53:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1F0F4EE088; Sat, 16 Jan 2021 22:53: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 4DJCyg6JQwz3DHy; Sat, 16 Jan 2021 22:53: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 536F816E75; Sat, 16 Jan 2021 22:53: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 10GMrkvg053364; Sat, 16 Jan 2021 22:53:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GMrk00053363; Sat, 16 Jan 2021 22:53:46 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:53:46 GMT Message-Id: <202101162253.10GMrk00053363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 0cdfc338053b - main - man4: bring back ofw_console.4 and openfirm.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cdfc338053bc323b3c89f82b287f0fd52da8343 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:53:49 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=0cdfc338053bc323b3c89f82b287f0fd52da8343 commit 0cdfc338053bc323b3c89f82b287f0fd52da8343 Author: Marius Strobl AuthorDate: 2021-01-16 15:58:38 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 22:53:13 +0000 man4: bring back ofw_console.4 and openfirm.4 Back when I wrote openfirm.4, sparc64 was the only architecture to include the corresponding device. However, nowadays all supported architectures will provied this Open Firmware interface, even x86 when built with FDT support. As for ofw_console(4), powerpc actually was the first architecture to ship it but we'll probably not see another consumer in future. This partially reverts 702547720ca01437081fb1b6f9eb281c9541021b and r357794 respectively, adjusting paths and content as appropriate. --- share/man/man4/Makefile | 2 + share/man/man4/man4.powerpc/Makefile | 1 + share/man/man4/man4.powerpc/ofw_console.4 | 111 +++++++++++ share/man/man4/openfirm.4 | 296 ++++++++++++++++++++++++++++++ 4 files changed, 410 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index b8e63315cb95..abdc1b0f4c4b 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -410,6 +410,7 @@ MAN= aac.4 \ oce.4 \ ocs_fc.4\ ohci.4 \ + openfirm.4 \ orm.4 \ ${_ossl.4} \ ow.4 \ @@ -718,6 +719,7 @@ MLINKS+=netintro.4 net.4 \ netintro.4 networking.4 MLINKS+=${_nfe.4} ${_if_nfe.4} MLINKS+=nge.4 if_nge.4 +MLINKS+=openfirm.4 openfirmware.4 MLINKS+=ow.4 onewire.4 MLINKS+=pccbb.4 cbb.4 MLINKS+=pcm.4 snd.4 \ diff --git a/share/man/man4/man4.powerpc/Makefile b/share/man/man4/man4.powerpc/Makefile index 6cc248c8fcf3..05c5d4012fe8 100644 --- a/share/man/man4/man4.powerpc/Makefile +++ b/share/man/man4/man4.powerpc/Makefile @@ -7,6 +7,7 @@ MAN= adb.4 \ cuda.4 \ dtsec.4 \ llan.4 \ + ofw_console.4 \ pmu.4 \ powermac_nvram.4 \ smu.4 \ diff --git a/share/man/man4/man4.powerpc/ofw_console.4 b/share/man/man4/man4.powerpc/ofw_console.4 new file mode 100644 index 000000000000..eb73235c4970 --- /dev/null +++ b/share/man/man4/man4.powerpc/ofw_console.4 @@ -0,0 +1,111 @@ +.\"- +.\" Copyright (c) 2001 Miodrag Vallat. +.\" Copyright (c) 2005 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. Redistribution 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. +.\" +.\" from: OpenBSD: pcons.4,v 1.4 2003/06/02 16:16:26 miod Exp +.\" $FreeBSD$ +.\" +.Dd January 16, 2021 +.Dt OFW_CONSOLE 4 powerpc +.Os +.Sh NAME +.Nm ofw_console +.Nd "Open Firmware console" +.Sh SYNOPSIS +.Cd "cpu AIM" +.Cd "options OFWCONS_POLL_HZ=N" +.Pp +.Cd "options KDB" +.Cd "options DDB" +.Cd "options ALT_BREAK_TO_DEBUGGER" +.Sh DESCRIPTION +The +.Nm +driver provides a simple text console, +using the Open Firmware services for input and output. +It will use the Open Firmware console devices set via the +.Va input-device +and +.Va output-device +variables. +.Pp +This driver is deprecated and only provided as a fallback console mechanism +if the real console hardware can not be driven by +.Fx . +.Pp +In case the +.Nm +console appears to work too slowly, its responsiveness probably can be improved +by including +.Cd "options OFWCONS_POLL_HZ=N" . +When omitted, +.Dv OFWCONS_POLL_HZ +defaults to 4. +For example, on +.Tn Sun Ultra 2 +a value of 20 or higher works best. +Too high values, on the other hand, can cause +.Nm +to unnecessarily consume CPU. +.Sh FILES +.Bl -tag -width ".Pa /dev/keyboard" -compact +.It Pa /dev/console +.It Pa /dev/keyboard +terminal input device in case the console input device is the keyboard +.It Pa /dev/screen +terminal output device in case the console output device is the screen +.It Pa /dev/tty[a-z] +terminal device in case both the console input and output device is tty[a-z] +.El +.Sh SEE ALSO +.Xr akbd 4 , +.Xr powermac_nvram 4 , +.Xr vt 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 5.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Benno Rice Aq Mt benno@FreeBSD.org . +.Sh CAVEATS +Since the Open Firmware will handle BREAK +(or Stop-A) +sequences before +.Nm , +the preferred way to enter +.Xr ddb 4 +when using +.Nm +is to include +.Cd "options ALT_BREAK_TO_DEBUGGER" +in a ddb-enabled kernel, and enter the alternate BREAK sequence +(RETURN TILDE CTRL-b). +.Sh BUGS +The +.Nm +driver also not attach to the hardware resources it actually talks to. diff --git a/share/man/man4/openfirm.4 b/share/man/man4/openfirm.4 new file mode 100644 index 000000000000..ef9755d0c49d --- /dev/null +++ b/share/man/man4/openfirm.4 @@ -0,0 +1,296 @@ +.\"- +.\" Copyright (c) 1992, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This software was developed by the Computer Systems Engineering group +.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and +.\" contributed to Berkeley. +.\" +.\" 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. +.\" +.\" from: @(#)openprom.4 8.1 (Berkeley) 6/5/93 +.\" from: OpenBSD: openprom.4,v 1.9 2004/03/22 22:07:21 miod Exp +.\" +.\"- +.\" Copyright (c) 2005 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 ``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 January 16, 2021 +.Dt OPENFIRM 4 +.Os +.Sh NAME +.Nm openfirm +.Nd "Open Firmware interface" +.Sh SYNOPSIS +.In sys/types.h +.In sys/ioctl.h +.In dev/ofw/openfirmio.h +.Sh DESCRIPTION +The +.Pa /dev/openfirm +device is an interface to the +.Tn Open Firmware +device tree. +This interface is highly stylized. +It uses +.Xr ioctl 2 +calls for all operations. +These calls refer to the nodes in the +.Tn Open Firmware +device tree. +The nodes are represented by package handles, +which are simply integer values describing data areas. +Occasionally a package handle of 0 may be used or returned instead, +as described below. +.Pp +The calls that only take and/or return the package handle of a node +use a pointer to a +.Vt phandle_t +for this purpose. +The others use a pointer to a +.Vt "struct ofiocdesc" +descriptor, +which has the following definition: +.Bd -literal +struct ofiocdesc { + phandle_t of_nodeid; + int of_namelen; + const char *of_name; + int of_buflen; + char *of_buf; +}; +.Ed +.Pp +The +.Va of_nodeid +member is the package handle of the node that is passed in or returned. +Strings are passed in via the +.Va of_name +member of +.Va of_namelen +length. +The maximum accepted length of +.Va of_name +is +.Dv OFIOCMAXNAME . +The +.Va of_buf +member is used to return strings except for the +.Dv OFIOCSET +call where it is also used to pass in a string. +In the latter case the maximum accepted length of +.Va of_buf +is +.Dv OFIOCMAXVALUE . +Generally, +.Va of_buf +works in a value-result fashion. +At entry to the +.Xr ioctl 2 +call, +.Va of_buflen +is expected to reflect the buffer size. +On return, +.Va of_buflen +is updated to reflect the buffer contents. +.Pp +The following +.Xr ioctl 2 +calls are supported: +.Bl -tag -width ".Dv OFIOCGETOPTNODE" +.It Dv OFIOCGETOPTNODE +Uses a +.Vt phandle_t . +Takes nothing and returns the package handle of the +.Pa /options +node. +.It Dv OFIOCGETNEXT +Uses a +.Vt phandle_t . +Takes the package handle of a node and returns the package handle of the next +node in the +.Tn Open Firmware +device tree. +The node following the last node has a package handle of 0. +The node following the node with the package handle of 0 is the first node. +.It Dv OFIOCGETCHILD +Uses a +.Vt phandle_t . +Takes the package handle of a node and returns the package handle of the first +child of that node. +This child may have siblings. +These can be determined by using +.Dv OFIOCGETNEXT . +If the node does not have a child, +a package handle of 0 is returned. +.It Dv OFIOCGET +Uses a +.Vt "struct ofiocdesc" . +Takes the package handle of a node and the name of a property. +Returns the property value and its length. +If no such property is associated with that node, +the length of the value is set to \-1. +If the named property exists but has no value, +the length of the value is set to 0. +.It Dv OFIOCGETPROPLEN +Uses a +.Vt "struct ofiocdesc" . +Takes the package handle of a node and the name of a property. +Returns the length of the property value. +This call is the same as +.Dv OFIOCGET +except that only the length of the property value is returned. +It can be used to determine whether a node has a particular property or whether +a property has a value without the need to provide memory for storing the value. +.It Dv OFIOCSET +Uses a +.Vt "struct ofiocdesc" . +Takes the package handle of a node, +the name of a property and a property value. +Returns the property value and the length that actually have been written. +The +.Tn Open Firmware +may choose to truncate the value if it is too long or write a valid value +instead if the given value is invalid for the particular property. +Therefore the returned value should be checked. +The +.Tn Open Firmware +may also completely refuse to write the given value to the property. +In this case +.Er EINVAL +is returned. +.It Dv OFIOCNEXTPROP +Uses a +.Vt "struct ofiocdesc" . +Takes the package handle of a node and the name of a property. +Returns the name and the length of the next property of the node. +If the property referenced by the given name is the last property of the node, +.Er ENOENT +is returned. +.It Dv OFIOCFINDDEVICE +Uses a +.Vt "struct ofiocdesc" . +Takes the name or alias name of a device node. +Returns package handle of the node. +If no matching node is found, +.Er ENOENT +is returned. +.El +.Sh FILES +.Bl -tag -width ".Pa /dev/openfirm" +.It Pa /dev/openfirm +Open Firmware interface node +.El +.Sh DIAGNOSTICS +The following may result in rejection of an operation: +.Bl -tag -width Er +.It Bq Er EBADF +The requested operation requires permissions not specified at the call to +.Fn open . +.It Bq Er EINVAL +The given package handle is not 0 and does not correspond to any valid node, +or the given package handle is 0 where 0 is not allowed. +.It Bq Er ENAMETOOLONG +The given name or value exceeds the maximum allowed length of +.Dv OFIOCMAXNAME +and +.Dv OFIOCMAXVALUE +bytes respectively. +.El +.Sh SEE ALSO +.Xr ioctl 2 , +.Xr ofwdump 8 +.Rs +.%Q "IEEE Standards Organization" +.%B "IEEE Std 1275-1994:" +.%B "IEEE Standard for Boot Firmware (Initialization Configuration) Firmware:" +.%B Core Requirements and Practices" +.%O ISBN 1-55937-426-8 +.Re +.Sh HISTORY +The +.Nm +interface first appeared in +.Nx 1.6 . +The first +.Fx +version to include it was +.Fx 5.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +interface was ported to +.Fx +by +.An Thomas Moestl Aq Mt tmm@FreeBSD.org . +This manual page was written by +.An Marius Strobl Aq Mt marius@FreeBSD.org +based on the +.Ox +manual page for +.Xr openprom 4 . +.Sh CAVEATS +Due to limitations within +.Tn Open Firmware +itself, +these functions run at elevated priority and may adversely affect system +performance. +.Pp +For at least the +.Pa /options +node the property value passed in to the +.Dv OFIOCSET +call has to be null-terminated and the value length passed in has to include +the terminating +.Ql \e0 . +However, as with the +.Dv OFIOCGET +call, +the returned value length does not include the terminating +.Ql \e0 . From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:53:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA6384EDC5F; Sat, 16 Jan 2021 22:53: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 4DJCyg3wszz3Cwn; Sat, 16 Jan 2021 22:53: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 3E11E1719F; Sat, 16 Jan 2021 22: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 10GMrjfx053342; Sat, 16 Jan 2021 22: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 10GMrjt1053341; Sat, 16 Jan 2021 22:53:45 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:53:45 GMT Message-Id: <202101162253.10GMrjt1053341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: daad26e5fc25 - main - openpromio(4): remove obsolete pseudo device driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: daad26e5fc256767d6b97f07a519e765f1664f69 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:53:51 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=daad26e5fc256767d6b97f07a519e765f1664f69 commit daad26e5fc256767d6b97f07a519e765f1664f69 Author: Marius Strobl AuthorDate: 2021-01-16 11:49:47 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 22:53:13 +0000 openpromio(4): remove obsolete pseudo device driver It's unused since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively and should have gone along with these. --- sys/dev/ofw/openpromio.c | 237 ----------------------------------------------- sys/dev/ofw/openpromio.h | 48 ---------- 2 files changed, 285 deletions(-) diff --git a/sys/dev/ofw/openpromio.c b/sys/dev/ofw/openpromio.c deleted file mode 100644 index 5f1a6c51cd2a..000000000000 --- a/sys/dev/ofw/openpromio.c +++ /dev/null @@ -1,237 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2003 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. - * - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -/* - * This provides a Solaris compatible character device interface to - * Open Firmware. It exists entirely for compatibility with software - * like X11, and only the features that are actually needed for that - * are implemented. The interface sucks too much to actually use, - * new code should use the /dev/openfirm device. - */ - -static d_open_t openprom_open; -static d_close_t openprom_close; -static d_ioctl_t openprom_ioctl; - -static int openprom_modevent(module_t mode, int type, void *data); -static int openprom_node_valid(phandle_t node); -static int openprom_node_search(phandle_t root, phandle_t node); - -static struct cdevsw openprom_cdevsw = { - .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, - .d_open = openprom_open, - .d_close = openprom_close, - .d_ioctl = openprom_ioctl, - .d_name = "openprom", -}; - -static int openprom_is_open; -static struct cdev *openprom_dev; -static phandle_t openprom_node; - -static int -openprom_open(struct cdev *dev, int oflags, int devtype, struct thread *td) -{ - - if (openprom_is_open != 0) - return (EBUSY); - openprom_is_open = 1; - return (0); -} - -static int -openprom_close(struct cdev *dev, int fflag, int devtype, struct thread *td) -{ - - openprom_is_open = 0; - return (0); -} - -static int -openprom_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, - struct thread *td) -{ - struct openpromio *oprom; - phandle_t node; - uint32_t len; - size_t done; - int proplen; - char *prop; - char *buf; - int error; - - if ((flags & FREAD) == 0) - return (EPERM); - - prop = buf = NULL; - error = 0; - switch (cmd) { - case OPROMCHILD: - case OPROMNEXT: - if (data == NULL || *(void **)data == NULL) - return (EINVAL); - oprom = *(void **)data; - error = copyin(&oprom->oprom_size, &len, sizeof(len)); - if (error != 0) - break; - if (len != sizeof(node)) { - error = EINVAL; - break; - } - error = copyin(&oprom->oprom_array, &node, sizeof(node)); - if (error != 0) - break; - error = openprom_node_valid(node); - if (error != 0) - break; - switch (cmd) { - case OPROMCHILD: - node = OF_child(node); - break; - case OPROMNEXT: - node = OF_peer(node); - break; - } - error = copyout(&node, &oprom->oprom_array, sizeof(node)); - if (error != 0) - break; - openprom_node = node; - break; - case OPROMGETPROP: - case OPROMNXTPROP: - if (data == NULL || *(void **)data == NULL) - return (EINVAL); - oprom = *(void **)data; - error = copyin(&oprom->oprom_size, &len, sizeof(len)); - if (error != 0) - break; - if (len > OPROMMAXPARAM) { - error = EINVAL; - break; - } - prop = malloc(len, M_TEMP, M_WAITOK | M_ZERO); - error = copyinstr(&oprom->oprom_array, prop, len, &done); - if (error != 0) - break; - buf = malloc(OPROMMAXPARAM, M_TEMP, M_WAITOK | M_ZERO); - node = openprom_node; - switch (cmd) { - case OPROMGETPROP: - proplen = OF_getproplen(node, prop); - if (proplen > OPROMMAXPARAM) { - error = EINVAL; - break; - } - error = OF_getprop(node, prop, buf, proplen); - break; - case OPROMNXTPROP: - error = OF_nextprop(node, prop, buf, OPROMMAXPARAM); - proplen = strlen(buf); - break; - } - if (error != -1) { - error = copyout(&proplen, &oprom->oprom_size, - sizeof(proplen)); - if (error == 0) - error = copyout(buf, &oprom->oprom_array, - proplen + 1); - } else - error = EINVAL; - break; - default: - error = ENOIOCTL; - break; - } - - if (prop != NULL) - free(prop, M_TEMP); - if (buf != NULL) - free(buf, M_TEMP); - - return (error); -} - -static int -openprom_node_valid(phandle_t node) -{ - - if (node == 0) - return (0); - return (openprom_node_search(OF_peer(0), node)); -} - -static int -openprom_node_search(phandle_t root, phandle_t node) -{ - phandle_t child; - - if (root == node) - return (0); - for (child = OF_child(root); child != 0 && child != -1; - child = OF_peer(child)) - if (openprom_node_search(child, node) == 0) - return (0); - return (EINVAL); -} - -static int -openprom_modevent(module_t mode, int type, void *data) -{ - - switch (type) { - case MOD_LOAD: - openprom_dev = make_dev(&openprom_cdevsw, 0, UID_ROOT, - GID_WHEEL, 0600, "openprom"); - return (0); - case MOD_UNLOAD: - destroy_dev(openprom_dev); - return (0); - default: - return (EOPNOTSUPP); - } -} - -DEV_MODULE(openprom, openprom_modevent, NULL); diff --git a/sys/dev/ofw/openpromio.h b/sys/dev/ofw/openpromio.h deleted file mode 100644 index 9b52d377f0eb..000000000000 --- a/sys/dev/ofw/openpromio.h +++ /dev/null @@ -1,48 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2003 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 _DEV_OFW_OPENPROMIO_H_ -#define _DEV_OFW_OPENPROMIO_H_ - -#include - -struct openpromio { - uint32_t oprom_size; - char oprom_array[]; -}; - -#define OPROMNEXT _IO('O', 1) -#define OPROMCHILD _IO('O', 2) -#define OPROMGETPROP _IO('O', 3) -#define OPROMNXTPROP _IO('O', 4) - -#define OPROMMAXPARAM 4096 - -#endif From owner-dev-commits-src-all@freebsd.org Sat Jan 16 22:53:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB6514EE086; Sat, 16 Jan 2021 22:53: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 4DJCyc6Gxhz3Cyj; Sat, 16 Jan 2021 22:53: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 3475917045; Sat, 16 Jan 2021 22:53: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 10GMriZn053324; Sat, 16 Jan 2021 22:53:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GMrijF053323; Sat, 16 Jan 2021 22:53:44 GMT (envelope-from git) Date: Sat, 16 Jan 2021 22:53:44 GMT Message-Id: <202101162253.10GMrijF053323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 145f01a3dfcb - main - kerneldoc: remove Doxyfile for cmx(4) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 145f01a3dfcba97c20ad14f2054d4b0600b23350 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 22:53:47 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=145f01a3dfcba97c20ad14f2054d4b0600b23350 commit 145f01a3dfcba97c20ad14f2054d4b0600b23350 Author: Marius Strobl AuthorDate: 2021-01-09 11:31:40 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 22:53:13 +0000 kerneldoc: remove Doxyfile for cmx(4) The latter has been removed in 0d3a424a89c1f61c2a46791c097a06f1d139cd5e. --- tools/kerneldoc/subsys/Doxyfile-dev_cmx | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cmx b/tools/kerneldoc/subsys/Doxyfile-dev_cmx deleted file mode 100644 index 0a7db76b5023..000000000000 --- a/tools/kerneldoc/subsys/Doxyfile-dev_cmx +++ /dev/null @@ -1,21 +0,0 @@ -# Doxyfile 1.5.2 - -# $FreeBSD$ - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "FreeBSD kernel CMX device code" -OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cmx/ -EXTRACT_ALL = YES # for undocumented src, no warnings enabled -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = $(DOXYGEN_SRC_PATH)/dev/cmx/ \ - $(NOTREVIEWED) - -GENERATE_TAGFILE = dev_cmx/dev_cmx.tag - -@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH) -@INCLUDE = common-Doxyfile - From owner-dev-commits-src-all@freebsd.org Sat Jan 16 23:02:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B59F24EE251; Sat, 16 Jan 2021 23:02:59 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJD9G40B1z3Fjm; Sat, 16 Jan 2021 23:02:58 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ej1-f47.google.com with SMTP id ke15so10860303ejc.12; Sat, 16 Jan 2021 15:02:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=SBJJ1eI2ZwE8vTsL8Ypgni6q74eTY8guHA/j16QIZqc=; b=pi6DZy+uvhkBaV8Et3EIME+QeFDYkVCAkZrcpbOvE45iOgO1Sp5nVSpTCm1xDY2Hqe KGUYPt8v9DRAhHra2k2r7th7GlmmwmKgAuByc5pbpNEdnHG/HazDnk8bxFKxnYtYYzrE MiGAFGyBLt/LEpkDFC88FtiNB1abL0XXFuIWRAarcccwjKA+qkFy2i1Q0ZfZ23gTEFHN Jxuvd71cVdkHT0iLh8wgQmHzZToBxpo1JXdQorATO1J2/tHAjrfwYN467hFYXV/UihcB nrtCrrSTEs9dZhnpEWIKk1gB/+dJ54+8R69VZDuT5iunsrtxAN6LIyHerNZzCzjmAM31 qipA== X-Gm-Message-State: AOAM531CSQ/1sGR+qxy8ELMPuu2FcJhebMC9dSsyu9VS1PmrCsv03UGS XmljD4+KHCz5EYzDm+QCkUxljM3ZwK6ENA== X-Google-Smtp-Source: ABdhPJwAhaIj74gNesvwei+AcMubAgt0bVpiLsBZNksVN+RNGcTQ6P7Mu/jgnavXWvtuMDhD5tbrTg== X-Received: by 2002:a17:906:2e0d:: with SMTP id n13mr12588250eji.554.1610838176748; Sat, 16 Jan 2021 15:02:56 -0800 (PST) Received: from ?IPv6:2a02:8109:98c0:4ad0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:4ad0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id d4sm8382882edq.36.2021.01.16.15.02.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Jan 2021 15:02:55 -0800 (PST) Subject: Re: git: 74bd20769706 - main - Reference newfs_msdos(8) from the newfs(8) manual To: Ed Maste , Konstantin Belousov Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101070924.1079OE4g081849@gitrepo.freebsd.org> <52e99dc8-cd75-a2ab-7670-b81d8aaa8134@FreeBSD.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: Date: Sun, 17 Jan 2021 00:03:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4DJD9G40B1z3Fjm 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.218.47 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_TO(0.00)[freebsd.org,gmail.com]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.218.47:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; SPAMHAUS_ZRD(0.00)[209.85.218.47:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.47:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.218.47:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-main,dev-commits-src-all] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 23:02:59 -0000 On 1/8/21 9:33 PM, Ed Maste wrote: > On Fri, 8 Jan 2021 at 15:25, Konstantin Belousov wrote: >> If there is some explanation along the lines that newfs is the common >> name prefix for utilities creating filesystems, with the suffix being >> the type of fs, for instance newfs_msdos(8) etc, then it becomes useful >> and reasonable. > I agree. It would be useful to mention that newfs is "special" with > respect to naming; presumably we would call it newfs_ufs if we were > now adding it where it did not already exist. Perhaps this should be a > NOTES or similar section before the SEE ALSO? Good idea. I'll try to prepare a patch. From owner-dev-commits-src-all@freebsd.org Sat Jan 16 23:04:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD2FA4EE26A; Sat, 16 Jan 2021 23:04: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 4DJDBx3fG4z3Fsy; Sat, 16 Jan 2021 23:04: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 486A716EFE; Sat, 16 Jan 2021 23:04: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 10GN4PxS066325; Sat, 16 Jan 2021 23:04:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GN4P5C066324; Sat, 16 Jan 2021 23:04:25 GMT (envelope-from git) Date: Sat, 16 Jan 2021 23:04:25 GMT Message-Id: <202101162304.10GN4P5C066324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 944041f936a6 - main - wl(4): remove obsolete header MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 944041f936a60b078419dd9c5375792fe5aa6cf1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 23:04:26 -0000 The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=944041f936a60b078419dd9c5375792fe5aa6cf1 commit 944041f936a60b078419dd9c5375792fe5aa6cf1 Author: Marius Strobl AuthorDate: 2021-01-16 22:54:50 +0000 Commit: Marius Strobl CommitDate: 2021-01-16 23:03:17 +0000 wl(4): remove obsolete header It's unused since 09b9789b28dd8453a54cb424115f31a6d3672527 and r304506 respectively and should have gone along with these. --- ObsoleteFiles.inc | 5 ++ sys/i386/include/if_wl_wavelan.h | 168 --------------------------------------- 2 files changed, 5 insertions(+), 168 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index c83227b87ef7..1d0766ec894a 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20210116: if_wl_wavelan.h removed +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/if_wl_wavelan.h +.endif + # 20210108: retire cmx, ng_bt3c, wi drivers OLD_FILES+=usr/include/dev/wi/if_wireg.h OLD_FILES+=usr/include/dev/wi/if_wavelan_ieee.h diff --git a/sys/i386/include/if_wl_wavelan.h b/sys/i386/include/if_wl_wavelan.h deleted file mode 100644 index ad3f3fdc11e9..000000000000 --- a/sys/i386/include/if_wl_wavelan.h +++ /dev/null @@ -1,168 +0,0 @@ -/* $FreeBSD$ */ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * 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 all copyright - * notices, this list of conditions and the following disclaimer. - * 2. The names of the authors may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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 _CHIPS_WAVELAN_H -#define _CHIPS_WAVELAN_H - -/* This file contains definitions that are common for all versions of - * the NCR WaveLAN - */ - -#define WAVELAN_ADDR_SIZE 6 /* Size of a MAC address */ -#define WAVELAN_MTU 1500 /* Maximum size of Wavelan packet */ - -/* Modem Management Controler write commands */ -#define MMC_ENCR_KEY 0x00 /* to 0x07 */ -#define MMC_ENCR_ENABLE 0x08 -#define MMC_DES_IO_INVERT 0x0a -#define MMC_LOOPT_SEL 0x10 -#define MMC_JABBER_ENABLE 0x11 -#define MMC_FREEZE 0x12 -#define MMC_ANTEN_SEL 0x13 -#define MMC_IFS 0x14 -#define MMC_MOD_DELAY 0x15 -#define MMC_JAM_TIME 0x16 -#define MMC_THR_PRE_SET 0x18 -#define MMC_DECAY_PRM 0x19 -#define MMC_DECAY_UPDAT_PRM 0x1a -#define MMC_QUALITY_THR 0x1b -#define MMC_NETW_ID_L 0x1c -#define MMC_NETW_ID_H 0x1d -#define MMC_MODE_SEL 0x1e -#define MMC_EECTRL 0x20 /* 2.4 Gz */ -#define MMC_EEADDR 0x21 /* 2.4 Gz */ -#define MMC_EEDATAL 0x22 /* 2.4 Gz */ -#define MMC_EEDATAH 0x23 /* 2.4 Gz */ -#define MMC_ANALCTRL 0x24 /* 2.4 Gz */ - -/* fields in MMC registers that relate to EEPROM in WaveMODEM daughtercard */ -#define MMC_EECTRL_EEPRE 0x10 /* 2.4 Gz EEPROM Protect Reg Enable */ -#define MMC_EECTRL_DWLD 0x08 /* 2.4 Gz EEPROM Download Synths */ -#define MMC_EECTRL_EEOP 0x07 /* 2.4 Gz EEPROM Opcode mask */ -#define MMC_EECTRL_EEOP_READ 0x06 /* 2.4 Gz EEPROM Read Opcode */ -#define MMC_EEADDR_CHAN 0xf0 /* 2.4 Gz EEPROM Channel # mask */ -#define MMC_EEADDR_WDCNT 0x0f /* 2.4 Gz EEPROM DNLD WordCount-1 */ -#define MMC_ANALCTRL_ANTPOL 0x02 /* 2.4 Gz Antenna Polarity mask */ -#define MMC_ANALCTRL_EXTANT 0x01 /* 2.4 Gz External Antenna mask */ - -/* MMC read register names */ -#define MMC_DCE_STATUS 0x10 -#define MMC_CORRECT_NWID_L 0x14 -#define MMC_CORRECT_NWID_H 0x15 -#define MMC_WRONG_NWID_L 0x16 -#define MMC_WRONG_NWID_H 0x17 -#define MMC_THR_PRE_SET 0x18 -#define MMC_SIGNAL_LVL 0x19 -#define MMC_SILENCE_LVL 0x1a -#define MMC_SIGN_QUAL 0x1b -#define MMC_DES_AVAIL 0x09 -#define MMC_EECTRLstat 0x20 /* 2.4 Gz EEPROM r/w/dwld status */ -#define MMC_EEDATALrv 0x22 /* 2.4 Gz EEPROM read value */ -#define MMC_EEDATAHrv 0x23 /* 2.4 Gz EEPROM read value */ - -/* fields in MMC registers that relate to EEPROM in WaveMODEM daughtercard */ -#define MMC_EECTRLstat_ID24 0xf0 /* 2.4 Gz =A0 rev-A, =B0 rev-B */ -#define MMC_EECTRLstat_DWLD 0x08 /* 2.4 Gz Synth/Tx-Pwr DWLD busy */ -#define MMC_EECTRLstat_EEBUSY 0x04 /* 2.4 Gz EEPROM busy */ - -/* additional socket ioctl params for wl card - * see sys/sockio.h for numbers. The 2nd params here - * must be greater than any values in sockio.h - */ - -#define SIOCGWLCNWID _IOWR('i', 60, struct ifreq) /* get wlan current nwid */ -#define SIOCSWLCNWID _IOWR('i', 61, struct ifreq) /* set wlan current nwid */ -#define SIOCGWLPSA _IOWR('i', 62, struct ifreq) /* get wlan PSA (all) */ -#define SIOCSWLPSA _IOWR('i', 63, struct ifreq) /* set wlan PSA (all) */ -#define SIOCDWLCACHE _IOW('i', 64, struct ifreq) /* clear SNR cache */ -#define SIOCSWLTHR _IOW('i', 65, struct ifreq) /* set new quality threshold */ -#define SIOCGWLEEPROM _IOWR('i', 66, struct ifreq) /* get modem EEPROM */ -#define SIOCGWLCACHE _IOWR('i', 67, struct ifreq) /* get SNR cache */ -#define SIOCGWLCITEM _IOWR('i', 68, struct ifreq) /* get cache element count */ - -/* PSA address definitions */ -#define WLPSA_ID 0x0 /* ID byte (0 for ISA, 0x14 for MCA) */ -#define WLPSA_IO1 0x1 /* I/O address 1 */ -#define WLPSA_IO2 0x2 /* I/O address 2 */ -#define WLPSA_IO3 0x3 /* I/O address 3 */ -#define WLPSA_BR1 0x4 /* Bootrom address 1 */ -#define WLPSA_BR2 0x5 /* Bootrom address 2 */ -#define WLPSA_BR3 0x6 /* Bootrom address 3 */ -#define WLPSA_HWCONF 0x7 /* HW config bits */ -#define WLPSA_IRQNO 0x8 /* IRQ value */ -#define WLPSA_UNIMAC 0x10 /* Universal MAC address */ -#define WLPSA_LOCALMAC 0x16 /* Locally configured MAC address */ -#define WLPSA_MACSEL 0x1c /* MAC selector */ -#define WLPSA_COMPATNO 0x1d /* compatibility number */ -#define WLPSA_THRESH 0x1e /* RF modem threshold preset */ -#define WLPSA_FEATSEL 0x1f /* feature select */ -#define WLPSA_SUBBAND 0x20 /* subband selector */ -#define WLPSA_QUALTHRESH 0x21 /* RF modem quality threshold preset */ -#define WLPSA_HWVERSION 0x22 /* hardware version indicator */ -#define WLPSA_NWID 0x23 /* network ID */ -#define WLPSA_NWIDENABLE 0x24 /* network ID enable */ -#define WLPSA_SECURITY 0x25 /* datalink security enable */ -#define WLPSA_DESKEY 0x26 /* datalink security DES key */ -#define WLPSA_DBWIDTH 0x2f /* databus width select */ -#define WLPSA_CALLCODE 0x30 /* call code (japan only) */ -#define WLPSA_CONFIGURED 0x3c /* configuration status */ -#define WLPSA_CRCLOW 0x3d /* CRC-16 (lowbyte) */ -#define WLPSA_CRCHIGH 0x3e /* (highbyte) */ -#define WLPSA_CRCOK 0x3f /* CRC OK flag */ - -#define WLPSA_COMPATNO_WL24B 0x04 /* 2.4 Gz WaveMODEM ISA rev-B */ - -/* - * signal strength cache - * - * driver (wlp only at the moment) keeps cache of last - * IP (only) packets to arrive including signal strength info. - * daemons may read this with kvm. See if_wlp.c for globals - * that may be accessed through kvm. - * - * Each entry in the w_sigcache has a unique macsrc and age. - * Each entry is identified by its macsrc field. - * Age of the packet is identified by its age field. - */ - -#define MAXCACHEITEMS 10 -#ifndef INT_MAX -#define INT_MAX 2147483647 -#endif -#define MAX_AGE (INT_MAX - MAXCACHEITEMS) - -/* signal is 7 bits, 0..63, although it doesn't seem to get to 63. - * silence is 7 bits, 0..63 - * quality is 4 bits, 0..15 - */ -struct w_sigcache { - char macsrc[6]; /* unique MAC address for entry */ - int ipsrc; /* ip address associated with packet */ - int signal; /* signal strength of the packet */ - int silence; /* silence of the packet */ - int quality; /* quality of the packet */ - int snr; /* packet has unique age between 1 to MAX_AGE - 1 */ -}; - -#endif /* _CHIPS_WAVELAN_H */ From owner-dev-commits-src-all@freebsd.org Sat Jan 16 23:30:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40A1E4EF544; Sat, 16 Jan 2021 23:30: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 4DJDmV1KNQz3HKq; Sat, 16 Jan 2021 23:30: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 1A49617993; Sat, 16 Jan 2021 23:30: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 10GNU1dl094004; Sat, 16 Jan 2021 23:30:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GNU15Y094001; Sat, 16 Jan 2021 23:30:01 GMT (envelope-from git) Date: Sat, 16 Jan 2021 23:30:01 GMT Message-Id: <202101162330.10GNU15Y094001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: ef698fabe428 - main - loader.efi: handle multiple gop instances MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef698fabe42827bad43bf046143ef26e47d57514 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 23:30:02 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=ef698fabe42827bad43bf046143ef26e47d57514 commit ef698fabe42827bad43bf046143ef26e47d57514 Author: Toomas Soome AuthorDate: 2021-01-16 17:51:23 +0000 Commit: Toomas Soome CommitDate: 2021-01-16 23:29:35 +0000 loader.efi: handle multiple gop instances Some systems may provide multiple GOP instances and not all are bound to hardware. The current loader is picking up the first GOP, which may not be usable. Instead we load the GOP handle array, and test every handle to have registered ConOut protocol. If ConOut is present, we can use this GOP handle to open GOP protocol. --- stand/efi/loader/framebuffer.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index a2bd054e16dc..1650f7da8760 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "framebuffer.h" +EFI_GUID conout_guid = EFI_CONSOLE_OUT_DEVICE_GUID; EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; static EFI_GUID pciio_guid = EFI_PCI_IO_PROTOCOL_GUID; static EFI_GUID uga_guid = EFI_UGA_DRAW_PROTOCOL_GUID; @@ -466,6 +467,8 @@ efifb_from_uga(struct efi_fb *efifb, EFI_UGA_DRAW_PROTOCOL *uga) int efi_find_framebuffer(teken_gfx_t *gfx_state) { + EFI_HANDLE h, *hlist; + UINTN nhandles, i, hsize; struct efi_fb efifb; EFI_GRAPHICS_OUTPUT *gop; EFI_UGA_DRAW_PROTOCOL *uga; @@ -474,7 +477,39 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) gfx_state->tg_fb_type = FB_TEXT; - status = BS->LocateProtocol(&gop_guid, NULL, (VOID **)&gop); + hsize = 0; + status = BS->LocateHandle(ByProtocol, &gop_guid, NULL, &hsize, hlist); + if (status == EFI_BUFFER_TOO_SMALL) { + hlist = malloc(hsize); + if (hlist == NULL) + return (ENOMEM); + status = BS->LocateHandle(ByProtocol, &gop_guid, NULL, &hsize, + hlist); + if (EFI_ERROR(status)) + free(hlist); + } + if (EFI_ERROR(status)) + return (efi_status_to_errno(status)); + + nhandles = hsize / sizeof(*hlist); + + /* + * Search for ConOut protocol, if not found, use first handle. + */ + h = *hlist; + for (i = 0; i < nhandles; i++) { + void *dummy = NULL; + + status = OpenProtocolByHandle(hlist[i], &conout_guid, &dummy); + if (status == EFI_SUCCESS) { + h = hlist[i]; + break; + } + } + + status = OpenProtocolByHandle(h, &gop_guid, (void **)&gop); + free(hlist); + if (status == EFI_SUCCESS) { gfx_state->tg_fb_type = FB_GOP; gfx_state->tg_private = gop; From owner-dev-commits-src-all@freebsd.org Sat Jan 16 23:43:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 229924EFED3; Sat, 16 Jan 2021 23:43: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 4DJF470VRRz3Jbl; Sat, 16 Jan 2021 23:43: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 03CE51786F; Sat, 16 Jan 2021 23:43: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 10GNhYbo018259; Sat, 16 Jan 2021 23:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GNhYPm018258; Sat, 16 Jan 2021 23:43:34 GMT (envelope-from git) Date: Sat, 16 Jan 2021 23:43:34 GMT Message-Id: <202101162343.10GNhYPm018258@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: 0ec6c03c7682 - main - mpt.4: Warn about unexpected behaviour on older controllers 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: 0ec6c03c76821edacba0615d3883293ad5f37dfc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 23:43:35 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0ec6c03c76821edacba0615d3883293ad5f37dfc commit 0ec6c03c76821edacba0615d3883293ad5f37dfc Author: Sebastian Oswald AuthorDate: 2021-01-16 23:27:43 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-01-16 23:41:59 +0000 mpt.4: Warn about unexpected behaviour on older controllers Older controllers have errata which causes the disk controller to wrap data to other LBAs, causing data to be overwritten. [1] While here, fix a small typo. 1: https://www.broadcom.com/support/knowledgebase/1211161496563/3-terabyte-3tb-capacity-drives-on-lsi-megaraid-and-3ware-control PR: 220343 Submitted by: Sebastian Oswald Reviewed by: 0mp Event: January 2021 Bugathon Differential Revision: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC9574D00B1; Sat, 16 Jan 2021 23:45: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 4DJF6T4TNLz3KRZ; Sat, 16 Jan 2021 23:45: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 8C80E179E3; Sat, 16 Jan 2021 23:45: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 10GNjbr4018693; Sat, 16 Jan 2021 23:45:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10GNjbUb018692; Sat, 16 Jan 2021 23:45:37 GMT (envelope-from git) Date: Sat, 16 Jan 2021 23:45:37 GMT Message-Id: <202101162345.10GNjbUb018692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: d28210b2c2aa - main - Remove remnants of classful behavior in route(8). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d28210b2c2aaf3200907ed30d296b0d4856dd03c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 23:45:37 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=d28210b2c2aaf3200907ed30d296b0d4856dd03c commit d28210b2c2aaf3200907ed30d296b0d4856dd03c Author: Alexander V. Chernikov AuthorDate: 2021-01-16 23:06:32 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-16 23:45:30 +0000 Remove remnants of classful behavior in route(8). Curently route(8) treats some addresses as network addresses: RTA_DST: inet 10.0.0.0; RTA_NETMASK: inet 255.0.0.0; RTA_IFP: link ; RTM_GET: Report Metrics: len 240, pid: 0, seq 1, errno 0, flags: locks: inits: sockaddrs: 10.0.0.0 255.0.0.0 link#0 Note added `RTA_NETMASK` in the request. Host address from the same network is ok: route -nv get 10.0.0.1 RTA_DST: inet 10.0.0.1 RTA_IFP: link RTM_GET: Report Metrics: len 224, pid: 0, seq 1, errno 0, flags: ... route to: 10.0.0.1 destination: 10.0.0.0 mask: 255.255.255.0 This change eliminates network auto-guessing part AND reading network from /etc/networks. Reviewed By: rgrimes Differential Revision: https://reviews.freebsd.org/D24401 --- sbin/route/route.c | 69 +++++++++++------------------------------------------- 1 file changed, 14 insertions(+), 55 deletions(-) diff --git a/sbin/route/route.c b/sbin/route/route.c index 9c9e4b304848..51a0c68746a6 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -120,8 +120,7 @@ static int flushroutes_fib(int); static int getaddr(int, char *, struct hostent **, int); static int keyword(const char *); #ifdef INET -static void inet_makenetandmask(u_long, struct sockaddr_in *, - struct sockaddr_in *, u_long); +static void inet_makemask(struct sockaddr_in *, u_long); #endif #ifdef INET6 static int inet6_makenetandmask(struct sockaddr_in6 *, const char *); @@ -1113,40 +1112,15 @@ newroute_fib(int fib, char *cmd, int flags) #ifdef INET static void -inet_makenetandmask(u_long net, struct sockaddr_in *sin, - struct sockaddr_in *sin_mask, u_long bits) +inet_makemask(struct sockaddr_in *sin_mask, u_long bits) { u_long mask = 0; rtm_addrs |= RTA_NETMASK; - /* - * MSB of net should be meaningful. 0/0 is exception. - */ - if (net > 0) - while ((net & 0xff000000) == 0) - net <<= 8; - - /* - * If no /xx was specified we must calculate the - * CIDR address. - */ - if ((bits == 0) && (net != 0)) { - u_long i, j; - - for(i = 0, j = 0xff; i < 4; i++) { - if (net & j) { - break; - } - j <<= 8; - } - /* i holds the first non zero bit */ - bits = 32 - (i*8); - } if (bits != 0) mask = 0xffffffff << (32 - bits); - sin->sin_addr.s_addr = htonl(net); sin_mask->sin_addr.s_addr = htonl(mask); sin_mask->sin_len = sizeof(struct sockaddr_in); sin_mask->sin_family = AF_INET; @@ -1186,8 +1160,6 @@ getaddr(int idx, char *str, struct hostent **hpp, int nrflags) #if defined(INET) struct sockaddr_in *sin; struct hostent *hp; - struct netent *np; - u_long val; char *q; #elif defined(INET6) char *q; @@ -1314,34 +1286,21 @@ getaddr(int idx, char *str, struct hostent **hpp, int nrflags) q = strchr(str,'/'); if (q != NULL && idx == RTAX_DST) { + /* A.B.C.D/NUM */ *q = '\0'; - if ((val = inet_network(str)) != INADDR_NONE) { - inet_makenetandmask(val, sin, - (struct sockaddr_in *)&so[RTAX_NETMASK], - strtoul(q+1, 0, 0)); - return (0); - } - *q = '/'; - } - if ((idx != RTAX_DST || (nrflags & F_FORCENET) == 0) && - inet_aton(str, &sin->sin_addr)) { - val = sin->sin_addr.s_addr; - if (idx != RTAX_DST || nrflags & F_FORCEHOST || - inet_lnaof(sin->sin_addr) != INADDR_ANY) - return (1); - else { - val = ntohl(val); - goto netdone; - } - } - if (idx == RTAX_DST && (nrflags & F_FORCEHOST) == 0 && - ((val = inet_network(str)) != INADDR_NONE || - ((np = getnetbyname(str)) != NULL && (val = np->n_net) != 0))) { -netdone: - inet_makenetandmask(val, sin, - (struct sockaddr_in *)&so[RTAX_NETMASK], 0); + if (inet_aton(str, &sin->sin_addr) == 0) + errx(EX_NOHOST, "bad address: %s", str); + + int masklen = strtol(q + 1, NULL, 10); + if (masklen < 0 || masklen > 32) + errx(EX_NOHOST, "bad mask length: %s", q + 1); + + inet_makemask((struct sockaddr_in *)&so[RTAX_NETMASK],masklen); return (0); } + if (inet_aton(str, &sin->sin_addr) != 0) + return (1); + hp = gethostbyname(str); if (hp != NULL) { *hpp = hp; From owner-dev-commits-src-all@freebsd.org Sun Jan 17 00:03:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACB8C4D0E40; Sun, 17 Jan 2021 00:03:20 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJFVv5c96z3LZ5; Sun, 17 Jan 2021 00:03:19 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: by mail-lj1-f172.google.com with SMTP id u11so14385971ljo.13; Sat, 16 Jan 2021 16:03:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Mzrl53sQR//a/Z/TFYsnbqAHky2bbDxXMEt0GrgCyM=; b=j55MzstOoKeyQ0JYt6SzH9AysBERW6C8E68b5YpBd+3g/4ks3VZ+b14TYrmbtghbVf CI5QIwLEMm8EkPRckzHKplXRv3NTTNxwxtBEP6y33ht+nVCKVZ8uoFMGn94LjqiTz+wG LUFUfvqTyg90acmNJVNUY70v5lXWCtL5HiCvow8xdETrPLrlkKaV8buKQwmMX5YXHLl0 XDFcdnHRIsbocaLpaz4FCaTGOw8Iuhedckr+B7YEu8g58uiSEsUEGcRXvRFrpVQ0y7nl iXKbZwmBJqsLEymUHL6QZG86ZCtIs5QgX8xBG+YvWIOP/A9TJZkAbVfLiTAqDOmQ1ZpJ 7+eQ== X-Gm-Message-State: AOAM530WqUV+ueTWyFFiDuJZp+YUgIw+Vs9KZ6HciWX4gsEwIDgHGoNV 3GENeFRk92yMmGy1x9Gom94Re3SaRCZCRgMySKx05N47jj946A== X-Google-Smtp-Source: ABdhPJzLzEC6vq6pVeBMSgUr+snZ88vkzDB6kho86ab+1mw4JIvfzPSoqvxTYPUNPWvkk8iW7e0XliSytoWyianRHgE= X-Received: by 2002:a05:651c:114:: with SMTP id a20mr7810288ljb.392.1610841797875; Sat, 16 Jan 2021 16:03:17 -0800 (PST) MIME-Version: 1.0 References: <202101161448.10GEmuI4095908@mail.karels.net> <202101161510.10GF9xON022324@slippy.cwsent.com> In-Reply-To: <202101161510.10GF9xON022324@slippy.cwsent.com> From: Mariusz Zaborski Date: Sun, 17 Jan 2021 01:03:25 +0100 Message-ID: Subject: Re: git: aefe30c54371 - main - cat: capsicumize it To: Cy Schubert Cc: mike@karels.net, Mateusz Guzik , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston , Alex Richardson Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DJFVv5c96z3LZ5 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of oshogbovx@gmail.com designates 209.85.208.172 as permitted sender) smtp.mailfrom=oshogbovx@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCPT_COUNT_SEVEN(0.00)[8]; FORGED_SENDER(0.30)[oshogbo@freebsd.org,oshogbovx@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.208.172:from]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_NEQ_ENVFROM(0.00)[oshogbo@freebsd.org,oshogbovx@gmail.com]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.208.172:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.172:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.172:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; FREEMAIL_CC(0.00)[karels.net,gmail.com,freebsd.org] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 00:03:20 -0000 Thank you for raising your concerns. We discussed that, and for now, we will disable sandboxing in the cat. We will try to measure where the bottlenecks are and try to address them. We should try to sandbox even as simple tools like cat or tail, but not for any cost. If we have a high cost, we may explore other ways of doing it. On Sat, 16 Jan 2021 at 16:10, Cy Schubert wrote: > > In message <202101161448.10GEmuI4095908@mail.karels.net>, Mike Karels > writes: > > Mateusz wrote: > > > I have to strongly disagree with this change. > > > > > truss -f cat /etc/motd immediately reveals most peculiar overhead > > > which comes with it. > > > > > Some examples: > > > - pdfork is called 3 times and fork 1 time, spawning 4 processes in total > > > - the file is opened twice: > > > 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) = 5 (0x5) > > > 5548: cap_rights_limit(5,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) = 0 (0x0) > > > 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) = 7 (0x7) > > > 5548: cap_rights_limit(7,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) = 0 (0x0) > > > - there is an enormous number of sendto/recvfrom instead of everything > > > happening in just one go > > > > > Key points: > > > - the functionality provided by casper definitely induces way more > > > overhead than it should. > > > - regardless of the above, I find patching tools like tail and cat in > > > this manner to be highly questionable. Ultimately whatever security > > > may or may not have been gained it always have to be gauged against > > > actual impact and it does not look it is worth it in this case. > > > > > Even if someone was to put cat in capability mode, for something as > > > trivial a opening one file, cat could just do it without all the other > > > overhead and then enter the sandbox. > > > > > That said, I think this change (and possibly similar changes to other > > > tooling) should be reverted. Regardless of what happens here, casper > > > needs a lot of work before it is deemed usable. > > > > > My $0,03. > > > > I also question this change. Using capsicum makes sense for something > > like tcpdump, which usually runs as root, uses privileged facilities, > > tcpdump can drop its privileges. Various Linux distros and vendors do this. > I have a patch in my tree that will do this. > > > and interprets external data that could potentially subvert it in the > > worst case. It also has a fairly high startup cost that can be amortized > > over its runtime. Cat is nothing like this, so I wonder what the motivation > > was for the change. It's not obvious to me that there is any significant > > value in capsicumizing, and there are obviously significant costs. > > Agreed. > > > > > Mike > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > > > > > > On 1/15/21, Mariusz Zaborski wrote: > > > > The branch main has been updated by oshogbo: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=aefe30c5437159a5399bdbc1974d6fbf4 > > 0f2ba0f > > > > > > > > commit aefe30c5437159a5399bdbc1974d6fbf40f2ba0f > > > > Author: Mariusz Zaborski > > > > AuthorDate: 2021-01-15 20:22:29 +0000 > > > > Commit: Mariusz Zaborski > > > > CommitDate: 2021-01-15 20:23:42 +0000 > > > > > > > > cat: capsicumize it > > > > > > > > Reviewed by: markj, arichardson > > > > Differential Revision: https://reviews.freebsd.org/D28083 > > > > > > > > From owner-dev-commits-src-all@freebsd.org Sun Jan 17 00:09:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40DD54D13C9 for ; Sun, 17 Jan 2021 00:09:44 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJFfJ0mmXz3LgQ for ; Sun, 17 Jan 2021 00:09:43 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x82a.google.com with SMTP id d15so3441278qtw.12 for ; Sat, 16 Jan 2021 16:09:43 -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=BV0+Uxs51owEmEQxj7cpUjsZr8laEr4xOlswAgvqoKE=; b=gbKwYiFE95w0/u69AJdk1ZjRs0EDgDSFDMcmy6XJvxJyJ1w9k71IgKW23/Pb0VmWYv GcUgIcu6FXYA4lyHfEKbGsZaNFMPI43ZxiU01DDrVDaP0Pr5jpxeUoCpDi+WZ5Sel92R QO/w3Z0nftv24KMoZ1VnH3AqB2mjVdJSW18KECcG6ToaGGJ0uT6wOvyJxz6YZm0hfARq 8yiSkU7BVSQF/92zgTxulMILbBJOGcUdpOyVyR+P8YJTo2sP4doOyzDOcqEyo6CAuipv Wj9KXDTnws4bn8phJv8IhcxVeCSMah6K6oK1mV+MGmWMiT00zrIZkbPQXFzBiAAtVLF5 6esg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BV0+Uxs51owEmEQxj7cpUjsZr8laEr4xOlswAgvqoKE=; b=s5bvBrluyTwPP32aKOojT38ze4LK1mlO6WirM2vNMB0Ht4K8UoC5Qe57PnPZG2RAMw Oa4TVT2Z64YtwxWa90Ri2C4zp1mpwQP2USV6Cbzw/46d3JQXNhglWCb3QxewN53BuF1W kt7md8kKeuT53hVplAp2xI+FYw57yLqoTwvVzhZEybAlGL78JnVV6Hv13DElY3Z3gPYf Z+kldMp3ntl9Y6tTFkoL/ZJAdTJAATPLLOAGCq/oANp4uzD6eXy4yf3XZrHbCkhWZI9Q RvjFTqEUvoKtD/WHnzcr9MVh/GL6+tHJNzZf7gD3b7bcenWxCUmhRUSU5T++hDShbF9Y f2iw== X-Gm-Message-State: AOAM531nuskUB98mHoXPq9pklVRcxdpvoo2HZi82AI0aQet3oY7LdKez 9SLGzB1r4RAj/FSd5lsqYBvsXA== X-Google-Smtp-Source: ABdhPJyn3NOoxVnyWfctyCbh33riY/31SL7NCYD0//Hfq60jIf+r7ZRJa+WjCWJjGJyUWdMtqSqk6g== X-Received: by 2002:ac8:c8c:: with SMTP id n12mr2588367qti.339.1610842182969; Sat, 16 Jan 2021 16:09:42 -0800 (PST) Received: from mutt-hbsd (pool-100-16-222-53.bltmmd.fios.verizon.net. [100.16.222.53]) by smtp.gmail.com with ESMTPSA id u10sm3378289qtb.24.2021.01.16.16.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jan 2021 16:09:42 -0800 (PST) Date: Sat, 16 Jan 2021 19:09:41 -0500 From: Shawn Webb To: Mariusz Zaborski Cc: Cy Schubert , mike@karels.net, Mateusz Guzik , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mark Johnston , Alex Richardson Subject: Re: git: aefe30c54371 - main - cat: capsicumize it Message-ID: <20210117000941.4nxmpmamdd3out7i@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202101161448.10GEmuI4095908@mail.karels.net> <202101161510.10GF9xON022324@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aopefwxa3yjam5zg" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4DJFfJ0mmXz3LgQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 00:09:44 -0000 --aopefwxa3yjam5zg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Also to note: Something about this change causes a kernel panic under heavy load (poudriere running 20 jobs with poudriere configured to use tmpfs for the entire job). Screenshot of kernel panic: https://photos.app.goo.gl/dXBpW7sbn1iWQaJj9 On Sun, Jan 17, 2021 at 01:03:25AM +0100, Mariusz Zaborski wrote: > Thank you for raising your concerns. We discussed that, and for now, > we will disable sandboxing in the cat. We will try to measure where > the bottlenecks are and try to address them. >=20 > We should try to sandbox even as simple tools like cat or tail, but not f= or any > cost. If we have a high cost, we may explore other ways of doing it. >=20 > On Sat, 16 Jan 2021 at 16:10, Cy Schubert wro= te: > > > > In message <202101161448.10GEmuI4095908@mail.karels.net>, Mike Karels > > writes: > > > Mateusz wrote: > > > > I have to strongly disagree with this change. > > > > > > > truss -f cat /etc/motd immediately reveals most peculiar overhead > > > > which comes with it. > > > > > > > Some examples: > > > > - pdfork is called 3 times and fork 1 time, spawning 4 processes in= total > > > > - the file is opened twice: > > > > 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) =3D 5 (0x5) > > > > 5548: cap_rights_limit(5,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) =3D 0 (= 0x0) > > > > 5548: openat(AT_FDCWD,"/etc/motd",O_RDONLY,00) =3D 7 (0x7) > > > > 5548: cap_rights_limit(7,{ CAP_READ,CAP_FCNTL,CAP_FSTAT }) =3D 0 (= 0x0) > > > > - there is an enormous number of sendto/recvfrom instead of everyth= ing > > > > happening in just one go > > > > > > > Key points: > > > > - the functionality provided by casper definitely induces way more > > > > overhead than it should. > > > > - regardless of the above, I find patching tools like tail and cat = in > > > > this manner to be highly questionable. Ultimately whatever security > > > > may or may not have been gained it always have to be gauged against > > > > actual impact and it does not look it is worth it in this case. > > > > > > > Even if someone was to put cat in capability mode, for something as > > > > trivial a opening one file, cat could just do it without all the ot= her > > > > overhead and then enter the sandbox. > > > > > > > That said, I think this change (and possibly similar changes to oth= er > > > > tooling) should be reverted. Regardless of what happens here, casper > > > > needs a lot of work before it is deemed usable. > > > > > > > My $0,03. > > > > > > I also question this change. Using capsicum makes sense for something > > > like tcpdump, which usually runs as root, uses privileged facilities, > > > > tcpdump can drop its privileges. Various Linux distros and vendors do t= his. > > I have a patch in my tree that will do this. > > > > > and interprets external data that could potentially subvert it in the > > > worst case. It also has a fairly high startup cost that can be amort= ized > > > over its runtime. Cat is nothing like this, so I wonder what the mot= ivation > > > was for the change. It's not obvious to me that there is any signifi= cant > > > value in capsicumizing, and there are obviously significant costs. > > > > Agreed. > > > > > > > > Mike > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: https://FreeBSD.org > > NTP: Web: https://nwtime.org > > > > The need of the many outweighs the greed of the few. > > > > > > > > > > > On 1/15/21, Mariusz Zaborski wrote: > > > > > The branch main has been updated by oshogbo: > > > > > > > > > > URL: > > > > > https://cgit.FreeBSD.org/src/commit/?id=3Daefe30c5437159a5399bdbc= 1974d6fbf4 > > > 0f2ba0f > > > > > > > > > > commit aefe30c5437159a5399bdbc1974d6fbf40f2ba0f > > > > > Author: Mariusz Zaborski > > > > > AuthorDate: 2021-01-15 20:22:29 +0000 > > > > > Commit: Mariusz Zaborski > > > > > CommitDate: 2021-01-15 20:23:42 +0000 > > > > > > > > > > cat: capsicumize it > > > > > > > > > > Reviewed by: markj, arichardson > > > > > Differential Revision: https://reviews.freebsd.org/D28083 > > > > > > > > > > > > > > _______________________________________________ > dev-commits-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > To unsubscribe, send any mail to "dev-commits-src-all-unsubscribe@freebsd= =2Eorg" --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --aopefwxa3yjam5zg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmADgEIACgkQ/y5nonf4 4forAg//bIpolvsqbbVoQCUbyqvXTh/bGScbu6K3fcDOWNoGjwefBvZmBFYpSjiX 98LWV+zjSv+fnKVN7qvxYiYBmTO4XwJssCBQqu7TB4bKdsXSYyqhR3pEViK40sLF IYXWfmHZ8ZbBctW87r+gOWDIrI8b5ZfBYWbFh7b0MVOQhiTsZePbdr7rgAjSaOgv 4tPhKtsf3yXVNuvRaaBYOoWxooOahGQSXM+9M3ibFDq/Yhe62rVTAINgS6QrByKu EYflHXpZEV4W41KhOXI8S8to2brD31Cp80MxhInft54Otv2aEh82nLnhaG1gF8l/ CKgMBl7lUAxLWknW7of82AUAI+4NxzAWyk0QHGDejd8BhLxnPwFeaTU2xrRrQsLT 19+IyjP/A84WiDj29oDfxw0Q5VO4HYzHCbvJl1gIiWeTbosdfWDdbRwWLQSH/2uu svZW9vXeHZwvuK/amCPEGh/gsgjK8vF0PcHguRFQPItjRj82Pp4TmDAterP2UDZM dmwsqcI0pGetryeUgMpHXv8xSgPFRnFy/WkxNEmIPGuH42VIbrcOv3FMJRNCPPYB OwN8JAMDXU3RCNVgGZrllKd8hwB+0/4MLjaQX3BoSaowEZPa61HdnWv2cSMc3BXp hB7npq+vj6rchszAiYVq7apbtusj09tRx6G9pF1Rw5hzCQxLWYs= =0roA -----END PGP SIGNATURE----- --aopefwxa3yjam5zg-- From owner-dev-commits-src-all@freebsd.org Sun Jan 17 00:21:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5E644D191A; Sun, 17 Jan 2021 00:21: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 4DJFvz5KYyz3MGH; Sun, 17 Jan 2021 00:21: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 A9EBD17EFF; Sun, 17 Jan 2021 00:21: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 10H0LZoU066671; Sun, 17 Jan 2021 00:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10H0LZEk066670; Sun, 17 Jan 2021 00:21:35 GMT (envelope-from git) Date: Sun, 17 Jan 2021 00:21:35 GMT Message-Id: <202101170021.10H0LZEk066670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: b7ab6832cd98 - main - cat: disable building it with Casper MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7ab6832cd988aff7f4e468e507c314dd7641638 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 00:21:35 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=b7ab6832cd988aff7f4e468e507c314dd7641638 commit b7ab6832cd988aff7f4e468e507c314dd7641638 Author: Mariusz Zaborski AuthorDate: 2021-01-17 00:04:28 +0000 Commit: Mariusz Zaborski CommitDate: 2021-01-17 00:21:46 +0000 cat: disable building it with Casper We want to measure what are the actual cost of sandboxing cat(1). Requested by: mjg, cy, Mike Karels Discussed with: rwatson, markj --- bin/cat/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/cat/Makefile b/bin/cat/Makefile index abfdcbcfbb2e..cce69d8aad9e 100644 --- a/bin/cat/Makefile +++ b/bin/cat/Makefile @@ -15,11 +15,12 @@ CFLAGS+=-DBOOTSTRAP_CAT HAS_TESTS= SUBDIR.${MK_TESTS}+= tests -.if ${MK_CASPER} != "no" && !defined(RESCUE) && !defined(BOOTSTRAPPING) -LIBADD+= casper -LIBADD+= cap_fileargs -LIBADD+= cap_net -CFLAGS+=-DWITH_CASPER -.endif +# Temporary disable building cat with Casper. +#.if ${MK_CASPER} != "no" && !defined(RESCUE) && !defined(BOOTSTRAPPING) +#LIBADD+= casper +#LIBADD+= cap_fileargs +#LIBADD+= cap_net +#CFLAGS+=-DWITH_CASPER +#.endif .include From owner-dev-commits-src-all@freebsd.org Sun Jan 17 00:57:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 326CE4D2729; Sun, 17 Jan 2021 00:57:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJGjx5NKKz3PNy; Sun, 17 Jan 2021 00:57:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id 0wO9leFqvbYg30wOAlHpKv; Sat, 16 Jan 2021 17:57:55 -0700 X-Authority-Analysis: v=2.4 cv=Q4RsX66a c=1 sm=1 tr=0 ts=60038b93 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=EmqxpYm9HcoA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=VNurUuPmW1-XxwhfVT0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 98CDD801; Sat, 16 Jan 2021 16:57:52 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 10H0vqp6056258; Sat, 16 Jan 2021 16:57:52 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202101170057.10H0vqp6056258@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Mariusz Zaborski cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b7ab6832cd98 - main - cat: disable building it with Casper In-reply-to: <202101170021.10H0LZEk066670@gitrepo.freebsd.org> References: <202101170021.10H0LZEk066670@gitrepo.freebsd.org> Comments: In-reply-to Mariusz Zaborski message dated "Sun, 17 Jan 2021 00:21:35 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 16 Jan 2021 16:57:52 -0800 X-CMAE-Envelope: MS4xfJfgB0JJaKFBYWvbyKeYpfBqOI4g79BMDc6Fa2PoLakcUfhd/g8w15N1l3gKOALjJVrFvlAfVRFlxPtEfFWK9HG0LZT+HNO95Jaj9vbwQk0CQOwQwgnB L1F9qTHpv5I3g60KwtybmZd6STDXgr1FAii4P4AEhsjQq3PXTbgIQPlqa9Qu/tN45ZumGV4xpQV+vjLPNaWm+F1HfyoPcbJU61RCf032ucJL6lEarETQCzMV 4sKiRBwCrKYTpo+O5xFGxWX6RWjPWF2t8edChiJysisOLeWTiWInQ+HJiqax1NXpmGIdvMwe4ZMXlzoDTconDWY1PJHvK+YWXWcmTwLfE68= X-Rspamd-Queue-Id: 4DJGjx5NKKz3PNy X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 00:57:58 -0000 In message <202101170021.10H0LZEk066670@gitrepo.freebsd.org>, Mariusz Zaborski writes: > The branch main has been updated by oshogbo: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b7ab6832cd988aff7f4e468e507c314d > d7641638 > > commit b7ab6832cd988aff7f4e468e507c314dd7641638 > Author: Mariusz Zaborski > AuthorDate: 2021-01-17 00:04:28 +0000 > Commit: Mariusz Zaborski > CommitDate: 2021-01-17 00:21:46 +0000 > > cat: disable building it with Casper > > We want to measure what are the actual cost of sandboxing cat(1). > > Requested by: mjg, cy, Mike Karels > Discussed with: rwatson, markj > --- > bin/cat/Makefile | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/bin/cat/Makefile b/bin/cat/Makefile > index abfdcbcfbb2e..cce69d8aad9e 100644 > --- a/bin/cat/Makefile > +++ b/bin/cat/Makefile > @@ -15,11 +15,12 @@ CFLAGS+=-DBOOTSTRAP_CAT > HAS_TESTS= > SUBDIR.${MK_TESTS}+= tests > > -.if ${MK_CASPER} != "no" && !defined(RESCUE) && !defined(BOOTSTRAPPING) > -LIBADD+= casper > -LIBADD+= cap_fileargs > -LIBADD+= cap_net > -CFLAGS+=-DWITH_CASPER > -.endif > +# Temporary disable building cat with Casper. > +#.if ${MK_CASPER} != "no" && !defined(RESCUE) && !defined(BOOTSTRAPPING) > +#LIBADD+= casper > +#LIBADD+= cap_fileargs > +#LIBADD+= cap_net > +#CFLAGS+=-DWITH_CASPER > +#.endif > > .include > Hi, Almost there. ld: error: undefined symbol: cap_init >>> referenced by cat.c:154 (/opt/src/git-src/bin/cat/cat.c:154) >>> cat.o:(main) ld: error: undefined symbol: fileargs_cinit >>> referenced by cat.c:158 (/opt/src/git-src/bin/cat/cat.c:158) >>> cat.o:(main) ld: error: undefined symbol: cap_service_open >>> referenced by cat.c:131 (/opt/src/git-src/bin/cat/cat.c:131) >>> cat.o:(main) ld: error: undefined symbol: cap_net_limit_init >>> referenced by cat.c:135 (/opt/src/git-src/bin/cat/cat.c:135) >>> cat.o:(main) ld: error: undefined symbol: cap_net_limit_name2addr_family >>> referenced by cat.c:141 (/opt/src/git-src/bin/cat/cat.c:141) >>> cat.o:(main) --- all_subdir_kerberos5 --- --- libheimntlm.so.11.debug --- objcopy --only-keep-debug libheimntlm.so.11.full libheimntlm.so.11.debug --- libheimntlm.so.11 --- objcopy --strip-debug --add-gnu-debuglink=libheimntlm.so.11.debug libheimntlm.so.11.full libheimntlm.so.11 --- all_subdir_lib --- --- init_test --- (cd /opt/src/git-src/lib/csu/tests/dynamic && DEPENDFILE=.depend.init_test NO_SUBDIR=1 make -f /opt/src/git-src/lib/csu/tests/dynamic/Makefile _RECURSING_PROGS=t PROG=init_test ) --- all_subdir_bin --- ld: error: undefined symbol: cap_net_limit >>> referenced by cat.c:143 (/opt/src/git-src/bin/cat/cat.c:143) >>> cat.o:(main) ld: error: undefined symbol: cap_close >>> referenced by cat.c:168 (/opt/src/git-src/bin/cat/cat.c:168) >>> cat.o:(main) ld: error: undefined symbol: fileargs_open >>> referenced by cat.c:263 (/opt/src/git-src/bin/cat/cat.c:263) >>> cat.o:(scanfiles) ld: error: undefined symbol: fileargs_realpath >>> referenced by cat.c:441 (/opt/src/git-src/bin/cat/cat.c:441) >>> cat.o:(scanfiles) ld: error: undefined symbol: cap_getaddrinfo >>> referenced by cat.c:444 (/opt/src/git-src/bin/cat/cat.c:444) >>> cat.o:(scanfiles) ld: error: undefined symbol: cap_connect >>> referenced by cat.c:468 (/opt/src/git-src/bin/cat/cat.c:468) >>> cat.o:(scanfiles) cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [cat.full] Error code 1 make[4]: stopped in /opt/src/git-src/bin/cat make[1]: stopped in /opt/src/git-src make: stopped in /opt/src/git-src exiting RC=2: building amd64 -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-all@freebsd.org Sun Jan 17 01:07:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABD164D2BAA; Sun, 17 Jan 2021 01:07:40 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJGx74DXhz3Pjg; Sun, 17 Jan 2021 01:07:39 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id o17so18916676lfg.4; Sat, 16 Jan 2021 17:07:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CKTCMqE66cmRJiK3mMtFVCIe1qVLvnu+0ZfUQDd2vGU=; b=uYrYCRUlVjTpIzscJ3Etam1C1syXgHhEr3dcYF7PJDsgX7g8N8r01XhIq7zF9LKNIW HSGaSbYntYKWs3+LIIYX8Na/Kv53pd+CTdSvixbH81CN7bDa4cF0W9KgRz9qi6REeMFL 9ZjRQVYexsZpH6hPcwNckzb17KMXbTEYHLd+F0EH3iag7amdVRCi0+t9QuomR047YDcU uCccE9wbs4GXjnRJ4FPPWtyxsOMrGrMmDz6FqQotZj5BCC2Xmj05IIZvw00uOii9/TQB qC50VEuz32aTXH8hj30uCKvkVk5qktWJuS6cmSTdkV4AL+nvZEVfoG0r8yOMafisN+5O 0iFQ== X-Gm-Message-State: AOAM533+yUIp60e5+qz7Qg16fz07d649wRxZ/E4AmCNJEN+m/xKTu4mh wMsAtJmHAtJcrczVQSOvRP9UIaSs8a4tBaYa5jnfBR2oaspn1ws3 X-Google-Smtp-Source: ABdhPJxzhYrRd4Lf8RqOs4X2vznub1k7zMrnXLnUx0BHGTzaMjoF5Vg91BLfW4eb1E00RnNzjmHek6CP5ibCdWLatME= X-Received: by 2002:a05:6512:2e9:: with SMTP id m9mr8188219lfq.118.1610845657764; Sat, 16 Jan 2021 17:07:37 -0800 (PST) MIME-Version: 1.0 References: <202101170021.10H0LZEk066670@gitrepo.freebsd.org> <202101170057.10H0vqp6056258@slippy.cwsent.com> In-Reply-To: <202101170057.10H0vqp6056258@slippy.cwsent.com> From: Mariusz Zaborski Date: Sun, 17 Jan 2021 02:07:45 +0100 Message-ID: Subject: Re: git: b7ab6832cd98 - main - cat: disable building it with Casper To: Cy Schubert Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DJGx74DXhz3Pjg X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of oshogbovx@gmail.com designates 209.85.167.45 as permitted sender) smtp.mailfrom=oshogbovx@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; FROM_NEQ_ENVFROM(0.00)[oshogbo@freebsd.org,oshogbovx@gmail.com]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(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]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[209.85.167.45:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.45:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.45:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FORGED_SENDER(0.30)[oshogbo@freebsd.org,oshogbovx@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.45:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 01:07:40 -0000 Hello, Seems like your cat.o wasn't rebuild. Did you use NO_CLEAN flag? It seems to work on: https://github.com/freebsd/freebsd-src/runs/1715237892 and on my machine. Can you try doing: make buildenv cd bin/cat make clean make Thanks, Mariusz On Sun, 17 Jan 2021 at 01:58, Cy Schubert wrote: > > In message <202101170021.10H0LZEk066670@gitrepo.freebsd.org>, Mariusz > Zaborski > writes: > > The branch main has been updated by oshogbo: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=b7ab6832cd988aff7f4e468e507c314d > > d7641638 > > > > commit b7ab6832cd988aff7f4e468e507c314dd7641638 > > Author: Mariusz Zaborski > > AuthorDate: 2021-01-17 00:04:28 +0000 > > Commit: Mariusz Zaborski > > CommitDate: 2021-01-17 00:21:46 +0000 > > > > cat: disable building it with Casper > > > > We want to measure what are the actual cost of sandboxing cat(1). > > > > Requested by: mjg, cy, Mike Karels > > Discussed with: rwatson, markj > > --- > > bin/cat/Makefile | 13 +++++++------ > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/bin/cat/Makefile b/bin/cat/Makefile > > index abfdcbcfbb2e..cce69d8aad9e 100644 > > --- a/bin/cat/Makefile > > +++ b/bin/cat/Makefile > > @@ -15,11 +15,12 @@ CFLAGS+=-DBOOTSTRAP_CAT > > HAS_TESTS= > > SUBDIR.${MK_TESTS}+= tests > > > > -.if ${MK_CASPER} != "no" && !defined(RESCUE) && !defined(BOOTSTRAPPING) > > -LIBADD+= casper > > -LIBADD+= cap_fileargs > > -LIBADD+= cap_net > > -CFLAGS+=-DWITH_CASPER > > -.endif > > +# Temporary disable building cat with Casper. > > +#.if ${MK_CASPER} != "no" && !defined(RESCUE) && !defined(BOOTSTRAPPING) > > +#LIBADD+= casper > > +#LIBADD+= cap_fileargs > > +#LIBADD+= cap_net > > +#CFLAGS+=-DWITH_CASPER > > +#.endif > > > > .include > > > > Hi, > > Almost there. > > ld: error: undefined symbol: cap_init > >>> referenced by cat.c:154 (/opt/src/git-src/bin/cat/cat.c:154) > >>> cat.o:(main) > > ld: error: undefined symbol: fileargs_cinit > >>> referenced by cat.c:158 (/opt/src/git-src/bin/cat/cat.c:158) > >>> cat.o:(main) > > ld: error: undefined symbol: cap_service_open > >>> referenced by cat.c:131 (/opt/src/git-src/bin/cat/cat.c:131) > >>> cat.o:(main) > > ld: error: undefined symbol: cap_net_limit_init > >>> referenced by cat.c:135 (/opt/src/git-src/bin/cat/cat.c:135) > >>> cat.o:(main) > > ld: error: undefined symbol: cap_net_limit_name2addr_family > >>> referenced by cat.c:141 (/opt/src/git-src/bin/cat/cat.c:141) > >>> cat.o:(main) > --- all_subdir_kerberos5 --- > --- libheimntlm.so.11.debug --- > objcopy --only-keep-debug libheimntlm.so.11.full libheimntlm.so.11.debug > --- libheimntlm.so.11 --- > objcopy --strip-debug --add-gnu-debuglink=libheimntlm.so.11.debug > libheimntlm.so.11.full libheimntlm.so.11 > --- all_subdir_lib --- > --- init_test --- > (cd /opt/src/git-src/lib/csu/tests/dynamic && DEPENDFILE=.depend.init_test > NO_SUBDIR=1 make -f /opt/src/git-src/lib/csu/tests/dynamic/Makefile > _RECURSING_PROGS=t PROG=init_test ) > --- all_subdir_bin --- > ld: error: undefined symbol: cap_net_limit > >>> referenced by cat.c:143 (/opt/src/git-src/bin/cat/cat.c:143) > >>> cat.o:(main) > > ld: error: undefined symbol: cap_close > >>> referenced by cat.c:168 (/opt/src/git-src/bin/cat/cat.c:168) > >>> cat.o:(main) > > ld: error: undefined symbol: fileargs_open > >>> referenced by cat.c:263 (/opt/src/git-src/bin/cat/cat.c:263) > >>> cat.o:(scanfiles) > > ld: error: undefined symbol: fileargs_realpath > >>> referenced by cat.c:441 (/opt/src/git-src/bin/cat/cat.c:441) > >>> cat.o:(scanfiles) > > ld: error: undefined symbol: cap_getaddrinfo > >>> referenced by cat.c:444 (/opt/src/git-src/bin/cat/cat.c:444) > >>> cat.o:(scanfiles) > > ld: error: undefined symbol: cap_connect > >>> referenced by cat.c:468 (/opt/src/git-src/bin/cat/cat.c:468) > >>> cat.o:(scanfiles) > cc: error: linker command failed with exit code 1 (use -v to see invocation) > *** [cat.full] Error code 1 > > make[4]: stopped in /opt/src/git-src/bin/cat > > make[1]: stopped in /opt/src/git-src > > make: stopped in /opt/src/git-src > exiting RC=2: building amd64 > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > From owner-dev-commits-src-all@freebsd.org Sun Jan 17 03:18:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AE734D91B1; Sun, 17 Jan 2021 03:18:37 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJKrD1cqLz3qdQ; Sun, 17 Jan 2021 03:18:35 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 10H3ISxp056103; Sat, 16 Jan 2021 19:18:28 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 10H3ISUj056102; Sat, 16 Jan 2021 19:18:28 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif In-Reply-To: <202101152044.10FKiUS3006617@gitrepo.freebsd.org> To: Gleb Smirnoff Date: Sat, 16 Jan 2021 19:18:27 -0800 (PST) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4DJKrD1cqLz3qdQ X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.78 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; 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]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_SHORT(0.99)[0.993]; LONG_SUBJ(1.88)[251]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 03:18:37 -0000 > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468f09aa7127b543 > > commit 7e4eca7136eaa35e15f67682468f09aa7127b543 > Author: Gleb Smirnoff > AuthorDate: 2021-01-11 20:13:41 +0000 > Commit: Gleb Smirnoff > CommitDate: 2021-01-15 20:44:06 +0000 > > Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on > remote filesystems. Discussed this with Brooks and he can't find > evidence that provoked the change in 2005. If anything gets broken > I will fix it in a different way, not via rc sequence change. This is because /etc/rc.d/tmp has this line: if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then and when your doing NFS boots with seperate /usr you do not have /usr/bin/grep to run that line. Almost always the reason things have a REQUIRE: mountcritremote is that they use some commands from /usr. > Discussed with: brooks > Reviewed by: ngie > Differential Revision: https://reviews.freebsd.org/D28097 > --- > libexec/rc/rc.d/tmp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp > index 3b75ec0338ef..a61321e058ee 100755 > --- a/libexec/rc/rc.d/tmp > +++ b/libexec/rc/rc.d/tmp > @@ -28,7 +28,7 @@ > # > > # PROVIDE: tmp > -# REQUIRE: mountcritremote > +# REQUIRE: mountcritlocal > > . /etc/rc.subr > > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Sun Jan 17 05:10:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B6524DB966; Sun, 17 Jan 2021 05:10: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 4DJNKV5g9sz3wKf; Sun, 17 Jan 2021 05:10: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 B52751B9F6; Sun, 17 Jan 2021 05:10: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 10H5AcCl046095; Sun, 17 Jan 2021 05:10:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10H5AcYf046094; Sun, 17 Jan 2021 05:10:38 GMT (envelope-from git) Date: Sun, 17 Jan 2021 05:10:38 GMT Message-Id: <202101170510.10H5AcYf046094@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: b9f6bda16b27 - stable/12 - x86: Add rdtscp32() into cpufunc.h. 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/12 X-Git-Reftype: branch X-Git-Commit: b9f6bda16b274b2b090db39781f7eb315b80c126 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 05:10:39 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b9f6bda16b274b2b090db39781f7eb315b80c126 commit b9f6bda16b274b2b090db39781f7eb315b80c126 Author: Konstantin Belousov AuthorDate: 2021-01-09 20:39:19 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 04:44:18 +0000 x86: Add rdtscp32() into cpufunc.h. (cherry picked from commit 45974de8fb23710873417f1d2ca513761da6cacc) --- sys/amd64/include/cpufunc.h | 9 +++++++++ sys/i386/include/cpufunc.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 2a03d9b61941..85e6c60a4ffd 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -412,6 +412,15 @@ rdtsc32(void) return (rv); } +static __inline uint32_t +rdtscp32(void) +{ + uint32_t rv; + + __asm __volatile("rdtscp" : "=a" (rv) : : "ecx", "edx"); + return (rv); +} + static __inline void wbinvd(void) { diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 3feeef02499c..9646590a6a40 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -412,6 +412,15 @@ rdtsc32(void) return (rv); } +static __inline uint32_t +rdtscp32(void) +{ + uint32_t rv; + + __asm __volatile("rdtscp" : "=a" (rv) : : "ecx", "edx"); + return (rv); +} + static __inline void wbinvd(void) { From owner-dev-commits-src-all@freebsd.org Sun Jan 17 05:10:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C08CA4DBAD9; Sun, 17 Jan 2021 05:10: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 4DJNKY37tWz3vxc; Sun, 17 Jan 2021 05:10: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 282C01B9F7; Sun, 17 Jan 2021 05:10: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 10H5AeaW046136; Sun, 17 Jan 2021 05:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10H5Ae6l046135; Sun, 17 Jan 2021 05:10:40 GMT (envelope-from git) Date: Sun, 17 Jan 2021 05:10:40 GMT Message-Id: <202101170510.10H5Ae6l046135@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: 77ac245e9e32 - stable/12 - tmpfs_reclaim: style 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/12 X-Git-Reftype: branch X-Git-Commit: 77ac245e9e3245b88623dc853975a37a3e7d0369 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 05:10:42 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=77ac245e9e3245b88623dc853975a37a3e7d0369 commit 77ac245e9e3245b88623dc853975a37a3e7d0369 Author: Konstantin Belousov AuthorDate: 2021-01-13 06:55:38 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 04:45:05 +0000 tmpfs_reclaim: style (cherry picked from commit 685265ecfbd8e929d7c6988a99b708d3a3a5cbf4) --- sys/fs/tmpfs/tmpfs_vnops.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 7a4308445a6a..84134e48e83e 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1302,11 +1302,11 @@ tmpfs_inactive(struct vop_inactive_args *v) int tmpfs_reclaim(struct vop_reclaim_args *v) { - struct vnode *vp = v->a_vp; - + struct vnode *vp; struct tmpfs_mount *tmp; struct tmpfs_node *node; + vp = v->a_vp; node = VP_TO_TMPFS_NODE(vp); tmp = VFS_TO_TMPFS(vp->v_mount); @@ -1321,9 +1321,11 @@ tmpfs_reclaim(struct vop_reclaim_args *v) TMPFS_NODE_LOCK(node); tmpfs_free_vp(vp); - /* If the node referenced by this vnode was deleted by the user, + /* + * If the node referenced by this vnode was deleted by the user, * we must free its associated data structures (now that the vnode - * is being reclaimed). */ + * is being reclaimed). + */ if (node->tn_links == 0 && (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0) { node->tn_vpstate = TMPFS_VNODE_DOOMED; @@ -1333,7 +1335,7 @@ tmpfs_reclaim(struct vop_reclaim_args *v) TMPFS_NODE_UNLOCK(node); MPASS(vp->v_data == NULL); - return 0; + return (0); } int From owner-dev-commits-src-all@freebsd.org Sun Jan 17 05:10:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 025FB4DBB89; Sun, 17 Jan 2021 05:10: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 4DJNKW6btLz3wKh; Sun, 17 Jan 2021 05:10: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 D5C411BBA2; Sun, 17 Jan 2021 05:10: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 10H5AdqH046117; Sun, 17 Jan 2021 05:10:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10H5Adlk046116; Sun, 17 Jan 2021 05:10:39 GMT (envelope-from git) Date: Sun, 17 Jan 2021 05:10:39 GMT Message-Id: <202101170510.10H5Adlk046116@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: b63c36db2065 - stable/12 - libc: implement rtld_get_stack_prot() for real 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/12 X-Git-Reftype: branch X-Git-Commit: b63c36db2065770a0b17925cb3b51cde6af95add Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 05:10:40 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b63c36db2065770a0b17925cb3b51cde6af95add commit b63c36db2065770a0b17925cb3b51cde6af95add Author: Konstantin Belousov AuthorDate: 2021-01-10 03:05:42 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 04:44:43 +0000 libc: implement rtld_get_stack_prot() for real (cherry picked from commit 81b3a0a34145ee6c855f50c8035728f76d63c3f0) --- lib/libc/gen/dlfcn.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index f7f162753b4b..395a6d9402e8 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -34,7 +34,9 @@ __FBSDID("$FreeBSD$"); /* * Linkage to services provided by the dynamic linker. */ +#include #include +#include #include #include #include @@ -256,8 +258,30 @@ _rtld_addr_phdr(const void *addr __unused, int _rtld_get_stack_prot(void) { +#ifndef IN_LIBDL + unsigned i; + int r; + static int ret; + + r = atomic_load_int(&ret); + if (r != 0) + return (r); - return (PROT_EXEC | PROT_READ | PROT_WRITE); + _once(&dl_phdr_info_once, dl_init_phdr_info); + r = PROT_EXEC | PROT_READ | PROT_WRITE; + for (i = 0; i < phdr_info.dlpi_phnum; i++) { + if (phdr_info.dlpi_phdr[i].p_type != PT_GNU_STACK) + continue; + r = PROT_READ | PROT_WRITE; + if ((phdr_info.dlpi_phdr[i].p_flags & PF_X) != 0) + r |= PROT_EXEC; + break; + } + atomic_store_int(&ret, r); + return (r); +#else + return (0); +#endif } #pragma weak _rtld_is_dlopened From owner-dev-commits-src-all@freebsd.org Sun Jan 17 05:10:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE1F64DBB1C; Sun, 17 Jan 2021 05:10: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 4DJNKb59zVz3wL1; Sun, 17 Jan 2021 05:10: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 2E16C1BDA2; Sun, 17 Jan 2021 05:10: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 10H5AgnE046158; Sun, 17 Jan 2021 05:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10H5Agk0046157; Sun, 17 Jan 2021 05:10:42 GMT (envelope-from git) Date: Sun, 17 Jan 2021 05:10:42 GMT Message-Id: <202101170510.10H5Agk0046157@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: 208ebc381f51 - stable/12 - tmpfs_free_tmp(): explicitly assert that tmp is locked 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/12 X-Git-Reftype: branch X-Git-Commit: 208ebc381f51f80a39489e3a1b5fa4e704ac9359 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 05:10:45 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=208ebc381f51f80a39489e3a1b5fa4e704ac9359 commit 208ebc381f51f80a39489e3a1b5fa4e704ac9359 Author: Konstantin Belousov AuthorDate: 2021-01-05 18:53:45 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 04:45:24 +0000 tmpfs_free_tmp(): explicitly assert that tmp is locked (cherry picked from commit 9f200bc47b5d8445d91d51f6dfd6af0f1fbbe354) --- sys/fs/tmpfs/tmpfs_vfsops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 942d2d499b26..c9c211dca002 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -529,8 +529,9 @@ tmpfs_unmount(struct mount *mp, int mntflags) void tmpfs_free_tmp(struct tmpfs_mount *tmp) { - + TMPFS_MP_ASSERT_LOCKED(tmp); MPASS(tmp->tm_refcount > 0); + tmp->tm_refcount--; if (tmp->tm_refcount > 0) { TMPFS_UNLOCK(tmp); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 05:10:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 385044DB9BA; Sun, 17 Jan 2021 05:10: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 4DJNKf52dbz3wHm; Sun, 17 Jan 2021 05:10: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 64E321BE95; Sun, 17 Jan 2021 05:10: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 10H5AiKf046198; Sun, 17 Jan 2021 05:10:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10H5Ai3j046197; Sun, 17 Jan 2021 05:10:44 GMT (envelope-from git) Date: Sun, 17 Jan 2021 05:10:44 GMT Message-Id: <202101170510.10H5Ai3j046197@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: 16787d049ece - stable/12 - issignal(): when handling STOP-like signals, drop sigacts mutex earlier. 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/12 X-Git-Reftype: branch X-Git-Commit: 16787d049ece7fdf457e7571050e837fc24a697f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 05:10:47 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=16787d049ece7fdf457e7571050e837fc24a697f commit 16787d049ece7fdf457e7571050e837fc24a697f Author: Konstantin Belousov AuthorDate: 2020-12-31 01:45:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 04:46:19 +0000 issignal(): when handling STOP-like signals, drop sigacts mutex earlier. (cherry picked from commit e0d83cd3e49f0b9e16bc82ced7bd3b0ef9aa6a71) --- sys/kern/kern_sig.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index b84793285d8a..9fbb6d86457a 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2950,17 +2950,20 @@ issignal(struct thread *td) * should ignore tty stops. */ if (prop & SIGPROP_STOP) { + mtx_unlock(&ps->ps_mtx); if ((p->p_flag & (P_TRACED | P_WEXIT | P_SINGLE_EXIT)) != 0 || (p->p_pgrp->pg_jobc == 0 && - (prop & SIGPROP_TTYSTOP) != 0)) + (prop & SIGPROP_TTYSTOP) != 0)) { + mtx_lock(&ps->ps_mtx); break; /* == ignore */ + } if (TD_SBDRY_INTR(td)) { KASSERT((td->td_flags & TDF_SBDRY) != 0, ("lost TDF_SBDRY")); + mtx_lock(&ps->ps_mtx); return (-1); } - mtx_unlock(&ps->ps_mtx); WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, "Catching SIGSTOP"); sigqueue_delete(&td->td_sigqueue, sig); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 05:10:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C41474DBDB9; Sun, 17 Jan 2021 05:10: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 4DJNKc6yLLz3wLH; Sun, 17 Jan 2021 05:10: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 499571BFE7; Sun, 17 Jan 2021 05:10: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 10H5AhPv046178; Sun, 17 Jan 2021 05:10:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10H5AhBB046177; Sun, 17 Jan 2021 05:10:43 GMT (envelope-from git) Date: Sun, 17 Jan 2021 05:10:43 GMT Message-Id: <202101170510.10H5AhBB046177@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: 71dfe98e34ac - stable/12 - tty_wait_background: improve locking. 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/12 X-Git-Reftype: branch X-Git-Commit: 71dfe98e34acdcb8b0f90880de28611e66662e91 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 05:10:46 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=71dfe98e34acdcb8b0f90880de28611e66662e91 commit 71dfe98e34acdcb8b0f90880de28611e66662e91 Author: Konstantin Belousov AuthorDate: 2020-12-31 13:45:06 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 04:45:47 +0000 tty_wait_background: improve locking. (cherry picked from commit a008bdeda3b8278fe600cf83ecf44acd1ccb30b6) --- sys/kern/tty.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 63324ac3e881..693032908b3a 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -413,7 +413,7 @@ tty_is_ctty(struct tty *tp, struct proc *p) int tty_wait_background(struct tty *tp, struct thread *td, int sig) { - struct proc *p = td->td_proc; + struct proc *p; struct pgrp *pg; ksiginfo_t ksi; int error; @@ -421,8 +421,22 @@ tty_wait_background(struct tty *tp, struct thread *td, int sig) MPASS(sig == SIGTTIN || sig == SIGTTOU); tty_assert_locked(tp); + p = td->td_proc; for (;;) { + pg = p->p_pgrp; + PGRP_LOCK(pg); PROC_LOCK(p); + + /* + * pg may no longer be our process group. + * Re-check after locking. + */ + if (p->p_pgrp != pg) { + PROC_UNLOCK(p); + PGRP_UNLOCK(pg); + continue; + } + /* * The process should only sleep, when: * - This terminal is the controlling terminal @@ -435,6 +449,7 @@ tty_wait_background(struct tty *tp, struct thread *td, int sig) if (!tty_is_ctty(tp, p) || p->p_pgrp == tp->t_pgrp) { /* Allow the action to happen. */ PROC_UNLOCK(p); + PGRP_UNLOCK(pg); return (0); } @@ -442,13 +457,14 @@ tty_wait_background(struct tty *tp, struct thread *td, int sig) SIGISMEMBER(td->td_sigmask, sig)) { /* Only allow them in write()/ioctl(). */ PROC_UNLOCK(p); + PGRP_UNLOCK(pg); return (sig == SIGTTOU ? 0 : EIO); } - pg = p->p_pgrp; if ((p->p_flag & P_PPWAIT) != 0 || pg->pg_jobc == 0) { /* Don't allow the action to happen. */ PROC_UNLOCK(p); + PGRP_UNLOCK(pg); return (EIO); } PROC_UNLOCK(p); @@ -463,20 +479,7 @@ tty_wait_background(struct tty *tp, struct thread *td, int sig) ksi.ksi_signo = sig; sig = 0; } - PGRP_LOCK(pg); - - /* - * pg may no longer be our process group. - * Re-check after locking process group. - */ - PROC_LOCK(p); - if (p->p_pgrp != pg) { - PROC_UNLOCK(p); - PGRP_UNLOCK(pg); - continue; - } - PROC_UNLOCK(p); pgsignal(pg, ksi.ksi_signo, 1, &ksi); PGRP_UNLOCK(pg); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 05:10:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 663B44DBDC8; Sun, 17 Jan 2021 05:10: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 4DJNKh3kBjz3wVj; Sun, 17 Jan 2021 05:10: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 836771BDA3; Sun, 17 Jan 2021 05: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 10H5Aj4u046220; Sun, 17 Jan 2021 05: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 10H5AjFm046219; Sun, 17 Jan 2021 05:10:45 GMT (envelope-from git) Date: Sun, 17 Jan 2021 05:10:45 GMT Message-Id: <202101170510.10H5AjFm046219@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: 33c122e9190b - stable/12 - tmpfs: make M_TMPFSMNT static to tmpfs_vfsops.c 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/12 X-Git-Reftype: branch X-Git-Commit: 33c122e9190bd3ed96656253a750031aa500b954 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 05:10:52 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=33c122e9190bd3ed96656253a750031aa500b954 commit 33c122e9190bd3ed96656253a750031aa500b954 Author: Konstantin Belousov AuthorDate: 2021-01-05 18:52:42 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 04:46:45 +0000 tmpfs: make M_TMPFSMNT static to tmpfs_vfsops.c (cherry picked from commit 42bebbda9ed13d12d0454b676aa81f34b39e496f) --- sys/fs/tmpfs/tmpfs.h | 1 - sys/fs/tmpfs/tmpfs_vfsops.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 3872cd1c0b13..ec920f8b0537 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -42,7 +42,6 @@ #include #ifdef _SYS_MALLOC_H_ -MALLOC_DECLARE(M_TMPFSMNT); MALLOC_DECLARE(M_TMPFSNAME); #endif diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index c9c211dca002..219ec9ee69f2 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); */ #define TMPFS_DEFAULT_ROOT_MODE (S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) -MALLOC_DEFINE(M_TMPFSMNT, "tmpfs mount", "tmpfs mount structures"); +static MALLOC_DEFINE(M_TMPFSMNT, "tmpfs mount", "tmpfs mount structures"); MALLOC_DEFINE(M_TMPFSNAME, "tmpfs name", "tmpfs file names"); static int tmpfs_mount(struct mount *); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 09:18:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFED14E1D5C; Sun, 17 Jan 2021 09:18: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 4DJTqZ5z63z4dQ2; Sun, 17 Jan 2021 09:18: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 B53E61F105; Sun, 17 Jan 2021 09:18: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 10H9IYr4062296; Sun, 17 Jan 2021 09:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10H9IYYL062295; Sun, 17 Jan 2021 09:18:34 GMT (envelope-from git) Date: Sun, 17 Jan 2021 09:18:34 GMT Message-Id: <202101170918.10H9IYYL062295@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: 3d3c424eb6e3 - stable/12 - bectl(8): sync man page and help text 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: 3d3c424eb6e3909f2f7cd318b9a8a1bbb0783705 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 09:18:34 -0000 The branch stable/12 has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=3d3c424eb6e3909f2f7cd318b9a8a1bbb0783705 commit 3d3c424eb6e3909f2f7cd318b9a8a1bbb0783705 Author: Robert Wing AuthorDate: 2021-01-06 19:38:25 +0000 Commit: Robert Wing CommitDate: 2021-01-17 09:12:42 +0000 bectl(8): sync man page and help text Sync man page with behavior of bectl(8). Sync help text with man page. PR: 246697 Reported by: olgeni Submitted by: olgeni (with changes) Reviewed by: kevans, olgeni Approved by: kevans (mentor) Differential Revision: https://reviews.freebsd.org/D27482 (cherry picked from commit b1ea63e2e3c92d1346af067f5cf609e3e062f8b9) --- sbin/bectl/bectl.8 | 11 +++++------ sbin/bectl/bectl.c | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/sbin/bectl/bectl.8 b/sbin/bectl/bectl.8 index e45bc6b99551..809a0d2f51a8 100644 --- a/sbin/bectl/bectl.8 +++ b/sbin/bectl/bectl.8 @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2020 +.Dd January 6, 2021 .Dt BECTL 8 .Os .Sh NAME @@ -71,8 +71,7 @@ .Ar newBeName .Nm .Brq Cm ujail | unjail -.Brq Ar jailId | jailName -.Ar beName +.Brq Ar jailId | jailName | beName .Nm .Brq Cm umount | unmount .Op Fl f @@ -249,7 +248,7 @@ generated by All default parameters may be overwritten. .It Xo .Cm list -.Op Fl DHas +.Op Fl aDHs .Oo Bro Fl c Ar property | Fl C Ar property Brc Oc .Xc .Pp @@ -312,8 +311,8 @@ Rename the given to the given .Ar newBeName . The boot environment will not be unmounted in order for this rename to occur. -.It Cm ujail Bro Ar jailId | jailName Brc Ar beName -.It Cm unjail Bro Ar jailId | jailName Brc Ar beName +.It Cm ujail Brq Ar jailId | jailName | beName +.It Cm unjail Brq Ar jailId | jailName | beName Destroy the jail created from the given boot environment. .It Xo .Cm umount diff --git a/sbin/bectl/bectl.c b/sbin/bectl/bectl.c index 71108b9c0855..768d1cd89ac2 100644 --- a/sbin/bectl/bectl.c +++ b/sbin/bectl/bectl.c @@ -78,13 +78,12 @@ usage(bool explicit) "\tbectl destroy [-F] {beName | beName@snapshot}\n" "\tbectl export sourceBe\n" "\tbectl import targetBe\n" - "\tbectl jail {-b | -U} [{-o key=value | -u key}]... " - "{jailID | jailName}\n" - "\t bootenv [utility [argument ...]]\n" - "\tbectl list [-DHas] [{-c property | -C property}]\n" + "\tbectl jail [-bU] [{-o key=value | -u key}]... beName\n" + "\t [utility [argument ...]]\n" + "\tbectl list [-aDHs] [{-c property | -C property}]\n" "\tbectl mount beName [mountpoint]\n" "\tbectl rename origBeName newBeName\n" - "\tbectl {ujail | unjail} {jailID | jailName} bootenv\n" + "\tbectl {ujail | unjail} {jailID | jailName | beName}\n" "\tbectl {umount | unmount} [-f] beName\n"); return (explicit ? 0 : EX_USAGE); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 11:45:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D067E4E5CA7; Sun, 17 Jan 2021 11:45: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 4DJY4k5Yndz4mnS; Sun, 17 Jan 2021 11:45: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 ADA1F205FE; Sun, 17 Jan 2021 11:45: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 10HBjAjO056997; Sun, 17 Jan 2021 11:45:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HBjAHm056996; Sun, 17 Jan 2021 11:45:10 GMT (envelope-from git) Date: Sun, 17 Jan 2021 11:45:10 GMT Message-Id: <202101171145.10HBjAHm056996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: fb3a792a8827 - main - loader.efi: unused variable 'mode' MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb3a792a8827415735dda4ece2028439ce385ffb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 11:45:10 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=fb3a792a8827415735dda4ece2028439ce385ffb commit fb3a792a8827415735dda4ece2028439ce385ffb Author: Toomas Soome AuthorDate: 2021-01-17 11:39:44 +0000 Commit: Toomas Soome CommitDate: 2021-01-17 11:39:44 +0000 loader.efi: unused variable 'mode' framebuffer.c:707:8: error: unused variable 'mode' [-Wunused-variable] u_int mode; --- stand/efi/loader/framebuffer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index 1650f7da8760..cfbb2a651a8a 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -704,7 +704,6 @@ command_autoresize(int argc, char *argv[]) EFI_UGA_DRAW_PROTOCOL *uga; char *textmode; EFI_STATUS status; - u_int mode; textmode = getenv("hw.vga.textmode"); /* If it's set and non-zero, we'll select a console mode instead */ From owner-dev-commits-src-all@freebsd.org Sun Jan 17 11:47:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0F9B4E5BE9; Sun, 17 Jan 2021 11:47: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 4DJY6z4fTTz4nK1; Sun, 17 Jan 2021 11:47: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 927E320F00; Sun, 17 Jan 2021 11:47: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 10HBl7EC057389; Sun, 17 Jan 2021 11:47:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HBl7pG057388; Sun, 17 Jan 2021 11:47:07 GMT (envelope-from git) Date: Sun, 17 Jan 2021 11:47:07 GMT Message-Id: <202101171147.10HBl7pG057388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 9adce1aedd2e - main - loader.efi: variable 'hlist' is uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9adce1aedd2e4a97478503b99f6c15f5b19e9f2a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 11:47:07 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=9adce1aedd2e4a97478503b99f6c15f5b19e9f2a commit 9adce1aedd2e4a97478503b99f6c15f5b19e9f2a Author: Toomas Soome AuthorDate: 2021-01-17 11:46:00 +0000 Commit: Toomas Soome CommitDate: 2021-01-17 11:46:00 +0000 loader.efi: variable 'hlist' is uninitialized framebuffer.c:481:65: error: variable 'hlist' is uninitialized --- stand/efi/loader/framebuffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index cfbb2a651a8a..0b23a42b1cdc 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -478,6 +478,7 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) gfx_state->tg_fb_type = FB_TEXT; hsize = 0; + hlist = NULL; status = BS->LocateHandle(ByProtocol, &gop_guid, NULL, &hsize, hlist); if (status == EFI_BUFFER_TOO_SMALL) { hlist = malloc(hsize); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 11:47:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DF234E5E0C; Sun, 17 Jan 2021 11:47: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 4DJY7g6zHJz4nHM; Sun, 17 Jan 2021 11: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 E244720ADE; Sun, 17 Jan 2021 11: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 10HBlhM0057612; Sun, 17 Jan 2021 11: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 10HBlhip057611; Sun, 17 Jan 2021 11:47:43 GMT (envelope-from git) Date: Sun, 17 Jan 2021 11:47:43 GMT Message-Id: <202101171147.10HBlhip057611@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: ec25b6fa5ffd - main - LinuxKPI: Reimplement irq_work queue on top of fast taskqueue 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: ec25b6fa5ffde89f202c2caa77268ed1eed12158 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 11:47:44 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ec25b6fa5ffde89f202c2caa77268ed1eed12158 commit ec25b6fa5ffde89f202c2caa77268ed1eed12158 Author: Vladimir Kondratyev AuthorDate: 2021-01-17 11:21:49 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-17 11:47:28 +0000 LinuxKPI: Reimplement irq_work queue on top of fast taskqueue Summary: Linux's irq_work queue was created for asynchronous execution of code from contexts where spin_lock's are not available like "hardware interrupt context". FreeBSD's fast taskqueues was created for the same purposes. Drm-kmod 5.4 uses irq_work_queue() at least in one place to schedule execution of task/work from the critical section that triggers following INVARIANTS-induced panic: ``` panic: acquiring blockable sleep lock with spinlock or critical section held (sleep mutex) linuxkpi_short_wq @ /usr/src/sys/kern/subr_taskqueue.c:281 cpuid = 6 time = 1605048416 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe006b538c90 vpanic() at vpanic+0x182/frame 0xfffffe006b538ce0 panic() at panic+0x43/frame 0xfffffe006b538d40 witness_checkorder() at witness_checkorder+0xf3e/frame 0xfffffe006b538f00 __mtx_lock_flags() at __mtx_lock_flags+0x94/frame 0xfffffe006b538f50 taskqueue_enqueue() at taskqueue_enqueue+0x42/frame 0xfffffe006b538f70 linux_queue_work_on() at linux_queue_work_on+0xe9/frame 0xfffffe006b538fb0 irq_work_queue() at irq_work_queue+0x21/frame 0xfffffe006b538fd0 semaphore_notify() at semaphore_notify+0xb2/frame 0xfffffe006b539020 __i915_sw_fence_notify() at __i915_sw_fence_notify+0x2e/frame 0xfffffe006b539050 __i915_sw_fence_complete() at __i915_sw_fence_complete+0x63/frame 0xfffffe006b539080 i915_sw_fence_complete() at i915_sw_fence_complete+0x8e/frame 0xfffffe006b5390c0 dma_i915_sw_fence_wake() at dma_i915_sw_fence_wake+0x4f/frame 0xfffffe006b539100 dma_fence_signal_locked() at dma_fence_signal_locked+0x105/frame 0xfffffe006b539180 dma_fence_signal() at dma_fence_signal+0x72/frame 0xfffffe006b5391c0 dma_fence_is_signaled() at dma_fence_is_signaled+0x80/frame 0xfffffe006b539200 dma_resv_add_shared_fence() at dma_resv_add_shared_fence+0xb3/frame 0xfffffe006b539270 i915_vma_move_to_active() at i915_vma_move_to_active+0x18a/frame 0xfffffe006b5392b0 eb_move_to_gpu() at eb_move_to_gpu+0x3ad/frame 0xfffffe006b539320 eb_submit() at eb_submit+0x15/frame 0xfffffe006b539350 i915_gem_do_execbuffer() at i915_gem_do_execbuffer+0x7d4/frame 0xfffffe006b539570 i915_gem_execbuffer2_ioctl() at i915_gem_execbuffer2_ioctl+0x1c1/frame 0xfffffe006b539600 drm_ioctl_kernel() at drm_ioctl_kernel+0xd9/frame 0xfffffe006b539670 drm_ioctl() at drm_ioctl+0x5cd/frame 0xfffffe006b539820 linux_file_ioctl() at linux_file_ioctl+0x323/frame 0xfffffe006b539880 kern_ioctl() at kern_ioctl+0x1f4/frame 0xfffffe006b5398f0 sys_ioctl() at sys_ioctl+0x12a/frame 0xfffffe006b5399c0 amd64_syscall() at amd64_syscall+0x121/frame 0xfffffe006b539af0 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe006b539af0 --- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x800a6f09a, rsp = 0x7fffffffe588, rbp = 0x7fffffffe640 --- KDB: enter: panic ``` Here, the dma_resv_add_shared_fence() performs a critical_enter() and following call of schedule_work() from semaphore_notify() triggers 'acquiring blockable sleep lock with spinlock or critical section held' panic. Switching irq_work implementation to fast taskqueue fixes the panic for me. Other report with the similar bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247166 Reviewed By: hselasky Differential Revision: https://reviews.freebsd.org/D27171 --- .../linuxkpi/common/include/linux/irq_work.h | 25 ++++- sys/compat/linuxkpi/common/include/linux/llist.h | 101 +++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/slab.h | 16 ++++ sys/compat/linuxkpi/common/src/linux_slab.c | 27 ++++++ sys/compat/linuxkpi/common/src/linux_work.c | 48 ++++++++++ 5 files changed, 212 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/irq_work.h b/sys/compat/linuxkpi/common/include/linux/irq_work.h index b44e78230b0d..eb1798a4e450 100644 --- a/sys/compat/linuxkpi/common/include/linux/irq_work.h +++ b/sys/compat/linuxkpi/common/include/linux/irq_work.h @@ -31,22 +31,37 @@ #ifndef __LINUX_IRQ_WORK_H__ #define __LINUX_IRQ_WORK_H__ -#include +#include +#include + +struct irq_work; +typedef void (*irq_work_func_t)(struct irq_work *); struct irq_work { - struct work_struct work; + struct task irq_task; + irq_work_func_t func; }; +extern struct taskqueue *linux_irq_work_tq; + +#define DEFINE_IRQ_WORK(name, _func) struct irq_work name = { \ + .irq_task = TASK_INITIALIZER(0, linux_irq_work_fn, &(name)), \ + .func = (_func), \ +} + +void linux_irq_work_fn(void *, int); + static inline void -init_irq_work(struct irq_work *irqw, void (*func)(struct irq_work *)) +init_irq_work(struct irq_work *irqw, irq_work_func_t func) { - INIT_WORK(&irqw->work, (work_func_t)func); + TASK_INIT(&irqw->irq_task, 0, linux_irq_work_fn, irqw); + irqw->func = func; } static inline void irq_work_queue(struct irq_work *irqw) { - schedule_work(&irqw->work); + taskqueue_enqueue(linux_irq_work_tq, &irqw->irq_task); } #endif /* __LINUX_IRQ_WORK_H__ */ diff --git a/sys/compat/linuxkpi/common/include/linux/llist.h b/sys/compat/linuxkpi/common/include/linux/llist.h new file mode 100644 index 000000000000..b3c89516e710 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/llist.h @@ -0,0 +1,101 @@ +/* Public domain. */ + +#ifndef _LINUX_LLIST_H +#define _LINUX_LLIST_H + +#include +#include + +struct llist_node { + struct llist_node *next; +}; + +struct llist_head { + struct llist_node *first; +}; + +#define LLIST_HEAD_INIT(name) { NULL } +#define LLIST_HEAD(name) struct llist_head name = LLIST_HEAD_INIT(name) + +#define llist_entry(ptr, type, member) \ + ((ptr) ? container_of(ptr, type, member) : NULL) + +static inline struct llist_node * +llist_del_all(struct llist_head *head) +{ + return ((void *)atomic_readandclear_ptr((uintptr_t *)&head->first)); +} + +static inline struct llist_node * +llist_del_first(struct llist_head *head) +{ + struct llist_node *first, *next; + + do { + first = head->first; + if (first == NULL) + return NULL; + next = first->next; + } while (atomic_cmpset_ptr((uintptr_t *)&head->first, + (uintptr_t)first, (uintptr_t)next) == 0); + + return (first); +} + +static inline bool +llist_add(struct llist_node *new, struct llist_head *head) +{ + struct llist_node *first; + + do { + new->next = first = head->first; + } while (atomic_cmpset_ptr((uintptr_t *)&head->first, + (uintptr_t)first, (uintptr_t)new) == 0); + + return (first == NULL); +} + +static inline bool +llist_add_batch(struct llist_node *new_first, struct llist_node *new_last, + struct llist_head *head) +{ + struct llist_node *first; + + do { + new_last->next = first = head->first; + } while (atomic_cmpset_ptr((uintptr_t *)&head->first, + (uintptr_t)first, (uintptr_t)new_first) == 0); + + return (first == NULL); +} + +static inline void +init_llist_head(struct llist_head *head) +{ + head->first = NULL; +} + +static inline bool +llist_empty(struct llist_head *head) +{ + return (head->first == NULL); +} + +#define llist_for_each_safe(pos, n, node) \ + for ((pos) = (node); \ + (pos) != NULL && \ + ((n) = (pos)->next, pos); \ + (pos) = (n)) + +#define llist_for_each_entry_safe(pos, n, node, member) \ + for (pos = llist_entry((node), __typeof(*pos), member); \ + pos != NULL && \ + (n = llist_entry(pos->member.next, __typeof(*pos), member), pos); \ + pos = n) + +#define llist_for_each_entry(pos, node, member) \ + for ((pos) = llist_entry((node), __typeof(*(pos)), member); \ + (pos) != NULL; \ + (pos) = llist_entry((pos)->member.next, __typeof(*(pos)), member)) + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index ae1c9d81843e..0cd748b7ecb9 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -35,10 +35,12 @@ #include #include #include +#include #include #include #include +#include MALLOC_DECLARE(M_KMALLOC); @@ -90,6 +92,19 @@ struct linux_kmem_cache { #define ARCH_KMALLOC_MINALIGN \ __alignof(unsigned long long) +/* + * Critical section-friendly version of kfree(). + * Requires knowledge of the allocation size at build time. + */ +#define kfree_async(ptr) do { \ + _Static_assert(sizeof(*(ptr)) >= sizeof(struct llist_node), \ + "Size of object to free is unknown or too small"); \ + if (curthread->td_critnest != 0) \ + linux_kfree_async(ptr); \ + else \ + kfree(ptr); \ +} while (0) + static inline gfp_t linux_check_m_flags(gfp_t flags) { @@ -189,5 +204,6 @@ linux_kmem_cache_free(struct linux_kmem_cache *c, void *m) } extern void linux_kmem_cache_destroy(struct linux_kmem_cache *); +void linux_kfree_async(void *); #endif /* _LINUX_SLAB_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_slab.c b/sys/compat/linuxkpi/common/src/linux_slab.c index c8deab01731a..3304c34b1dee 100644 --- a/sys/compat/linuxkpi/common/src/linux_slab.c +++ b/sys/compat/linuxkpi/common/src/linux_slab.c @@ -30,6 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include + +#include +#include struct linux_kmem_rcu { struct rcu_head rcu_head; @@ -44,6 +49,8 @@ struct linux_kmem_rcu { ((void *)((char *)(r) + sizeof(struct linux_kmem_rcu) - \ (r)->cache->cache_size)) +static LLIST_HEAD(linux_kfree_async_list); + static int linux_kmem_ctor(void *mem, int size, void *arg, int flags) { @@ -126,3 +133,23 @@ linux_kmem_cache_destroy(struct linux_kmem_cache *c) uma_zdestroy(c->cache_zone); free(c, M_KMALLOC); } + +static void +linux_kfree_async_fn(void *context, int pending) +{ + struct llist_node *freed; + + while((freed = llist_del_first(&linux_kfree_async_list)) != NULL) + kfree(freed); +} +static struct task linux_kfree_async_task = + TASK_INITIALIZER(0, linux_kfree_async_fn, &linux_kfree_async_task); + +void +linux_kfree_async(void *addr) +{ + if (addr == NULL) + return; + llist_add(addr, &linux_kfree_async_list); + taskqueue_enqueue(linux_irq_work_tq, &linux_kfree_async_task); +} diff --git a/sys/compat/linuxkpi/common/src/linux_work.c b/sys/compat/linuxkpi/common/src/linux_work.c index 043c5b7d1aff..45025378baa9 100644 --- a/sys/compat/linuxkpi/common/src/linux_work.c +++ b/sys/compat/linuxkpi/common/src/linux_work.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -59,6 +60,8 @@ struct workqueue_struct *system_unbound_wq; struct workqueue_struct *system_highpri_wq; struct workqueue_struct *system_power_efficient_wq; +struct taskqueue *linux_irq_work_tq; + static int linux_default_wq_cpus = 4; static void linux_delayed_work_timer_fn(void *); @@ -683,3 +686,48 @@ linux_work_uninit(void *arg) system_highpri_wq = NULL; } SYSUNINIT(linux_work_uninit, SI_SUB_TASKQ, SI_ORDER_THIRD, linux_work_uninit, NULL); + +void +linux_irq_work_fn(void *context, int pending) +{ + struct irq_work *irqw = context; + + irqw->func(irqw); +} + +static void +linux_irq_work_init_fn(void *context, int pending) +{ + /* + * LinuxKPI performs lazy allocation of memory structures required by + * current on the first access to it. As some irq_work clients read + * it with spinlock taken, we have to preallocate td_lkpi_task before + * first call to irq_work_queue(). As irq_work uses a single thread, + * it is enough to read current once at SYSINIT stage. + */ + if (current == NULL) + panic("irq_work taskqueue is not initialized"); +} +static struct task linux_irq_work_init_task = + TASK_INITIALIZER(0, linux_irq_work_init_fn, &linux_irq_work_init_task); + +static void +linux_irq_work_init(void *arg) +{ + linux_irq_work_tq = taskqueue_create_fast("linuxkpi_irq_wq", + M_WAITOK, taskqueue_thread_enqueue, &linux_irq_work_tq); + taskqueue_start_threads(&linux_irq_work_tq, 1, PWAIT, + "linuxkpi_irq_wq"); + taskqueue_enqueue(linux_irq_work_tq, &linux_irq_work_init_task); +} +SYSINIT(linux_irq_work_init, SI_SUB_TASKQ, SI_ORDER_SECOND, + linux_irq_work_init, NULL); + +static void +linux_irq_work_uninit(void *arg) +{ + taskqueue_drain_all(linux_irq_work_tq); + taskqueue_free(linux_irq_work_tq); +} +SYSUNINIT(linux_irq_work_uninit, SI_SUB_TASKQ, SI_ORDER_SECOND, + linux_irq_work_uninit, NULL); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 11:47:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 598314E5D40; Sun, 17 Jan 2021 11:47: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 4DJY7j1111z4nNN; Sun, 17 Jan 2021 11:47: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 1242220CD9; Sun, 17 Jan 2021 11:47: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 10HBljrq057634; Sun, 17 Jan 2021 11:47:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HBljoH057633; Sun, 17 Jan 2021 11:47:45 GMT (envelope-from git) Date: Sun, 17 Jan 2021 11:47:45 GMT Message-Id: <202101171147.10HBljoH057633@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: 72c551930be1 - main - Bump __FreeBSD_version after linuxkpi changes 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: 72c551930be195b5ea982c1b16767f54388424f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 11:47:45 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=72c551930be195b5ea982c1b16767f54388424f2 commit 72c551930be195b5ea982c1b16767f54388424f2 Author: Emmanuel Vadot AuthorDate: 2021-01-17 11:22:28 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-17 11:47:28 +0000 Bump __FreeBSD_version after linuxkpi changes --- 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 8e8ed0b9f00d..e6765e62a75b 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 1300135 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300136 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-all@freebsd.org Sun Jan 17 12:42:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CAC94E83DA; Sun, 17 Jan 2021 12:42:49 +0000 (UTC) (envelope-from se@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 4DJZMF2yVwz4sFt; Sun, 17 Jan 2021 12:42:49 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f211b004d54ffd5a7a53ab0.dip0.t-ipconnect.de [IPv6:2003:cd:5f21:1b00:4d54:ffd5:a7a5:3ab0]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 9B5C73FBF; Sun, 17 Jan 2021 12:42:48 +0000 (UTC) (envelope-from se@freebsd.org) To: rgrimes@freebsd.org, Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> From: Stefan Esser Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif Message-ID: <3a7b249e-3a5b-d237-882d-508f7784c75b@freebsd.org> Date: Sun, 17 Jan 2021 13:42:45 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e90lrZ1nl8NGtp1vJs2VQKL5UwNGBbSlK" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 12:42:49 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --e90lrZ1nl8NGtp1vJs2VQKL5UwNGBbSlK Content-Type: multipart/mixed; boundary="JzFqo24PD6nx34aAlTaWm6as46dA2VROr"; protected-headers="v1" From: Stefan Esser To: rgrimes@freebsd.org, Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-ID: <3a7b249e-3a5b-d237-882d-508f7784c75b@freebsd.org> Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif References: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> In-Reply-To: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> --JzFqo24PD6nx34aAlTaWm6as46dA2VROr Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: de-DE Content-Transfer-Encoding: quoted-printable Am 17.01.21 um 04:18 schrieb Rodney W. Grimes: >> The branch main has been updated by glebius: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D7e4eca7136eaa35e15f6768= 2468f09aa7127b543 >> >> commit 7e4eca7136eaa35e15f67682468f09aa7127b543 >> Author: Gleb Smirnoff >> AuthorDate: 2021-01-11 20:13:41 +0000 >> Commit: Gleb Smirnoff >> CommitDate: 2021-01-15 20:44:06 +0000 >> >> Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' = on >> remote filesystems. Discussed this with Brooks and he can't find= >> evidence that provoked the change in 2005. If anything gets brok= en >> I will fix it in a different way, not via rc sequence change. >=20 > This is because /etc/rc.d/tmp has this line: > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then >=20 > and when your doing NFS boots with seperate /usr you do not have > /usr/bin/grep to run that line. >=20 > Almost always the reason things have a REQUIRE: mountcritremote > is that they use some commands from /usr. This dependency on /usr/bin/grep is easily removed, see: https://reviews.freebsd.org/D28209 diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp index a61321e058ee..2a7205e92b59 100755 --- a/libexec/rc/rc.d/tmp +++ b/libexec/rc/rc.d/tmp @@ -40,10 +40,16 @@ load_rc_config $name mount_tmpmfs() { - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" - chmod 01777 /tmp - fi + while read line; do + case $line in + /dev/md[0-9]*\ /tmp) + return;; + esac + done <<*EOF +$(df /tmp) +*EOF + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" + chmod 01777 /tmp } # If we do not have a writable /tmp, create a memory --JzFqo24PD6nx34aAlTaWm6as46dA2VROr-- --e90lrZ1nl8NGtp1vJs2VQKL5UwNGBbSlK Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmAEMMUFAwAAAAAACgkQR+u171r99URf pAf/QmCoceocJIk8m1qprZXJ3oNaRluEe9iPSLPnfdCGVOFMdMbLqiY0yiPCqTLH7BmnP2fpdtB+ WjwiuetY9ZbVgb7tWoq8Nls+8oHo+4NSXUXTnRqWF9IUUf03u0zmIBNXL3q+UOO24mydXmH8tx/r BQeAws62+dXP7/8YrhBzopTH9rUlJZDbTxJ0Tc5TfR7GZSQby7gFtWj0LAVr2xRPTkjvh/IM3pWk 9KvLjX19OeQ/kN2ArnglzBM2aKkUdJW3htK9zuxa06nKOWCtmD8AWIBJi5G+Gjxel5GviOsN+M02 3O0+3bFsvE2CJ3BNAkYgy1oNyUlyWLtxudQvVQE5Pg== =+oMD -----END PGP SIGNATURE----- --e90lrZ1nl8NGtp1vJs2VQKL5UwNGBbSlK-- From owner-dev-commits-src-all@freebsd.org Sun Jan 17 13:34:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F3374E90F3; Sun, 17 Jan 2021 13:34: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 4DJbVZ1qxQz4vpL; Sun, 17 Jan 2021 13:34: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 31BCF223BE; Sun, 17 Jan 2021 13:34: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 10HDYEvd099967; Sun, 17 Jan 2021 13:34:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HDYE6N099966; Sun, 17 Jan 2021 13:34:14 GMT (envelope-from git) Date: Sun, 17 Jan 2021 13:34:14 GMT Message-Id: <202101171334.10HDYE6N099966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 52ec89a93c79 - main - loader.efi: commands gop, uga and autoresize should use cached data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52ec89a93c796ca3f3f3da2eec867804fcdd1a4d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 13:34:14 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=52ec89a93c796ca3f3f3da2eec867804fcdd1a4d commit 52ec89a93c796ca3f3f3da2eec867804fcdd1a4d Author: Toomas Soome AuthorDate: 2021-01-17 13:07:27 +0000 Commit: Toomas Soome CommitDate: 2021-01-17 13:33:48 +0000 loader.efi: commands gop, uga and autoresize should use cached data We are setting up pointers for gop or uga protocol in efi_find_framebuffer(), reuse those pointers. --- stand/efi/loader/framebuffer.c | 47 +++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index 0b23a42b1cdc..509c41844dcb 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -43,11 +43,14 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "framebuffer.h" -EFI_GUID conout_guid = EFI_CONSOLE_OUT_DEVICE_GUID; +static EFI_GUID conout_guid = EFI_CONSOLE_OUT_DEVICE_GUID; EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; static EFI_GUID pciio_guid = EFI_PCI_IO_PROTOCOL_GUID; static EFI_GUID uga_guid = EFI_UGA_DRAW_PROTOCOL_GUID; +static EFI_GRAPHICS_OUTPUT *gop; +static EFI_UGA_DRAW_PROTOCOL *uga; + static struct named_resolution { const char *name; const char *alias; @@ -305,7 +308,7 @@ efifb_uga_locate_framebuffer(EFI_PCI_IO_PROTOCOL *pciio, uint64_t *addrp, } static int -efifb_from_uga(struct efi_fb *efifb, EFI_UGA_DRAW_PROTOCOL *uga) +efifb_from_uga(struct efi_fb *efifb) { EFI_PCI_IO_PROTOCOL *pciio; char *ev, *p; @@ -470,8 +473,6 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) EFI_HANDLE h, *hlist; UINTN nhandles, i, hsize; struct efi_fb efifb; - EFI_GRAPHICS_OUTPUT *gop; - EFI_UGA_DRAW_PROTOCOL *uga; EFI_STATUS status; int rv; @@ -530,7 +531,7 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) break; case FB_UGA: - rv = efifb_from_uga(&efifb, uga); + rv = efifb_from_uga(&efifb); break; default: @@ -624,7 +625,7 @@ efi_get_max_resolution(int *width, int *height) } static int -gop_autoresize(EFI_GRAPHICS_OUTPUT *gop) +gop_autoresize(void) { struct efi_fb efifb; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *info; @@ -690,7 +691,7 @@ text_autoresize() } static int -uga_autoresize(EFI_UGA_DRAW_PROTOCOL *uga) +uga_autoresize(void) { return (text_autoresize()); @@ -701,25 +702,18 @@ COMMAND_SET(efi_autoresize, "efi-autoresizecons", "EFI Auto-resize Console", com static int command_autoresize(int argc, char *argv[]) { - EFI_GRAPHICS_OUTPUT *gop; - EFI_UGA_DRAW_PROTOCOL *uga; char *textmode; - EFI_STATUS status; textmode = getenv("hw.vga.textmode"); /* If it's set and non-zero, we'll select a console mode instead */ if (textmode != NULL && strcmp(textmode, "0") != 0) return (text_autoresize()); - gop = NULL; - uga = NULL; - status = BS->LocateProtocol(&gop_guid, NULL, (VOID **)&gop); - if (EFI_ERROR(status) == 0) - return (gop_autoresize(gop)); + if (gop != NULL) + return (gop_autoresize()); - status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); - if (EFI_ERROR(status) == 0) - return (uga_autoresize(uga)); + if (uga != NULL) + return (uga_autoresize()); snprintf(command_errbuf, sizeof(command_errbuf), "%s: Neither Graphics Output Protocol nor Universal Graphics Adapter present", @@ -740,15 +734,12 @@ static int command_gop(int argc, char *argv[]) { struct efi_fb efifb; - EFI_GRAPHICS_OUTPUT *gop; EFI_STATUS status; u_int mode; - status = BS->LocateProtocol(&gop_guid, NULL, (VOID **)&gop); - if (EFI_ERROR(status)) { + if (gop == NULL) { snprintf(command_errbuf, sizeof(command_errbuf), - "%s: Graphics Output Protocol not present (error=%lu)", - argv[0], EFI_ERROR_CODE(status)); + "%s: Graphics Output Protocol not present", argv[0]); return (CMD_ERROR); } @@ -813,21 +804,17 @@ static int command_uga(int argc, char *argv[]) { struct efi_fb efifb; - EFI_UGA_DRAW_PROTOCOL *uga; - EFI_STATUS status; - status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); - if (EFI_ERROR(status)) { + if (uga == NULL) { snprintf(command_errbuf, sizeof(command_errbuf), - "%s: UGA Protocol not present (error=%lu)", - argv[0], EFI_ERROR_CODE(status)); + "%s: UGA Protocol not present", argv[0]); return (CMD_ERROR); } if (argc != 1) goto usage; - if (efifb_from_uga(&efifb, uga) != CMD_OK) { + if (efifb_from_uga(&efifb) != CMD_OK) { snprintf(command_errbuf, sizeof(command_errbuf), "%s: Unable to get UGA information", argv[0]); return (CMD_ERROR); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 13:34:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 446434E9707; Sun, 17 Jan 2021 13:34: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 4DJbW41LYSz4vq9; Sun, 17 Jan 2021 13:34: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 215A8225D6; Sun, 17 Jan 2021 13:34: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 10HDYeZZ000236; Sun, 17 Jan 2021 13:34:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HDYeTU000235; Sun, 17 Jan 2021 13:34:40 GMT (envelope-from git) Date: Sun, 17 Jan 2021 13:34:40 GMT Message-Id: <202101171334.10HDYeTU000235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vincenzo Maffione Subject: git: 9882b8313200 - stable/12 - netmap: iflib: stop krings during interface reset 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 9882b83132007acc0e6cef6d248fb12cdebba278 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 13:34:40 -0000 The branch stable/12 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=9882b83132007acc0e6cef6d248fb12cdebba278 commit 9882b83132007acc0e6cef6d248fb12cdebba278 Author: Vincenzo Maffione AuthorDate: 2021-01-09 20:54:11 +0000 Commit: Vincenzo Maffione CommitDate: 2021-01-17 12:02:44 +0000 netmap: iflib: stop krings during interface reset When different processes open separate subsets of the available rings of a same netmap interface, a device reset may be performed while one of the processes is actively using some rings (e.g., caused by another process executing a nmport_open()). With this patch, such situation will cause the active process to get a POLLERR, so that it can have a chance to detect the situation. We also guarantee that no process is running a txsync or rxsync (ioctl or poll) while an iflib device reset is in progress. PR: 252453 MFC after: 1 week (cherry picked from commit 1d238b07d5d4d9660ae0e08daede6da7e91c7853) netmap: iflib: fix asserts in netmap_fl_refill() When netmap_fl_refill() is called at initialization time (e.g., during netmap_iflib_register()), nic_i must be 0, since the free list is reinitialized. At the end of the refill cycle, nic_i must still be zero, because exactly N descriptors (N is the ring size) are refilled. This patch therefore fixes the assertions to check on nic_i rather than on nm_i. The current netmap_reset() may in fact cause nm_i to be != 0 while the device is resetting: this may happen when multiple non-cooperating processes open different subsets of the available netmap rings. PR: 252518 MFC after: 1 week (cherry picked from commit 3189ba61673af5bd3ed2ee9e33be92bc0b9995ba) netmap: refactor netmap_reset The netmap_reset() function is meant to be called by the driver when they initialize (or re-initialize) a hardware ring. However, since the introduction of support for opening (in netmap mode) a subset of the available rings, netmap_reset() may be called multiple times on actively used rings, causing both kring and netmap ring to transition to an inconsistent state. This changes improves the situation by resetting all the indices fields of the kring to 0, as expected after the reinitialization of a hardware ring. PR: 252518 MFC after: 1 week (cherry picked from commit 7ba6ecf216fb15e8b147db268b91d9b82c5a0682) netmap: iflib: enable/disable krings on any interface reinit Since 1d238b07d5d4d9660ae0e0, krings are disabled before a reinit cycle triggered by iflib_netmap_register. However, this operation is actually necessary also for any interface reinit triggered by other causes (i.e., ifconfig commands). We achieve this goal by moving the krings enable/disable operation inside iflib_stop() and iflib_init_locked(). Once here, this change also removes some redundant operations from iflib_netmap_register(), that are already performed by iflib_stop(). PR: 252453 MFC after: 1 week (cherry picked from commit 3d65fd97e85ab807f3baa62aa979ae527914a3ea) iflib: fix build failure in case DEV_NETMAP is not defined This addresses the build failure introduced by 3d65fd97e85ab807f3baa62. MFC with: 3d65fd97e85ab807f3baa62 (cherry picked from commit 8aa8484cbf06bb26ad87177fe4aebcaf1519f138) netmap: restore hwofs and support it in iflib Restore the hwofs functionality temporarily disabled by 7ba6ecf216fb15e8b147db2 to prevent issues with iflib. This patch brings the necessary changes to iflib to enable howfs to allow interface restarts without disrupting netmap applications actively using its rings. After this change, it becomes possible for multiple non-cooperating netmap applications to use non-overlapping subsets of the available netmap rings without clashing with each other. PR: 252453 MFC after: 1 week (cherry picked from commit 55f0ad5fdee1a779d6889481ba591a819081b9ca) --- sys/dev/netmap/netmap.c | 94 +++++++++++++++++++++++-------------------------- sys/net/iflib.c | 67 +++++++++++++++++++++++++---------- 2 files changed, 94 insertions(+), 67 deletions(-) diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 982f76d45faa..075c27b7a597 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -633,7 +633,7 @@ void netmap_disable_all_rings(struct ifnet *ifp) { if (NM_NA_VALID(ifp)) { - netmap_set_all_rings(NA(ifp), NM_KR_STOPPED); + netmap_set_all_rings(NA(ifp), NM_KR_LOCKED); } } @@ -4056,75 +4056,71 @@ done: /* - * netmap_reset() is called by the driver routines when reinitializing - * a ring. The driver is in charge of locking to protect the kring. - * If native netmap mode is not set just return NULL. - * If native netmap mode is set, in particular, we have to set nr_mode to - * NKR_NETMAP_ON. + * Reset function to be called by the driver routines when reinitializing + * a hardware ring. The driver is in charge of locking to protect the kring + * while this operation is being performed. This is normally achieved by + * calling netmap_disable_all_rings() before triggering a reset. + * If the kring is not in netmap mode, return NULL to inform the caller + * that this is the case. + * If the kring is in netmap mode, set hwofs so that the netmap indices + * seen by userspace (head/cut/tail) do not change, although the internal + * NIC indices have been reset to 0. + * In any case, adjust kring->nr_mode. */ struct netmap_slot * netmap_reset(struct netmap_adapter *na, enum txrx tx, u_int n, u_int new_cur) { struct netmap_kring *kring; - int new_hwofs, lim; + u_int new_hwtail, new_hwofs; if (!nm_native_on(na)) { nm_prdis("interface not in native netmap mode"); return NULL; /* nothing to reinitialize */ } - /* XXX note- in the new scheme, we are not guaranteed to be - * under lock (e.g. when called on a device reset). - * In this case, we should set a flag and do not trust too - * much the values. In practice: TODO - * - set a RESET flag somewhere in the kring - * - do the processing in a conservative way - * - let the *sync() fixup at the end. - */ if (tx == NR_TX) { if (n >= na->num_tx_rings) return NULL; - kring = na->tx_rings[n]; - - if (kring->nr_pending_mode == NKR_NETMAP_OFF) { - kring->nr_mode = NKR_NETMAP_OFF; - return NULL; - } - - // XXX check whether we should use hwcur or rcur - new_hwofs = kring->nr_hwcur - new_cur; + /* + * Set hwofs to rhead, so that slots[rhead] is mapped to + * the NIC internal slot 0, and thus the netmap buffer + * at rhead is the next to be transmitted. Transmissions + * that were pending before the reset are considered as + * sent, so that we can have hwcur = rhead. All the slots + * are now owned by the user, so we can also reinit hwtail. + */ + new_hwofs = kring->rhead; + new_hwtail = nm_prev(kring->rhead, kring->nkr_num_slots - 1); } else { if (n >= na->num_rx_rings) return NULL; kring = na->rx_rings[n]; - - if (kring->nr_pending_mode == NKR_NETMAP_OFF) { - kring->nr_mode = NKR_NETMAP_OFF; - return NULL; - } - - new_hwofs = kring->nr_hwtail - new_cur; + /* + * Set hwofs to hwtail, so that slots[hwtail] is mapped to + * the NIC internal slot 0, and thus the netmap buffer + * at hwtail is the next to be given to the NIC. + * Unread slots (the ones in [rhead,hwtail[) are owned by + * the user, and thus the caller cannot give them + * to the NIC right now. + */ + new_hwofs = kring->nr_hwtail; + new_hwtail = kring->nr_hwtail; } - lim = kring->nkr_num_slots - 1; - if (new_hwofs > lim) - new_hwofs -= lim + 1; - - /* Always set the new offset value and realign the ring. */ - if (netmap_debug & NM_DEBUG_ON) - nm_prinf("%s %s%d hwofs %d -> %d, hwtail %d -> %d", - na->name, - tx == NR_TX ? "TX" : "RX", n, - kring->nkr_hwofs, new_hwofs, - kring->nr_hwtail, - tx == NR_TX ? lim : kring->nr_hwtail); - kring->nkr_hwofs = new_hwofs; - if (tx == NR_TX) { - kring->nr_hwtail = kring->nr_hwcur + lim; - if (kring->nr_hwtail > lim) - kring->nr_hwtail -= lim + 1; + if (kring->nr_pending_mode == NKR_NETMAP_OFF) { + kring->nr_mode = NKR_NETMAP_OFF; + return NULL; } + if (netmap_verbose) { + nm_prinf("%s, hc %u->%u, ht %u->%u, ho %u->%u", kring->name, + kring->nr_hwcur, kring->rhead, + kring->nr_hwtail, new_hwtail, + kring->nkr_hwofs, new_hwofs); + } + kring->nr_hwcur = kring->rhead; + kring->nr_hwtail = new_hwtail; + kring->nkr_hwofs = new_hwofs; /* * Wakeup on the individual and global selwait @@ -4226,7 +4222,7 @@ nm_set_native_flags(struct netmap_adapter *na) struct ifnet *ifp = na->ifp; /* We do the setup for intercepting packets only if we are the - * first user of this adapapter. */ + * first user of this adapter. */ if (na->active_fds > 0) { return; } diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 3e115e992e4a..1653fd31a7f7 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -807,11 +807,6 @@ iflib_netmap_register(struct netmap_adapter *na, int onoff) int status; CTX_LOCK(ctx); - IFDI_INTR_DISABLE(ctx); - - /* Tell the stack that the interface is no longer active */ - ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - if (!CTX_IS_VF(ctx)) IFDI_CRCSTRIP_SET(ctx, onoff, iflib_crcstrip); @@ -820,7 +815,10 @@ iflib_netmap_register(struct netmap_adapter *na, int onoff) /* * Enable (or disable) netmap flags, and intercept (or restore) * ifp->if_transmit. This is done once the device has been stopped - * to prevent race conditions. + * to prevent race conditions. Also, this must be done after + * calling netmap_disable_all_rings() and before calling + * netmap_enable_all_rings(), so that these two functions see the + * updated state of the NAF_NETMAP_ON bit. */ if (onoff) { nm_set_native_flags(na); @@ -842,13 +840,13 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init) { struct netmap_adapter *na = kring->na; u_int const lim = kring->nkr_num_slots - 1; - u_int nm_i = kring->nr_hwcur; struct netmap_ring *ring = kring->ring; bus_dmamap_t *map; struct if_rxd_update iru; if_ctx_t ctx = rxq->ifr_ctx; iflib_fl_t fl = &rxq->ifr_fl[0]; u_int nic_i_first, nic_i; + u_int nm_i; int i, n; #if IFLIB_DEBUG_COUNTERS int rf_count = 0; @@ -857,30 +855,42 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init) /* * This function is used both at initialization and in rxsync. * At initialization we need to prepare (with isc_rxd_refill()) - * all the (N) netmap buffers in the ring, in such a way to keep - * fl->ifl_pidx and kring->nr_hwcur in sync (except for - * kring->nkr_hwofs); at rxsync time, both indexes point to the - * next buffer to be refilled. + * all the netmap buffers currently owned by the kernel, in + * such a way to keep fl->ifl_pidx and kring->nr_hwcur in sync + * (except for kring->nkr_hwofs). These may be less than + * kring->nkr_num_slots if netmap_reset() was called while + * an application using the kring that still owned some + * buffers. + * At rxsync time, both indexes point to the next buffer to be + * refilled. * In any case we publish (with isc_rxd_flush()) up to * (fl->ifl_pidx - 1) % N (included), to avoid the NIC tail/prod * pointer to overrun the head/cons pointer, although this is * not necessary for some NICs (e.g. vmx). */ - if (__predict_false(init)) - n = kring->nkr_num_slots; - else { - n = kring->rhead - nm_i; + if (__predict_false(init)) { + n = kring->nkr_num_slots - nm_kr_rxspace(kring); + } else { + n = kring->rhead - kring->nr_hwcur; if (n == 0) return (0); /* Nothing to do. */ if (n < 0) n += kring->nkr_num_slots; } - /* Start to refill from nr_hwcur, publishing n buffers. */ iru_init(&iru, rxq, 0 /* flid */); map = fl->ifl_sds.ifsd_map; nic_i = fl->ifl_pidx; - MPASS(nic_i == netmap_idx_k2n(kring, nm_i)); + nm_i = netmap_idx_n2k(kring, nic_i); + if (__predict_false(init)) { + /* + * On init/reset, nic_i must be 0, and we must + * start to refill from hwtail (see netmap_reset()). + */ + MPASS(nic_i == 0); + MPASS(nm_i == kring->nr_hwtail); + } else + MPASS(nm_i == kring->nr_hwcur); DBG_COUNTER_INC(fl_refills); while (n > 0) { #if IFLIB_DEBUG_COUNTERS @@ -920,7 +930,10 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init) ctx->isc_rxd_refill(ctx->ifc_softc, &iru); } fl->ifl_pidx = nic_i; - MPASS(!init || nm_i == 0); + /* + * At the end of the loop we must have refilled everything + * we could possibly refill. + */ MPASS(nm_i == kring->rhead); kring->nr_hwcur = nm_i; @@ -1302,6 +1315,8 @@ iflib_netmap_timer(void *arg) #define iflib_netmap_txq_init(ctx, txq) (0) #define iflib_netmap_rxq_init(ctx, rxq) (0) #define iflib_netmap_detach(ifp) +#define netmap_enable_all_rings(ifp) +#define netmap_disable_all_rings(ifp) #define iflib_netmap_attach(ctx) (0) #define netmap_rx_irq(ifp, qid, budget) (0) @@ -2452,6 +2467,12 @@ iflib_init_locked(if_ctx_t ctx) if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); IFDI_INTR_DISABLE(ctx); + /* + * See iflib_stop(). Useful in case iflib_init_locked() is + * called without first calling iflib_stop(). + */ + netmap_disable_all_rings(ifp); + tx_ip_csum_flags = scctx->isc_tx_csum_flags & (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_SCTP); tx_ip6_csum_flags = scctx->isc_tx_csum_flags & (CSUM_IP6_TCP | CSUM_IP6_UDP | CSUM_IP6_SCTP); /* Set hardware offload abilities */ @@ -2508,6 +2529,9 @@ done: for (i = 0; i < sctx->isc_ntxqsets; i++, txq++) callout_reset_on(&txq->ift_timer, hz/2, iflib_timer, txq, txq->ift_timer.c_cpu); + + /* Re-enable txsync/rxsync. */ + netmap_enable_all_rings(ifp); } static int @@ -2553,6 +2577,13 @@ iflib_stop(if_ctx_t ctx) IFDI_STOP(ctx); DELAY(1000); + /* + * Stop any pending txsync/rxsync and prevent new ones + * form starting. Processes blocked in poll() will get + * POLLERR. + */ + netmap_disable_all_rings(ctx->ifc_ifp); + iflib_debug_reset(); /* Wait for current tx queue users to exit to disarm watchdog timer. */ for (i = 0; i < scctx->isc_ntxqsets; i++, txq++) { From owner-dev-commits-src-all@freebsd.org Sun Jan 17 13:40:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68E694E977F; Sun, 17 Jan 2021 13:40: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 4DJbdM1zfnz3C7g; Sun, 17 Jan 2021 13:40: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 3603222416; Sun, 17 Jan 2021 13:40: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 10HDe7cs003151; Sun, 17 Jan 2021 13:40:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HDe7nc003148; Sun, 17 Jan 2021 13:40:07 GMT (envelope-from git) Date: Sun, 17 Jan 2021 13:40:07 GMT Message-Id: <202101171340.10HDe7nc003148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vincenzo Maffione Subject: git: fa1a4ff944f4 - stable/12 - netmap: vtnet: stop krings during interface reset 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/stable/12 X-Git-Reftype: branch X-Git-Commit: fa1a4ff944f4b3e841df0cdd67c6373a589ffdd5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 13:40:07 -0000 The branch stable/12 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=fa1a4ff944f4b3e841df0cdd67c6373a589ffdd5 commit fa1a4ff944f4b3e841df0cdd67c6373a589ffdd5 Author: Vincenzo Maffione AuthorDate: 2021-01-09 22:34:10 +0000 Commit: Vincenzo Maffione CommitDate: 2021-01-17 13:38:09 +0000 netmap: vtnet: stop krings during interface reset Similarly to what done for iflib in 1d238b07d5d4d9660ae0e, this patch prevents access to the krings during the interface reset triggered by netmap_register(). MFC after: 1 week (cherry picked from commit 9ac59d42c0b4b6cd9c36a5dace7f49753c2e175a) netmap: vtnet: enable/disable krings on any interface reinit See 3d65fd97e85ab807f3b for a detailed explanation. PR: 252453 MFC after: 1 week (cherry picked from commit bb714db6d39583a9fbf5d11849c5e2365e7c0d80) netmap: vtnet: fix RX initialization after netmap_reset() At device reset, we must not publish those netmap receive buffers that are owned by userspace (nm_kr_rxspace). MFC after: 1 week (cherry picked from commit 3005e10ddbfbec3ecf46a080607bb0d85986eee5) --- sys/dev/netmap/if_vtnet_netmap.h | 21 +++++++++++++-------- sys/dev/netmap/netmap.c | 4 ++++ sys/dev/virtio/network/if_vtnet.c | 10 ++++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/sys/dev/netmap/if_vtnet_netmap.h b/sys/dev/netmap/if_vtnet_netmap.h index 0f686ed60788..cd652938bca5 100644 --- a/sys/dev/netmap/if_vtnet_netmap.h +++ b/sys/dev/netmap/if_vtnet_netmap.h @@ -50,7 +50,7 @@ vtnet_netmap_reg(struct netmap_adapter *na, int state) : VTNET_INIT_NETMAP_EXIT); VTNET_CORE_UNLOCK(sc); - return 0; + return (0); } @@ -213,20 +213,25 @@ vtnet_netmap_rxq_populate(struct vtnet_rxq *rxq) struct netmap_kring *kring; struct netmap_slot *slot; int error; + int num; slot = netmap_reset(na, NR_RX, rxq->vtnrx_id, 0); if (slot == NULL) return -1; kring = na->rx_rings[rxq->vtnrx_id]; - /* Expose all the RX netmap buffers we can. In case of no indirect + /* + * Expose all the RX netmap buffers we can. In case of no indirect * buffers, the number of netmap slots in the RX ring matches the * maximum number of 2-elements sglist that the RX virtqueue can - * accommodate. We need to start from kring->nr_hwcur, which is 0 - * on netmap register and may be different from 0 if a virtio - * re-init happens while the device is in use by netmap. */ - rxq->vtnrx_nm_refill = kring->nr_hwcur; - error = vtnet_netmap_kring_refill(kring, na->num_rx_desc - 1); + * accommodate. We need to start from kring->nr_hwtail, which is 0 + * on the first netmap register and may be different from 0 if a + * virtio re-init (caused by a netma register or i.e., ifconfig) + * happens while the device is in use by netmap. + */ + rxq->vtnrx_nm_refill = kring->nr_hwtail; + num = na->num_rx_desc - 1 - nm_kr_rxspace(kring); + error = vtnet_netmap_kring_refill(kring, num); virtqueue_notify(rxq->vtnrx_vq); return error; @@ -256,7 +261,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int flags) * First part: import newly received packets. * Only accept our own buffers (matching the token). We should only get * matching buffers. The hwtail should never overrun hwcur, because - * we publish only N-1 receive buffers (and non N). + * we publish only N-1 receive buffers (and not N). * In any case we must not leave this routine with the interrupts * disabled, pending packets in the VQ and hwtail == (hwcur - 1), * otherwise the pending packets could stall. diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 075c27b7a597..f75567565bf1 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -616,6 +616,10 @@ netmap_set_all_rings(struct netmap_adapter *na, int stopped) if (!nm_netmap_on(na)) return; + if (netmap_verbose) { + nm_prinf("%s: %sable all rings", na->name, + (stopped ? "dis" : "en")); + } for_rx_tx(t) { for (i = 0; i < netmap_real_rings(na, t); i++) { netmap_set_ring(na, i, t, stopped); diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index ff0a07672f49..6018fe56e360 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -2833,6 +2833,11 @@ vtnet_stop(struct vtnet_softc *sc) /* Only advisory. */ vtnet_disable_interrupts(sc); +#ifdef DEV_NETMAP + /* Stop any pending txsync/rxsync and disable them. */ + netmap_disable_all_rings(ifp); +#endif /* DEV_NETMAP */ + /* * Stop the host adapter. This resets it to the pre-initialized * state. It will not generate any interrupts until after it is @@ -3098,6 +3103,11 @@ vtnet_init_locked(struct vtnet_softc *sc, int init_mode) vtnet_update_link_status(sc); callout_reset(&sc->vtnet_tick_ch, hz, vtnet_tick, sc); +#ifdef DEV_NETMAP + /* Re-enable txsync/rxsync. */ + netmap_enable_all_rings(ifp); +#endif /* DEV_NETMAP */ + return; fail: From owner-dev-commits-src-all@freebsd.org Sun Jan 17 13:40:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8013E4E9DAE; Sun, 17 Jan 2021 13:40: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 4DJbdz3FDKz3CKt; Sun, 17 Jan 2021 13:40: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 625A922700; Sun, 17 Jan 2021 13:40: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 10HDed2E008728; Sun, 17 Jan 2021 13:40:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HDed26008727; Sun, 17 Jan 2021 13:40:39 GMT (envelope-from git) Date: Sun, 17 Jan 2021 13:40:39 GMT Message-Id: <202101171340.10HDed26008727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vincenzo Maffione Subject: git: 45b2c3bec4f2 - stable/12 - re: netmap: enable/disable krings on interface reinit 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 45b2c3bec4f2e8a41fb47d3b0dd7983b0ba81d10 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 13:40:39 -0000 The branch stable/12 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=45b2c3bec4f2e8a41fb47d3b0dd7983b0ba81d10 commit 45b2c3bec4f2e8a41fb47d3b0dd7983b0ba81d10 Author: Vincenzo Maffione AuthorDate: 2021-01-10 15:09:05 +0000 Commit: Vincenzo Maffione CommitDate: 2021-01-17 13:40:31 +0000 re: netmap: enable/disable krings on interface reinit This prevents krings from being used during an interface reset, and notifies the active applications. See also 1d238b07d5d4d9660ae0. MFC after: 1 week (cherry picked from commit 54bbcca4f9790e012e0a0f1512d9c879a48d5293) --- sys/dev/re/if_re.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 3bb80a236f8d..d3080031f3b9 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -3359,6 +3359,10 @@ re_init_locked(struct rl_softc *sc) sc->rl_watchdog_timer = 0; callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); + +#ifdef DEV_NETMAP + netmap_enable_all_rings(ifp); +#endif /* DEV_NETMAP */ } /* @@ -3607,6 +3611,10 @@ re_stop(struct rl_softc *sc) callout_stop(&sc->rl_stat_callout); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); +#ifdef DEV_NETMAP + netmap_disable_all_rings(ifp); +#endif /* DEV_NETMAP */ + /* * Disable accepting frames to put RX MAC into idle state. * Otherwise it's possible to get frames while stop command From owner-dev-commits-src-all@freebsd.org Sun Jan 17 14:03:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B01084EAC85; Sun, 17 Jan 2021 14:03:05 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJc7s31q0z3FJp; Sun, 17 Jan 2021 14:03:04 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 10HE32cB058086; Sun, 17 Jan 2021 06:03:02 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 10HE32Vc058085; Sun, 17 Jan 2021 06:03:02 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net> Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif In-Reply-To: <3a7b249e-3a5b-d237-882d-508f7784c75b@freebsd.org> To: Stefan Esser Date: Sun, 17 Jan 2021 06:03:02 -0800 (PST) CC: rgrimes@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4DJc7s31q0z3FJp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 14:03:05 -0000 -- Start of PGP signed section. [ Charset windows-1252 ignored, treated as US-ASCII ] > Am 17.01.21 um 04:18 schrieb Rodney W. Grimes: > >> The branch main has been updated by glebius: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468f09aa7127b543 > >> > >> commit 7e4eca7136eaa35e15f67682468f09aa7127b543 > >> Author: Gleb Smirnoff > >> AuthorDate: 2021-01-11 20:13:41 +0000 > >> Commit: Gleb Smirnoff > >> CommitDate: 2021-01-15 20:44:06 +0000 > >> > >> Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on > >> remote filesystems. Discussed this with Brooks and he can't find > >> evidence that provoked the change in 2005. If anything gets broken > >> I will fix it in a different way, not via rc sequence change. > > > > This is because /etc/rc.d/tmp has this line: > > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > > and when your doing NFS boots with seperate /usr you do not have > > /usr/bin/grep to run that line. > > > > Almost always the reason things have a REQUIRE: mountcritremote > > is that they use some commands from /usr. Critical statement, :"some commands": you fixed 1 of them, I also so a bit later: if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then mktemp lives in /usr/bin also > This dependency on /usr/bin/grep is easily removed, see: > > https://reviews.freebsd.org/D28209 > I like this fix, less dependance on /usr during boot processing is good. > diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp > index a61321e058ee..2a7205e92b59 100755 > --- a/libexec/rc/rc.d/tmp > +++ b/libexec/rc/rc.d/tmp > @@ -40,10 +40,16 @@ load_rc_config $name > > mount_tmpmfs() > { > - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > - chmod 01777 /tmp > - fi > + while read line; do > + case $line in > + /dev/md[0-9]*\ /tmp) > + return;; > + esac > + done <<*EOF > +$(df /tmp) > +*EOF > + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > + chmod 01777 /tmp > } > > # If we do not have a writable /tmp, create a memory > -- End of PGP section, PGP failed! -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Sun Jan 17 14:18:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4B2C4EACDD; Sun, 17 Jan 2021 14:18:34 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJcTk1grkz3G8h; Sun, 17 Jan 2021 14:18:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1610893111; 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=1kvDZyQAavmbk2zhTzqb4vV5HiorlNnbg0C9FKEFC94=; b=rQDNBRM4wJnCNNvKzOCSHvz4id+tVigLPU/w2xdx/AlxCsJkvFZtdlsBfdPPGTtUzsB2f1 CGIqbCTLsQxxvLtZCr3wwTooQPWMbqvwig8iE256md1X0Ext/A35G6AV7WXCaqRT0ULrEq TFJyXNCRYzh9LNjEdLac9V8+u2DHXeQ= Received: from amy.home (lfbn-idf2-1-745-114.w86-247.abo.wanadoo.fr [86.247.192.114]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 81734850 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 17 Jan 2021 14:18:31 +0000 (UTC) Date: Sun, 17 Jan 2021 15:18:31 +0100 From: Emmanuel Vadot To: rgrimes@freebsd.org Cc: "Rodney W. Grimes" , Stefan Esser , Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif Message-Id: <20210117151831.25facacac2d981df4b0ab54e@bidouilliste.com> In-Reply-To: <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net> References: <3a7b249e-3a5b-d237-882d-508f7784c75b@freebsd.org> <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DJcTk1grkz3G8h X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 14:18:35 -0000 Hi Rod, Could you please fix your mailer, those issues have been buging me for years : On Sun, 17 Jan 2021 06:03:02 -0800 (PST) "Rodney W. Grimes" wrote: > -- Start of PGP signed section. > [ Charset windows-1252 ignored, treated as US-ASCII ] I don't know why those lines are inserted, especially since your mail isn't pgp signed. > > Am 17.01.21 um 04:18 schrieb Rodney W. Grimes: Since your mailer doesn't add a quote introduction it always looks like that you're replying to the previous mail (and here it looks like you're replying to yourself). > > >> The branch main has been updated by glebius: > > >> > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468f09aa7127b543 > > >> > > >> commit 7e4eca7136eaa35e15f67682468f09aa7127b543 > > >> Author: Gleb Smirnoff > > >> AuthorDate: 2021-01-11 20:13:41 +0000 > > >> Commit: Gleb Smirnoff > > >> CommitDate: 2021-01-15 20:44:06 +0000 > > >> > > >> Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on > > >> remote filesystems. Discussed this with Brooks and he can't find > > >> evidence that provoked the change in 2005. If anything gets broken > > >> I will fix it in a different way, not via rc sequence change. > > > > > > This is because /etc/rc.d/tmp has this line: > > > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > > > > and when your doing NFS boots with seperate /usr you do not have > > > /usr/bin/grep to run that line. > > > > > > Almost always the reason things have a REQUIRE: mountcritremote > > > is that they use some commands from /usr. > > Critical statement, :"some commands": you fixed 1 of them, > I also so a bit later: > if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then > > mktemp lives in /usr/bin also > > > This dependency on /usr/bin/grep is easily removed, see: > > > > https://reviews.freebsd.org/D28209 > > > > I like this fix, less dependance on /usr during boot > processing is good. > > > diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp > > index a61321e058ee..2a7205e92b59 100755 > > --- a/libexec/rc/rc.d/tmp > > +++ b/libexec/rc/rc.d/tmp > > @@ -40,10 +40,16 @@ load_rc_config $name > > > > mount_tmpmfs() > > { > > - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > - chmod 01777 /tmp > > - fi > > + while read line; do > > + case $line in > > + /dev/md[0-9]*\ /tmp) > > + return;; > > + esac > > + done <<*EOF > > +$(df /tmp) > > +*EOF > > + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > + chmod 01777 /tmp > > } > > > > # If we do not have a writable /tmp, create a memory > > > -- End of PGP section, PGP failed! See, not pgp signed. Cheers, > -- > Rod Grimes rgrimes@freebsd.org -- Emmanuel Vadot From owner-dev-commits-src-all@freebsd.org Sun Jan 17 14:48:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6316C4EBB53; Sun, 17 Jan 2021 14:48:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJd7s5xlcz3HW3; Sun, 17 Jan 2021 14:48:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id 19LZlgvZtbYg319LblIoiw; Sun, 17 Jan 2021 07:48:07 -0700 X-Authority-Analysis: v=2.4 cv=Q4RsX66a c=1 sm=1 tr=0 ts=60044e27 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=EmqxpYm9HcoA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=WG0phvZHu88vMCuU940A:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=pHzHmUro8NiASowvMSCR:22 a=n87TN5wuljxrRezIQYnT:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id C1D60C5F; Sun, 17 Jan 2021 06:48:04 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 10HEm4Af008925; Sun, 17 Jan 2021 06:48:04 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202101171448.10HEm4Af008925@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Stefan Esser , Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif In-reply-to: <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net> References: <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Sun, 17 Jan 2021 06:03:02 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 17 Jan 2021 06:48:04 -0800 X-CMAE-Envelope: MS4xfIxTGiYKw+K88lVNhcEV0RAX0/BFYit/QduhDC8WlexNaaR4T5VJbRo8nD4EEBS1DLxz5DFhyc/mmg5WjTkFGhSAwdtXAP7qbYIabwUKODDqF0t2p9Ub NeHTFVbwHUXVtsvb6mCAHLXXZHHUopJ4Y1v9tfxqbVmPZk5vzRRqNZVU84dt9PsOYnsfgOSvC0VJ/h/hjDWihLG4qb0Wwnq8A7KXmfuovGNBxCuu1dQPgiXm BQZREnLlsiEAu35jCvH9423aJgVkDxiLg3Y+ii2m/+ixGoQpfp/SDIU+dl9IpDbEKCpiznZo/qZziXnN3zLBRe1TIXVTwCfUNCYX0kfmoKlCn1zABp0zCFW3 NiDYhtmiU2jEbnPFRC9nRXysVqlzEM0dXKnm/ItfZxvJKK5jnds= X-Rspamd-Queue-Id: 4DJd7s5xlcz3HW3 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 14:48:10 -0000 In message <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > -- Start of PGP signed section. > [ Charset windows-1252 ignored, treated as US-ASCII ] > > > Am 17.01.21 um 04:18 schrieb Rodney W. Grimes: > > >> The branch main has been updated by glebius: > > >> > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468 > f09aa7127b543 > > >> > > >> commit 7e4eca7136eaa35e15f67682468f09aa7127b543 > > >> Author: Gleb Smirnoff > > >> AuthorDate: 2021-01-11 20:13:41 +0000 > > >> Commit: Gleb Smirnoff > > >> CommitDate: 2021-01-15 20:44:06 +0000 > > >> > > >> Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on > > >> remote filesystems. Discussed this with Brooks and he can't find > > >> evidence that provoked the change in 2005. If anything gets broken > > >> I will fix it in a different way, not via rc sequence change. > > > > > > This is because /etc/rc.d/tmp has this line: > > > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > > > > and when your doing NFS boots with seperate /usr you do not have > > > /usr/bin/grep to run that line. > > > > > > Almost always the reason things have a REQUIRE: mountcritremote > > > is that they use some commands from /usr. > > Critical statement, :"some commands": you fixed 1 of them, > I also so a bit later: > if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then > > mktemp lives in /usr/bin also > > > This dependency on /usr/bin/grep is easily removed, see: > > > > https://reviews.freebsd.org/D28209 > > > > I like this fix, less dependance on /usr during boot > processing is good. I left a comment in the review. I'll leave it below too. Like Rod, I agree this is a good fix. > > > diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp > > index a61321e058ee..2a7205e92b59 100755 > > --- a/libexec/rc/rc.d/tmp > > +++ b/libexec/rc/rc.d/tmp > > @@ -40,10 +40,16 @@ load_rc_config $name > > > > mount_tmpmfs() > > { > > - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > - chmod 01777 /tmp > > - fi > > + while read line; do > > + case $line in > > + /dev/md[0-9]*\ /tmp) > > + return;; > > + esac > > + done <<*EOF > > +$(df /tmp) > > +*EOF df /tmp | while read line ... looks cleaner. Otherwise I agree this is a better approach. > > + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > + chmod 01777 /tmp > > } > > > > # If we do not have a writable /tmp, create a memory > > > -- End of PGP section, PGP failed! > > -- > Rod Grimes rgrimes@freebsd.or > g > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-all@freebsd.org Sun Jan 17 14:48:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1547E4EBA3C; Sun, 17 Jan 2021 14:48:28 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJd8C5dnxz3HlC; Sun, 17 Jan 2021 14:48:27 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 10HEmI3s058239; Sun, 17 Jan 2021 06:48:18 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 10HEmImr058238; Sun, 17 Jan 2021 06:48:18 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202101171448.10HEmImr058238@gndrsh.dnsmgr.net> Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif In-Reply-To: <20210117151831.25facacac2d981df4b0ab54e@bidouilliste.com> To: Emmanuel Vadot Date: Sun, 17 Jan 2021 06:48:18 -0800 (PST) CC: rgrimes@freebsd.org, "Rodney W. Grimes" , Stefan Esser , Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4DJd8C5dnxz3HlC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 14:48:28 -0000 > > Hi Rod, > > Could you please fix your mailer, those issues have been buging me for > years : Your mis-reading the quoted text, that is what my mailer is saying about the incoming mail, aka the below WAS pgp signed, and my mailer did not process that PGP signature. My mailer is not > > On Sun, 17 Jan 2021 06:03:02 -0800 (PST) > "Rodney W. Grimes" wrote: > > > -- Start of PGP signed section. > > [ Charset windows-1252 ignored, treated as US-ASCII ] > > I don't know why those lines are inserted, especially since your mail > isn't pgp signed. Those are quoted lines, aka my mailer failed the PGP. I usually do delete these. > > > > Am 17.01.21 um 04:18 schrieb Rodney W. Grimes: > > Since your mailer doesn't add a quote introduction it always looks > like that you're replying to the previous mail (and here it looks like > you're replying to yourself). The fact that the lines have added the leading "> " indicates otherwise. > > > >> The branch main has been updated by glebius: > > > >> > > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468f09aa7127b543 > > > >> > > > >> commit 7e4eca7136eaa35e15f67682468f09aa7127b543 > > > >> Author: Gleb Smirnoff > > > >> AuthorDate: 2021-01-11 20:13:41 +0000 > > > >> Commit: Gleb Smirnoff > > > >> CommitDate: 2021-01-15 20:44:06 +0000 > > > >> > > > >> Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on > > > >> remote filesystems. Discussed this with Brooks and he can't find > > > >> evidence that provoked the change in 2005. If anything gets broken > > > >> I will fix it in a different way, not via rc sequence change. > > > > > > > > This is because /etc/rc.d/tmp has this line: > > > > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > > > > > > and when your doing NFS boots with seperate /usr you do not have > > > > /usr/bin/grep to run that line. > > > > > > > > Almost always the reason things have a REQUIRE: mountcritremote > > > > is that they use some commands from /usr. > > > > Critical statement, :"some commands": you fixed 1 of them, > > I also so a bit later: > > if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then > > > > mktemp lives in /usr/bin also > > > > > This dependency on /usr/bin/grep is easily removed, see: > > > > > > https://reviews.freebsd.org/D28209 > > > > > > > I like this fix, less dependance on /usr during boot > > processing is good. > > > > > diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp > > > index a61321e058ee..2a7205e92b59 100755 > > > --- a/libexec/rc/rc.d/tmp > > > +++ b/libexec/rc/rc.d/tmp > > > @@ -40,10 +40,16 @@ load_rc_config $name > > > > > > mount_tmpmfs() > > > { > > > - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > > - chmod 01777 /tmp > > > - fi > > > + while read line; do > > > + case $line in > > > + /dev/md[0-9]*\ /tmp) > > > + return;; > > > + esac > > > + done <<*EOF > > > +$(df /tmp) > > > +*EOF > > > + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > > + chmod 01777 /tmp > > > } > > > > > > # If we do not have a writable /tmp, create a memory > > > > > -- End of PGP section, PGP failed! > > See, not pgp signed. > > Cheers, > > > -- > > Rod Grimes rgrimes@freebsd.org > > > -- > Emmanuel Vadot > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Sun Jan 17 14:58:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 688594EBDC0; Sun, 17 Jan 2021 14:58:57 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJdNJ5DSnz3JYY; Sun, 17 Jan 2021 14:58:56 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1610895534; 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=sOvILB3lHgT9RHk8d6sRGI+26HsQDtS7pL62YgSs/uk=; b=Iuy6bK5QrJ8y5QhYMOx+mNiRdP2HKUUxq0ilDF4XDEQOMOipHBk5+2kDbAOuIf+fMJto9/ 0+kypelaOAx9Q59Kb/sEi/qlQGqw64bO23i7wVrIGroCLAvjrAmd+bsADsE9N4YQLtFhds e1eVry5l0IOpJ6Kmrx0sI6cc9HQzYAM= Received: from amy.home (lfbn-idf2-1-745-114.w86-247.abo.wanadoo.fr [86.247.192.114]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 5ffb0e3f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 17 Jan 2021 14:58:54 +0000 (UTC) Date: Sun, 17 Jan 2021 15:58:54 +0100 From: Emmanuel Vadot To: rgrimes@freebsd.org Cc: "Rodney W. Grimes" , Stefan Esser , Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif Message-Id: <20210117155854.b9abb9ba7efa786c21308b17@bidouilliste.com> In-Reply-To: <202101171448.10HEmImr058238@gndrsh.dnsmgr.net> References: <20210117151831.25facacac2d981df4b0ab54e@bidouilliste.com> <202101171448.10HEmImr058238@gndrsh.dnsmgr.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DJdNJ5DSnz3JYY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 14:58:57 -0000 On Sun, 17 Jan 2021 06:48:18 -0800 (PST) "Rodney W. Grimes" wrote: > > > > Hi Rod, > > > > Could you please fix your mailer, those issues have been buging me for > > years : > > Your mis-reading the quoted text, that is what my mailer is > saying about the incoming mail, aka the below WAS pgp signed, > and my mailer did not process that PGP signature. > My mailer is not > > > > On Sun, 17 Jan 2021 06:03:02 -0800 (PST) > > "Rodney W. Grimes" wrote: > > > > > -- Start of PGP signed section. > > > [ Charset windows-1252 ignored, treated as US-ASCII ] > > > > I don't know why those lines are inserted, especially since your mail > > isn't pgp signed. > > Those are quoted lines, aka my mailer failed the PGP. I usually > do delete these. Those aren't quoted lines, those are lines inserted by your mailer when you reply. (Or when you read no idea don't really care). > > > > > > > Am 17.01.21 um 04:18 schrieb Rodney W. Grimes: > > > > Since your mailer doesn't add a quote introduction it always looks > > like that you're replying to the previous mail (and here it looks like > > you're replying to yourself). > > The fact that the lines have added the leading "> " indicates otherwise. And the fact that everyone else on mailing list starts their reply with something like "On XXX blah said :" and you're not making it really hard to read your replies. > > > > >> The branch main has been updated by glebius: > > > > >> > > > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468f09aa7127b543 > > > > >> > > > > >> commit 7e4eca7136eaa35e15f67682468f09aa7127b543 > > > > >> Author: Gleb Smirnoff > > > > >> AuthorDate: 2021-01-11 20:13:41 +0000 > > > > >> Commit: Gleb Smirnoff > > > > >> CommitDate: 2021-01-15 20:44:06 +0000 > > > > >> > > > > >> Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on > > > > >> remote filesystems. Discussed this with Brooks and he can't find > > > > >> evidence that provoked the change in 2005. If anything gets broken > > > > >> I will fix it in a different way, not via rc sequence change. > > > > > > > > > > This is because /etc/rc.d/tmp has this line: > > > > > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > > > > > > > > and when your doing NFS boots with seperate /usr you do not have > > > > > /usr/bin/grep to run that line. > > > > > > > > > > Almost always the reason things have a REQUIRE: mountcritremote > > > > > is that they use some commands from /usr. > > > > > > Critical statement, :"some commands": you fixed 1 of them, > > > I also so a bit later: > > > if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then > > > > > > mktemp lives in /usr/bin also > > > > > > > This dependency on /usr/bin/grep is easily removed, see: > > > > > > > > https://reviews.freebsd.org/D28209 > > > > > > > > > > I like this fix, less dependance on /usr during boot > > > processing is good. > > > > > > > diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp > > > > index a61321e058ee..2a7205e92b59 100755 > > > > --- a/libexec/rc/rc.d/tmp > > > > +++ b/libexec/rc/rc.d/tmp > > > > @@ -40,10 +40,16 @@ load_rc_config $name > > > > > > > > mount_tmpmfs() > > > > { > > > > - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > > - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > > > - chmod 01777 /tmp > > > > - fi > > > > + while read line; do > > > > + case $line in > > > > + /dev/md[0-9]*\ /tmp) > > > > + return;; > > > > + esac > > > > + done <<*EOF > > > > +$(df /tmp) > > > > +*EOF > > > > + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > > > + chmod 01777 /tmp > > > > } > > > > > > > > # If we do not have a writable /tmp, create a memory > > > > > > > -- End of PGP section, PGP failed! > > > > See, not pgp signed. > > > > Cheers, > > > > > -- > > > Rod Grimes rgrimes@freebsd.org > > > > > > -- > > Emmanuel Vadot > > > > -- > Rod Grimes rgrimes@freebsd.org -- Emmanuel Vadot From owner-dev-commits-src-all@freebsd.org Sun Jan 17 16:21:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8AF9E4EEA70; Sun, 17 Jan 2021 16:21: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 4DJgCD3ZgYz3PZY; Sun, 17 Jan 2021 16:21: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 6DB0E242C1; Sun, 17 Jan 2021 16:21: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 10HGLCaX019339; Sun, 17 Jan 2021 16:21:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HGLCX9019338; Sun, 17 Jan 2021 16:21:12 GMT (envelope-from git) Date: Sun, 17 Jan 2021 16:21:12 GMT Message-Id: <202101171621.10HGLCX9019338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 5c6c1b5421d7 - main - Add myself (donner) as src committer. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c6c1b5421d777a614fc3ff63adafd10c8b66caa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 16:21:12 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=5c6c1b5421d777a614fc3ff63adafd10c8b66caa commit 5c6c1b5421d777a614fc3ff63adafd10c8b66caa Author: Lutz Donnerhacke AuthorDate: 2021-01-17 12:00:55 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-01-17 16:19:45 +0000 Add myself (donner) as src committer. Reviewed by: kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D27968 --- share/misc/committers-src.dot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 212c1b613029..e855a203e91b 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -157,6 +157,7 @@ dexuan [label="Dexuan Cui\ndexuan@FreeBSD.org\n2016/10/24"] dfr [label="Doug Rabson\ndfr@FreeBSD.org\n????/??/??"] dg [label="David Greenman\ndg@FreeBSD.org\n1993/06/14"] dim [label="Dimitry Andric\ndim@FreeBSD.org\n2010/08/30"] +donner [label="Lutz Donnerhacke\ndonner@FreeBSD.org\n2021/01/14"] dougm [label="Doug Moore\ndougm@FreeBSD.org\n2019/04/30"] dteske [label="Devin Teske\ndteske@FreeBSD.org\n2012/04/10"] dumbbell [label="Jean-Sebastien Pedron\ndumbbell@FreeBSD.org\n2004/11/29"] @@ -705,6 +706,7 @@ kib -> zont kmacy -> lstewart +kp -> donner kp -> nick marcel -> allanjude @@ -778,6 +780,7 @@ peter -> jayanth peter -> ps philip -> benl +philip -> donner philip -> ed philip -> jls philip -> matteo From owner-dev-commits-src-all@freebsd.org Sun Jan 17 16:43:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F9724EF9A8; Sun, 17 Jan 2021 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJghQ3F8fz3RLF; Sun, 17 Jan 2021 16: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 624F224A48; Sun, 17 Jan 2021 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10HGh24E046735; Sun, 17 Jan 2021 16: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 10HGh2OV046734; Sun, 17 Jan 2021 16:43:02 GMT (envelope-from git) Date: Sun, 17 Jan 2021 16:43:02 GMT Message-Id: <202101171643.10HGh2OV046734@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: 0f2434ea000e - main - loader: Partial revert of 987eabdc2ae1 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: 0f2434ea000e02e6b1f7f40f489c346c64445242 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 16:43:02 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=0f2434ea000e02e6b1f7f40f489c346c64445242 commit 0f2434ea000e02e6b1f7f40f489c346c64445242 Author: Emmanuel Vadot AuthorDate: 2021-01-17 16:41:25 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-17 16:41:25 +0000 loader: Partial revert of 987eabdc2ae1 The arm relocation code doesn't not work and make loader not loading dependancies. Reported by: Dr. Rolf Jansen --- stand/common/reloc_elf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stand/common/reloc_elf.c b/stand/common/reloc_elf.c index f8417aeeb64a..56b661dc21bd 100644 --- a/stand/common/reloc_elf.c +++ b/stand/common/reloc_elf.c @@ -175,8 +175,7 @@ __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, const void *reldata, } return (0); -#elif defined(__aarch64__) || defined(__arm__) || defined(__powerpc__) || \ - defined(__riscv) +#elif defined(__aarch64__) || defined(__powerpc__) || defined(__riscv) Elf_Size w; const Elf_Rela *rela; @@ -188,8 +187,6 @@ __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, const void *reldata, switch (ELF_R_TYPE(rela->r_info)) { #if defined(__aarch64__) case R_AARCH64_RELATIVE: -#elif defined(__arm__) - case R_ARM_RELATIVE: #elif defined(__powerpc__) case R_PPC_RELATIVE: #elif defined(__riscv) From owner-dev-commits-src-all@freebsd.org Sun Jan 17 16:46:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B0F04EFB1D; Sun, 17 Jan 2021 16:46: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 4DJgmT19Ddz3hD0; Sun, 17 Jan 2021 16:46: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 1692424A49; Sun, 17 Jan 2021 16:46: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 10HGkW33047389; Sun, 17 Jan 2021 16:46:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HGkWuI047388; Sun, 17 Jan 2021 16:46:32 GMT (envelope-from git) Date: Sun, 17 Jan 2021 16:46:32 GMT Message-Id: <202101171646.10HGkWuI047388@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: d002814d6b8e - main - loader: Use TERM_EMU for arm and arm64 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: d002814d6b8edc9cf85f1653ebb568e59f72f9ad Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 16:46:33 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d002814d6b8edc9cf85f1653ebb568e59f72f9ad commit d002814d6b8edc9cf85f1653ebb568e59f72f9ad Author: Emmanuel Vadot AuthorDate: 2021-01-14 11:47:25 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-17 16:44:16 +0000 loader: Use TERM_EMU for arm and arm64 Even if it didn't behave well previously this is fixed. Tested on: OrangePi One (armv7 u-boot) (serial only and serial + HDMI) Tested on: Pine64-LTS (aarch64 u-boot) (serial only and serial + HDMI) Tested on: Honeycomb (aarch64 EDK2) (serial only) Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28153 --- stand/efi/libefi/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/stand/efi/libefi/Makefile b/stand/efi/libefi/Makefile index 6d342aaa8007..e838a5a10ac4 100644 --- a/stand/efi/libefi/Makefile +++ b/stand/efi/libefi/Makefile @@ -65,9 +65,6 @@ CFLAGS+= -I${LDRSRC} # Handle FreeBSD specific %b and %D printf format specifiers CFLAGS+= ${FORMAT_EXTENSIONS} -# Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64" CFLAGS+= -DTERM_EMU -.endif .include From owner-dev-commits-src-all@freebsd.org Sun Jan 17 17:22:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C52CE4D08B5; Sun, 17 Jan 2021 17:22: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 4DJhYt4w8sz3kK6; Sun, 17 Jan 2021 17: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 9B80324BE3; Sun, 17 Jan 2021 17: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 10HHMQkc098666; Sun, 17 Jan 2021 17: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 10HHMQwh098665; Sun, 17 Jan 2021 17:22:26 GMT (envelope-from git) Date: Sun, 17 Jan 2021 17:22:26 GMT Message-Id: <202101171722.10HHMQwh098665@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: e83b514a9563 - main - cat: depend on Makefile to rebuild when WITH_CASPER changes 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: e83b514a9563d5812c9d158ff976f0de96bd90e0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 17:22:26 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e83b514a9563d5812c9d158ff976f0de96bd90e0 commit e83b514a9563d5812c9d158ff976f0de96bd90e0 Author: Ed Maste AuthorDate: 2021-01-17 17:15:40 +0000 Commit: Ed Maste CommitDate: 2021-01-17 17:19:00 +0000 cat: depend on Makefile to rebuild when WITH_CASPER changes We try to ensure building WITHOUT_CLEAN (or -DNO_CLEAN) works on an ongoing basis. b7ab6832cd98 changed cat to build w/o -DWITH_CASPER by default; add a cat.o dependency on the Makefile so that it gets rebuilt. --- bin/cat/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cat/Makefile b/bin/cat/Makefile index cce69d8aad9e..06bb071363f8 100644 --- a/bin/cat/Makefile +++ b/bin/cat/Makefile @@ -22,5 +22,7 @@ SUBDIR.${MK_TESTS}+= tests #LIBADD+= cap_net #CFLAGS+=-DWITH_CASPER #.endif +# Depend on Makefile to rebiuld when WITH_CASPER changes +cat.o: Makefile .include From owner-dev-commits-src-all@freebsd.org Sun Jan 17 17:29:54 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E7964D0E05; Sun, 17 Jan 2021 17:29: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 4DJhkV2Bmlz3kP6; Sun, 17 Jan 2021 17:29: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 2F91D252BE; Sun, 17 Jan 2021 17:29: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 10HHTs6C099909; Sun, 17 Jan 2021 17:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HHTsHk099908; Sun, 17 Jan 2021 17:29:54 GMT (envelope-from git) Date: Sun, 17 Jan 2021 17:29:54 GMT Message-Id: <202101171729.10HHTsHk099908@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: 3b15beb30b3b - main - Implement malloc_domainset_aligned(9). 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: 3b15beb30b3b4ba17bae3d1d43c8c04ff862bb57 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 17:29:54 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3b15beb30b3b4ba17bae3d1d43c8c04ff862bb57 commit 3b15beb30b3b4ba17bae3d1d43c8c04ff862bb57 Author: Konstantin Belousov AuthorDate: 2021-01-14 03:59:34 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 17:29:05 +0000 Implement malloc_domainset_aligned(9). Change the power-of-two malloc zones to require alignment equal to the size [*]. Current uma allocator already provides such alignment, so in fact this change does not change anything except providing future-proof setup. Suggested by: markj [*] Reviewed by: andrew, jah, markj Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28147 --- sys/kern/kern_malloc.c | 28 +++++++++++++++++++++++++++- sys/sys/malloc.h | 3 +++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index f79352f2fbfd..232472708b9b 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -763,6 +763,28 @@ malloc_domainset_exec(size_t size, struct malloc_type *mtp, struct domainset *ds return (malloc_large(&size, mtp, ds, flags DEBUG_REDZONE_ARG)); } +void * +malloc_domainset_aligned(size_t size, size_t align, + struct malloc_type *mtp, struct domainset *ds, int flags) +{ + void *res; + + KASSERT(align != 0 && powerof2(align), + ("malloc_domainset_aligned: wrong align %#zx size %#zx", + align, size)); + KASSERT(align <= kmemzones[nitems(kmemzones) - 2].kz_size, + ("malloc_domainset_aligned: align %#zx (size %#zx) too large", + align, size)); + + if (size < align) + size = align; + res = malloc_domainset(size, mtp, ds, flags); + KASSERT(res == NULL || ((uintptr_t)res & (align - 1)) == 0, + ("malloc_domainset_aligned: result not aligned %p size %#zx " + "align %#zx", res, size, align)); + return (res); +} + void * mallocarray(size_t nmemb, size_t size, struct malloc_type *type, int flags) { @@ -1146,8 +1168,12 @@ mallocinit(void *dummy) for (i = 0, indx = 0; kmemzones[indx].kz_size != 0; indx++) { int size = kmemzones[indx].kz_size; const char *name = kmemzones[indx].kz_name; + size_t align; int subzone; + align = UMA_ALIGN_PTR; + if (powerof2(size) && size > sizeof(void *)) + align = size - 1; for (subzone = 0; subzone < numzones; subzone++) { kmemzones[indx].kz_zone[subzone] = uma_zcreate(name, size, @@ -1156,7 +1182,7 @@ mallocinit(void *dummy) #else NULL, NULL, NULL, NULL, #endif - UMA_ALIGN_PTR, UMA_ZONE_MALLOC); + align, UMA_ZONE_MALLOC); } for (;i <= size; i+= KMEM_ZBASE) kmemsize[i >> KMEM_ZSHIFT] = indx; diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index bf87e3168e01..a11dd767efc5 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -261,6 +261,9 @@ void *realloc(void *addr, size_t size, struct malloc_type *type, int flags) __result_use_check __alloc_size(2); void *reallocf(void *addr, size_t size, struct malloc_type *type, int flags) __result_use_check __alloc_size(2); +void *malloc_domainset_aligned(size_t size, size_t align, + struct malloc_type *mtp, struct domainset *ds, int flags) + __malloc_like __result_use_check __alloc_size(1); struct malloc_type *malloc_desc2type(const char *desc); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 17:29:55 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F6EC4D0D35; Sun, 17 Jan 2021 17:29: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 4DJhkW2Yn9z3kXq; Sun, 17 Jan 2021 17:29: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 4792524EDB; Sun, 17 Jan 2021 17:29: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 10HHTtiH099932; Sun, 17 Jan 2021 17:29:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HHTtaU099931; Sun, 17 Jan 2021 17:29:55 GMT (envelope-from git) Date: Sun, 17 Jan 2021 17:29:55 GMT Message-Id: <202101171729.10HHTtaU099931@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: f3ea417f96b0 - main - x86 busdma_bounce: use malloc_domainset_aligned(9). 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: f3ea417f96b011a7eb4f43e3142e572833287ef4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 17:29:55 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f3ea417f96b011a7eb4f43e3142e572833287ef4 commit f3ea417f96b011a7eb4f43e3142e572833287ef4 Author: Konstantin Belousov AuthorDate: 2021-01-14 04:02:21 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-17 17:29:05 +0000 x86 busdma_bounce: use malloc_domainset_aligned(9). This stops busdma bounce making assumptions about alignment of malloc(9) results, which are no longer true. Also add assert that the result of malloc_aligned() fits into single page, which is the assumption of the code. Reported by: dim Reviewed by: andrew, jah, markj Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28147 --- sys/x86/x86/busdma_bounce.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c index 65fbbb7ec1a4..75fdf4143b9b 100644 --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -433,9 +433,9 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, /* * Allocate the buffer from the malloc(9) allocator if... - * - It's small enough to fit into a single power of two sized bucket. - * - The alignment is less than or equal to the maximum size + * - It's small enough to fit into a single page. * - The low address requirement is fulfilled. + * - Default cache attributes are requested (WB). * else allocate non-contiguous pages if... * - The page count that could get allocated doesn't exceed * nsegments also when the maximum segment size is less @@ -445,19 +445,19 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, * else allocate a block of contiguous pages because one or more of the * constraints is something that only the contig allocator can fulfill. * - * NOTE: The (dmat->common.alignment <= dmat->maxsize) check - * below is just a quick hack. The exact alignment guarantees - * of malloc(9) need to be nailed down, and the code below - * should be rewritten to take that into account. - * - * In the meantime warn the user if malloc gets it wrong. + * Warn the user if malloc gets it wrong. */ if (dmat->common.maxsize <= PAGE_SIZE && - dmat->common.alignment <= dmat->common.maxsize && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { - *vaddr = malloc_domainset(dmat->common.maxsize, M_DEVBUF, + *vaddr = malloc_domainset_aligned(dmat->common.maxsize, + dmat->common.alignment, M_DEVBUF, DOMAINSET_PREF(dmat->common.domain), mflags); + KASSERT(*vaddr == NULL || ((uintptr_t)*vaddr & PAGE_MASK) + + dmat->common.maxsize <= PAGE_SIZE, + ("bounce_bus_dmamem_alloc: multi-page alloc %p maxsize " + "%#jx align %#jx", *vaddr, (uintmax_t)dmat->common.maxsize, + (uintmax_t)dmat->common.alignment)); } else if (dmat->common.nsegments >= howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && From owner-dev-commits-src-all@freebsd.org Sun Jan 17 18:03:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 088B44D205F for ; Sun, 17 Jan 2021 18:03: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 4DJjTc6g65z3n2w; Sun, 17 Jan 2021 18:03: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 D70EB259CA; Sun, 17 Jan 2021 18:03: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 10HI3mNH051161; Sun, 17 Jan 2021 18:03:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HI3lqU051160; Sun, 17 Jan 2021 18:03:47 GMT (envelope-from git) Date: Sun, 17 Jan 2021 18:03:47 GMT Message-Id: <202101171803.10HI3lqU051160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Emmanuel Vadot Subject: git: e7ffa3b5ce04 - vendor/device-tree - Import devicetree files from Linux 5.10 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/vendor/device-tree X-Git-Reftype: branch X-Git-Commit: e7ffa3b5ce04742455c6bd4d8af0fdedd9978c77 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 18:03:49 -0000 The branch vendor/device-tree has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e7ffa3b5ce04742455c6bd4d8af0fdedd9978c77 commit e7ffa3b5ce04742455c6bd4d8af0fdedd9978c77 Author: Emmanuel Vadot AuthorDate: 2021-01-17 18:02:46 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-17 18:02:46 +0000 Import devicetree files from Linux 5.10 --- Bindings/.gitignore | 1 + Bindings/.yamllint | 39 + Bindings/Makefile | 52 +- Bindings/arm/actions.yaml | 15 + Bindings/arm/altera.yaml | 5 + Bindings/arm/amazon,al.yaml | 2 + Bindings/arm/amlogic.yaml | 5 + Bindings/arm/arm,integrator.yaml | 2 + Bindings/arm/arm,realview.yaml | 2 + Bindings/arm/arm,versatile.yaml | 2 + Bindings/arm/arm,vexpress-juno.yaml | 2 + Bindings/arm/atmel-at91.yaml | 3 + Bindings/arm/axxia.yaml | 4 + Bindings/arm/bcm/bcm2835.yaml | 2 + Bindings/arm/bcm/brcm,bcm11351.yaml | 2 + Bindings/arm/bcm/brcm,bcm21664.yaml | 2 + Bindings/arm/bcm/brcm,bcm23550.yaml | 2 + Bindings/arm/bcm/brcm,bcm4708.yaml | 5 + Bindings/arm/bcm/brcm,cygnus.yaml | 2 + Bindings/arm/bcm/brcm,hr2.yaml | 2 + Bindings/arm/bcm/brcm,ns2.yaml | 2 + Bindings/arm/bcm/brcm,nsp.yaml | 2 + Bindings/arm/bcm/brcm,stingray.yaml | 2 + Bindings/arm/bcm/brcm,vulcan-soc.yaml | 2 + Bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml | 23 + Bindings/arm/bitmain.yaml | 5 + Bindings/arm/calxeda.yaml | 2 + Bindings/arm/coresight-cti.yaml | 2 + Bindings/arm/cpus.yaml | 2 + Bindings/arm/digicolor.yaml | 4 + Bindings/arm/freescale/fsl,imx7ulp-pm.yaml | 42 + Bindings/arm/freescale/fsl,imx7ulp-sim.yaml | 38 + Bindings/arm/fsl.yaml | 97 + Bindings/arm/hisilicon/controller/cpuctrl.yaml | 54 + .../hisilicon/controller/hi3798cv200-perictrl.yaml | 64 + .../hisilicon/controller/hi6220-domain-ctrl.yaml | 68 + .../hisilicon/controller/hip04-bootwrapper.yaml | 34 + .../arm/hisilicon/controller/hip04-fabric.yaml | 27 + Bindings/arm/hisilicon/controller/pctrl.yaml | 34 + Bindings/arm/hisilicon/controller/sysctrl.yaml | 132 + Bindings/arm/hisilicon/hisilicon.yaml | 70 + Bindings/arm/hisilicon/low-pin-count.yaml | 61 + Bindings/arm/intel,keembay.yaml | 3 + Bindings/arm/intel-ixp4xx.yaml | 4 + Bindings/arm/keystone/ti,k3-sci-common.yaml | 2 + Bindings/arm/marvell/armada-7k-8k.yaml | 2 + Bindings/arm/mediatek.yaml | 3 + Bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 + Bindings/arm/mediatek/mediatek,audsys.txt | 1 + Bindings/arm/mediatek/mediatek,imgsys.txt | 1 + Bindings/arm/mediatek/mediatek,infracfg.txt | 1 + Bindings/arm/mediatek/mediatek,mfgcfg.txt | 1 + Bindings/arm/mediatek/mediatek,pericfg.yaml | 2 + Bindings/arm/mediatek/mediatek,topckgen.txt | 1 + Bindings/arm/mediatek/mediatek,vdecsys.txt | 1 + Bindings/arm/microchip,sparx5.yaml | 2 + Bindings/arm/moxart.yaml | 1 + Bindings/arm/mrvl/mrvl.yaml | 3 + Bindings/arm/mstar/mstar.yaml | 2 + Bindings/arm/nvidia,tegra194-ccplex.yaml | 2 + Bindings/arm/nxp/lpc32xx.yaml | 2 + Bindings/arm/omap/prm-inst.txt | 2 + Bindings/arm/pmu.yaml | 2 + Bindings/arm/primecell.yaml | 3 + Bindings/arm/qcom.yaml | 15 + Bindings/arm/rda.yaml | 4 + Bindings/arm/realtek.yaml | 3 + Bindings/arm/renesas.yaml | 14 + Bindings/arm/rockchip.yaml | 19 +- Bindings/arm/samsung/pmu.yaml | 27 +- Bindings/arm/samsung/samsung-boards.yaml | 2 + Bindings/arm/sirf.yaml | 3 + Bindings/arm/socionext/milbeaut.yaml | 3 + Bindings/arm/socionext/uniphier.yaml | 2 + Bindings/arm/spear.yaml | 3 + Bindings/arm/sprd/sprd.yaml | 2 + Bindings/arm/sti.yaml | 3 + Bindings/arm/stm32/st,mlahb.yaml | 2 + Bindings/arm/stm32/stm32.yaml | 11 + Bindings/arm/sunxi.yaml | 12 + Bindings/arm/tegra.yaml | 8 + Bindings/arm/tegra/nvidia,tegra186-pmc.txt | 3 +- Bindings/arm/tegra/nvidia,tegra20-pmc.yaml | 2 + Bindings/arm/ti/k3.yaml | 38 + Bindings/arm/ti/nspire.yaml | 3 + Bindings/arm/ti/ti,davinci.yaml | 3 + Bindings/arm/toshiba.yaml | 25 + Bindings/arm/ux500.yaml | 2 + Bindings/arm/vt8500.yaml | 3 + Bindings/arm/xilinx.yaml | 2 + Bindings/arm/zte.yaml | 2 + Bindings/ata/faraday,ftide010.yaml | 2 + Bindings/ata/imx-sata.yaml | 83 + Bindings/ata/pata-common.yaml | 2 + Bindings/ata/sata-common.yaml | 2 + Bindings/bus/brcm,gisb-arb.txt | 3 +- Bindings/bus/mti,mips-cdmm.yaml | 2 + Bindings/bus/renesas,bsc.yaml | 2 + Bindings/bus/simple-pm-bus.yaml | 2 + Bindings/bus/socionext,uniphier-system-bus.yaml | 7 + Bindings/chrome/google,cros-ec-typec.yaml | 2 + Bindings/clock/allwinner,sun4i-a10-ccu.yaml | 7 +- Bindings/clock/arm,syscon-icst.yaml | 2 + Bindings/clock/baikal,bt1-ccu-div.yaml | 6 +- Bindings/clock/baikal,bt1-ccu-pll.yaml | 2 +- Bindings/clock/hi6220-clock.txt | 2 +- Bindings/clock/idt,versaclock5.yaml | 20 +- Bindings/clock/imx23-clock.yaml | 4 +- Bindings/clock/imx28-clock.yaml | 6 +- Bindings/clock/imx5-clock.yaml | 2 +- Bindings/clock/imx6q-clock.yaml | 2 + Bindings/clock/imx6sl-clock.yaml | 2 + Bindings/clock/imx6sll-clock.yaml | 2 + Bindings/clock/imx6sx-clock.yaml | 2 + Bindings/clock/imx6ul-clock.yaml | 2 + Bindings/clock/imx8m-clock.yaml | 125 + Bindings/clock/imx8qxp-lpcg.yaml | 2 +- Bindings/clock/intel,cgu-lgm.yaml | 2 + Bindings/clock/qcom,dispcc-sm8x50.yaml | 93 + Bindings/clock/qcom,gcc-sm8250.yaml | 2 + Bindings/clock/qcom,videocc.yaml | 73 + Bindings/clock/renesas,cpg-mssr.yaml | 1 + Bindings/clock/sifive/fu540-prci.yaml | 60 + Bindings/clock/sprd,sc9863a-clk.yaml | 2 + Bindings/clock/ti,am654-ehrpwm-tbclk.yaml | 2 + Bindings/connector/usb-connector.yaml | 76 +- Bindings/cpufreq/cpufreq-qcom-hw.txt | 2 +- Bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 6 +- Bindings/crypto/fsl-dcp.yaml | 51 + Bindings/crypto/fsl-imx-sahara.yaml | 37 + Bindings/crypto/fsl-imx-scc.yaml | 54 + Bindings/crypto/samsung-slimsss.yaml | 2 +- Bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml | 11 +- Bindings/display/brcm,bcm2711-hdmi.yaml | 123 + Bindings/display/brcm,bcm2835-dsi0.yaml | 3 + Bindings/display/brcm,bcm2835-hvs.yaml | 18 +- Bindings/display/brcm,bcm2835-pixelvalve0.yaml | 5 + Bindings/display/brcm,bcm2835-vc4.yaml | 1 + Bindings/display/bridge/cdns,mhdp8546.yaml | 169 ++ Bindings/display/bridge/ite,it6505.yaml | 5 + Bindings/display/bridge/lontium,lt9611.yaml | 176 ++ Bindings/display/bridge/lvds-codec.yaml | 6 + Bindings/display/bridge/nwl-dsi.yaml | 15 +- Bindings/display/bridge/renesas,dw-hdmi.txt | 4 +- Bindings/display/bridge/renesas,lvds.yaml | 2 + Bindings/display/bridge/snps,dw-mipi-dsi.yaml | 2 + Bindings/display/bridge/toshiba,tc358762.yaml | 127 + Bindings/display/bridge/toshiba,tc358775.yaml | 217 ++ Bindings/display/dsi-controller.yaml | 2 + Bindings/display/imx/nxp,imx8mq-dcss.yaml | 108 + Bindings/display/mediatek/mediatek,disp.txt | 2 +- Bindings/display/mediatek/mediatek,dpi.txt | 2 +- Bindings/display/mediatek/mediatek,dsi.txt | 4 +- Bindings/display/mediatek/mediatek,hdmi.txt | 4 + Bindings/display/msm/dsi.txt | 6 +- Bindings/display/msm/gmu.yaml | 2 + Bindings/display/panel/ilitek,ili9881c.yaml | 1 + Bindings/display/panel/lvds.yaml | 2 + Bindings/display/panel/mantix,mlaf057we51-x.yaml | 74 + Bindings/display/panel/panel-common.yaml | 2 + Bindings/display/panel/panel-simple.yaml | 8 + Bindings/display/panel/rocktech,jh057n00900.yaml | 40 +- .../display/panel/samsung,amoled-mipi-dsi.yaml | 12 +- Bindings/display/panel/tpo,tpg110.yaml | 2 + Bindings/display/renesas,du.txt | 6 + Bindings/display/ssd1307fb.txt | 1 + Bindings/display/st,stm32-dsi.yaml | 23 +- Bindings/display/tegra/nvidia,tegra20-host1x.txt | 92 +- Bindings/display/tilcdc/tilcdc.txt | 2 +- Bindings/dma/allwinner,sun50i-a64-dma.yaml | 9 +- Bindings/dma/dma-common.yaml | 2 + Bindings/dma/dma-controller.yaml | 2 + Bindings/dma/dma-router.yaml | 2 + Bindings/dma/ingenic,dma.yaml | 2 + Bindings/dma/renesas,rcar-dmac.yaml | 1 + Bindings/dma/snps,dma-spear1340.yaml | 7 +- Bindings/dma/st,stm32-dma.yaml | 2 + Bindings/dma/st,stm32-dmamux.yaml | 2 + Bindings/dma/st,stm32-mdma.yaml | 2 + Bindings/dma/ti/k3-udma.yaml | 2 + Bindings/edac/amazon,al-mc-edac.yaml | 68 + Bindings/edac/dmc-520.yaml | 2 + Bindings/eeprom/at24.yaml | 3 + Bindings/eeprom/at25.yaml | 129 + Bindings/example-schema.yaml | 33 +- Bindings/extcon/extcon-ptn5150.yaml | 60 + Bindings/extcon/wlf,arizona.yaml | 2 + Bindings/fsi/fsi-master-aspeed.txt | 12 + Bindings/fsi/ibm,fsi2spi.yaml | 3 + Bindings/fuse/nvidia,tegra20-fuse.txt | 1 + Bindings/gpio/fsl-imx-gpio.yaml | 55 +- Bindings/gpio/gpio-pca95xx.yaml | 232 ++ Bindings/gpio/gpio-vf610.yaml | 83 + Bindings/gpio/kontron,sl28cpld-gpio.yaml | 54 + Bindings/gpio/pl061-gpio.yaml | 3 + Bindings/gpio/renesas,rcar-gpio.yaml | 1 + Bindings/gpio/snps,dw-apb-gpio.yaml | 6 + Bindings/gpio/socionext,uniphier-gpio.yaml | 2 + Bindings/gpu/arm,mali-midgard.yaml | 1 + Bindings/gpu/arm,mali-utgard.yaml | 6 +- Bindings/gpu/samsung-rotator.yaml | 6 + Bindings/gpu/vivante,gc.yaml | 9 +- Bindings/hwlock/ti,omap-hwspinlock.yaml | 76 + Bindings/hwmon/adi,adm1266.yaml | 51 + Bindings/hwmon/adi,axi-fan-control.yaml | 2 + Bindings/hwmon/adt7475.yaml | 2 + Bindings/hwmon/baikal,bt1-pvt.yaml | 4 +- Bindings/hwmon/kontron,sl28cpld-hwmon.yaml | 27 + Bindings/hwmon/lm75.yaml | 66 + Bindings/hwmon/maxim,max20730.yaml | 65 + Bindings/hwmon/moortec,mr75203.yaml | 71 + Bindings/hwmon/sensirion,shtc1.yaml | 61 + Bindings/i2c/amlogic,meson6-i2c.yaml | 2 + Bindings/i2c/cdns,i2c-r1p10.yaml | 2 + Bindings/i2c/google,cros-ec-i2c-tunnel.yaml | 66 + Bindings/i2c/i2c-gpio.yaml | 2 + Bindings/i2c/i2c-imx-lpi2c.yaml | 29 +- Bindings/i2c/i2c-imx.yaml | 8 +- Bindings/i2c/i2c-rk3x.yaml | 2 + Bindings/i2c/i2c.txt | 5 + Bindings/i2c/ingenic,i2c.yaml | 12 +- Bindings/i2c/mellanox,i2c-mlxbf.txt | 42 + Bindings/i2c/socionext,uniphier-fi2c.yaml | 2 + Bindings/i2c/socionext,uniphier-i2c.yaml | 2 + Bindings/i2c/st,stm32-i2c.yaml | 2 + Bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 2 + Bindings/iio/accel/adi,adis16240.yaml | 4 + Bindings/iio/accel/adi,adxl345.yaml | 4 + Bindings/iio/accel/adi,adxl372.yaml | 4 + Bindings/iio/accel/kionix,kxsd9.yaml | 4 + Bindings/iio/adc/adi,ad7124.yaml | 4 + Bindings/iio/adc/adi,ad7192.yaml | 4 + Bindings/iio/adc/adi,ad7291.yaml | 47 + Bindings/iio/adc/adi,ad7292.yaml | 4 + Bindings/iio/adc/adi,ad7606.yaml | 6 + Bindings/iio/adc/adi,ad7768-1.yaml | 90 + Bindings/iio/adc/adi,ad7923.yaml | 4 + Bindings/iio/adc/adi,ad7949.yaml | 57 + Bindings/iio/adc/adi,ad9467.yaml | 15 +- Bindings/iio/adc/amlogic,meson-saradc.yaml | 149 ++ Bindings/iio/adc/aspeed,ast2400-adc.yaml | 55 + Bindings/iio/adc/cosmic,10001-adc.yaml | 59 + Bindings/iio/adc/dlg,da9150-gpadc.yaml | 35 + Bindings/iio/adc/fsl,imx25-gcq.yaml | 131 + Bindings/iio/adc/fsl,imx7d-adc.yaml | 62 + Bindings/iio/adc/fsl,vf610-adc.yaml | 81 + Bindings/iio/adc/holt,hi8435.yaml | 50 + Bindings/iio/adc/lltc,ltc2497.yaml | 46 + Bindings/iio/adc/marvell,berlin2-adc.yaml | 50 + Bindings/iio/adc/maxim,max11100.yaml | 49 + Bindings/iio/adc/maxim,max1118.yaml | 62 + Bindings/iio/adc/maxim,max1238.yaml | 2 + Bindings/iio/adc/maxim,max1241.yaml | 4 + Bindings/iio/adc/maxim,max1363.yaml | 2 + Bindings/iio/adc/maxim,max9611.yaml | 51 + Bindings/iio/adc/microchip,mcp3201.yaml | 77 + Bindings/iio/adc/motorola,cpcap-adc.yaml | 53 + Bindings/iio/adc/nuvoton,nau7802.yaml | 50 + Bindings/iio/adc/nuvoton,npcm750-adc.yaml | 64 + Bindings/iio/adc/nxp,lpc1850-adc.yaml | 61 + Bindings/iio/adc/nxp,lpc3220-adc.yaml | 50 + Bindings/iio/adc/qcom,spmi-vadc.yaml | 4 + Bindings/iio/adc/samsung,exynos-adc.yaml | 20 +- Bindings/iio/adc/sprd,sc2720-adc.yaml | 72 + Bindings/iio/adc/st,stmpe-adc.yaml | 45 + Bindings/iio/adc/ti,adc0832.yaml | 56 + Bindings/iio/adc/ti,adc108s102.yaml | 47 + Bindings/iio/adc/ti,adc12138.yaml | 86 + Bindings/iio/adc/ti,adc128s052.yaml | 59 + Bindings/iio/adc/ti,adc161s626.yaml | 51 + Bindings/iio/adc/ti,ads1015.yaml | 112 + Bindings/iio/adc/ti,ads7950.yaml | 65 + Bindings/iio/adc/ti,ads8344.yaml | 51 + Bindings/iio/adc/ti,ads8688.yaml | 4 + Bindings/iio/adc/ti,tlc4541.yaml | 52 + Bindings/iio/adc/ti,twl4030-madc.yaml | 48 + Bindings/iio/amplifiers/adi,hmc425a.yaml | 2 + Bindings/iio/chemical/atlas,sensor.yaml | 4 + Bindings/iio/common.yaml | 2 + Bindings/iio/dac/adi,ad5770r.yaml | 10 + Bindings/iio/dac/lltc,ltc2632.yaml | 77 + Bindings/iio/frequency/adf4371.yaml | 4 + Bindings/iio/gyroscope/adi,adxrs290.yaml | 59 + Bindings/iio/humidity/ti,hdc2010.yaml | 47 + Bindings/iio/imu/adi,adis16460.yaml | 4 + Bindings/iio/imu/adi,adis16475.yaml | 2 + Bindings/iio/imu/bosch,bmi160.yaml | 4 + Bindings/iio/imu/invensense,icm42600.yaml | 6 + Bindings/iio/imu/nxp,fxos8700.yaml | 4 + Bindings/iio/light/ams,as73211.yaml | 54 + Bindings/iio/light/amstaos,tsl2563.yaml | 2 + Bindings/iio/light/dynaimage,al3010.yaml | 2 + Bindings/iio/light/dynaimage,al3320a.yaml | 2 + Bindings/iio/light/sharp,gp2ap002.yaml | 2 + Bindings/iio/light/vishay,vcnl4000.yaml | 4 + Bindings/iio/magnetometer/asahi-kasei,ak8975.yaml | 2 + Bindings/iio/proximity/semtech,sx9310.yaml | 65 + Bindings/iio/proximity/vishay,vcnl3020.yaml | 2 + Bindings/iio/proximity/vl53l0x.txt | 6 + Bindings/input/adc-joystick.yaml | 121 + Bindings/input/fsl,mpr121-touchkey.yaml | 2 + Bindings/input/google,cros-ec-keyb.yaml | 92 + Bindings/input/input.yaml | 2 + Bindings/input/matrix-keymap.yaml | 2 + Bindings/input/touchscreen/touchscreen.yaml | 2 + Bindings/input/touchscreen/zinitix.txt | 40 + Bindings/interconnect/interconnect.txt | 24 +- Bindings/interconnect/qcom,bcm-voter.yaml | 20 + Bindings/interconnect/qcom,osm-l3.yaml | 2 + Bindings/interconnect/qcom,rpmh.yaml | 110 + .../interrupt-controller/actions,owl-sirq.yaml | 65 + .../allwinner,sun7i-a20-sc-nmi.yaml | 5 +- Bindings/interrupt-controller/fsl,irqsteer.yaml | 8 +- Bindings/interrupt-controller/ingenic,intc.yaml | 2 + .../kontron,sl28cpld-intc.yaml | 54 + Bindings/interrupt-controller/loongson,htpic.yaml | 2 + .../interrupt-controller/loongson,liointc.yaml | 2 + .../interrupt-controller/loongson,pch-msi.yaml | 2 + .../interrupt-controller/loongson,pch-pic.yaml | 2 + Bindings/interrupt-controller/mstar,mst-intc.yaml | 64 + Bindings/interrupt-controller/mti,gic.yaml | 2 +- .../interrupt-controller/sifive,plic-1.0.0.yaml | 97 + Bindings/interrupt-controller/snps,dw-apb-ictl.txt | 14 +- Bindings/interrupt-controller/ti,pruss-intc.yaml | 158 ++ Bindings/interrupt-controller/ti,sci-inta.yaml | 12 + Bindings/interrupt-controller/ti,sci-intr.yaml | 2 + Bindings/iommu/mediatek,iommu.txt | 2 + Bindings/iommu/renesas,ipmmu-vmsa.yaml | 3 +- Bindings/ipmi/ipmi-smic.yaml | 2 + Bindings/leds/backlight/common.yaml | 36 + Bindings/leds/backlight/kinetic,ktd253.yaml | 46 + Bindings/leds/common.yaml | 4 +- Bindings/leds/leds-class-multicolor.yaml | 12 +- Bindings/leds/leds-is31fl319x.txt | 2 + Bindings/leds/leds-lp50xx.yaml | 138 ++ Bindings/leds/leds-lp55xx.yaml | 10 +- Bindings/leds/leds-pca955x.txt | 1 + Bindings/leds/ti,tca6507.yaml | 134 + Bindings/leds/trigger-source.yaml | 2 + Bindings/mailbox/arm,mhu.yaml | 135 + Bindings/mailbox/fsl,mu.yaml | 6 +- Bindings/mailbox/mtk-gce.txt | 2 +- Bindings/mailbox/omap-mailbox.txt | 2 +- Bindings/mailbox/qcom,apcs-kpss-global.yaml | 1 + Bindings/media/allwinner,sun4i-a10-ir.yaml | 5 +- Bindings/media/gpio-ir-receiver.txt | 3 + Bindings/media/i2c/chrontel,ch7322.yaml | 2 + Bindings/media/i2c/imi,rdacm2x-gmsl.yaml | 2 + Bindings/media/i2c/ov5647.yaml | 88 + Bindings/media/i2c/tvp5150.txt | 2 +- Bindings/media/mediatek-jpeg-encoder.txt | 35 + Bindings/media/mediatek-vcodec.txt | 9 +- Bindings/media/nxp,imx8mq-vpu.yaml | 2 + Bindings/media/qcom,msm8916-venus.yaml | 2 + Bindings/media/qcom,msm8996-venus.yaml | 2 + Bindings/media/qcom,sc7180-venus.yaml | 8 +- Bindings/media/qcom,sdm845-venus-v2.yaml | 8 +- Bindings/media/qcom,sdm845-venus.yaml | 2 + Bindings/media/rc.yaml | 2 + Bindings/media/renesas,csi2.yaml | 1 + Bindings/media/renesas,vin.yaml | 2 + Bindings/media/samsung-fimc.txt | 6 +- Bindings/memory-controllers/fsl/mmdc.yaml | 2 + .../memory-controllers/mediatek,smi-common.txt | 3 +- Bindings/memory-controllers/mediatek,smi-larb.txt | 3 +- Bindings/memory-controllers/renesas,rpc-if.yaml | 2 + Bindings/memory-controllers/st,stm32-fmc2-ebi.yaml | 2 + Bindings/mfd/ab8500.txt | 4 +- Bindings/mfd/act8945a.txt | 2 +- Bindings/mfd/cirrus,lochnagar.yaml | 10 +- Bindings/mfd/ene-kb3930.yaml | 55 + Bindings/mfd/gateworks-gsc.yaml | 5 +- Bindings/mfd/google,cros-ec.yaml | 64 + Bindings/mfd/kontron,sl28cpld.yaml | 153 ++ Bindings/mfd/qcom,spmi-pmic.txt | 2 +- Bindings/mfd/rohm,bd70528-pmic.txt | 2 +- Bindings/mfd/rohm,bd71847-pmic.yaml | 9 +- Bindings/mfd/syscon.yaml | 10 +- Bindings/mfd/ti,j721e-system-controller.yaml | 9 +- Bindings/mfd/ti,lp87524-q1.yaml | 112 + Bindings/mfd/ti,lp87561-q1.yaml | 83 + Bindings/mfd/ti,lp87565-q1.yaml | 101 + Bindings/mfd/xylon,logicvc.yaml | 14 +- Bindings/mips/ingenic/devices.yaml | 8 + Bindings/mips/ingenic/ingenic,cpu.yaml | 6 +- Bindings/mips/loongson/devices.yaml | 3 + Bindings/mips/loongson/rs780e-acpi.yaml | 2 + Bindings/misc/nvidia,tegra186-misc.txt | 8 +- Bindings/misc/nvidia,tegra20-apbmisc.txt | 13 +- Bindings/misc/olpc,xo1.75-ec.yaml | 6 +- Bindings/mmc/amlogic,meson-mx-sdhc.yaml | 2 + Bindings/mmc/arasan,sdhci.yaml | 8 +- Bindings/mmc/cdns,sdhci.yaml | 2 + Bindings/mmc/fsl-imx-esdhc.yaml | 37 +- Bindings/mmc/ingenic,mmc.yaml | 2 + Bindings/mmc/microchip,dw-sparx5-sdhci.yaml | 67 + Bindings/mmc/mmc-controller.yaml | 6 + Bindings/mmc/mmc-pwrseq-emmc.yaml | 2 + Bindings/mmc/mmc-pwrseq-sd8787.yaml | 2 + Bindings/mmc/mmc-pwrseq-simple.yaml | 4 + Bindings/mmc/owl-mmc.yaml | 8 +- Bindings/mmc/renesas,sdhi.yaml | 1 + Bindings/mmc/rockchip-dw-mshc.yaml | 2 + Bindings/mmc/sdhci-am654.yaml | 219 ++ Bindings/mmc/sdhci-pxa.yaml | 2 + Bindings/mmc/socionext,uniphier-sd.yaml | 2 + Bindings/mmc/synopsys-dw-mshc-common.yaml | 2 + Bindings/mmc/synopsys-dw-mshc.yaml | 2 + Bindings/mtd/denali,nand.yaml | 2 + Bindings/mtd/gpmi-nand.yaml | 18 +- Bindings/mtd/ingenic,nand.yaml | 2 + Bindings/mtd/nand-controller.yaml | 33 + Bindings/mtd/st,stm32-fmc2-nand.yaml | 2 + Bindings/net/adi,adin.yaml | 2 + Bindings/net/amlogic,meson-dwmac.yaml | 2 + Bindings/net/aspeed,ast2600-mdio.yaml | 2 + Bindings/net/brcm,bcm7445-switch-v4.0.txt | 7 + Bindings/net/brcm,systemport.txt | 5 + Bindings/net/can/can-controller.yaml | 18 + Bindings/net/can/can-transceiver.yaml | 2 + Bindings/net/can/fsl,flexcan.yaml | 139 ++ Bindings/net/can/microchip,mcp251x.txt | 7 +- Bindings/net/can/microchip,mcp251xfd.yaml | 79 + Bindings/net/can/rcar_can.txt | 8 +- Bindings/net/can/rcar_canfd.txt | 5 +- Bindings/net/can/tcan4x5x.txt | 2 +- Bindings/net/dsa/b53.txt | 9 +- Bindings/net/dsa/dsa.yaml | 2 + Bindings/net/dsa/mt7530.txt | 13 +- Bindings/net/ethernet-controller.yaml | 16 + Bindings/net/ethernet-phy.yaml | 2 + Bindings/net/intel,dwmac-plat.yaml | 132 + Bindings/net/marvell,mvusb.yaml | 2 + Bindings/net/marvell,prestera.txt | 34 + Bindings/net/mdio.yaml | 2 + Bindings/net/mediatek,star-emac.yaml | 2 + Bindings/net/nfc/nxp-nci.txt | 2 +- Bindings/net/nfc/pn544.txt | 2 +- Bindings/net/nfc/samsung,s3fwrn5.yaml | 73 + Bindings/net/nxp,tja11xx.yaml | 2 + Bindings/net/qca,ar71xx.yaml | 2 + Bindings/net/qca,ar803x.yaml | 2 + Bindings/net/qcom,ipa.yaml | 2 + Bindings/net/qcom,ipq4019-mdio.yaml | 2 + Bindings/net/qcom,ipq8064-mdio.yaml | 2 + Bindings/net/realtek-bluetooth.yaml | 4 +- Bindings/net/renesas,etheravb.yaml | 262 ++ Bindings/net/smsc-lan87xx.txt | 4 + Bindings/net/snps,dwmac.yaml | 2 + Bindings/net/socionext-netsec.txt | 4 +- Bindings/net/stm32-dwmac.yaml | 2 + Bindings/net/ti,davinci-mdio.yaml | 2 + Bindings/net/ti,dp83822.yaml | 82 + Bindings/net/ti,dp83867.yaml | 2 + Bindings/net/ti,dp83869.yaml | 2 + Bindings/net/wireless/microchip,wilc1000.yaml | 4 + Bindings/net/wireless/qcom,ath10k.txt | 4 +- Bindings/net/wireless/qcom,ath11k.yaml | 4 +- Bindings/nvmem/imx-ocotp.yaml | 40 +- Bindings/nvmem/nvmem-consumer.yaml | 2 + Bindings/nvmem/nvmem.yaml | 2 + Bindings/nvmem/qcom,qfprom.yaml | 2 + Bindings/nvmem/qcom,spmi-sdam.yaml | 2 + Bindings/nvmem/rockchip-efuse.yaml | 2 + Bindings/nvmem/snvs-lpgpr.yaml | 33 + Bindings/nvmem/st,stm32-romem.yaml | 2 + Bindings/nvmem/vf610-ocotp.txt | 4 +- .../opp/allwinner,sun50i-h6-operating-points.yaml | 4 +- Bindings/opp/opp.txt | 53 +- Bindings/pci/brcm,stb-pcie.yaml | 56 +- Bindings/pci/cdns,cdns-pcie-ep.yaml | 2 + Bindings/pci/cdns,cdns-pcie-host.yaml | 2 + Bindings/pci/cdns-pcie-ep.yaml | 2 + Bindings/pci/cdns-pcie-host.yaml | 2 + Bindings/pci/cdns-pcie.yaml | 2 + Bindings/pci/host-generic-pci.yaml | 2 + Bindings/pci/layerscape-pci.txt | 2 + Bindings/pci/loongson.yaml | 2 + Bindings/pci/pci-ep.yaml | 2 + Bindings/pci/rcar-pci-ep.yaml | 10 +- Bindings/pci/rcar-pci.txt | 3 +- Bindings/pci/socionext,uniphier-pcie-ep.yaml | 20 +- Bindings/pci/ti,j721e-pci-ep.yaml | 2 + Bindings/pci/ti,j721e-pci-host.yaml | 2 + Bindings/pci/uniphier-pcie.txt | 1 + Bindings/pci/versatile.yaml | 2 + Bindings/perf/arm,cmn.yaml | 57 + Bindings/perf/fsl-imx-ddr.yaml | 49 + Bindings/phy/amlogic,meson-g12a-usb2-phy.yaml | 2 + Bindings/phy/fsl,imx8mq-usb-phy.txt | 2 +- Bindings/phy/hisilicon,hi3660-usb3.yaml | 60 + Bindings/phy/intel,lgm-emmc-phy.yaml | 17 +- Bindings/phy/intel,lgm-usb-phy.yaml | 58 + Bindings/phy/phy-cadence-torrent.yaml | 96 +- Bindings/phy/qcom,ipq806x-usb-phy-hs.yaml | 2 + Bindings/phy/qcom,ipq806x-usb-phy-ss.yaml | 2 + Bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 95 +- Bindings/phy/qcom,qusb2-phy.yaml | 1 + Bindings/phy/qcom-usb-ipq4019-phy.yaml | 2 + Bindings/phy/socionext,uniphier-ahci-phy.yaml | 76 + Bindings/phy/ti,omap-usb2.yaml | 76 + Bindings/phy/ti,phy-j721e-wiz.yaml | 13 +- Bindings/phy/ti-phy.txt | 37 - Bindings/pinctrl/actions,s500-pinctrl.yaml | 240 ++ Bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 141 +- Bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 4 +- Bindings/pinctrl/cirrus,lochnagar.yaml | 2 + Bindings/pinctrl/cirrus,madera.yaml | 2 + Bindings/pinctrl/pincfg-node.yaml | 2 + Bindings/pinctrl/pinctrl-atlas7.txt | 2 +- Bindings/pinctrl/pinctrl-mt65xx.txt | 1 + Bindings/pinctrl/pinctrl-mt8192.yaml | 155 ++ Bindings/pinctrl/pinctrl-single.txt | 21 +- Bindings/pinctrl/pinmux-node.yaml | 2 + Bindings/pinctrl/qcom,ipq4019-pinctrl.txt | 2 +- Bindings/pinctrl/qcom,msm8226-pinctrl.yaml | 132 + Bindings/pinctrl/renesas,pfc.yaml | 193 ++ Bindings/pinctrl/renesas,rza1-ports.yaml | 190 ++ Bindings/pinctrl/renesas,rza2-pinctrl.yaml | 2 +- Bindings/pinctrl/renesas,rzn1-pinctrl.yaml | 129 + Bindings/pinctrl/samsung-pinctrl.txt | 6 +- Bindings/pinctrl/socionext,uniphier-pinctrl.yaml | 2 + Bindings/pinctrl/toshiba,visconti-pinctrl.yaml | 92 + Bindings/power/amlogic,meson-ee-pwrc.yaml | 23 +- Bindings/power/amlogic,meson-sec-pwrc.yaml | 2 + Bindings/power/brcm,bcm63xx-power.yaml | 44 + Bindings/power/domain-idle-state.yaml | 2 + Bindings/power/fsl,imx-gpcv2.yaml | 4 + Bindings/power/mti,mips-cpc.yaml | 2 + Bindings/power/pd-samsung.yaml | 2 + Bindings/power/power-domain.yaml | 2 + Bindings/power/renesas,rcar-sysc.yaml | 1 + Bindings/power/reset/ocelot-reset.txt | 7 +- Bindings/power/reset/reboot-mode.yaml | 49 + Bindings/power/supply/act8945a-charger.txt | 2 +- Bindings/power/supply/battery.yaml | 24 + Bindings/power/supply/bq25890.txt | 4 + Bindings/power/supply/bq25980.yaml | 114 + Bindings/power/supply/bq27xxx.yaml | 1 + Bindings/power/supply/charger-manager.txt | 30 +- Bindings/power/supply/cw2015_battery.yaml | 2 + Bindings/power/supply/gpio-charger.yaml | 31 + Bindings/power/supply/ingenic,battery.yaml | 61 + Bindings/power/supply/max17040_battery.txt | 21 +- Bindings/power/supply/power-supply.yaml | 2 + Bindings/power/supply/rohm,bd99954.yaml | 8 + Bindings/power/supply/summit,smb347-charger.yaml | 152 ++ Bindings/powerpc/sleep.yaml | 47 + Bindings/ptp/ptp-qoriq.txt | 2 + Bindings/pwm/google,cros-ec-pwm.yaml | 2 +- Bindings/pwm/imx-pwm.yaml | 25 +- Bindings/pwm/kontron,sl28cpld-pwm.yaml | 35 + Bindings/pwm/pwm-sifive.yaml | 69 + Bindings/pwm/pwm.yaml | 2 + Bindings/pwm/renesas,pwm-rcar.yaml | 2 + Bindings/pwm/renesas,tpu-pwm.yaml | 1 + Bindings/regulator/fixed-regulator.yaml | 2 + Bindings/regulator/google,cros-ec-regulator.yaml | 2 + Bindings/regulator/gpio-regulator.yaml | 2 + Bindings/regulator/mps,mp886x.yaml | 63 + Bindings/regulator/mt6360-regulator.yaml | 113 + Bindings/regulator/pfuze100.yaml | 188 ++ Bindings/regulator/qcom,smd-rpm-regulator.yaml | 12 + Bindings/regulator/qcom,spmi-regulator.txt | 31 + Bindings/regulator/qcom-labibb-regulator.yaml | 2 +- ...pberrypi,7inch-touchscreen-panel-regulator.yaml | 44 + Bindings/regulator/regulator.yaml | 2 + Bindings/regulator/richtek,rt4801-regulator.yaml | 79 + Bindings/regulator/richtek,rtmv20-regulator.yaml | 159 ++ Bindings/regulator/rohm,bd71837-regulator.yaml | 11 + Bindings/regulator/rohm,bd71847-regulator.yaml | 11 + Bindings/regulator/rohm,bd9576-regulator.yaml | 34 + Bindings/regulator/silergy,sy8824x.yaml | 45 + Bindings/regulator/silergy,sy8827n.yaml | 2 + Bindings/regulator/st,stm32-booster.yaml | 2 + Bindings/regulator/st,stm32-vrefbuf.yaml | 2 + Bindings/regulator/vqmmc-ipq4019-regulator.yaml | 2 + Bindings/regulator/wlf,arizona.yaml | 2 + Bindings/remoteproc/qcom,pil-info.yaml | 2 + Bindings/remoteproc/ti,k3-r5f-rproc.yaml | 281 +++ Bindings/reserved-memory/reserved-memory.txt | 3 + Bindings/reset/fsl,imx7-src.yaml | 19 +- Bindings/reset/nuvoton,npcm-reset.txt | 2 +- Bindings/reset/renesas,rst.yaml | 1 + Bindings/reset/xlnx,zynqmp-reset.txt | 11 +- Bindings/riscv/cpus.yaml | 2 + Bindings/riscv/sifive-l2-cache.yaml | 98 + Bindings/riscv/sifive.yaml | 3 + Bindings/rng/imx-rng.yaml | 52 + Bindings/rng/ingenic,trng.yaml | 43 + Bindings/rng/xiphera,xip8001b-trng.yaml | 33 + Bindings/rtc/ingenic,rtc.yaml | 2 + Bindings/rtc/microcrystal,rv3032.yaml | 64 + Bindings/rtc/rtc-ds1307.txt | 9 +- Bindings/rtc/rtc.yaml | 18 + Bindings/rtc/s3c-rtc.yaml | 2 + Bindings/serial/fsl-imx-uart.yaml | 100 + Bindings/serial/fsl-lpuart.yaml | 82 + Bindings/serial/fsl-mxs-auart.yaml | 91 + Bindings/serial/ingenic,uart.yaml | 5 + Bindings/serial/mtk-uart.txt | 1 + Bindings/serial/renesas,hscif.yaml | 3 + Bindings/serial/renesas,sci.yaml | 2 + Bindings/serial/renesas,scif.yaml | 3 + Bindings/serial/renesas,scifa.yaml | 2 + Bindings/serial/renesas,scifb.yaml | 2 + Bindings/serial/rs485.yaml | 3 + Bindings/serial/samsung_uart.yaml | 2 + Bindings/serial/serial.yaml | 2 + Bindings/serial/snps-dw-apb-uart.yaml | 2 + Bindings/serial/socionext,uniphier-uart.yaml | 2 + Bindings/serial/sprd-uart.yaml | 2 + Bindings/soc/imx/fsl,aips-bus.yaml | 2 + Bindings/soc/qcom/qcom,geni-se.yaml | 1 + Bindings/soc/qcom/qcom,smd-rpm.yaml | 2 +- Bindings/soc/ti/k3-ringacc.yaml | 6 - Bindings/soc/ti/ti,pruss.yaml | 439 ++++ Bindings/sound/ak4458.txt | 5 + Bindings/sound/ak5558.txt | 2 + Bindings/sound/allwinner,sun8i-a33-codec.yaml | 6 +- Bindings/sound/amlogic,aiu.yaml | 2 + Bindings/sound/amlogic,g12a-toacodec.yaml | 2 + Bindings/sound/amlogic,gx-sound-card.yaml | 2 + Bindings/sound/amlogic,t9015.yaml | 2 + Bindings/sound/cirrus,cs4234.yaml | 74 + Bindings/sound/cirrus,cs42l51.yaml | 2 + Bindings/sound/cirrus,madera.yaml | 2 + Bindings/sound/fsl,easrc.yaml | 2 + Bindings/sound/fsl,spdif.yaml | 110 + Bindings/sound/fsl-asoc-card.txt | 2 + Bindings/sound/google,cros-ec-codec.yaml | 26 +- Bindings/sound/intel,keembay-i2s.yaml | 3 + Bindings/sound/max98090.txt | 2 +- Bindings/sound/mchp,spdifrx.yaml | 73 + Bindings/sound/mchp,spdiftx.yaml | 75 + Bindings/sound/mt6359.yaml | 61 + Bindings/sound/mt8183-da7219-max98357.txt | 1 + Bindings/sound/nvidia,tegra186-dspk.yaml | 2 + Bindings/sound/nvidia,tegra210-admaif.yaml | 2 + Bindings/sound/nvidia,tegra210-ahub.yaml | 3 + Bindings/sound/nvidia,tegra210-dmic.yaml | 2 + Bindings/sound/nvidia,tegra210-i2s.yaml | 2 + Bindings/sound/qcom,apq8016-sbc.txt | 7 + Bindings/sound/qcom,apq8096.txt | 8 + Bindings/sound/qcom,lpass-cpu.yaml | 223 ++ Bindings/sound/qcom,q6afe.txt | 23 + Bindings/sound/qcom,sdm845.txt | 8 + Bindings/sound/realtek,rt1015p.yaml | 38 + Bindings/sound/rockchip,rk3328-codec.yaml | 2 + Bindings/sound/rockchip-spdif.yaml | 1 + Bindings/sound/rt1015.txt | 6 + Bindings/sound/rt5640.txt | 2 +- Bindings/sound/rt5659.txt | 2 +- Bindings/sound/rt5665.txt | 2 +- Bindings/sound/rt5668.txt | 2 +- Bindings/sound/rt5677.txt | 2 +- Bindings/sound/rt5682.txt | 2 +- Bindings/sound/samsung,aries-wm8994.yaml | 11 +- Bindings/sound/samsung,midas-audio.yaml | 6 +- Bindings/sound/samsung,odroid.yaml | 5 + Bindings/sound/samsung-i2s.yaml | 15 + Bindings/sound/sgtl5000.yaml | 4 + Bindings/sound/tas2562.yaml | 8 + Bindings/sound/tas2764.yaml | 76 + Bindings/sound/tas2770.yaml | 11 +- Bindings/sound/ti,j721e-cpb-audio.yaml | 92 +- Bindings/sound/tlv320adcx140.yaml | 52 + Bindings/sound/wlf,arizona.yaml | 2 + Bindings/soundwire/qcom,sdw.txt | 1 + Bindings/soundwire/soundwire-controller.yaml | 2 + Bindings/spi/amlogic,meson-gx-spicc.yaml | 2 + Bindings/spi/amlogic,meson6-spifc.yaml | 2 + Bindings/spi/brcm,spi-bcm-qspi.txt | 2 + Bindings/spi/mediatek,spi-mtk-nor.yaml | 86 + Bindings/spi/mikrotik,rb4xx-spi.yaml | 2 + Bindings/spi/qca,ar934x-spi.yaml | 2 + Bindings/spi/qcom,spi-qcom-qspi.yaml | 2 + Bindings/spi/renesas,hspi.yaml | 2 + Bindings/spi/renesas,rspi.yaml | 3 + Bindings/spi/renesas,sh-msiof.yaml | 3 + Bindings/spi/snps,dw-apb-ssi.yaml | 54 +- Bindings/spi/socionext,uniphier-spi.yaml | 2 + Bindings/spi/spi-controller.yaml | 22 +- Bindings/spi/spi-gpio.yaml | 2 + Bindings/spi/spi-mux.yaml | 2 + Bindings/spi/spi-pl022.yaml | 2 + Bindings/spi/spi-rockchip.yaml | 2 + Bindings/spi/spi-sifive.yaml | 2 + Bindings/spi/st,stm32-qspi.yaml | 2 + Bindings/spi/st,stm32-spi.yaml | 2 + Bindings/spmi/qcom,spmi-pmic-arb.txt | 4 +- Bindings/spmi/spmi.yaml | 77 + .../sram/allwinner,sun4i-a10-system-control.yaml | 9 + Bindings/thermal/allwinner,sun8i-a83t-ths.yaml | 6 +- Bindings/thermal/imx8mm-thermal.yaml | 10 +- Bindings/thermal/rcar-gen3-thermal.yaml | 1 + Bindings/thermal/rcar-thermal.yaml | 5 + Bindings/thermal/sprd-thermal.yaml | 4 + Bindings/thermal/thermal-cooling-devices.yaml | 2 + Bindings/thermal/thermal-idle.yaml | 2 + Bindings/thermal/thermal-sensor.yaml | 2 + Bindings/thermal/thermal-zones.yaml | 2 + Bindings/timer/arm,sp804.yaml | 97 + Bindings/timer/cdns,ttc.yaml | 2 + Bindings/timer/mediatek,mtk-timer.txt | 1 + Bindings/timer/renesas,cmt.yaml | 4 + Bindings/timer/samsung,exynos4210-mct.yaml | 25 + Bindings/timer/snps,dw-apb-timer.yaml | 2 +- Bindings/trivial-devices.yaml | 28 +- Bindings/ufs/ufs-mediatek.txt | 4 +- Bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml | 22 +- Bindings/usb/atmel-usb.txt | 1 + Bindings/usb/cdns,usb3.yaml | 96 + Bindings/usb/ci-hdrc-usb2.txt | 9 + Bindings/usb/dwc2.yaml | 5 + Bindings/usb/dwc3.txt | 3 + Bindings/usb/intel,keembay-dwc3.yaml | 77 + Bindings/usb/mediatek,mt6360-tcpc.yaml | 95 + Bindings/usb/nvidia,tegra-xudc.yaml | 2 + Bindings/usb/qcom,dwc3.yaml | 2 + Bindings/usb/renesas,usb-xhci.yaml | 1 + Bindings/usb/renesas,usb3-peri.yaml | 35 +- Bindings/usb/renesas,usbhs.yaml | 1 + Bindings/usb/ti,hd3ss3220.yaml | 82 + Bindings/usb/ti,j721e-usb.yaml | 18 + Bindings/usb/ti,tps6598x.yaml | 2 + Bindings/usb/usb-hcd.yaml | 2 + Bindings/vendor-prefixes.yaml | 34 + Bindings/w1/fsl-imx-owire.yaml | 44 + Bindings/watchdog/amlogic,meson-gxbb-wdt.yaml | 2 + Bindings/watchdog/arm,sp805.yaml | 71 + Bindings/watchdog/arm-smc-wdt.yaml | 2 + Bindings/watchdog/aspeed-wdt.txt | 2 +- Bindings/watchdog/fsl-imx-wdt.yaml | 11 +- Bindings/watchdog/kontron,sl28cpld-wdt.yaml | 35 + Bindings/watchdog/qcom-wdt.yaml | 2 + Bindings/watchdog/samsung-wdt.yaml | 2 + Bindings/watchdog/st,stm32-iwdg.yaml | 2 + Bindings/watchdog/ti,rti-wdt.yaml | 2 + Bindings/watchdog/toshiba,visconti-wdt.yaml | 54 + Bindings/watchdog/watchdog.yaml | 2 + include/dt-bindings/clock/dra7.h | 1 + include/dt-bindings/clock/exynos5250.h | 4 +- include/dt-bindings/clock/exynos5420.h | 6 + include/dt-bindings/clock/imx8mp-clock.h | 2 +- include/dt-bindings/clock/mt8167-clk.h | 131 + include/dt-bindings/clock/qcom,dispcc-sm8150.h | 66 + include/dt-bindings/clock/qcom,dispcc-sm8250.h | 66 + include/dt-bindings/clock/qcom,gcc-msm8994.h | 36 + include/dt-bindings/clock/qcom,videocc-sm8150.h | 25 + include/dt-bindings/clock/qcom,videocc-sm8250.h | 34 + include/dt-bindings/clock/r8a779a0-cpg-mssr.h | 55 + include/dt-bindings/clock/sun50i-a100-ccu.h | 116 + include/dt-bindings/clock/sun50i-a100-r-ccu.h | 23 + include/dt-bindings/clock/tegra234-clock.h | 14 + include/dt-bindings/clock/vf610-clock.h | 3 +- include/dt-bindings/input/linux-event-codes.h | 4 + include/dt-bindings/interconnect/qcom,icc.h | 26 + include/dt-bindings/interconnect/qcom,osm-l3.h | 3 + include/dt-bindings/interconnect/qcom,sm8150.h | 162 ++ include/dt-bindings/interconnect/qcom,sm8250.h | 172 ++ include/dt-bindings/memory/mt8167-larb-port.h | 51 + include/dt-bindings/mux/ti-serdes.h | 93 + include/dt-bindings/phy/phy-cadence-torrent.h | 13 + include/dt-bindings/phy/phy.h | 1 + include/dt-bindings/pinctrl/mt8192-pinfunc.h | 1344 ++++++++++ include/dt-bindings/pinctrl/omap.h | 2 +- include/dt-bindings/power/meson-axg-power.h | 14 + include/dt-bindings/power/r8a779a0-sysc.h | 59 + include/dt-bindings/power/summit,smb347-charger.h | 19 + .../regulator/mediatek,mt6360-regulator.h | 16 + include/dt-bindings/reset/imx8mq-reset.h | 5 +- .../dt-bindings/reset/raspberrypi,firmware-reset.h | 13 + include/dt-bindings/reset/sun50i-a100-ccu.h | 68 + include/dt-bindings/reset/sun50i-a100-r-ccu.h | 18 + include/dt-bindings/reset/tegra234-reset.h | 10 + include/dt-bindings/reset/xlnx-versal-resets.h | 105 + include/dt-bindings/soc/bcm6318-pm.h | 17 + include/dt-bindings/soc/bcm63268-pm.h | 21 + include/dt-bindings/soc/bcm6328-pm.h | 17 + include/dt-bindings/soc/bcm6362-pm.h | 21 + include/dt-bindings/sound/qcom,q6afe.h | 96 +- include/dt-bindings/sound/sc7180-lpass.h | 11 + src/arc/axc001.dtsi | 2 +- src/arc/axc003.dtsi | 2 +- src/arc/axc003_idu.dtsi | 2 +- src/arc/vdk_axc003.dtsi | 2 +- src/arc/vdk_axc003_idu.dtsi | 2 +- src/arm/alpine.dtsi | 2 +- src/arm/am335x-lxm.dts | 4 + src/arm/am335x-moxa-uc-8100-common.dtsi | 427 ++++ src/arm/am335x-moxa-uc-8100-me-t.dts | 404 +-- src/arm/am335x-sbc-t335.dts | 4 +- src/arm/am33xx-l4.dtsi | 1 - src/arm/am33xx.dtsi | 4 +- src/arm/am3517-evm-ui.dtsi | 4 +- src/arm/am3517-evm.dts | 2 +- src/arm/am3874-iceboard.dts | 8 +- src/arm/am4372.dtsi | 6 +- src/arm/am437x-cm-t43.dts | 14 +- src/arm/am437x-gp-evm.dts | 15 +- src/arm/am437x-idk-evm.dts | 13 +- src/arm/am437x-l4.dtsi | 80 +- src/arm/am437x-sbc-t43.dts | 2 +- src/arm/am437x-sk-evm.dts | 14 +- src/arm/am43x-epos-evm.dts | 19 +- src/arm/am571x-idk.dts | 27 - src/arm/am5729-beagleboneai.dts | 14 +- src/arm/am572x-idk.dts | 5 - src/arm/am574x-idk.dts | 5 - src/arm/am57xx-beagle-x15-common.dtsi | 19 +- src/arm/am57xx-cl-som-am57x.dts | 13 +- src/arm/am57xx-idk-common.dtsi | 14 +- src/arm/am57xx-sbc-am57x.dts | 4 +- src/arm/animeo_ip.dts | 3 +- src/arm/arm-realview-eb.dtsi | 2 +- src/arm/arm-realview-pb11mp.dts | 20 +- src/arm/arm-realview-pbx.dtsi | 4 +- src/arm/aspeed-bmc-facebook-cmm.dts | 17 + src/arm/aspeed-bmc-facebook-minipack.dts | 47 +- src/arm/aspeed-bmc-facebook-wedge40.dts | 5 +- src/arm/aspeed-bmc-facebook-wedge400.dts | 420 ++++ src/arm/aspeed-bmc-facebook-yamp.dts | 17 + src/arm/aspeed-bmc-ibm-rainier.dts | 23 +- src/arm/aspeed-bmc-opp-mowgli.dts | 662 +++++ src/arm/aspeed-bmc-opp-tacoma.dts | 7 + src/arm/aspeed-g5.dtsi | 1 - src/arm/ast2500-facebook-netbmc-common.dtsi | 13 - src/arm/at91-ariag25.dts | 3 +- src/arm/at91-ariettag25.dts | 3 +- src/arm/at91-cosino.dtsi | 3 +- src/arm/at91-cosino_mega2560.dts | 1 + src/arm/at91-foxg20.dts | 3 +- src/arm/at91-kizbox.dts | 2 +- src/arm/at91-kizbox2-common.dtsi | 2 +- src/arm/at91-kizboxmini-common.dtsi | 2 +- src/arm/at91-linea.dtsi | 2 +- src/arm/at91-qil_a9260.dts | 3 +- src/arm/at91-sam9_l9260.dts | 3 +- src/arm/at91-sam9x60ek.dts | 13 + src/arm/at91-sama5d3_xplained.dts | 2 +- src/arm/at91-sama5d4_ma5d4.dtsi | 2 +- src/arm/at91-sama5d4_xplained.dts | 2 +- src/arm/at91-sama5d4ek.dts | 2 +- src/arm/at91-som60.dtsi | 2 +- src/arm/at91-vinco.dts | 2 +- src/arm/at91-wb45n.dtsi | 3 +- src/arm/at91-wb50n.dtsi | 2 +- src/arm/at91rm9200.dtsi | 11 +- src/arm/at91rm9200ek.dts | 2 +- src/arm/at91sam9260.dtsi | 11 +- src/arm/at91sam9260ek.dts | 3 +- src/arm/at91sam9261.dtsi | 10 +- src/arm/at91sam9261ek.dts | 2 +- src/arm/at91sam9263.dtsi | 15 +- src/arm/at91sam9263ek.dts | 3 +- src/arm/at91sam9g20.dtsi | 5 +- src/arm/at91sam9g20ek_common.dtsi | 3 +- src/arm/at91sam9g25-gardena-smart-gateway.dts | 158 ++ src/arm/at91sam9g45.dtsi | 12 +- src/arm/at91sam9m10g45ek.dts | 4 +- src/arm/at91sam9n12.dtsi | 10 +- src/arm/at91sam9n12ek.dts | 2 +- src/arm/at91sam9rl.dtsi | 10 +- src/arm/at91sam9rlek.dts | 2 +- src/arm/at91sam9x5.dtsi | 12 +- src/arm/at91sam9x5cm.dtsi | 2 +- src/arm/at91sam9x5ek.dtsi | 2 + src/arm/at91sam9xe.dtsi | 3 + src/arm/bcm-cygnus.dtsi | 4 +- src/arm/bcm-nsp.dtsi | 6 +- src/arm/bcm2711-rpi-4-b.dts | 70 + src/arm/bcm2711.dtsi | 122 +- src/arm/bcm53016-meraki-mr32.dts | 197 ++ src/arm/bcm5301x.dtsi | 25 +- src/arm/bcm958525xmc.dts | 2 +- src/arm/bcm958625k.dts | 2 +- src/arm/cros-ec-keyboard.dtsi | 1 + src/arm/dra7-evm.dts | 15 +- src/arm/dra7-l4.dtsi | 55 - src/arm/dra7.dtsi | 4 +- src/arm/dra71-evm.dts | 14 +- src/arm/dra72-evm-common.dtsi | 10 +- src/arm/dra72-evm-revc.dts | 14 +- src/arm/dra72-evm.dts | 13 +- src/arm/dra76-evm.dts | 18 +- src/arm/dra76x.dtsi | 4 +- src/arm/emev2.dtsi | 2 +- src/arm/ethernut5.dts | 2 +- src/arm/exynos3250-artik5.dtsi | 4 + src/arm/exynos3250-monk.dts | 6 +- src/arm/exynos3250-rinato.dts | 6 +- src/arm/exynos3250.dtsi | 44 +- src/arm/exynos4210-i9100.dts | 56 +- src/arm/exynos4210-origen.dts | 27 + src/arm/exynos4210-smdkv310.dts | 25 + src/arm/exynos4210-trats.dts | 186 +- src/arm/exynos4210-universal_c210.dts | 36 +- src/arm/exynos4210.dtsi | 38 +- src/arm/exynos4412-galaxy-s3.dtsi | 42 +- src/arm/exynos4412-i9300.dts | 6 +- src/arm/exynos4412-i9305.dts | 2 +- src/arm/exynos4412-midas.dtsi | 116 +- src/arm/exynos4412-n710x.dts | 39 +- src/arm/exynos4412-odroid-common.dtsi | 34 +- src/arm/exynos4412-odroidu3.dts | 46 +- src/arm/exynos4412-origen.dts | 25 + src/arm/exynos4412-smdk4412.dts | 27 + src/arm/exynos4412-tiny4412.dts | 24 + src/arm/exynos4412-trats2.dts | 2 +- src/arm/exynos4412.dtsi | 18 +- src/arm/exynos5.dtsi | 10 +- src/arm/exynos5250-arndale.dts | 20 +- src/arm/exynos5250-smdk5250.dts | 16 +- src/arm/exynos5250-spring.dts | 41 +- src/arm/exynos5250.dtsi | 54 +- src/arm/exynos5260.dtsi | 4 +- src/arm/exynos5410-odroidxu.dts | 8 +- src/arm/exynos5410-smdk5410.dts | 12 + src/arm/exynos5410.dtsi | 12 +- src/arm/exynos5420-smdk5420.dts | 3 + src/arm/exynos5420.dtsi | 16 +- src/arm/exynos5422-odroid-core.dtsi | 4 +- src/arm/exynos5422-odroidxu3-audio.dtsi | 60 +- src/arm/exynos5422-odroidxu4.dts | 60 +- src/arm/hi3620.dtsi | 32 +- src/arm/hip04.dtsi | 6 +- src/arm/hisi-x5hd2.dtsi | 5 +- src/arm/imx23-evk.dts | 2 +- src/arm/imx23.dtsi | 2 +- src/arm/imx25-pinfunc.h | 28 +- src/arm/imx27-phytec-phycard-s-som.dtsi | 4 +- src/arm/imx27-phytec-phycore-rdk.dts | 2 +- src/arm/imx27.dtsi | 2 +- src/arm/imx28-apf28.dts | 2 +- src/arm/imx28-apx4devkit.dts | 2 +- src/arm/imx28-evk.dts | 2 +- src/arm/imx28-m28.dtsi | 2 +- src/arm/imx28-m28cu3.dts | 2 +- src/arm/imx28.dtsi | 2 +- src/arm/imx50-evk.dts | 4 +- src/arm/imx51-apf51dev.dts | 4 +- src/arm/imx53-m53menlo.dts | 2 +- src/arm/imx53-smd.dts | 2 +- src/arm/imx53-tqma53.dtsi | 8 +- src/arm/imx53-voipac-dmm-668.dtsi | 3 +- src/arm/imx6-logicpd-baseboard.dtsi | 3 +- src/arm/imx6dl-aristainetos_4.dts | 2 +- src/arm/imx6dl-eckelmann-ci4x10.dts | 4 +- src/arm/imx6dl-prtrvt.dts | 4 +- src/arm/imx6dl-prtvt7.dts | 2 +- src/arm/imx6dl-tqma6a.dtsi | 16 + src/arm/imx6dl-tqma6b.dtsi | 16 + src/arm/imx6dl-yapp4-common.dtsi | 38 +- src/arm/imx6dl-yapp4-hydra.dts | 6 +- src/arm/imx6dl-yapp4-orion.dts | 54 + src/arm/imx6dl-yapp4-ursa.dts | 4 + src/arm/imx6dl.dtsi | 8 +- src/arm/imx6q-b450v3.dts | 14 +- src/arm/imx6q-b650v3.dts | 12 +- src/arm/imx6q-b850v3.dts | 4 +- src/arm/imx6q-ba16.dtsi | 2 +- src/arm/imx6q-bx50v3.dtsi | 31 +- src/arm/imx6q-cm-fx6.dts | 2 +- src/arm/imx6q-dhcom-som.dtsi | 2 +- src/arm/imx6q-dmo-edmqmx6.dts | 2 +- src/arm/imx6q-dms-ba16.dts | 2 +- src/arm/imx6q-gw5400-a.dts | 2 +- src/arm/imx6q-kontron-samx6i.dtsi | 7 +- src/arm/imx6q-logicpd.dts | 2 +- src/arm/imx6q-prti6q.dts | 10 +- src/arm/imx6q-tqma6a.dtsi | 16 + src/arm/imx6q-tqma6b.dtsi | 15 + src/arm/imx6q-var-dt6customboard.dts | 4 +- src/arm/imx6q.dtsi | 8 +- *** 85775 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Sun Jan 17 18:03:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2265A4D2337 for ; Sun, 17 Jan 2021 18: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 4DJjTf0QFjz3mxH; Sun, 17 Jan 2021 18: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 016FF2593F; Sun, 17 Jan 2021 18: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 10HI3n5m051187; Sun, 17 Jan 2021 18: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 10HI3nx2051186; Sun, 17 Jan 2021 18:03:49 GMT (envelope-from git) Date: Sun, 17 Jan 2021 18:03:49 GMT Message-Id: <202101171803.10HI3nx2051186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Emmanuel Vadot Subject: git: 0411349a2de1 - Create tag vendor/device-tree/5.10 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/tags/vendor/device-tree/5.10 X-Git-Reftype: annotated tag X-Git-Commit: 0411349a2de116387745350ae17b1f250d4b46f0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 18:03:50 -0000 The annotated tag vendor/device-tree/5.10 has been created by manu: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/device-tree/5.10 tag vendor/device-tree/5.10 Tagger: Emmanuel Vadot TaggerDate: 2021-01-17 18:03:14 +0000 Tag import of devicetree files from Linux 5.10 commit e7ffa3b5ce04742455c6bd4d8af0fdedd9978c77 Author: Emmanuel Vadot AuthorDate: 2021-01-17 18:02:46 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-17 18:02:46 +0000 Import devicetree files from Linux 5.10 From owner-dev-commits-src-all@freebsd.org Sun Jan 17 19:57:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4C2A4D61AB; Sun, 17 Jan 2021 19: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 4DJm1K491cz4R9k; Sun, 17 Jan 2021 19:57: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 81B142701E; Sun, 17 Jan 2021 19: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 10HJvvHc094553; Sun, 17 Jan 2021 19:57:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HJvvmT094552; Sun, 17 Jan 2021 19:57:57 GMT (envelope-from git) Date: Sun, 17 Jan 2021 19:57:57 GMT Message-Id: <202101171957.10HJvvmT094552@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Conrad Meyer Subject: git: ddf61156132b - main - fstyp(8): fix exfat detection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddf61156132b610915325769cbb93ea11be0d433 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 19:57:57 -0000 The branch main has been updated by cem: URL: https://cgit.FreeBSD.org/src/commit/?id=ddf61156132b610915325769cbb93ea11be0d433 commit ddf61156132b610915325769cbb93ea11be0d433 Author: Conrad Meyer AuthorDate: 2021-01-17 19:55:06 +0000 Commit: Conrad Meyer CommitDate: 2021-01-17 19:55:06 +0000 fstyp(8): fix exfat detection In the presence of high-level errors (spec violations, bad boot blocks checksum), report non-detection instead of detection. PR: 252787 (related, but does not fully address) --- usr.sbin/fstyp/exfat.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/usr.sbin/fstyp/exfat.c b/usr.sbin/fstyp/exfat.c index d77ba9253d39..3f10cb6a9e5a 100644 --- a/usr.sbin/fstyp/exfat.c +++ b/usr.sbin/fstyp/exfat.c @@ -330,14 +330,15 @@ fstyp_exfat(FILE *fp, char *label, size_t size) uint32_t chksum; int error; + error = 1; cksect = NULL; ev = (struct exfat_vbr *)read_buf(fp, 0, 512); if (ev == NULL || strncmp(ev->ev_fsname, "EXFAT ", 8) != 0) - goto fail; + goto out; if (ev->ev_log_bytes_per_sect < 9 || ev->ev_log_bytes_per_sect > 12) { warnx("exfat: Invalid BytesPerSectorShift"); - goto done; + goto out; } bytespersec = (1u << ev->ev_log_bytes_per_sect); @@ -345,7 +346,7 @@ fstyp_exfat(FILE *fp, char *label, size_t size) error = exfat_compute_boot_chksum(fp, MAIN_BOOT_REGION_SECT, bytespersec, &chksum); if (error != 0) - goto done; + goto out; cksect = read_sect(fp, MAIN_BOOT_REGION_SECT + SUBREGION_CHKSUM_SECT, bytespersec); @@ -357,7 +358,8 @@ fstyp_exfat(FILE *fp, char *label, size_t size) if (chksum != le32toh(cksect[0])) { warnx("exfat: Found checksum 0x%08x != computed 0x%08x", le32toh(cksect[0]), chksum); - goto done; + error = 1; + goto out; } #ifdef WITH_ICONV @@ -365,12 +367,8 @@ fstyp_exfat(FILE *fp, char *label, size_t size) exfat_find_label(fp, ev, bytespersec, label, size); #endif -done: +out: free(cksect); free(ev); - return (0); - -fail: - free(ev); - return (1); + return (error != 0); } From owner-dev-commits-src-all@freebsd.org Sun Jan 17 20:06:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98E294D68B1; Sun, 17 Jan 2021 20:06: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 4DJmBw3twmz4S3N; Sun, 17 Jan 2021 20:06: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 78442271DF; Sun, 17 Jan 2021 20:06: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 10HK6GVw008109; Sun, 17 Jan 2021 20:06:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HK6GpR008108; Sun, 17 Jan 2021 20:06:16 GMT (envelope-from git) Date: Sun, 17 Jan 2021 20:06:16 GMT Message-Id: <202101172006.10HK6GpR008108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 9af9e7c5cc47 - main - pkgbase: default to installing all specified kernels MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9af9e7c5cc47d3b5ff5fde5bd6707f910486d273 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 20:06:16 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9af9e7c5cc47d3b5ff5fde5bd6707f910486d273 commit 9af9e7c5cc47d3b5ff5fde5bd6707f910486d273 Author: Kyle Evans AuthorDate: 2021-01-15 13:43:38 +0000 Commit: Kyle Evans CommitDate: 2021-01-17 20:05:33 +0000 pkgbase: default to installing all specified kernels These only get staged off to the side, not installed into the system. Let's change the default for packages/update-packages to be less surprising. MFC after: 1 week Reviewed by: manu, meena Differential Revision: https://reviews.freebsd.org/D28190 --- Makefile.inc1 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 5a9eff870dd5..27229cb06711 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1711,7 +1711,15 @@ buildkernel: .MAKE .PHONY echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" +.if !make(packages) && !make(update-packages) NO_INSTALLEXTRAKERNELS?= yes +.else +# packages/update-packages installs kernels to a staging directory then builds +# packages from the result to be installed, typically to other systems. It is +# less surprising for these targets to honor KERNCONF if multiple kernels are +# specified. +NO_INSTALLEXTRAKERNELS?= no +.endif # # installkernel, etc. @@ -1872,11 +1880,14 @@ PKG_VERSION_FROM!=/usr/bin/readlink ${REPODIR}/${PKG_ABI}/latest .endif .endif +PKGMAKEARGS+= PKG_VERSION=${PKG_VERSION} \ + NO_INSTALLEXTRAKERNELS=${NO_INSTALLEXTRAKERNELS} + packages: .PHONY - ${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} real-packages + ${_+_}${MAKE} -C ${.CURDIR} ${PKGMAKEARGS} real-packages update-packages: .PHONY - ${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} real-update-packages + ${_+_}${MAKE} -C ${.CURDIR} ${PKGMAKEARGS} real-update-packages package-pkg: .PHONY rm -rf /tmp/ports.${TARGET} || : From owner-dev-commits-src-all@freebsd.org Sun Jan 17 20:08:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D440F4D6573; Sun, 17 Jan 2021 20: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 4DJmFL5jGlz4S1h; Sun, 17 Jan 2021 20:08: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 AF35C27521; Sun, 17 Jan 2021 20: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 10HK8MX0008530; Sun, 17 Jan 2021 20: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 10HK8MX7008529; Sun, 17 Jan 2021 20:08:22 GMT (envelope-from git) Date: Sun, 17 Jan 2021 20:08:22 GMT Message-Id: <202101172008.10HK8MX7008529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: da8cc827ae8f - main - pkgbase: collapse -PRERELEASE into STABLE/CURRENT case for version suffix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da8cc827ae8fb7063f7f97c2a0447930c4e934a3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 20:08:22 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=da8cc827ae8fb7063f7f97c2a0447930c4e934a3 commit da8cc827ae8fb7063f7f97c2a0447930c4e934a3 Author: Kyle Evans AuthorDate: 2021-01-14 18:19:51 +0000 Commit: Kyle Evans CommitDate: 2021-01-17 20:08:13 +0000 pkgbase: collapse -PRERELEASE into STABLE/CURRENT case for version suffix -PRERELEASE exists as a given stable/X branch while the next minor version release is in progress. From a functional standpoint, it should be treated as -STABLE since it'll typically be a superset of what's included in the concurrent releng branch. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D28166 --- Makefile.inc1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 27229cb06711..f77fe5cfa25c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -557,7 +557,7 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA .endif .if !defined(PKG_VERSION) -.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} +.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} || ${_BRANCH:MPRERELEASE*} TIMENOW= %Y%m%d%H%M%S EXTRA_REVISION= .s${TIMENOW:gmtime} .elif ${_BRANCH:MALPHA*} @@ -566,8 +566,6 @@ EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} .elif ${_BRANCH:MRC*} EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} -.elif ${_BRANCH:MPRERELEASE*} -EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/} .elif ${_BRANCH:M*-p*} EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif From owner-dev-commits-src-all@freebsd.org Sun Jan 17 20:32:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 060914D740F; Sun, 17 Jan 2021 20:32: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 4DJmnD6qcRz4TWC; Sun, 17 Jan 2021 20:32: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 D2EAB27A2D; Sun, 17 Jan 2021 20:32: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 10HKWWth045958; Sun, 17 Jan 2021 20:32:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HKWWAi045957; Sun, 17 Jan 2021 20:32:32 GMT (envelope-from git) Date: Sun, 17 Jan 2021 20:32:32 GMT Message-Id: <202101172032.10HKWWAi045957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: f9e0752e3573 - main - Create new in6_purgeifaddr() which purges bound ifa prefix if it gets unused. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9e0752e3573e0b60e578e58ee2eac3d42ff533a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 20:32:33 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f9e0752e3573e0b60e578e58ee2eac3d42ff533a commit f9e0752e3573e0b60e578e58ee2eac3d42ff533a Author: Alexander V. Chernikov AuthorDate: 2021-01-13 00:18:00 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-17 20:32:25 +0000 Create new in6_purgeifaddr() which purges bound ifa prefix if it gets unused. Currently if_purgeifaddrs() uses in6_purgeaddr() to remove IPv6 ifaddrs. in6_purgeaddr() does not trrigger prefix removal if number of linked ifas goes to 0, as this is a low-level function. As a result, if_purgeifaddrs() purges all IPv4/IPv6 addresses but keeps corresponding IPv6 prefixes. Fix this by creating higher-level wrapper which handles unused prefix usecase and use it in if_purgeifaddrs(). Differential revision: https://reviews.freebsd.org/D28128 --- sys/net/if.c | 2 +- sys/netinet6/in6.c | 53 +++++++++++++++++++++++++++++--------------------- sys/netinet6/in6_var.h | 1 + 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 68ed4cf65dc1..74fdd066fd2d 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1077,7 +1077,7 @@ if_purgeaddrs(struct ifnet *ifp) #endif /* INET */ #ifdef INET6 if (ifa->ifa_addr->sa_family == AF_INET6) { - in6_purgeaddr(ifa); + in6_purgeifaddr((struct in6_ifaddr *)ifa); /* ifp_addrhead is already updated */ continue; } diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index b42cc16cdb6f..48fa8dd2efc6 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -696,31 +696,10 @@ aifaddr_out: } case SIOCDIFADDR_IN6: - { - struct nd_prefix *pr; - - /* - * If the address being deleted is the only one that owns - * the corresponding prefix, expire the prefix as well. - * XXX: theoretically, we don't have to worry about such - * relationship, since we separate the address management - * and the prefix management. We do this, however, to provide - * as much backward compatibility as possible in terms of - * the ioctl operation. - * Note that in6_purgeaddr() will decrement ndpr_addrcnt. - */ - pr = ia->ia6_ndpr; - in6_purgeaddr(&ia->ia_ifa); - if (pr != NULL && pr->ndpr_addrcnt == 0) { - ND6_WLOCK(); - nd6_prefix_unlink(pr, NULL); - ND6_WUNLOCK(); - nd6_prefix_del(pr); - } + in6_purgeifaddr(ia); EVENTHANDLER_INVOKE(ifaddr_event_ext, ifp, &ia->ia_ifa, IFADDR_EVENT_DEL); break; - } default: if (ifp->if_ioctl == NULL) { @@ -1364,6 +1343,36 @@ in6_purgeaddr(struct ifaddr *ifa) in6_unlink_ifa(ia, ifp); } +/* + * Removes @ia from the corresponding interfaces and unlinks corresponding + * prefix if no addresses are using it anymore. + */ +void +in6_purgeifaddr(struct in6_ifaddr *ia) +{ + struct nd_prefix *pr; + + /* + * If the address being deleted is the only one that owns + * the corresponding prefix, expire the prefix as well. + * XXX: theoretically, we don't have to worry about such + * relationship, since we separate the address management + * and the prefix management. We do this, however, to provide + * as much backward compatibility as possible in terms of + * the ioctl operation. + * Note that in6_purgeaddr() will decrement ndpr_addrcnt. + */ + pr = ia->ia6_ndpr; + in6_purgeaddr(&ia->ia_ifa); + if (pr != NULL && pr->ndpr_addrcnt == 0) { + ND6_WLOCK(); + nd6_prefix_unlink(pr, NULL); + ND6_WUNLOCK(); + nd6_prefix_del(pr); + } +} + + static void in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) { diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index f5e6a931ae64..5f4364c6fba0 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -887,6 +887,7 @@ int in6_update_ifa(struct ifnet *, struct in6_aliasreq *, void in6_prepare_ifra(struct in6_aliasreq *, const struct in6_addr *, const struct in6_addr *); void in6_purgeaddr(struct ifaddr *); +void in6_purgeifaddr(struct in6_ifaddr *); int in6if_do_dad(struct ifnet *); void in6_savemkludge(struct in6_ifaddr *); void *in6_domifattach(struct ifnet *); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 20:32:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 161FF4D750B; Sun, 17 Jan 2021 20:32: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 4DJmnG084qz4TL6; Sun, 17 Jan 2021 20:32: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 EBC9E279B0; Sun, 17 Jan 2021 20:32: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 10HKWXRF045981; Sun, 17 Jan 2021 20:32:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HKWXFL045980; Sun, 17 Jan 2021 20:32:33 GMT (envelope-from git) Date: Sun, 17 Jan 2021 20:32:33 GMT Message-Id: <202101172032.10HKWXFL045980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 9d6567bc30a0 - main - Fix panic on vnet creation if fib algo has been set to fixed value. Make fixed algo property per-VNET instead of global. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d6567bc30a0ae3f6660cc55bc97283ba791b112 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 20:32:34 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=9d6567bc30a0ae3f6660cc55bc97283ba791b112 commit 9d6567bc30a0ae3f6660cc55bc97283ba791b112 Author: Alexander V. Chernikov AuthorDate: 2021-01-16 22:55:14 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-17 20:32:25 +0000 Fix panic on vnet creation if fib algo has been set to fixed value. Make fixed algo property per-VNET instead of global. --- sys/net/route/fib_algo.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c index 5e63535f3926..b84217034e16 100644 --- a/sys/net/route/fib_algo.c +++ b/sys/net/route/fib_algo.c @@ -106,12 +106,14 @@ SYSCTL_NODE(_net_route, OID_AUTO, algo, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Fib algorithm lookups"); #ifdef INET6 -bool algo_fixed_inet6 = false; +VNET_DEFINE_STATIC(bool, algo_fixed_inet6) = false; +#define V_algo_fixed_inet6 VNET(algo_fixed_inet6) SYSCTL_NODE(_net_route_algo, OID_AUTO, inet6, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "IPv6 longest prefix match lookups"); #endif #ifdef INET -bool algo_fixed_inet = false; +VNET_DEFINE_STATIC(bool, algo_fixed_inet) = false; +#define V_algo_fixed_inet VNET(algo_fixed_inet) SYSCTL_NODE(_net_route_algo, OID_AUTO, inet, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "IPv4 longest prefix match lookups"); #endif @@ -155,6 +157,7 @@ static void destroy_fd_instance_epoch(epoch_context_t ctx); static enum flm_op_result attach_datapath(struct fib_data *fd); static bool is_idx_free(struct fib_data *fd, uint32_t index); static void set_algo_fixed(struct rib_head *rh); +static bool is_algo_fixed(struct rib_head *rh); static uint32_t fib_ref_nhop(struct fib_data *fd, struct nhop_object *nh); static void fib_unref_nhop(struct fib_data *fd, struct nhop_object *nh); @@ -983,7 +986,7 @@ static void rebuild_fd_callout(void *_data) { struct fib_data *fd, *fd_new, *fd_tmp; - struct fib_lookup_module *flm_new; + struct fib_lookup_module *flm_new = NULL; struct epoch_tracker et; enum flm_op_result result; bool need_rebuild = false; @@ -1000,7 +1003,8 @@ rebuild_fd_callout(void *_data) CURVNET_SET(fd->fd_vnet); /* First, check if we're still OK to use this algo */ - flm_new = fib_check_best_algo(fd->fd_rh, fd->fd_flm); + if (!is_algo_fixed(fd->fd_rh)) + flm_new = fib_check_best_algo(fd->fd_rh, fd->fd_flm); if ((flm_new == NULL) && (!need_rebuild)) { /* Keep existing algo, no need to rebuild. */ CURVNET_RESTORE(); @@ -1135,7 +1139,7 @@ set_algo_inet_sysctl_handler(SYSCTL_HANDLER_ARGS) return (set_fib_algo(RT_DEFAULT_FIB, AF_INET, oidp, req)); } SYSCTL_PROC(_net_route_algo_inet, OID_AUTO, algo, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, + CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, set_algo_inet_sysctl_handler, "A", "Set IPv4 lookup algo"); #endif @@ -1147,7 +1151,7 @@ set_algo_inet6_sysctl_handler(SYSCTL_HANDLER_ARGS) return (set_fib_algo(RT_DEFAULT_FIB, AF_INET6, oidp, req)); } SYSCTL_PROC(_net_route_algo_inet6, OID_AUTO, algo, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, + CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, set_algo_inet6_sysctl_handler, "A", "Set IPv6 lookup algo"); #endif @@ -1434,12 +1438,12 @@ set_algo_fixed(struct rib_head *rh) switch (rh->rib_family) { #ifdef INET case AF_INET: - algo_fixed_inet = true; + V_algo_fixed_inet = true; break; #endif #ifdef INET6 case AF_INET6: - algo_fixed_inet6 = true; + V_algo_fixed_inet6 = true; break; #endif } @@ -1452,11 +1456,11 @@ is_algo_fixed(struct rib_head *rh) switch (rh->rib_family) { #ifdef INET case AF_INET: - return (algo_fixed_inet); + return (V_algo_fixed_inet); #endif #ifdef INET6 case AF_INET6: - return (algo_fixed_inet6); + return (V_algo_fixed_inet6); #endif } return (false); @@ -1480,11 +1484,6 @@ fib_check_best_algo(struct rib_head *rh, struct fib_lookup_module *orig_flm) fib_get_rtable_info(rh, &rinfo); FIB_MOD_LOCK(); - if (is_algo_fixed(rh)) { - FIB_MOD_UNLOCK(); - return (NULL); - } - TAILQ_FOREACH(flm, &all_algo_list, entries) { if (flm->flm_family != rh->rib_family) continue; From owner-dev-commits-src-all@freebsd.org Sun Jan 17 20:32:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C6CB4D70DC; Sun, 17 Jan 2021 20: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 4DJmnH45Ylz4TT5; Sun, 17 Jan 2021 20:32: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 27D3627A2E; Sun, 17 Jan 2021 20: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 10HKWZV8045999; Sun, 17 Jan 2021 20: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 10HKWZdo045998; Sun, 17 Jan 2021 20:32:35 GMT (envelope-from git) Date: Sun, 17 Jan 2021 20:32:35 GMT Message-Id: <202101172032.10HKWZdo045998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: f8798767219d - main - Fix IPv4 fib bsearch4() lookup array construction. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8798767219ddc5a6dc075b1d2c751ee910e4f10 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 20:32:36 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f8798767219ddc5a6dc075b1d2c751ee910e4f10 commit f8798767219ddc5a6dc075b1d2c751ee910e4f10 Author: Alexander V. Chernikov AuthorDate: 2021-01-17 19:43:52 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-17 20:32:26 +0000 Fix IPv4 fib bsearch4() lookup array construction. Current code didn't properly handle the case with nested prefixes like 10.0.0.0/24 && 10.0.0.0/25. --- sys/netinet/in_fib_algo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/netinet/in_fib_algo.c b/sys/netinet/in_fib_algo.c index 48e48da395fa..fd817a3fedf0 100644 --- a/sys/netinet/in_fib_algo.c +++ b/sys/netinet/in_fib_algo.c @@ -360,6 +360,18 @@ bsearch4_process_record(struct bsearch4_array *dst_array, if (!add_array_entry(dst_array, &new_entry)) return (false); } + + /* + * Special case: adding more specific prefix at the start of + * the previous interval: + * 10.0.0.0(/24,nh=3), 10.0.0.0(/25,nh=4) + * Alter the last record, seeting new nexthop and mask. + */ + if (br_tmp->addr4 == rib_entry->addr4) { + *br_tmp = *rib_entry; + add_array_entry(stack, rib_entry); + return (true); + } } if (!add_array_entry(dst_array, rib_entry)) From owner-dev-commits-src-all@freebsd.org Sun Jan 17 20:32:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A4A04D73BB; Sun, 17 Jan 2021 20:32: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 4DJmnJ3dfTz4Tc1; Sun, 17 Jan 2021 20: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 409D1277EE; Sun, 17 Jan 2021 20:32: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 10HKWa1t046021; Sun, 17 Jan 2021 20:32:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HKWaHQ046020; Sun, 17 Jan 2021 20:32:36 GMT (envelope-from git) Date: Sun, 17 Jan 2021 20:32:36 GMT Message-Id: <202101172032.10HKWaHQ046020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 74935ce881ea - main - Enable running fib tests inside vnet jail. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74935ce881ea7d0abdd59ccae10c6593d4ac14e6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 20:32:37 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=74935ce881ea7d0abdd59ccae10c6593d4ac14e6 commit 74935ce881ea7d0abdd59ccae10c6593d4ac14e6 Author: Alexander V. Chernikov AuthorDate: 2021-01-17 19:46:56 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-01-17 20:32:26 +0000 Enable running fib tests inside vnet jail. --- sys/tests/fib_lookup/fib_lookup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/tests/fib_lookup/fib_lookup.c b/sys/tests/fib_lookup/fib_lookup.c index b48fdfb5630e..3dd1bb8d5a50 100644 --- a/sys/tests/fib_lookup/fib_lookup.c +++ b/sys/tests/fib_lookup/fib_lookup.c @@ -219,7 +219,7 @@ run_test_inet(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_net_route_test, OID_AUTO, run_inet, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, run_test_inet, "I", "Execute fib4_lookup test"); static uint64_t @@ -283,7 +283,7 @@ run_test_inet6(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_net_route_test, OID_AUTO, run_inet6, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, run_test_inet6, "I", "Execute fib6_lookup test"); static bool @@ -389,7 +389,7 @@ run_test_inet_random(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_net_route_test, OID_AUTO, run_inet_random, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, run_test_inet_random, "I", "Execute fib4_lookup random check tests"); @@ -502,7 +502,7 @@ run_test_inet_scan(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_net_route_test, OID_AUTO, run_inet_scan, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, run_test_inet_scan, "I", "Execute fib4_lookup scan tests"); From owner-dev-commits-src-all@freebsd.org Sun Jan 17 21:18:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03C274D87E1; Sun, 17 Jan 2021 21:18: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 4DJnpN6h67z4XZ5; Sun, 17 Jan 2021 21:18: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 D825B606; Sun, 17 Jan 2021 21:18: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 10HLIam5098985; Sun, 17 Jan 2021 21:18:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10HLIaIV098984; Sun, 17 Jan 2021 21:18:36 GMT (envelope-from git) Date: Sun, 17 Jan 2021 21:18:36 GMT Message-Id: <202101172118.10HLIaIV098984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 75e7ef74dfc1 - main - netgraph/ng_source: Allow ng_source to inject into any netgraph network MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75e7ef74dfc12e01b1ef4706110d238639e04543 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 21:18:37 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=75e7ef74dfc12e01b1ef4706110d238639e04543 commit 75e7ef74dfc12e01b1ef4706110d238639e04543 Author: Lutz Donnerhacke AuthorDate: 2021-01-17 20:35:28 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-01-17 21:17:01 +0000 netgraph/ng_source: Allow ng_source to inject into any netgraph network PR: 240530 Reviewed by: kp Approved by: kp (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D21968 --- share/man/man4/ng_source.4 | 11 +++++++++-- sys/netgraph/ng_source.c | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/share/man/man4/ng_source.4 b/share/man/man4/ng_source.4 index 5205bc41e15d..87b235bda2c8 100644 --- a/share/man/man4/ng_source.4 +++ b/share/man/man4/ng_source.4 @@ -32,7 +32,7 @@ .\" Author: Dave Chapeskie .\" $FreeBSD$ .\" -.Dd March 1, 2007 +.Dd January 18, 2021 .Dt NG_SOURCE 4 .Os .Sh NAME @@ -91,7 +91,14 @@ should be turned off on .Xr ng_ether 4 node manually. .Pp -Once interface is configured, upon receipt of a +If the node is connected to a netgraph network, which does not +terminate in a real +.Xr ng_ether 4 +interface, limit the packet injection rate explicitly with the +.Va NGM_SOURCE_SETPPS +control message. +.Pp +Upon receipt of a .Dv NGM_SOURCE_START control message the node starts sending the previously queued packets out the diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c index da8f42381ac3..401548da65d0 100644 --- a/sys/netgraph/ng_source.c +++ b/sys/netgraph/ng_source.c @@ -683,8 +683,8 @@ ng_source_clr_data (sc_p sc) static int ng_source_start(sc_p sc, uint64_t packets) { - if (sc->output_ifp == NULL) { - printf("ng_source: start without iface configured\n"); + if (sc->output_ifp == NULL && sc->stats.maxPps == 0) { + printf("ng_source: start without iface or pps configured\n"); return (ENXIO); } From owner-dev-commits-src-all@freebsd.org Sun Jan 17 22:16:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8DAA14D9AE2; Sun, 17 Jan 2021 22:16: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 4DJq4x3bGLz4bg2; Sun, 17 Jan 2021 22:16: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 6342711D5; Sun, 17 Jan 2021 22:16: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 10HMGHbo076855; Sun, 17 Jan 2021 22: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 10HMGH1D076854; Sun, 17 Jan 2021 22:16:17 GMT (envelope-from git) Date: Sun, 17 Jan 2021 22:16:17 GMT Message-Id: <202101172216.10HMGH1D076854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 1caed70c6264 - main - loader: update gfx module MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1caed70c62646a5978bbeb4562bc3ae2dabc874a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 22:16:17 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=1caed70c62646a5978bbeb4562bc3ae2dabc874a commit 1caed70c62646a5978bbeb4562bc3ae2dabc874a Author: Toomas Soome AuthorDate: 2021-01-17 22:09:18 +0000 Commit: Toomas Soome CommitDate: 2021-01-17 22:15:36 +0000 loader: update gfx module Update from illumos review process. Add more comments, drop memory buffer from blt functions. --- stand/common/gfx_fb.c | 118 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 76 insertions(+), 42 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 9342521fd0cf..d98e6d1bae4b 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -29,6 +29,61 @@ * $FreeBSD$ */ +/* + * The workhorse here is gfxfb_blt(). It is implemented to mimic UEFI + * GOP Blt, and allows us to fill the rectangle on screen, copy + * rectangle from video to buffer and buffer to video and video to video. + * Such implementation does allow us to have almost identical implementation + * for both BIOS VBE and UEFI. + * + * ALL pixel data is assumed to be 32-bit BGRA (byte order Blue, Green, Red, + * Alpha) format, this allows us to only handle RGB data and not to worry + * about mixing RGB with indexed colors. + * Data exchange between memory buffer and video will translate BGRA + * and native format as following: + * + * 32-bit to/from 32-bit is trivial case. + * 32-bit to/from 24-bit is also simple - we just drop the alpha channel. + * 32-bit to/from 16-bit is more complicated, because we nee to handle + * data loss from 32-bit to 16-bit. While reading/writing from/to video, we + * need to apply masks of 16-bit color components. This will preserve + * colors for terminal text. For 32-bit truecolor PMG images, we need to + * translate 32-bit colors to 15/16 bit colors and this means data loss. + * There are different algorithms how to perform such color space reduction, + * we are currently using bitwise right shift to reduce color space and so far + * this technique seems to be sufficient (see also gfx_fb_putimage(), the + * end of for loop). + * 32-bit to/from 8-bit is the most troublesome because 8-bit colors are + * indexed. From video, we do get color indexes, and we do translate + * color index values to RGB. To write to video, we again need to translate + * RGB to color index. Additionally, we need to translate between VGA and + * console colors. + * + * Our internal color data is represented using BGRA format. But the hardware + * used indexed colors for 8-bit colors (0-255) and for this mode we do + * need to perform translation to/from BGRA and index values. + * + * - paletteentry RGB <-> index - + * BGRA BUFFER <----/ \ - VIDEO + * \ / + * - RGB (16/24/32) - + * + * To perform index to RGB translation, we use palette table generated + * from when we set up 8-bit mode video. We cannot read palette data from + * the hardware, because not all hardware supports reading it. + * + * BGRA to index is implemented in rgb_to_color_index() by searching + * palette array for closest match of RBG values. + * + * Note: In 8-bit mode, We do store first 16 colors to palette registers + * in VGA color order, this serves two purposes; firstly, + * if palette update is not supported, we still have correct 16 colors. + * Secondly, the kernel does get correct 16 colors when some other boot + * loader is used. However, the palette map for 8-bit colors is using + * console color ordering - this does allow us to skip translation + * from VGA colors to console colors, while we are reading RGB data. + */ + #include #include #include @@ -257,7 +312,7 @@ rgb_to_color_index(uint8_t r, uint8_t g, uint8_t b) int diff; color = 0; - best = NCMAP * NCMAP * NCMAP; + best = 255 * 255 * 255; for (k = 0; k < NCMAP; k++) { diff = r - pe8[k].Red; dist = diff * diff; @@ -337,7 +392,6 @@ gfx_mem_wr4(uint8_t *base, size_t size, uint32_t o, uint32_t v) *(uint32_t *)(base + o) = v; } -/* Our GFX Block transfer toolkit. */ static int gfxfb_blt_fill(void *BltBuffer, uint32_t DestinationX, uint32_t DestinationY, uint32_t Width, uint32_t Height) @@ -409,6 +463,8 @@ static int gfxfb_blt_fill(void *BltBuffer, case 4: gfx_mem_wr4(destination, size, off, data); break; + default: + return (EINVAL); } off += bpp; } @@ -430,7 +486,7 @@ gfxfb_blt_video_to_buffer(void *BltBuffer, uint32_t SourceX, uint32_t SourceY, uint32_t x, sy, dy; uint32_t bpp, pitch, copybytes; off_t off; - uint8_t *source, *destination, *buffer, *sb; + uint8_t *source, *destination, *sb; uint8_t rm, rp, gm, gp, bm, bp; bool bgra; @@ -468,36 +524,21 @@ gfxfb_blt_video_to_buffer(void *BltBuffer, uint32_t SourceX, uint32_t SourceY, ffs(gm) - 1 == 8 && gp == 8 && ffs(bm) - 1 == 8 && bp == 0; - if (bgra) { - buffer = NULL; - } else { - buffer = malloc(copybytes); - if (buffer == NULL) - return (ENOMEM); - } - for (sy = SourceY, dy = DestinationY; dy < Height + DestinationY; sy++, dy++) { off = sy * pitch + SourceX * bpp; source = gfx_get_fb_address() + off; + destination = (uint8_t *)BltBuffer + dy * Delta + + DestinationX * sizeof (*p); if (bgra) { - destination = (uint8_t *)BltBuffer + dy * Delta + - DestinationX * sizeof (*p); + bcopy(source, destination, copybytes); } else { - destination = buffer; - } - - bcopy(source, destination, copybytes); - - if (!bgra) { for (x = 0; x < Width; x++) { uint32_t c = 0; - p = (void *)((uint8_t *)BltBuffer + - dy * Delta + - (DestinationX + x) * sizeof (*p)); - sb = buffer + x * bpp; + p = (void *)(destination + x * sizeof (*p)); + sb = source + x * bpp; switch (bpp) { case 1: c = *sb; @@ -511,6 +552,8 @@ gfxfb_blt_video_to_buffer(void *BltBuffer, uint32_t SourceX, uint32_t SourceY, case 4: c = *(uint32_t *)sb; break; + default: + return (EINVAL); } if (bpp == 1) { @@ -527,7 +570,6 @@ gfxfb_blt_video_to_buffer(void *BltBuffer, uint32_t SourceX, uint32_t SourceY, } } - free(buffer); return (0); } @@ -544,7 +586,7 @@ gfxfb_blt_buffer_to_video(void *BltBuffer, uint32_t SourceX, uint32_t SourceY, uint32_t x, sy, dy; uint32_t bpp, pitch, copybytes; off_t off; - uint8_t *source, *destination, *buffer; + uint8_t *source, *destination; uint8_t rm, rp, gm, gp, bm, bp; bool bgra; @@ -582,13 +624,6 @@ gfxfb_blt_buffer_to_video(void *BltBuffer, uint32_t SourceX, uint32_t SourceY, ffs(gm) - 1 == 8 && gp == 8 && ffs(bm) - 1 == 8 && bp == 0; - if (bgra) { - buffer = NULL; - } else { - buffer = malloc(copybytes); - if (buffer == NULL) - return (ENOMEM); - } for (sy = SourceY, dy = DestinationY; sy < Height + SourceY; sy++, dy++) { off = dy * pitch + DestinationX * bpp; @@ -597,6 +632,7 @@ gfxfb_blt_buffer_to_video(void *BltBuffer, uint32_t SourceX, uint32_t SourceY, if (bgra) { source = (uint8_t *)BltBuffer + sy * Delta + SourceX * sizeof (*p); + bcopy(source, destination, copybytes); } else { for (x = 0; x < Width; x++) { uint32_t c; @@ -615,35 +651,33 @@ gfxfb_blt_buffer_to_video(void *BltBuffer, uint32_t SourceX, uint32_t SourceY, off = x * bpp; switch (bpp) { case 1: - gfx_mem_wr1(buffer, copybytes, + gfx_mem_wr1(destination, copybytes, off, (c < 16) ? cons_to_vga_colors[c] : c); break; case 2: - gfx_mem_wr2(buffer, copybytes, + gfx_mem_wr2(destination, copybytes, off, c); break; case 3: - gfx_mem_wr1(buffer, copybytes, + gfx_mem_wr1(destination, copybytes, off, (c >> 16) & 0xff); - gfx_mem_wr1(buffer, copybytes, + gfx_mem_wr1(destination, copybytes, off + 1, (c >> 8) & 0xff); - gfx_mem_wr1(buffer, copybytes, + gfx_mem_wr1(destination, copybytes, off + 2, c & 0xff); break; case 4: - gfx_mem_wr4(buffer, copybytes, + gfx_mem_wr4(destination, copybytes, x * bpp, c); break; + default: + return (EINVAL); } } - source = buffer; } - - bcopy(source, destination, copybytes); } - free(buffer); return (0); }