From owner-svn-src-head@freebsd.org Sun Mar 22 01:27:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA08A2723D3; Sun, 22 Mar 2020 01:27:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lKd65l2pz4JQ0; Sun, 22 Mar 2020 01:27:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAE2D1DA36; Sun, 22 Mar 2020 01:27:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02M1RcPw068046; Sun, 22 Mar 2020 01:27:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02M1RcWa068044; Sun, 22 Mar 2020 01:27:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202003220127.02M1RcWa068044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 22 Mar 2020 01:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359201 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblzma/common contrib/xz/src/... X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblzma/common contrib/xz/src/liblzma/delta contrib/xz/... X-SVN-Commit-Revision: 359201 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 01:27:38 -0000 Author: delphij Date: Sun Mar 22 01:27:38 2020 New Revision: 359201 URL: https://svnweb.freebsd.org/changeset/base/359201 Log: MFV r359197: xz 5.2.5. MFC after: 2 weeks Relnotes: yes Modified: head/contrib/xz/ChangeLog head/contrib/xz/FREEBSD-Xlist head/contrib/xz/README head/contrib/xz/THANKS head/contrib/xz/src/common/sysdefs.h head/contrib/xz/src/common/tuklib_cpucores.c head/contrib/xz/src/common/tuklib_exit.c head/contrib/xz/src/common/tuklib_integer.h head/contrib/xz/src/common/tuklib_mbstr.h head/contrib/xz/src/common/tuklib_mbstr_fw.c head/contrib/xz/src/common/tuklib_mbstr_width.c head/contrib/xz/src/liblzma/api/lzma.h head/contrib/xz/src/liblzma/api/lzma/block.h head/contrib/xz/src/liblzma/api/lzma/filter.h head/contrib/xz/src/liblzma/api/lzma/hardware.h head/contrib/xz/src/liblzma/api/lzma/lzma12.h head/contrib/xz/src/liblzma/api/lzma/version.h head/contrib/xz/src/liblzma/api/lzma/vli.h head/contrib/xz/src/liblzma/check/crc32_fast.c head/contrib/xz/src/liblzma/check/crc32_table.c head/contrib/xz/src/liblzma/check/crc64_fast.c head/contrib/xz/src/liblzma/check/crc64_table.c head/contrib/xz/src/liblzma/common/alone_decoder.c head/contrib/xz/src/liblzma/common/alone_encoder.c head/contrib/xz/src/liblzma/common/block_header_decoder.c head/contrib/xz/src/liblzma/common/block_header_encoder.c head/contrib/xz/src/liblzma/common/block_util.c head/contrib/xz/src/liblzma/common/common.c head/contrib/xz/src/liblzma/common/filter_common.h head/contrib/xz/src/liblzma/common/filter_decoder.h head/contrib/xz/src/liblzma/common/filter_flags_encoder.c head/contrib/xz/src/liblzma/common/hardware_physmem.c head/contrib/xz/src/liblzma/common/index.c head/contrib/xz/src/liblzma/common/memcmplen.h head/contrib/xz/src/liblzma/common/stream_encoder_mt.c head/contrib/xz/src/liblzma/common/stream_flags_decoder.c head/contrib/xz/src/liblzma/common/stream_flags_encoder.c head/contrib/xz/src/liblzma/common/vli_decoder.c head/contrib/xz/src/liblzma/delta/delta_decoder.c head/contrib/xz/src/liblzma/lz/lz_decoder.c head/contrib/xz/src/liblzma/lz/lz_encoder_hash.h head/contrib/xz/src/liblzma/lz/lz_encoder_mf.c head/contrib/xz/src/liblzma/lzma/fastpos.h head/contrib/xz/src/liblzma/lzma/fastpos_tablegen.c head/contrib/xz/src/liblzma/lzma/lzma2_decoder.c head/contrib/xz/src/liblzma/lzma/lzma_common.h head/contrib/xz/src/liblzma/lzma/lzma_decoder.c head/contrib/xz/src/liblzma/lzma/lzma_encoder.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_private.h head/contrib/xz/src/liblzma/simple/arm.c head/contrib/xz/src/liblzma/simple/armthumb.c head/contrib/xz/src/liblzma/simple/ia64.c head/contrib/xz/src/liblzma/simple/powerpc.c head/contrib/xz/src/liblzma/simple/simple_coder.c head/contrib/xz/src/liblzma/simple/simple_decoder.c head/contrib/xz/src/liblzma/simple/simple_encoder.c head/contrib/xz/src/liblzma/simple/x86.c head/contrib/xz/src/xz/args.c head/contrib/xz/src/xz/coder.c head/contrib/xz/src/xz/file_io.c head/contrib/xz/src/xz/file_io.h head/contrib/xz/src/xz/main.c head/contrib/xz/src/xz/message.c head/contrib/xz/src/xz/message.h head/contrib/xz/src/xz/mytime.c head/contrib/xz/src/xz/mytime.h head/contrib/xz/src/xz/options.c head/contrib/xz/src/xz/private.h head/contrib/xz/src/xz/signals.c head/contrib/xz/src/xz/util.c head/contrib/xz/src/xz/xz.1 head/contrib/xz/src/xzdec/xzdec.c head/lib/liblzma/config.h Directory Properties: head/contrib/xz/ (props changed) Modified: head/contrib/xz/ChangeLog ============================================================================== --- head/contrib/xz/ChangeLog Sun Mar 22 01:25:50 2020 (r359200) +++ head/contrib/xz/ChangeLog Sun Mar 22 01:27:38 2020 (r359201) @@ -1,3 +1,1335 @@ +commit 2327a461e1afce862c22269b80d3517801103c1b +Author: Lasse Collin +Date: 2020-03-17 16:27:42 +0200 + + Bump version and soname for 5.2.5. + + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 3be82d2f7dc882258caf0f0a69214e5916b2bdda +Author: Lasse Collin +Date: 2020-03-17 16:26:04 +0200 + + Update NEWS for 5.2.5. + + NEWS | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 105 insertions(+) + +commit ab3e57539c7337f0653b13b75dbc5d03ade9700e +Author: Lasse Collin +Date: 2020-03-16 21:57:21 +0200 + + Translations: Rebuild cs.po to avoid incorrect fuzzy strings. + + "make dist" updates the .po files and the fuzzy strings would + result in multiple very wrong translations. + + po/cs.po | 592 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 322 insertions(+), 270 deletions(-) + +commit 3a6f38309dc5d44d8a63ebb337b6b2028561c93e +Author: Lasse Collin +Date: 2020-03-16 20:01:37 +0200 + + README: Update outdated sections. + + README | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +commit 9cc0901798217e258e91c13cf6fda7ad42ba108c +Author: Lasse Collin +Date: 2020-03-16 19:46:27 +0200 + + README: Mention that translatable strings will change after 5.2.x. + + README | 74 +++--------------------------------------------------------------- + 1 file changed, 3 insertions(+), 71 deletions(-) + +commit cc163574249f6a4a66f3dc09d6fe5a71bee24fab +Author: Lasse Collin +Date: 2020-03-16 19:39:45 +0200 + + README: Mention that man pages can be translated. + + README | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit ca261994edc3f2d03d5589c037171c63471ee9dc +Author: Lasse Collin +Date: 2020-03-16 17:30:39 +0200 + + Translations: Add partial Danish translation. + + I made a few minor white space changes without getting them + approved by the Danish translation team. + + po/LINGUAS | 1 + + po/da.po | 896 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 897 insertions(+) + +commit 51cd5d051fc730d61411dee292e863582784e189 +Author: Lasse Collin +Date: 2020-03-16 16:43:29 +0200 + + Update INSTALL.generic from Automake 1.16.1. + + INSTALL.generic | 321 ++++++++++++++++++++++++++++---------------------------- + 1 file changed, 162 insertions(+), 159 deletions(-) + +commit 69d694e5f1beae2bbfa3b6c348ec0ec5f14b5cd0 +Author: Lasse Collin +Date: 2020-03-15 15:27:22 +0200 + + Update INSTALL for Windows and DOS and add preliminary info for z/OS. + + INSTALL | 51 +++++++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 41 insertions(+), 10 deletions(-) + +commit 2c3b1bb80a3ca7e09728fe4d7a1d8648a5cb9bca +Author: Lasse Collin +Date: 2020-03-15 15:26:20 +0200 + + Build: Update m4/ax_pthread.m4 from Autoconf Archive (again). + + m4/ax_pthread.m4 | 219 +++++++++++++++++++++++++++++-------------------------- + 1 file changed, 117 insertions(+), 102 deletions(-) + +commit 74a5af180a6a6c4b8c90cefb37ee900d3fea7dc6 +Author: Lasse Collin +Date: 2020-03-11 21:15:35 +0200 + + xz: Never use thousand separators in DJGPP builds. + + DJGPP 2.05 added support for thousands separators but it's + broken at least under WinXP with Finnish locale that uses + a non-breaking space as the thousands separator. Workaround + by disabling thousands separators for DJGPP builds. + + src/xz/util.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +commit ceba0d25e826bcdbf64bb4cb03385a2a66f8cbcb +Author: Lasse Collin +Date: 2020-03-11 19:38:08 +0200 + + DOS: Update dos/Makefile for DJGPP 2.05. + + It doesn't need -fgnu89-inline like 2.04beta did. + + dos/Makefile | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit 29e5bd71612253281fb22bbaa0a566990a74dcc3 +Author: Lasse Collin +Date: 2020-03-11 19:36:07 +0200 + + DOS: Update instructions in dos/INSTALL.txt. + + dos/INSTALL.txt | 59 ++++++++++++++++++++++++++++----------------------------- + 1 file changed, 29 insertions(+), 30 deletions(-) + +commit 00a037ee9c8ee5a03cf9744e05570ae93d56b875 +Author: Lasse Collin +Date: 2020-03-11 17:58:51 +0200 + + DOS: Update config.h. + + The added defines assume GCC >= 4.8. + + dos/config.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 4ec2feaefa310b4249eb41893caf526e5c51ee39 +Author: Lasse Collin +Date: 2020-03-11 22:37:54 +0200 + + Translations: Add hu, zh_CN, and zh_TW. + + I made a few white space changes to these without getting them + approved by the translation teams. (I tried to contact the hu and + zh_TW teams but didn't succeed. I didn't contact the zh_CN team.) + + po/LINGUAS | 3 + + po/hu.po | 985 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + po/zh_CN.po | 963 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + po/zh_TW.po | 956 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 2907 insertions(+) + +commit b6ed09729ae408be4533a0ddbc7df3d6f566846a +Author: Lasse Collin +Date: 2020-03-11 14:33:30 +0200 + + Translations: Update vi.po to match the file from the TP. + + The translated strings haven't been updated but word wrapping + is different. + + po/vi.po | 407 ++++++++++++++++++++++++++++----------------------------------- + 1 file changed, 179 insertions(+), 228 deletions(-) + +commit 7c85e8953ced204c858101872a15183e4639e9fb +Author: Lasse Collin +Date: 2020-03-11 14:18:03 +0200 + + Translations: Add fi and pt_BR, and update de, fr, it, and pl. + + The German translation isn't identical to the file in + the Translation Project but the changes (white space changes + only) were approved by the translator Mario Blättermann. + + po/LINGUAS | 2 + + po/de.po | 476 ++++++++++++++-------------- + po/fi.po | 974 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + po/fr.po | 272 ++++++++-------- + po/it.po | 479 ++++++++++++---------------- + po/pl.po | 239 +++++++------- + po/pt_BR.po | 1001 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 7 files changed, 2697 insertions(+), 746 deletions(-) + +commit 7da3ebc67fb5414034685ec16c7a29dad03dfa9b +Author: Lasse Collin +Date: 2020-02-25 21:35:14 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 1acc48794364606c9091cae6fa56db75a1325114 +Author: Lasse Collin +Date: 2020-03-11 13:05:29 +0200 + + Build: Add very limited experimental CMake support. + + This version matches CMake files in the master branch (commit + 265daa873c0d871f5f23f9b56e133a6f20045a0a) except that this omits + two source files that aren't in v5.2 and in the beginning of + CMakeLists.txt the first paragraph in the comment is slightly + different to point out possible issues in building shared liblzma. + + CMakeLists.txt | 659 ++++++++++++++++++++++++++++++++++++++++++++ + cmake/tuklib_common.cmake | 49 ++++ + cmake/tuklib_cpucores.cmake | 175 ++++++++++++ + cmake/tuklib_integer.cmake | 102 +++++++ + cmake/tuklib_mbstr.cmake | 20 ++ + cmake/tuklib_physmem.cmake | 150 ++++++++++ + cmake/tuklib_progname.cmake | 19 ++ + 7 files changed, 1174 insertions(+) + +commit 9acc6abea1552803c74c1486fbb10af119550772 +Author: Lasse Collin +Date: 2020-02-27 20:24:27 +0200 + + Build: Add support for --no-po4a option to autogen.sh. + + Normally, if po4a isn't available, autogen.sh will return + with non-zero exit status. The option --no-po4a can be useful + when one knows that po4a isn't available but wants autogen.sh + to still return with zero exit status. + + autogen.sh | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +commit c8853b31545db7bd0551be85949624b1261efd47 +Author: Lasse Collin +Date: 2020-02-24 23:37:07 +0200 + + Update m4/.gitignore. + + m4/.gitignore | 1 + + 1 file changed, 1 insertion(+) + +commit 901eb4a8c992354c3ea482f5bad60a1f8ad6fcc8 +Author: Lasse Collin +Date: 2020-02-24 23:01:00 +0200 + + liblzma: Remove unneeded from fastpos_tablegen.c. + + This file only generates fastpos_table.c. + It isn't built as a part of liblzma. + + src/liblzma/lzma/fastpos_tablegen.c | 1 - + 1 file changed, 1 deletion(-) + +commit ac35c9585fb734b7a19785d490c152e0b8cd4663 +Author: Lasse Collin +Date: 2020-02-22 14:15:07 +0200 + + Use defined(__GNUC__) before __GNUC__ in preprocessor lines. + + This should silence the equivalent of -Wundef in compilers that + don't define __GNUC__. + + src/common/sysdefs.h | 3 ++- + src/liblzma/api/lzma.h | 5 +++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +commit fb9cada7cfade1156d6277717280e05b5cd342d6 +Author: Lasse Collin +Date: 2020-02-21 17:40:02 +0200 + + liblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA. + + This gives a tiny encoder speed improvement. This could have been done + in 2014 after the commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 but + it was forgotten. + + src/liblzma/lzma/lzma_encoder_optimum_normal.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +commit 6117955af0b9cef5acde7859e86f773692b5f43c +Author: Lasse Collin +Date: 2020-02-21 17:01:15 +0200 + + Build: Add visibility.m4 from gnulib. + + Appears that this file used to get included as a side effect of + gettext. After the change to gettext version requirements this file + no longer got copied to the package and so the build was broken. + + m4/.gitignore | 1 - + m4/visibility.m4 | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 77 insertions(+), 1 deletion(-) + +commit c2cc64d78c098834231f9cfd7d852c9cd8950d74 +Author: Lasse Collin +Date: 2020-02-21 16:10:44 +0200 + + xz: Silence a warning when sig_atomic_t is long int. + + It can be true at least on z/OS. + + src/xz/signals.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b6314aa275b35c714e0a191d0b2e9b6106129ea9 +Author: Lasse Collin +Date: 2020-02-21 15:59:26 +0200 + + xz: Avoid unneeded access of a volatile variable. + + src/xz/signals.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f772a1572f723e5dc7d2d32e1d4287ac7a0da55e +Author: Lasse Collin +Date: 2020-02-21 01:24:18 +0200 + + tuklib_integer.m4: Optimize the check order. + + The __builtin byteswapping is the preferred one so check for it first. + + m4/tuklib_integer.m4 | 56 +++++++++++++++++++++++++++------------------------- + 1 file changed, 29 insertions(+), 27 deletions(-) + +commit 641042e63f665f3231c2fd1241fd3dddda3fb313 +Author: Lasse Collin +Date: 2020-02-20 18:54:04 +0200 + + tuklib_exit: Add missing header. + + strerror() needs which happened to be included via + tuklib_common.h -> tuklib_config.h -> sysdefs.h if HAVE_CONFIG_H + was defined. This wasn't tested without config.h before so it + had worked fine. + + src/common/tuklib_exit.c | 1 + + 1 file changed, 1 insertion(+) + +commit dbd55a69e530fec9ae866aaf6c3ccc0b4daf1f1f +Author: Lasse Collin +Date: 2020-02-16 11:18:28 +0200 + + sysdefs.h: Omit the conditionals around string.h and limits.h. + + string.h is used unconditionally elsewhere in the project and + configure has always stopped if limits.h is missing, so these + headers must have been always available even on the weirdest + systems. + + src/common/sysdefs.h | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +commit 9294909861e6d22b32418467e0e988f953a82264 +Author: Lasse Collin +Date: 2020-02-15 15:07:11 +0200 + + Build: Bump Autoconf and Libtool version requirements. + + There is no specific reason for this other than blocking + the most ancient versions. These are still old: + + Autoconf 2.69 (2012) + Automake 1.12 (2012) + gettext 0.19.6 (2015) + Libtool 2.4 (2010) + + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit bd09081bbdf552f730030d2fd0e5e39ccb3936af +Author: Lasse Collin +Date: 2020-02-15 03:08:32 +0200 + + Build: Use AM_GNU_GETTEXT_REQUIRE_VERSION and require 0.19.6. + + This bumps the version requirement from 0.19 (from 2014) to + 0.19.6 (2015). + + Using only the old AM_GNU_GETTEXT_VERSION results in old + gettext infrastructure being placed in the package. By using + both macros we get the latest gettext files while the other + programs in the Autotools family can still see the old macro. + + configure.ac | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 1e5e08d86534aec7ca957982c7f6e90203c19e9f +Author: Lasse Collin +Date: 2020-02-14 20:42:06 +0200 + + Translations: Add German translation of the man pages. + + Thanks to Mario Blättermann. + + po4a/de.po | 5532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + po4a/po4a.conf | 2 +- + 2 files changed, 5533 insertions(+), 1 deletion(-) + +commit 4b1447809ffbc0d77c0ad456bd6b3afcf0b8623e +Author: Lasse Collin +Date: 2020-02-07 15:32:21 +0200 + + Build: Add support for translated man pages using po4a. + + The dependency on po4a is optional. It's never required to install + the translated man pages when xz is built from a release tarball. + If po4a is missing when building from xz.git, the translated man + pages won't be generated but otherwise the build will work normally. + + The translations are only updated automatically by autogen.sh and + by "make mydist". This makes it easy to keep po4a as an optional + dependency and ensures that I won't forget to put updated + translations to a release tarball. + + The translated man pages aren't installed if --disable-nls is used. + + The installation of translated man pages abuses Automake internals + by calling "install-man" with redefined dist_man_MANS and man_MANS. + This makes the hairy script code slightly less hairy. If it breaks + some day, this code needs to be fixed; don't blame Automake developers. + + Also, this adds more quotes to the existing shell script code in + the Makefile.am "-hook"s. + + Makefile.am | 4 ++++ + autogen.sh | 8 ++++--- + po4a/.gitignore | 2 ++ + po4a/po4a.conf | 14 +++++++++++ + po4a/update-po | 45 ++++++++++++++++++++++++++++++++++ + src/scripts/Makefile.am | 64 +++++++++++++++++++++++++++++++++++++------------ + src/xz/Makefile.am | 50 +++++++++++++++++++++++++++----------- + src/xzdec/Makefile.am | 55 ++++++++++++++++++++++++++++++++---------- + 8 files changed, 197 insertions(+), 45 deletions(-) + +commit 882fcfdcd86525cc5c6f6d0bf0230d0089206d13 +Author: Lasse Collin +Date: 2020-02-06 00:04:42 +0200 + + Update THANKS (sync with the master branch). + + THANKS | 3 +++ + 1 file changed, 3 insertions(+) + +commit 134bb7765815d5f265eb0bc9e6ebacd9ae4a52bc +Author: Lasse Collin +Date: 2020-02-05 22:35:06 +0200 + + Update tests/.gitignore. + + .gitignore | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 6912472fafb656be8f4c5b4ac9ea28fea3065de4 +Author: Lasse Collin +Date: 2020-02-05 22:28:51 +0200 + + Update m4/.gitignore. + + m4/.gitignore | 1 + + 1 file changed, 1 insertion(+) + +commit 68c60735bbb6e51d4205ba8a9fde307bcfb22f8c +Author: Lasse Collin +Date: 2020-02-05 20:47:38 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit e1beaa74bc7cb5a409d59b55870e01ae7784ce3a +Author: Lasse Collin +Date: 2020-02-05 20:33:50 +0200 + + xz: Comment out annoying sandboxing messages. + + src/xz/file_io.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +commit 8238192652290df78bd728b20e3f6542d1a2819e +Author: Lasse Collin +Date: 2020-02-05 19:33:37 +0200 + + Build: Workaround a POSIX shell detection problem on Solaris. + + I don't know if the problem is in gnulib's gl_POSIX_SHELL macro + or if xzgrep does something that isn't in POSIX. The workaround + adds a special case for Solaris: if /usr/xpg4/bin/sh exists and + gl_cv_posix_shell wasn't overriden on the configure command line, + use that shell for xzgrep and other scripts. That shell is known + to work and exists on most Solaris systems. + + configure.ac | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 93a1f61e892e145607dd938e3b30098af19a1672 +Author: Lasse Collin +Date: 2020-02-03 22:03:50 +0200 + + Build: Update m4/ax_pthread.m4 from Autoconf Archive. + + m4/ax_pthread.m4 | 398 ++++++++++++++++++++++++++++++++++++++----------------- + 1 file changed, 279 insertions(+), 119 deletions(-) + +commit d0daa21792ff861e5423bbd82aaa6c8ba9fa0462 +Author: Lasse Collin +Date: 2020-02-01 19:56:18 +0200 + + xz: Limit --memlimit-compress to at most 4020 MiB for 32-bit xz. + + See the code comment for reasoning. It's far from perfect but + hopefully good enough for certain cases while hopefully doing + nothing bad in other situations. + + At presets -5 ... -9, 4020 MiB vs. 4096 MiB makes no difference + on how xz scales down the number of threads. + + The limit has to be a few MiB below 4096 MiB because otherwise + things like "xz --lzma2=dict=500MiB" won't scale down the dict + size enough and xz cannot allocate enough memory. With + "ulimit -v $((4096 * 1024))" on x86-64, the limit in xz had + to be no more than 4085 MiB. Some safety margin is good though. + + This is hack but it should be useful when running 32-bit xz on + a 64-bit kernel that gives full 4 GiB address space to xz. + Hopefully this is enough to solve this: + + https://bugzilla.redhat.com/show_bug.cgi?id=1196786 + + FreeBSD has a patch that limits the result in tuklib_physmem() + to SIZE_MAX on 32-bit systems. While I think it's not the way + to do it, the results on --memlimit-compress have been good. This + commit should achieve practically identical results for compression + while leaving decompression and tuklib_physmem() and thus + lzma_physmem() unaffected. + + src/xz/hardware.c | 32 +++++++++++++++++++++++++++++++- + src/xz/xz.1 | 21 ++++++++++++++++++++- + 2 files changed, 51 insertions(+), 2 deletions(-) + +commit 4433c2dc5727ee6aef570e001a5a024e0d94e609 +Author: Lasse Collin +Date: 2020-01-26 20:53:25 +0200 + + xz: Set the --flush-timeout deadline when the first input byte arrives. + + xz --flush-timeout=2000, old version: + + 1. xz is started. The next flush will happen after two seconds. + 2. No input for one second. + 3. A burst of a few kilobytes of input. + 4. No input for one second. + 5. Two seconds have passed and flushing starts. + + The first second counted towards the flush-timeout even though + there was no pending data. This can cause flushing to occur more + often than needed. + + xz --flush-timeout=2000, after this commit: + + 1. xz is started. + 2. No input for one second. + 3. A burst of a few kilobytes of input. The next flush will + happen after two seconds counted from the time when the + first bytes of the burst were read. + 4. No input for one second. + 5. No input for another second. + 6. Two seconds have passed and flushing starts. + + src/xz/coder.c | 6 +----- + src/xz/file_io.c | 6 +++++- + src/xz/mytime.c | 1 - + 3 files changed, 6 insertions(+), 7 deletions(-) + +commit acc0ef3ac80f18e349c6d0252177707105c0a29c +Author: Lasse Collin +Date: 2020-01-26 20:19:19 +0200 + + xz: Move flush_needed from mytime.h to file_pair struct in file_io.h. + + src/xz/coder.c | 3 ++- + src/xz/file_io.c | 3 ++- + src/xz/file_io.h | 3 +++ + src/xz/mytime.c | 3 --- + src/xz/mytime.h | 4 ---- + 5 files changed, 7 insertions(+), 9 deletions(-) + +commit 4afe69d30b66812682a2016ee18441958019cbb2 +Author: Lasse Collin +Date: 2020-01-26 14:49:22 +0200 + + xz: coder.c: Make writing output a separate function. + + The same code sequence repeats so it's nicer as a separate function. + Note that in one case there was no test for opt_mode != MODE_TEST, + but that was only because that condition would always be true, so + this commit doesn't change the behavior there. + + src/xz/coder.c | 30 +++++++++++++++++------------- + 1 file changed, 17 insertions(+), 13 deletions(-) + +commit ec26f3ace5f9b260ca91508030f07465ae2f9f78 +Author: Lasse Collin +Date: 2020-01-26 14:13:42 +0200 + + xz: Fix semi-busy-waiting in xz --flush-timeout. + + When input blocked, xz --flush-timeout=1 would wake up every + millisecond and initiate flushing which would have nothing to + flush and thus would just waste CPU time. The fix disables the + timeout when no input has been seen since the previous flush. + + src/xz/coder.c | 4 ++++ + src/xz/file_io.c | 15 +++++++++++---- + src/xz/file_io.h | 4 ++++ + 3 files changed, 19 insertions(+), 4 deletions(-) + +commit 38915703241e69a64f133ff9a02ec9100c6019c6 +Author: Lasse Collin +Date: 2020-01-26 13:47:31 +0200 + + xz: Refactor io_read() a bit. + + src/xz/file_io.c | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +commit f6d24245349cecfae6ec0d2366fa80716c9f6d37 +Author: Lasse Collin +Date: 2020-01-26 13:37:08 +0200 + + xz: Update a comment in file_io.h. + + src/xz/file_io.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 15b55d5c63d27f81776edb1abc05872a751fc674 +Author: Lasse Collin +Date: 2020-01-26 13:27:51 +0200 + + xz: Move the setting of flush_needed in file_io.c to a nicer location. + + src/xz/file_io.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +commit 609c7067859146ffc62ac655f6ba53599c891801 +Author: Lasse Collin +Date: 2020-02-05 19:56:09 +0200 + + xz: Enable Capsicum sandboxing by default if available. + + It has been enabled in FreeBSD for a while and reported to work fine. + + Thanks to Xin Li. + + INSTALL | 6 ------ + configure.ac | 8 ++++---- + 2 files changed, 4 insertions(+), 10 deletions(-) + +commit 00517d125cc26ecece0eebb84c1c3975cd19bee0 +Author: Lasse Collin +Date: 2019-12-31 22:41:45 +0200 + + Rename unaligned_read32ne to read32ne, and similarly for the others. + + src/common/tuklib_integer.h | 64 +++++++++++++++---------------- + src/liblzma/common/alone_encoder.c | 2 +- + src/liblzma/common/block_header_decoder.c | 2 +- + src/liblzma/common/block_header_encoder.c | 2 +- + src/liblzma/common/memcmplen.h | 9 ++--- + src/liblzma/common/stream_flags_decoder.c | 6 +-- + src/liblzma/common/stream_flags_encoder.c | 8 ++-- + src/liblzma/lz/lz_encoder_hash.h | 2 +- + src/liblzma/lzma/lzma_decoder.c | 2 +- + src/liblzma/lzma/lzma_encoder.c | 2 +- + src/liblzma/lzma/lzma_encoder_private.h | 3 +- + src/liblzma/simple/simple_decoder.c | 2 +- + src/liblzma/simple/simple_encoder.c | 2 +- + tests/test_block_header.c | 4 +- + tests/test_stream_flags.c | 6 +-- + 15 files changed, 54 insertions(+), 62 deletions(-) + +commit 52d89d8443c4a31a69c0701062f2c7711d82bbed +Author: Lasse Collin +Date: 2019-12-31 00:29:48 +0200 + + Rename read32ne to aligned_read32ne, and similarly for the others. + + Using the aligned methods requires more care to ensure that + the address really is aligned, so it's nicer if the aligned + methods are prefixed. The next commit will remove the unaligned_ + prefix from the unaligned methods which in liblzma are used in + more places than the aligned ones. + + src/common/tuklib_integer.h | 56 +++++++++++++++++++++--------------------- + src/liblzma/check/crc32_fast.c | 4 +-- + src/liblzma/check/crc64_fast.c | 4 +-- + 3 files changed, 32 insertions(+), 32 deletions(-) + +commit 850620468b57d49f16093e5870d1050886fcb37a +Author: Lasse Collin +Date: 2019-12-31 00:18:24 +0200 + + Revise tuklib_integer.h and .m4. + + Add a configure option --enable-unsafe-type-punning to get the + old non-conforming memory access methods. It can be useful with + old compilers or in some other less typical situations but + shouldn't normally be used. + + Omit the packed struct trick for unaligned access. While it's + best in some cases, this is simpler. If the memcpy trick doesn't + work, one can request unsafe type punning from configure. + + Because CRC32/CRC64 code needs fast aligned reads, if no very + safe way to do it is found, type punning is used as a fallback. + This sucks but since it currently works in practice, it seems to + be the least bad option. It's never needed with GCC >= 4.7 or + Clang >= 3.6 since these support __builtin_assume_aligned and + thus fast aligned access can be done with the memcpy trick. + + Other things: + - Support GCC/Clang __builtin_bswapXX + - Cleaner bswap fallback macros + - Minor cleanups + + m4/tuklib_integer.m4 | 43 ++++ + src/common/tuklib_integer.h | 488 ++++++++++++++++++++++++-------------------- + 2 files changed, 314 insertions(+), 217 deletions(-) + +commit a45badf0342666462cc6a7107a071418570ab773 +Author: Lasse Collin +Date: 2019-12-29 22:51:58 +0200 + + Tests: Hopefully fix test_check.c to work on EBCDIC systems. + + Thanks to Daniel Richard G. + + tests/test_check.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit c9a8071e6690a8db8a485c075920df254e7c70ea +Author: Lasse Collin +Date: 2019-09-24 23:02:40 +0300 + + Scripts: Put /usr/xpg4/bin to the beginning of PATH on Solaris. + + This adds a configure option --enable-path-for-scripts=PREFIX + which defaults to empty except on Solaris it is /usr/xpg4/bin + to make POSIX grep and others available. The Solaris case had + been documented in INSTALL with a manual fix but it's better + to do this automatically since it is needed on most Solaris + systems anyway. + + Thanks to Daniel Richard G. + + INSTALL | 43 +++++++++++++++++++++++++++++++++++-------- + configure.ac | 26 ++++++++++++++++++++++++++ + src/scripts/xzdiff.in | 1 + + src/scripts/xzgrep.in | 1 + + src/scripts/xzless.in | 1 + + src/scripts/xzmore.in | 1 + + 6 files changed, 65 insertions(+), 8 deletions(-) + +commit aba140e2df3ff63ad124ae997de16d517b98ca50 +Author: Lasse Collin +Date: 2019-07-12 18:57:43 +0300 + + Fix comment typos in tuklib_mbstr* files. + + src/common/tuklib_mbstr.h | 2 +- + src/common/tuklib_mbstr_fw.c | 2 +- + src/common/tuklib_mbstr_width.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +commit 710f5bd769a5d2bd8684256c2727d15350ee2ab8 +Author: Lasse Collin +Date: 2019-07-12 18:30:46 +0300 + + Add missing include to tuklib_mbstr_width.c. + + It didn't matter in XZ Utils because sysdefs.h + includes string.h anyway. + + src/common/tuklib_mbstr_width.c | 1 + + 1 file changed, 1 insertion(+) + +commit 0e491aa8cd72e0100cd15c1b9469cd57fae500b0 +Author: Lasse Collin +Date: 2019-06-25 23:15:21 +0300 + + liblzma: Fix a buggy comment. + + src/liblzma/lz/lz_encoder_mf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit bfc245569f340a75bd71ad32a6beba786712683b +Author: Lasse Collin +Date: 2019-06-25 00:16:06 +0300 + + configure.ac: Fix a typo in a comment. + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f18eee9d15a22c8449ef395a05f0eb637c4ad253 +Author: Lasse Collin +Date: 2019-06-25 00:08:13 +0300 + + Tests: Silence warnings from clang -Wassign-enum. + + Also changed 999 to 99 so it fits even if lzma_check happened + to be 8 bits wide. + + tests/test_block_header.c | 3 ++- + tests/test_stream_flags.c | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +commit 25f74554723e8deabc66fed1abf0ec27a4ed19d5 +Author: Lasse Collin +Date: 2019-06-24 23:52:17 +0300 + + liblzma: Add a comment. + + src/liblzma/common/stream_encoder_mt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 44eb961f2a51d02420d017bc5ff470360663650c +Author: Lasse Collin +Date: 2019-06-24 23:45:21 +0300 + + liblzma: Silence clang -Wmissing-variable-declarations. + + src/liblzma/check/crc32_table.c | 3 +++ + src/liblzma/check/crc64_table.c | 3 +++ + 2 files changed, 6 insertions(+) + +commit 267afcd9955e668c1532b069230c21c348eb4f82 +Author: Lasse Collin +Date: 2019-06-24 22:57:43 +0300 + + xz: Silence a warning from clang -Wsign-conversion in main.c. + + src/xz/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0e3c4002f809311ecef239b05e556d9c462b5703 +Author: Lasse Collin +Date: 2019-06-24 22:47:39 +0300 + + liblzma: Remove incorrect uses of lzma_attribute((__unused__)). + + Caught by clang -Wused-but-marked-unused. + + src/liblzma/common/alone_decoder.c | 3 +-- + src/liblzma/common/alone_encoder.c | 3 +-- + src/liblzma/lz/lz_decoder.c | 3 +-- + 3 files changed, 3 insertions(+), 6 deletions(-) + +commit cb708e8fa3405ec13a0ebfebbbf2793f927deab1 +Author: Lasse Collin +Date: 2019-06-24 20:53:55 +0300 + + Tests: Silence a warning from -Wsign-conversion. + + tests/create_compress_files.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit c8cace3d6e965c0fb537591372bf71b9357dd76c +Author: Lasse Collin +Date: 2019-06-24 20:45:49 +0300 + + xz: Fix an integer overflow with 32-bit off_t. + + Or any off_t which isn't very big (like signed 64 bit integer + that most system have). A small off_t could overflow if the + file being decompressed had long enough run of zero bytes, + which would result in corrupt output. + + src/xz/file_io.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +commit 65a42741e290fbcd85dfc5db8a62c4bce5f7712c +Author: Lasse Collin +Date: 2019-06-24 00:57:23 +0300 + + Tests: Remove a duplicate branch from tests/tests.h. + + The duplication was introduced about eleven years ago and + should have been cleaned up back then already. + + This was caught by -Wduplicated-branches. + + tests/tests.h | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +commit 5c4fb60e8df026e933afab0cfe0a8b55be20036c +Author: Lasse Collin +Date: 2019-06-23 23:22:45 +0300 + + tuklib_mbstr_width: Fix a warning from -Wsign-conversion. + + src/common/tuklib_mbstr_width.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 37df03ce52ce53710e1513387648763f8a744154 +Author: Lasse Collin +Date: 2019-06-23 23:19:34 +0300 + + xz: Fix some of the warnings from -Wsign-conversion. + + src/xz/args.c | 4 ++-- + src/xz/coder.c | 4 ++-- + src/xz/file_io.c | 5 +++-- + src/xz/message.c | 4 ++-- + src/xz/mytime.c | 4 ++-- + src/xz/options.c | 2 +- + src/xz/util.c | 4 ++-- + 7 files changed, 14 insertions(+), 13 deletions(-) + +commit 7c65ae0f5f2e2431f88621e8fe6d1dc7907e30c1 +Author: Lasse Collin +Date: 2019-06-23 22:27:45 +0300 + + tuklib_cpucores: Silence warnings from -Wsign-conversion. + + src/common/tuklib_cpucores.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit a502dd1d000b598406637d452f535f4bbd43e2a4 +Author: Lasse Collin +Date: 2019-06-23 21:40:47 +0300 + + xzdec: Fix warnings from -Wsign-conversion. + + src/xzdec/xzdec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a45d1a5374ceb22e23255b0b595b9e641e9860af +Author: Lasse Collin +Date: 2019-06-23 21:38:56 +0300 + + liblzma: Fix warnings from -Wsign-conversion. + + Also, more parentheses were added to the literal_subcoder + macro in lzma_comon.h (better style but no functional change + in the current usage). + + src/liblzma/common/block_header_decoder.c | 2 +- + src/liblzma/delta/delta_decoder.c | 2 +- + src/liblzma/lzma/fastpos.h | 2 +- + src/liblzma/lzma/lzma2_decoder.c | 8 ++++---- + src/liblzma/lzma/lzma_common.h | 3 ++- + src/liblzma/lzma/lzma_decoder.c | 16 ++++++++-------- + src/liblzma/simple/arm.c | 6 +++--- + src/liblzma/simple/armthumb.c | 8 ++++---- + src/liblzma/simple/ia64.c | 2 +- + src/liblzma/simple/powerpc.c | 9 +++++---- + src/liblzma/simple/x86.c | 2 +- + 11 files changed, 31 insertions(+), 29 deletions(-) + +commit 4ff87ddf80ed7cb233444cddd86ab1940b5b55ec +Author: Lasse Collin +Date: 2019-06-23 19:33:55 +0300 + + tuklib_integer: Silence warnings from -Wsign-conversion. + + src/common/tuklib_integer.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit ed1a9d33984a3a37ae9a775a46859850d98ea4d0 +Author: Lasse Collin +Date: 2019-06-20 19:40:30 +0300 + + tuklib_integer: Fix usage of conv macros. + + Use a temporary variable instead of e.g. + conv32le(unaligned_read32ne(buf)) because the macro can + evaluate its argument multiple times. + + src/common/tuklib_integer.h | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit 612c88dfc08e2c572623954ecfde541d21c84882 +Author: Lasse Collin +Date: 2019-06-03 20:44:19 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 85da31d8b882b8b9671ab3e3d74d88bd945cd0bb +Author: Lasse Collin +Date: 2019-06-03 20:41:54 +0300 + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Mar 22 03:10:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7320F274F59; Sun, 22 Mar 2020 03:10:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lMvr5gKnz43L7; Sun, 22 Mar 2020 03:10:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C67BB1EDCC; Sun, 22 Mar 2020 03:10:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02M3AVJF029667; Sun, 22 Mar 2020 03:10:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02M3AVbZ029666; Sun, 22 Mar 2020 03:10:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003220310.02M3AVbZ029666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 22 Mar 2020 03:10:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359208 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 03:10:33 -0000 Author: emaste Date: Sun Mar 22 03:10:31 2020 New Revision: 359208 URL: https://svnweb.freebsd.org/changeset/base/359208 Log: Makefile.inc1: set DB_FROM_SRC also for stageworld stageworld, invoked from e.g. `make packages`, shouldn't rely on the build host's users/groups. Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Mar 22 02:56:03 2020 (r359207) +++ head/Makefile.inc1 Sun Mar 22 03:10:31 2020 (r359208) @@ -851,7 +851,8 @@ IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP} # When generating install media, do not allow user and group information from # the build host to affect the contents of the distribution. -.if make(distributeworld) || make(distrib-dirs) || make(distribution) +.if make(distributeworld) || make(distrib-dirs) || make(distribution) || \ + make(stageworld) DB_FROM_SRC= yes .endif From owner-svn-src-head@freebsd.org Sun Mar 22 11:44:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F36EB27EA71; Sun, 22 Mar 2020 11:44:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lbJn5kvXz3Fky; Sun, 22 Mar 2020 11:44:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2884324D95; Sun, 22 Mar 2020 11:44:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MBiOMb039874; Sun, 22 Mar 2020 11:44:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MBiOI1039872; Sun, 22 Mar 2020 11:44:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003221144.02MBiOI1039872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 22 Mar 2020 11:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359209 - in head/sys/dev: rtwn/usb usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev: rtwn/usb usb X-SVN-Commit-Revision: 359209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 11:44:26 -0000 Author: hselasky Date: Sun Mar 22 11:44:24 2020 New Revision: 359209 URL: https://svnweb.freebsd.org/changeset/base/359209 Log: Add new USB ID. Submitted by: Konrad Jopek Differential Revision: https://reviews.freebsd.org/D24142 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h head/sys/dev/usb/usbdevs Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sun Mar 22 03:10:31 2020 (r359208) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sun Mar 22 11:44:24 2020 (r359209) @@ -160,7 +160,8 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8821AU_DEV(NETGEAR, A6100), RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_1), RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_2), - RTWN_RTL8821AU_DEV(TPLINK, T2UNANO) + RTWN_RTL8821AU_DEV(TPLINK, T2UNANO), + RTWN_RTL8821AU_DEV(TPLINK, T2UPLUS), #undef RTWN_RTL8821AU_DEV }; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Mar 22 03:10:31 2020 (r359208) +++ head/sys/dev/usb/usbdevs Sun Mar 22 11:44:24 2020 (r359209) @@ -4667,6 +4667,7 @@ product TPLINK T4UV2 0x010d Archer T4U ver 2 product TPLINK T4UHV1 0x0103 Archer T4UH ver 1 product TPLINK T4UHV2 0x010e Archer T4UH ver 2 product TPLINK T2UNANO 0x011e Archer T2U Nano +product TPLINK T2UPLUS 0x0120 Archer T2U Plus product TPLINK RTL8153 0x0601 RTL8153 USB 10/100/1000 LAN /* Trek Technology products */ From owner-svn-src-head@freebsd.org Sun Mar 22 12:57:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4964A2609B5; Sun, 22 Mar 2020 12:57:51 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lcxV6JDhz48V3; Sun, 22 Mar 2020 12:57:50 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1B2A25A9C; Sun, 22 Mar 2020 12:57:49 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MCvnBx081532; Sun, 22 Mar 2020 12:57:49 GMT (envelope-from carlavilla@FreeBSD.org) Received: (from carlavilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MCvn61081531; Sun, 22 Mar 2020 12:57:49 GMT (envelope-from carlavilla@FreeBSD.org) Message-Id: <202003221257.02MCvn61081531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: carlavilla set sender to carlavilla@FreeBSD.org using -f From: Sergio Carlavilla Delgado Date: Sun, 22 Mar 2020 12:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359210 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: carlavilla X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 359210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 12:57:51 -0000 Author: carlavilla (doc committer) Date: Sun Mar 22 12:57:49 2020 New Revision: 359210 URL: https://svnweb.freebsd.org/changeset/base/359210 Log: exec man page: Add HISTORY section PR: 240258 Submitted by: gbergling@gmail.com Patch by: gbergling@gmail.com Approved by: bcr@(mentor) MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D24145 Modified: head/lib/libc/gen/exec.3 Modified: head/lib/libc/gen/exec.3 ============================================================================== --- head/lib/libc/gen/exec.3 Sun Mar 22 11:44:24 2020 (r359209) +++ head/lib/libc/gen/exec.3 Sun Mar 22 12:57:49 2020 (r359210) @@ -28,7 +28,7 @@ .\" @(#)exec.3 8.3 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd July 28, 2018 +.Dd March 22, 2020 .Dt EXEC 3 .Os .Sh NAME @@ -310,6 +310,11 @@ and functions conform to .St -p1003.1-88 . +.Sh HISTORY +The +.Fn exec +function appeared in +.At v1. The .Fn execvP function first appeared in From owner-svn-src-head@freebsd.org Sun Mar 22 15:37:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC65E265034; Sun, 22 Mar 2020 15:37:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lhTv4dhQz4KgP; Sun, 22 Mar 2020 15:37:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98477279D9; Sun, 22 Mar 2020 15:37:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MFbdEd077481; Sun, 22 Mar 2020 15:37:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MFbdI4077479; Sun, 22 Mar 2020 15:37:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003221537.02MFbdI4077479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 22 Mar 2020 15:37:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359215 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 359215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 15:37:39 -0000 Author: emaste Date: Sun Mar 22 15:37:38 2020 New Revision: 359215 URL: https://svnweb.freebsd.org/changeset/base/359215 Log: pkgbase: create sendmail directories only from BSD.sendmail.dist Else when WITHOUT_SENDMAIL is set we still create a sendmail package that contains (only) two directories. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24149 Modified: head/etc/mtree/BSD.sendmail.dist head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.sendmail.dist ============================================================================== --- head/etc/mtree/BSD.sendmail.dist Sun Mar 22 15:24:25 2020 (r359214) +++ head/etc/mtree/BSD.sendmail.dist Sun Mar 22 15:37:38 2020 (r359215) @@ -7,7 +7,10 @@ . nochange var nochange spool nochange tags=package=runtime - clientmqueue uname=smmsp gname=smmsp mode=0770 + clientmqueue uname=smmsp gname=smmsp mode=0770 tags=package=sendmail + .. +/set gname=daemon + mqueue tags=package=sendmail .. .. .. Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Sun Mar 22 15:24:25 2020 (r359214) +++ head/etc/mtree/BSD.var.dist Sun Mar 22 15:37:38 2020 (r359215) @@ -84,16 +84,12 @@ rwho gname=daemon mode=0775 .. spool - clientmqueue uname=smmsp gname=smmsp mode=0770 tags=package=sendmail - .. dma uname=root gname=mail mode=0770 tags=package=dma .. lock uname=uucp gname=dialer mode=0775 .. /set gname=daemon lpd - .. - mqueue tags=package=sendmail .. opielocks mode=0700 .. From owner-svn-src-head@freebsd.org Sun Mar 22 16:55:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98026266EF8; Sun, 22 Mar 2020 16:55:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lkCX3Yv6z3MYG; Sun, 22 Mar 2020 16:55:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70D9E8AA; Sun, 22 Mar 2020 16:55:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MGtKso025352; Sun, 22 Mar 2020 16:55:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MGtKWc025351; Sun, 22 Mar 2020 16:55:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003221655.02MGtKWc025351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 22 Mar 2020 16:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359216 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 359216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 16:55:20 -0000 Author: emaste Date: Sun Mar 22 16:55:20 2020 New Revision: 359216 URL: https://svnweb.freebsd.org/changeset/base/359216 Log: BSD.sendmail.dist: simplify mqueue group name setting Submitted by: gshapiro Modified: head/etc/mtree/BSD.sendmail.dist Modified: head/etc/mtree/BSD.sendmail.dist ============================================================================== --- head/etc/mtree/BSD.sendmail.dist Sun Mar 22 15:37:38 2020 (r359215) +++ head/etc/mtree/BSD.sendmail.dist Sun Mar 22 16:55:20 2020 (r359216) @@ -9,8 +9,7 @@ spool nochange tags=package=runtime clientmqueue uname=smmsp gname=smmsp mode=0770 tags=package=sendmail .. -/set gname=daemon - mqueue tags=package=sendmail + mqueue gname=daemon tags=package=sendmail .. .. .. From owner-svn-src-head@freebsd.org Sun Mar 22 17:59:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A9B726857D; Sun, 22 Mar 2020 17:59:37 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lldj2HrMz49YL; Sun, 22 Mar 2020 17:59:37 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DE9913B6; Sun, 22 Mar 2020 17:59:37 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MHxb81061392; Sun, 22 Mar 2020 17:59:37 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MHxbJk061391; Sun, 22 Mar 2020 17:59:37 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202003221759.02MHxbJk061391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 22 Mar 2020 17:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359218 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 359218 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 17:59:37 -0000 Author: mhorne Date: Sun Mar 22 17:59:36 2020 New Revision: 359218 URL: https://svnweb.freebsd.org/changeset/base/359218 Log: Fix ordering of machine includes Remove machine/asm.h since it is unused. Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Sun Mar 22 17:13:19 2020 (r359217) +++ head/sys/riscv/riscv/machdep.c Sun Mar 22 17:59:36 2020 (r359218) @@ -77,18 +77,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include #include #include #include #include +#include +#include #include #include -#include -#include - -#include #ifdef FPE #include From owner-svn-src-head@freebsd.org Sun Mar 22 18:18:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0CB8268B8A; Sun, 22 Mar 2020 18:18:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lm3V5FrZz4TYV; Sun, 22 Mar 2020 18:18:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF9691771; Sun, 22 Mar 2020 18:18:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MIIUiY074277; Sun, 22 Mar 2020 18:18:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MIIUY1074276; Sun, 22 Mar 2020 18:18:30 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202003221818.02MIIUY1074276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 22 Mar 2020 18:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359219 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 18:18:30 -0000 Author: rmacklem Date: Sun Mar 22 18:18:30 2020 New Revision: 359219 URL: https://svnweb.freebsd.org/changeset/base/359219 Log: Fix an NFS mount attempt where VFS_STATFS() fails. r353150 added mnt_rootvnode and this seems to have broken NFS mounts when the VFS_STATFS() called just after VFS_MOUNT() returns an error. Then the code calls VFS_UNMOUNT(), which calls vflush(), which returns EBUSY. Then the thread get stuck sleeping on "mntref" in vfs_mount_destroy(). This patch fixes this problem. Reviewed by: kib, mjg Differential Revision: https://reviews.freebsd.org/D24022 Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Sun Mar 22 17:59:36 2020 (r359218) +++ head/sys/kern/vfs_mount.c Sun Mar 22 18:18:30 2020 (r359219) @@ -900,7 +900,7 @@ vfs_domount_first( { struct vattr va; struct mount *mp; - struct vnode *newdp; + struct vnode *newdp, *rootvp; int error, error1; ASSERT_VOP_ELOCKED(vp, __func__); @@ -967,6 +967,9 @@ vfs_domount_first( (error1 = VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) != 0) { if (error1 != 0) { error = error1; + rootvp = vfs_cache_root_clear(mp); + if (rootvp != NULL) + vrele(rootvp); if ((error1 = VFS_UNMOUNT(mp, 0)) != 0) printf("VFS_UNMOUNT returned %d\n", error1); } From owner-svn-src-head@freebsd.org Sun Mar 22 20:10:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8928E26B5EB; Sun, 22 Mar 2020 20:10:06 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lpXG34X1z4QNG; Sun, 22 Mar 2020 20:10:06 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64D372C0A; Sun, 22 Mar 2020 20:10:06 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MKA6Gn040199; Sun, 22 Mar 2020 20:10:06 GMT (envelope-from carlavilla@FreeBSD.org) Received: (from carlavilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MKA6NA040198; Sun, 22 Mar 2020 20:10:06 GMT (envelope-from carlavilla@FreeBSD.org) Message-Id: <202003222010.02MKA6NA040198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: carlavilla set sender to carlavilla@FreeBSD.org using -f From: Sergio Carlavilla Delgado Date: Sun, 22 Mar 2020 20:10:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359227 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: carlavilla X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 359227 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 20:10:06 -0000 Author: carlavilla (doc committer) Date: Sun Mar 22 20:10:05 2020 New Revision: 359227 URL: https://svnweb.freebsd.org/changeset/base/359227 Log: fix typo in exec man page PR: 240258 Submitted by: gbergling@gmail.com Reported by: kib@ Approved by: bcr@(mentor, implicit) MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D24145 Modified: head/lib/libc/gen/exec.3 Modified: head/lib/libc/gen/exec.3 ============================================================================== --- head/lib/libc/gen/exec.3 Sun Mar 22 20:00:12 2020 (r359226) +++ head/lib/libc/gen/exec.3 Sun Mar 22 20:10:05 2020 (r359227) @@ -314,7 +314,7 @@ conform to The .Fn exec function appeared in -.At v1. +.At v1 . The .Fn execvP function first appeared in From owner-svn-src-head@freebsd.org Sun Mar 22 21:41:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF79526E1FB; Sun, 22 Mar 2020 21:41:32 +0000 (UTC) (envelope-from cs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lrYm6PPgz4CRb; Sun, 22 Mar 2020 21:41:32 +0000 (UTC) (envelope-from cs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D69F741E0; Sun, 22 Mar 2020 21:41:32 +0000 (UTC) (envelope-from cs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MLfWFD094469; Sun, 22 Mar 2020 21:41:32 GMT (envelope-from cs@FreeBSD.org) Received: (from cs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MLfWxs094468; Sun, 22 Mar 2020 21:41:32 GMT (envelope-from cs@FreeBSD.org) Message-Id: <202003222141.02MLfWxs094468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cs set sender to cs@FreeBSD.org using -f From: Carlo Strub Date: Sun, 22 Mar 2020 21:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359228 - in head/share: syscons/keymaps vt/keymaps X-SVN-Group: head X-SVN-Commit-Author: cs X-SVN-Commit-Paths: in head/share: syscons/keymaps vt/keymaps X-SVN-Commit-Revision: 359228 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 21:41:32 -0000 Author: cs (ports committer) Date: Sun Mar 22 21:41:32 2020 New Revision: 359228 URL: https://svnweb.freebsd.org/changeset/base/359228 Log: - sort according to scan code - adapt some alt and alt shift keys to other standard keyboards - fix ctrl-d to issue eot Approved by: philip (implicit) Modified: head/share/syscons/keymaps/colemak-dh.iso15.acc.kbd head/share/vt/keymaps/colemak-dh.acc.kbd Modified: head/share/syscons/keymaps/colemak-dh.iso15.acc.kbd ============================================================================== --- head/share/syscons/keymaps/colemak-dh.iso15.acc.kbd Sun Mar 22 20:10:05 2020 (r359227) +++ head/share/syscons/keymaps/colemak-dh.iso15.acc.kbd Sun Mar 22 21:41:32 2020 (r359228) @@ -9,8 +9,8 @@ # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state # ------------------------------------------------------------------ - - 041 '`' '~' nop nop dtil '~' nop nop O + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug debug O 002 '1' '!' nop nop '¡' '¹' nop nop O 003 '2' '@' nul nul 'º' '²' nul nul O 004 '3' '#' nop nop 'ª' '³' nop nop O @@ -23,7 +23,8 @@ 011 '0' ')' nop nop '~' '~' nop nop O 012 '-' '_' us us '~' '~' us us O 013 '=' '+' nop nop '×' '÷' nop nop O - + 014 bs bs del del bs bs del del O + 015 ht btab nscr nscr ht btab nop nop O 016 'q' 'Q' dc1 dc1 'ä' 'Ä' dc1 dc1 C 017 'w' 'W' etb etb 'å' 'Å' etb etb C 018 'f' 'F' ack ack 'ã' 'Ã' ack ack C @@ -36,8 +37,8 @@ 025 ';' ':' nop nop 'ö' 'Ö' nop nop O 026 '[' '{' esc esc '«' '~' esc esc O 027 ']' '}' gs gs '»' '~' gs gs O - 043 '\' '|' fs fs '~' '~' fs fs O - + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O 030 'a' 'A' soh soh 'á' 'Á' soh soh C 031 'r' 'R' dc2 dc2 dgra '~' dc2 dc2 C 032 's' 'S' dc3 dc3 'ß' '~' dc3 dc3 C @@ -49,32 +50,24 @@ 038 'i' 'I' ht ht 'í' 'Í' ht ht C 039 'o' 'O' si si 'ó' 'Ó' si si C 040 ''' '"' nop nop 'õ' 'Õ' nop nop O - + 041 '`' '~' nop nop dtil '~' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '\' '|' fs fs '~' '~' fs fs O 044 'z' 'Z' sub sub 'æ' 'Æ' sub sub C 045 'x' 'X' can can dcir '~' can can C 046 'c' 'C' etx etx 'ç' 'Ç' etx etx C - 047 'd' 'D' syn syn '½' '¼' syn syn C + 047 'd' 'D' eot eot '½' '¼' syn syn C 048 'v' 'V' stx stx '~' '~' stx stx C 049 'm' 'M' vt vt drin '~' vt vt C 050 'h' 'H' cr cr '~' '~' cr cr C 051 ',' '<' nop nop dced '~' nop nop O 052 '.' '>' nop nop '~' '~' nop nop O 053 '/' '?' nop nop '¿' '~' nop nop O - - 058 bs bs bs bs bs bs bs bs O - 086 '-' '_' us us '~' '~' us us O - 057 ' ' ' ' nul nul ' ' ' ' susp susp O - - 000 nop nop nop nop nop nop nop nop O - 001 esc esc esc esc esc esc debug debug O - 014 bs bs del del bs bs del del O - 015 ht btab nscr nscr ht btab nop nop O - 028 cr cr nl nl cr cr nl nl O - 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O - 042 lshift lshift lshift lshift lshift lshift lshift lshift O 054 rshift rshift rshift rshift rshift rshift rshift rshift O 055 '*' '*' '*' '*' '*' '*' '*' '*' O 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul nul ' ' ' ' susp susp O + 058 bs bs bs bs bs bs bs bs O 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O @@ -102,6 +95,7 @@ 083 del '.' '.' '.' '.' '.' boot boot N 084 nop nop nop nop nop nop nop nop O 085 nop nop nop nop nop nop nop nop O + 086 '-' '_' us us '~' '~' us us O 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O 089 cr cr nl nl cr cr nl nl O Modified: head/share/vt/keymaps/colemak-dh.acc.kbd ============================================================================== --- head/share/vt/keymaps/colemak-dh.acc.kbd Sun Mar 22 20:10:05 2020 (r359227) +++ head/share/vt/keymaps/colemak-dh.acc.kbd Sun Mar 22 21:41:32 2020 (r359228) @@ -9,72 +9,65 @@ # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state # ------------------------------------------------------------------ - + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug debug O + 002 '1' '!' nop nop '`' '`' nop nop O + 003 '2' '@' nul nul '@' '@' nul nul O + 004 '3' '#' nop nop '#' '#' nop nop O + 005 '4' '$' 0xa4 0xa4 '4' '$' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '^' rs rs '^' '^' rs rs O + 008 '7' '&' nop nop '[' '[' esc esc O + 009 '8' '*' nop nop '8' '*' nop nop O + 010 '9' '(' nop nop ']' ']' gs gs O + 011 '0' ')' nop nop '{' '{' nop nop O + 012 '-' '_' us us '|' '|' us us O + 013 '=' '+' nop nop '}' '}' nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C + 018 'f' 'F' ack ack 'f' 'F' ack ack C + 019 'p' 'P' dle dle 'p' 'P' dle dle C + 020 'b' 'B' stx stx 'b' 'B' stx stx C + 021 'j' 'J' nl nl 'j' 'J' nl nl C + 022 'l' 'L' ff ff 'l' 'L' ff ff C + 023 'u' 'U' nak nak 'u' 'U' nak nak C + 024 'y' 'Y' em em 'y' 'Y' em em C + 025 ';' ':' nop nop ';' ':' nop nop O + 026 '[' '{' esc esc '[' '{' esc esc O + 027 ']' '}' gs gs ']' '}' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 032 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 033 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'k' 'K' vt vt 'k' 'K' vt vt C + 036 'n' 'N' so so 'n' 'N' so so C + 037 'e' 'E' enq enq 0x20ac 'E' enq enq C + 038 'i' 'I' ht ht 'i' 'I' ht ht C + 039 'o' 'O' si si 'o' 'O' si si C + 040 ''' '"' nop nop 0xf5 0xd5 nop nop O 041 '`' '~' nop nop dtil '~' nop nop O - 002 '1' '!' nop nop 0xa1 0xb9 nop nop O - 003 '2' '@' nul nul 0xba 0xb2 nul nul O - 004 '3' '#' nop nop 0xaa 0xb3 nop nop O - 005 '4' '$' nop nop 0xa2 0xa3 nop nop O - 006 '5' '%' nop nop 0xa4 0xa5 nop nop O - 007 '6' '^' rs rs '~' '~' rs rs O - 008 '7' '&' nop nop 0xf0 0xd0 nop nop O - 009 '8' '*' nop nop 0xfe 0xde nop nop O - 010 '9' '(' nop nop '~' '~' nop nop O - 011 '0' ')' nop nop '~' '~' nop nop O - 012 '-' '_' us us '~' '~' us us O - 013 '=' '+' nop nop 0xd7 0xf7 nop nop O - - 016 'q' 'Q' dc1 dc1 0xe4 0xc4 dc1 dc1 C - 017 'w' 'W' etb etb 0xe5 0xc5 etb etb C - 018 'f' 'F' ack ack 0xe3 0xc3 ack ack C - 019 'p' 'P' dle dle 0xf8 0xd8 dle dle C - 020 'b' 'B' bel bel '~' '~' bel bel C - 021 'j' 'J' nl nl '~' '~' nl nl C - 022 'l' 'L' ff ff '~' '~' ff ff C - 023 'u' 'U' nak nak 0xfa 0xda nak nak C - 024 'y' 'Y' em em 0xfc 0xdc em em C - 025 ';' ':' nop nop 0xf6 0xd6 nop nop O - 026 '[' '{' esc esc 0xab '~' esc esc O - 027 ']' '}' gs gs 0xbb '~' gs gs O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 '\' '|' fs fs '~' '~' fs fs O - - 030 'a' 'A' soh soh 0xe1 0xc1 soh soh C - 031 'r' 'R' dc2 dc2 dgra '~' dc2 dc2 C - 032 's' 'S' dc3 dc3 0xdf '~' dc3 dc3 C - 033 't' 'T' dc4 dc4 dacu '~' dc4 dc4 C - 034 'g' 'G' eot eot duml '~' eot eot C - 035 'k' 'K' bs bs '~' '~' bs bs C - 036 'n' 'N' so so 0xf1 0xd1 so so C - 037 'e' 'E' enq enq 0xe9 0xc9 enq enq C - 038 'i' 'I' ht ht 0xed 0xcd ht ht C - 039 'o' 'O' si si 0xf3 0xd3 si si C - 040 ''' '"' nop nop 0xf5 0xd5 nop nop O - 044 'z' 'Z' sub sub 0xe6 0xc6 sub sub C 045 'x' 'X' can can dcir '~' can can C 046 'c' 'C' etx etx 0xe7 0xc7 etx etx C - 047 'd' 'D' syn syn 0xbd 0xbc syn syn C + 047 'd' 'D' eot eot 0xbd 0xbc syn syn C 048 'v' 'V' stx stx '~' '~' stx stx C 049 'm' 'M' vt vt drin '~' vt vt C 050 'h' 'H' cr cr '~' '~' cr cr C 051 ',' '<' nop nop dced '~' nop nop O 052 '.' '>' nop nop '~' '~' nop nop O 053 '/' '?' nop nop 0xbf '~' nop nop O - - 058 bs bs bs bs bs bs bs bs O - 086 '-' '_' us us '~' '~' us us O - 057 ' ' ' ' nul nul ' ' ' ' susp susp O - - 000 nop nop nop nop nop nop nop nop O - 001 esc esc esc esc esc esc debug debug O - 014 bs bs del del bs bs del del O - 015 ht btab nscr nscr ht btab nop nop O - 028 cr cr nl nl cr cr nl nl O - 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O - 042 lshift lshift lshift lshift lshift lshift lshift lshift O 054 rshift rshift rshift rshift rshift rshift rshift rshift O 055 '*' '*' '*' '*' '*' '*' '*' '*' O 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul nul ' ' ' ' susp susp O + 058 clock clock clock clock clock clock clock clock O 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O @@ -102,12 +95,13 @@ 083 del '.' '.' '.' '.' '.' boot boot N 084 nop nop nop nop nop nop nop nop O 085 nop nop nop nop nop nop nop nop O + 086 '\' '|' fs fs '\' '|' fs fs O 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O 089 cr cr nl nl cr cr nl nl O 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O 091 '/' '/' '/' '/' '/' '/' '/' '/' N - 092 nscr nscr nop nop debug debug debug debug O + 092 nscr pscr debug debug nop nop nop nop O 093 ralt ralt ralt ralt ralt ralt ralt ralt O 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O @@ -117,9 +111,9 @@ 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O - 102 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O - 104 saver saver susp susp nop nop susp susp O + 104 slock saver slock saver susp nop susp nop O 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O From owner-svn-src-head@freebsd.org Sun Mar 22 21:51:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECEA326E78D; Sun, 22 Mar 2020 21:51:50 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lrnf5s3kz4PjC; Sun, 22 Mar 2020 21:51:50 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C402542DD; Sun, 22 Mar 2020 21:51:50 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MLpox2001727; Sun, 22 Mar 2020 21:51:50 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MLpoTg001726; Sun, 22 Mar 2020 21:51:50 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003222151.02MLpoTg001726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 22 Mar 2020 21:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359229 - head/usr.bin/tail X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/tail X-SVN-Commit-Revision: 359229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 21:51:51 -0000 Author: 0mp (doc,ports committer) Date: Sun Mar 22 21:51:50 2020 New Revision: 359229 URL: https://svnweb.freebsd.org/changeset/base/359229 Log: Use -F instead of -f in tail(1) examples There is an example in tail(1) manual page explaining how to use tail(1) to track the contents of /var/log/messages. The example uses the -f flag to follow the file. The problem with the -f flag is that it cannot handle the situation where /var/log/messages is rotated. Hence, use -F instead in the example. Reviewed by: asomers MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D24157 Modified: head/usr.bin/tail/tail.1 Modified: head/usr.bin/tail/tail.1 ============================================================================== --- head/usr.bin/tail/tail.1 Sun Mar 22 21:41:32 2020 (r359228) +++ head/usr.bin/tail/tail.1 Sun Mar 22 21:51:50 2020 (r359229) @@ -31,7 +31,7 @@ .\" @(#)tail.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 10, 2018 +.Dd March 22, 2020 .Dt TAIL 1 .Os .Sh NAME @@ -157,7 +157,7 @@ Keep .Pa /var/log/messages open, displaying to the standard output anything appended to the file: .Pp -.Dl $ tail -f /var/log/messages +.Dl $ tail -F /var/log/messages .Sh SEE ALSO .Xr cat 1 , .Xr head 1 , From owner-svn-src-head@freebsd.org Sun Mar 22 22:18:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1454A26F171; Sun, 22 Mar 2020 22:18:02 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lsMs2pdyz3PMs; Sun, 22 Mar 2020 22:18:01 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 592BC47F6; Sun, 22 Mar 2020 22:18:01 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MMI1uU017312; Sun, 22 Mar 2020 22:18:01 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MMI1rT017311; Sun, 22 Mar 2020 22:18:01 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202003222218.02MMI1rT017311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Sun, 22 Mar 2020 22:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359230 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 359230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 22:18:02 -0000 Author: arichardson Date: Sun Mar 22 22:18:00 2020 New Revision: 359230 URL: https://svnweb.freebsd.org/changeset/base/359230 Log: Fix linking OCTEON1 kernel with LLD LLD complains that the type of .dynamic was changed. Fix this by copying the approach used in the mips64 ldscript. I do not have hardware to test this change so I only verified that the kernel links and the section layout looks sensible. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D24093 Modified: head/sys/conf/ldscript.mips.octeon1 Modified: head/sys/conf/ldscript.mips.octeon1 ============================================================================== --- head/sys/conf/ldscript.mips.octeon1 Sun Mar 22 21:51:50 2020 (r359229) +++ head/sys/conf/ldscript.mips.octeon1 Sun Mar 22 22:18:00 2020 (r359230) @@ -10,8 +10,7 @@ SECTIONS { . = KERNLOADADDR + SIZEOF_HEADERS; .text : { - *(.text) - *(.dynamic) + *(.text) etext = .; _etext = .; . = ALIGN(0x2000); @@ -35,8 +34,10 @@ SECTIONS { *(.data) . = ALIGN(32); } - - _gp = (. + 0x8000); + .plt : { *(.plt) } + _gp = ALIGN(16) + 0x7ff0; + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } .sdata : { _small_start = .; From owner-svn-src-head@freebsd.org Sun Mar 22 22:18:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 363BE26F1AA; Sun, 22 Mar 2020 22:18:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48lsMz15kCz3PXs; Sun, 22 Mar 2020 22:18:07 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74F0147F7; Sun, 22 Mar 2020 22:18:06 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02MMI6Kr017368; Sun, 22 Mar 2020 22:18:06 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02MMI6YP017367; Sun, 22 Mar 2020 22:18:06 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202003222218.02MMI6YP017367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Sun, 22 Mar 2020 22:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359231 - head/sys/mips/nlm X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/sys/mips/nlm X-SVN-Commit-Revision: 359231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 22:18:08 -0000 Author: arichardson Date: Sun Mar 22 22:18:06 2020 New Revision: 359231 URL: https://svnweb.freebsd.org/changeset/base/359231 Log: Use a GCC-compatile compiler flag in files.xlp Seems like GCC doesn't like -Qunused-arguments, so use -Wno-unused-command-line-argument, which is supported by both GCC and Clang. Modified: head/sys/mips/nlm/files.xlp Modified: head/sys/mips/nlm/files.xlp ============================================================================== --- head/sys/mips/nlm/files.xlp Sun Mar 22 22:18:00 2020 (r359230) +++ head/sys/mips/nlm/files.xlp Sun Mar 22 22:18:06 2020 (r359231) @@ -23,7 +23,7 @@ mips/nlm/dev/net/sgmii.c optional xlpge mips/nlm/dev/net/xaui.c optional xlpge mips/nlm/dev/net/xlpge.c optional xlpge ucore_app.bin optional xlpge \ - compile-with "${CC} -EB -march=mips32 -mabi=32 -msoft-float -I. -I$S -O3 -funroll-loops -fomit-frame-pointer -Qunused-arguments -mno-branch-likely -fno-pic -mno-abicalls -ffunction-sections -fdata-sections -G0 -Wall -Werror -c $S/$M/nlm/dev/net/ucore/crt0_basic.S $S/$M/nlm/dev/net/ucore/ucore_app.c && ${LD} -melf32btsmip_fbsd -d -warn-common -T$S/$M/nlm/dev/net/ucore/ld.ucore.S crt0_basic.o ucore_app.o -o ucore_app && ${OBJCOPY} -S -O binary -R .note -R .comment ucore_app ${.TARGET}" \ + compile-with "${CC} -EB -march=mips32 -mabi=32 -msoft-float -I. -I$S -O3 -funroll-loops -fomit-frame-pointer -Wno-unused-command-line-argument -mno-branch-likely -fno-pic -mno-abicalls -ffunction-sections -fdata-sections -G0 -Wall -Werror -c $S/$M/nlm/dev/net/ucore/crt0_basic.S $S/$M/nlm/dev/net/ucore/ucore_app.c && ${LD} -melf32btsmip_fbsd -d -warn-common -T$S/$M/nlm/dev/net/ucore/ld.ucore.S crt0_basic.o ucore_app.o -o ucore_app && ${OBJCOPY} -S -O binary -R .note -R .comment ucore_app ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "crt0_basic.o ucore_app.o ucore_app ucore_app.bin" ucore_app_bin.h optional xlpge \ From owner-svn-src-head@freebsd.org Mon Mar 23 08:23:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6700827C735; Mon, 23 Mar 2020 08:23:23 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48m6pM1z3Mz4Y3c; Mon, 23 Mar 2020 08:23:23 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32C62B86B; Mon, 23 Mar 2020 08:23:23 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02N8NN2c081494; Mon, 23 Mar 2020 08:23:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02N8NMRk081493; Mon, 23 Mar 2020 08:23:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003230823.02N8NMRk081493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 23 Mar 2020 08:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359232 - in head/usr.sbin/pw: . tests X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head/usr.sbin/pw: . tests X-SVN-Commit-Revision: 359232 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 08:23:23 -0000 Author: bapt Date: Mon Mar 23 08:23:22 2020 New Revision: 359232 URL: https://svnweb.freebsd.org/changeset/base/359232 Log: pw: do not removed home directories if not owned When deleting a user, if its home directory does not belong to it, it should not be removed. This is the promise that the manpage makes, the tool should ensure that it respects that promise. Add a regression test about it PR: 244967 Submitted by: Eric Hanneken MFC after: 3 days Modified: head/usr.sbin/pw/rm_r.c head/usr.sbin/pw/tests/pw_userdel_test.sh Modified: head/usr.sbin/pw/rm_r.c ============================================================================== --- head/usr.sbin/pw/rm_r.c Sun Mar 22 22:18:06 2020 (r359231) +++ head/usr.sbin/pw/rm_r.c Mon Mar 23 08:23:22 2020 (r359232) @@ -71,5 +71,8 @@ rm_r(int rootfd, const char *path, uid_t uid) closedir(d); if (fstatat(rootfd, path, &st, AT_SYMLINK_NOFOLLOW) != 0) return; - unlinkat(rootfd, path, S_ISDIR(st.st_mode) ? AT_REMOVEDIR : 0); + if (S_ISLNK(st.st_mode)) + unlinkat(rootfd, path, 0); + else if (st.st_uid == uid) + unlinkat(rootfd, path, AT_REMOVEDIR); } Modified: head/usr.sbin/pw/tests/pw_userdel_test.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_userdel_test.sh Sun Mar 22 22:18:06 2020 (r359231) +++ head/usr.sbin/pw/tests/pw_userdel_test.sh Mon Mar 23 08:23:22 2020 (r359232) @@ -67,10 +67,30 @@ home_not_a_dir_body() { atf_check ${RPW} userdel foo -r } +atf_test_case home_shared +home_shared_body() { + populate_root_etc_skel + mkdir ${HOME}/shared + atf_check ${RPW} useradd -n testuser1 -d /shared + atf_check ${RPW} useradd -n testuser2 -d /shared + atf_check ${RPW} userdel -n testuser1 -r + test -d ${HOME}/shared || atf_fail "Shared home has been removed" +} + +atf_test_case home_regular_dir +home_regular_dir_body() { + populate_root_etc_skel + atf_check ${RPW} useradd -n foo -d /foo + atf_check ${RPW} userdel -n foo -r + [ ! -d ${HOME}/foo ] || atf_fail "Home has not been removed" +} + atf_init_test_cases() { atf_add_test_case rmuser_seperate_group atf_add_test_case user_do_not_try_to_delete_root_if_user_unknown atf_add_test_case delete_files atf_add_test_case delete_numeric_name atf_add_test_case home_not_a_dir + atf_add_test_case home_shared + atf_add_test_case home_regular_dir } From owner-svn-src-head@freebsd.org Mon Mar 23 10:36:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D572D27F1B4; Mon, 23 Mar 2020 10:36:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48m9m15MgBz49t2; Mon, 23 Mar 2020 10:36:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3567D1C9; Mon, 23 Mar 2020 10:36:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NAaXCa059440; Mon, 23 Mar 2020 10:36:33 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NAaXQR059437; Mon, 23 Mar 2020 10:36:33 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202003231036.02NAaXQR059437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 23 Mar 2020 10:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359233 - in head: . share/man/man7 share/mk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: . share/man/man7 share/mk X-SVN-Commit-Revision: 359233 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 10:36:33 -0000 Author: arichardson Date: Mon Mar 23 10:36:32 2020 New Revision: 359233 URL: https://svnweb.freebsd.org/changeset/base/359233 Log: Use Clang and LLD as the default toolchain for MIPS Now that we have updated the in-tree version of LLVM to 10.0, we have all the necessary LLVM changes to use Clang+LLD as the default toolchain for MIPS. Relnotes: yes Reviewed By: emaste, jhb, brooks, kevans Differential Revision: https://reviews.freebsd.org/D23204 Modified: head/Makefile head/share/man/man7/arch.7 head/share/mk/src.opts.mk Modified: head/Makefile ============================================================================== --- head/Makefile Mon Mar 23 08:23:22 2020 (r359232) +++ head/Makefile Mon Mar 23 10:36:32 2020 (r359233) @@ -500,13 +500,13 @@ TARGET_ARCHES_riscv?= riscv64 riscv64sf TARGET_ARCHES_${target}?= ${target} .endfor -MAKE_PARAMS_mips?= CROSS_TOOLCHAIN=mips-gcc6 - -TOOLCHAINS_mips= mips-gcc6 - # Remove architectures only supported by external toolchain from # universe if required toolchain packages are missing. -.for target in mips +# Note: We no longer have targets that require an external toolchain, but for +# now keep this block in case a new non-LLVM architecture is added and to reuse +# it for a future extenal GCC make universe variant. +_external_toolchain_targets= +.for target in ${_external_toolchain_targets} .if ${_UNIVERSE_TARGETS:M${target}} .for toolchain in ${TOOLCHAINS_${target}} .if !exists(/usr/local/share/toolchains/${toolchain}.mk) Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon Mar 23 08:23:22 2020 (r359232) +++ head/share/man/man7/arch.7 Mon Mar 23 10:36:32 2020 (r359233) @@ -302,15 +302,15 @@ This table shows the default tool chain for each archi .It armv6 Ta Clang Ta lld .It armv7 Ta Clang Ta lld .It i386 Ta Clang Ta lld -.It mips Ta GCC(1) Ta GNU ld(1) -.It mipsel Ta GCC(1) Ta GNU ld(1) -.It mipselhf Ta GCC(1) Ta GNU ld(1) -.It mipshf Ta GCC(1) Ta GNU ld(1) -.It mipsn32 Ta GCC(1) Ta GNU ld(1) -.It mips64 Ta GCC(1) Ta GNU ld(1) -.It mips64el Ta GCC(1) Ta GNU ld(1) -.It mips64elhf Ta GCC(1) Ta GNU ld(1) -.It mips64hf Ta GCC(1) Ta GNU ld(1) +.It mips Ta Clang Ta lld +.It mipsel Ta Clang Ta lld +.It mipselhf Ta Clang Ta lld +.It mipshf Ta Clang Ta lld +.It mipsn32 Ta Clang Ta lld +.It mips64 Ta Clang Ta lld +.It mips64el Ta Clang Ta lld +.It mips64elhf Ta Clang Ta lld +.It mips64hf Ta Clang Ta lld .It powerpc Ta Clang Ta GNU ld 2.17.50 .It powerpcspe Ta Clang Ta GNU ld 2.17.50 .It powerpc64 Ta Clang Ta lld Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Mar 23 08:23:22 2020 (r359232) +++ head/share/mk/src.opts.mk Mon Mar 23 10:36:32 2020 (r359233) @@ -79,6 +79,8 @@ __DEFAULT_YES_OPTIONS = \ CCD \ CDDL \ CLANG \ + CLANG_BOOTSTRAP \ + CLANG_IS_CC \ CPP \ CROSS_COMPILER \ CRYPT \ @@ -283,13 +285,6 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF .include -.if ${__T:Mmips*} == "" -# Clang is installed as the default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC -.else -# Clang is enabled but we still require an external toolchain. -__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC -.endif # In-tree binutils/gcc are older versions without modern architecture support. .if ${__T} == "aarch64" || ${__T:Mriscv*} != "" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GDB @@ -302,7 +297,7 @@ __DEFAULT_NO_OPTIONS+=BINUTILS_BOOTSTRAP .if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=OFED .endif -.if ${__T:Mmips*} != "mips" && ${__T} != "powerpc" && ${__T} != "powerpcspe" +.if ${__T} != "powerpc" && ${__T} != "powerpcspe" __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else __DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD From owner-svn-src-head@freebsd.org Mon Mar 23 12:17:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99AFA261BA7; Mon, 23 Mar 2020 12:17:15 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mD0B6dZZz47tT; Mon, 23 Mar 2020 12:17:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A8F5E45D; Mon, 23 Mar 2020 12:17:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NCHExM019151; Mon, 23 Mar 2020 12:17:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NCHEgq019150; Mon, 23 Mar 2020 12:17:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003231217.02NCHEgq019150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 23 Mar 2020 12:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359234 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359234 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 12:17:15 -0000 Author: tuexen Date: Mon Mar 23 12:17:13 2020 New Revision: 359234 URL: https://svnweb.freebsd.org/changeset/base/359234 Log: Cleanup the file and add two ASSERT variants for locks, which will be used shortly. MFC after: 1 week Modified: head/sys/netinet/sctp_lock_bsd.h Modified: head/sys/netinet/sctp_lock_bsd.h ============================================================================== --- head/sys/netinet/sctp_lock_bsd.h Mon Mar 23 10:36:32 2020 (r359233) +++ head/sys/netinet/sctp_lock_bsd.h Mon Mar 23 12:17:13 2020 (r359234) @@ -64,10 +64,6 @@ __FBSDID("$FreeBSD$"); * synchronize. So the CREATE_INP lock is also another one we must use * extreme caution in locking to make sure we don't hit a re-entrancy issue. * - * For non FreeBSD 5.x we provide a bunch of EMPTY lock macros so we can - * blatantly put locks everywhere and they reduce to nothing on - * NetBSD/OpenBSD and FreeBSD 4.x - * */ /* @@ -77,229 +73,275 @@ __FBSDID("$FreeBSD$"); * the SCTP_BASE_INFO() list's we will do a SCTP_INP_INFO_WLOCK(). */ -extern struct sctp_foo_stuff sctp_logoff[]; -extern int sctp_logoff_stuff; - #define SCTP_IPI_COUNT_INIT() #define SCTP_STATLOG_INIT_LOCK() +#define SCTP_STATLOG_DESTROY() #define SCTP_STATLOG_LOCK() #define SCTP_STATLOG_UNLOCK() -#define SCTP_STATLOG_DESTROY() -#define SCTP_INP_INFO_LOCK_DESTROY() do { \ - if(rw_wowned(&SCTP_BASE_INFO(ipi_ep_mtx))) { \ - rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ - } \ - rw_destroy(&SCTP_BASE_INFO(ipi_ep_mtx)); \ - } while (0) +#define SCTP_INP_INFO_LOCK_INIT() do { \ + rw_init(&SCTP_BASE_INFO(ipi_ep_mtx), "sctp-info"); \ +} while (0) -#define SCTP_INP_INFO_LOCK_INIT() \ - rw_init(&SCTP_BASE_INFO(ipi_ep_mtx), "sctp-info"); +#define SCTP_INP_INFO_LOCK_DESTROY() do { \ + if (rw_wowned(&SCTP_BASE_INFO(ipi_ep_mtx))) { \ + rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ + } \ + rw_destroy(&SCTP_BASE_INFO(ipi_ep_mtx)); \ +} while (0) +#define SCTP_INP_INFO_RLOCK() do { \ + rw_rlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ +} while (0) -#define SCTP_INP_INFO_RLOCK() do { \ - rw_rlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ +#define SCTP_INP_INFO_WLOCK() do { \ + rw_wlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ } while (0) -#define SCTP_MCORE_QLOCK_INIT(cpstr) do { \ - mtx_init(&(cpstr)->que_mtx, \ - "sctp-mcore_queue","queue_lock", \ - MTX_DEF|MTX_DUPOK); \ +#define SCTP_INP_INFO_RUNLOCK() do { \ + rw_runlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ } while (0) -#define SCTP_MCORE_QLOCK(cpstr) do { \ - mtx_lock(&(cpstr)->que_mtx); \ +#define SCTP_INP_INFO_WUNLOCK() do { \ + rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ } while (0) -#define SCTP_MCORE_QUNLOCK(cpstr) do { \ - mtx_unlock(&(cpstr)->que_mtx); \ + +#define SCTP_MCORE_QLOCK_INIT(cpstr) do { \ + mtx_init(&(cpstr)->que_mtx, "sctp-mcore_queue","queue_lock", \ + MTX_DEF | MTX_DUPOK); \ } while (0) -#define SCTP_MCORE_QDESTROY(cpstr) do { \ - if(mtx_owned(&(cpstr)->core_mtx)) { \ - mtx_unlock(&(cpstr)->que_mtx); \ - } \ - mtx_destroy(&(cpstr)->que_mtx); \ +#define SCTP_MCORE_QDESTROY(cpstr) do { \ + if (mtx_owned(&(cpstr)->core_mtx)) { \ + mtx_unlock(&(cpstr)->que_mtx); \ + } \ + mtx_destroy(&(cpstr)->que_mtx); \ } while (0) +#define SCTP_MCORE_QLOCK(cpstr) do { \ + mtx_lock(&(cpstr)->que_mtx); \ +} while (0) -#define SCTP_MCORE_LOCK_INIT(cpstr) do { \ - mtx_init(&(cpstr)->core_mtx, \ - "sctp-cpulck","cpu_proc_lock", \ - MTX_DEF|MTX_DUPOK); \ +#define SCTP_MCORE_QUNLOCK(cpstr) do { \ + mtx_unlock(&(cpstr)->que_mtx); \ } while (0) -#define SCTP_MCORE_LOCK(cpstr) do { \ - mtx_lock(&(cpstr)->core_mtx); \ + +#define SCTP_MCORE_LOCK_INIT(cpstr) do { \ + mtx_init(&(cpstr)->core_mtx, "sctp-cpulck","cpu_proc_lock", \ + MTX_DEF | MTX_DUPOK); \ } while (0) -#define SCTP_MCORE_UNLOCK(cpstr) do { \ - mtx_unlock(&(cpstr)->core_mtx); \ +#define SCTP_MCORE_DESTROY(cpstr) do { \ + if (mtx_owned(&(cpstr)->core_mtx)) { \ + mtx_unlock(&(cpstr)->core_mtx); \ + } \ + mtx_destroy(&(cpstr)->core_mtx); \ } while (0) -#define SCTP_MCORE_DESTROY(cpstr) do { \ - if(mtx_owned(&(cpstr)->core_mtx)) { \ - mtx_unlock(&(cpstr)->core_mtx); \ - } \ - mtx_destroy(&(cpstr)->core_mtx); \ +#define SCTP_MCORE_LOCK(cpstr) do { \ + mtx_lock(&(cpstr)->core_mtx); \ } while (0) -#define SCTP_INP_INFO_WLOCK() do { \ - rw_wlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ +#define SCTP_MCORE_UNLOCK(cpstr) do { \ + mtx_unlock(&(cpstr)->core_mtx); \ } while (0) -#define SCTP_INP_INFO_RUNLOCK() rw_runlock(&SCTP_BASE_INFO(ipi_ep_mtx)) -#define SCTP_INP_INFO_WUNLOCK() rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)) +#define SCTP_IPI_ADDR_INIT() do { \ + rw_init(&SCTP_BASE_INFO(ipi_addr_mtx), "sctp-addr"); \ +} while (0) +#define SCTP_IPI_ADDR_DESTROY() do { \ + if (rw_wowned(&SCTP_BASE_INFO(ipi_addr_mtx))) { \ + rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ + } \ + rw_destroy(&SCTP_BASE_INFO(ipi_addr_mtx)); \ +} while (0) -#define SCTP_IPI_ADDR_INIT() \ - rw_init(&SCTP_BASE_INFO(ipi_addr_mtx), "sctp-addr") -#define SCTP_IPI_ADDR_DESTROY() do { \ - if(rw_wowned(&SCTP_BASE_INFO(ipi_addr_mtx))) { \ - rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ - } \ - rw_destroy(&SCTP_BASE_INFO(ipi_addr_mtx)); \ - } while (0) #define SCTP_IPI_ADDR_RLOCK() do { \ - rw_rlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ + rw_rlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ } while (0) + #define SCTP_IPI_ADDR_WLOCK() do { \ - rw_wlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ + rw_wlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ } while (0) -#define SCTP_IPI_ADDR_RUNLOCK() rw_runlock(&SCTP_BASE_INFO(ipi_addr_mtx)) -#define SCTP_IPI_ADDR_WUNLOCK() rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)) +#define SCTP_IPI_ADDR_RUNLOCK() do { \ + rw_runlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ +} while (0) +#define SCTP_IPI_ADDR_WUNLOCK() do { \ + rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ +} while (0) -#define SCTP_IPI_ITERATOR_WQ_INIT() \ - mtx_init(&sctp_it_ctl.ipi_iterator_wq_mtx, "sctp-it-wq", "sctp_it_wq", MTX_DEF) -#define SCTP_IPI_ITERATOR_WQ_DESTROY() \ - mtx_destroy(&sctp_it_ctl.ipi_iterator_wq_mtx) +#define SCTP_IPI_ITERATOR_WQ_INIT() do { \ + mtx_init(&sctp_it_ctl.ipi_iterator_wq_mtx, "sctp-it-wq", \ + "sctp_it_wq", MTX_DEF); \ +} while (0) -#define SCTP_IPI_ITERATOR_WQ_LOCK() do { \ - mtx_lock(&sctp_it_ctl.ipi_iterator_wq_mtx); \ +#define SCTP_IPI_ITERATOR_WQ_DESTROY() do { \ + mtx_destroy(&sctp_it_ctl.ipi_iterator_wq_mtx); \ } while (0) -#define SCTP_IPI_ITERATOR_WQ_UNLOCK() mtx_unlock(&sctp_it_ctl.ipi_iterator_wq_mtx) +#define SCTP_IPI_ITERATOR_WQ_LOCK() do { \ + mtx_lock(&sctp_it_ctl.ipi_iterator_wq_mtx); \ +} while (0) +#define SCTP_IPI_ITERATOR_WQ_UNLOCK() do { \ + mtx_unlock(&sctp_it_ctl.ipi_iterator_wq_mtx); \ +} while (0) -#define SCTP_IP_PKTLOG_INIT() \ - mtx_init(&SCTP_BASE_INFO(ipi_pktlog_mtx), "sctp-pktlog", "packetlog", MTX_DEF) +#define SCTP_IP_PKTLOG_INIT() do { \ + mtx_init(&SCTP_BASE_INFO(ipi_pktlog_mtx), "sctp-pktlog", \ + "packetlog", MTX_DEF); \ +} while (0) -#define SCTP_IP_PKTLOG_LOCK() do { \ - mtx_lock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \ +#define SCTP_IP_PKTLOG_DESTROY() do { \ + mtx_destroy(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \ } while (0) -#define SCTP_IP_PKTLOG_UNLOCK() mtx_unlock(&SCTP_BASE_INFO(ipi_pktlog_mtx)) +#define SCTP_IP_PKTLOG_LOCK() do { \ + mtx_lock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \ +} while (0) -#define SCTP_IP_PKTLOG_DESTROY() \ - mtx_destroy(&SCTP_BASE_INFO(ipi_pktlog_mtx)) +#define SCTP_IP_PKTLOG_UNLOCK() do { \ + mtx_unlock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \ +} while (0) - - - /* * The INP locks we will use for locking an SCTP endpoint, so for example if * we want to change something at the endpoint level for example random_store * or cookie secrets we lock the INP level. */ -#define SCTP_INP_READ_INIT(_inp) \ - mtx_init(&(_inp)->inp_rdata_mtx, "sctp-read", "inpr", MTX_DEF | MTX_DUPOK) +#define SCTP_INP_READ_INIT(_inp) do { \ + mtx_init(&(_inp)->inp_rdata_mtx, "sctp-read", "inpr", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) -#define SCTP_INP_READ_DESTROY(_inp) \ - mtx_destroy(&(_inp)->inp_rdata_mtx) +#define SCTP_INP_READ_DESTROY(_inp) do { \ + mtx_destroy(&(_inp)->inp_rdata_mtx); \ +} while (0) -#define SCTP_INP_READ_LOCK(_inp) do { \ - mtx_lock(&(_inp)->inp_rdata_mtx); \ +#define SCTP_INP_READ_LOCK(_inp) do { \ + mtx_lock(&(_inp)->inp_rdata_mtx); \ } while (0) +#define SCTP_INP_READ_UNLOCK(_inp) do { \ + mtx_unlock(&(_inp)->inp_rdata_mtx); \ +} while (0) -#define SCTP_INP_READ_UNLOCK(_inp) mtx_unlock(&(_inp)->inp_rdata_mtx) +#define SCTP_INP_LOCK_INIT(_inp) do { \ + mtx_init(&(_inp)->inp_mtx, "sctp-inp", "inp", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) -#define SCTP_INP_LOCK_INIT(_inp) \ - mtx_init(&(_inp)->inp_mtx, "sctp-inp", "inp", MTX_DEF | MTX_DUPOK) -#define SCTP_ASOC_CREATE_LOCK_INIT(_inp) \ - mtx_init(&(_inp)->inp_create_mtx, "sctp-create", "inp_create", \ - MTX_DEF | MTX_DUPOK) +#define SCTP_INP_LOCK_DESTROY(_inp) do { \ + mtx_destroy(&(_inp)->inp_mtx); \ +} while (0) -#define SCTP_INP_LOCK_DESTROY(_inp) \ - mtx_destroy(&(_inp)->inp_mtx) +#define SCTP_INP_LOCK_CONTENDED(_inp) \ + ((_inp)->inp_mtx.mtx_lock & MTX_CONTESTED) -#define SCTP_INP_LOCK_CONTENDED(_inp) ((_inp)->inp_mtx.mtx_lock & MTX_CONTESTED) +#define SCTP_INP_READ_CONTENDED(_inp) \ + ((_inp)->inp_rdata_mtx.mtx_lock & MTX_CONTESTED) -#define SCTP_INP_READ_CONTENDED(_inp) ((_inp)->inp_rdata_mtx.mtx_lock & MTX_CONTESTED) - -#define SCTP_ASOC_CREATE_LOCK_CONTENDED(_inp) ((_inp)->inp_create_mtx.mtx_lock & MTX_CONTESTED) - - -#define SCTP_ASOC_CREATE_LOCK_DESTROY(_inp) \ - mtx_destroy(&(_inp)->inp_create_mtx) - - #ifdef SCTP_LOCK_LOGGING #define SCTP_INP_RLOCK(_inp) do { \ - if(SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) sctp_log_lock(_inp, (struct sctp_tcb *)NULL, SCTP_LOG_LOCK_INP);\ - mtx_lock(&(_inp)->inp_mtx); \ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) \ + sctp_log_lock(_inp, NULL, SCTP_LOG_LOCK_INP); \ + mtx_lock(&(_inp)->inp_mtx); \ } while (0) #define SCTP_INP_WLOCK(_inp) do { \ - if(SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) sctp_log_lock(_inp, (struct sctp_tcb *)NULL, SCTP_LOG_LOCK_INP);\ - mtx_lock(&(_inp)->inp_mtx); \ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) \ + sctp_log_lock(_inp, NULL, SCTP_LOG_LOCK_INP); \ + mtx_lock(&(_inp)->inp_mtx); \ } while (0) - #else - -#define SCTP_INP_RLOCK(_inp) do { \ - mtx_lock(&(_inp)->inp_mtx); \ +#define SCTP_INP_RLOCK(_inp) do { \ + mtx_lock(&(_inp)->inp_mtx); \ } while (0) -#define SCTP_INP_WLOCK(_inp) do { \ - mtx_lock(&(_inp)->inp_mtx); \ +#define SCTP_INP_WLOCK(_inp) do { \ + mtx_lock(&(_inp)->inp_mtx); \ } while (0) - #endif +#define SCTP_INP_RUNLOCK(_inp) do { \ + mtx_unlock(&(_inp)->inp_mtx); \ +} while (0) -#define SCTP_TCB_SEND_LOCK_INIT(_tcb) \ - mtx_init(&(_tcb)->tcb_send_mtx, "sctp-send-tcb", "tcbs", MTX_DEF | MTX_DUPOK) +#define SCTP_INP_WUNLOCK(_inp) do { \ + mtx_unlock(&(_inp)->inp_mtx); \ +} while (0) -#define SCTP_TCB_SEND_LOCK_DESTROY(_tcb) mtx_destroy(&(_tcb)->tcb_send_mtx) +#define SCTP_INP_RLOCK_ASSERT(_inp) do { \ + KASSERT(mtx_owned(&(_inp)->inp_mtx), \ + ("Don't own INP read lock")); \ +} while (0) -#define SCTP_TCB_SEND_LOCK(_tcb) do { \ - mtx_lock(&(_tcb)->tcb_send_mtx); \ +#define SCTP_INP_WLOCK_ASSERT(_inp) do { \ + KASSERT(mtx_owned(&(_inp)->inp_mtx), \ + ("Don't own INP write lock")); \ } while (0) -#define SCTP_TCB_SEND_UNLOCK(_tcb) mtx_unlock(&(_tcb)->tcb_send_mtx) - #define SCTP_INP_INCR_REF(_inp) atomic_add_int(&((_inp)->refcount), 1) #define SCTP_INP_DECR_REF(_inp) atomic_add_int(&((_inp)->refcount), -1) +#define SCTP_ASOC_CREATE_LOCK_INIT(_inp) do { \ + mtx_init(&(_inp)->inp_create_mtx, "sctp-create", "inp_create", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) +#define SCTP_ASOC_CREATE_LOCK_DESTROY(_inp) do { \ + mtx_destroy(&(_inp)->inp_create_mtx); \ +} while (0) + #ifdef SCTP_LOCK_LOGGING -#define SCTP_ASOC_CREATE_LOCK(_inp) \ - do { \ - if(SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) sctp_log_lock(_inp, (struct sctp_tcb *)NULL, SCTP_LOG_LOCK_CREATE); \ - mtx_lock(&(_inp)->inp_create_mtx); \ - } while (0) +#define SCTP_ASOC_CREATE_LOCK(_inp) do { \ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) \ + sctp_log_lock(_inp, NULL, SCTP_LOG_LOCK_CREATE); \ + mtx_lock(&(_inp)->inp_create_mtx); \ +} while (0) #else - -#define SCTP_ASOC_CREATE_LOCK(_inp) \ - do { \ - mtx_lock(&(_inp)->inp_create_mtx); \ - } while (0) +#define SCTP_ASOC_CREATE_LOCK(_inp) do { \ + mtx_lock(&(_inp)->inp_create_mtx); \ +} while (0) #endif -#define SCTP_INP_RUNLOCK(_inp) mtx_unlock(&(_inp)->inp_mtx) -#define SCTP_INP_WUNLOCK(_inp) mtx_unlock(&(_inp)->inp_mtx) -#define SCTP_ASOC_CREATE_UNLOCK(_inp) mtx_unlock(&(_inp)->inp_create_mtx) +#define SCTP_ASOC_CREATE_UNLOCK(_inp) do { \ + mtx_unlock(&(_inp)->inp_create_mtx); \ +} while (0) +#define SCTP_ASOC_CREATE_LOCK_CONTENDED(_inp) \ + ((_inp)->inp_create_mtx.mtx_lock & MTX_CONTESTED) + + +#define SCTP_TCB_SEND_LOCK_INIT(_tcb) do { \ + mtx_init(&(_tcb)->tcb_send_mtx, "sctp-send-tcb", "tcbs", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) + +#define SCTP_TCB_SEND_LOCK_DESTROY(_tcb) do { \ + mtx_destroy(&(_tcb)->tcb_send_mtx); \ +} while (0) + +#define SCTP_TCB_SEND_LOCK(_tcb) do { \ + mtx_lock(&(_tcb)->tcb_send_mtx); \ +} while (0) + +#define SCTP_TCB_SEND_UNLOCK(_tcb) do { \ + mtx_unlock(&(_tcb)->tcb_send_mtx); \ +} while (0) + /* * For the majority of things (once we have found the association) we will * lock the actual association mutex. This will protect all the assoiciation @@ -308,168 +350,154 @@ extern int sctp_logoff_stuff; * extra SOCKBUF_LOCK(&so->so_rcv) even though the association is locked. */ -#define SCTP_TCB_LOCK_INIT(_tcb) \ - mtx_init(&(_tcb)->tcb_mtx, "sctp-tcb", "tcb", MTX_DEF | MTX_DUPOK) +#define SCTP_TCB_LOCK_INIT(_tcb) do { \ + mtx_init(&(_tcb)->tcb_mtx, "sctp-tcb", "tcb", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) -#define SCTP_TCB_LOCK_DESTROY(_tcb) mtx_destroy(&(_tcb)->tcb_mtx) +#define SCTP_TCB_LOCK_DESTROY(_tcb) do { \ + mtx_destroy(&(_tcb)->tcb_mtx); \ +} while (0) #ifdef SCTP_LOCK_LOGGING -#define SCTP_TCB_LOCK(_tcb) do { \ - if(SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) sctp_log_lock(_tcb->sctp_ep, _tcb, SCTP_LOG_LOCK_TCB); \ - mtx_lock(&(_tcb)->tcb_mtx); \ +#define SCTP_TCB_LOCK(_tcb) do { \ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) \ + sctp_log_lock(_tcb->sctp_ep, _tcb, SCTP_LOG_LOCK_TCB); \ + mtx_lock(&(_tcb)->tcb_mtx); \ } while (0) - #else -#define SCTP_TCB_LOCK(_tcb) do { \ - mtx_lock(&(_tcb)->tcb_mtx); \ +#define SCTP_TCB_LOCK(_tcb) do { \ + mtx_lock(&(_tcb)->tcb_mtx); \ } while (0) #endif +#define SCTP_TCB_TRYLOCK(_tcb) \ + mtx_trylock(&(_tcb)->tcb_mtx) -#define SCTP_TCB_TRYLOCK(_tcb) mtx_trylock(&(_tcb)->tcb_mtx) +#define SCTP_TCB_UNLOCK(_tcb) do { \ + mtx_unlock(&(_tcb)->tcb_mtx); \ +} while (0) -#define SCTP_TCB_UNLOCK(_tcb) mtx_unlock(&(_tcb)->tcb_mtx) +#define SCTP_TCB_UNLOCK_IFOWNED(_tcb) do { \ + if (mtx_owned(&(_tcb)->tcb_mtx)) \ + mtx_unlock(&(_tcb)->tcb_mtx); \ +} while (0) -#define SCTP_TCB_UNLOCK_IFOWNED(_tcb) do { \ - if (mtx_owned(&(_tcb)->tcb_mtx)) \ - mtx_unlock(&(_tcb)->tcb_mtx); \ - } while (0) +#define SCTP_TCB_LOCK_ASSERT(_tcb) do { \ + KASSERT(mtx_owned(&(_tcb)->tcb_mtx), \ + ("Don't own TCB lock")); \ +} while (0) +#define SCTP_ITERATOR_LOCK_INIT() do { \ + mtx_init(&sctp_it_ctl.it_mtx, "sctp-it", "iterator", MTX_DEF); \ +} while (0) -#ifdef INVARIANTS -#define SCTP_TCB_LOCK_ASSERT(_tcb) do { \ - if (mtx_owned(&(_tcb)->tcb_mtx) == 0) \ - panic("Don't own TCB lock"); \ - } while (0) -#else -#define SCTP_TCB_LOCK_ASSERT(_tcb) -#endif +#define SCTP_ITERATOR_LOCK_DESTROY() do { \ + mtx_destroy(&sctp_it_ctl.it_mtx); \ +} while (0) -#define SCTP_ITERATOR_LOCK_INIT() \ - mtx_init(&sctp_it_ctl.it_mtx, "sctp-it", "iterator", MTX_DEF) - -#ifdef INVARIANTS #define SCTP_ITERATOR_LOCK() \ do { \ - if (mtx_owned(&sctp_it_ctl.it_mtx)) \ - panic("Iterator Lock"); \ + KASSERT(!mtx_owned(&sctp_it_ctl.it_mtx), \ + ("Own the iterator lock")); \ mtx_lock(&sctp_it_ctl.it_mtx); \ } while (0) -#else -#define SCTP_ITERATOR_LOCK() \ - do { \ - mtx_lock(&sctp_it_ctl.it_mtx); \ - } while (0) -#endif +#define SCTP_ITERATOR_UNLOCK() do { \ + mtx_unlock(&sctp_it_ctl.it_mtx); \ +} while (0) -#define SCTP_ITERATOR_UNLOCK() mtx_unlock(&sctp_it_ctl.it_mtx) -#define SCTP_ITERATOR_LOCK_DESTROY() mtx_destroy(&sctp_it_ctl.it_mtx) +#define SCTP_WQ_ADDR_INIT() do { \ + mtx_init(&SCTP_BASE_INFO(wq_addr_mtx), \ + "sctp-addr-wq","sctp_addr_wq", MTX_DEF); \ +} while (0) -#define SCTP_WQ_ADDR_INIT() do { \ - mtx_init(&SCTP_BASE_INFO(wq_addr_mtx), "sctp-addr-wq","sctp_addr_wq",MTX_DEF); \ - } while (0) +#define SCTP_WQ_ADDR_DESTROY() do { \ + if (mtx_owned(&SCTP_BASE_INFO(wq_addr_mtx))) { \ + mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \ + } \ + mtx_destroy(&SCTP_BASE_INFO(wq_addr_mtx)); \ +} while (0) -#define SCTP_WQ_ADDR_DESTROY() do { \ - if(mtx_owned(&SCTP_BASE_INFO(wq_addr_mtx))) { \ - mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \ - } \ - mtx_destroy(&SCTP_BASE_INFO(wq_addr_mtx)); \ - } while (0) +#define SCTP_WQ_ADDR_LOCK() do { \ + mtx_lock(&SCTP_BASE_INFO(wq_addr_mtx)); \ +} while (0) -#define SCTP_WQ_ADDR_LOCK() do { \ - mtx_lock(&SCTP_BASE_INFO(wq_addr_mtx)); \ +#define SCTP_WQ_ADDR_UNLOCK() do { \ + mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \ } while (0) -#define SCTP_WQ_ADDR_UNLOCK() do { \ - mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \ + +#define SCTP_WQ_ADDR_LOCK_ASSERT() do { \ + KASSERT(mtx_owned(&SCTP_BASE_INFO(wq_addr_mtx)), \ + ("Don't own the ADDR-WQ lock")); \ } while (0) +#define SCTP_INCR_EP_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \ +} while (0) +#define SCTP_DECR_EP_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \ +} while (0) -#define SCTP_INCR_EP_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \ - } while (0) +#define SCTP_INCR_ASOC_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \ +} while (0) -#define SCTP_DECR_EP_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \ - } while (0) +#define SCTP_DECR_ASOC_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \ +} while (0) -#define SCTP_INCR_ASOC_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \ - } while (0) +#define SCTP_INCR_LADDR_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \ +} while (0) -#define SCTP_DECR_ASOC_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \ - } while (0) +#define SCTP_DECR_LADDR_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \ +} while (0) -#define SCTP_INCR_LADDR_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \ - } while (0) +#define SCTP_INCR_RADDR_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_raddr), 1); \ +} while (0) -#define SCTP_DECR_LADDR_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \ - } while (0) +#define SCTP_DECR_RADDR_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_raddr),1); \ +} while (0) -#define SCTP_INCR_RADDR_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_raddr), 1); \ - } while (0) +#define SCTP_INCR_CHK_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ +} while (0) -#define SCTP_DECR_RADDR_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_raddr),1); \ - } while (0) +#define SCTP_DECR_CHK_COUNT() do { \ + KASSERT(SCTP_BASE_INFO(ipi_count_chunk) > 0, \ + ("ipi_count_chunk would become negative")); \ + if (SCTP_BASE_INFO(ipi_count_chunk) != 0) \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), \ + 1); \ +} while (0) -#define SCTP_INCR_CHK_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ - } while (0) -#ifdef INVARIANTS -#define SCTP_DECR_CHK_COUNT() \ - do { \ - if(SCTP_BASE_INFO(ipi_count_chunk) == 0) \ - panic("chunk count to 0?"); \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ - } while (0) -#else -#define SCTP_DECR_CHK_COUNT() \ - do { \ - if(SCTP_BASE_INFO(ipi_count_chunk) != 0) \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ - } while (0) -#endif -#define SCTP_INCR_READQ_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_readq),1); \ - } while (0) +#define SCTP_INCR_READQ_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_readq), 1); \ +} while (0) -#define SCTP_DECR_READQ_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_readq), 1); \ - } while (0) +#define SCTP_DECR_READQ_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_readq), 1); \ +} while (0) -#define SCTP_INCR_STRMOQ_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \ - } while (0) +#define SCTP_INCR_STRMOQ_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \ +} while (0) -#define SCTP_DECR_STRMOQ_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \ - } while (0) +#define SCTP_DECR_STRMOQ_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \ +} while (0) - #if defined(SCTP_SO_LOCK_TESTING) -#define SCTP_INP_SO(sctpinp) (sctpinp)->ip_inp.inp.inp_socket +#define SCTP_INP_SO(sctpinp) \ + (sctpinp)->ip_inp.inp.inp_socket #define SCTP_SOCKET_LOCK(so, refcnt) #define SCTP_SOCKET_UNLOCK(so, refcnt) #endif From owner-svn-src-head@freebsd.org Mon Mar 23 12:21:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3F25261CB3; Mon, 23 Mar 2020 12:21:36 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mD5D25l1z4Ckd; Mon, 23 Mar 2020 12:21:36 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0007FE4B9; Mon, 23 Mar 2020 12:21:33 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NCLXkA023407; Mon, 23 Mar 2020 12:21:33 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NCLWq1023400; Mon, 23 Mar 2020 12:21:32 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202003231221.02NCLWq1023400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 23 Mar 2020 12:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359235 - in head/tests/sys: common netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/tests/sys: common netinet netinet6 X-SVN-Commit-Revision: 359235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 12:21:37 -0000 Author: melifaro Date: Mon Mar 23 12:21:32 2020 New Revision: 359235 URL: https://svnweb.freebsd.org/changeset/base/359235 Log: Add tests verifying IPv4/IPv6 output for TCP/UDP/raw paths. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24138 Added: head/tests/sys/common/net_receiver.py (contents, props changed) head/tests/sys/netinet/output.sh (contents, props changed) head/tests/sys/netinet6/output6.sh (contents, props changed) Modified: head/tests/sys/common/Makefile head/tests/sys/common/vnet.subr head/tests/sys/netinet/Makefile head/tests/sys/netinet6/Makefile Modified: head/tests/sys/common/Makefile ============================================================================== --- head/tests/sys/common/Makefile Mon Mar 23 12:17:13 2020 (r359234) +++ head/tests/sys/common/Makefile Mon Mar 23 12:21:32 2020 (r359235) @@ -5,8 +5,10 @@ TESTSDIR= ${TESTSBASE}/sys/common ${PACKAGE}FILES+= vnet.subr ${PACKAGE}FILES+= divert.py ${PACKAGE}FILES+= sender.py +${PACKAGE}FILES+= net_receiver.py ${PACKAGE}FILESMODE_divert.py=0555 ${PACKAGE}FILESMODE_sender.py=0555 +${PACKAGE}FILESMODE_net_receiver.py=0555 .include Added: head/tests/sys/common/net_receiver.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/common/net_receiver.py Mon Mar 23 12:21:32 2020 (r359235) @@ -0,0 +1,116 @@ +#!/usr/bin/env python +# - +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander V. Chernikov +# +# 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$ +# + + +from functools import partial +import socket +import select +import argparse +import time + + +def parse_args(): + parser = argparse.ArgumentParser(description='divert socket tester') + parser.add_argument('--sip', type=str, default='', help='IP to listen on') + parser.add_argument('--family', type=str, help='inet/inet6') + parser.add_argument('--ports', type=str, help='packet ports 1,2,3') + parser.add_argument('--match_str', type=str, help='match string to use') + parser.add_argument('--count', type=int, default=1, + help='Number of messages to receive') + parser.add_argument('--test_name', type=str, required=True, + help='test name to run') + return parser.parse_args() + + +def test_listen_tcp(args): + if args.family == 'inet6': + fam = socket.AF_INET6 + else: + fam = socket.AF_INET + sockets = [] + ports = [int(port) for port in args.ports.split(',')] + for port in ports: + s = socket.socket(fam, socket.SOCK_STREAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + s.setblocking(0) + s.bind((args.sip, port)) + print('binding on {}:{}'.format(args.sip, port)) + s.listen(5) + sockets.append(s) + inputs = sockets + count = 0 + while count < args.count: + readable, writable, exceptional = select.select(inputs, [], inputs) + for s in readable: + (c, address) = s.accept() + print('C: {}'.format(address)) + data = c.recv(9000) + if args.match_str and args.match_str.encode('utf-8') != data: + raise Exception('Expected "{}" but got "{}"'.format( + args.match_str, data.decode('utf-8'))) + count += 1 + c.close() + + +def test_listen_udp(args): + if args.family == 'inet6': + fam = socket.AF_INET6 + else: + fam = socket.AF_INET + sockets = [] + ports = [int(port) for port in args.ports.split(',')] + for port in ports: + s = socket.socket(fam, socket.SOCK_DGRAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + s.setblocking(0) + s.bind((args.sip, port)) + print('binding on {}:{}'.format(args.sip, port)) + sockets.append(s) + inputs = sockets + count = 0 + while count < args.count: + readable, writable, exceptional = select.select(inputs, [], inputs) + for s in readable: + (data, address) = s.recvfrom(9000) + print('C: {}'.format(address)) + if args.match_str and args.match_str.encode('utf-8') != data: + raise Exception('Expected "{}" but got "{}"'.format( + args.match_str, data.decode('utf-8'))) + count += 1 + + +def main(): + args = parse_args() + test_ptr = globals()[args.test_name] + test_ptr(args) + + +if __name__ == '__main__': + main() Modified: head/tests/sys/common/vnet.subr ============================================================================== --- head/tests/sys/common/vnet.subr Mon Mar 23 12:17:13 2020 (r359234) +++ head/tests/sys/common/vnet.subr Mon Mar 23 12:21:32 2020 (r359235) @@ -13,12 +13,20 @@ vnet_mkepair() { ifname=$(ifconfig epair create) echo $ifname >> created_interfaces.lst + echo ${ifname%a}b >> created_interfaces.lst echo ${ifname%a} } vnet_mkbridge() { ifname=$(ifconfig bridge create) + echo $ifname >> created_interfaces.lst + echo ${ifname} +} + +vnet_mkloopback() +{ + ifname=$(ifconfig lo create) echo $ifname >> created_interfaces.lst echo ${ifname} } Modified: head/tests/sys/netinet/Makefile ============================================================================== --- head/tests/sys/netinet/Makefile Mon Mar 23 12:17:13 2020 (r359234) +++ head/tests/sys/netinet/Makefile Mon Mar 23 12:21:32 2020 (r359235) @@ -9,7 +9,7 @@ ATF_TESTS_C= ip_reass_test \ so_reuseport_lb_test \ socket_afinet -ATF_TESTS_SH= fibs_test redirect divert forward +ATF_TESTS_SH= fibs_test redirect divert forward output PROGS= udp_dontroute tcp_user_cookie Added: head/tests/sys/netinet/output.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netinet/output.sh Mon Mar 23 12:21:32 2020 (r359235) @@ -0,0 +1,588 @@ +#!/usr/bin/env atf-sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander V. Chernikov +# +# 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$ +# + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "output_tcp_setup_success" "cleanup" +output_tcp_setup_success_head() +{ + + atf_set descr 'Test valid IPv4 TCP output' + atf_set require.user root +} + +output_tcp_setup_success_body() +{ + + vnet_init + + net_src="192.0.2." + net_dst="192.0.2." + ip_src="${net_src}1" + ip_dst="${net_dst}2" + plen=24 + text="testtesttst" + port=4242 + + script_name=`dirname $0`/../common/net_receiver.py + script_name=`realpath ${script_name}` + jname="v4t-output_tcp_setup_success" + + epair=$(vnet_mkepair) + + vnet_mkjail ${jname}a ${epair}a + jexec ${jname}a ifconfig ${epair}a up + jexec ${jname}a ifconfig ${epair}a inet ${ip_src}/${plen} + + vnet_mkjail ${jname}b ${epair}b + jexec ${jname}b ifconfig ${epair}b up + + jexec ${jname}b ifconfig ${epair}b inet ${ip_dst}/${plen} + + # run listener + args="--family inet --ports ${port} --match_str ${text}" + echo jexec ${jname}b ${script_name} ${args} + jexec ${jname}b ${script_name} --test_name "test_listen_tcp" ${args} & + cmd_pid=$! + + # wait for the script init + counter=0 + while [ `jexec ${jname}b sockstat -4qlp ${port} | wc -l` != "1" ]; do + sleep 0.01 + counter=$((counter+1)) + if [ ${counter} -ge 50 ]; then break; fi + done + if [ `jexec ${jname}b sockstat -4qlp ${port} | wc -l` != "1" ]; then + echo "App setup failed" + exit 1 + fi + + # run sender + echo -n "${text}" | jexec ${jname}a nc -N ${ip_dst} ${port} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "sender exit code $exit_code" ; fi + + wait ${cmd_pid} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi +} + +output_tcp_setup_success_cleanup() +{ + vnet_cleanup +} + + +atf_test_case "output_udp_setup_success" "cleanup" +output_udp_setup_success_head() +{ + + atf_set descr 'Test valid IPv4 UDP output' + atf_set require.user root +} + +output_udp_setup_success_body() +{ + + vnet_init + + net_src="192.0.2." + net_dst="192.0.2." + ip_src="${net_src}1" + ip_dst="${net_dst}2" + plen=24 + text="testtesttst" + port=4242 + + script_name=`dirname $0`/../common/net_receiver.py + script_name=`realpath ${script_name}` + jname="v4t-output_udp_setup_success" + + epair=$(vnet_mkepair) + + vnet_mkjail ${jname}a ${epair}a + jexec ${jname}a ifconfig ${epair}a up + jexec ${jname}a ifconfig ${epair}a inet ${ip_src}/${plen} + + vnet_mkjail ${jname}b ${epair}b + jexec ${jname}b ifconfig ${epair}b up + jexec ${jname}b ifconfig ${epair}b inet ${ip_dst}/${plen} + + # run listener + args="--family inet --ports ${port} --match_str ${text}" + echo jexec ${jname}b ${script_name} ${args} + jexec ${jname}b ${script_name} --test_name "test_listen_udp" ${args} & + cmd_pid=$! + + # wait for the script init + counter=0 + while [ `jexec ${jname}b sockstat -4qlp ${port} | wc -l` != "1" ]; do + sleep 0.1 + counterc=$((counter+1)) + if [ ${counter} -ge 50 ]; then break; fi + done + if [ `jexec ${jname}b sockstat -4qlp ${port} | wc -l` != "1" ]; then + echo "App setup failed" + exit 1 + fi + + # run sender + # TODO: switch from nc to some alternative to avoid 1-second delay + echo -n "${text}" | jexec ${jname}a nc -uNw1 ${ip_dst} ${port} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "sender exit code $exit_code" ; fi + + wait ${cmd_pid} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi +} + +output_udp_setup_success_cleanup() +{ + vnet_cleanup +} + +atf_test_case "output_raw_success" "cleanup" +output_raw_success_head() +{ + + atf_set descr 'Test valid IPv4 raw output' + atf_set require.user root +} + +output_raw_success_body() +{ + + vnet_init + + net_src="192.0.2." + net_dst="192.0.2." + ip_src="${net_src}1" + ip_dst="${net_dst}2" + plen=24 + + script_name=`dirname $0`/../common/net_receiver.py + script_name=`realpath ${script_name}` + jname="v4t-output_raw_success" + + epair=$(vnet_mkepair) + + vnet_mkjail ${jname}a ${epair}a + jexec ${jname}a ifconfig ${epair}a up + jexec ${jname}a ifconfig ${epair}a inet ${ip_src}/${plen} + + vnet_mkjail ${jname}b ${epair}b + jexec ${jname}b ifconfig ${epair}b up + + jexec ${jname}b ifconfig ${epair}b inet ${ip_dst}/${plen} + + atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -nc1 ${ip_dst} +} + +output_raw_success_cleanup() +{ + vnet_cleanup +} + +# Multipath tests are done the following way: +# epair0 +# jailA lo < > lo jailB +# epair1 +# jailA has 2 routes towards /24 prefix on jailB loopback, via 2 epairs +# jailB has 1 route towards /24 prefix on jailA loopback, via epair0 +# +# jailA initiates connections/sends packets towards IPs on jailB loopback. +# Script then compares amount of packets sent via epair0 and epair1 + +mpath_check() +{ + if [ "`sysctl -i -n net.route.multipath`" != 1 ]; then + atf_skip "This test requires ROUTE_MPATH enabled" + fi +} + +atf_test_case "output_tcp_flowid_mpath_success" "cleanup" +output_tcp_flowid_mpath_success_head() +{ + + atf_set descr 'Test valid IPv4 TCP output flowid generation' + atf_set require.user root +} + +output_tcp_flowid_mpath_success_body() +{ + vnet_init + mpath_check + + net_src="192.0.2." + net_dst="198.51.100." + ip_src="${net_src}1" + ip_dst="${net_dst}1" + plen=24 + text="testtesttst" + + script_name=`dirname $0`/../common/net_receiver.py + script_name=`realpath ${script_name}` + jname="v4t-output_tcp_flowid_mpath_success" + + epair0=$(vnet_mkepair) + epair1=$(vnet_mkepair) + lo_src=$(vnet_mkloopback) + lo_dst=$(vnet_mkloopback) + + vnet_mkjail ${jname}a ${epair0}a ${epair1}a ${lo_src} + # Setup transit IPv4 networks + jexec ${jname}a ifconfig ${epair0}a up + jexec ${jname}a ifconfig ${epair0}a inet 203.0.113.1/30 + jexec ${jname}a ifconfig ${epair1}a up + jexec ${jname}a ifconfig ${epair1}a inet 203.0.113.5/30 + jexec ${jname}a ifconfig ${lo_src} up + + vnet_mkjail ${jname}b ${epair0}b ${epair1}b ${lo_dst} + jexec ${jname}b ifconfig ${epair0}b up + jexec ${jname}b ifconfig ${epair0}b inet 203.0.113.2/30 + jexec ${jname}b ifconfig ${epair1}b up + jexec ${jname}b ifconfig ${epair1}b inet 203.0.113.6/30 + jexec ${jname}b ifconfig ${lo_dst} up + + # DST ips/ports to test + ips="4 29 48 53 55 61 71 80 84 87 90 91 119 131 137 153 154 158 162 169 169 171 176 187 197 228 233 235 236 237 245 251" + ports="53540 49743 43067 9131 16734 5150 14379 40292 20634 51302 3387 24387 9282 14275 42103 26881 42461 29520 45714 11096" + + jexec ${jname}a ifconfig ${lo_src} inet ${ip_src}/32 + + jexec ${jname}b ifconfig ${lo_dst} inet ${ip_dst}/32 + for i in ${ips}; do + jexec ${jname}b ifconfig ${lo_dst} alias ${net_dst}${i}/32 + done + + # Add routes + # A -> towards B via epair0a + jexec ${jname}a route add -4 -net ${net_dst}0/${plen} 203.0.113.2 + # A -> towards B via epair1a + jexec ${jname}a route add -4 -net ${net_dst}0/${plen} 203.0.113.6 + + # B towards A via epair0b + jexec ${jname}b route add -4 -net ${net_src}0/${plen} 203.0.113.1 + + # Base setup verification + atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -nc1 ${ip_dst} + + # run listener + num_ports=`echo ${ports} | wc -w` + num_ips=`echo ${ips} | wc -w` + count_examples=$((num_ports*num_ips)) + listener_ports=`echo ${ports} | tr ' ' '\n' | sort -n | tr '\n' ',' | sed -e 's?,$??'` + args="--family inet --ports ${listener_ports} --count ${count_examples} --match_str ${text}" + echo jexec ${jname}b ${script_name} ${args} + jexec ${jname}b ${script_name} --test_name "test_listen_tcp" ${args} & + cmd_pid=$! + + # wait for the app init + counter=0 + init=0 + while [ ${counter} -le 50 ]; do + _ports=`jexec ${jname}b sockstat -4ql | awk "\\\$3 == ${cmd_pid} {print \\\$6}"|awk -F: "{print \\\$2}" | sort -n | tr '\n' ','` + if [ "${_ports}" = "${listener_ports}," ]; then + init=1 + break; + fi + done + if [ ${init} -eq 0 ]; then + jexec ${jname}b sockstat -6ql | awk "\$3 == ${cmd_pid}" + echo "App setup failed" + exit 1 + fi + echo "App setup done" + + # run sender + for _ip in ${ips}; do + ip="${net_dst}${_ip}" + for port in ${ports}; do + echo -n "${text}" | jexec ${jname}a nc -nN ${ip} ${port} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "sender exit code $exit_code" ; fi + done + done + + wait ${cmd_pid} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi + + pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'` + pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'` + if [ ${pkt_0} -le 10 ]; then + echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" + exit 1 + fi + if [ ${pkt_1} -le 10 ]; then + echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" + exit 1 + fi + echo "TCP Balancing: 1: ${pkt_0} 2: ${pkt_1}" +} + +output_tcp_flowid_mpath_success_cleanup() +{ + vnet_cleanup +} + +atf_test_case "output_udp_flowid_mpath_success" "cleanup" +output_udp_flowid_mpath_success_head() +{ + + atf_set descr 'Test valid IPv4 UDP output flowid generation' + atf_set require.user root +} + +output_udp_flowid_mpath_success_body() +{ + + vnet_init + mpath_check + + # Note this test will spawn around ~100 nc processes + + net_src="192.0.2." + net_dst="198.51.100." + ip_src="${net_src}1" + ip_dst="${net_dst}1" + plen=24 + text="testtesttst" + + script_name=`dirname $0`/../common/net_receiver.py + script_name=`realpath ${script_name}` + jname="v4t-output_tcp_flowid_mpath_success" + + epair0=$(vnet_mkepair) + epair1=$(vnet_mkepair) + lo_src=$(vnet_mkloopback) + lo_dst=$(vnet_mkloopback) + + vnet_mkjail ${jname}a ${epair0}a ${epair1}a ${lo_src} + # Setup transit IPv4 networks + jexec ${jname}a ifconfig ${epair0}a up + jexec ${jname}a ifconfig ${epair0}a inet 203.0.113.1/30 + jexec ${jname}a ifconfig ${epair1}a up + jexec ${jname}a ifconfig ${epair1}a inet 203.0.113.5/30 + jexec ${jname}a ifconfig ${lo_src} up + + vnet_mkjail ${jname}b ${epair0}b ${epair1}b ${lo_dst} + jexec ${jname}b ifconfig ${epair0}b up + jexec ${jname}b ifconfig ${epair0}b inet 203.0.113.2/30 + jexec ${jname}b ifconfig ${epair1}b up + jexec ${jname}b ifconfig ${epair1}b inet 203.0.113.6/30 + jexec ${jname}b ifconfig ${lo_dst} up + + # DST ips/ports to test + ips="4 29 48 53 55 61 71 80 84 87 90 91 119 131 137 153 154 158 162 169 169 171 176 187 197 228 233 235 236 237 245 251" + ports="53540 49743 43067 9131 16734 5150 14379 40292 20634 51302 3387 24387 9282 14275 42103 26881 42461 29520 45714 11096" + + jexec ${jname}a ifconfig ${lo_src} inet ${ip_src}/32 + + jexec ${jname}b ifconfig ${lo_dst} inet ${ip_dst}/32 + for i in ${ips}; do + jexec ${jname}b ifconfig ${lo_dst} alias ${net_dst}${i}/32 + done + + # Add routes + # A -> towards B via epair0a + jexec ${jname}a route add -4 -net ${net_dst}0/${plen} 203.0.113.2 + # A -> towards B via epair1a + jexec ${jname}a route add -4 -net ${net_dst}0/${plen} 203.0.113.6 + + # B towards A via epair0b + jexec ${jname}b route add -4 -net ${net_src}0/${plen} 203.0.113.1 + + # Base setup verification + atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -nc1 ${ip_dst} + + # run listener + num_ports=`echo ${ports} | wc -w` + num_ips=`echo ${ips} | wc -w` + count_examples=$((num_ports*num_ips)) + listener_ports=`echo ${ports} | tr ' ' '\n' | sort -n | tr '\n' ',' | sed -e 's?,$??'` + args="--family inet --ports ${listener_ports} --count ${count_examples} --match_str ${text}" + echo jexec ${jname}b ${script_name} ${args} + jexec ${jname}b ${script_name} --test_name "test_listen_udp" ${args} & + cmd_pid=$! + + # wait for the app init + counter=0 + init=0 + while [ ${counter} -le 50 ]; do + _ports=`jexec ${jname}b sockstat -4ql | awk "\\\$3 == ${cmd_pid} {print \\\$6}"|awk -F: "{print \\\$2}" | sort -n | tr '\n' ','` + if [ "${_ports}" = "${listener_ports}," ]; then + init=1 + break; + fi + done + if [ ${init} -eq 0 ]; then + jexec ${jname}b sockstat -4ql | awk "\$3 == ${cmd_pid}" + echo "App setup failed" + exit 1 + fi + echo "App setup done" + + # run sender + for _ip in ${ips}; do + ip="${net_dst}${_ip}" + for port in ${ports}; do + # XXX: switch to something that allows immediate exit + echo -n "${text}" | jexec ${jname}a nc -nuNw1 ${ip} ${port} & + sleep 0.01 + done + done + + wait ${cmd_pid} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi + + pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'` + pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'` + if [ ${pkt_0} -le 10 ]; then + echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" + exit 1 + fi + if [ ${pkt_1} -le 10 ]; then + echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" + exit 1 + fi + echo "UDP BALANCING: 1: ${pkt_0} 2: ${pkt_1}" +} + +output_udp_flowid_mpath_success_cleanup() +{ + vnet_cleanup +} + +atf_test_case "output_raw_flowid_mpath_success" "cleanup" +output_raw_flowid_mpath_success_head() +{ + + atf_set descr 'Test valid IPv4 raw output flowid generation' + atf_set require.user root +} + +output_raw_flowid_mpath_success_body() +{ + + vnet_init + mpath_check + + net_src="192.0.2." + net_dst="198.51.100." + ip_src="${net_src}1" + ip_dst="${net_dst}1" + plen=24 + text="testtesttst" + + jname="v4t-output_tcp_flowid_mpath_success" + + epair0=$(vnet_mkepair) + epair1=$(vnet_mkepair) + lo_src=$(vnet_mkloopback) + lo_dst=$(vnet_mkloopback) + + vnet_mkjail ${jname}a ${epair0}a ${epair1}a ${lo_src} + # Setup transit IPv4 networks + jexec ${jname}a ifconfig ${epair0}a up + jexec ${jname}a ifconfig ${epair0}a inet 203.0.113.1/30 + jexec ${jname}a ifconfig ${epair1}a up + jexec ${jname}a ifconfig ${epair1}a inet 203.0.113.5/30 + jexec ${jname}a ifconfig ${lo_src} up + + vnet_mkjail ${jname}b ${epair0}b ${epair1}b ${lo_dst} + jexec ${jname}b ifconfig ${epair0}b up + jexec ${jname}b ifconfig ${epair0}b inet 203.0.113.2/30 + jexec ${jname}b ifconfig ${epair1}b up + jexec ${jname}b ifconfig ${epair1}b inet 203.0.113.6/30 + jexec ${jname}b ifconfig ${lo_dst} up + + # DST ips/ports to test + ips="4 29 48 53 55 61 71 80 84 87 90 91 119 131 137 153 154 158 162 169 169 171 176 187 197 228 233 235 236 237 245 251" + + jexec ${jname}a ifconfig ${lo_src} inet ${ip_src}/32 + + jexec ${jname}b ifconfig ${lo_dst} inet ${ip_dst}/32 + for i in ${ips}; do + jexec ${jname}b ifconfig ${lo_dst} alias ${net_dst}${i}/32 + done + + # Add routes + # A -> towards B via epair0a + jexec ${jname}a route add -4 -net ${net_dst}0/${plen} 203.0.113.2 + # A -> towards B via epair1a + jexec ${jname}a route add -4 -net ${net_dst}0/${plen} 203.0.113.6 + + # B towards A via epair0b + jexec ${jname}b route add -4 -net ${net_src}0/${plen} 203.0.113.1 + + # Base setup verification + atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -nc1 ${ip_dst} + + # run sender + valid_message='1 packets transmitted, 1 packets received' + for _ip in ${ips}; do + ip="${net_dst}${_ip}" + atf_check -o match:"${valid_message}" jexec ${jname}a ping -nc1 ${ip} + done + + pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'` + pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'` + + jexec ${jname}a netstat -bWf link -I ${epair0}a + jexec ${jname}a netstat -bWf link -I ${epair1}a + if [ ${pkt_0} -le 10 ]; then + echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" + exit 1 + fi + if [ ${pkt_1} -le 10 ]; then + echo "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}" + exit 1 + fi + echo "RAW BALANCING: 1: ${pkt_0} 2: ${pkt_1}" +} + +output_raw_flowid_mpath_success_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "output_tcp_setup_success" + atf_add_test_case "output_udp_setup_success" + atf_add_test_case "output_raw_success" + atf_add_test_case "output_tcp_flowid_mpath_success" + atf_add_test_case "output_udp_flowid_mpath_success" + atf_add_test_case "output_raw_flowid_mpath_success" +} + Modified: head/tests/sys/netinet6/Makefile ============================================================================== --- head/tests/sys/netinet6/Makefile Mon Mar 23 12:17:13 2020 (r359234) +++ head/tests/sys/netinet6/Makefile Mon Mar 23 12:21:32 2020 (r359235) @@ -11,7 +11,8 @@ ATF_TESTS_SH= \ scapyi386 \ redirect \ divert \ - forward6 + forward6 \ + output6 ${PACKAGE}FILES+= exthdr.py ${PACKAGE}FILES+= mld.py Added: head/tests/sys/netinet6/output6.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netinet6/output6.sh Mon Mar 23 12:21:32 2020 (r359235) @@ -0,0 +1,658 @@ +#!/usr/bin/env atf-sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander V. Chernikov +# +# 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$ +# + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "output6_tcp_setup_success" "cleanup" +output6_tcp_setup_success_head() +{ + + atf_set descr 'Test valid IPv6 TCP output' + atf_set require.user root +} + +output6_tcp_setup_success_body() +{ + + vnet_init + + net_src="2001:db8:0:0:1::" + net_dst="2001:db8:0:0:1::" + ip_src="${net_src}1" + ip_dst=${net_dst}4242 + plen=64 + text="testtesttst" + port=4242 + + script_name=`dirname $0`/../common/net_receiver.py + script_name=`realpath ${script_name}` + jname="v6t-output6_tcp_setup_success" + + epair=$(vnet_mkepair) + + vnet_mkjail ${jname}a ${epair}a + jexec ${jname}a ifconfig ${epair}a up + jexec ${jname}a ifconfig ${epair}a inet6 ${ip_src}/${plen} + + vnet_mkjail ${jname}b ${epair}b + jexec ${jname}b ifconfig ${epair}b up + + jexec ${jname}b ifconfig ${epair}b inet6 ${ip_dst}/${plen} + + # wait for DAD to complete + while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + + # run listener + args="--family inet6 --ports ${port} --match_str ${text}" + echo jexec ${jname}b ${script_name} ${args} + jexec ${jname}b ${script_name} --test_name "test_listen_tcp" ${args} & + cmd_pid=$! + + # wait for the script init + counter=0 + while [ `jexec ${jname}b sockstat -6qlp ${port} | wc -l` != "1" ]; do + sleep 0.01 + counter=$((counter+1)) + if [ ${counter} -ge 50 ]; then break; fi + done + if [ `jexec ${jname}b sockstat -6qlp ${port} | wc -l` != "1" ]; then + echo "App setup failed" + exit 1 + fi + + # run sender + echo -n "${text}" | jexec ${jname}a nc -N ${ip_dst} ${port} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "sender exit code $exit_code" ; fi + + wait ${cmd_pid} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi +} + +output6_tcp_setup_success_cleanup() +{ + vnet_cleanup +} + + +atf_test_case "output6_udp_setup_success" "cleanup" +output6_udp_setup_success_head() +{ + + atf_set descr 'Test valid IPv6 UDP output' + atf_set require.user root +} + +output6_udp_setup_success_body() +{ + + vnet_init + + net_src="2001:db8:0:0:1::" + net_dst="2001:db8:0:0:1::" + ip_src="${net_src}1" + ip_dst=${net_dst}4242 + plen=64 + text="testtesttst" + port=4242 + + script_name=`dirname $0`/../common/net_receiver.py + script_name=`realpath ${script_name}` + jname="v6t-output6_udp_setup_success" + + epair=$(vnet_mkepair) + + vnet_mkjail ${jname}a ${epair}a + jexec ${jname}a ifconfig ${epair}a up + jexec ${jname}a ifconfig ${epair}a inet6 ${ip_src}/${plen} + + vnet_mkjail ${jname}b ${epair}b + jexec ${jname}b ifconfig ${epair}b up + jexec ${jname}b ifconfig ${epair}b inet6 ${ip_dst}/${plen} + + # wait for DAD to complete + while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + + # run listener + args="--family inet6 --ports ${port} --match_str ${text}" + echo jexec ${jname}b ${script_name} ${args} + jexec ${jname}b ${script_name} --test_name "test_listen_udp" ${args} & + cmd_pid=$! + + # wait for the script init + counter=0 + while [ `jexec ${jname}b sockstat -6qlp ${port} | wc -l` != "1" ]; do + sleep 0.1 + counterc=$((counter+1)) + if [ ${counter} -ge 50 ]; then break; fi + done + if [ `jexec ${jname}b sockstat -6qlp ${port} | wc -l` != "1" ]; then + echo "App setup failed" + exit 1 + fi + + # run sender + # TODO: switch from nc to some alternative to avoid 1-second delay + echo -n "${text}" | jexec ${jname}a nc -uNw1 ${ip_dst} ${port} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "sender exit code $exit_code" ; fi + + wait ${cmd_pid} + exit_code=$? + if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi +} + +output6_udp_setup_success_cleanup() +{ + vnet_cleanup +} + +atf_test_case "output6_raw_success" "cleanup" +output6_raw_success_head() +{ + + atf_set descr 'Test valid IPv6 raw output' + atf_set require.user root +} + +output6_raw_success_body() +{ + + vnet_init + + net_src="2001:db8:0:0:1::" + net_dst="2001:db8:0:0:1::" + ip_src="${net_src}1" + ip_dst=${net_dst}4242 + plen=64 + + script_name=`dirname $0`/../common/net_receiver.py + script_name=`realpath ${script_name}` + jname="v6t-output6_raw_success" + + epair=$(vnet_mkepair) + + vnet_mkjail ${jname}a ${epair}a + jexec ${jname}a ifconfig ${epair}a up + jexec ${jname}a ifconfig ${epair}a inet6 ${ip_src}/${plen} + + vnet_mkjail ${jname}b ${epair}b + jexec ${jname}b ifconfig ${epair}b up + + jexec ${jname}b ifconfig ${epair}b inet6 ${ip_dst}/${plen} + + # wait for DAD to complete + while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Mar 23 14:04:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCD40263DDB; Mon, 23 Mar 2020 14:04:43 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mGNC4hpCz3N3c; Mon, 23 Mar 2020 14:04:43 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99CD5F9B2; Mon, 23 Mar 2020 14:04:43 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NE4hCS084925; Mon, 23 Mar 2020 14:04:43 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NE4h2p084923; Mon, 23 Mar 2020 14:04:43 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003231404.02NE4h2p084923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 23 Mar 2020 14:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359238 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 359238 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 14:04:43 -0000 Author: 0mp (doc,ports committer) Date: Mon Mar 23 14:04:42 2020 New Revision: 359238 URL: https://svnweb.freebsd.org/changeset/base/359238 Log: Sort UMA macros and create MLINKS for them This patch is a follow-up to r344518. Reported by: ngie Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D24165 Modified: head/share/man/man9/Makefile head/share/man/man9/sysctl.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Mar 23 12:39:18 2020 (r359237) +++ head/share/man/man9/Makefile Mon Mar 23 14:04:42 2020 (r359238) @@ -2049,6 +2049,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_ADD_UAUTO.9 \ sysctl.9 SYSCTL_ADD_UINT.9 \ sysctl.9 SYSCTL_ADD_ULONG.9 \ + sysctl.9 SYSCTL_ADD_UMA_CUR.9 \ + sysctl.9 SYSCTL_ADD_UMA_MAX.9 \ sysctl.9 SYSCTL_ADD_UQUAD.9 \ sysctl.9 SYSCTL_CHILDREN.9 \ sysctl.9 SYSCTL_STATIC_CHILDREN.9 \ @@ -2077,6 +2079,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_U64.9 \ sysctl.9 SYSCTL_UINT.9 \ sysctl.9 SYSCTL_ULONG.9 \ + sysctl.9 SYSCTL_UMA_CUR.9 \ + sysctl.9 SYSCTL_UMA_MAX.9 \ sysctl.9 SYSCTL_UQUAD.9 MLINKS+=sysctl_add_oid.9 sysctl_move_oid.9 \ sysctl_add_oid.9 sysctl_remove_oid.9 \ Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Mon Mar 23 12:39:18 2020 (r359237) +++ head/share/man/man9/sysctl.9 Mon Mar 23 14:04:42 2020 (r359238) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2019 +.Dd March 23, 2020 .Dt SYSCTL 9 .Os .Sh NAME @@ -58,9 +58,9 @@ .Nm SYSCTL_ADD_UAUTO , .Nm SYSCTL_ADD_UINT , .Nm SYSCTL_ADD_ULONG , -.Nm SYSCTL_ADD_UQUAD , .Nm SYSCTL_ADD_UMA_CUR , .Nm SYSCTL_ADD_UMA_MAX , +.Nm SYSCTL_ADD_UQUAD , .Nm SYSCTL_CHILDREN , .Nm SYSCTL_STATIC_CHILDREN , .Nm SYSCTL_NODE_CHILDREN , @@ -94,9 +94,9 @@ .Nm SYSCTL_U64 , .Nm SYSCTL_UINT , .Nm SYSCTL_ULONG , -.Nm SYSCTL_UQUAD , .Nm SYSCTL_UMA_CUR , .Nm SYSCTL_UMA_MAX +.Nm SYSCTL_UQUAD , .Nd Dynamic and static sysctl MIB creation functions .Sh SYNOPSIS .In sys/param.h From owner-svn-src-head@freebsd.org Mon Mar 23 14:11:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D2D1264089; Mon, 23 Mar 2020 14:11:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mGXP6qfzz42xr; Mon, 23 Mar 2020 14:11:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E48B4FB74; Mon, 23 Mar 2020 14:11:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NEBn5E089873; Mon, 23 Mar 2020 14:11:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NEBn4J089872; Mon, 23 Mar 2020 14:11:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003231411.02NEBn4J089872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 23 Mar 2020 14:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359239 - head/sbin/setkey X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/sbin/setkey X-SVN-Commit-Revision: 359239 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 14:11:50 -0000 Author: bapt Date: Mon Mar 23 14:11:49 2020 New Revision: 359239 URL: https://svnweb.freebsd.org/changeset/base/359239 Log: Revove useless linking to yacc Modified: head/sbin/setkey/Makefile Modified: head/sbin/setkey/Makefile ============================================================================== --- head/sbin/setkey/Makefile Mon Mar 23 14:04:42 2020 (r359238) +++ head/sbin/setkey/Makefile Mon Mar 23 14:11:49 2020 (r359239) @@ -37,7 +37,7 @@ WARNS?= 1 CFLAGS+= -I${.CURDIR} -I${SRCTOP}/lib/libipsec YFLAGS= -d -LIBADD= l y +LIBADD= l CLEANFILES= y.tab.c y.tab.h key_test.o keytest From owner-svn-src-head@freebsd.org Mon Mar 23 14:33:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C36B264AAF; Mon, 23 Mar 2020 14:33:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mH1Q2m38z4XxY; Mon, 23 Mar 2020 14:33:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59FABFF69; Mon, 23 Mar 2020 14:33:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NEXU3K003129; Mon, 23 Mar 2020 14:33:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NEXUdm003128; Mon, 23 Mar 2020 14:33:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003231433.02NEXUdm003128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 23 Mar 2020 14:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359240 - head/sys/dev/aic7xxx/aicasm X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/sys/dev/aic7xxx/aicasm X-SVN-Commit-Revision: 359240 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 14:33:30 -0000 Author: bapt Date: Mon Mar 23 14:33:29 2020 New Revision: 359240 URL: https://svnweb.freebsd.org/changeset/base/359240 Log: Remove unneeded dependency on libl Modified: head/sys/dev/aic7xxx/aicasm/Makefile Modified: head/sys/dev/aic7xxx/aicasm/Makefile ============================================================================== --- head/sys/dev/aic7xxx/aicasm/Makefile Mon Mar 23 14:11:49 2020 (r359239) +++ head/sys/dev/aic7xxx/aicasm/Makefile Mon Mar 23 14:33:29 2020 (r359240) @@ -13,7 +13,6 @@ GENHDRS= aicasm_gram.h aicasm_macro_gram.h SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSRCS} CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g} -LIBADD= l WARNS?= 0 # Correct path for kernel builds From owner-svn-src-head@freebsd.org Mon Mar 23 14:37:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A70A0264C09; Mon, 23 Mar 2020 14:37:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mH5T422mz4b3v; Mon, 23 Mar 2020 14:37:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8279AFF6F; Mon, 23 Mar 2020 14:37:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NEb1Sn003334; Mon, 23 Mar 2020 14:37:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NEb1QM003332; Mon, 23 Mar 2020 14:37:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003231437.02NEb1QM003332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 23 Mar 2020 14:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359241 - head/sbin/setkey X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/sbin/setkey X-SVN-Commit-Revision: 359241 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 14:37:01 -0000 Author: bapt Date: Mon Mar 23 14:37:00 2020 New Revision: 359241 URL: https://svnweb.freebsd.org/changeset/base/359241 Log: Remove the link to libl which only contains a stub function on yywrap, if the flex is told yywrap is not in use, then this linkage becomes unnecessary Modified: head/sbin/setkey/Makefile head/sbin/setkey/token.l Modified: head/sbin/setkey/Makefile ============================================================================== --- head/sbin/setkey/Makefile Mon Mar 23 14:33:29 2020 (r359240) +++ head/sbin/setkey/Makefile Mon Mar 23 14:37:00 2020 (r359241) @@ -37,8 +37,6 @@ WARNS?= 1 CFLAGS+= -I${.CURDIR} -I${SRCTOP}/lib/libipsec YFLAGS= -d -LIBADD= l - CLEANFILES= y.tab.c y.tab.h key_test.o keytest # libpfkey Modified: head/sbin/setkey/token.l ============================================================================== --- head/sbin/setkey/token.l Mon Mar 23 14:33:29 2020 (r359240) +++ head/sbin/setkey/token.l Mon Mar 23 14:37:00 2020 (r359241) @@ -67,6 +67,8 @@ int parse(FILE **); int yyparse(void); %} +%option noyywrap + /* common section */ nl \n ws [ \t]+ From owner-svn-src-head@freebsd.org Mon Mar 23 14:44:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C097265193; Mon, 23 Mar 2020 14:44:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mHG204YQz3Fnp; Mon, 23 Mar 2020 14:44:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 616851815A; Mon, 23 Mar 2020 14:44:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NEiOBA009107; Mon, 23 Mar 2020 14:44:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NEiOW0009106; Mon, 23 Mar 2020 14:44:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003231444.02NEiOW0009106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 23 Mar 2020 14:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359242 - head/usr.sbin/tcpdump/tcpdump X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/tcpdump/tcpdump X-SVN-Commit-Revision: 359242 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 14:44:27 -0000 Author: bapt Date: Mon Mar 23 14:44:23 2020 New Revision: 359242 URL: https://svnweb.freebsd.org/changeset/base/359242 Log: Remove useless linking to libl Modified: head/usr.sbin/tcpdump/tcpdump/Makefile Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Mon Mar 23 14:37:00 2020 (r359241) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Mon Mar 23 14:44:23 2020 (r359242) @@ -186,7 +186,7 @@ CFLAGS+= -DINET6 -DHAVE_OS_IPV6_SUPPORT CFLAGS+= -DLBL_ALIGN .endif -LIBADD= l pcap +LIBADD= pcap .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_dns From owner-svn-src-head@freebsd.org Mon Mar 23 14:53:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 414F02655AE; Mon, 23 Mar 2020 14:53:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mHT001sKz3xkr; Mon, 23 Mar 2020 14:53:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCA1C18344; Mon, 23 Mar 2020 14:53:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NErtaQ015214; Mon, 23 Mar 2020 14:53:55 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NErtUL015213; Mon, 23 Mar 2020 14:53:55 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003231453.02NErtUL015213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 23 Mar 2020 14:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359243 - head/tools/bsdbox X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/tools/bsdbox X-SVN-Commit-Revision: 359243 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 14:53:56 -0000 Author: kevans Date: Mon Mar 23 14:53:55 2020 New Revision: 359243 URL: https://svnweb.freebsd.org/changeset/base/359243 Log: bsdbox: remove useless linking against libl All is good without it; just remove it. Requested by: bapt Modified: head/tools/bsdbox/Makefile Modified: head/tools/bsdbox/Makefile ============================================================================== --- head/tools/bsdbox/Makefile Mon Mar 23 14:44:23 2020 (r359242) +++ head/tools/bsdbox/Makefile Mon Mar 23 14:53:55 2020 (r359243) @@ -57,7 +57,7 @@ CRUNCH_SRCDIRS+= bin # statically - and that ends very badly. CRUNCH_SHLIBS+= -lc -lutil -lcrypt -lxo -lgpio CRUNCH_LIBS+= -lkvm -lmemstat -lnetgraph -CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcapw +CRUNCH_LIBS+= -lcrypt -ledit -ltermcapw ################################################################### # Programs from standard /sbin From owner-svn-src-head@freebsd.org Mon Mar 23 15:27:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18C07265FB4; Mon, 23 Mar 2020 15:27:12 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mJCM6xbXz4fVY; Mon, 23 Mar 2020 15:27:11 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9BD1188E4; Mon, 23 Mar 2020 15:27:11 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NFRBjK033166; Mon, 23 Mar 2020 15:27:11 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NFRBso033162; Mon, 23 Mar 2020 15:27:11 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202003231527.02NFRBso033162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 23 Mar 2020 15:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359244 - in head: libexec/rc libexec/rc/rc.d share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head: libexec/rc libexec/rc/rc.d share/man/man5 X-SVN-Commit-Revision: 359244 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 15:27:12 -0000 Author: melifaro Date: Mon Mar 23 15:27:10 2020 New Revision: 359244 URL: https://svnweb.freebsd.org/changeset/base/359244 Log: Make ICMP redirect processing depend on routing daemon. Submitted by: lutz at donnerhacke.de Reviewed by: melifaro,rgrimes Differential Revision: https://reviews.freebsd.org/D23329 Modified: head/libexec/rc/rc.conf head/libexec/rc/rc.d/routed head/libexec/rc/rc.d/routing head/share/man/man5/rc.conf.5 Modified: head/libexec/rc/rc.conf ============================================================================== --- head/libexec/rc/rc.conf Mon Mar 23 14:53:55 2020 (r359243) +++ head/libexec/rc/rc.conf Mon Mar 23 15:27:10 2020 (r359244) @@ -235,7 +235,7 @@ log_in_vain="0" # >=1 to log connects to ports w/o l tcp_keepalive="YES" # Enable stale TCP connection timeout (or NO). tcp_drop_synfin="NO" # Set to YES to drop TCP packets with SYN+FIN # NOTE: this violates the TCP specification -icmp_drop_redirect="NO" # Set to YES to ignore ICMP REDIRECT packets +icmp_drop_redirect="auto" # Set to YES to ignore ICMP REDIRECT packets icmp_log_redirect="NO" # Set to YES to log ICMP REDIRECT packets network_interfaces="auto" # List of network interfaces (or "auto"). cloned_interfaces="" # List of cloned network interfaces to create. Modified: head/libexec/rc/rc.d/routed ============================================================================== --- head/libexec/rc/rc.d/routed Mon Mar 23 14:53:55 2020 (r359243) +++ head/libexec/rc/rc.d/routed Mon Mar 23 15:27:10 2020 (r359244) @@ -3,7 +3,7 @@ # $FreeBSD$ # -# PROVIDE: routed +# PROVIDE: routed dynamicrouting # REQUIRE: netif routing # BEFORE: NETWORK # KEYWORD: nojailvnet Modified: head/libexec/rc/rc.d/routing ============================================================================== --- head/libexec/rc/rc.d/routing Mon Mar 23 14:53:55 2020 (r359243) +++ head/libexec/rc/rc.d/routing Mon Mar 23 15:27:10 2020 (r359244) @@ -292,8 +292,29 @@ ropts_init() fi } +_check_dynamicrouting() +{ + local skip file name rcvar + + # copied from /etc/rc + skip="-s nostart" + if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then + skip="$skip -s nojail" + fi + [ -n "$local_startup" ] && find_local_scripts_new + + for file in $( rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null | + xargs grep -lE '^# PROVIDE:.*\' ); do + (set -- enabled; . $file) && return 0; + done + + return 1 +} + options_inet() { + local _icmp_drop_redirect + _ropts_initdone= if checkyesno icmp_bmcastecho; then ropts_init inet @@ -303,7 +324,17 @@ options_inet() ${SYSCTL} net.inet.icmp.bmcastecho=0 > /dev/null fi - if checkyesno icmp_drop_redirect; then + _icmp_drop_redirect="${icmp_drop_redirect}" + case "${_icmp_drop_redirect}" in + [Aa][Uu][Tt][Oo] | "") + if _check_dynamicrouting; then + _icmp_drop_redirect="yes" + else + _icmp_drop_redirect="no" + fi + ;; + esac + if checkyesno _icmp_drop_redirect; then ropts_init inet echo -n ' ignore ICMP redirect=YES' ${SYSCTL} net.inet.icmp.drop_redirect=1 > /dev/null Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Mar 23 14:53:55 2020 (r359243) +++ head/share/man/man5/rc.conf.5 Mon Mar 23 15:27:10 2020 (r359244) @@ -1182,11 +1182,19 @@ break some legitimate applications. .It Va icmp_drop_redirect .Pq Vt bool Set to -.Dq Li NO -by default. +.Dq Li AUTO +by default. This setting will be identical to +.Dq Li YES , +if a dynamicrouting daemon is enabled, because redirect processing may +cause perfomance issues for large routing tables. If no such service +is enabled, this setting behaves like a +.Dq Li NO . Setting to .Dq Li YES will cause the kernel to ignore ICMP REDIRECT packets. +Setting to +.Dq Li NO +will cause the kernel to process ICMP REDIRECT packets. Refer to .Xr icmp 4 for more information. From owner-svn-src-head@freebsd.org Mon Mar 23 15:39:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57D9D266570; Mon, 23 Mar 2020 15:39:43 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mJTq1bQ3z3MN7; Mon, 23 Mar 2020 15:39:43 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D46318B14; Mon, 23 Mar 2020 15:39:43 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NFdhqg039183; Mon, 23 Mar 2020 15:39:43 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NFdhbQ039182; Mon, 23 Mar 2020 15:39:43 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003231539.02NFdhbQ039182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 23 Mar 2020 15:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359245 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359245 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 15:39:43 -0000 Author: 0mp (doc,ports committer) Date: Mon Mar 23 15:39:42 2020 New Revision: 359245 URL: https://svnweb.freebsd.org/changeset/base/359245 Log: Start sentences from new lines Also, bump date after 359244. Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Mar 23 15:27:10 2020 (r359244) +++ head/share/man/man5/rc.conf.5 Mon Mar 23 15:39:42 2020 (r359245) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 9, 2020 +.Dd March 23, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -1183,11 +1183,12 @@ break some legitimate applications. .Pq Vt bool Set to .Dq Li AUTO -by default. This setting will be identical to +by default. +This setting will be identical to .Dq Li YES , if a dynamicrouting daemon is enabled, because redirect processing may -cause perfomance issues for large routing tables. If no such service -is enabled, this setting behaves like a +cause perfomance issues for large routing tables. +If no such service is enabled, this setting behaves like a .Dq Li NO . Setting to .Dq Li YES @@ -1673,7 +1674,8 @@ This static setting may be overridden by commands started with dynamic interface configuration utilities like .Xr dhclient 8 -hooks. The description can be seen with +hooks. +The description can be seen with .Xr ifconfig 8 command and it may be exported with .Xr bsnmpd 1 From owner-svn-src-head@freebsd.org Mon Mar 23 16:02:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 650B9266E9E; Mon, 23 Mar 2020 16:02:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mJzZ1kHRz4GYg; Mon, 23 Mar 2020 16:02:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33C471907D; Mon, 23 Mar 2020 16:02:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NG22DJ054550; Mon, 23 Mar 2020 16:02:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NG22Gi054549; Mon, 23 Mar 2020 16:02:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003231602.02NG22Gi054549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Mar 2020 16:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359246 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 359246 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 16:02:02 -0000 Author: imp Date: Mon Mar 23 16:02:01 2020 New Revision: 359246 URL: https://svnweb.freebsd.org/changeset/base/359246 Log: Document when execl and execp entered unix. For this, things are complicated. The first mention in the manual was in the 4th edition manual (as an add on to exec(II)). The 2nd and 3rd editions didn't have these in the manual (either as a separate page, or as an add-on to exec(II)). We don't have good 1st, 2nd or 3rd edition distributions to look in. However, there's a tape labeled 'last1120c' that we do have. This tape contains the last version of the V2 edition of the C compiler on it (just after C got struct). On this tape there was a libc.sa archive that contains source for execl and execp. This source is sufficiently different from the V5 sources (which are the next ones we have sources for) and have a slightly different calling convention than later sources, suggesting that the early date for the last1120c tape is correct (in that era, the epoch changed every year, leading to a one or two year ambiguity on when the files could have been modified) and it should be though of as V2. Since this was also a time of compiler development, and the calling convetions are known to be under evolution, and since the rest of the sources in libc.sa are consistent, that's further evidence that V2 is likely. Finally, 2nd edition was the last version to fully support the 11/20 because it lacked many basic features and bell labs moved off it to the 11/45 as soon as they could afford to buy one, around this time era. The unix manuals make it sound like V3 might have supported the 11/20, but the same intro could also be read to mean it didn't, at all, and that V3 was the first rewrite for the 11/45 ahead of the rewrite in C that came with V4. Taken together, the evidence leans most heavily to V2 (90% IMHO), and slightly to V3 (8%) or possibly V4 (2%). I've not put all this in the man page, but have left it here in case someone notices in the future that V4 is the first manual page for it. Modified: head/lib/libc/gen/exec.3 Modified: head/lib/libc/gen/exec.3 ============================================================================== --- head/lib/libc/gen/exec.3 Mon Mar 23 15:39:42 2020 (r359245) +++ head/lib/libc/gen/exec.3 Mon Mar 23 16:02:01 2020 (r359246) @@ -316,6 +316,12 @@ The function appeared in .At v1 . The +.Fn execl +and +.Fn execv +functions appeared in +.At v2 . +The .Fn execvP function first appeared in .Fx 5.2 . From owner-svn-src-head@freebsd.org Mon Mar 23 17:11:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F2A3268DA7; Mon, 23 Mar 2020 17:11:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mLWh6bpLz4cKX; Mon, 23 Mar 2020 17:11:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC9D719C3F; Mon, 23 Mar 2020 17:11:27 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NHBRGL096763; Mon, 23 Mar 2020 17:11:27 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NHBRO2096762; Mon, 23 Mar 2020 17:11:27 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003231711.02NHBRO2096762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 23 Mar 2020 17:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359247 - head/etc X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 359247 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 17:11:29 -0000 Author: brooks Date: Mon Mar 23 17:11:27 2020 New Revision: 359247 URL: https://svnweb.freebsd.org/changeset/base/359247 Log: Add the tests user, an unprivileged user from the default kyua config. This is a preparatory commit for D24103. Reviewed by: emaste Obtained from: CheriBSD MFC after: 3 days Sponsored by: DARPA Modified: head/etc/master.passwd Modified: head/etc/master.passwd ============================================================================== --- head/etc/master.passwd Mon Mar 23 16:02:01 2020 (r359246) +++ head/etc/master.passwd Mon Mar 23 17:11:27 2020 (r359247) @@ -25,4 +25,5 @@ www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/us ntpd:*:123:123::0:0:NTP Daemon:/var/db/ntp:/usr/sbin/nologin _ypldap:*:160:160::0:0:YP LDAP unprivileged user:/var/empty:/usr/sbin/nologin hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +tests:*:977:65534::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin From owner-svn-src-head@freebsd.org Mon Mar 23 17:38:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E8DC2696AE; Mon, 23 Mar 2020 17:38:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mM6j0yQHz4Ffh; Mon, 23 Mar 2020 17:38:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C2081A17B; Mon, 23 Mar 2020 17:38:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NHcKvU012758; Mon, 23 Mar 2020 17:38:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NHcKM9012755; Mon, 23 Mar 2020 17:38:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202003231738.02NHcKM9012755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 23 Mar 2020 17:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359248 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 359248 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 17:38:21 -0000 Author: trasz Date: Mon Mar 23 17:38:20 2020 New Revision: 359248 URL: https://svnweb.freebsd.org/changeset/base/359248 Log: Add STANDARDS and HISTORY to getcontext(3), makecontext(3), and ucontext(3). Obtained from: NetBSD MFC after: 2 weeks Sponsored by: DARPA Modified: head/lib/libc/gen/getcontext.3 head/lib/libc/gen/makecontext.3 head/lib/libc/gen/ucontext.3 Modified: head/lib/libc/gen/getcontext.3 ============================================================================== --- head/lib/libc/gen/getcontext.3 Mon Mar 23 17:11:27 2020 (r359247) +++ head/lib/libc/gen/getcontext.3 Mon Mar 23 17:38:20 2020 (r359248) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2013 +.Dd March 23, 2020 .Dt GETCONTEXT 3 .Os .Sh NAME @@ -148,3 +148,35 @@ No memory was available to allocate for the context or .Xr sigaltstack 2 , .Xr makecontext 3 , .Xr ucontext 3 +.Sh STANDARDS +The +.Fn getcontext +and +.Fn setcontext +functions conform to +.St -xsh5 +and +.St -p1003.1-2001 . +The +.Va errno +indications are an extension to the standard. +.Pp +The +.St -p1003.1-2004 +revision marked the functions +.Fn getcontext +and +.Fn setcontext +as obsolete, citing portability issues and recommending the use of +.Tn POSIX +threads instead. +The +.St -p1003.1-2008 +revision removed the functions from the specification. +.Sh HISTORY +The +.Fn getcontext +and +.Fn setcontext +functions first appeared in +.At V.4 . Modified: head/lib/libc/gen/makecontext.3 ============================================================================== --- head/lib/libc/gen/makecontext.3 Mon Mar 23 17:11:27 2020 (r359247) +++ head/lib/libc/gen/makecontext.3 Mon Mar 23 17:38:20 2020 (r359248) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 31, 2018 +.Dd March 23, 2020 .Dt MAKECONTEXT 3 .Os .Sh NAME @@ -123,3 +123,41 @@ to complete the operation. .Sh SEE ALSO .Xr setcontext 3 , .Xr ucontext 3 +.Sh STANDARDS +The +.Fn makecontext +and +.Fn swapcontext +functions conform to +.St -xsh5 +and +.St -p1003.1-2001 . +.Pp +The +.St -p1003.1-2004 +revision marked the functions +.Fn makecontext +and +.Fn swapcontext +as obsolete, citing portability issues and recommending the use of +.Tn POSIX +threads instead. +The +.St -p1003.1-2008 +revision removed the functions from the specification. +.Pp +.Bf -symbolic +The standard does not clearly define the type of integer arguments +passed to +.Fa func +via +.Fn makecontext ; +portable applications should not rely on the implementation detail that +it may be possible to pass pointer arguments to functions. +.Sh HISTORY +The +.Fn makecontext +and +.Fn swapcontext +functions first appeared in +.At V.4 . Modified: head/lib/libc/gen/ucontext.3 ============================================================================== --- head/lib/libc/gen/ucontext.3 Mon Mar 23 17:11:27 2020 (r359247) +++ head/lib/libc/gen/ucontext.3 Mon Mar 23 17:38:20 2020 (r359248) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2002 +.Dd March 23, 2020 .Dt UCONTEXT 3 .Os .Sh NAME @@ -109,3 +109,15 @@ structures: .Xr getcontext 3 , .Xr getcontextx 3 , .Xr makecontext 3 +.Sh STANDARDS +The +.Vt ucontext_t +type conforms to +.St -xsh5 +and +.St -p1003.1-2001 . +The +.St -p1003.1-2008 +revision removed the +.Vt ucontext_t +from the specification. From owner-svn-src-head@freebsd.org Mon Mar 23 17:51:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F00A8269E34; Mon, 23 Mar 2020 17:51:40 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mMQ45LBSz4RcX; Mon, 23 Mar 2020 17:51:40 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DB311A3C5; Mon, 23 Mar 2020 17:51:40 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NHpeCi023960; Mon, 23 Mar 2020 17:51:40 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NHpeXX023959; Mon, 23 Mar 2020 17:51:40 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202003231751.02NHpeXX023959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 23 Mar 2020 17:51:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359251 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 359251 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 17:51:41 -0000 Author: arichardson Date: Mon Mar 23 17:51:39 2020 New Revision: 359251 URL: https://svnweb.freebsd.org/changeset/base/359251 Log: Update arch.7 .Dd for r359233 Suggested by: lwhsu Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon Mar 23 17:50:00 2020 (r359250) +++ head/share/man/man7/arch.7 Mon Mar 23 17:51:39 2020 (r359251) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 8, 2020 +.Dd March 23, 2020 .Dt ARCH 7 .Os .Sh NAME From owner-svn-src-head@freebsd.org Mon Mar 23 17:51:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFA6E269E69; Mon, 23 Mar 2020 17:51:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mMQ952Pzz4Rlv; Mon, 23 Mar 2020 17:51:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B6B71A3D2; Mon, 23 Mar 2020 17:51:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NHpjAZ024011; Mon, 23 Mar 2020 17:51:45 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NHpjg6024010; Mon, 23 Mar 2020 17:51:45 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202003231751.02NHpjg6024010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 23 Mar 2020 17:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359252 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 359252 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 17:51:46 -0000 Author: arichardson Date: Mon Mar 23 17:51:44 2020 New Revision: 359252 URL: https://svnweb.freebsd.org/changeset/base/359252 Log: Fix newvers.sh on macOS 10.15 It appears that the macOS /bin/sh echo now defaults to -e and therefore the `#define VERSTR` included newline characters instead of \n. This caused compiler errors due to unterminated strings. Fix by using printf instead of echo. A less fragile solution might be to bootstrap the in-tree /bin/sh but that requires more changes. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D24136 Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Mon Mar 23 17:51:39 2020 (r359251) +++ head/sys/conf/newvers.sh Mon Mar 23 17:51:44 2020 (r359252) @@ -343,7 +343,7 @@ EOF ) vers_content_old=$(cat vers.c 2>/dev/null || true) if [ "$vers_content_new" != "$vers_content_old" ]; then - echo "$vers_content_new" > vers.c + printf "%s" "$vers_content_new" > vers.c fi echo $((v + 1)) > version From owner-svn-src-head@freebsd.org Mon Mar 23 18:14:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48F0726AA6C; Mon, 23 Mar 2020 18:14:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mMvy05C3z3QGP; Mon, 23 Mar 2020 18:14:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 303801A8F3; Mon, 23 Mar 2020 18:14:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NIE4T1036493; Mon, 23 Mar 2020 18:14:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NIE447036492; Mon, 23 Mar 2020 18:14:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003231814.02NIE447036492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Mar 2020 18:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359253 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 359253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 18:14:06 -0000 Author: emaste Date: Mon Mar 23 18:14:04 2020 New Revision: 359253 URL: https://svnweb.freebsd.org/changeset/base/359253 Log: arch.7: update Default Tool Chain intro text All FreeBSD archs now use an in-tree toolchain - Clang and ELF Tool Chain everywhere, and lld everywhere but 32-bit PowerPC (which still uses ld.bfd). No archs use external toolchain by default. Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon Mar 23 17:51:44 2020 (r359252) +++ head/share/man/man7/arch.7 Mon Mar 23 18:14:04 2020 (r359253) @@ -283,17 +283,17 @@ is 8 bytes on all supported architectures except i386. .It riscv64sf Ta soft Ta soft, double precision .El .Ss Default Tool Chain -.Fx uses a variety of tool chain components for the supported CPU -architectures: +.Fx +uses .Xr clang 1 +as the default compiler on all supported CPU architectures, +as well as ELF Tool Chain binary utilities such as +.Xr objcopy 1 and +.Xr readelf 1 . +Most supported CPU architectures also use LLVM's .Xr ld.lld 1 -provided by the base system, -GNU -.Xr gcc 1 -and Binutils -.Xr ld 1 , -or an external toolchain compiler and linker provided by a port or package. +as the linker. This table shows the default tool chain for each architecture. .Bl -column -offset indent "Architecture" "Compiler" "Linker" .It Sy Architecture Ta Sy Compiler Ta Sy Linker From owner-svn-src-head@freebsd.org Mon Mar 23 18:17:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F182226AB35; Mon, 23 Mar 2020 18:17:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mN0P5Bm4z42QZ; Mon, 23 Mar 2020 18:17:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F19A1A8F4; Mon, 23 Mar 2020 18:17:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NIHvqk036714; Mon, 23 Mar 2020 18:17:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NIHvZf036713; Mon, 23 Mar 2020 18:17:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003231817.02NIHvZf036713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Mar 2020 18:17:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359254 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 359254 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 18:17:59 -0000 Author: emaste Date: Mon Mar 23 18:17:56 2020 New Revision: 359254 URL: https://svnweb.freebsd.org/changeset/base/359254 Log: arch.7: remove Default Tool Chain footnote about xtoolchain MIPS was the last arch to use external toolchain by default but uses in-tree Clang and lld as of r359233, and now no table entries reference the footnote. Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon Mar 23 18:14:04 2020 (r359253) +++ head/share/man/man7/arch.7 Mon Mar 23 18:17:56 2020 (r359254) @@ -317,8 +317,6 @@ This table shows the default tool chain for each archi .It riscv64 Ta Clang Ta lld .It riscv64sf Ta Clang Ta lld .El -.Pp -(1) External toolchain provided by ports/packages. .Ss MACHINE_ARCH vs MACHINE_CPUARCH vs MACHINE .Dv MACHINE_CPUARCH should be preferred in Makefiles when the generic From owner-svn-src-head@freebsd.org Mon Mar 23 18:26:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B87026ADCA; Mon, 23 Mar 2020 18:26:25 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mNB860KSz4CJF; Mon, 23 Mar 2020 18:26:24 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB9011AAB8; Mon, 23 Mar 2020 18:26:24 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NIQO1V042996; Mon, 23 Mar 2020 18:26:24 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NIQO52042994; Mon, 23 Mar 2020 18:26:24 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003231826.02NIQO52042994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 23 Mar 2020 18:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359255 - in head: contrib/lutok lib lib/liblutok share/mk X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: contrib/lutok lib lib/liblutok share/mk X-SVN-Commit-Revision: 359255 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 18:26:25 -0000 Author: brooks Date: Mon Mar 23 18:26:23 2020 New Revision: 359255 URL: https://svnweb.freebsd.org/changeset/base/359255 Log: Add liblutok a lightweight C++ API for lua. It is added an INTERNALLIB and not installed. It will be used by kyua. This is a preparatory commit for D24103. Reviewed by: emaste Obtained from: CheriBSD Sponsored by: DARPA Added: head/contrib/lutok/ - copied from r359045, vendor/lutok/dist/ head/lib/liblutok/ head/lib/liblutok/Makefile (contents, props changed) Modified: head/lib/Makefile head/share/mk/src.libnames.mk Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Mar 23 18:17:56 2020 (r359254) +++ head/lib/Makefile Mon Mar 23 18:26:23 2020 (r359255) @@ -205,6 +205,7 @@ SUBDIR.${MK_RADIUS_SUPPORT}+= libradius SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil SUBDIR.${MK_TELNET}+= libtelnet SUBDIR.${MK_TESTS_SUPPORT}+= atf +SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= liblutok SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_UNBOUND}+= libunbound SUBDIR.${MK_USB}+= libusbhid libusb Added: head/lib/liblutok/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/liblutok/Makefile Mon Mar 23 18:26:23 2020 (r359255) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +LIB_CXX= lutok +INTERNALLIB= + +LIBADD= lua + +.PATH: ${SRCTOP}/contrib/lutok +SRCS= c_gate.cpp \ + debug.cpp \ + exceptions.cpp \ + operations.cpp \ + stack_cleaner.cpp \ + state.cpp + +CFLAGS+= -I${SRCTOP}/contrib/lutok/include \ + -I${SRCTOP}/lib/liblua \ + -I${SRCTOP}/contrib/lua/src + +WARNS?= 3 +SHLIB_MAJOR= 0 + +# lutok uses auto_ptr +CFLAGS+= -Wno-deprecated-declarations + +.include Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Mar 23 18:17:56 2020 (r359254) +++ head/share/mk/src.libnames.mk Mon Mar 23 18:26:23 2020 (r359255) @@ -42,6 +42,7 @@ _INTERNALLIBS= \ ipf \ lpr \ lua \ + lutok \ netbsd \ ntp \ ntpevent \ @@ -295,6 +296,7 @@ _DP_magic= z _DP_mt= sbuf bsdxml _DP_ldns= ssl crypto _DP_lua= m +_DP_lutok= lua .if ${MK_OPENSSL} != "no" _DP_fetch= ssl crypto .else @@ -472,6 +474,9 @@ LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a + +LIBLUTOKDIR= ${_LIB_OBJTOP}/lib/liblutok +LIBLUTOK?= ${LIBLUTOKDIR}/liblutok${PIE_SUFFIX}.a LIBPEDIR= ${_LIB_OBJTOP}/lib/libpe LIBPE?= ${LIBPEDIR}/libpe${PIE_SUFFIX}.a From owner-svn-src-head@freebsd.org Mon Mar 23 19:01:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDB7026BAE5; Mon, 23 Mar 2020 19:01:27 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mNyb5r8Xz3N2t; Mon, 23 Mar 2020 19:01:27 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8C921B1AF; Mon, 23 Mar 2020 19:01:27 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NJ1R2w063608; Mon, 23 Mar 2020 19:01:27 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NJ1OLX063587; Mon, 23 Mar 2020 19:01:24 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003231901.02NJ1OLX063587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 23 Mar 2020 19:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin/kyua X-SVN-Commit-Revision: 359260 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 19:01:27 -0000 Author: brooks Date: Mon Mar 23 19:01:23 2020 New Revision: 359260 URL: https://svnweb.freebsd.org/changeset/base/359260 Log: Import the kyua test framework. Having kyua in the base system will simplify automated testing in CI and eliminates bootstrapping issues on new platforms. The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. Reviewed by: emaste Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24103 Added: head/contrib/kyua/ - copied from r359255, vendor/kyua/dist/ head/lib/kyua/ head/lib/kyua/Makefile (contents, props changed) head/lib/kyua/Makefile.inc (contents, props changed) head/lib/kyua/Makefile.kyua (contents, props changed) head/lib/kyua/cli/ head/lib/kyua/cli/Makefile (contents, props changed) head/lib/kyua/config.h (contents, props changed) head/lib/kyua/drivers/ head/lib/kyua/drivers/Makefile (contents, props changed) head/lib/kyua/engine/ head/lib/kyua/engine/Makefile (contents, props changed) head/lib/kyua/model/ head/lib/kyua/model/Makefile (contents, props changed) head/lib/kyua/store/ head/lib/kyua/store/Makefile (contents, props changed) head/lib/kyua/utils/ head/lib/kyua/utils/Makefile (contents, props changed) head/lib/kyua/utils/defs.hpp (contents, props changed) head/usr.bin/kyua/ head/usr.bin/kyua/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.root.dist head/etc/mtree/BSD.usr.dist head/lib/Makefile head/share/mk/src.libnames.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Mon Mar 23 18:52:57 2020 (r359259) +++ head/etc/mtree/BSD.root.dist Mon Mar 23 19:01:23 2020 (r359260) @@ -54,6 +54,8 @@ .. gss .. + kyua + .. mail .. mtree Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Mon Mar 23 18:52:57 2020 (r359259) +++ head/etc/mtree/BSD.usr.dist Mon Mar 23 19:01:23 2020 (r359260) @@ -313,6 +313,8 @@ .. .. .. + kyua + .. libusb20 .. libvgl @@ -448,6 +450,12 @@ .. trusted tags=package=runtime .. + .. + .. + kyua + misc + .. + store .. .. locale Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Mar 23 18:52:57 2020 (r359259) +++ head/lib/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -205,6 +205,7 @@ SUBDIR.${MK_RADIUS_SUPPORT}+= libradius SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil SUBDIR.${MK_TELNET}+= libtelnet SUBDIR.${MK_TESTS_SUPPORT}+= atf +SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= kyua SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= liblutok SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_UNBOUND}+= libunbound Added: head/lib/kyua/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +SUBDIR= cli \ + drivers \ + engine \ + model \ + store \ + utils + +.include Added: head/lib/kyua/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/Makefile.inc Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +KYUA_LIBDIR:= ${.PARSEDIR} + +.include "${KYUA_LIBDIR}/Makefile.kyua" + +LIB_CXX= kyua_${KYUA_LIB} +INTERNALLIB= + +.PATH: ${KYUA_SRCDIR}/${KYUA_LIB} +CFLAGS+= -I${KYUA_LIBDIR} \ + -I${KYUA_SRCDIR} \ + -I${SRCTOP}/contrib/lutok/include + +CFLAGS+= -DHAVE_CONFIG_H + +# kyua uses auto_ptr +CFLAGS+= -Wno-deprecated-declarations + +.include "${.PARSEDIR}/../Makefile.inc" Added: head/lib/kyua/Makefile.kyua ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/Makefile.kyua Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +KYUA_VERSION= 0.13 + +KYUA_CONFDIR= /etc/kyua +KYUA_DOCDIR= /nonexistant +KYUA_EGDIR= /usr/share/examples/kyua +KYUA_MISCDIR= /usr/share/kyua/misc +KYUA_STOREDIR= /usr/share/kyua/store + +KYUA_SRCDIR= ${SRCTOP}/contrib/kyua Added: head/lib/kyua/cli/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/cli/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +KYUA_LIB= cli +INTERNALLIB= +CFLAGS+= -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ + -DKYUA_DOCDIR=\"${KYUA_CONFDIR}\" \ + -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ + -DPACKAGE=\"kyua\" \ + -DPACKAGE_NAME=\"Kyua\" \ + -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ + -DVERSION=\"${KYUA_VERSION}\" + +SRCS= cmd_about.cpp \ + cmd_config.cpp \ + cmd_db_exec.cpp \ + cmd_db_migrate.cpp \ + cmd_debug.cpp \ + cmd_help.cpp \ + cmd_list.cpp \ + cmd_report.cpp \ + cmd_report_html.cpp \ + cmd_report_junit.cpp \ + cmd_test.cpp \ + common.cpp \ + config.cpp \ + main.cpp + +.include Added: head/lib/kyua/config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/config.h Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,122 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to the optind value to reset getopt processing */ +#define GETOPT_OPTIND_RESET_VALUE 1 + +/* Define to 1 if getcwd(NULL, 0) works */ +#define HAVE_GETCWD_DYN 1 + +/* Define to 1 if getopt allows a + sign for POSIX behavior */ +/* #undef HAVE_GETOPT_GNU */ + +/* Define to 1 if getopt has optreset */ +#define HAVE_GETOPT_WITH_OPTRESET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `statfs' function. */ +#define HAVE_STATFS 1 + +/* Define to 1 if you have the `statvfs' function. */ +#define HAVE_STATVFS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `sysctlbyname' function. */ +#define HAVE_SYSCTLBYNAME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STATVFS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unmount' function. */ +#define HAVE_UNMOUNT 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if your lchmod works */ +#define HAVE_WORKING_LCHMOD 1 + +/* Define to the last valid signal number */ +#define LAST_SIGNO 128 + +/* Define to the name of the sysctl MIB */ +#define MEMORY_QUERY_SYSCTL_MIB "hw.usermem" + +/* Define to the memory query type */ +#define MEMORY_QUERY_TYPE "sysctlbyname" + +/* Name of package */ +#define PACKAGE "kyua" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "kyua-discuss@googlegroups.com" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "Kyua" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "Kyua 0.13" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "kyua" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://github.com/jmmv/kyua/" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.13" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Set to the path of umount(8) */ +/* #undef UMOUNT */ + +/* Version number of package */ +#define VERSION "0.13" Added: head/lib/kyua/drivers/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/drivers/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +KYUA_LIB= drivers + +SRCS= debug_test.cpp \ + list_tests.cpp \ + report_junit.cpp \ + run_tests.cpp \ + scan_results.cpp + +.include Added: head/lib/kyua/engine/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/engine/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +KYUA_LIB= engine +CFLAGS= -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ + -DKYUA_PLATFORM=\"${MACHINE}\" + +SRCS= atf.cpp \ + atf_list.cpp \ + atf_result.cpp \ + config.cpp \ + exceptions.cpp \ + filters.cpp \ + kyuafile.cpp \ + plain.cpp \ + requirements.cpp \ + scanner.cpp \ + tap.cpp \ + tap_parser.cpp \ + scheduler.cpp + +.include Added: head/lib/kyua/model/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/model/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +KYUA_LIB= model + +SRCS= context.cpp \ + exceptions.cpp \ + metadata.cpp \ + test_case.cpp \ + test_program.cpp \ + test_result.cpp + +.include Added: head/lib/kyua/store/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/store/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +KYUA_LIB= store + +CFLAGS+= -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" + +SRCS= dbtypes.cpp \ + exceptions.cpp \ + layout.cpp \ + metadata.cpp \ + migrate.cpp \ + read_backend.cpp \ + read_transaction.cpp \ + write_backend.cpp \ + write_transaction.cpp + +.include Added: head/lib/kyua/utils/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/utils/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,64 @@ +# $FreeBSD$ + +KYUA_LIB= utils + +CFLAGS+= -I${SRCTOP}/contrib/sqlite3 +CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" + +SRCS= datetime.cpp \ + env.cpp \ + memory.cpp \ + passwd.cpp \ + sanity.cpp \ + stacktrace.cpp \ + stream.cpp \ + units.cpp \ + cmdline/base_command.cpp \ + cmdline/exceptions.cpp \ + cmdline/globals.cpp \ + cmdline/options.cpp \ + cmdline/parser.cpp \ + cmdline/ui.cpp \ + cmdline/ui_mock.cpp \ + config/exceptions.cpp \ + config/keys.cpp \ + config/lua_module.cpp \ + config/nodes.cpp \ + config/parser.cpp \ + config/tree.cpp \ + format/exceptions.cpp \ + format/formatter.cpp \ + fs/auto_cleaners.cpp \ + fs/directory.cpp \ + fs/exceptions.cpp \ + fs/lua_module.cpp \ + fs/operations.cpp \ + fs/path.cpp \ + logging/operations.cpp \ + process/child.cpp \ + process/deadline_killer.cpp \ + process/exceptions.cpp \ + process/executor.cpp \ + process/fdstream.cpp \ + process/isolation.cpp \ + process/operations.cpp \ + process/status.cpp \ + process/system.cpp \ + process/systembuf.cpp \ + signals/exceptions.cpp \ + signals/interrupts.cpp \ + signals/misc.cpp \ + signals/programmer.cpp \ + signals/timer.cpp \ + sqlite/c_gate.cpp \ + sqlite/database.cpp \ + sqlite/exceptions.cpp \ + sqlite/statement.cpp \ + sqlite/transaction.cpp \ + text/exceptions.cpp \ + text/operations.cpp \ + text/regex.cpp \ + text/table.cpp \ + text/templates.cpp \ + +.include Added: head/lib/kyua/utils/defs.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/kyua/utils/defs.hpp Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,70 @@ +// Copyright 2010 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file utils/defs.hpp +/// +/// Definitions for compiler and system features autodetected at configuration +/// time. + +#if !defined(UTILS_DEFS_HPP) +#define UTILS_DEFS_HPP + + +/// Attribute to mark a function as non-returning. +#define UTILS_NORETURN __attribute__((noreturn)) + + +/// Attribute to mark a function as pure. +#define UTILS_PURE __attribute__((__pure__)) + + +/// Attribute to mark an entity as unused. +#define UTILS_UNUSED __attribute__((__unused__)) + + +/// Unconstifies a pointer. +/// +/// \param type The target type of the conversion. +/// \param ptr The pointer to be unconstified. +#define UTILS_UNCONST(type, ptr) ((type*)(unsigned long)(const void*)(ptr)) + + +/// Macro to mark a parameter as unused. +/// +/// This macro has to be called on the name of a parameter during the +/// definition (not declaration) of a function. When doing so, it declares +/// the parameter as unused to silence compiler warnings and also renames +/// the parameter by prefixing "unused_" to it. This is to ensure that the +/// developer remembers to remove the call to this macro from the parameter +/// when he actually starts using it. +/// +/// \param name The name of the function parameter to mark as unused. +#define UTILS_UNUSED_PARAM(name) unused_ ## name UTILS_UNUSED + + +#endif // !defined(UTILS_DEFS_HPP) Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Mar 23 18:52:57 2020 (r359259) +++ head/share/mk/src.libnames.mk Mon Mar 23 19:01:23 2020 (r359260) @@ -40,6 +40,12 @@ _INTERNALLIBS= \ fifolog \ ifconfig \ ipf \ + kyua_cli \ + kyua_drivers \ + kyua_engine \ + kyua_model \ + kyua_store \ + kyua_utils \ lpr \ lua \ lutok \ @@ -257,6 +263,8 @@ _DP_bsnmp= crypto _DP_geom= bsdxml sbuf _DP_cam= sbuf _DP_kvm= elf +_DP_kyua_cli= lutok kyua_utils +_DP_kyua_store= sqlite3 _DP_casper= nv _DP_cap_dns= nv _DP_cap_fileargs= nv @@ -471,6 +479,24 @@ _LIB_OBJTOP?= ${OBJTOP} # INTERNALLIB definitions. LIBELFTCDIR= ${_LIB_OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a + +LIBKYUA_CLIDIR= ${_LIB_OBJTOP}/lib/kyua/cli +LIBKYUA_CLI?= ${LIBKYUA_CLIDIR}/libkyua_cli${PIE_SUFFIX}.a + +LIBKYUA_DRIVERSDIR= ${_LIB_OBJTOP}/lib/kyua/drivers +LIBKYUA_DRIVERS?= ${LIBKYUA_DRIVERSDIR}/libkyua_drivers${PIE_SUFFIX}.a + +LIBKYUA_ENGINEDIR= ${_LIB_OBJTOP}/lib/kyua/engine +LIBKYUA_ENGINE?= ${LIBKYUA_ENGINEDIR}/libkyua_engine${PIE_SUFFIX}.a + +LIBKYUA_MODELDIR= ${_LIB_OBJTOP}/lib/kyua/model +LIBKYUA_MODEL?= ${LIBKYUA_MODELDIR}/libkyua_model${PIE_SUFFIX}.a + +LIBKYUA_STOREDIR= ${_LIB_OBJTOP}/lib/kyua/store +LIBKYUA_STORE?= ${LIBKYUA_STOREDIR}/libkyua_store${PIE_SUFFIX}.a + +LIBKYUA_UTILSDIR= ${_LIB_OBJTOP}/lib/kyua/utils +LIBKYUA_UTILS?= ${LIBKYUA_UTILSDIR}/libkyua_utils${PIE_SUFFIX}.a LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 23 18:52:57 2020 (r359259) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 23 19:01:23 2020 (r359260) @@ -8865,6 +8865,7 @@ OLD_FILES+=${TESTS_FILES} .endif # Test suite. .if ${MK_TESTS_SUPPORT} == no +OLD_FILES+=usr/bin/kyua OLD_FILES+=usr/include/atf-c++.hpp OLD_FILES+=usr/include/atf-c++/build.hpp OLD_FILES+=usr/include/atf-c++/check.hpp @@ -8881,12 +8882,36 @@ OLD_FILES+=usr/include/atf-c/macros.h OLD_FILES+=usr/include/atf-c/tc.h OLD_FILES+=usr/include/atf-c/tp.h OLD_FILES+=usr/include/atf-c/utils.h +OLD_FILES+=usr/lib/debug/usr/bin/kyua.debug OLD_LIBS+=usr/lib/private/libatf-c++.so.2 OLD_LIBS+=usr/lib/private/libatf-c.so.1 +OLD_FILES+=usr/share/examples/kyua/kyua.conf +OLD_FILES+=usr/share/examples/kyua/Kyuafile.top +OLD_FILES+=usr/share/kyua/misc/context.html +OLD_FILES+=usr/share/kyua/misc/index.html +OLD_FILES+=usr/share/kyua/misc/report.css +OLD_FILES+=usr/share/kyua/misc/test_result.html +OLD_FILES+=usr/share/kyua/store/migrate_v1_v2.sql +OLD_FILES+=usr/share/kyua/store/migrate_v2_v3.sql +OLD_FILES+=usr/share/kyua/store/schema_v3.sql +OLD_FILES+=usr/share/man/man1/kyua-about.1.gz +OLD_FILES+=usr/share/man/man1/kyua-config.1.gz +OLD_FILES+=usr/share/man/man1/kyua-db-exec.1.gz +OLD_FILES+=usr/share/man/man1/kyua-db-migrate.1.gz +OLD_FILES+=usr/share/man/man1/kyua-debug.1.gz +OLD_FILES+=usr/share/man/man1/kyua-help.1.gz +OLD_FILES+=usr/share/man/man1/kyua-list.1.gz +OLD_FILES+=usr/share/man/man1/kyua-report-html.1.gz +OLD_FILES+=usr/share/man/man1/kyua-report-junit.1.gz +OLD_FILES+=usr/share/man/man1/kyua-report.1.gz +OLD_FILES+=usr/share/man/man1/kyua-test.1.gz +OLD_FILES+=usr/share/man/man1/kyua.1.gz OLD_FILES+=usr/share/man/man3/atf-c++.3.gz OLD_FILES+=usr/share/man/man3/atf-c-api++.3.gz OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz OLD_FILES+=usr/share/man/man3/atf-c.3.gz +OLD_FILES+=usr/share/man/man5/kyua.conf.5.gz +OLD_FILES+=usr/share/man/man5/kyuafile.5.gz OLD_FILES+=usr/tests/lib/atf/Kyuafile OLD_FILES+=usr/tests/lib/atf/libatf-c++/Kyuafile OLD_FILES+=usr/tests/lib/atf/libatf-c++/atf_c++_test Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Mar 23 18:52:57 2020 (r359259) +++ head/usr.bin/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -246,6 +246,7 @@ SUBDIR.${MK_QUOTAS}+= quota SUBDIR.${MK_SENDMAIL}+= vacation SUBDIR.${MK_TALK}+= talk SUBDIR.${MK_TELNET}+= telnet +SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= kyua SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_TEXTPROC}+= ul SUBDIR.${MK_TFTP}+= tftp Added: head/usr.bin/kyua/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/kyua/Makefile Mon Mar 23 19:01:23 2020 (r359260) @@ -0,0 +1,64 @@ +# $FreeBSD$ + +.include "${SRCTOP}/lib/kyua/Makefile.kyua" + +.PATH: ${KYUA_SRCDIR} + +PROG_CXX= kyua +SRCS= main.cpp +LIBADD= kyua_cli kyua_drivers kyua_engine kyua_model kyua_store + +MAN= kyua-about.1 \ + kyua-config.1 \ + kyua-db-exec.1 \ + kyua-db-migrate.1 \ + kyua-debug.1 \ + kyua-help.1 \ + kyua-list.1 \ + kyua-report-html.1 \ + kyua-report-junit.1 \ + kyua-report.1 \ + kyua-test.1 \ + kyua.1 \ + kyua.conf.5 \ + kyuafile.5 + +CFLAGS+= -I${KYUA_SRCDIR} + +# kyua uses auto_ptr +CFLAGS+= -Wno-deprecated-declarations + +FILESGROUPS= EXAMPLES MISC STORE + +CONFS= kyua.conf +CONFSDIR= ${KYUA_CONFDIR} + +EXAMPLES= Kyuafile.top kyua.conf +EXAMPLESDIR= ${KYUA_EGDIR} +.PATH: ${KYUA_SRCDIR}/examples + +MISC= context.html index.html report.css test_result.html +MISCDIR= ${KYUA_MISCDIR} +.PATH: ${KYUA_SRCDIR}/misc + +STORE= migrate_v1_v2.sql migrate_v2_v3.sql schema_v3.sql +STOREDIR= ${KYUA_STOREDIR} +.PATH: ${KYUA_SRCDIR}/store + +CLEANFILES+= ${MAN} +.PATH: ${KYUA_SRCDIR}/doc +.for man in ${MAN} +${man}: ${man}.in + ${SH} ${KYUA_SRCDIR}/doc/manbuild.sh \ + -v "CONFDIR=${KYUA_CONFDIR}" \ + -v "DOCDIR=${KYUA_DOCDIR}" \ + -v "EGDIR=${KYUA_EGDIR}" \ + -v "MISCDIR=${KYUA_MISCDIR}" \ + -v "PACKAGE=kyua" \ + -v "STOREDIR=${KYUA_STOREDIR}" \ + -v "TESTSDIR=${TESTSBASE}" \ + -v "VERSION=${KYUA_VERSION}" \ + ${.ALLSRC} ${.TARGET} +.endfor + +.include From owner-svn-src-head@freebsd.org Mon Mar 23 19:09:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 61D7E26BE57; Mon, 23 Mar 2020 19:09:15 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (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 48mP7Z4LL6z42L4; Mon, 23 Mar 2020 19:09:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id GSRgjAkgRng7KGSRhjEmJL; Mon, 23 Mar 2020 13:09:10 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=SS2py6AdgQ4A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=xBtyi-Bi4YN6QUfDfJ0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=UDnyf2zBuKT2w-IlGP_r:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 5BA6358D; Mon, 23 Mar 2020 12:09:07 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 02NJ97uc067701; Mon, 23 Mar 2020 12:09:07 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 02NJ969A067698; Mon, 23 Mar 2020 12:09:07 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202003231909.02NJ969A067698@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs 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: Brooks Davis cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... In-reply-to: <202003231901.02NJ1OLX063587@repo.freebsd.org> References: <202003231901.02NJ1OLX063587@repo.freebsd.org> Comments: In-reply-to Brooks Davis message dated "Mon, 23 Mar 2020 19:01:24 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 23 Mar 2020 12:09:06 -0700 X-CMAE-Envelope: MS4wfMezgQdDyi/zcR2KgiURGgL5trcopG+ARjqobc+fWT2JAfBEsJjRNQeqeC5OB2WzaBbkfdN9zteF5jpLjYvpp9p+VpVZbVkJvQJmyrcXjbzczzfRJFz5 A4vLVA6rfbAvVK+b/wS0L0iHfILzj4JdjMVARfah2hzJybxU18lpJZPtqNqcFdUn8DUGSafal7LWYDbiJl/+57XfM1xS3/TLnoxnmtGew1LqhF3+PkkrivcF rSUFRSQRI1VEhUIpXVUnuSIu58JOfR7w6t+L8jag8SIYrIao1qNyMZvGtHasp0le X-Rspamd-Queue-Id: 48mP7Z4LL6z42L4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.48 / 15.00]; NEURAL_SPAM_LONG(0.97)[0.966,0]; REPLY(-4.00)[]; NEURAL_SPAM_MEDIUM(0.56)[0.558,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 19:09:15 -0000 In message <202003231901.02NJ1OLX063587@repo.freebsd.org>, Brooks Davis writes: > Author: brooks > Date: Mon Mar 23 19:01:23 2020 > New Revision: 359260 > URL: https://svnweb.freebsd.org/changeset/base/359260 > > Log: > Import the kyua test framework. > > Having kyua in the base system will simplify automated testing in CI and > eliminates bootstrapping issues on new platforms. > > The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. > > Reviewed by: emaste > Obtained from: CheriBSD > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D24103 > Can we remove the kyua port? Unless of course has options that base will not provide, which I cannot see it would. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Mar 23 19:13:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24F5526C2BD; Mon, 23 Mar 2020 19:13:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 48mPD83DK3z47Lf; Mon, 23 Mar 2020 19:13:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id GSVZjAmXong7KGSVajEne6; Mon, 23 Mar 2020 13:13:10 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=SS2py6AdgQ4A:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=GRN_08ONYkTTt9NVe94A:9 a=CjuIK1q_8ugA:10 a=qZi4bplDABUA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=UDnyf2zBuKT2w-IlGP_r:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 241F259C; Mon, 23 Mar 2020 12:13:09 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 02NJD9H8068090; Mon, 23 Mar 2020 12:13:09 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 02NJD8bm068087; Mon, 23 Mar 2020 12:13:08 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202003231913.02NJD8bm068087@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs 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: Brooks Davis cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... In-reply-to: <202003231909.02NJ969A067698@slippy.cwsent.com> References: <202003231901.02NJ1OLX063587@repo.freebsd.org> <202003231909.02NJ969A067698@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Mon, 23 Mar 2020 12:09:06 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 23 Mar 2020 12:13:08 -0700 X-CMAE-Envelope: MS4wfI/Ir5zlJHbm/0WEpA2Ieh/sXtnbsVVkXudMnshl/ycY7giKT+8tRP/C3o2YkErVW4AY2pysw8TXMpg7okTdXnHsA3DP61JBx1Jpw/9Stv2UTDe/6w6d JRD2ptNL8rIY3SkdwP0mHIEeCHDx3/aQeZ6Q3TC1IGnVfwvVJsRrXqC/AXsbEgry590K44aswFKjEtruv5c2yZ+PjTlJUj3a8DDTyyJYHvAawwrWz2wbrovg /kXiF9CAoWyqtl3e7ThE4FV7YCsYSr7dTZp3M8sNViY1HIUcdwXaKMCY4pKZEKyb X-Rspamd-Queue-Id: 48mPD83DK3z47Lf X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.13) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-2.67 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; MV_CASE(0.50)[]; LONG_SUBJ(1.52)[202]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; IP_SCORE(-2.49)[ip: (-6.57), ipnet: 64.59.128.0/20(-3.25), asn: 6327(-2.54), country: CA(-0.09)]; REPLYTO_EQ_FROM(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[13.134.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 19:13:14 -0000 In message <202003231909.02NJ969A067698@slippy.cwsent.com>, Cy Schubert writes: > In message <202003231901.02NJ1OLX063587@repo.freebsd.org>, Brooks Davis > writes: > > Author: brooks > > Date: Mon Mar 23 19:01:23 2020 > > New Revision: 359260 > > URL: https://svnweb.freebsd.org/changeset/base/359260 > > > > Log: > > Import the kyua test framework. > > > > Having kyua in the base system will simplify automated testing in CI and > > eliminates bootstrapping issues on new platforms. > > > > The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. > > > > Reviewed by: emaste > > Obtained from: CheriBSD > > Sponsored by: DARPA > > Differential Revision: https://reviews.freebsd.org/D24103 > > > > Can we remove the kyua port? Unless of course has options that base will > not provide, which I cannot see it would. This also needs a __FreeBSD_version bump. At least the port could check for this and refuse to install if it's already in base. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Mar 23 19:23:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 409A126C802; Mon, 23 Mar 2020 19:23:20 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48mPRp4Nqvz4MmV; Mon, 23 Mar 2020 19:23:18 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D65283C0199; Mon, 23 Mar 2020 19:23:17 +0000 (UTC) Date: Mon, 23 Mar 2020 19:23:17 +0000 From: Brooks Davis To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... Message-ID: <20200323192317.GG5399@spindle.one-eyed-alien.net> References: <202003231901.02NJ1OLX063587@repo.freebsd.org> <202003231909.02NJ969A067698@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="48TaNjbzBVislYPb" Content-Disposition: inline In-Reply-To: <202003231909.02NJ969A067698@slippy.cwsent.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48mPRp4Nqvz4MmV X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net X-Spamd-Result: default: False [-6.52 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.995,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_COUNT_ZERO(0.00)[0]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; IP_SCORE(-3.63)[ip: (-9.52), ipnet: 199.48.128.0/22(-4.75), asn: 36236(-3.82), country: US(-0.05)] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 19:23:20 -0000 --48TaNjbzBVislYPb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 23, 2020 at 12:09:06PM -0700, Cy Schubert wrote: > In message <202003231901.02NJ1OLX063587@repo.freebsd.org>, Brooks Davis= =20 > writes: > > Author: brooks > > Date: Mon Mar 23 19:01:23 2020 > > New Revision: 359260 > > URL: https://svnweb.freebsd.org/changeset/base/359260 > > > > Log: > > Import the kyua test framework. > > =20 > > Having kyua in the base system will simplify automated testing in CI = and > > eliminates bootstrapping issues on new platforms. > > =20 > > The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. > > =20 > > Reviewed by: emaste > > Obtained from: CheriBSD > > Sponsored by: DARPA > > Differential Revision: https://reviews.freebsd.org/D24103 >=20 > Can we remove the kyua port? Unless of course has options that base will= =20 > not provide, which I cannot see it would. We'll be retaining the kyua port at least until all supported releases contain kyua which could be quite some time if we don't MFC for 11.4. We'll probably also want to keep it as a -devel port to allow people to get the latest features on release branches. -- Brooks P.S. At the moment, the import lacks unit tests. Hooking those up is on my todo list, but currently the port covers those... --48TaNjbzBVislYPb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeeQylAAoJEKzQXbSebgfAQv8H/jb3rzVjtqmUO7qghSoK7vEI wHu2X8zq1tsAL93DQ/gZIqogkTLvPdxuXx9/fQ1rLkUEOEJyB8pHN3nW7/2lxNcQ +SdCvzAW6aMbEb76DqvihIfpHEG/9oeGjmefZSb6ObjXcECMf5/FVhj2os18VOs2 cuy36D9SzW3vYngngnsr2CjAGh3y/dZawsuyHe009kBUNJaa58+OlmGpdME6rfHK yfTgwmQ1CzOzPjng57jT2f6nn4bjB91IJMi9fryUIAwEyr0bLZ5PFBR2lgz1UyY9 ZGLvdMlk2QWEz2SknuXR5szJSRgN7nOVI5KdV+H/XBD1vS25gz6qfSVEW0wR0p4= =t9Qc -----END PGP SIGNATURE----- --48TaNjbzBVislYPb-- From owner-svn-src-head@freebsd.org Mon Mar 23 19:28:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F37F26C8F6; Mon, 23 Mar 2020 19:28:24 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mPYh3LpPz4TR3; Mon, 23 Mar 2020 19:28:24 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CBF31B5DC; Mon, 23 Mar 2020 19:28:24 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NJSOaM080856; Mon, 23 Mar 2020 19:28:24 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NJSOw0080855; Mon, 23 Mar 2020 19:28:24 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003231928.02NJSOw0080855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 23 Mar 2020 19:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359261 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 359261 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 19:28:24 -0000 Author: brooks Date: Mon Mar 23 19:28:24 2020 New Revision: 359261 URL: https://svnweb.freebsd.org/changeset/base/359261 Log: Bump for kyua import. Reported by: cy Sponsored by: DARPA Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Mar 23 19:01:23 2020 (r359260) +++ head/sys/sys/param.h Mon Mar 23 19:28:24 2020 (r359261) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300084 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300085 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Mon Mar 23 20:15:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C325726D4D3; Mon, 23 Mar 2020 20:15:25 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48mQbw0zYTz4JFj; Mon, 23 Mar 2020 20:15:24 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id E62429347; Mon, 23 Mar 2020 20:15:22 +0000 (UTC) Date: Mon, 23 Mar 2020 20:15:22 +0000 From: Alexey Dokuchaev To: Brooks Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... Message-ID: <20200323201522.GA95675@FreeBSD.org> References: <202003231901.02NJ1OLX063587@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202003231901.02NJ1OLX063587@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 20:15:25 -0000 On Mon, Mar 23, 2020 at 07:01:24PM +0000, Brooks Davis wrote: > New Revision: 359260 > URL: https://svnweb.freebsd.org/changeset/base/359260 > > Log: > Import the kyua test framework. > > Having kyua in the base system will simplify automated testing in CI > and eliminates bootstrapping issues on new platforms. > > The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. What's WITH(OUT)_TESTS_SUPPORT relationship with MK_TESTS? I often put MK_TESTS=no in /etc/make.conf on space-limited machines, do I also have to add WITHOUT_TESTS_SUPPORT there now? Perhaps it makes sense to fold two knobs into one? ./danfe From owner-svn-src-head@freebsd.org Mon Mar 23 20:22:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C55E326DF2E; Mon, 23 Mar 2020 20:22:29 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48mQm45D2Lz4TRp; Mon, 23 Mar 2020 20:22:28 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 6E2C93C0199; Mon, 23 Mar 2020 20:22:26 +0000 (UTC) Date: Mon, 23 Mar 2020 20:22:26 +0000 From: Brooks Davis To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... Message-ID: <20200323202226.GI5399@spindle.one-eyed-alien.net> References: <202003231901.02NJ1OLX063587@repo.freebsd.org> <20200323201522.GA95675@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qftxBdZWiueWNAVY" Content-Disposition: inline In-Reply-To: <20200323201522.GA95675@FreeBSD.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48mQm45D2Lz4TRp X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-3.14 / 15.00]; NEURAL_SPAM_MEDIUM(0.16)[0.164,0]; REPLY(-4.00)[]; NEURAL_SPAM_LONG(0.70)[0.700,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 20:22:29 -0000 --qftxBdZWiueWNAVY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 23, 2020 at 08:15:22PM +0000, Alexey Dokuchaev wrote: > On Mon, Mar 23, 2020 at 07:01:24PM +0000, Brooks Davis wrote: > > New Revision: 359260 > > URL: https://svnweb.freebsd.org/changeset/base/359260 > >=20 > > Log: > > Import the kyua test framework. > > =20 > > Having kyua in the base system will simplify automated testing in CI > > and eliminates bootstrapping issues on new platforms. > > =20 > > The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. >=20 > What's WITH(OUT)_TESTS_SUPPORT relationship with MK_TESTS? I often put > MK_TESTS=3Dno in /etc/make.conf on space-limited machines, do I also have > to add WITHOUT_TESTS_SUPPORT there now? Perhaps it makes sense to fold > two knobs into one? WITHOUT_TESTS set MK_TESTS_SUPPORT=3Dno unless WITH_TESTS_SUPPORT is specified (src.conf.5 documents this fairly clearly). This allows the test framework to be available without tests. -- Brooks --qftxBdZWiueWNAVY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeeRqBAAoJEKzQXbSebgfAit8H/R/rmBxudMwo6O9fphqLFDrh iMSbeNtp6/CVxQKMaflheo0Z82Xz2SMg5fYcLMXdNXOqU9GqgdgWg9ocmw6PjrEf IbcgGiiojLXQHeH85OTnzpcXstPcfvEVrOSQiNJvVFxFoLXM4pPP3UCUJdOE+jDh FBnIRoezo/IT8enJvzkc0GTx9zhSlJjid2OeNOoF2ML+gf2EPgJIAhgHwU55jsJl yHHz4rYedRMxZs6Aw1eYE+yDXdYwZEX2PjDWd+6tLgOEyq2Csr/LZlVFHxjSlqFm KIMh9QX0WXsVPY1g5VmxEFcQ9CsJELd41vaReIaSgfuAfPG4sjU13CsBXnC58JA= =wwsd -----END PGP SIGNATURE----- --qftxBdZWiueWNAVY-- From owner-svn-src-head@freebsd.org Mon Mar 23 21:21:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36B6926FC5A; Mon, 23 Mar 2020 21:21:42 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mS4P6VCmz4h3p; Mon, 23 Mar 2020 21:21:41 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E4001CB4F; Mon, 23 Mar 2020 21:21:40 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NLLdcZ053464; Mon, 23 Mar 2020 21:21:39 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NLLcES053455; Mon, 23 Mar 2020 21:21:38 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003232121.02NLLcES053455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 23 Mar 2020 21:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359262 - in head: lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk X-SVN-Commit-Revision: 359262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 21:21:42 -0000 Author: brooks Date: Mon Mar 23 21:21:38 2020 New Revision: 359262 URL: https://svnweb.freebsd.org/changeset/base/359262 Log: Improve LIBADD/_DP_* for kyua libraries. This fixes build with ld.bfd as the linker (e.g. on powerpc). This corrects a bug in D24103. Sponsored by: DARPA Modified: head/lib/kyua/cli/Makefile head/lib/kyua/drivers/Makefile head/lib/kyua/engine/Makefile head/lib/kyua/model/Makefile head/lib/kyua/store/Makefile head/lib/kyua/utils/Makefile head/share/mk/src.libnames.mk Modified: head/lib/kyua/cli/Makefile ============================================================================== --- head/lib/kyua/cli/Makefile Mon Mar 23 19:28:24 2020 (r359261) +++ head/lib/kyua/cli/Makefile Mon Mar 23 21:21:38 2020 (r359262) @@ -2,6 +2,7 @@ KYUA_LIB= cli INTERNALLIB= +LIBADD= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils CFLAGS+= -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ -DKYUA_DOCDIR=\"${KYUA_CONFDIR}\" \ -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ Modified: head/lib/kyua/drivers/Makefile ============================================================================== --- head/lib/kyua/drivers/Makefile Mon Mar 23 19:28:24 2020 (r359261) +++ head/lib/kyua/drivers/Makefile Mon Mar 23 21:21:38 2020 (r359262) @@ -1,6 +1,7 @@ # $FreeBSD$ KYUA_LIB= drivers +LIBADD= kyua_model kyua_engine kyua_store SRCS= debug_test.cpp \ list_tests.cpp \ Modified: head/lib/kyua/engine/Makefile ============================================================================== --- head/lib/kyua/engine/Makefile Mon Mar 23 19:28:24 2020 (r359261) +++ head/lib/kyua/engine/Makefile Mon Mar 23 21:21:38 2020 (r359262) @@ -1,6 +1,7 @@ # $FreeBSD$ KYUA_LIB= engine +LIBADD= lutok kyua_utils CFLAGS= -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ -DKYUA_PLATFORM=\"${MACHINE}\" Modified: head/lib/kyua/model/Makefile ============================================================================== --- head/lib/kyua/model/Makefile Mon Mar 23 19:28:24 2020 (r359261) +++ head/lib/kyua/model/Makefile Mon Mar 23 21:21:38 2020 (r359262) @@ -1,6 +1,7 @@ # $FreeBSD$ KYUA_LIB= model +LIBADD= lutok SRCS= context.cpp \ exceptions.cpp \ Modified: head/lib/kyua/store/Makefile ============================================================================== --- head/lib/kyua/store/Makefile Mon Mar 23 19:28:24 2020 (r359261) +++ head/lib/kyua/store/Makefile Mon Mar 23 21:21:38 2020 (r359262) @@ -1,6 +1,7 @@ # $FreeBSD$ KYUA_LIB= store +LIBADD= kyua_model kyua_utils sqlite3 CFLAGS+= -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" Modified: head/lib/kyua/utils/Makefile ============================================================================== --- head/lib/kyua/utils/Makefile Mon Mar 23 19:28:24 2020 (r359261) +++ head/lib/kyua/utils/Makefile Mon Mar 23 21:21:38 2020 (r359262) @@ -1,6 +1,7 @@ # $FreeBSD$ KYUA_LIB= utils +LIBADD= lutok CFLAGS+= -I${SRCTOP}/contrib/sqlite3 CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Mar 23 19:28:24 2020 (r359261) +++ head/share/mk/src.libnames.mk Mon Mar 23 21:21:38 2020 (r359262) @@ -263,8 +263,12 @@ _DP_bsnmp= crypto _DP_geom= bsdxml sbuf _DP_cam= sbuf _DP_kvm= elf -_DP_kyua_cli= lutok kyua_utils -_DP_kyua_store= sqlite3 +_DP_kyua_cli= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils +_DP_kyua_drivers= kyua_model kyua_engine kyua_store +_DP_kyua_engine= lutok kyua_utils +_DP_kyua_model= lutok +_DP_kyua_utils= lutok +_DP_kyua_store= kyua_model kyua_utils sqlite3 _DP_casper= nv _DP_cap_dns= nv _DP_cap_fileargs= nv From owner-svn-src-head@freebsd.org Mon Mar 23 21:26:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DCEE27000C; Mon, 23 Mar 2020 21:26:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mSB15gbVz4nmL; Mon, 23 Mar 2020 21:26:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7BD21CBA7; Mon, 23 Mar 2020 21:26:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NLQWNb053765; Mon, 23 Mar 2020 21:26:32 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NLQWar053764; Mon, 23 Mar 2020 21:26:32 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202003232126.02NLQWar053764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 23 Mar 2020 21:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359263 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 359263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 21:26:34 -0000 Author: jhb Date: Mon Mar 23 21:26:32 2020 New Revision: 359263 URL: https://svnweb.freebsd.org/changeset/base/359263 Log: Use the newer EINTEGRITY error when authentication fails. GELI used to fail with EINVAL when a read request spanned a disk sector whose contents did not match the sector's authentication tag. The recently-added EINTEGRITY more closely matches to the error in this case. Reviewed by: cem, mckusick MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24131 Modified: head/sys/geom/eli/g_eli_integrity.c Modified: head/sys/geom/eli/g_eli_integrity.c ============================================================================== --- head/sys/geom/eli/g_eli_integrity.c Mon Mar 23 21:21:38 2020 (r359262) +++ head/sys/geom/eli/g_eli_integrity.c Mon Mar 23 21:26:32 2020 (r359263) @@ -232,7 +232,7 @@ g_eli_auth_read_done(struct cryptop *crp) bp->bio_driver2 = NULL; if (bp->bio_error != 0) { if (bp->bio_error == -1) - bp->bio_error = EINVAL; + bp->bio_error = EINTEGRITY; else { G_ELI_LOGREQ(0, bp, "Crypto READ request failed (error=%d).", From owner-svn-src-head@freebsd.org Mon Mar 23 23:00:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B3B4272A21; Mon, 23 Mar 2020 23:00:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mVG62JPwz4MXZ; Mon, 23 Mar 2020 23:00:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4834E1DC63; Mon, 23 Mar 2020 23:00:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02NN0EeP008756; Mon, 23 Mar 2020 23:00:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02NN0EaB008755; Mon, 23 Mar 2020 23:00:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003232300.02NN0EaB008755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 23 Mar 2020 23:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359264 - head/sys/arm/include X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/arm/include X-SVN-Commit-Revision: 359264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 23:00:14 -0000 Author: cem Date: Mon Mar 23 23:00:13 2020 New Revision: 359264 URL: https://svnweb.freebsd.org/changeset/base/359264 Log: arm: Fix atomic long APIs to correct 'u_long' signedness As defined in atomic(9) and implemented on other architectures, the atomic(9) functions all act on unsigned pointers and types. Prior to this revision, arm implemented some atomic(9) 'long' sized routines with correct unsigned type, but others were incorrectly signed. Reviewed by: tinderbox Sponsored by: Dell EMC Isilon Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/include/atomic-v6.h ============================================================================== --- head/sys/arm/include/atomic-v6.h Mon Mar 23 21:26:32 2020 (r359263) +++ head/sys/arm/include/atomic-v6.h Mon Mar 23 23:00:13 2020 (r359264) @@ -325,31 +325,31 @@ atomic_fcmpset_rel_32(volatile uint32_t *_ptr, uint32_ } static __inline int -atomic_fcmpset_long(volatile long *_ptr, long *_old, long _new) +atomic_fcmpset_long(volatile u_long *_ptr, u_long *_old, u_long _new) { int ret; - ATOMIC_FCMPSET_CODE(ret, long, ""); + ATOMIC_FCMPSET_CODE(ret, u_long, ""); return (ret); } static __inline int -atomic_fcmpset_acq_long(volatile long *_ptr, long *_old, long _new) +atomic_fcmpset_acq_long(volatile u_long *_ptr, u_long *_old, u_long _new) { int ret; - ATOMIC_FCMPSET_CODE(ret, long, ""); + ATOMIC_FCMPSET_CODE(ret, u_long, ""); dmb(); return (ret); } static __inline int -atomic_fcmpset_rel_long(volatile long *_ptr, long *_old, long _new) +atomic_fcmpset_rel_long(volatile u_long *_ptr, u_long *_old, u_long _new) { int ret; dmb(); - ATOMIC_FCMPSET_CODE(ret, long, ""); + ATOMIC_FCMPSET_CODE(ret, u_long, ""); return (ret); } @@ -509,7 +509,7 @@ atomic_cmpset_rel_32(volatile uint32_t *_ptr, uint32_t } static __inline int -atomic_cmpset_long(volatile long *_ptr, long _old, long _new) +atomic_cmpset_long(volatile u_long *_ptr, u_long _old, u_long _new) { int ret; @@ -518,7 +518,7 @@ atomic_cmpset_long(volatile long *_ptr, long _old, lon } static __inline int -atomic_cmpset_acq_long(volatile long *_ptr, long _old, long _new) +atomic_cmpset_acq_long(volatile u_long *_ptr, u_long _old, u_long _new) { int ret; @@ -528,7 +528,7 @@ atomic_cmpset_acq_long(volatile long *_ptr, long _old, } static __inline int -atomic_cmpset_rel_long(volatile long *_ptr, long _old, long _new) +atomic_cmpset_rel_long(volatile u_long *_ptr, u_long _old, u_long _new) { int ret; From owner-svn-src-head@freebsd.org Tue Mar 24 01:07:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B249275ADD; Tue, 24 Mar 2020 01:07:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mY4R0d2kz3JGK; Tue, 24 Mar 2020 01:07:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9513B1F40F; Tue, 24 Mar 2020 01:07:02 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02O172MQ085881; Tue, 24 Mar 2020 01:07:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02O172Al085879; Tue, 24 Mar 2020 01:07:02 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003240107.02O172Al085879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 24 Mar 2020 01:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359265 - in head: etc release/scripts X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: etc release/scripts X-SVN-Commit-Revision: 359265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 01:07:03 -0000 Author: manu Date: Tue Mar 24 01:07:01 2020 New Revision: 359265 URL: https://svnweb.freebsd.org/changeset/base/359265 Log: pkgbase: Move device.hints from the runtime to the bootloader package Also mark it as config file so if a user changes this file pkg will attempt to merge the new file upon an update. device.hints is neither related to runtime or loader but it make more sense to have it in loader in case some user delete /boot/ and wants to recreate it, now only two packages are required FreeBSD-bootloader and the kernel package. While here change where we override the package for files installed in /boot, this allow us to keep other tags (such as config). Reported by: pizzamig Reviewed by: bapt pizzamig emaste Differential Revision: https://reviews.freebsd.org/D24159 Modified: head/etc/Makefile head/release/scripts/mtree-to-plist.awk Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon Mar 23 23:00:13 2020 (r359264) +++ head/etc/Makefile Tue Mar 24 01:07:01 2020 (r359265) @@ -93,7 +93,7 @@ distribution: .if ${MK_BOOT} != "no" .if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - -T "package=runtime" \ + -T "package=bootloader,config" \ ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif Modified: head/release/scripts/mtree-to-plist.awk ============================================================================== --- head/release/scripts/mtree-to-plist.awk Mon Mar 23 23:00:13 2020 (r359264) +++ head/release/scripts/mtree-to-plist.awk Tue Mar 24 01:07:01 2020 (r359265) @@ -28,9 +28,6 @@ tags=tags""_kernconf } } - if ($1 ~ /^\/boot\//) { - tags="package=bootloader" - } if (length(tags) == 0) next if (tags ~ /package=/) { @@ -39,6 +36,8 @@ for (i in a) { if (a[i] ~ /^package=/) { pkgname=a[i] + if ($1 ~ /^\/boot\//) + pkgname="bootloader" gsub(/package=/, "", pkgname) } else if (a[i] == "config") { type="config" From owner-svn-src-head@freebsd.org Tue Mar 24 01:08:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 452E7275BB0; Tue, 24 Mar 2020 01:08:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mY5g12Y7z3LC4; Tue, 24 Mar 2020 01:08:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 152FD1F41A; Tue, 24 Mar 2020 01:08:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02O186TK085970; Tue, 24 Mar 2020 01:08:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02O186GN085969; Tue, 24 Mar 2020 01:08:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003240108.02O186GN085969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 24 Mar 2020 01:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359266 - head/lib/libpam/pam.d X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/lib/libpam/pam.d X-SVN-Commit-Revision: 359266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 01:08:07 -0000 Author: manu Date: Tue Mar 24 01:08:06 2020 New Revision: 359266 URL: https://svnweb.freebsd.org/changeset/base/359266 Log: pkgbase: Move telnetd and ftpd pam file to the utilities package Both programs are in this package so put the pam.d file in there too. Reported by: emaste Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D24161 Modified: head/lib/libpam/pam.d/Makefile Modified: head/lib/libpam/pam.d/Makefile ============================================================================== --- head/lib/libpam/pam.d/Makefile Tue Mar 24 01:07:01 2020 (r359265) +++ head/lib/libpam/pam.d/Makefile Tue Mar 24 01:08:06 2020 (r359266) @@ -26,7 +26,6 @@ ATPACKAGE+= at .if ${MK_FTP} != "no" CONFGROUPS+= FTP FTP+= ftpd -FTPPACKAGE+= ftp afterinstallconfig: ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}${CONFDIR}/ftpd ${DESTDIR}${CONFDIR}/ftp @@ -35,7 +34,6 @@ afterinstallconfig: .if ${MK_TELNET} != "no" CONFGROUPS+= TELNET TELNET+= telnetd -TELNETPACKAGE+= telnet .endif .include From owner-svn-src-head@freebsd.org Tue Mar 24 01:09:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A473F275CA3; Tue, 24 Mar 2020 01:09:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mY6n3w8jz3Lwd; Tue, 24 Mar 2020 01:09:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D17E1F423; Tue, 24 Mar 2020 01:09:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02O195Y5086054; Tue, 24 Mar 2020 01:09:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02O195Gs086052; Tue, 24 Mar 2020 01:09:05 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003240109.02O195Gs086052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 24 Mar 2020 01:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359267 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 359267 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 01:09:05 -0000 Author: manu Date: Tue Mar 24 01:09:04 2020 New Revision: 359267 URL: https://svnweb.freebsd.org/changeset/base/359267 Log: bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB If we're building an internal lib do not bother including bsd.incs.mk so we will not install the headers. This also "solves" a problem with pkgbase where a libXXX-development package is created and due to how packages are created we add a dependency to a libXXX package that doesn't exists. Reported by: pizzamig Reviewed by: pizzamig bapt emaste Differential Revision: https://reviews.freebsd.org/D24166 Modified: head/ObsoleteFiles.inc head/share/mk/bsd.lib.mk Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Mar 24 01:08:06 2020 (r359266) +++ head/ObsoleteFiles.inc Tue Mar 24 01:09:04 2020 (r359267) @@ -36,6 +36,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20200323: INTERNALLIB don't install headers anymore +OLD_FILES+=/usr/include/libelftc.h +OLD_FILES+=/usr/include/libifconfig.h +OLD_FILES+=/usr/include/libpmcstat.h + # 20200320: cx and ctau drivers retired OLD_FILES+=usr/share/man/man4/ctau.4.gz OLD_FILES+=usr/share/man/man4/cx.4.gz Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Mar 24 01:08:06 2020 (r359266) +++ head/share/mk/bsd.lib.mk Tue Mar 24 01:09:04 2020 (r359267) @@ -489,7 +489,10 @@ _libinstall: .include .include .include +#No need to install header for INTERNALLIB +.if !defined(INTERNALLIB) .include +.endif .endif LINKOWN?= ${LIBOWN} From owner-svn-src-head@freebsd.org Tue Mar 24 01:24:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF844276319; Tue, 24 Mar 2020 01:24:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48mYSD0y6sz4BgT; Tue, 24 Mar 2020 01:24:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id D277C1FBA3; Tue, 24 Mar 2020 01:24:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id EC3B11F726; Tue, 24 Mar 2020 01:24:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id mBZVJHsKEI96; Tue, 24 Mar 2020 01:24:07 +0000 (UTC) Subject: Re: svn commit: r359267 - in head: . share/mk DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 8FB621F71E To: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003240109.02O195Gs086052@repo.freebsd.org> From: Bryan Drewery Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAG0JEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hLu BQkNPvODAAoJEDXXcbtuRpfP9rMH/3f7cfX5rzyEV5QNfV/wS4jFukLoPZ4+nCM/TKxH3pEX 2bLbeQbkk6La8cueQ5Lpoht5XFZ18Y5TbMittngltrlNzoDD0h9are24OkDFGim3afJU7tkj IGQa1if+re+vI5BhzYwRhj0oKXzBi39M5oePd3L1dXfx83rg2FPyZBdIejsz6fR74T3JVkbd 6k2l5/3Zk2uiNMy+eBfDRgYE1E6CP28kV0nCeGKZgSVso0kGUUHud7voKqGVpMvbd0mE4pp4 PE5YJaFPjrll9miaDAvdU8LGIq5n6+aXPLKoQ/QNl6mg6ifgI6FfKILOkTizLW8E5PBSNnCm NapQ55yjm125AQ0EUmmGawEIAKJUU9+Q19oW1RK5jTf3m56j+szIc8Y9DaLC8REUKl4UZJBK BqCl6c0cukVApOD92XoU6hJPm2rLEyp/IcYcPPNTnVu8D8h9oag2L8EiFN7+2hk0xG+lwjc8 uOIZycme7AIJsBU4AZ1v63lxm2k104hwpiatgbe71GIGl7p1MX6ousP/wGzXCOF25Dx9w02C eRe7zEMfhnFjSUhzdCC9han2+KaVB7qIqNR3b8NfbwRNlwPmHqlhXffUow9OsQjSnTK8WKNR lx7xzVccXIvWP2wECFrmqmzMmXpSrmIuiWEpFwZ9x2a0Pva8dCNRiCVTK51IlRXKjaAxiN1u IUrMm6UAEQEAAYkBPAQYAQoAJgIbDBYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hL4BQkN PvONAAoJEDXXcbtuRpfPCjcH/ivBsOpdpebpgLizSNU5/X4yWN5Aixsc9VBnQhGKAKnMINJQ VMpA55sD2JSPwloXYM/B3qyPJRS/9cwIuX5LDNKKOZU3Qp+TzleynM15/xea14orWYRGRict YHBM3Cnqp7OD8K6Q1uhs0fTxyJP7PZ/G0+7Corlf1DlHhDt6C2HldRPFvAvAgl6sR9Wzgcb7 rzub2HVtbJgl6YHbgyAG7x9NpXFqzx1JLAMdpt2DIYwoi+oMdRQlBIwNuKjQjCGzuXHandd3 kGvBAsyJpQ+coEep9UzwANaV28cXrFr2R4FSOcR50rBA2Nh/vqUYfpsvBvJlwuKAoV1djVHa ihNeL5E= Organization: FreeBSD Message-ID: <87469ad7-182c-1cd7-489c-e1d2cb60e4a8@FreeBSD.org> Date: Mon, 23 Mar 2020 18:24:07 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202003240109.02O195Gs086052@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WH6CQOCXRnSm0ZYFzbCrE5cmZxFZEWta1" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 01:24:12 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WH6CQOCXRnSm0ZYFzbCrE5cmZxFZEWta1 Content-Type: multipart/mixed; boundary="vig4vx2ozKi2FGZeBslm6ZDaa4btZkznu"; protected-headers="v1" From: Bryan Drewery To: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <87469ad7-182c-1cd7-489c-e1d2cb60e4a8@FreeBSD.org> Subject: Re: svn commit: r359267 - in head: . share/mk References: <202003240109.02O195Gs086052@repo.freebsd.org> In-Reply-To: <202003240109.02O195Gs086052@repo.freebsd.org> --vig4vx2ozKi2FGZeBslm6ZDaa4btZkznu Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/23/2020 6:09 PM, Emmanuel Vadot wrote: > Author: manu > Date: Tue Mar 24 01:09:04 2020 > New Revision: 359267 > URL: https://svnweb.freebsd.org/changeset/base/359267 >=20 > Log: > bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB > =20 > If we're building an internal lib do not bother including bsd.incs.mk= so we > will not install the headers. > This also "solves" a problem with pkgbase where a libXXX-development = package > is created and due to how packages are created we add a dependency to= a > libXXX package that doesn't exists. > =20 > Reported by: pizzamig > Reviewed by: pizzamig bapt emaste > Differential Revision: https://reviews.freebsd.org/D24166 >=20 > Modified: > head/ObsoleteFiles.inc > head/share/mk/bsd.lib.mk >=20 > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/ObsoleteFiles.inc Tue Mar 24 01:08:06 2020 (r359266) > +++ head/ObsoleteFiles.inc Tue Mar 24 01:09:04 2020 (r359267) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > =20 > +# 20200323: INTERNALLIB don't install headers anymore > +OLD_FILES+=3D/usr/include/libelftc.h > +OLD_FILES+=3D/usr/include/libifconfig.h > +OLD_FILES+=3D/usr/include/libpmcstat.h > + lib/libelftc/Makefile:INCS=3D libelftc.h lib/libifconfig/Makefile:INCSDIR=3D ${INCLUDEDIR} lib/libifconfig/Makefile:INCS=3D libifconfig.h lib/libpmcstat/Makefile:INCS=3D libpmcstat.h This commit seems incomplete or wrong due to the leftover logic. > # 20200320: cx and ctau drivers retired > OLD_FILES+=3Dusr/share/man/man4/ctau.4.gz > OLD_FILES+=3Dusr/share/man/man4/cx.4.gz >=20 > Modified: head/share/mk/bsd.lib.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/bsd.lib.mk Tue Mar 24 01:08:06 2020 (r359266) > +++ head/share/mk/bsd.lib.mk Tue Mar 24 01:09:04 2020 (r359267) > @@ -489,7 +489,10 @@ _libinstall: > .include > .include > .include > +#No need to install header for INTERNALLIB > +.if !defined(INTERNALLIB) > .include > +.endif > .endif > =20 > LINKOWN?=3D ${LIBOWN} >=20 --=20 Regards, Bryan Drewery --vig4vx2ozKi2FGZeBslm6ZDaa4btZkznu-- --WH6CQOCXRnSm0ZYFzbCrE5cmZxFZEWta1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE+Rc8ssOq6npcih8JNddxu25Gl88FAl55YTdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 MTczQ0IyQzNBQUVBN0E1QzhBMUYwOTM1RDc3MUJCNkU0Njk3Q0YACgkQNddxu25G l8/YawgAlley/d8Lr9qPNj3F1iHcPy/jyOxRikLSS1YXi0t9+neHPqvQh/Bu/GPw CGHeUOfZ8DY6L1/fpEYW0CElCFBpFWgao9vZWAA9zAmEdm3LkfAcEwudb7L07FCT /gxOM97t9e2dUlmSCr+6aTup9ZuwdF1QKxa2v6OE48FtKE/rOKc8yJWhqB+HEwgh rHCfJIpg3D+nFgM2rCD66UXq7kgCbVs1p3Bw9TXbQU0hWGh6xot9sFiPxhULKQ82 JMeoCLKsebet1IZ9pU6Vy7Z949G0Nvy4Al0QWLlYtXxa+Dpe4VT0JbQSDTdoghvg fz15rGagPc1gbhf+2rebl8nrZAGjpg== =CWG6 -----END PGP SIGNATURE----- --WH6CQOCXRnSm0ZYFzbCrE5cmZxFZEWta1-- From owner-svn-src-head@freebsd.org Tue Mar 24 01:25:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41A462763BA; Tue, 24 Mar 2020 01:25:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48mYV16Br3z4D6v; Tue, 24 Mar 2020 01:25:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 3AE2BDDF; Tue, 24 Mar 2020 01:25:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 892A01F734; Tue, 24 Mar 2020 01:25:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id ds40rVD3dHnF; Tue, 24 Mar 2020 01:25:40 +0000 (UTC) Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com A57851F72D To: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003231901.02NJ1OLX063587@repo.freebsd.org> From: Bryan Drewery Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAG0JEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hLu BQkNPvODAAoJEDXXcbtuRpfP9rMH/3f7cfX5rzyEV5QNfV/wS4jFukLoPZ4+nCM/TKxH3pEX 2bLbeQbkk6La8cueQ5Lpoht5XFZ18Y5TbMittngltrlNzoDD0h9are24OkDFGim3afJU7tkj IGQa1if+re+vI5BhzYwRhj0oKXzBi39M5oePd3L1dXfx83rg2FPyZBdIejsz6fR74T3JVkbd 6k2l5/3Zk2uiNMy+eBfDRgYE1E6CP28kV0nCeGKZgSVso0kGUUHud7voKqGVpMvbd0mE4pp4 PE5YJaFPjrll9miaDAvdU8LGIq5n6+aXPLKoQ/QNl6mg6ifgI6FfKILOkTizLW8E5PBSNnCm NapQ55yjm125AQ0EUmmGawEIAKJUU9+Q19oW1RK5jTf3m56j+szIc8Y9DaLC8REUKl4UZJBK BqCl6c0cukVApOD92XoU6hJPm2rLEyp/IcYcPPNTnVu8D8h9oag2L8EiFN7+2hk0xG+lwjc8 uOIZycme7AIJsBU4AZ1v63lxm2k104hwpiatgbe71GIGl7p1MX6ousP/wGzXCOF25Dx9w02C eRe7zEMfhnFjSUhzdCC9han2+KaVB7qIqNR3b8NfbwRNlwPmHqlhXffUow9OsQjSnTK8WKNR lx7xzVccXIvWP2wECFrmqmzMmXpSrmIuiWEpFwZ9x2a0Pva8dCNRiCVTK51IlRXKjaAxiN1u IUrMm6UAEQEAAYkBPAQYAQoAJgIbDBYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hL4BQkN PvONAAoJEDXXcbtuRpfPCjcH/ivBsOpdpebpgLizSNU5/X4yWN5Aixsc9VBnQhGKAKnMINJQ VMpA55sD2JSPwloXYM/B3qyPJRS/9cwIuX5LDNKKOZU3Qp+TzleynM15/xea14orWYRGRict YHBM3Cnqp7OD8K6Q1uhs0fTxyJP7PZ/G0+7Corlf1DlHhDt6C2HldRPFvAvAgl6sR9Wzgcb7 rzub2HVtbJgl6YHbgyAG7x9NpXFqzx1JLAMdpt2DIYwoi+oMdRQlBIwNuKjQjCGzuXHandd3 kGvBAsyJpQ+coEep9UzwANaV28cXrFr2R4FSOcR50rBA2Nh/vqUYfpsvBvJlwuKAoV1djVHa ihNeL5E= Organization: FreeBSD Message-ID: <512de064-a546-8ba4-1a15-aeadb0f515ff@FreeBSD.org> Date: Mon, 23 Mar 2020 18:25:39 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202003231901.02NJ1OLX063587@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X7BvhnL11jNq9PpKQTPjsylKXmDGc5kcF" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 01:25:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --X7BvhnL11jNq9PpKQTPjsylKXmDGc5kcF Content-Type: multipart/mixed; boundary="yFnSqh7snZvPvaf0ECk87CL4nC0J5Ty7K"; protected-headers="v1" From: Bryan Drewery To: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <512de064-a546-8ba4-1a15-aeadb0f515ff@FreeBSD.org> Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... References: <202003231901.02NJ1OLX063587@repo.freebsd.org> In-Reply-To: <202003231901.02NJ1OLX063587@repo.freebsd.org> --yFnSqh7snZvPvaf0ECk87CL4nC0J5Ty7K Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/23/2020 12:01 PM, Brooks Davis wrote: > Author: brooks > Date: Mon Mar 23 19:01:23 2020 > New Revision: 359260 > URL: https://svnweb.freebsd.org/changeset/base/359260 >=20 > Log: > Import the kyua test framework. > =20 > Having kyua in the base system will simplify automated testing in CI = and > eliminates bootstrapping issues on new platforms. > =20 > The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. > =20 > Reviewed by: emaste > Obtained from: CheriBSD > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D24103 Dumb question but are we allowed to modify this code without a google contributor agreement? I was under the impression that the license was restrictive in some regard like that. --=20 Regards, Bryan Drewery --yFnSqh7snZvPvaf0ECk87CL4nC0J5Ty7K-- --X7BvhnL11jNq9PpKQTPjsylKXmDGc5kcF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE+Rc8ssOq6npcih8JNddxu25Gl88FAl55YZNfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 MTczQ0IyQzNBQUVBN0E1QzhBMUYwOTM1RDc3MUJCNkU0Njk3Q0YACgkQNddxu25G l8/SrAgAvXX54XHF16z6D8NowugZ2PARqV/rrzd6xHcalqXWNa0qNqHye2QYNtXh 4LoYrBZ37VyScz54Sqvcc4glVjHbyBYfdawjN6q+2l5RfIeL88LtxtmSCjsCRcxA 0YFzWsWb4NyCe0J0kXIBaWCEi7fWKLYwePZ3B9RWJt0ctfo220weoX7hsb1FtyQj ExMlKDxxqIsVc7Pu0tyOq7HhVN+U7EyNFzjtnylsWpSYkmbJGBFpFwt05caBxs25 zsNAa5Ix8zZ3Tcl1LD7yOsOGI68oshehtiMF/RbYUaUt8Y0HEvSA1cZix+kmYAWg F4XPtE+eV3tb7UuYw7m66O+vrkFL5A== =buVj -----END PGP SIGNATURE----- --X7BvhnL11jNq9PpKQTPjsylKXmDGc5kcF-- From owner-svn-src-head@freebsd.org Tue Mar 24 01:29:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C29C3276476; Tue, 24 Mar 2020 01:29:18 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mYZ64qP2z4Gmy; Tue, 24 Mar 2020 01:29:18 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A06E61F7E3; Tue, 24 Mar 2020 01:29:18 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02O1TIaa098116; Tue, 24 Mar 2020 01:29:18 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02O1TIrj098115; Tue, 24 Mar 2020 01:29:18 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003240129.02O1TIrj098115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 24 Mar 2020 01:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359268 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 359268 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 01:29:18 -0000 Author: manu Date: Tue Mar 24 01:29:18 2020 New Revision: 359268 URL: https://svnweb.freebsd.org/changeset/base/359268 Log: Revert r359267. This is not the correct solution and I should have done a clean buildworld. Modified: head/ObsoleteFiles.inc head/share/mk/bsd.lib.mk Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Mar 24 01:09:04 2020 (r359267) +++ head/ObsoleteFiles.inc Tue Mar 24 01:29:18 2020 (r359268) @@ -36,11 +36,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20200323: INTERNALLIB don't install headers anymore -OLD_FILES+=/usr/include/libelftc.h -OLD_FILES+=/usr/include/libifconfig.h -OLD_FILES+=/usr/include/libpmcstat.h - # 20200320: cx and ctau drivers retired OLD_FILES+=usr/share/man/man4/ctau.4.gz OLD_FILES+=usr/share/man/man4/cx.4.gz Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Mar 24 01:09:04 2020 (r359267) +++ head/share/mk/bsd.lib.mk Tue Mar 24 01:29:18 2020 (r359268) @@ -489,10 +489,7 @@ _libinstall: .include .include .include -#No need to install header for INTERNALLIB -.if !defined(INTERNALLIB) .include -.endif .endif LINKOWN?= ${LIBOWN} From owner-svn-src-head@freebsd.org Tue Mar 24 01:54:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BAF0727716A; Tue, 24 Mar 2020 01:54:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48mZ7G4YHzz3FPq; Tue, 24 Mar 2020 01:54:34 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f52.google.com with SMTP id c9so5442384otl.12; Mon, 23 Mar 2020 18:54:34 -0700 (PDT) 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:reply-to :from:date:message-id:subject:to:cc; bh=uQLrEXewZ9Zdnh+/JjwRfAmOb9293z5Dyv1RyhI5Q6I=; b=hGv8yucSnosI+ljjsHekK7icOdWxc62nVDgMr5tXjzeFmCCX62NkqTHtjbi6GwedqR WIDGVNjcestaVjCcttzk2xMXLd4ItVKWZcOwj6p7I0bhxgqgtTyqUuTKjCR3aFDPZSd8 4ULS9e6GAbmdORN6+bBv996S3+WcH/L1mptvOYQxUlTFP/yqeMeIPRn310SkGvFaQMjW Jx4IY3++yhOfcLzVLqbVB0EOtj6B/b4dFwqHdDvzaIADK7NN1LCEuy1TgGAQUWcgvlYt hsN2Va+/xy01h+XQNnsOkj7SEtHQJZr45/1x0JHjW7qniXVwkxNHU7AUQLIcFH9UqNAj njEw== X-Gm-Message-State: ANhLgQ1jrrwPqzyfLbcHT00O2Y7TW3U1nLTX6TwVt8kH8hHf4ABYMWFn jdoSBOj5C6BhlxRe1XjVmOWuM1/F X-Google-Smtp-Source: ADFU+vsltY1Vs2mdtmddlJxTSZ/qEVNH6ILWSZMP1mAHQ6EotWj79Dqw6vfHX8t8qXBlODo3zx6oOA== X-Received: by 2002:a9d:895:: with SMTP id 21mr19440177otf.365.1585014873317; Mon, 23 Mar 2020 18:54:33 -0700 (PDT) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com. [209.85.167.176]) by smtp.gmail.com with ESMTPSA id h64sm5367024oia.11.2020.03.23.18.54.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Mar 2020 18:54:33 -0700 (PDT) Received: by mail-oi1-f176.google.com with SMTP id w13so17014108oih.4; Mon, 23 Mar 2020 18:54:32 -0700 (PDT) X-Received: by 2002:aca:f084:: with SMTP id o126mr1801898oih.81.1585014872675; Mon, 23 Mar 2020 18:54:32 -0700 (PDT) MIME-Version: 1.0 References: <202003231901.02NJ1OLX063587@repo.freebsd.org> <512de064-a546-8ba4-1a15-aeadb0f515ff@FreeBSD.org> In-Reply-To: <512de064-a546-8ba4-1a15-aeadb0f515ff@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 23 Mar 2020 18:54:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... To: Bryan Drewery Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48mZ7G4YHzz3FPq X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.210.52 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-2.72 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; HAS_REPLYTO(0.00)[cem@freebsd.org]; RWL_MAILSPIKE_GOOD(0.00)[52.210.85.209.rep.mailspike.net : 127.0.0.18]; RCVD_TLS_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[52.210.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; IP_SCORE(-0.72)[ip: (-0.55), ipnet: 209.85.128.0/17(-2.50), asn: 15169(-0.52), country: US(-0.05)]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 01:54:35 -0000 On Mon, Mar 23, 2020 at 6:25 PM Bryan Drewery wrote: > > On 3/23/2020 12:01 PM, Brooks Davis wrote: > > Author: brooks > > Date: Mon Mar 23 19:01:23 2020 > > New Revision: 359260 > > URL: https://svnweb.freebsd.org/changeset/base/359260 > > > > Log: > > Import the kyua test framework. > > Dumb question but are we allowed to modify this code without a google > contributor agreement? I was under the impression that the license was > restrictive in some regard like that. Not a dumb question. Yes, we're allowed to modify the code. The license is just a boring BSD 3-clause: https://svnweb.freebsd.org/base/head/contrib/kyua/LICENSE?view=markup The restrictions around Google contributor CLA only applied to submissions to Github.com/jmmv/kyua. FreeBSD no longer considers jmmv (and thus, Google) upstream for ATF and Kyua. Instead the projects are forked into the github.com/freebsd/ organization. Best, Conrad From owner-svn-src-head@freebsd.org Tue Mar 24 02:41:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FB31277EBE; Tue, 24 Mar 2020 02:41:52 +0000 (UTC) (envelope-from bdrewery@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48mb9q4HrGz4fSF; Tue, 24 Mar 2020 02:41:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id F3BF230E0; Tue, 24 Mar 2020 02:41:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 156481F857; Tue, 24 Mar 2020 02:41:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id wLMIbN0I9XsF; Tue, 24 Mar 2020 02:41:47 +0000 (UTC) Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com C31A81F84F To: cem@freebsd.org Cc: src-committers , svn-src-all , svn-src-head References: <202003231901.02NJ1OLX063587@repo.freebsd.org> <512de064-a546-8ba4-1a15-aeadb0f515ff@FreeBSD.org> From: Bryan Drewery Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAG0JEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hLu BQkNPvODAAoJEDXXcbtuRpfP9rMH/3f7cfX5rzyEV5QNfV/wS4jFukLoPZ4+nCM/TKxH3pEX 2bLbeQbkk6La8cueQ5Lpoht5XFZ18Y5TbMittngltrlNzoDD0h9are24OkDFGim3afJU7tkj IGQa1if+re+vI5BhzYwRhj0oKXzBi39M5oePd3L1dXfx83rg2FPyZBdIejsz6fR74T3JVkbd 6k2l5/3Zk2uiNMy+eBfDRgYE1E6CP28kV0nCeGKZgSVso0kGUUHud7voKqGVpMvbd0mE4pp4 PE5YJaFPjrll9miaDAvdU8LGIq5n6+aXPLKoQ/QNl6mg6ifgI6FfKILOkTizLW8E5PBSNnCm NapQ55yjm125AQ0EUmmGawEIAKJUU9+Q19oW1RK5jTf3m56j+szIc8Y9DaLC8REUKl4UZJBK BqCl6c0cukVApOD92XoU6hJPm2rLEyp/IcYcPPNTnVu8D8h9oag2L8EiFN7+2hk0xG+lwjc8 uOIZycme7AIJsBU4AZ1v63lxm2k104hwpiatgbe71GIGl7p1MX6ousP/wGzXCOF25Dx9w02C eRe7zEMfhnFjSUhzdCC9han2+KaVB7qIqNR3b8NfbwRNlwPmHqlhXffUow9OsQjSnTK8WKNR lx7xzVccXIvWP2wECFrmqmzMmXpSrmIuiWEpFwZ9x2a0Pva8dCNRiCVTK51IlRXKjaAxiN1u IUrMm6UAEQEAAYkBPAQYAQoAJgIbDBYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hL4BQkN PvONAAoJEDXXcbtuRpfPCjcH/ivBsOpdpebpgLizSNU5/X4yWN5Aixsc9VBnQhGKAKnMINJQ VMpA55sD2JSPwloXYM/B3qyPJRS/9cwIuX5LDNKKOZU3Qp+TzleynM15/xea14orWYRGRict YHBM3Cnqp7OD8K6Q1uhs0fTxyJP7PZ/G0+7Corlf1DlHhDt6C2HldRPFvAvAgl6sR9Wzgcb7 rzub2HVtbJgl6YHbgyAG7x9NpXFqzx1JLAMdpt2DIYwoi+oMdRQlBIwNuKjQjCGzuXHandd3 kGvBAsyJpQ+coEep9UzwANaV28cXrFr2R4FSOcR50rBA2Nh/vqUYfpsvBvJlwuKAoV1djVHa ihNeL5E= Organization: FreeBSD Message-ID: Date: Mon, 23 Mar 2020 19:41:45 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HcYPbjaHZkFZswqSBQUDIGibJxR3hFjOw" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 02:41:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HcYPbjaHZkFZswqSBQUDIGibJxR3hFjOw Content-Type: multipart/mixed; boundary="Spd4ES5HlivUe0UmCyAasDgEdIdBPCo3C"; protected-headers="v1" From: Bryan Drewery To: cem@freebsd.org Cc: src-committers , svn-src-all , svn-src-head Message-ID: Subject: Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bin... References: <202003231901.02NJ1OLX063587@repo.freebsd.org> <512de064-a546-8ba4-1a15-aeadb0f515ff@FreeBSD.org> In-Reply-To: --Spd4ES5HlivUe0UmCyAasDgEdIdBPCo3C Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/23/2020 6:54 PM, Conrad Meyer wrote: > On Mon, Mar 23, 2020 at 6:25 PM Bryan Drewery wr= ote: >> >> On 3/23/2020 12:01 PM, Brooks Davis wrote: >>> Author: brooks >>> Date: Mon Mar 23 19:01:23 2020 >>> New Revision: 359260 >>> URL: https://svnweb.freebsd.org/changeset/base/359260 >>> >>> Log: >>> Import the kyua test framework. >> >> Dumb question but are we allowed to modify this code without a google >> contributor agreement? I was under the impression that the license was= >> restrictive in some regard like that. >=20 > Not a dumb question. Yes, we're allowed to modify the code. The > license is just a boring BSD 3-clause: > https://svnweb.freebsd.org/base/head/contrib/kyua/LICENSE?view=3Dmarkup= >=20 > The restrictions around Google contributor CLA only applied to > submissions to Github.com/jmmv/kyua. FreeBSD no longer considers jmmv > (and thus, Google) upstream for ATF and Kyua. Instead the projects > are forked into the github.com/freebsd/ organization. >=20 Great. I wasn't far off then. Infeasible to modify it pre-fork but now it's not a problem. Thanks. --=20 Regards, Bryan Drewery --Spd4ES5HlivUe0UmCyAasDgEdIdBPCo3C-- --HcYPbjaHZkFZswqSBQUDIGibJxR3hFjOw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGSBAEBCgB9FiEE+Rc8ssOq6npcih8JNddxu25Gl88FAl55c2lfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 MTczQ0IyQzNBQUVBN0E1QzhBMUYwOTM1RDc3MUJCNkU0Njk3Q0YACgkQNddxu25G l8/ABgf4t70QbtZ/hKmg6K/Cet4n7GA7rQqOIrOHMFeh8F6it3cIE9qOHyzrlfc4 dtEZSZnOVpAogA/YTuux9zvcwtgiL9E4HAjrFceQ0xjGUjRS9Uyj6T0mCkLYcN/e yhBY21l0THH6/HZVBmLa8htu6fpubFnNM7hCvyLRqGMSveDR+p+uPBgK4trnXKVk h2W2fm2bD9yXvqGBu2Feo6sYF96BKH5t4HMC9PhFjPstZ+Kytz7hIumCpjsBv0io xXtOI/aT/olyODh28wquqQ3c8Ji989vWNw/HWcni2cyoMoHfHZM4ycVO1WIfsoK9 n1TitO2gB1dqo4fI69daTd8+UXps =bYqp -----END PGP SIGNATURE----- --HcYPbjaHZkFZswqSBQUDIGibJxR3hFjOw-- From owner-svn-src-head@freebsd.org Tue Mar 24 06:16:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C1AB927B635; Tue, 24 Mar 2020 06:16:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mgxr2Brpz4nHJ; Tue, 24 Mar 2020 06:16:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 6CF485159; Tue, 24 Mar 2020 06:16:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from [127.0.0.1] (10.246.39.62.rev.sfr.net [62.39.246.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ivaldir.etoilebsd.net (Postfix) with ESMTPSA id 62AE1E3328; Tue, 24 Mar 2020 07:16:45 +0100 (CET) Date: Tue, 24 Mar 2020 06:16:44 +0000 (UTC) From: Baptiste Daroussin To: Bryan Drewery Cc: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: In-Reply-To: <87469ad7-182c-1cd7-489c-e1d2cb60e4a8@FreeBSD.org> References: <202003240109.02O195Gs086052@repo.freebsd.org> <87469ad7-182c-1cd7-489c-e1d2cb60e4a8@FreeBSD.org> Subject: Re: svn commit: r359267 - in head: . share/mk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Correlation-ID: X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 06:16:48 -0000 24 mars 2020 02:24:21 Bryan Drewery : > On 3/23/2020 6:09 PM, Emmanuel Vadot wrote: > > > Author: manu > > Date: Tue Mar 24 01:09:04 2020 > > New Revision: 359267 > > URL: https://svnweb.freebsd.org/changeset/base/359267 > > > > Log: > > bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB > > > > If we're building an internal lib do not bother including bsd.incs.mk so we > > will not install the headers. > > This also "solves" a problem with pkgbase where a libXXX-development package > > is created and due to how packages are created we add a dependency to a > > libXXX package that doesn't exists. > > > > Reported by: pizzamig > > Reviewed by: pizzamig bapt emaste > > Differential Revision: https://reviews.freebsd.org/D24166 > > > > Modified: > > head/ObsoleteFiles.inc > > head/share/mk/bsd.lib.mk > > > > Modified: head/ObsoleteFiles.inc > > ============================================================================== > > --- head/ObsoleteFiles.inc Tue Mar 24 01:08:06 2020 (r359266) > > +++ head/ObsoleteFiles.inc Tue Mar 24 01:09:04 2020 (r359267) > > @@ -36,6 +36,11 @@ > > # xargs -n1 | sort | uniq -d; > > # done > > > > +# 20200323: INTERNALLIB don't install headers anymore > > +OLD_FILES+=/usr/include/libelftc.h > > +OLD_FILES+=/usr/include/libifconfig.h > > +OLD_FILES+=/usr/include/libpmcstat.h > > + > > > > lib/libelftc/Makefile:INCS= libelftc.h > lib/libifconfig/Makefile:INCSDIR= ${INCLUDEDIR} > lib/libifconfig/Makefile:INCS= libifconfig.h > lib/libpmcstat/Makefile:INCS= libpmcstat.h > > This commit seems incomplete or wrong due to the leftover logic. > > This is on purpose so if anyone wants to promote those from internallib to something else, they can They just have to remove INTERNALLIB Best regards, Bapt From owner-svn-src-head@freebsd.org Tue Mar 24 07:08:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B690727C458; Tue, 24 Mar 2020 07:08:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mj502Gz4z4TnG; Tue, 24 Mar 2020 07:08:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 670EF236D0; Tue, 24 Mar 2020 07:08:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02O783Rf002671; Tue, 24 Mar 2020 07:08:03 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02O783RU002670; Tue, 24 Mar 2020 07:08:03 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003240708.02O783RU002670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 24 Mar 2020 07:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359269 - head/rescue/rescue X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/rescue/rescue X-SVN-Commit-Revision: 359269 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 07:08:04 -0000 Author: manu Date: Tue Mar 24 07:08:02 2020 New Revision: 359269 URL: https://svnweb.freebsd.org/changeset/base/359269 Log: rescue: Remove useless linking with libl Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Tue Mar 24 01:29:18 2020 (r359268) +++ head/rescue/rescue/Makefile Tue Mar 24 07:08:02 2020 (r359269) @@ -55,7 +55,7 @@ CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df ed expr getfacl hostname kenv kill ln ls mkdir mv \ pkill ps pwd realpath rm rmdir setfacl sh sleep stty \ sync test -CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -lelf -ll -ltermcapw -lutil -lxo +CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -lelf -ltermcapw -lutil -lxo CRUNCH_BUILDTOOLS+= bin/sh # Additional options for specific programs From owner-svn-src-head@freebsd.org Tue Mar 24 07:08:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C4EB27C4D6; Tue, 24 Mar 2020 07:08:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mj5k5JDQz4VNs; Tue, 24 Mar 2020 07:08:42 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31B49236D1; Tue, 24 Mar 2020 07:08:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02O78eqJ002738; Tue, 24 Mar 2020 07:08:40 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02O78elF002737; Tue, 24 Mar 2020 07:08:40 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003240708.02O78elF002737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 24 Mar 2020 07:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359270 - head/usr.sbin/auditdistd X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/usr.sbin/auditdistd X-SVN-Commit-Revision: 359270 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 07:08:44 -0000 Author: manu Date: Tue Mar 24 07:08:39 2020 New Revision: 359270 URL: https://svnweb.freebsd.org/changeset/base/359270 Log: auditdistd: Remove useless linking with libl Modified: head/usr.sbin/auditdistd/Makefile Modified: head/usr.sbin/auditdistd/Makefile ============================================================================== --- head/usr.sbin/auditdistd/Makefile Tue Mar 24 07:08:02 2020 (r359269) +++ head/usr.sbin/auditdistd/Makefile Tue Mar 24 07:08:39 2020 (r359270) @@ -21,7 +21,7 @@ SRCS+= sandbox.c sender.c subr.c SRCS+= token.l trail.c MAN= auditdistd.8 auditdistd.conf.5 -LIBADD+= l pthread util crypto ssl +LIBADD+= pthread util crypto ssl YFLAGS+=-v From owner-svn-src-head@freebsd.org Tue Mar 24 12:27:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FC4A2A4B34; Tue, 24 Mar 2020 12:27:13 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mr9D6RK7z43jV; Tue, 24 Mar 2020 12:27:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B6DB27489; Tue, 24 Mar 2020 12:27:03 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OCR3Ru093507; Tue, 24 Mar 2020 12:27:03 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OCR2nn093504; Tue, 24 Mar 2020 12:27:02 GMT (envelope-from ae@FreeBSD.org) Message-Id: <202003241227.02OCR2nn093504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 24 Mar 2020 12:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359271 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 359271 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 12:27:13 -0000 Author: ae Date: Tue Mar 24 12:27:02 2020 New Revision: 359271 URL: https://svnweb.freebsd.org/changeset/base/359271 Log: Use IP_FW_NAT44_DESTROY opcode for IP_FW3 socket option to destroy NAT instance. The NAT44 group of opcodes for IP_FW3 socket option is modern way to control NAT instances and this method can be used in future to switch from numeric to named NAT instances, like was done for ipfw tables. The IP_FW_NAT_DEL opcode is the last remnant of old ipfw_ctl control plane that doesn't support versioned operations. This interface will be retired soon. Reviewed by: melifaro MFC after: 10 days Sponsored by: Yandex LLC Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Tue Mar 24 07:08:39 2020 (r359270) +++ head/sbin/ipfw/ipfw2.c Tue Mar 24 12:27:02 2020 (r359271) @@ -3328,13 +3328,7 @@ ipfw_delete(char *av[]) j = strtol(sep + 1, NULL, 10); av++; if (co.do_nat) { - exitval = do_cmd(IP_FW_NAT_DEL, &i, sizeof i); - if (exitval) { - exitval = EX_UNAVAILABLE; - if (co.do_quiet) - continue; - warn("nat %u not available", i); - } + exitval = ipfw_delete_nat(i); } else if (co.do_pipe) { exitval = ipfw_delete_pipe(co.do_pipe, i); } else { Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Tue Mar 24 07:08:39 2020 (r359270) +++ head/sbin/ipfw/ipfw2.h Tue Mar 24 12:27:02 2020 (r359271) @@ -387,6 +387,7 @@ extern int resvd_set_number; /* first-level command handlers */ void ipfw_add(char *av[]); void ipfw_show_nat(int ac, char **av); +int ipfw_delete_nat(int i); void ipfw_config_pipe(int ac, char **av); void ipfw_config_nat(int ac, char **av); void ipfw_sets_handler(char *av[]); Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Tue Mar 24 07:08:39 2020 (r359270) +++ head/sbin/ipfw/nat.c Tue Mar 24 12:27:02 2020 (r359271) @@ -939,6 +939,34 @@ ipfw_config_nat(int ac, char **av) } } +static void +nat_fill_ntlv(ipfw_obj_ntlv *ntlv, int i) +{ + + ntlv->head.type = IPFW_TLV_EACTION_NAME(1); /* it doesn't matter */ + ntlv->head.length = sizeof(ipfw_obj_ntlv); + ntlv->idx = 1; + ntlv->set = 0; /* not yet */ + snprintf(ntlv->name, sizeof(ntlv->name), "%d", i); +} + +int +ipfw_delete_nat(int i) +{ + ipfw_obj_header oh; + int ret; + + memset(&oh, 0, sizeof(oh)); + nat_fill_ntlv(&oh.ntlv, i); + ret = do_set3(IP_FW_NAT44_DESTROY, &oh.opheader, sizeof(oh)); + if (ret == -1) { + if (!co.do_quiet) + warn("nat %u not available", i); + return (EX_UNAVAILABLE); + } + return (EX_OK); +} + struct nat_list_arg { uint16_t cmd; int is_all; From owner-svn-src-head@freebsd.org Tue Mar 24 17:26:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 019C62629DC; Tue, 24 Mar 2020 17:26:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48myp53Y6Lz3xQC; Tue, 24 Mar 2020 17:26:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5CEF3273; Tue, 24 Mar 2020 17:25:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OHPvcT073496; Tue, 24 Mar 2020 17:25:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OHPvPi073495; Tue, 24 Mar 2020 17:25:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003241725.02OHPvPi073495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 24 Mar 2020 17:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359273 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 359273 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 17:26:07 -0000 Author: emaste Date: Tue Mar 24 17:25:56 2020 New Revision: 359273 URL: https://svnweb.freebsd.org/changeset/base/359273 Log: iflib: split compound assertion ThunderX cluster systems are panicking on boot with a failed assertion MPASS(gtask != NULL && gtask->gt_taskqueue != NULL). Split the assertion so that it's clear which part is failing. Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Mar 24 17:16:52 2020 (r359272) +++ head/sys/net/iflib.c Tue Mar 24 17:25:56 2020 (r359273) @@ -6197,7 +6197,8 @@ iflib_admin_intr_deferred(if_ctx_t ctx) struct grouptask *gtask; gtask = &ctx->ifc_admin_task; - MPASS(gtask != NULL && gtask->gt_taskqueue != NULL); + MPASS(gtask != NULL); + MPASS(gtask->gt_taskqueue != NULL); #endif GROUPTASK_ENQUEUE(&ctx->ifc_admin_task); From owner-svn-src-head@freebsd.org Tue Mar 24 17:35:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4795D262CC5; Tue, 24 Mar 2020 17:35:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mz0t0gDPz41XK; Tue, 24 Mar 2020 17:35:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34DC6308E; Tue, 24 Mar 2020 17:16:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OHGrH4067138; Tue, 24 Mar 2020 17:16:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OHGrq9067137; Tue, 24 Mar 2020 17:16:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003241716.02OHGrq9067137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Mar 2020 17:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359272 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359272 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 17:35:27 -0000 Author: kib Date: Tue Mar 24 17:16:52 2020 New Revision: 359272 URL: https://svnweb.freebsd.org/changeset/base/359272 Log: kern_copy_file_range(): check the file type. The syscall can only operate on valid vnode types. Reported and tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Mar 24 12:27:02 2020 (r359271) +++ head/sys/kern/vfs_syscalls.c Tue Mar 24 17:16:52 2020 (r359272) @@ -4735,9 +4735,25 @@ kern_copy_file_range(struct thread *td, int infd, off_ error = fget_read(td, infd, &cap_read_rights, &infp); if (error != 0) goto out; + if (infp->f_ops == &badfileops) { + error = EBADF; + goto out; + } + if (infp->f_vnode == NULL) { + error = EINVAL; + goto out; + } error = fget_write(td, outfd, &cap_write_rights, &outfp); if (error != 0) goto out; + if (outfp->f_ops == &badfileops) { + error = EBADF; + goto out; + } + if (outfp->f_vnode == NULL) { + error = EINVAL; + goto out; + } /* Set the offset pointers to the correct place. */ if (inoffp == NULL) From owner-svn-src-head@freebsd.org Tue Mar 24 17:54:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B65926491E; Tue, 24 Mar 2020 17:54:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mzR75sy5z482p; Tue, 24 Mar 2020 17:54:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 882D93B18; Tue, 24 Mar 2020 17:54:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OHsZYV091705; Tue, 24 Mar 2020 17:54:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OHsZRa091704; Tue, 24 Mar 2020 17:54:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003241754.02OHsZRa091704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 24 Mar 2020 17:54:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359274 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 359274 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 17:54:44 -0000 Author: emaste Date: Tue Mar 24 17:54:34 2020 New Revision: 359274 URL: https://svnweb.freebsd.org/changeset/base/359274 Log: iflib: simplify MPASS assertion Submitted by: andrew Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Mar 24 17:25:56 2020 (r359273) +++ head/sys/net/iflib.c Tue Mar 24 17:54:34 2020 (r359274) @@ -6193,14 +6193,8 @@ iflib_rx_intr_deferred(if_ctx_t ctx, int rxqid) void iflib_admin_intr_deferred(if_ctx_t ctx) { -#ifdef INVARIANTS - struct grouptask *gtask; - gtask = &ctx->ifc_admin_task; - MPASS(gtask != NULL); - MPASS(gtask->gt_taskqueue != NULL); -#endif - + MPASS(ctx->ifc_admin_task.gt_taskqueue != NULL); GROUPTASK_ENQUEUE(&ctx->ifc_admin_task); } From owner-svn-src-head@freebsd.org Tue Mar 24 18:16:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BFDB265097; Tue, 24 Mar 2020 18:16:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mzvy3Mkdz4GpL; Tue, 24 Mar 2020 18:16:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B98E3F2A; Tue, 24 Mar 2020 18:16:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OIG37P003872; Tue, 24 Mar 2020 18:16:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OIG3IO003871; Tue, 24 Mar 2020 18:16:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202003241816.02OIG3IO003871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 24 Mar 2020 18:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359275 - head X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359275 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 18:16:15 -0000 Author: jhb Date: Tue Mar 24 18:16:02 2020 New Revision: 359275 URL: https://svnweb.freebsd.org/changeset/base/359275 Log: Disable rarely used architecture variants in make universe by default. If EXTRA_TARGETS is defined, build all supported architecture variants. By default, build architecture variants needed to provide code coverage or that are commonly used. Use this to disable building of all the hard-float and little-endian MIPS architecture variants along with n32 by default. Reviewed by: rpokala Discussed with: imp, emaste Differential Revision: https://reviews.freebsd.org/D24178 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Mar 24 17:54:34 2020 (r359274) +++ head/Makefile Tue Mar 24 18:16:02 2020 (r359275) @@ -483,16 +483,17 @@ worlds: .PHONY .if make(universe) || make(universe_kernels) || make(tinderbox) || \ make(targets) || make(universe-toolchain) # -# Always build architectures supported by clang. Only build architectures -# only supported by GCC if a suitable toolchain is present or enabled. -# In all cases, if the user specifies TARGETS on the command line, -# honor that most of all. +# Don't build rarely used architectures unless requested. # +.if defined(EXTRA_TARGETS) +EXTRA_ARCHES_mips= mipsel mipshf mipselhf mips64el mips64hf mips64elhf +EXTRA_ARCHES_mips+= mipsn32 +.endif TARGETS?=amd64 arm arm64 i386 mips powerpc riscv _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= armv6 armv7 TARGET_ARCHES_arm64?= aarch64 -TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf +TARGET_ARCHES_mips?= mips mips64 ${EXTRA_ARCHES_mips} # powerpcspe excluded until clang fixed TARGET_ARCHES_powerpc?= powerpc powerpc64 TARGET_ARCHES_riscv?= riscv64 riscv64sf From owner-svn-src-head@freebsd.org Tue Mar 24 18:17:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 224EA2650F4; Tue, 24 Mar 2020 18:17:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48mzwy2RM5z4H6b; Tue, 24 Mar 2020 18:17:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4303C3F32; Tue, 24 Mar 2020 18:16:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OIGuZl003999; Tue, 24 Mar 2020 18:16:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OIGucf003998; Tue, 24 Mar 2020 18:16:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003241816.02OIGucf003998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 24 Mar 2020 18:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359277 - head/usr.sbin/newsyslog/tests X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.sbin/newsyslog/tests X-SVN-Commit-Revision: 359277 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 18:17:10 -0000 Author: markj Date: Tue Mar 24 18:16:56 2020 New Revision: 359277 URL: https://svnweb.freebsd.org/changeset/base/359277 Log: Add regression tests for newsyslog.conf's p flag. While here do a bit of cleanup: - declare local variables as such, - make tmpdir_create() clean up logfile directories, to handle a previously interrupt test run more gracefully. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh ============================================================================== --- head/usr.sbin/newsyslog/tests/legacy_test.sh Tue Mar 24 18:16:36 2020 (r359276) +++ head/usr.sbin/newsyslog/tests/legacy_test.sh Tue Mar 24 18:16:56 2020 (r359277) @@ -194,7 +194,8 @@ ckstr() tmpdir_create() { - mkdir -p ${TMPDIR}/log ${TMPDIR}/alog + rm -rf ${TMPDIR}/log ${TMPDIR}/alog + mkdir ${TMPDIR}/log ${TMPDIR}/alog cd ${TMPDIR}/log } @@ -211,6 +212,8 @@ run_newsyslog() } tests_normal_rotate() { + local dir ext name_postfix newsyslog_args + ext="$1" dir="$2" @@ -286,6 +289,8 @@ tests_normal_rotate() { } tests_normal_rotate_keepn() { + local cnt dir ext name_postfix newsyslog_args + cnt="$1" ext="$2" dir="$3" @@ -354,6 +359,8 @@ tests_normal_rotate_keepn() { } tests_time_rotate() { + local dir ext name_postfix newsyslog_args + ext="$1" dir="$2" @@ -413,6 +420,8 @@ tests_time_rotate() { } tests_rfc5424() { + local dir ext name_postfix newsyslog_args + ext="$1" dir="$2" @@ -451,7 +460,73 @@ tests_rfc5424() { tmpdir_clean } -echo 1..180 +tests_p_flag_rotate() { + local ext + + ext="$1" + + tmpdir_create + + begin "create file" + run_newsyslog -C + ckfe $LOGFNAME + cknt ${LOGFNAME}.0 + cknt ${LOGFNAME}.0${ext} + end + + begin "rotate p flag 1 ${ext}" + run_newsyslog + ckfe $LOGFNAME + ckfe ${LOGFNAME}.0 + cknt ${LOGFNAME}.0${ext} + run_newsyslog + ckfe $LOGFNAME + ckfe ${LOGFNAME}.0 + cknt ${LOGFNAME}.0${ext} + ckfe ${LOGFNAME}.1${ext} + run_newsyslog + ckfe $LOGFNAME + ckfe ${LOGFNAME}.0 + cknt ${LOGFNAME}.0${ext} + ckfe ${LOGFNAME}.1${ext} + ckfe ${LOGFNAME}.2${ext} + end + + tmpdir_clean +} + +tests_normal_rotate_recompress() { + local ext + + ext=".gz" + + tmpdir_create + + begin "create file recompress" + run_newsyslog -C + ckfe $LOGFNAME + cknt ${LOGFNAME}.0${ext} + end + + begin "rotate normal 1" + run_newsyslog + ckfe $LOGFNAME + ckfe ${LOGFNAME}.0${ext} + cknt ${LOGFNAME}.1${ext} + end + + begin "rotate recompress 1" + gunzip ${LOGFNAME}.0${ext} + ckfe ${LOGFNAME}.0 + cknt ${LOGFNAME}.0${ext} + run_newsyslog + ckfe $LOGFNAME + ckfe ${LOGFNAME}.0${ext} + ckfe ${LOGFNAME}.1${ext} + end +} + +echo 1..185 mkdir -p ${TMPDIR} cd ${TMPDIR} @@ -556,5 +631,11 @@ tests_time_rotate "zst" "${TMPDIR}/alog/" echo "$LOGFPATH5424 640 3 * @T00 NCT" > newsyslog.conf echo "$LOGFPATH 640 3 * @T00 NC" >> newsyslog.conf tests_rfc5424 + +echo "$LOGFPATH 640 3 * @T00 NCpZ" > newsyslog.conf +tests_p_flag_rotate ".gz" + +echo "$LOGFPATH 640 3 * @T00 NCZ" > newsyslog.conf +tests_normal_rotate_recompress rm -rf "${TMPDIR}" From owner-svn-src-head@freebsd.org Tue Mar 24 18:25:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F7B82653E8; Tue, 24 Mar 2020 18:25:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n06Z3S67z4KpZ; Tue, 24 Mar 2020 18:25:26 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 582883F33; Tue, 24 Mar 2020 18:17:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OIHBvl004058; Tue, 24 Mar 2020 18:17:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OIHBgS004057; Tue, 24 Mar 2020 18:17:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003241817.02OIHBgS004057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 24 Mar 2020 18:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359278 - head/usr.sbin/newsyslog X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.sbin/newsyslog X-SVN-Commit-Revision: 359278 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 18:25:29 -0000 Author: markj Date: Tue Mar 24 18:17:10 2020 New Revision: 359278 URL: https://svnweb.freebsd.org/changeset/base/359278 Log: newsyslog: Add fallthrough comments to appease Coverity. CID: 1008165, 1008166, 1008167 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/newsyslog/ptimes.c Modified: head/usr.sbin/newsyslog/ptimes.c ============================================================================== --- head/usr.sbin/newsyslog/ptimes.c Tue Mar 24 18:16:56 2020 (r359277) +++ head/usr.sbin/newsyslog/ptimes.c Tue Mar 24 18:17:10 2020 (r359278) @@ -147,18 +147,22 @@ parse8601(struct ptime_data *ptime, const char *s) case 8: tm.tm_year = ((l / 1000000) - 19) * 100; l = l % 1000000; + /* FALLTHROUGH */ case 6: ptime->tmspec |= TSPEC_YEAR; tm.tm_year -= tm.tm_year % 100; tm.tm_year += l / 10000; l = l % 10000; + /* FALLTHROUGH */ case 4: ptime->tmspec |= TSPEC_MONTHOFYEAR; tm.tm_mon = (l / 100) - 1; l = l % 100; + /* FALLTHROUGH */ case 2: ptime->tmspec |= TSPEC_DAYOFMONTH; tm.tm_mday = l; + /* FALLTHROUGH */ case 0: break; default: @@ -180,12 +184,15 @@ parse8601(struct ptime_data *ptime, const char *s) case 6: tm.tm_sec = l % 100; l /= 100; + /* FALLTHROUGH */ case 4: tm.tm_min = l % 100; l /= 100; + /* FALLTHROUGH */ case 2: ptime->tmspec |= TSPEC_HOUROFDAY; tm.tm_hour = l; + /* FALLTHROUGH */ case 0: break; default: From owner-svn-src-head@freebsd.org Tue Mar 24 18:25:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9E6E2653F4; Tue, 24 Mar 2020 18:25:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n06b57VTz4Kps; Tue, 24 Mar 2020 18:25:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7179D3F30; Tue, 24 Mar 2020 18:16:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OIGbhG003942; Tue, 24 Mar 2020 18:16:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OIGbCM003941; Tue, 24 Mar 2020 18:16:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003241816.02OIGbCM003941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 24 Mar 2020 18:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359276 - head/usr.sbin/newsyslog X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.sbin/newsyslog X-SVN-Commit-Revision: 359276 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 18:25:30 -0000 Author: markj Date: Tue Mar 24 18:16:36 2020 New Revision: 359276 URL: https://svnweb.freebsd.org/changeset/base/359276 Log: newsyslog: Fix stack corruption when initializing a zipwork structure. This happens when compressing a previously uncompressed already-rotated file, as happens when handling the 'p' flag in newsyslog.conf. The file name is stored in a flexible array member, so these structures cannot be stack allocated. Also make sure that we call change_attrs() and do_zipwork() in dry-run mode; they handle this properly, contrary to the commit log message for r327451. CID: 1008168 Github PR: https://github.com/freebsd/freebsd/pull/427 MFC after: 2 weeks Submitted by: Radek Brich (original version) Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Tue Mar 24 18:16:02 2020 (r359275) +++ head/usr.sbin/newsyslog/newsyslog.c Tue Mar 24 18:16:36 2020 (r359276) @@ -1829,17 +1829,23 @@ do_rotate(const struct conf_entry *ent) else { /* XXX - Ought to be checking for failure! */ (void)rename(zfile1, zfile2); - change_attrs(zfile2, ent); - if (ent->compress && !strlen(logfile_suffix)) { - /* compress old rotation */ - struct zipwork_entry zwork; + } + change_attrs(zfile2, ent); + if (ent->compress && strlen(logfile_suffix) == 0) { + /* compress old rotation */ + struct zipwork_entry *zwork; + size_t sz; - memset(&zwork, 0, sizeof(zwork)); - zwork.zw_conf = ent; - zwork.zw_fsize = sizefile(zfile2); - strcpy(zwork.zw_fname, zfile2); - do_zipwork(&zwork); - } + sz = sizeof(*zwork) + strlen(zfile2) + 1; + zwork = calloc(1, sz); + if (zwork == NULL) + err(1, "calloc"); + + zwork->zw_conf = ent; + zwork->zw_fsize = sizefile(zfile2); + strcpy(zwork->zw_fname, zfile2); + do_zipwork(zwork); + free(zwork); } } From owner-svn-src-head@freebsd.org Tue Mar 24 18:35:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47473265905; Tue, 24 Mar 2020 18:35:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n0LM3P6Jz4P8f; Tue, 24 Mar 2020 18:35:38 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 697154350; Tue, 24 Mar 2020 18:35:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OIZYLV016100; Tue, 24 Mar 2020 18:35:34 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OIZYQm016099; Tue, 24 Mar 2020 18:35:34 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003241835.02OIZYQm016099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 24 Mar 2020 18:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359279 - head/sys/dev/ismt X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/ismt X-SVN-Commit-Revision: 359279 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 18:35:42 -0000 Author: jhibbits Date: Tue Mar 24 18:35:33 2020 New Revision: 359279 URL: https://svnweb.freebsd.org/changeset/base/359279 Log: ismt: Fix ISMT_DESC_ADDR_RW macro, slave addresses are already left-shifted Reverts r293369. The macro was orginally correct, since our SMBus framework, unlike i2c, already requires addresses to be 8-bit, LSB-cleared. MFC after: 3 days Sponsored by: Juniper Networks, Inc Modified: head/sys/dev/ismt/ismt.c Modified: head/sys/dev/ismt/ismt.c ============================================================================== --- head/sys/dev/ismt/ismt.c Tue Mar 24 18:17:10 2020 (r359278) +++ head/sys/dev/ismt/ismt.c Tue Mar 24 18:35:33 2020 (r359279) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #define ISMT_DESC_LPR 0x80 /* Large Packet Received */ /* Macros */ -#define ISMT_DESC_ADDR_RW(addr, is_read) ((addr << 1) | (is_read)) +#define ISMT_DESC_ADDR_RW(addr, is_read) ((addr) | (is_read)) /* iSMT General Register address offsets (SMBBAR + ) */ #define ISMT_GR_GCTRL 0x000 /* General Control */ From owner-svn-src-head@freebsd.org Tue Mar 24 18:50:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7B612666BE; Tue, 24 Mar 2020 18:50:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n0gM6P2Cz4Tpk; Tue, 24 Mar 2020 18:50:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 808114545; Tue, 24 Mar 2020 18:43:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OIhOPJ022010; Tue, 24 Mar 2020 18:43:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OIhN4e022006; Tue, 24 Mar 2020 18:43:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003241843.02OIhN4e022006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 24 Mar 2020 18:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359280 - in head/sys: arm64/arm64 riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: arm64/arm64 riscv/riscv X-SVN-Commit-Revision: 359280 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 18:50:25 -0000 Author: markj Date: Tue Mar 24 18:43:23 2020 New Revision: 359280 URL: https://svnweb.freebsd.org/changeset/base/359280 Log: Remove the secondary_stacks array in arm64 and riscv kernels. Instead, dynamically allocate a page for the boot stack of each AP when starting them up, like we do on x86. This shrinks the bss by MAXCPU*KSTACK_PAGES pages, which corresponds to 4MB on arm64 and 256KB on riscv. Duplicate the logic used on x86 to free the bootstacks, by using a sysinit to wait for each AP to switch to a thread before freeing its stack. While here, mark some static MD variables as such. Reviewed by: kib MFC after: 1 month Sponsored by: Juniper Networks, Klara Inc. Differential Revision: https://reviews.freebsd.org/D24158 Modified: head/sys/arm64/arm64/locore.S head/sys/arm64/arm64/mp_machdep.c head/sys/riscv/riscv/locore.S head/sys/riscv/riscv/mp_machdep.c Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Tue Mar 24 18:35:33 2020 (r359279) +++ head/sys/arm64/arm64/locore.S Tue Mar 24 18:43:23 2020 (r359280) @@ -214,11 +214,10 @@ ENTRY(mpentry) br x15 mp_virtdone: - ldr x4, =secondary_stacks - mov x5, #(PAGE_SIZE * KSTACK_PAGES) - mul x5, x0, x5 - add sp, x4, x5 - + /* Start using the AP boot stack */ + ldr x4, =bootstack + ldr x4, [x4] + mov sp, x4 b init_secondary END(mpentry) #endif Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Tue Mar 24 18:35:33 2020 (r359279) +++ head/sys/arm64/arm64/mp_machdep.c Tue Mar 24 18:43:23 2020 (r359280) @@ -123,7 +123,6 @@ static void ipi_preempt(void *); static void ipi_rendezvous(void *); static void ipi_stop(void *); -struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; /* @@ -136,10 +135,18 @@ static int cpu0 = -1; void mpentry(unsigned long cpuid); void init_secondary(uint64_t); -uint8_t secondary_stacks[MAXCPU - 1][PAGE_SIZE * KSTACK_PAGES] __aligned(16); +/* Synchronize AP startup. */ +static struct mtx ap_boot_mtx; +/* Stacks for AP initialization, discarded once idle threads are started. */ +void *bootstack; +static void *bootstacks[MAXCPU]; + +/* Count of started APs, used to synchronize access to bootstack. */ +static volatile int aps_started; + /* Set to 1 once we're ready to let the APs out of the pen. */ -volatile int aps_ready = 0; +static volatile int aps_ready; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; @@ -205,14 +212,14 @@ init_secondary(uint64_t cpu) "mov x18, %0 \n" "msr tpidr_el1, %0" :: "r"(pcpup)); - /* Spin until the BSP releases the APs */ - while (!aps_ready) + /* Signal the BSP and spin until it has released all APs. */ + atomic_add_int(&aps_started, 1); + while (!atomic_load_int(&aps_ready)) __asm __volatile("wfe"); /* Initialize curthread */ KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); pcpup->pc_curthread = pcpup->pc_idlethread; - pcpup->pc_curpcb = pcpup->pc_idlethread->td_pcb; /* Initialize curpmap to match TTBR0's current setting. */ pmap0 = vmspace_pmap(&vmspace0); @@ -250,6 +257,11 @@ init_secondary(uint64_t cpu) kcsan_cpu_init(cpu); + /* + * Assert that smp_after_idle_runnable condition is reasonable. + */ + MPASS(PCPU_GET(curpcb) == NULL); + /* Enter the scheduler */ sched_throw(NULL); @@ -257,6 +269,24 @@ init_secondary(uint64_t cpu) /* NOTREACHED */ } +static void +smp_after_idle_runnable(void *arg __unused) +{ + struct pcpu *pc; + int cpu; + + for (cpu = 1; cpu < mp_ncpus; cpu++) { + if (bootstacks[cpu] != NULL) { + pc = pcpu_find(cpu); + while (atomic_load_ptr(&pc->pc_curpcb) == NULL) + cpu_spinwait(); + kmem_free((vm_offset_t)bootstacks[cpu], PAGE_SIZE); + } + } +} +SYSINIT(smp_after_idle_runnable, SI_SUB_SMP, SI_ORDER_ANY, + smp_after_idle_runnable, NULL); + /* * Send IPI thru interrupt controller. */ @@ -391,7 +421,7 @@ start_cpu(u_int id, uint64_t target_cpu) struct pcpu *pcpup; vm_paddr_t pa; u_int cpuid; - int err; + int err, naps; /* Check we are able to start this cpu */ if (id > mp_maxid) @@ -405,7 +435,7 @@ start_cpu(u_int id, uint64_t target_cpu) /* * Rotate the CPU IDs to put the boot CPU as CPU 0. We keep the other - * CPUs ordered as the are likely grouped into clusters so it can be + * CPUs ordered as they are likely grouped into clusters so it can be * useful to keep that property, e.g. for the GICv3 driver to send * an IPI to all CPUs in the cluster. */ @@ -420,29 +450,41 @@ start_cpu(u_int id, uint64_t target_cpu) dpcpu[cpuid - 1] = (void *)kmem_malloc(DPCPU_SIZE, M_WAITOK | M_ZERO); dpcpu_init(dpcpu[cpuid - 1], cpuid); + bootstacks[cpuid] = (void *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); + + naps = atomic_load_int(&aps_started); + bootstack = (char *)bootstacks[cpuid] + PAGE_SIZE; + printf("Starting CPU %u (%lx)\n", cpuid, target_cpu); pa = pmap_extract(kernel_pmap, (vm_offset_t)mpentry); - err = psci_cpu_on(target_cpu, pa, cpuid); if (err != PSCI_RETVAL_SUCCESS) { /* * Panic here if INVARIANTS are enabled and PSCI failed to - * start the requested CPU. If psci_cpu_on returns PSCI_MISSING + * start the requested CPU. psci_cpu_on() returns PSCI_MISSING * to indicate we are unable to use it to start the given CPU. */ KASSERT(err == PSCI_MISSING || (mp_quirks & MP_QUIRK_CPULIST) == MP_QUIRK_CPULIST, - ("Failed to start CPU %u (%lx)\n", id, target_cpu)); + ("Failed to start CPU %u (%lx), error %d\n", + id, target_cpu, err)); pcpu_destroy(pcpup); kmem_free((vm_offset_t)dpcpu[cpuid - 1], DPCPU_SIZE); dpcpu[cpuid - 1] = NULL; + kmem_free((vm_offset_t)bootstacks[cpuid], PAGE_SIZE); + bootstacks[cpuid] = NULL; mp_ncpus--; /* Notify the user that the CPU failed to start */ - printf("Failed to start CPU %u (%lx)\n", id, target_cpu); - } else + printf("Failed to start CPU %u (%lx), error %d\n", + id, target_cpu, err); + } else { + /* Wait for the AP to switch to its boot stack. */ + while (atomic_load_int(&aps_started) < naps + 1) + cpu_spinwait(); CPU_SET(cpuid, &all_cpus); + } return (true); } Modified: head/sys/riscv/riscv/locore.S ============================================================================== --- head/sys/riscv/riscv/locore.S Tue Mar 24 18:35:33 2020 (r359279) +++ head/sys/riscv/riscv/locore.S Tue Mar 24 18:43:23 2020 (r359280) @@ -301,14 +301,8 @@ ENTRY(mpentry) beqz t1, 1b /* Setup stack pointer */ - lla t0, secondary_stacks - li t1, (PAGE_SIZE * KSTACK_PAGES) - mulw t2, t1, a0 - add t0, t0, t2 - add t0, t0, t1 - sub t0, t0, s9 - li t1, KERNBASE - add sp, t0, t1 + lla t0, bootstack + ld sp, 0(t0) /* Setup supervisor trap vector */ lla t0, mpva Modified: head/sys/riscv/riscv/mp_machdep.c ============================================================================== --- head/sys/riscv/riscv/mp_machdep.c Tue Mar 24 18:35:33 2020 (r359279) +++ head/sys/riscv/riscv/mp_machdep.c Tue Mar 24 18:43:23 2020 (r359280) @@ -87,7 +87,6 @@ static device_attach_t riscv64_cpu_attach; static int ipi_handler(void *); -struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; extern uint32_t boot_hart; @@ -98,13 +97,19 @@ static uint32_t cpu_reg[MAXCPU][2]; #endif static device_t cpu_list[MAXCPU]; -void mpentry(unsigned long cpuid); void init_secondary(uint64_t); -uint8_t secondary_stacks[MAXCPU][PAGE_SIZE * KSTACK_PAGES] __aligned(16); +static struct mtx ap_boot_mtx; +/* Stacks for AP initialization, discarded once idle threads are started. */ +void *bootstack; +static void *bootstacks[MAXCPU]; + +/* Count of started APs, used to synchronize access to bootstack. */ +static volatile int aps_started; + /* Set to 1 once we're ready to let the APs out of the pen. */ -volatile int aps_ready = 0; +static volatile int aps_ready; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; @@ -233,14 +238,14 @@ init_secondary(uint64_t hart) csr_set(sie, SIE_SSIE); csr_set(sip, SIE_SSIE); - /* Spin until the BSP releases the APs */ - while (!aps_ready) + /* Signal the BSP and spin until it has released all APs. */ + atomic_add_int(&aps_started, 1); + while (!atomic_load_int(&aps_ready)) __asm __volatile("wfi"); /* Initialize curthread */ KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); pcpup->pc_curthread = pcpup->pc_idlethread; - pcpup->pc_curpcb = pcpup->pc_idlethread->td_pcb; /* * Identify current CPU. This is necessary to setup @@ -274,6 +279,11 @@ init_secondary(uint64_t hart) mtx_unlock_spin(&ap_boot_mtx); + /* + * Assert that smp_after_idle_runnable condition is reasonable. + */ + MPASS(PCPU_GET(curpcb) == NULL); + /* Enter the scheduler */ sched_throw(NULL); @@ -281,6 +291,24 @@ init_secondary(uint64_t hart) /* NOTREACHED */ } +static void +smp_after_idle_runnable(void *arg __unused) +{ + struct pcpu *pc; + int cpu; + + for (cpu = 1; cpu < mp_ncpus; cpu++) { + if (bootstacks[cpu] != NULL) { + pc = pcpu_find(cpu); + while (atomic_load_ptr(&pc->pc_curpcb) == NULL) + cpu_spinwait(); + kmem_free((vm_offset_t)bootstacks[cpu], PAGE_SIZE); + } + } +} +SYSINIT(smp_after_idle_runnable, SI_SUB_SMP, SI_ORDER_ANY, + smp_after_idle_runnable, NULL); + static int ipi_handler(void *arg) { @@ -373,6 +401,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size struct pcpu *pcpup; uint64_t hart; u_int cpuid; + int naps; /* Check if this hart supports MMU. */ if (OF_getproplen(node, "mmu-type") < 0) @@ -419,8 +448,17 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size dpcpu[cpuid - 1] = (void *)kmem_malloc(DPCPU_SIZE, M_WAITOK | M_ZERO); dpcpu_init(dpcpu[cpuid - 1], cpuid); + bootstacks[cpuid] = (void *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); + + naps = atomic_load_int(&aps_started); + bootstack = (char *)bootstacks[cpuid] + PAGE_SIZE; + printf("Starting CPU %u (hart %lx)\n", cpuid, hart); - __riscv_boot_ap[hart] = 1; + atomic_store_32(&__riscv_boot_ap[hart], 1); + + /* Wait for the AP to switch to its boot stack. */ + while (atomic_load_int(&aps_started) < naps + 1) + cpu_spinwait(); CPU_SET(cpuid, &all_cpus); CPU_SET(hart, &all_harts); From owner-svn-src-head@freebsd.org Tue Mar 24 19:12:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44F3F267E0E; Tue, 24 Mar 2020 19:12:37 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n18z5ZhRz4dLB; Tue, 24 Mar 2020 19:12:34 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 883374B56; Tue, 24 Mar 2020 19:12:29 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OJCTlQ039799; Tue, 24 Mar 2020 19:12:29 GMT (envelope-from carlavilla@FreeBSD.org) Received: (from carlavilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OJCTVu039798; Tue, 24 Mar 2020 19:12:29 GMT (envelope-from carlavilla@FreeBSD.org) Message-Id: <202003241912.02OJCTVu039798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: carlavilla set sender to carlavilla@FreeBSD.org using -f From: Sergio Carlavilla Delgado Date: Tue, 24 Mar 2020 19:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359282 - head/usr.sbin/ypldap X-SVN-Group: head X-SVN-Commit-Author: carlavilla X-SVN-Commit-Paths: head/usr.sbin/ypldap X-SVN-Commit-Revision: 359282 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 19:12:37 -0000 Author: carlavilla (doc committer) Date: Tue Mar 24 19:12:28 2020 New Revision: 359282 URL: https://svnweb.freebsd.org/changeset/base/359282 Log: Correct path in EXAMPLES ypldap.conf.5 PR: 244743 Submitted by: alex@i.org.ua Patch by: alex@i.org.ua Approved by: bcr@(mentor), 0mp MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D24144 Modified: head/usr.sbin/ypldap/ypldap.conf.5 Modified: head/usr.sbin/ypldap/ypldap.conf.5 ============================================================================== --- head/usr.sbin/ypldap/ypldap.conf.5 Tue Mar 24 19:09:37 2020 (r359281) +++ head/usr.sbin/ypldap/ypldap.conf.5 Tue Mar 24 19:12:28 2020 (r359282) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 13 2016 $ +.Dd $Mdocdate: March 22 2020 $ .Dt YPLDAP.CONF 5 .Os .Sh NAME @@ -155,7 +155,7 @@ Use the supplied LDAP filter to retrieve password entr .It Pa /etc/ypldap.conf .Xr ypldap 8 configuration file. -.It Pa /usr/share/example/ypldap/ypldap.conf +.It Pa /usr/share/examples/ypldap/ypldap.conf .Xr ypldap 8 configuration file example. .El From owner-svn-src-head@freebsd.org Tue Mar 24 19:20:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3AC1268149; Tue, 24 Mar 2020 19:20:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n1Kv15k0z3CBV; Tue, 24 Mar 2020 19:20:19 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD8024B95; Tue, 24 Mar 2020 19:20:10 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OJKAwk040252; Tue, 24 Mar 2020 19:20:10 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OJKAIE040251; Tue, 24 Mar 2020 19:20:10 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003241920.02OJKAIE040251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 24 Mar 2020 19:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359283 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 359283 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 19:20:21 -0000 Author: cem Date: Tue Mar 24 19:20:10 2020 New Revision: 359283 URL: https://svnweb.freebsd.org/changeset/base/359283 Log: Fix PNP matching for iflib NIC drivers The previous descriptor string specified that all fields were significant for match. However, the only significant fields for in-tree drivers are vendor:devid, and the fictitious zero values constructed by PVID() did not match real subvendor, subdevice, revision, and/or class values, resulting in no automatic probe. If a future iflib driver needs to match on other criteria, the descriptor string can be updated accordingly. (E.g., "V32" and ~0 for unspecified values in PVID().) Reported by: mav Sponsored by: Dell EMC Isilon Modified: head/sys/net/iflib.h Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Tue Mar 24 19:12:28 2020 (r359282) +++ head/sys/net/iflib.h Tue Mar 24 19:20:10 2020 (r359283) @@ -173,8 +173,9 @@ typedef struct pci_vendor_info { #define PVID_OEM(vendor, devid, svid, sdevid, revid, name) {vendor, devid, svid, sdevid, revid, 0, name} #define PVID_END {0, 0, 0, 0, 0, 0, NULL} -#define IFLIB_PNP_DESCR "U32:vendor;U32:device;U32:subvendor;U32:subdevice;" \ - "U32:revision;U32:class;D:#" +/* No drivers in tree currently match on anything except vendor:device. */ +#define IFLIB_PNP_DESCR "U32:vendor;U32:device;U32:#;U32:#;" \ + "U32:#;U32:#;D:#" #define IFLIB_PNP_INFO(b, u, t) \ MODULE_PNP_INFO(IFLIB_PNP_DESCR, b, u, t, nitems(t) - 1) From owner-svn-src-head@freebsd.org Tue Mar 24 19:41:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 284172688FE; Tue, 24 Mar 2020 19:41:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n1pd21stz3LQ0; Tue, 24 Mar 2020 19:41:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFFB25029; Tue, 24 Mar 2020 19:33:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OJXLWJ051843; Tue, 24 Mar 2020 19:33:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OJXLfX051841; Tue, 24 Mar 2020 19:33:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003241933.02OJXLfX051841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 24 Mar 2020 19:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359284 - in head/lib/libc: gen sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/lib/libc: gen sys X-SVN-Commit-Revision: 359284 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 19:41:46 -0000 Author: imp Date: Tue Mar 24 19:33:21 2020 New Revision: 359284 URL: https://svnweb.freebsd.org/changeset/base/359284 Log: exec{l,v}{e,p} arrived in 7th Edition research Unix to support the Bourne Shell which introduced environment variables. Document that here. Verified by consulting the TUHS archive. Modified: head/lib/libc/gen/exec.3 head/lib/libc/sys/execve.2 Modified: head/lib/libc/gen/exec.3 ============================================================================== --- head/lib/libc/gen/exec.3 Tue Mar 24 19:20:10 2020 (r359283) +++ head/lib/libc/gen/exec.3 Tue Mar 24 19:33:21 2020 (r359284) @@ -322,6 +322,14 @@ and functions appeared in .At v2 . The +.Fn execlp , +.Fn execle , +.Fn execve , +and +.Fn execvp +functions appeared in +.At v7 . +The .Fn execvP function first appeared in .Fx 5.2 . Modified: head/lib/libc/sys/execve.2 ============================================================================== --- head/lib/libc/sys/execve.2 Tue Mar 24 19:20:10 2020 (r359283) +++ head/lib/libc/sys/execve.2 Tue Mar 24 19:33:21 2020 (r359284) @@ -346,7 +346,7 @@ system call conforms to The Open Group Extended API Se The .Fn execve system call appeared in -.Bx 4.2 . +.At V7 . The .Fn fexecve system call appeared in From owner-svn-src-head@freebsd.org Tue Mar 24 21:35:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2914E26B677; Tue, 24 Mar 2020 21:35:29 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n4Kr0C9Qz4YQN; Tue, 24 Mar 2020 21:35:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B773660B; Tue, 24 Mar 2020 21:28:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OLSnum019374; Tue, 24 Mar 2020 21:28:49 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OLSm4v019373; Tue, 24 Mar 2020 21:28:48 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003242128.02OLSm4v019373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 24 Mar 2020 21:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359285 - head/sys/dev/ichwd X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/ichwd X-SVN-Commit-Revision: 359285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 21:35:29 -0000 Author: jhibbits Date: Tue Mar 24 21:28:48 2020 New Revision: 359285 URL: https://svnweb.freebsd.org/changeset/base/359285 Log: ichwd: Add Atom C3000 watchdog ID. MFC after: 3 days Sponsored by: Juniper Networks, Inc Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Tue Mar 24 19:33:21 2020 (r359284) +++ head/sys/dev/ichwd/ichwd.c Tue Mar 24 21:28:48 2020 (r359285) @@ -297,6 +297,7 @@ static struct ichwd_device ichwd_devices[] = { static struct ichwd_device ichwd_smb_devices[] = { { DEVICEID_LEWISBURG_SMB, "Lewisburg watchdog timer", 10, 4 }, { DEVICEID_SRPTLP_SMB, "Sunrise Point-LP watchdog timer", 10, 4 }, + { DEVICEID_C3000, "Intel Atom C3000 watchdog timer", 10, 4 }, { 0, NULL, 0, 0 }, }; Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Tue Mar 24 19:33:21 2020 (r359284) +++ head/sys/dev/ichwd/ichwd.h Tue Mar 24 21:28:48 2020 (r359285) @@ -67,6 +67,7 @@ struct ichwd_softc { #define VENDORID_INTEL 0x8086 #define DEVICEID_BAYTRAIL 0x0f1c +#define DEVICEID_C3000 0x19df #define DEVICEID_CPT0 0x1c40 #define DEVICEID_CPT1 0x1c41 #define DEVICEID_CPT2 0x1c42 From owner-svn-src-head@freebsd.org Tue Mar 24 21:45:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8D8126BA63; Tue, 24 Mar 2020 21:45:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n4YM3dywz4cl5; Tue, 24 Mar 2020 21:45:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48C636811; Tue, 24 Mar 2020 21:37:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OLbZMh025154; Tue, 24 Mar 2020 21:37:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OLbZkW025153; Tue, 24 Mar 2020 21:37:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003242137.02OLbZkW025153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 24 Mar 2020 21:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359286 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359286 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 21:45:28 -0000 Author: emaste Date: Tue Mar 24 21:37:34 2020 New Revision: 359286 URL: https://svnweb.freebsd.org/changeset/base/359286 Log: Makefile.inc1: remove old (2018) stale dependency hacks We handle a number of stale dependency issues on an ad-hoc basis, in order to support ongoing NO_CLEAN builds. These hacks do not need to be maintained indefinitely; now remove those for issues that are more than a year old. Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Mar 24 21:28:48 2020 (r359285) +++ head/Makefile.inc1 Tue Mar 24 21:37:34 2020 (r359286) @@ -962,9 +962,8 @@ _cleanobj_fast_depend_hack: .PHONY fi .endif .endfor -# 20180604 r334626 brk sbrk # 20190916 r352703 shm_open -.for f in brk sbrk shm_open +.for f in shm_open @if [ -e "${OBJTOP}/lib/libc/.depend.${f}.o" ] && \ egrep -qw '${f}\.[sS]' ${OBJTOP}/lib/libc/.depend.${f}.o; then \ echo "Removing stale dependencies for ${f} syscall wrappers"; \ @@ -972,37 +971,6 @@ _cleanobj_fast_depend_hack: .PHONY ${_LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \ fi .endfor -# 20181013 r339348 bcopy reimplemented as .c -.for f in bcopy memcpy memmove - @if [ -e "${OBJTOP}/lib/libc/.depend.${f}.o" ] && \ - egrep -qw 'bcopy\.[sS]' ${OBJTOP}/lib/libc/.depend.${f}.o; then \ - echo "Removing stale dependencies for bcopy"; \ - rm -f ${OBJTOP}/lib/libc/.depend.${f}.* \ - ${_LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \ - fi -.endfor -# 20181115 r340463 bzero reimplemented as .c - @if [ -e "${OBJTOP}/lib/libc/.depend.bzero.o" ] && \ - egrep -qw 'bzero\.[sS]' ${OBJTOP}/lib/libc/.depend.bzero.o; then \ - echo "Removing stale dependencies for bzero"; \ - rm -f ${OBJTOP}/lib/libc/.depend.bzero.* \ - ${_LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.bzero.*}; \ - fi -# 20181009 track migration from ntp's embedded libevent to updated one - @if [ -e "${OBJTOP}/usr.sbin/ntp/libntpevent/.depend.bufferevent_openssl.o" ] && \ - egrep -q 'contrib/ntp/sntp/libevent/bufferevent_openssl.c' \ - ${OBJTOP}/usr.sbin/ntp/libntpevent/.depend.bufferevent_openssl.o ; then \ - echo "Removing stale libevent dependencies"; \ - rm -f ${OBJTOP}/usr.sbin/ntp/libntpevent/.depend.*; \ - fi - -# 20181209 r341759 track migration across wpa update - @if [ -e "${OBJTOP}/usr.sbin/wpa/wpa_supplicant/.depend.rrm.o" ] && \ - egrep -q 'src/ap/rrm.c' \ - ${OBJTOP}/usr.sbin/wpa/wpa_supplicant/.depend.rrm.o; then \ - echo "Removing stale wpa dependencies"; \ - rm -f ${OBJTOP}/usr.sbin/wpa/*/.depend*; \ - fi _worldtmp: .PHONY @echo From owner-svn-src-head@freebsd.org Tue Mar 24 21:46:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC50426BAC7; Tue, 24 Mar 2020 21:46:07 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48n4Z26ltvz4cyn; Tue, 24 Mar 2020 21:46:01 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 02OLjqoi035624 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 24 Mar 2020 14:45:52 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 02OLjqsI035623; Tue, 24 Mar 2020 14:45:52 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 24 Mar 2020 14:45:52 -0700 From: Gleb Smirnoff To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359168 - head Message-ID: <20200324214552.GD1292@FreeBSD.org> References: <202003201602.02KG2kKW065294@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202003201602.02KG2kKW065294@repo.freebsd.org> X-Rspamd-Queue-Id: 48n4Z26ltvz4cyn X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.24 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.64)[-0.640,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-0.60)[-0.599,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 21:46:08 -0000 On Fri, Mar 20, 2020 at 04:02:46PM +0000, Ed Maste wrote: E> Author: emaste E> Date: Fri Mar 20 16:02:45 2020 E> New Revision: 359168 E> URL: https://svnweb.freebsd.org/changeset/base/359168 E> E> Log: E> remove ancient pre-2000 ObsoleteFiles.inc entries E> E> We support 10.3 as the minimum version to install from, which was E> released in the mid-2010s. There's a lot of ancient ObsoleteFiles.inc E> history that serves no purpose today; start by removing entries from E> 1999 and earlier. I understand that rationale is to speedup 'make delete-old' times, and trimming the default file definitely makes sense. However, what about keeping the full ObsoleteFiles.inc version, at least for documenting purposes? -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Tue Mar 24 22:43:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFD6926CE26; Tue, 24 Mar 2020 22:43:35 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48n5rP1zCdz41MV; Tue, 24 Mar 2020 22:43:32 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-yb1-xb36.google.com with SMTP id g6so111012ybh.12; Tue, 24 Mar 2020 15:43:32 -0700 (PDT) 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=lyZB4npihWkGxxkjVFeOCJr7vxDp03j9D+csb7MPbxM=; b=DECrLFXcUXEjdP7k/GipyGx9ppNGhEV3K9rceRboGFwfW9wTS0BU6xYsqGpAOeDIuM wVmGjsNPmfeWyt1PKoYaKGbYsY7A/ucgMj0cRdmHm1YPAz3KWj84IjZvMxXNEL/wLkjF vw6GWBzZNaVzxqIIR6H4pGqZu78oVg/n9FyHn88aMZr7qRMNbqnKFoOQ/rKd/gToa396 cXd0z3BPOPO5TX9QMcvY01ELx24cVcsZEeAxJnnaKXRqFoJPX/VNgUZR/8oHdhICwR7b 3FIuEDxMEQpKoAbOrV6FSYQ+zq4eTgVhAtB7ERkWC+nxFv4SqEZIbi0mdXmflkaiyxKL 2GMA== 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=lyZB4npihWkGxxkjVFeOCJr7vxDp03j9D+csb7MPbxM=; b=aYmDQSwaBTSkAoZHUcm1OqhdnkCk2JVFjAhIR/RqlQoonKP5cBqvxKOqA4FXVaNiM+ miUaYl1xcQvFETaDt1o2r52PwjIN6tA/1NrNSgtHAX/Oit9Ng88HBTy7i0WRTUKNUbFT 7qWgs0vETaxuEQMbxB/GaJ5ndVGX5IDZmSx6XwqzK748zrWDnButjrVVRdKaMBVq3w4x N3bkzWVRXmotqHhhiE68gvD23kVAfT9i4rdmM2DocGegX2fG3T3ysNMpMo62KD0EI2Yn s843/3k40KBZ4ZpMyfKGy3mw658iwoBP88qX48eq7MQN+/ylqfy2oQZYsV0Kz6EQQJxO sX+w== X-Gm-Message-State: ANhLgQ30UuL9riZh9wwpLHJ9Xb2EhZhsrulkhu09Rf6caBcIs60SiCea 9pvo4VU2dtIpkNUVj7ReJNRwjGrLxndKVQXo50ogXA== X-Google-Smtp-Source: ADFU+vvyQQApd2RWBZN3NfhWT5pbr4cKSUZYAhk/l9U4QIR7BONa4CWbVhmGqScZsIg17uQATe1fDK/X2Qp48Vol+xg= X-Received: by 2002:a25:61c7:: with SMTP id v190mr947831ybb.314.1585089802939; Tue, 24 Mar 2020 15:43:22 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:8708:0:0:0:0:0 with HTTP; Tue, 24 Mar 2020 15:43:22 -0700 (PDT) In-Reply-To: <20200324214552.GD1292@FreeBSD.org> References: <202003201602.02KG2kKW065294@repo.freebsd.org> <20200324214552.GD1292@FreeBSD.org> From: Oliver Pinter Date: Tue, 24 Mar 2020 23:43:22 +0100 Message-ID: Subject: Re: svn commit: r359168 - head To: Gleb Smirnoff Cc: Ed Maste , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-Rspamd-Queue-Id: 48n5rP1zCdz41MV X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 22:43:36 -0000 Wouldn't there been a better way to split up the global obsoletefiles.inc file and put them in to specific components directory or at least split them up by release basis to easier the future deletions? On Tuesday, March 24, 2020, Gleb Smirnoff wrote: > On Fri, Mar 20, 2020 at 04:02:46PM +0000, Ed Maste wrote: > E> Author: emaste > E> Date: Fri Mar 20 16:02:45 2020 > E> New Revision: 359168 > E> URL: https://svnweb.freebsd.org/changeset/base/359168 > E> > E> Log: > E> remove ancient pre-2000 ObsoleteFiles.inc entries > E> > E> We support 10.3 as the minimum version to install from, which was > E> released in the mid-2010s. There's a lot of ancient ObsoleteFiles.inc > E> history that serves no purpose today; start by removing entries from > E> 1999 and earlier. > > I understand that rationale is to speedup 'make delete-old' times, and > trimming the default file definitely makes sense. However, what about > keeping the full ObsoleteFiles.inc version, at least for documenting > purposes? > > -- > Gleb Smirnoff > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Tue Mar 24 22:44:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64D1326CE9D; Tue, 24 Mar 2020 22:44:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n5sl6bvgz41mD; Tue, 24 Mar 2020 22:44:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 066BD77BE; Tue, 24 Mar 2020 22:44:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02OMiaES066787; Tue, 24 Mar 2020 22:44:36 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02OMiaE9066786; Tue, 24 Mar 2020 22:44:36 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003242244.02OMiaE9066786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 24 Mar 2020 22:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359287 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359287 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 22:44:45 -0000 Author: tuexen Date: Tue Mar 24 22:44:36 2020 New Revision: 359287 URL: https://svnweb.freebsd.org/changeset/base/359287 Log: Another cleanup of the timer code. Also be more pedantic about the parameters of the timer start and stop routines. Several inconsistencies have been fixed in earlier commits. Now they will be catched when running an INVARIANTS system. MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Mar 24 21:37:34 2020 (r359286) +++ head/sys/netinet/sctputil.c Tue Mar 24 22:44:36 2020 (r359287) @@ -1601,10 +1601,36 @@ sctp_handle_addr_wq(void) } } +/*- + * The following table shows which pointers for the inp, stcb, or net are + * stored for each timer after it was started. + * + *|Name |Timer |inp |stcb|net | + *|-----------------------------|-----------------------------|----|----|----| + *|SCTP_TIMER_TYPE_SEND |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_INIT |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_RECV |stcb->asoc.dack_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_SHUTDOWN |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_HEARTBEAT |net->hb_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_COOKIE |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_NEWCOOKIE |inp->sctp_ep.signature_change|Yes |No |No | + *|SCTP_TIMER_TYPE_PATHMTURAISE |net->pmtu_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_SHUTDOWNACK |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_ASCONF |stcb->asoc.asconf_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_SHUTDOWNGUARD|stcb->asoc.shut_guard_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_AUTOCLOSE |stcb->asoc.autoclose_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_STRRESET |stcb->asoc.strreset_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_INPKILL |inp->sctp_ep.signature_change|Yes |No |No | + *|SCTP_TIMER_TYPE_ASOCKILL |stcb->asoc.strreset_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_ADDR_WQ |SCTP_BASE_INFO(addr_wq_timer)|No |No |No | + *|SCTP_TIMER_TYPE_PRIM_DELETED |stcb->asoc.delete_prim_timer |Yes |Yes |No | + */ + void sctp_timeout_handler(void *t) { struct epoch_tracker et; + struct timeval tv; struct sctp_inpcb *inp; struct sctp_tcb *stcb; struct sctp_nets *net; @@ -1615,6 +1641,7 @@ sctp_timeout_handler(void *t) #endif int did_output; int type; + int i, secret; tmr = (struct sctp_timer *)t; inp = (struct sctp_inpcb *)tmr->ep; @@ -1629,48 +1656,31 @@ sctp_timeout_handler(void *t) #endif /* sanity checks... */ - if (tmr->self != (void *)tmr) { - /* - * SCTP_PRINTF("Stale SCTP timer fired (%p), ignoring...\n", - * (void *)tmr); - */ - CURVNET_RESTORE(); - return; - } + KASSERT(tmr->self == tmr, ("tmr->self corrupted")); + KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), ("Invalid timer type %d", tmr->type)); + type = tmr->type; tmr->stopped_from = 0xa001; - if (!SCTP_IS_TIMER_TYPE_VALID(tmr->type)) { - /* - * SCTP_PRINTF("SCTP timer fired with invalid type: 0x%x\n", - * tmr->type); - */ - CURVNET_RESTORE(); - return; - } - tmr->stopped_from = 0xa002; - if ((tmr->type != SCTP_TIMER_TYPE_ADDR_WQ) && (inp == NULL)) { - CURVNET_RESTORE(); - return; - } - /* if this is an iterator timeout, get the struct and clear inp */ - tmr->stopped_from = 0xa003; if (inp) { SCTP_INP_INCR_REF(inp); if ((inp->sctp_socket == NULL) && - ((tmr->type != SCTP_TIMER_TYPE_INPKILL) && - (tmr->type != SCTP_TIMER_TYPE_INIT) && - (tmr->type != SCTP_TIMER_TYPE_SEND) && - (tmr->type != SCTP_TIMER_TYPE_RECV) && - (tmr->type != SCTP_TIMER_TYPE_HEARTBEAT) && - (tmr->type != SCTP_TIMER_TYPE_SHUTDOWN) && - (tmr->type != SCTP_TIMER_TYPE_SHUTDOWNACK) && - (tmr->type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && - (tmr->type != SCTP_TIMER_TYPE_ASOCKILL))) { + ((type != SCTP_TIMER_TYPE_INPKILL) && + (type != SCTP_TIMER_TYPE_INIT) && + (type != SCTP_TIMER_TYPE_SEND) && + (type != SCTP_TIMER_TYPE_RECV) && + (type != SCTP_TIMER_TYPE_HEARTBEAT) && + (type != SCTP_TIMER_TYPE_SHUTDOWN) && + (type != SCTP_TIMER_TYPE_SHUTDOWNACK) && + (type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && + (type != SCTP_TIMER_TYPE_ASOCKILL))) { SCTP_INP_DECR_REF(inp); CURVNET_RESTORE(); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type = %d handler exiting due to closed socket\n", + type); return; } } - tmr->stopped_from = 0xa004; + tmr->stopped_from = 0xa002; if (stcb) { atomic_add_int(&stcb->asoc.refcnt, 1); if (stcb->asoc.state == 0) { @@ -1679,11 +1689,13 @@ sctp_timeout_handler(void *t) SCTP_INP_DECR_REF(inp); } CURVNET_RESTORE(); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type = %d handler exiting due to CLOSED association\n", + type); return; } } - type = tmr->type; - tmr->stopped_from = 0xa005; + tmr->stopped_from = 0xa003; SCTPDBG(SCTP_DEBUG_TIMER1, "Timer type %d goes off\n", type); if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) { if (inp) { @@ -1693,9 +1705,12 @@ sctp_timeout_handler(void *t) atomic_add_int(&stcb->asoc.refcnt, -1); } CURVNET_RESTORE(); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type = %d handler exiting due to not being active\n", + type); return; } - tmr->stopped_from = 0xa006; + tmr->stopped_from = 0xa004; if (stcb) { SCTP_TCB_LOCK(stcb); @@ -1708,12 +1723,13 @@ sctp_timeout_handler(void *t) SCTP_INP_DECR_REF(inp); } CURVNET_RESTORE(); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type = %d handler exiting due to CLOSED association\n", + type); return; } } else if (inp != NULL) { - if (type != SCTP_TIMER_TYPE_INPKILL) { - SCTP_INP_WLOCK(inp); - } + SCTP_INP_WLOCK(inp); } else { SCTP_WQ_ADDR_LOCK(); } @@ -1739,9 +1755,9 @@ sctp_timeout_handler(void *t) /* call the handler for the appropriate timer type */ switch (type) { case SCTP_TIMER_TYPE_SEND: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timodata); stcb->asoc.timodata++; stcb->asoc.num_send_timers_up--; @@ -1775,9 +1791,9 @@ sctp_timeout_handler(void *t) } break; case SCTP_TIMER_TYPE_INIT: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoinit); stcb->asoc.timoinit++; if (sctp_t1init_timer(inp, stcb, net)) { @@ -1788,36 +1804,36 @@ sctp_timeout_handler(void *t) did_output = 0; break; case SCTP_TIMER_TYPE_RECV: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timosack); stcb->asoc.timosack++; sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); #ifdef SCTP_AUDITING_ENABLED - sctp_auditing(4, inp, stcb, net); + sctp_auditing(4, inp, stcb, NULL); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SACK_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_SHUTDOWN: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timoshutdown); + stcb->asoc.timoshutdown++; if (sctp_shutdown_timer(inp, stcb, net)) { /* no need to unlock on tcb its gone */ goto out_decr; } - SCTP_STAT_INCR(sctps_timoshutdown); - stcb->asoc.timoshutdown++; #ifdef SCTP_AUDITING_ENABLED sctp_auditing(4, inp, stcb, net); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SHUT_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_HEARTBEAT: - if ((stcb == NULL) || (inp == NULL) || (net == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoheartbeat); stcb->asoc.timoheartbeat++; if (sctp_heartbeat_timer(inp, stcb, net)) { @@ -1833,16 +1849,15 @@ sctp_timeout_handler(void *t) } break; case SCTP_TIMER_TYPE_COOKIE: - if ((stcb == NULL) || (inp == NULL)) { - break; - } - + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timocookie); + stcb->asoc.timocookie++; if (sctp_cookie_timer(inp, stcb, net)) { /* no need to unlock on tcb its gone */ goto out_decr; } - SCTP_STAT_INCR(sctps_timocookie); - stcb->asoc.timocookie++; #ifdef SCTP_AUDITING_ENABLED sctp_auditing(4, inp, stcb, net); #endif @@ -1853,44 +1868,39 @@ sctp_timeout_handler(void *t) sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_NEWCOOKIE: - { - struct timeval tv; - int i, secret; - - if (inp == NULL) { - break; - } - SCTP_STAT_INCR(sctps_timosecret); - (void)SCTP_GETTIME_TIMEVAL(&tv); - inp->sctp_ep.time_of_secret_change = tv.tv_sec; - inp->sctp_ep.last_secret_number = - inp->sctp_ep.current_secret_number; - inp->sctp_ep.current_secret_number++; - if (inp->sctp_ep.current_secret_number >= - SCTP_HOW_MANY_SECRETS) { - inp->sctp_ep.current_secret_number = 0; - } - secret = (int)inp->sctp_ep.current_secret_number; - for (i = 0; i < SCTP_NUMBER_OF_SECRETS; i++) { - inp->sctp_ep.secret_key[secret][i] = - sctp_select_initial_TSN(&inp->sctp_ep); - } - sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL); + KASSERT(inp != NULL && stcb == NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timosecret); + (void)SCTP_GETTIME_TIMEVAL(&tv); + inp->sctp_ep.time_of_secret_change = tv.tv_sec; + inp->sctp_ep.last_secret_number = + inp->sctp_ep.current_secret_number; + inp->sctp_ep.current_secret_number++; + if (inp->sctp_ep.current_secret_number >= + SCTP_HOW_MANY_SECRETS) { + inp->sctp_ep.current_secret_number = 0; } + secret = (int)inp->sctp_ep.current_secret_number; + for (i = 0; i < SCTP_NUMBER_OF_SECRETS; i++) { + inp->sctp_ep.secret_key[secret][i] = + sctp_select_initial_TSN(&inp->sctp_ep); + } + sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL); did_output = 0; break; case SCTP_TIMER_TYPE_PATHMTURAISE: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timopathmtu); sctp_pathmtu_timer(inp, stcb, net); did_output = 0; break; case SCTP_TIMER_TYPE_SHUTDOWNACK: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); if (sctp_shutdownack_timer(inp, stcb, net)) { /* no need to unlock on tcb its gone */ goto out_decr; @@ -1903,23 +1913,23 @@ sctp_timeout_handler(void *t) sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SHUT_ACK_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_ASCONF: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timoasconf); if (sctp_asconf_timer(inp, stcb, net)) { /* no need to unlock on tcb its gone */ goto out_decr; } - SCTP_STAT_INCR(sctps_timoasconf); #ifdef SCTP_AUDITING_ENABLED sctp_auditing(4, inp, stcb, net); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_ASCONF_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoshutdownguard); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), "Shutdown guard timer expired"); @@ -1927,45 +1937,46 @@ sctp_timeout_handler(void *t) /* no need to unlock on tcb its gone */ goto out_decr; case SCTP_TIMER_TYPE_AUTOCLOSE: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoautoclose); sctp_autoclose_timer(inp, stcb); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_SO_NOT_LOCKED); did_output = 0; break; case SCTP_TIMER_TYPE_STRRESET: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timostrmrst); if (sctp_strreset_timer(inp, stcb)) { /* no need to unlock on tcb its gone */ goto out_decr; } - SCTP_STAT_INCR(sctps_timostrmrst); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_STRRST_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_INPKILL: + KASSERT(inp != NULL && stcb == NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoinpkill); - if (inp == NULL) { - break; - } /* * special case, take away our increment since WE are the * killer */ - SCTP_INP_DECR_REF(inp); sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_3); + SCTP_INP_DECR_REF(inp); + SCTP_INP_WUNLOCK(inp); sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, SCTP_CALLED_FROM_INPKILL_TIMER); inp = NULL; goto out_no_decr; case SCTP_TIMER_TYPE_ASOCKILL: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoassockill); /* Can we free it yet? */ SCTP_INP_DECR_REF(inp); @@ -1991,19 +2002,20 @@ sctp_timeout_handler(void *t) stcb = NULL; goto out_no_decr; case SCTP_TIMER_TYPE_ADDR_WQ: + KASSERT(inp == NULL && stcb == NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); sctp_handle_addr_wq(); break; case SCTP_TIMER_TYPE_PRIM_DELETED: - if ((stcb == NULL) || (inp == NULL)) { - break; - } - sctp_delete_prim_timer(inp, stcb); + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timodelprim); + sctp_delete_prim_timer(inp, stcb); break; default: - SCTPDBG(SCTP_DEBUG_TIMER1, "sctp_timeout_handler:unknown timer %d\n", - type); - break; + panic("Unknown timer type %d", type); } #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xF1, (uint8_t)type); @@ -2035,54 +2047,105 @@ out_decr: } out_no_decr: - SCTPDBG(SCTP_DEBUG_TIMER1, "Timer now complete (type = %d)\n", type); + SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler finished\n", type); CURVNET_RESTORE(); NET_EPOCH_EXIT(et); } +/*- + * The following table shows which parameters must be provided + * when calling sctp_timer_start(). For parameters not being + * provided, NULL must be used. + * + * |Name |inp |stcb|net | + * |-----------------------------|----|----|----| + * |SCTP_TIMER_TYPE_SEND |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_INIT |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_RECV |Yes |Yes |No | + * |SCTP_TIMER_TYPE_SHUTDOWN |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_HEARTBEAT |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_COOKIE |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_NEWCOOKIE |Yes |No |No | + * |SCTP_TIMER_TYPE_PATHMTURAISE |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_SHUTDOWNACK |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_ASCONF |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_SHUTDOWNGUARD|Yes |Yes |No | + * |SCTP_TIMER_TYPE_AUTOCLOSE |Yes |Yes |No | + * |SCTP_TIMER_TYPE_STRRESET |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_INPKILL |Yes |No |No | + * |SCTP_TIMER_TYPE_ASOCKILL |Yes |Yes |No | + * |SCTP_TIMER_TYPE_ADDR_WQ |No |No |No | + * |SCTP_TIMER_TYPE_PRIM_DELETED |Yes |Yes |No | + * + */ + void sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) { - uint32_t to_ticks; struct sctp_timer *tmr; + uint32_t to_ticks; + uint32_t rndval, jitter; - if ((t_type != SCTP_TIMER_TYPE_ADDR_WQ) && (inp == NULL)) - return; - tmr = NULL; - if (stcb) { + to_ticks = 0; + if (stcb != NULL) { SCTP_TCB_LOCK_ASSERT(stcb); + } else if (inp != NULL) { + SCTP_INP_WLOCK_ASSERT(inp); + } else { + SCTP_WQ_ADDR_LOCK_ASSERT(); } - /* Don't restart timer on net that's been removed. */ - if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { - return; + if (stcb != NULL) { + /* + * Don't restart timer on association that's about to be + * killed. + */ + if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) && + (t_type != SCTP_TIMER_TYPE_ASOCKILL)) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d not started: inp=%p, stcb=%p, net=%p (stcb deleted).\n", + t_type, inp, stcb, net); + return; + } + /* Don't restart timer on net that's been removed. */ + if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d not started: inp=%p, stcb=%p, net=%p (net deleted).\n", + t_type, inp, stcb, net); + return; + } } switch (t_type) { case SCTP_TIMER_TYPE_SEND: - /* Here we use the RTO timer */ - { - int rto_val; - - if ((stcb == NULL) || (net == NULL)) { - return; - } - tmr = &net->rxt_timer; - if (net->RTO == 0) { - rto_val = stcb->asoc.initial_rto; - } else { - rto_val = net->RTO; - } - to_ticks = MSEC_TO_TICKS(rto_val); + /* Here we use the RTO timer. */ + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else + return; +#endif } + tmr = &net->rxt_timer; + if (net->RTO == 0) { + to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + } else { + to_ticks = MSEC_TO_TICKS(net->RTO); + } break; case SCTP_TIMER_TYPE_INIT: /* * Here we use the INIT timer default usually about 1 - * minute. + * second. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } tmr = &net->rxt_timer; if (net->RTO == 0) { @@ -2093,175 +2156,228 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s break; case SCTP_TIMER_TYPE_RECV: /* - * Here we use the Delayed-Ack timer value from the inp + * Here we use the Delayed-Ack timer value from the inp, * ususually about 200ms. */ - if (stcb == NULL) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } tmr = &stcb->asoc.dack_timer; to_ticks = MSEC_TO_TICKS(stcb->asoc.delayed_ack); break; case SCTP_TIMER_TYPE_SHUTDOWN: /* Here we use the RTO of the destination. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &net->rxt_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &net->rxt_timer; break; case SCTP_TIMER_TYPE_HEARTBEAT: /* - * the net is used here so that we can add in the RTO. Even + * The net is used here so that we can add in the RTO. Even * though we use a different timer. We also add the HB timer * PLUS a random jitter. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif + } + if ((net->dest_state & SCTP_ADDR_NOHB) && + !(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d not started: inp=%p, stcb=%p, net=%p.\n", + t_type, inp, stcb, net); + return; + } + tmr = &net->hb_timer; + if (net->RTO == 0) { + to_ticks = stcb->asoc.initial_rto; } else { - uint32_t rndval; - uint32_t jitter; - - if ((net->dest_state & SCTP_ADDR_NOHB) && - !(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { - return; - } - if (net->RTO == 0) { - to_ticks = stcb->asoc.initial_rto; - } else { - to_ticks = net->RTO; - } - rndval = sctp_select_initial_TSN(&inp->sctp_ep); - jitter = rndval % to_ticks; - if (jitter >= (to_ticks >> 1)) { - to_ticks = to_ticks + (jitter - (to_ticks >> 1)); - } else { - to_ticks = to_ticks - jitter; - } - if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED) && - !(net->dest_state & SCTP_ADDR_PF)) { - to_ticks += net->heart_beat_delay; - } - /* - * Now we must convert the to_ticks that are now in - * ms to ticks. - */ - to_ticks = MSEC_TO_TICKS(to_ticks); - tmr = &net->hb_timer; + to_ticks = net->RTO; } + rndval = sctp_select_initial_TSN(&inp->sctp_ep); + jitter = rndval % to_ticks; + if (jitter >= (to_ticks >> 1)) { + to_ticks = to_ticks + (jitter - (to_ticks >> 1)); + } else { + to_ticks = to_ticks - jitter; + } + if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED) && + !(net->dest_state & SCTP_ADDR_PF)) { + to_ticks += net->heart_beat_delay; + } + /* + * Now we must convert the to_ticks that are now in ms to + * ticks. + */ + to_ticks = MSEC_TO_TICKS(to_ticks); break; case SCTP_TIMER_TYPE_COOKIE: /* * Here we can use the RTO timer from the network since one - * RTT was compelete. If a retran happened then we will be - * using the RTO initial value. + * RTT was complete. If a retransmission happened then we + * will be using the RTO initial value. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &net->rxt_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &net->rxt_timer; break; case SCTP_TIMER_TYPE_NEWCOOKIE: /* - * nothing needed but the endpoint here ususually about 60 + * Nothing needed but the endpoint here ususually about 60 * minutes. */ + if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else + return; +#endif + } tmr = &inp->sctp_ep.signature_change; to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_SIGNATURE]; break; case SCTP_TIMER_TYPE_PATHMTURAISE: /* - * Here we use the value found in the EP for PMTU ususually - * about 10 minutes. + * Here we use the value found in the EP for PMTUD, + * ususually about 10 minutes. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } if (net->dest_state & SCTP_ADDR_NO_PMTUD) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d not started: inp=%p, stcb=%p, net=%p.\n", + t_type, inp, stcb, net); return; } - to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_PMTU]; tmr = &net->pmtu_timer; + to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_PMTU]; break; case SCTP_TIMER_TYPE_SHUTDOWNACK: - /* Here we use the RTO of the destination */ - if ((stcb == NULL) || (net == NULL)) { + /* Here we use the RTO of the destination. */ + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &net->rxt_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &net->rxt_timer; break; case SCTP_TIMER_TYPE_ASCONF: /* * Here the timer comes from the stcb but its value is from * the net's RTO. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &stcb->asoc.asconf_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &stcb->asoc.asconf_timer; break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: /* * Here we use the endpoints shutdown guard timer usually * about 3 minutes. */ - if (stcb == NULL) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &stcb->asoc.shut_guard_timer; if (inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] == 0) { to_ticks = 5 * MSEC_TO_TICKS(stcb->asoc.maxrto); } else { to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN]; } - tmr = &stcb->asoc.shut_guard_timer; break; case SCTP_TIMER_TYPE_AUTOCLOSE: - if (stcb == NULL) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } - if (stcb->asoc.sctp_autoclose_ticks == 0) { - /* - * Really an error since stcb is NOT set to - * autoclose - */ - return; - } - to_ticks = stcb->asoc.sctp_autoclose_ticks; tmr = &stcb->asoc.autoclose_timer; + to_ticks = stcb->asoc.sctp_autoclose_ticks; break; case SCTP_TIMER_TYPE_STRRESET: /* * Here the timer comes from the stcb but its value is from * the net's RTO. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &stcb->asoc.strreset_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &stcb->asoc.strreset_timer; break; case SCTP_TIMER_TYPE_INPKILL: /* @@ -2269,47 +2385,70 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s * timer since that has stopped and we are in the GONE * state. */ + if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else + return; +#endif + } tmr = &inp->sctp_ep.signature_change; to_ticks = MSEC_TO_TICKS(SCTP_INP_KILL_TIMEOUT); break; case SCTP_TIMER_TYPE_ASOCKILL: - if (stcb == NULL) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } tmr = &stcb->asoc.strreset_timer; to_ticks = MSEC_TO_TICKS(SCTP_ASOC_KILL_TIMEOUT); break; case SCTP_TIMER_TYPE_ADDR_WQ: + if ((inp != NULL) || (stcb != NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else + return; +#endif + } /* Only 1 tick away :-) */ tmr = &SCTP_BASE_INFO(addr_wq_timer); to_ticks = SCTP_ADDRESS_TICK_DELAY; break; case SCTP_TIMER_TYPE_PRIM_DELETED: - if ((stcb == NULL) || (net != NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); tmr = &stcb->asoc.delete_prim_timer; + to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); break; default: - SCTPDBG(SCTP_DEBUG_TIMER1, "%s: Unknown timer type %d\n", - __func__, t_type); - return; - break; + panic("Unknown timer type %d", t_type); } - if ((to_ticks <= 0) || (tmr == NULL)) { - SCTPDBG(SCTP_DEBUG_TIMER1, "%s: %d:software error to_ticks:%d tmr:%p not set ??\n", - __func__, t_type, to_ticks, (void *)tmr); - return; - } + KASSERT(tmr != NULL, ("tmr is NULL for timer type %d", t_type)); + KASSERT(to_ticks > 0, ("to_ticks == 0 for timer type %d", t_type)); if (SCTP_OS_TIMER_PENDING(&tmr->timer)) { /* - * we do NOT allow you to have it already running. if it is - * we leave the current one up unchanged + * We do NOT allow you to have it already running. If it is, + * we leave the current one up unchanged. */ + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d already running: inp=%p, stcb=%p, net=%p.\n", + t_type, inp, stcb, net); return; } - /* At this point we can proceed */ + /* At this point we can proceed. */ if (t_type == SCTP_TIMER_TYPE_SEND) { stcb->asoc.num_send_timers_up++; } @@ -2317,106 +2456,212 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s tmr->type = t_type; tmr->ep = (void *)inp; tmr->tcb = (void *)stcb; - tmr->net = (void *)net; + if (t_type == SCTP_TIMER_TYPE_STRRESET) { + tmr->net = NULL; + } else { + tmr->net = (void *)net; + } tmr->self = (void *)tmr; tmr->vnet = (void *)curvnet; tmr->ticks = sctp_get_tick_count(); - (void)SCTP_OS_TIMER_START(&tmr->timer, to_ticks, sctp_timeout_handler, tmr); + if (SCTP_OS_TIMER_START(&tmr->timer, to_ticks, sctp_timeout_handler, tmr) == 0) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d started: ticks=%u, inp=%p, stcb=%p, net=%p.\n", + t_type, to_ticks, inp, stcb, net); + } else { + /* + * This should not happen, since we checked for pending + * above. + */ + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d restarted: ticks=%u, inp=%p, stcb=%p, net=%p.\n", + t_type, to_ticks, inp, stcb, net); + } return; } +/*- + * The following table shows which parameters must be provided + * when calling sctp_timer_stop(). For parameters not being + * provided, NULL must be used. + * + * |Name |inp |stcb|net | + * |-----------------------------|----|----|----| + * |SCTP_TIMER_TYPE_SEND |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_INIT |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_RECV |Yes |Yes |No | + * |SCTP_TIMER_TYPE_SHUTDOWN |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_HEARTBEAT |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_COOKIE |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_NEWCOOKIE |Yes |No |No | + * |SCTP_TIMER_TYPE_PATHMTURAISE |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_SHUTDOWNACK |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_ASCONF |Yes |Yes |No | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Mar 24 22:57:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CF5226D358; Tue, 24 Mar 2020 22:57:22 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 48n6845S2qz45m3; Tue, 24 Mar 2020 22:57:08 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 016015DE; Tue, 24 Mar 2020 18:56:59 -0400 (EDT) Received: from imap36 ([10.202.2.86]) by compute4.internal (MEProxy); Tue, 24 Mar 2020 18:57:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm2; bh=+JyBkyUrQkncA55PyhM23cLq7JXLrv6 whWWr40hHEhQ=; b=v7iEibOWlaILAvViNqa2yqYQD8zXAOn88MgFWIj/Q1S+pC9 KNy2pK79+GuTdtARBfga2OLH+owEnv2E9c3fdgWr2PWUHjtGxuej0BGv5yv7wVrX w2HX5UCHLerSB5aSf/e0cvxrRkIOT8UXmkbeRsoHni7d1vYxp+Y+VWv51MhKT9D3 L9MF3TbntG5VvzulKLzTnKXdlWwIl97liVxwVHbN30RKoAFAolPAAR7aMi5l8sbZ A6uzXNvdSg9+DIv5nfGQed2V+H6+syoZ1tKKIgW7WaoymWDTN2JQHiwJe50NV7NQ wdVymG1XpwKHVXyrEQcPZRO6ValHwVkJ4APcjNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+JyBky UrQkncA55PyhM23cLq7JXLrv6whWWr40hHEhQ=; b=rMRVHuwHWFFDDpwwaBNRLC emNgOFxRJF0EabC0z9YoKZ+Sz19jD1fBb723ja8CPx8MTZdYUN8fvTw7g7O2nKdn /QCOjsjubstpmQmg0aRnEcE/oZEHXP9m3IImwpzDzlAAvRmPUyR4ALrrX1+WPX0f PKuP0insSzpJ/0s4aesbVdKgzbrNUakOlm/Klpj96okRbMrczmydCncucM+X1Sud +FvK9VIOOAs+R7k6G2NAJMbZ3A5Yk6iyxAKYrIDYIPqnNy4TaXTb/303gezrErWJ 2lPgxyyUN6wjWeKYbM/pTHCeF3IksBX/auZQ9wU4Cj8bqRdgmhdrnLKfGwHS4hBw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehvddgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfutgho thhtucfnohhnghdfuceoshgtohhtthhlsehsrghmshgtohdrohhrgheqnecuffhomhgrih hnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepshgtohhtthhlsehsrghmshgtohdrohhrgh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 343501880062; Tue, 24 Mar 2020 18:56:59 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-1021-g152deaf-fmstable-20200319v1 Mime-Version: 1.0 Message-Id: <69a9072f-6592-4eb5-8e63-92255adee0d9@www.fastmail.com> In-Reply-To: <20200324214552.GD1292@FreeBSD.org> References: <202003201602.02KG2kKW065294@repo.freebsd.org> <20200324214552.GD1292@FreeBSD.org> Date: Tue, 24 Mar 2020 16:57:35 -0600 From: "Scott Long" To: "Gleb Smirnoff" , "Ed Maste" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359168 - head Content-Type: text/plain X-Rspamd-Queue-Id: 48n6845S2qz45m3 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=samsco.org header.s=fm2 header.b=v7iEibOW; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=rMRVHuwH; dmarc=none; spf=pass (mx1.freebsd.org: domain of scottl@samsco.org designates 64.147.123.21 as permitted sender) smtp.mailfrom=scottl@samsco.org X-Spamd-Result: default: False [-5.10 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[samsco.org:s=fm2,messagingengine.com:s=fm2]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.21]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; DMARC_NA(0.00)[samsco.org]; RCPT_COUNT_FIVE(0.00)[5]; URIBL_BLOCKED(0.00)[samsco.org.multi.uribl.com,obsoletefiles.inc.multi.uribl.com,messagingengine.com.multi.uribl.com]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(-3.51)[ip: (-9.87), ipnet: 64.147.123.0/24(-4.92), asn: 11403(-2.69), country: US(-0.05)]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_IN_DNSWL_LOW(-0.10)[21.123.147.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; MID_RHS_WWW(0.50)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 22:57:22 -0000 On Tue, Mar 24, 2020, at 3:45 PM, Gleb Smirnoff wrote: > On Fri, Mar 20, 2020 at 04:02:46PM +0000, Ed Maste wrote: > E> Author: emaste > E> Date: Fri Mar 20 16:02:45 2020 > E> New Revision: 359168 > E> URL: https://svnweb.freebsd.org/changeset/base/359168 > E> > E> Log: > E> remove ancient pre-2000 ObsoleteFiles.inc entries > E> > E> We support 10.3 as the minimum version to install from, which was > E> released in the mid-2010s. There's a lot of ancient ObsoleteFiles.inc > E> history that serves no purpose today; start by removing entries from > E> 1999 and earlier. > > I understand that rationale is to speedup 'make delete-old' times, and > trimming the default file definitely makes sense. However, what about > keeping the full ObsoleteFiles.inc version, at least for documenting > purposes? > This is what SCM history is for, IMHO. The historical entries serve little purpose outside of that. Scott From owner-svn-src-head@freebsd.org Tue Mar 24 23:25:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C58326DAED; Tue, 24 Mar 2020 23:25:55 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n6nH0sGQz4H5D; Tue, 24 Mar 2020 23:25:55 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA0A78305; Tue, 24 Mar 2020 23:25:54 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02ONPstD090531; Tue, 24 Mar 2020 23:25:54 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ONPsHR090530; Tue, 24 Mar 2020 23:25:54 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202003242325.02ONPsHR090530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 24 Mar 2020 23:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359289 - head X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359289 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 23:25:55 -0000 Author: mhorne Date: Tue Mar 24 23:25:54 2020 New Revision: 359289 URL: https://svnweb.freebsd.org/changeset/base/359289 Log: Makefile.inc1: override MACHINE for native-xtools For the final step of the native-xtools target, "everything" is built with TARGET and TARGET_ARCH set to the architecture we wish to cross-build for. However, CROSSENV overwrites the values of MACHINE and MACHINE_ARCH, setting them to be identical to TARGET and TARGET_ARCH. For native-xtools this is undesirable since we are building binaries to run on the host architecture, that can cross compile for the target architecture. When building native-xtools for RISC-V, this issue manifests as an invalid argument for "-march". The compiler is invoked with the target triple of the host architecture, but the CFLAGS inherited from bsd.cpu.mk are that of the target architecture. Reviewed by: imp, bdrewery MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23838 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Mar 24 23:04:07 2020 (r359288) +++ head/Makefile.inc1 Tue Mar 24 23:25:54 2020 (r359289) @@ -2650,6 +2650,7 @@ NXBMAKE+= XCC="${NXBOBJTOP}/tmp/usr/bin/cc" \ XCPP="${NXBOBJTOP}/tmp/usr/bin/cpp" .endif NXBMAKE+= ${NXBMAKEENV} ${MAKE} -f Makefile.inc1 ${NXBMAKEARGS} \ + MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} \ TARGET=${NXB_TARGET} TARGET_ARCH=${NXB_TARGET_ARCH} \ TARGET_TRIPLE=${MACHINE_TRIPLE:Q} # NXBDIRS is improperly based on MACHINE rather than NXB_TARGET. Need to From owner-svn-src-head@freebsd.org Wed Mar 25 00:16:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBD6B26F25F for ; Wed, 25 Mar 2020 00:16:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48n7vY171Qz4ZmG for ; Wed, 25 Mar 2020 00:16:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x834.google.com with SMTP id c9so695676qtw.7 for ; Tue, 24 Mar 2020 17:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ESDWguaQbUz+pOoyh7pY5E22oZnS6l3TNmbkWE32kaQ=; b=X6D8muRGBN9GwgfaftLi3Juggx+g2cqzNrtgoLBRCZSKd/5WNYMkpXyNhculyUN7NQ +iJckiQQi+whW/tWMJXu4x/1XZCU9neFBWukWgZ8quhQ0MzItJlq0mIvhmhDi3lAo3tJ +E7MeBme3SAAEMtiGku+b8BNvO+Emaxq4Cbw4cbGNTHBmKHTqq614K9GHCTCu/t1r6MY 1PhqY+ZWMPPJ1zI7flpkVcJzGxodKovcMGeBoTf/lvxHGguscCcqYSzVchKE09O5lVcM VdkkUT6fgGmrkPp9gK46oArcS6MM3CL33dL6zRAmxXrO8FJLfDmqqBTtmGHVnbhlv3+O 9YNQ== 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=ESDWguaQbUz+pOoyh7pY5E22oZnS6l3TNmbkWE32kaQ=; b=P3MH4d6eSZTZ1Pj+6axFqrQr9WPrO5fgoKZxkQ9tfPiH1apZZvMxto9f2Uq1FOG7rq 4rMwcc6YbhRKrHqJTMCuuPobj5RDvJCvSWubcr9ITug1QlSQC07C9nxvzKYqjo8Getne JIT6EL2wHhCT8Zujlv8U+SRbB2QmqBdd67fJfv+rVdbJAxfhhAd9/hVlNxeQvRVTXNa+ 9Jz3+zi0qDVj/9XxtiNhtYSaa2eSkC8Wj8JJGx3ySNQ66J3FcJMtP845mwYJGRi4m8SJ XUBkMUHlNLaQe4ehTGwnWLLikV+O6zK+/X86hvBTFvGxD0LHHmnvvFyGGY8iknQQApca lQxA== X-Gm-Message-State: ANhLgQ1gw0STGFH2MT8xLgFeRP1F2t3z5g+oFOjwqmYB8NGZiE6lduLc MpxX73h6wTvxT5Gzfq/FlloAKVHbK6RuyJ73OmAzsN6g X-Google-Smtp-Source: ADFU+vu+WTJoT++qQ8iXTqx1usrXF7I9LFZoCEggKPyrbF4RleUWWJ4iOuhKYoLGXimJ0Pw5Vyc21ZfJeLqiElGzMnc= X-Received: by 2002:ac8:224c:: with SMTP id p12mr525109qtp.32.1585095373506; Tue, 24 Mar 2020 17:16:13 -0700 (PDT) MIME-Version: 1.0 References: <202003201602.02KG2kKW065294@repo.freebsd.org> <20200324214552.GD1292@FreeBSD.org> <69a9072f-6592-4eb5-8e63-92255adee0d9@www.fastmail.com> In-Reply-To: <69a9072f-6592-4eb5-8e63-92255adee0d9@www.fastmail.com> From: Warner Losh Date: Tue, 24 Mar 2020 18:16:02 -0600 Message-ID: Subject: Re: svn commit: r359168 - head To: Scott Long Cc: Gleb Smirnoff , Ed Maste , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48n7vY171Qz4ZmG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=X6D8muRG; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::834) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.04 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; URIBL_BLOCKED(0.00)[obsoletefiles.inc.multi.uribl.com,gappssmtp.com.multi.uribl.com]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.04)[ip: (-9.29), ipnet: 2607:f8b0::/32(-0.38), asn: 15169(-0.48), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 00:16:40 -0000 On Tue, Mar 24, 2020 at 4:58 PM Scott Long wrote: > > > On Tue, Mar 24, 2020, at 3:45 PM, Gleb Smirnoff wrote: > > On Fri, Mar 20, 2020 at 04:02:46PM +0000, Ed Maste wrote: > > E> Author: emaste > > E> Date: Fri Mar 20 16:02:45 2020 > > E> New Revision: 359168 > > E> URL: https://svnweb.freebsd.org/changeset/base/359168 > > E> > > E> Log: > > E> remove ancient pre-2000 ObsoleteFiles.inc entries > > E> > > E> We support 10.3 as the minimum version to install from, which was > > E> released in the mid-2010s. There's a lot of ancient > ObsoleteFiles.inc > > E> history that serves no purpose today; start by removing entries from > > E> 1999 and earlier. > > > > I understand that rationale is to speedup 'make delete-old' times, and > > trimming the default file definitely makes sense. However, what about > > keeping the full ObsoleteFiles.inc version, at least for documenting > > purposes? > > > > This is what SCM history is for, IMHO. The historical entries serve little > purpose outside of that. > We only support upgrading so far into the past. Farther than we can build, sure, but it's still limited. If you have systems older than that, or that haven't been preened, you can get the the last release's tree and do a cleaning. There's no more reason to retain this stuff than there is to retain ancient version compat code in drivers, etc. So while it seems like a good idea to have this back to dirt, in reality it would get little use and the data can be found easily enough now, and in the future. That's why I advised Ed to just delete the entries > 20 years old... Warner From owner-svn-src-head@freebsd.org Wed Mar 25 01:32:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 674BB2712C5; Wed, 25 Mar 2020 01:32:00 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n9Zl3cptz44Qc; Wed, 25 Mar 2020 01:31:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B43E7CD5; Tue, 24 Mar 2020 23:04:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02ON487K078485; Tue, 24 Mar 2020 23:04:08 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ON48HU078484; Tue, 24 Mar 2020 23:04:08 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003242304.02ON48HU078484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 24 Mar 2020 23:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359288 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359288 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 01:32:00 -0000 Author: tuexen Date: Tue Mar 24 23:04:07 2020 New Revision: 359288 URL: https://svnweb.freebsd.org/changeset/base/359288 Log: Only call panic when building with INVARIANTS. MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Mar 24 22:44:36 2020 (r359287) +++ head/sys/netinet/sctputil.c Tue Mar 24 23:04:07 2020 (r359288) @@ -2015,7 +2015,11 @@ sctp_timeout_handler(void *t) sctp_delete_prim_timer(inp, stcb); break; default: +#ifdef INVARIANTS panic("Unknown timer type %d", type); +#else + goto get_out; +#endif } #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xF1, (uint8_t)type); @@ -2434,7 +2438,11 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); break; default: +#ifdef INVARIANTS panic("Unknown timer type %d", t_type); +#else + return; +#endif } KASSERT(tmr != NULL, ("tmr is NULL for timer type %d", t_type)); KASSERT(to_ticks > 0, ("to_ticks == 0 for timer type %d", t_type)); @@ -2715,7 +2723,11 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st tmr = &stcb->asoc.delete_prim_timer; break; default: +#ifdef INVARIANTS panic("Unknown timer type %d", t_type); +#else + return; +#endif } KASSERT(tmr != NULL, ("tmr is NULL for timer type %d", t_type)); if ((tmr->type != SCTP_TIMER_TYPE_NONE) && From owner-svn-src-head@freebsd.org Wed Mar 25 01:33:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 600D827136D; Wed, 25 Mar 2020 01:33:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n9cV63YFz451r; Wed, 25 Mar 2020 01:33:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68A88A1A7; Wed, 25 Mar 2020 01:31:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02P1VRFn067023; Wed, 25 Mar 2020 01:31:27 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02P1VQ0T067019; Wed, 25 Mar 2020 01:31:26 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003250131.02P1VQ0T067019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 25 Mar 2020 01:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359291 - in head: lib/libifconfig usr.sbin/wlandebug X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: lib/libifconfig usr.sbin/wlandebug X-SVN-Commit-Revision: 359291 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 01:33:31 -0000 Author: manu Date: Wed Mar 25 01:31:26 2020 New Revision: 359291 URL: https://svnweb.freebsd.org/changeset/base/359291 Log: wlandebug: Add include path for libifconfig as it is a internallib Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D24172 Modified: head/lib/libifconfig/Makefile head/usr.sbin/wlandebug/Makefile Modified: head/lib/libifconfig/Makefile ============================================================================== --- head/lib/libifconfig/Makefile Wed Mar 25 00:31:42 2020 (r359290) +++ head/lib/libifconfig/Makefile Wed Mar 25 01:31:26 2020 (r359291) @@ -10,8 +10,9 @@ SRCS= libifconfig.c libifconfig_carp.c libifconfig_in SRCS+= libifconfig_inet6.c libifconfig_internal.c libifconfig_lagg.c SRCS+= libifconfig_media.c -INCSDIR= ${INCLUDEDIR} -INCS= libifconfig.h +# If libifconfig become public uncomment those two lines +#INCSDIR= ${INCLUDEDIR} +#INCS= libifconfig.h #MAN= libifconfig.3 Modified: head/usr.sbin/wlandebug/Makefile ============================================================================== --- head/usr.sbin/wlandebug/Makefile Wed Mar 25 00:31:42 2020 (r359290) +++ head/usr.sbin/wlandebug/Makefile Wed Mar 25 01:31:26 2020 (r359291) @@ -3,6 +3,7 @@ PROG= wlandebug MAN= wlandebug.8 +CFLAGS+= -I${SRCTOP}/lib/libifconfig LIBADD+= ifconfig WARNS?= 2 From owner-svn-src-head@freebsd.org Wed Mar 25 01:34:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C753E2713A1; Wed, 25 Mar 2020 01:34:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n9d53S8Dz45Gp; Wed, 25 Mar 2020 01:34:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C878EA2F7; Wed, 25 Mar 2020 01:32:17 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02P1WHVR068702; Wed, 25 Mar 2020 01:32:17 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02P1WHAs068698; Wed, 25 Mar 2020 01:32:17 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003250132.02P1WHAs068698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 25 Mar 2020 01:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359292 - in head: lib/libpmc lib/libpmcstat usr.sbin/pmc usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: lib/libpmc lib/libpmcstat usr.sbin/pmc usr.sbin/pmcstat X-SVN-Commit-Revision: 359292 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 01:34:01 -0000 Author: manu Date: Wed Mar 25 01:32:16 2020 New Revision: 359292 URL: https://svnweb.freebsd.org/changeset/base/359292 Log: pmc: Add include path for libpmcstat as it is an internallib Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D24173 Modified: head/lib/libpmc/Makefile head/lib/libpmcstat/Makefile head/usr.sbin/pmc/Makefile head/usr.sbin/pmcstat/Makefile Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Wed Mar 25 01:31:26 2020 (r359291) +++ head/lib/libpmc/Makefile Wed Mar 25 01:32:16 2020 (r359292) @@ -16,9 +16,10 @@ EVENT_ARCH="x86" EVENT_ARCH="powerpc" .endif +CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat + .if ${MK_DIRDEPS_BUILD} == "yes" # avoid circular dependency -CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat GENDIRDEPS_FILTER+= N${RELDIR:H}/libpmcstat JEVENTS?= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents .else Modified: head/lib/libpmcstat/Makefile ============================================================================== --- head/lib/libpmcstat/Makefile Wed Mar 25 01:31:26 2020 (r359291) +++ head/lib/libpmcstat/Makefile Wed Mar 25 01:32:16 2020 (r359292) @@ -10,6 +10,8 @@ SRCS= \ libpmcstat_process.c \ libpmcstat_string.c \ libpmcstat_symbol.c -INCS= libpmcstat.h + +# If libpmcstat becomes public uncomment this line +#INCS= libpmcstat.h .include Modified: head/usr.sbin/pmc/Makefile ============================================================================== --- head/usr.sbin/pmc/Makefile Wed Mar 25 01:31:26 2020 (r359291) +++ head/usr.sbin/pmc/Makefile Wed Mar 25 01:32:16 2020 (r359292) @@ -9,6 +9,7 @@ WARNS?= 3 CXXFLAGS+= -O0 CXXSTD= c++14 CWARNFLAGS.gcc+= -Wno-redundant-decls +CFLAGS+= -I${SRCTOP}/lib/libpmcstat LIBADD= kvm pmc m ncursesw pmcstat elf Modified: head/usr.sbin/pmcstat/Makefile ============================================================================== --- head/usr.sbin/pmcstat/Makefile Wed Mar 25 01:31:26 2020 (r359291) +++ head/usr.sbin/pmcstat/Makefile Wed Mar 25 01:32:16 2020 (r359292) @@ -5,6 +5,7 @@ PROG_CXX= pmcstat MAN= pmcstat.8 +CFLAGS+= -I${SRCTOP}/lib/libpmcstat LIBADD= kvm pmc m ncursesw pmcstat elf SRCS= pmcstat.c pmcstat.h pmcstat_log.c \ From owner-svn-src-head@freebsd.org Wed Mar 25 01:35:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BB75271463; Wed, 25 Mar 2020 01:35:21 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n9fb29Srz45mB; Wed, 25 Mar 2020 01:35:19 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADCBEA331; Wed, 25 Mar 2020 01:35:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02P1ZE5l068923; Wed, 25 Mar 2020 01:35:14 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02P1ZEsj068921; Wed, 25 Mar 2020 01:35:14 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003250135.02P1ZEsj068921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 25 Mar 2020 01:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359293 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 359293 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 01:35:21 -0000 Author: manu Date: Wed Mar 25 01:35:13 2020 New Revision: 359293 URL: https://svnweb.freebsd.org/changeset/base/359293 Log: Re-apply r359267 now that tools are using the proper include path Original commit message: bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB f we're building an internal lib do not bother including bsd.incs.mk so we will not install the headers. This also "solves" a problem with pkgbase where a libXXX-development package is created and due to how packages are created we add a dependency to a libXXX package that doesn't exists. Modified: head/ObsoleteFiles.inc head/share/mk/bsd.lib.mk Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Mar 25 01:32:16 2020 (r359292) +++ head/ObsoleteFiles.inc Wed Mar 25 01:35:13 2020 (r359293) @@ -36,6 +36,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20200323: INTERNALLIB don't install headers anymore +OLD_FILES+=usr/include/libelftc.h +OLD_FILES+=usr/include/libifconfig.h +OLD_FILES+=usr/include/libpmcstat.h + # 20200320: cx and ctau drivers retired OLD_FILES+=usr/share/man/man4/ctau.4.gz OLD_FILES+=usr/share/man/man4/cx.4.gz Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Wed Mar 25 01:32:16 2020 (r359292) +++ head/share/mk/bsd.lib.mk Wed Mar 25 01:35:13 2020 (r359293) @@ -489,7 +489,10 @@ _libinstall: .include .include .include +#No need to install header for INTERNALLIB +.if !defined(INTERNALLIB) .include +.endif .endif LINKOWN?= ${LIBOWN} From owner-svn-src-head@freebsd.org Wed Mar 25 01:36:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88F7A271553; Wed, 25 Mar 2020 01:36:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48n9gy569lz46R4; Wed, 25 Mar 2020 01:36:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22120A33C; Wed, 25 Mar 2020 01:36:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02P1aNka069020; Wed, 25 Mar 2020 01:36:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02P1aNBk069018; Wed, 25 Mar 2020 01:36:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003250136.02P1aNBk069018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 25 Mar 2020 01:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359294 - in head/libexec/rc: . rc.d X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/libexec/rc: . rc.d X-SVN-Commit-Revision: 359294 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 01:36:34 -0000 Author: manu Date: Wed Mar 25 01:36:23 2020 New Revision: 359294 URL: https://svnweb.freebsd.org/changeset/base/359294 Log: pkgbase: Stop threating rc files as config files rc scripts arent configuration files so use FILES instead of CONFS. While here put rc scripts into related package (sendmail in the FreeBSD-sendmail package, wpa_supplicant in the FreeBSD-wpa etc ...) Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D24177 Modified: head/libexec/rc/Makefile head/libexec/rc/rc.d/Makefile Modified: head/libexec/rc/Makefile ============================================================================== --- head/libexec/rc/Makefile Wed Mar 25 01:35:13 2020 (r359293) +++ head/libexec/rc/Makefile Wed Mar 25 01:36:23 2020 (r359294) @@ -2,25 +2,28 @@ .include -CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS -CONFETCDIR= /etc -CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown rc.bsdextended -CONFETCPACKAGE= rc +BINDIR= /etc +FILESGROUPS= RCETC RCETCEXEC RCETCDEFAULTS +RCETC= network.subr rc rc.initdiskless rc.subr rc.shutdown rc.bsdextended +RCETCPACKAGE= rc .if ${MK_IPFW} != "no" -CONFETC+= rc.firewall +FILESGROUPS+= RCIPFW +RCIPFW+= rc.firewall +RCIPFWPACKAGE= ipfw .endif .if ${MK_SENDMAIL} != "no" -CONFETC+= rc.sendmail +FILESGROUPS+= RCSENDMAIL +RCSENDMAIL+= rc.sendmail +RCSENDMAILPACKAGE= sendmail .endif -CONFETCMODE= 644 -CONFETCEXEC= netstart pccard_ether rc.resume rc.suspend -CONFETCEXECDIR= /etc -CONFETCEXECMODE= 755 -CONFETCEXECPACKAGE= rc -CONFETCDEFAULTSDIR= /etc/defaults -CONFETCDEFAULTS= rc.conf -CONFETCDEFAULTSPACKAGE= rc +RCETCMODE= 644 +RCETCEXEC= netstart pccard_ether rc.resume rc.suspend +RCETCEXECMODE= 755 +RCETCEXECPACKAGE= rc +RCETCDEFAULTSDIR= /etc/defaults +RCETCDEFAULTS= rc.conf +RCETCDEFAULTSPACKAGE= rc SUBDIR+= rc.d Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Wed Mar 25 01:35:13 2020 (r359293) +++ head/libexec/rc/rc.d/Makefile Wed Mar 25 01:36:23 2020 (r359294) @@ -2,11 +2,11 @@ .include -CONFDIR= /etc/rc.d -CONFGROUPS= CONFS -CONFSPACKAGE= rc +BINDIR= /etc/rc.d +FILESGROUPS= BASERC +BASERCPACKAGE= rc -CONFS= DAEMON \ +BASERC= DAEMON \ FILESYSTEMS \ LOGIN \ NETWORKING \ @@ -115,7 +115,7 @@ CONFS= DAEMON \ watchdogd .if ${MK_NIS} != "no" -CONFS+= ypbind \ +BASERC+= ypbind \ ypldap \ yppasswdd \ ypserv \ @@ -125,23 +125,23 @@ CONFS+= ypbind \ .endif .if ${MK_ACCT} != "no" -CONFGROUPS+= ACCT +FILESGROUPS+= ACCT ACCT+= accounting ACCTPACKAGE= acct .endif .if ${MK_ACPI} != "no" -CONFGROUPS+= ACPI +FILESGROUPS+= ACPI ACPI= power_profile ACPIPACKAGE= acpi .endif .if ${MK_ACPI} != "no" || ${MK_APM} != "no" -CONFS+= powerd +BASERC+= powerd .endif .if ${MK_APM} != "no" -CONFGROUPS+= APM +FILESGROUPS+= APM APM+= apm .if ${MACHINE} == "i386" APM+= apmd @@ -150,15 +150,17 @@ APMPACKAGE= apm .endif .if ${MK_AUDIT} != "no" -CONFGROUPS+= AUDIT +FILESGROUPS+= AUDIT AUDIT+= auditd AUDIT+= auditdistd .endif .if ${MK_AUTOFS} != "no" -CONFS+= automount -CONFS+= automountd -CONFS+= autounmountd +FILESGROUPS+= AUFOFS +AUTOFS+= automount +AUTOFS+= automountd +AUTOFS+= autounmountd +AUTOFSPACKAGE= autofs .endif .if ${MK_BLACKLIST} != "no" @@ -166,7 +168,7 @@ _blacklistd+= blacklistd .endif .if ${MK_BLUETOOTH} != "no" -CONFGROUPS+= BLUETOOTH +FILESGROUPS+= BLUETOOTH BLUETOOTH+= bluetooth \ bthidd \ hcsecd \ @@ -177,71 +179,79 @@ BLUETOOTHPACKAGE= bluetooth .endif .if ${MK_BOOTPARAMD} != "no" -CONFS+= bootparams +BASERC+= bootparams .endif .if ${MK_BSNMP} != "no" -CONFGROUPS+= BSNMP +FILESGROUPS+= BSNMP BSNMP+= bsnmpd BSNMPPACKAGE= bsnmp .endif .if ${MK_CCD} != "no" -CONFS+= ccd +FILESGROUPS+= CCD +CCD+= ccd +CCDPACKAGE= ccdconfig .endif .if ${MK_FTP} != "no" -CONFS+= ftpd +BASERC+= ftpd .endif .if ${MK_HAST} != "no" -CONFGROUPS+= HAST +FILESGROUPS+= HAST HAST= hastd HASTPACKAGE= hast .endif .if ${MK_INETD} != "no" -CONFS+= inetd +BASERC+= inetd .endif .if ${MK_IPFILTER} != "no" -CONFS+= ipfilter \ - ipfs \ - ipmon \ - ipnat \ - ippool +FILESGROUPS+= IPFILTER +IPFILTER+= ipfilter \ + ipfs \ + ipmon \ + ipnat \ + ippool +IPFILTERPACKAGE= ipf .endif .if ${MK_IPFW} != "no" -CONFS+= ipfw +FILESGROUP+= IPFW +IPFW+= ipfw .if ${MK_NETGRAPH} != "no" -CONFS+= ipfw_netflow +IPFW+= ipfw_netflow .endif +IPFWPACKAGE= ipfw .endif .if ${MK_ISCSI} != "no" -CONFS+= iscsictl -CONFS+= iscsid +FILESGROUPS+= ISCSI +ISCSI+= iscsictl +ISCSI+= iscsid +ISCSIPACKAGE= iscsi .endif .if ${MK_JAIL} != "no" -CONFGROUPS+= JAIL +FILESGROUPS+= JAIL JAIL+= jail JAILPACKAGE= jail .endif .if ${MK_LEGACY_CONSOLE} != "no" -CONFS+= moused -CONFS+= syscons +BASERC+= moused +BASERC+= syscons .endif .if ${MK_LPR} != "no" -CONFS+= lpd +BASERC+= lpd .endif .if ${MK_KERBEROS} != "no" -CONFS+= ipropd_master -CONFS+= ipropd_slave +BASERC+= ipropd_master +BASERC+= ipropd_slave _kadmind= kadmind _kdc= kdc _kfd= kfd @@ -253,7 +263,7 @@ VAR_HEMIDAL_MODE= 700 .endif .if ${MK_MAIL} != "no" -CONFS+= othermta +BASERC+= othermta .endif .if ${MK_NS_CACHING} != "no" @@ -261,7 +271,7 @@ _nscd= nscd .endif .if ${MK_NTP} != "no" -CONFS+= ntpd +BASERC+= ntpd .endif .if ${MK_OFED} != "no" @@ -269,31 +279,31 @@ _opensm= opensm .endif .if ${MK_OPENSSL} != "no" -CONFS+= keyserv +BASERC+= keyserv .endif .if ${MK_OPENSSH} != "no" -CONFGROUPS+= SSH +FILESGROUPS+= SSH SSH= sshd SSHPACKAGE= ssh .endif .if ${MK_PF} != "no" -CONFS+= ftp-proxy +BASERC+= ftp-proxy .endif .if ${MK_ROUTED} != "no" -CONFS+= routed +BASERC+= routed .endif .if ${MK_SENDMAIL} != "no" -CONFGROUPS+= SMRCD +FILESGROUPS+= SMRCD SMRCD= sendmail SMRCDPACKAGE= sendmail .endif .if ${MK_UNBOUND} != "no" -CONFGROUPS+= UNBOUND +FILESGROUPS+= UNBOUND UNBOUND+= local_unbound UNBOUNDPACKAGE= unbound .endif @@ -303,25 +313,28 @@ _utx= utx .endif .if ${MK_VI} != "no" -CONFGROUPS+= VI +FILESGROUPS+= VI VI+= virecover VIPACKAGE= vi .endif .if ${MK_WIRELESS} != "no" -CONFS+= hostapd -CONFS+= wpa_supplicant +FILESGROUPS+= HOSTAPD WPA +HOSTAPD+= hostapd +HOSTAPDPACKAGE= hostapd +WPA+= wpa_supplicant +WPAPACKAGE= wpa .endif .if ${MK_ZFS} != "no" -CONFGROUPS+= ZFS +FILESGROUPS+= ZFS ZFS+= zfs ZFS+= zfsbe ZFS+= zfsd ZFS+= zvol .endif -.for fg in ${CONFGROUPS} +.for fg in ${FILESGROUPS} ${fg}MODE?= ${BINMODE} .endfor From owner-svn-src-head@freebsd.org Wed Mar 25 02:26:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78A0227278F; Wed, 25 Mar 2020 02:26:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48nBnC4KNGz4PwR; Wed, 25 Mar 2020 02:26:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pj1-x102f.google.com with SMTP id l36so383466pjb.3; Tue, 24 Mar 2020 19:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=/gXcP7G3O2EKTN4QzAixKoLZbG8jxxMSAYcaJ2jDUNw=; b=uP+mUaCzxb8vKvkT4HMkCIthUj9hIwO6vp2DxVktWqRe1sMWgcH1IAShis1+5s5WpK zQYYaBOTvRa9PYyUtKM3oSvzOd9nnZM3UHA0zhjp+aAtaav4CX0YXW2Do9OGe5ftXjce 83TYpY6VnD8ZCkVVhbPcJ/4laXVORifIjjG02mauE1tFTjz0iiMgTZ3vQPI+9ehMu573 GEAsdERiJLUeItzyQeAcTEAdtX7tDaIOTXX6/YMz2m3cLC+gAiwoQ2gNFz+tlM1sI4x5 HYGuzUURq6GQ0nD2MBD99FPn1KyAOTbiM8Kj+TOx5xGih+qHBE3+Ei/JEf9oeDraF2Sh 4BDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=/gXcP7G3O2EKTN4QzAixKoLZbG8jxxMSAYcaJ2jDUNw=; b=Aov9pah/o7qbw48LOGvE+Mw9k+bn4zgdPCJAFzY3pThFpo8mchLyUmAzBmQtkxByoB B2qPNgxccE4JUhu6VlLiDTXJ3MDdUDCtm0mM4S7ORGYiMgmrb/CWZ48qKlm2pNftfuDy /paXJSaHvHvr96QB4h83LLrVz1v83fCtL21tEXoY69yJrB4xQKdgMGMN8ORK5Dsjj5oF LRpI/iom8Jm0vyMyF/p/4ygebOqmGGrCwEeCjzKMYZ/hXKdgi4SDabN81B47GSC50spH GVz6ISpUbWfg/tleHEKdBgzLuzMaeNUPNggOhgTGNRrXUqOko3gFLWhlISPMSQCScgDO Kb+g== X-Gm-Message-State: ANhLgQ2/u4RQ9jmdLEEsNAEdCQEG11/rC3GLdQ/P/xaByogKT1D1uQDi 9nRx4qWvXskEMz0PpLNd3FNSGjfykns= X-Google-Smtp-Source: ADFU+vsvpScFEuAFTGBJX7uzkWTQ8CSmGNpST0fs4yPQXUj/M3qdktFuq+ZI1wbAXkHRt6mwkUdheA== X-Received: by 2002:a17:902:7682:: with SMTP id m2mr973523pll.311.1585103157488; Tue, 24 Mar 2020 19:25:57 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id w138sm17819092pff.145.2020.03.24.19.25.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2020 19:25:56 -0700 (PDT) From: Enji Cooper Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r359168 - head Date: Tue, 24 Mar 2020 19:25:55 -0700 In-Reply-To: <69a9072f-6592-4eb5-8e63-92255adee0d9@www.fastmail.com> Cc: Gleb Smirnoff , Ed Maste , src-committers , svn-src-all , svn-src-head@freebsd.org To: Scott Long References: <202003201602.02KG2kKW065294@repo.freebsd.org> <20200324214552.GD1292@FreeBSD.org> <69a9072f-6592-4eb5-8e63-92255adee0d9@www.fastmail.com> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48nBnC4KNGz4PwR X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=uP+mUaCz; dmarc=temperror reason="query timed out" header.from=gmail.com (policy=temperror); spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::102f as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[6]; RBL_VIRUSFREE_UNKNOWN_FAIL(0.00)[f.2.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.bip.virusfree.cz:query timed out]; RCVD_COUNT_THREE(0.00)[3]; RECEIVED_BLOCKLISTDE_FAIL(0.00)[228.52.19.73.bl.blocklist.de:query timed out]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RSPAMD_URIBL_FAIL(0.00)[query timed out]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; URIBL_BLOCKED(0.00)[obsoletefiles.inc.multi.uribl.com]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; SURBL_MULTI_FAIL(0.00)[query timed out]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_DNSFAIL(0.00)[gmail.com : query timed out]; ZRD_FAIL(0.00)[query timed out]; RBL_BLOCKLISTDE_FAIL(0.00)[f.2.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.bl.blocklist.de:query timed out]; IP_SCORE(0.00)[ip: (-8.37), ipnet: 2607:f8b0::/32(-0.38), asn: 15169(-0.48), country: US(-0.05)]; RBL_NIXSPAM_FAIL(0.00)[f.2.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.ix.dnsbl.manitu.net:query timed out]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_FAIL(0.00)[228.52.19.73.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net:query timed out] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 02:26:22 -0000 > On Mar 24, 2020, at 3:57 PM, Scott Long wrote: >=20 > On Tue, Mar 24, 2020, at 3:45 PM, Gleb Smirnoff wrote: >> On Fri, Mar 20, 2020 at 04:02:46PM +0000, Ed Maste wrote: >> E> Author: emaste >> E> Date: Fri Mar 20 16:02:45 2020 >> E> New Revision: 359168 >> E> URL: https://svnweb.freebsd.org/changeset/base/359168 >> E>=20 >> E> Log: >> E> remove ancient pre-2000 ObsoleteFiles.inc entries >> E> =20 >> E> We support 10.3 as the minimum version to install from, which = was >> E> released in the mid-2010s. There's a lot of ancient = ObsoleteFiles.inc >> E> history that serves no purpose today; start by removing entries = from >> E> 1999 and earlier. >>=20 >> I understand that rationale is to speedup 'make delete-old' times, = and >> trimming the default file definitely makes sense. However, what about >> keeping the full ObsoleteFiles.inc version, at least for documenting >> purposes? >>=20 >=20 > This is what SCM history is for, IMHO. The historical entries serve = little > purpose outside of that. Moreover, splitting them up into separate files will make merges more = difficult than they need to be/already are. Cheers, -Enji= From owner-svn-src-head@freebsd.org Wed Mar 25 02:28:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46C8727281D; Wed, 25 Mar 2020 02:28:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nBrR0yF6z4QmP; Wed, 25 Mar 2020 02:28:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76F94ADB9; Wed, 25 Mar 2020 02:28:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02P2Sm1E098617; Wed, 25 Mar 2020 02:28:48 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02P2Smxc098616; Wed, 25 Mar 2020 02:28:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003250228.02P2Smxc098616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 25 Mar 2020 02:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359295 - head/lib/libpmc X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/lib/libpmc X-SVN-Commit-Revision: 359295 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 02:28:57 -0000 Author: manu Date: Wed Mar 25 02:28:47 2020 New Revision: 359295 URL: https://svnweb.freebsd.org/changeset/base/359295 Log: libpmc: Always add the full include path for libpmcstat Previously it was only added for aarch64, amd64 and i386 Modified: head/lib/libpmc/Makefile Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Wed Mar 25 01:36:23 2020 (r359294) +++ head/lib/libpmc/Makefile Wed Mar 25 02:28:47 2020 (r359295) @@ -5,6 +5,8 @@ LIB= pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h +CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat + .if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" @@ -15,8 +17,6 @@ EVENT_ARCH="x86" .elif ${MACHINE_ARCH} == "powerpc" EVENT_ARCH="powerpc" .endif - -CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat .if ${MK_DIRDEPS_BUILD} == "yes" # avoid circular dependency From owner-svn-src-head@freebsd.org Wed Mar 25 08:36:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 543EE27AA49; Wed, 25 Mar 2020 08:36:05 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nM042642z4V5r; Wed, 25 Mar 2020 08:36:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73BCAFC1F; Wed, 25 Mar 2020 08:35:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02P8Zu37020551; Wed, 25 Mar 2020 08:35:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02P8Zul4020550; Wed, 25 Mar 2020 08:35:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003250835.02P8Zul4020550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 25 Mar 2020 08:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359296 - in head/libexec/rc: . rc.d X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head/libexec/rc: . rc.d X-SVN-Commit-Revision: 359296 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 08:36:05 -0000 Author: bapt Date: Wed Mar 25 08:35:55 2020 New Revision: 359296 URL: https://svnweb.freebsd.org/changeset/base/359296 Log: Revert r359294 per manu's request It breaks etcupdate Reported by: cy Modified: head/libexec/rc/Makefile head/libexec/rc/rc.d/Makefile Modified: head/libexec/rc/Makefile ============================================================================== --- head/libexec/rc/Makefile Wed Mar 25 02:28:47 2020 (r359295) +++ head/libexec/rc/Makefile Wed Mar 25 08:35:55 2020 (r359296) @@ -2,28 +2,25 @@ .include -BINDIR= /etc -FILESGROUPS= RCETC RCETCEXEC RCETCDEFAULTS -RCETC= network.subr rc rc.initdiskless rc.subr rc.shutdown rc.bsdextended -RCETCPACKAGE= rc +CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS +CONFETCDIR= /etc +CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown rc.bsdextended +CONFETCPACKAGE= rc .if ${MK_IPFW} != "no" -FILESGROUPS+= RCIPFW -RCIPFW+= rc.firewall -RCIPFWPACKAGE= ipfw +CONFETC+= rc.firewall .endif .if ${MK_SENDMAIL} != "no" -FILESGROUPS+= RCSENDMAIL -RCSENDMAIL+= rc.sendmail -RCSENDMAILPACKAGE= sendmail +CONFETC+= rc.sendmail .endif -RCETCMODE= 644 -RCETCEXEC= netstart pccard_ether rc.resume rc.suspend -RCETCEXECMODE= 755 -RCETCEXECPACKAGE= rc -RCETCDEFAULTSDIR= /etc/defaults -RCETCDEFAULTS= rc.conf -RCETCDEFAULTSPACKAGE= rc +CONFETCMODE= 644 +CONFETCEXEC= netstart pccard_ether rc.resume rc.suspend +CONFETCEXECDIR= /etc +CONFETCEXECMODE= 755 +CONFETCEXECPACKAGE= rc +CONFETCDEFAULTSDIR= /etc/defaults +CONFETCDEFAULTS= rc.conf +CONFETCDEFAULTSPACKAGE= rc SUBDIR+= rc.d Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Wed Mar 25 02:28:47 2020 (r359295) +++ head/libexec/rc/rc.d/Makefile Wed Mar 25 08:35:55 2020 (r359296) @@ -2,11 +2,11 @@ .include -BINDIR= /etc/rc.d -FILESGROUPS= BASERC -BASERCPACKAGE= rc +CONFDIR= /etc/rc.d +CONFGROUPS= CONFS +CONFSPACKAGE= rc -BASERC= DAEMON \ +CONFS= DAEMON \ FILESYSTEMS \ LOGIN \ NETWORKING \ @@ -115,7 +115,7 @@ BASERC= DAEMON \ watchdogd .if ${MK_NIS} != "no" -BASERC+= ypbind \ +CONFS+= ypbind \ ypldap \ yppasswdd \ ypserv \ @@ -125,23 +125,23 @@ BASERC+= ypbind \ .endif .if ${MK_ACCT} != "no" -FILESGROUPS+= ACCT +CONFGROUPS+= ACCT ACCT+= accounting ACCTPACKAGE= acct .endif .if ${MK_ACPI} != "no" -FILESGROUPS+= ACPI +CONFGROUPS+= ACPI ACPI= power_profile ACPIPACKAGE= acpi .endif .if ${MK_ACPI} != "no" || ${MK_APM} != "no" -BASERC+= powerd +CONFS+= powerd .endif .if ${MK_APM} != "no" -FILESGROUPS+= APM +CONFGROUPS+= APM APM+= apm .if ${MACHINE} == "i386" APM+= apmd @@ -150,17 +150,15 @@ APMPACKAGE= apm .endif .if ${MK_AUDIT} != "no" -FILESGROUPS+= AUDIT +CONFGROUPS+= AUDIT AUDIT+= auditd AUDIT+= auditdistd .endif .if ${MK_AUTOFS} != "no" -FILESGROUPS+= AUFOFS -AUTOFS+= automount -AUTOFS+= automountd -AUTOFS+= autounmountd -AUTOFSPACKAGE= autofs +CONFS+= automount +CONFS+= automountd +CONFS+= autounmountd .endif .if ${MK_BLACKLIST} != "no" @@ -168,7 +166,7 @@ _blacklistd+= blacklistd .endif .if ${MK_BLUETOOTH} != "no" -FILESGROUPS+= BLUETOOTH +CONFGROUPS+= BLUETOOTH BLUETOOTH+= bluetooth \ bthidd \ hcsecd \ @@ -179,79 +177,71 @@ BLUETOOTHPACKAGE= bluetooth .endif .if ${MK_BOOTPARAMD} != "no" -BASERC+= bootparams +CONFS+= bootparams .endif .if ${MK_BSNMP} != "no" -FILESGROUPS+= BSNMP +CONFGROUPS+= BSNMP BSNMP+= bsnmpd BSNMPPACKAGE= bsnmp .endif .if ${MK_CCD} != "no" -FILESGROUPS+= CCD -CCD+= ccd -CCDPACKAGE= ccdconfig +CONFS+= ccd .endif .if ${MK_FTP} != "no" -BASERC+= ftpd +CONFS+= ftpd .endif .if ${MK_HAST} != "no" -FILESGROUPS+= HAST +CONFGROUPS+= HAST HAST= hastd HASTPACKAGE= hast .endif .if ${MK_INETD} != "no" -BASERC+= inetd +CONFS+= inetd .endif .if ${MK_IPFILTER} != "no" -FILESGROUPS+= IPFILTER -IPFILTER+= ipfilter \ - ipfs \ - ipmon \ - ipnat \ - ippool -IPFILTERPACKAGE= ipf +CONFS+= ipfilter \ + ipfs \ + ipmon \ + ipnat \ + ippool .endif .if ${MK_IPFW} != "no" -FILESGROUP+= IPFW -IPFW+= ipfw +CONFS+= ipfw .if ${MK_NETGRAPH} != "no" -IPFW+= ipfw_netflow +CONFS+= ipfw_netflow .endif -IPFWPACKAGE= ipfw .endif .if ${MK_ISCSI} != "no" -FILESGROUPS+= ISCSI -ISCSI+= iscsictl -ISCSI+= iscsid -ISCSIPACKAGE= iscsi +CONFS+= iscsictl +CONFS+= iscsid .endif .if ${MK_JAIL} != "no" -FILESGROUPS+= JAIL +CONFGROUPS+= JAIL JAIL+= jail JAILPACKAGE= jail .endif .if ${MK_LEGACY_CONSOLE} != "no" -BASERC+= moused -BASERC+= syscons +CONFS+= moused +CONFS+= syscons .endif .if ${MK_LPR} != "no" -BASERC+= lpd +CONFS+= lpd .endif .if ${MK_KERBEROS} != "no" -BASERC+= ipropd_master -BASERC+= ipropd_slave +CONFS+= ipropd_master +CONFS+= ipropd_slave _kadmind= kadmind _kdc= kdc _kfd= kfd @@ -263,7 +253,7 @@ VAR_HEMIDAL_MODE= 700 .endif .if ${MK_MAIL} != "no" -BASERC+= othermta +CONFS+= othermta .endif .if ${MK_NS_CACHING} != "no" @@ -271,7 +261,7 @@ _nscd= nscd .endif .if ${MK_NTP} != "no" -BASERC+= ntpd +CONFS+= ntpd .endif .if ${MK_OFED} != "no" @@ -279,31 +269,31 @@ _opensm= opensm .endif .if ${MK_OPENSSL} != "no" -BASERC+= keyserv +CONFS+= keyserv .endif .if ${MK_OPENSSH} != "no" -FILESGROUPS+= SSH +CONFGROUPS+= SSH SSH= sshd SSHPACKAGE= ssh .endif .if ${MK_PF} != "no" -BASERC+= ftp-proxy +CONFS+= ftp-proxy .endif .if ${MK_ROUTED} != "no" -BASERC+= routed +CONFS+= routed .endif .if ${MK_SENDMAIL} != "no" -FILESGROUPS+= SMRCD +CONFGROUPS+= SMRCD SMRCD= sendmail SMRCDPACKAGE= sendmail .endif .if ${MK_UNBOUND} != "no" -FILESGROUPS+= UNBOUND +CONFGROUPS+= UNBOUND UNBOUND+= local_unbound UNBOUNDPACKAGE= unbound .endif @@ -313,28 +303,25 @@ _utx= utx .endif .if ${MK_VI} != "no" -FILESGROUPS+= VI +CONFGROUPS+= VI VI+= virecover VIPACKAGE= vi .endif .if ${MK_WIRELESS} != "no" -FILESGROUPS+= HOSTAPD WPA -HOSTAPD+= hostapd -HOSTAPDPACKAGE= hostapd -WPA+= wpa_supplicant -WPAPACKAGE= wpa +CONFS+= hostapd +CONFS+= wpa_supplicant .endif .if ${MK_ZFS} != "no" -FILESGROUPS+= ZFS +CONFGROUPS+= ZFS ZFS+= zfs ZFS+= zfsbe ZFS+= zfsd ZFS+= zvol .endif -.for fg in ${FILESGROUPS} +.for fg in ${CONFGROUPS} ${fg}MODE?= ${BINMODE} .endfor From owner-svn-src-head@freebsd.org Wed Mar 25 10:12:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2853327C8DA; Wed, 25 Mar 2020 10:12:31 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nP7J5J2Rz47MF; Wed, 25 Mar 2020 10:12:28 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29EDE19140; Wed, 25 Mar 2020 10:11:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PABb6l080422; Wed, 25 Mar 2020 10:11:37 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PABb0V080421; Wed, 25 Mar 2020 10:11:37 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003251011.02PABb0V080421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 25 Mar 2020 10:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359299 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359299 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 10:12:31 -0000 Author: 0mp (doc,ports committer) Date: Wed Mar 25 10:11:37 2020 New Revision: 359299 URL: https://svnweb.freebsd.org/changeset/base/359299 Log: Fix formatting Previously, the whole "jail_* variables" string would be stylized as a variable. This is incorrect. MFC after: 3 days Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Wed Mar 25 08:51:46 2020 (r359298) +++ head/share/man/man5/rc.conf.5 Wed Mar 25 10:11:37 2020 (r359299) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 23, 2020 +.Dd March 25, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -3887,7 +3887,7 @@ When set to all configured jails in .Va jail_list are stopped in reverse order. -.It Va jail_* variables +.It Va jail_ Ns * variables Note that older releases supported per-jail configuration via .Nm variables. From owner-svn-src-head@freebsd.org Wed Mar 25 13:18:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C98C2A234A; Wed, 25 Mar 2020 13:18:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nTGD1p6Vz4K1j; Wed, 25 Mar 2020 13:18:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8119F1B786; Wed, 25 Mar 2020 13:18:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PDIbB6089090; Wed, 25 Mar 2020 13:18:37 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PDIbPO089089; Wed, 25 Mar 2020 13:18:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003251318.02PDIbPO089089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 25 Mar 2020 13:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359300 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 13:18:45 -0000 Author: tuexen Date: Wed Mar 25 13:18:37 2020 New Revision: 359300 URL: https://svnweb.freebsd.org/changeset/base/359300 Log: Don't restore the vnet too early in error cases. MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Mar 25 10:11:37 2020 (r359299) +++ head/sys/netinet/sctputil.c Wed Mar 25 13:18:37 2020 (r359300) @@ -1673,10 +1673,10 @@ sctp_timeout_handler(void *t) (type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && (type != SCTP_TIMER_TYPE_ASOCKILL))) { SCTP_INP_DECR_REF(inp); - CURVNET_RESTORE(); SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler exiting due to closed socket\n", type); + CURVNET_RESTORE(); return; } } @@ -1688,10 +1688,10 @@ sctp_timeout_handler(void *t) if (inp) { SCTP_INP_DECR_REF(inp); } - CURVNET_RESTORE(); SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler exiting due to CLOSED association\n", type); + CURVNET_RESTORE(); return; } } @@ -1704,10 +1704,10 @@ sctp_timeout_handler(void *t) if (stcb) { atomic_add_int(&stcb->asoc.refcnt, -1); } - CURVNET_RESTORE(); SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler exiting due to not being active\n", type); + CURVNET_RESTORE(); return; } tmr->stopped_from = 0xa004; @@ -1722,10 +1722,10 @@ sctp_timeout_handler(void *t) if (inp) { SCTP_INP_DECR_REF(inp); } - CURVNET_RESTORE(); SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler exiting due to CLOSED association\n", type); + CURVNET_RESTORE(); return; } } else if (inp != NULL) { From owner-svn-src-head@freebsd.org Wed Mar 25 13:19:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE2092A23A3; Wed, 25 Mar 2020 13:19:49 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nTHS4DZnz4KPG; Wed, 25 Mar 2020 13:19:48 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 554431B787; Wed, 25 Mar 2020 13:19:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PDJgOC089181; Wed, 25 Mar 2020 13:19:42 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PDJgkA089180; Wed, 25 Mar 2020 13:19:42 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003251319.02PDJgkA089180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 25 Mar 2020 13:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359301 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 13:19:50 -0000 Author: tuexen Date: Wed Mar 25 13:19:41 2020 New Revision: 359301 URL: https://svnweb.freebsd.org/changeset/base/359301 Log: Use consistent debug output. MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Mar 25 13:18:37 2020 (r359300) +++ head/sys/netinet/sctputil.c Wed Mar 25 13:19:41 2020 (r359301) @@ -1674,7 +1674,7 @@ sctp_timeout_handler(void *t) (type != SCTP_TIMER_TYPE_ASOCKILL))) { SCTP_INP_DECR_REF(inp); SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to closed socket\n", + "Timer type %d handler exiting due to closed socket.\n", type); CURVNET_RESTORE(); return; @@ -1689,7 +1689,7 @@ sctp_timeout_handler(void *t) SCTP_INP_DECR_REF(inp); } SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to CLOSED association\n", + "Timer type %d handler exiting due to CLOSED association.\n", type); CURVNET_RESTORE(); return; @@ -1705,7 +1705,7 @@ sctp_timeout_handler(void *t) atomic_add_int(&stcb->asoc.refcnt, -1); } SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to not being active\n", + "Timer type %d handler exiting due to not being active.\n", type); CURVNET_RESTORE(); return; @@ -1723,7 +1723,7 @@ sctp_timeout_handler(void *t) SCTP_INP_DECR_REF(inp); } SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to CLOSED association\n", + "Timer type %d handler exiting due to CLOSED association.\n", type); CURVNET_RESTORE(); return; @@ -2051,7 +2051,7 @@ out_decr: } out_no_decr: - SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler finished\n", type); + SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d handler finished.\n", type); CURVNET_RESTORE(); NET_EPOCH_EXIT(et); } From owner-svn-src-head@freebsd.org Wed Mar 25 15:29:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 055422A46B8; Wed, 25 Mar 2020 15:29:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nX8j3FsVz47d4; Wed, 25 Mar 2020 15:29:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8685D1D114; Wed, 25 Mar 2020 15:29:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PFT2Ip066980; Wed, 25 Mar 2020 15:29:02 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PFT2FD066979; Wed, 25 Mar 2020 15:29:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003251529.02PFT2FD066979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 25 Mar 2020 15:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359302 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 15:29:11 -0000 Author: tuexen Date: Wed Mar 25 15:29:01 2020 New Revision: 359302 URL: https://svnweb.freebsd.org/changeset/base/359302 Log: Revert https://svnweb.freebsd.org/changeset/base/357829 This introduces a regression reported by koobs@ when running a pyhton test suite on a loaded system. This patch resulted in a failing accept() call, when the association was setup and gracefully shutdown by the peer before accept was called. So the following packetdrill script would fail: +0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3 +0.0 bind(3, ..., ...) = 0 +0.0 listen(3, 1) = 0 +0.0 < sctp: INIT[flgs=0, tag=1, a_rwnd=15000, os=1, is=1, tsn=1] +0.0 > sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=..., os=..., is=..., tsn=1, ...] +0.1 < sctp: COOKIE_ECHO[flgs=0, len=..., val=...] +0.0 > sctp: COOKIE_ACK[flgs=0] +0.0 < sctp: DATA[flgs=BE, len=116, tsn=1, sid=0, ssn=0, ppid=0] +0.0 > sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=..., gaps=[], dups=[]] +0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0] +0.0 > sctp: SHUTDOWN_ACK[flgs=0] +0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0] +0.0 accept(3, ..., ...) = 4 +0.0 close(3) = 0 +0.0 recv(4, ..., 4096, 0) = 100 +0.0 recv(4, ..., 4096, 0) = 0 +0.0 close(4) = 0 Reported by: koops@ Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Mar 25 13:19:41 2020 (r359301) +++ head/sys/netinet/sctp_pcb.c Wed Mar 25 15:29:01 2020 (r359302) @@ -4739,31 +4739,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc else so = inp->sctp_socket; - if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || - (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { - /* - * For TCP type we need special handling when we are - * connected. We also include the peel'ed off ones to. - */ - if (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) { - inp->sctp_flags &= ~SCTP_PCB_FLAGS_CONNECTED; - inp->sctp_flags |= SCTP_PCB_FLAGS_WAS_CONNECTED; - if (so) { - SOCKBUF_LOCK(&so->so_rcv); - so->so_state &= ~(SS_ISCONNECTING | - SS_ISDISCONNECTING | - SS_ISCONFIRMING | - SS_ISCONNECTED); - so->so_state |= SS_ISDISCONNECTED; - socantrcvmore_locked(so); - socantsendmore(so); - sctp_sowwakeup(inp, so); - sctp_sorwakeup(inp, so); - SCTP_SOWAKEUP(so); - } - } - } - /* * We used timer based freeing if a reader or writer is in the way. * So we first check if we are actually being called from a timer, @@ -4890,6 +4865,31 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE)) /* nothing around */ so = NULL; + + if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { + /* + * For TCP type we need special handling when we are + * connected. We also include the peel'ed off ones to. + */ + if (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) { + inp->sctp_flags &= ~SCTP_PCB_FLAGS_CONNECTED; + inp->sctp_flags |= SCTP_PCB_FLAGS_WAS_CONNECTED; + if (so) { + SOCKBUF_LOCK(&so->so_rcv); + so->so_state &= ~(SS_ISCONNECTING | + SS_ISDISCONNECTING | + SS_ISCONFIRMING | + SS_ISCONNECTED); + so->so_state |= SS_ISDISCONNECTED; + socantrcvmore_locked(so); + socantsendmore(so); + sctp_sowwakeup(inp, so); + sctp_sorwakeup(inp, so); + SCTP_SOWAKEUP(so); + } + } + } /* * Make it invalid too, that way if its about to run it will abort From owner-svn-src-head@freebsd.org Wed Mar 25 16:05:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A5AA2A508D; Wed, 25 Mar 2020 16:05:33 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nXyf5hRyz4N7F; Wed, 25 Mar 2020 16:05:30 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F2CF1D6D0; Wed, 25 Mar 2020 15:56:20 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PFuKK7084889; Wed, 25 Mar 2020 15:56:20 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PFuImN084880; Wed, 25 Mar 2020 15:56:18 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202003251556.02PFuImN084880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Wed, 25 Mar 2020 15:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359303 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/sys/fs X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/sys/fs X-SVN-Commit-Revision: 359303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 16:05:33 -0000 Author: freqlabs Date: Wed Mar 25 15:56:18 2020 New Revision: 359303 URL: https://svnweb.freebsd.org/changeset/base/359303 Log: MFOpenZFS: ZVOLs should not be allowed to have children zfs create, receive and rename can bypass this hierarchy rule. Update both userland and kernel module to prevent this issue and use pyzfs unit tests to exercise the ioctls directly. Note: this commit slightly changes zfs_ioc_create() ABI. This allow to differentiate a generic error (EINVAL) from the specific case where we tried to create a dataset below a ZVOL (ZFS_ERR_WRONG_PARENT). Reviewed-by: Paul Dagnelie Reviewed-by: Matt Ahrens Reviewed-by: Brian Behlendorf Reviewed-by: Tom Caputi Signed-off-by: loli10K Approved by: mav (mentor) MFC after: 2 weeks Sponsored by: iXsystems, Inc. openzfs/zfs@d8d418ff0cc90776182534bce10b01e9487b63e4 Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Mar 25 15:29:01 2020 (r359302) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Mar 25 15:56:18 2020 (r359303) @@ -141,6 +141,7 @@ typedef enum zfs_error { EZFS_TOOMANY, /* argument list too long */ EZFS_INITIALIZING, /* currently initializing */ EZFS_NO_INITIALIZE, /* no active initialize */ + EZFS_WRONG_PARENT, /* invalid parent dataset (e.g ZVOL) */ EZFS_UNKNOWN } zfs_error_t; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Mar 25 15:29:01 2020 (r359302) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Mar 25 15:56:18 2020 (r359303) @@ -3654,11 +3654,6 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs "no such parent '%s'"), parent); return (zfs_error(hdl, EZFS_NOENT, errbuf)); - case EINVAL: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "parent '%s' is not a filesystem"), parent); - return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); - case ENOTSUP: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "pool must be upgraded to set this " Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Wed Mar 25 15:29:01 2020 (r359302) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Wed Mar 25 15:56:18 2020 (r359303) @@ -28,6 +28,7 @@ * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Igor Kozhukhov + * Copyright (c) 2018, loli10K . All rights reserved. * Copyright (c) 2019 Datto Inc. */ @@ -3375,6 +3376,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const * - we are resuming a failed receive. */ if (stream_wantsnewfs) { + boolean_t is_volume = drrb->drr_type == DMU_OST_ZVOL; if (!flags->force) { zcmd_free_nvlists(&zc); zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, @@ -3392,6 +3394,25 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const zc.zc_name); return (zfs_error(hdl, EZFS_EXISTS, errbuf)); } + if (is_volume && strrchr(zc.zc_name, '/') == NULL) { + zcmd_free_nvlists(&zc); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "destination '%s' is the root dataset\n" + "cannot overwrite with a ZVOL"), + zc.zc_name); + return (zfs_error(hdl, EZFS_EXISTS, errbuf)); + } + if (is_volume && + ioctl(hdl->libzfs_fd, ZFS_IOC_DATASET_LIST_NEXT, + &zc) == 0) { + zcmd_free_nvlists(&zc); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "destination has children (eg. %s)\n" + "cannot overwrite with a ZVOL"), + zc.zc_name); + return (zfs_error(hdl, EZFS_WRONG_PARENT, + errbuf)); + } } if ((zhp = zfs_open(hdl, zc.zc_name, @@ -3441,6 +3462,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const zfs_close(zhp); } else { + zfs_handle_t *zhp; + /* * Destination filesystem does not exist. Therefore we better * be creating a new filesystem (either from a full backup, or @@ -3467,6 +3490,21 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const zcmd_free_nvlists(&zc); return (zfs_error(hdl, EZFS_BADRESTORE, errbuf)); } + + /* validate parent */ + zhp = zfs_open(hdl, zc.zc_name, ZFS_TYPE_DATASET); + if (zhp == NULL) { + zcmd_free_nvlists(&zc); + return (zfs_error(hdl, EZFS_BADRESTORE, errbuf)); + } + if (zfs_get_type(zhp) != ZFS_TYPE_FILESYSTEM) { + zcmd_free_nvlists(&zc); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "parent '%s' is not a filesystem"), zc.zc_name); + zfs_close(zhp); + return (zfs_error(hdl, EZFS_WRONG_PARENT, errbuf)); + } + zfs_close(zhp); newfs = B_TRUE; } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Wed Mar 25 15:29:01 2020 (r359302) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Wed Mar 25 15:56:18 2020 (r359303) @@ -265,6 +265,8 @@ libzfs_error_description(libzfs_handle_t *hdl) case EZFS_NO_INITIALIZE: return (dgettext(TEXT_DOMAIN, "there is no active " "initialization")); + case EZFS_WRONG_PARENT: + return (dgettext(TEXT_DOMAIN, "invalid parent dataset")); case EZFS_UNKNOWN: return (dgettext(TEXT_DOMAIN, "unknown error")); default: @@ -536,6 +538,9 @@ zpool_standard_error_fmt(libzfs_handle_t *hdl, int err break; case ZFS_ERR_VDEV_TOO_BIG: zfs_verror(hdl, EZFS_VDEV_TOO_BIG, fmt, ap); + break; + case ZFS_ERR_WRONG_PARENT: + zfs_verror(hdl, EZFS_WRONG_PARENT, fmt, ap); break; default: zfs_error_aux(hdl, strerror(error)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Mar 25 15:29:01 2020 (r359302) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Mar 25 15:56:18 2020 (r359303) @@ -28,6 +28,7 @@ * Copyright (c) 2015, STRATO AG, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 Nexenta Systems, Inc. + * Copyright (c) 2018, loli10K . All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -971,6 +972,8 @@ dmu_objset_create_check(void *arg, dmu_tx_t *tx) dmu_objset_create_arg_t *doca = arg; dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dir_t *pdd; + dsl_dataset_t *parentds; + objset_t *parentos; const char *tail; int error; @@ -992,6 +995,30 @@ dmu_objset_create_check(void *arg, dmu_tx_t *tx) } error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, doca->doca_cred); + if (error != 0) { + dsl_dir_rele(pdd, FTAG); + return (error); + } + + /* can't create below anything but filesystems (eg. no ZVOLs) */ + error = dsl_dataset_hold_obj(pdd->dd_pool, + dsl_dir_phys(pdd)->dd_head_dataset_obj, FTAG, &parentds); + if (error != 0) { + dsl_dir_rele(pdd, FTAG); + return (error); + } + error = dmu_objset_from_ds(parentds, &parentos); + if (error != 0) { + dsl_dataset_rele(parentds, FTAG); + dsl_dir_rele(pdd, FTAG); + return (error); + } + if (dmu_objset_type(parentos) != DMU_OST_ZFS) { + dsl_dataset_rele(parentds, FTAG); + dsl_dir_rele(pdd, FTAG); + return (SET_ERROR(ZFS_ERR_WRONG_PARENT)); + } + dsl_dataset_rele(parentds, FTAG); dsl_dir_rele(pdd, FTAG); return (error); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Mar 25 15:29:01 2020 (r359302) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Mar 25 15:56:18 2020 (r359303) @@ -27,6 +27,7 @@ * Copyright 2014 HybridCluster. All rights reserved. * Copyright 2016 RackTop Systems. * Copyright (c) 2014 Integros [integros.com] + * Copyright (c) 2018, loli10K . All rights reserved. */ #include @@ -1308,6 +1309,7 @@ recv_begin_check_existing_impl(dmu_recv_begin_arg_t *d uint64_t fromguid) { uint64_t val; + uint64_t children; int error; dsl_pool_t *dp = ds->ds_dir->dd_pool; @@ -1329,6 +1331,15 @@ recv_begin_check_existing_impl(dmu_recv_begin_arg_t *d if (error != ENOENT) return (error == 0 ? SET_ERROR(EEXIST) : error); + /* must not have children if receiving a ZVOL */ + error = zap_count(dp->dp_meta_objset, + dsl_dir_phys(ds->ds_dir)->dd_child_dir_zapobj, &children); + if (error != 0) + return (error); + if (drba->drba_cookie->drc_drrb->drr_type != DMU_OST_ZFS && + children > 0) + return (SET_ERROR(ZFS_ERR_WRONG_PARENT)); + /* * Check snapshot limit before receiving. We'll recheck again at the * end, but might as well abort before receiving if we're already over @@ -1466,6 +1477,7 @@ dmu_recv_begin_check(void *arg, dmu_tx_t *tx) } else if (error == ENOENT) { /* target fs does not exist; must be a full backup or clone */ char buf[ZFS_MAX_DATASET_NAME_LEN]; + objset_t *os; /* * If it's a non-clone incremental, we are missing the @@ -1510,6 +1522,17 @@ dmu_recv_begin_check(void *arg, dmu_tx_t *tx) return (error); } + /* can't recv below anything but filesystems (eg. no ZVOLs) */ + error = dmu_objset_from_ds(ds, &os); + if (error != 0) { + dsl_dataset_rele(ds, FTAG); + return (error); + } + if (dmu_objset_type(os) != DMU_OST_ZFS) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(ZFS_ERR_WRONG_PARENT)); + } + if (drba->drba_origin != NULL) { dsl_dataset_t *origin; error = dsl_dataset_hold(dp, drba->drba_origin, @@ -1531,6 +1554,7 @@ dmu_recv_begin_check(void *arg, dmu_tx_t *tx) } dsl_dataset_rele(origin, FTAG); } + dsl_dataset_rele(ds, FTAG); error = 0; } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Wed Mar 25 15:29:01 2020 (r359302) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Wed Mar 25 15:56:18 2020 (r359303) @@ -26,6 +26,7 @@ * Copyright (c) 2014 Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2018, loli10K . All rights reserved. */ #include @@ -1852,6 +1853,8 @@ dsl_dir_rename_check(void *arg, dmu_tx_t *tx) dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dir_t *dd, *newparent; dsl_valid_rename_arg_t dvra; + dsl_dataset_t *parentds; + objset_t *parentos; const char *mynewname; int error; @@ -1881,6 +1884,29 @@ dsl_dir_rename_check(void *arg, dmu_tx_t *tx) dsl_dir_rele(dd, FTAG); return (SET_ERROR(EEXIST)); } + + /* can't rename below anything but filesystems (eg. no ZVOLs) */ + error = dsl_dataset_hold_obj(newparent->dd_pool, + dsl_dir_phys(newparent)->dd_head_dataset_obj, FTAG, &parentds); + if (error != 0) { + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); + return (error); + } + error = dmu_objset_from_ds(parentds, &parentos); + if (error != 0) { + dsl_dataset_rele(parentds, FTAG); + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); + return (error); + } + if (dmu_objset_type(parentos) != DMU_OST_ZFS) { + dsl_dataset_rele(parentds, FTAG); + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); + return (error); + } + dsl_dataset_rele(parentds, FTAG); ASSERT3U(strnlen(ddra->ddra_newname, ZFS_MAX_DATASET_NAME_LEN), <, ZFS_MAX_DATASET_NAME_LEN); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 25 15:29:01 2020 (r359302) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 25 15:56:18 2020 (r359303) @@ -33,6 +33,7 @@ * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Toomas Soome * Copyright 2017 RackTop Systems. + * Copyright (c) 2018, loli10K . All rights reserved. * Copyright (c) 2019 Datto Inc. */ @@ -3172,8 +3173,9 @@ zfs_fill_zplprops_impl(objset_t *os, uint64_t zplver, ASSERT(zplprops != NULL); + /* parent dataset must be a filesystem */ if (os != NULL && os->os_phys->os_type != DMU_OST_ZFS) - return (SET_ERROR(EINVAL)); + return (SET_ERROR(ZFS_ERR_WRONG_PARENT)); /* * Pull out creator prop choices, if any. @@ -3249,15 +3251,11 @@ zfs_fill_zplprops(const char *dataset, nvlist_t *creat uint64_t zplver = ZPL_VERSION; objset_t *os = NULL; char parentname[ZFS_MAX_DATASET_NAME_LEN]; - char *cp; spa_t *spa; uint64_t spa_vers; int error; - (void) strlcpy(parentname, dataset, sizeof (parentname)); - cp = strrchr(parentname, '/'); - ASSERT(cp != NULL); - cp[0] = '\0'; + zfs_get_parent(dataset, parentname, sizeof (parentname)); if ((error = spa_open(dataset, &spa, FTAG)) != 0) return (error); Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Wed Mar 25 15:29:01 2020 (r359302) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Wed Mar 25 15:56:18 2020 (r359303) @@ -1063,7 +1063,8 @@ typedef enum { ZFS_ERR_DISCARDING_CHECKPOINT, ZFS_ERR_NO_CHECKPOINT, ZFS_ERR_DEVRM_IN_PROGRESS, - ZFS_ERR_VDEV_TOO_BIG + ZFS_ERR_VDEV_TOO_BIG, + ZFS_ERR_WRONG_PARENT, } zfs_errno_t; /* From owner-svn-src-head@freebsd.org Wed Mar 25 18:14:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B8A42A7AF7; Wed, 25 Mar 2020 18:14:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nbqJ1mHsz4DKq; Wed, 25 Mar 2020 18:14:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 892B41F50F; Wed, 25 Mar 2020 18:14:12 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PIECSO069421; Wed, 25 Mar 2020 18:14:12 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PIEC4f069420; Wed, 25 Mar 2020 18:14:12 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003251814.02PIEC4f069420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 25 Mar 2020 18:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359305 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 18:14:22 -0000 Author: tuexen Date: Wed Mar 25 18:14:12 2020 New Revision: 359305 URL: https://svnweb.freebsd.org/changeset/base/359305 Log: Improve consistency in debug output. MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Mar 25 16:24:28 2020 (r359304) +++ head/sys/netinet/sctputil.c Wed Mar 25 18:14:12 2020 (r359305) @@ -1696,7 +1696,7 @@ sctp_timeout_handler(void *t) } } tmr->stopped_from = 0xa003; - SCTPDBG(SCTP_DEBUG_TIMER1, "Timer type %d goes off\n", type); + SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d goes off.\n", type); if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) { if (inp) { SCTP_INP_DECR_REF(inp); @@ -1733,9 +1733,9 @@ sctp_timeout_handler(void *t) } else { SCTP_WQ_ADDR_LOCK(); } - /* record in stopped what t-o occurred */ - tmr->stopped_from = type; + /* Record in stopped_from which timeout occurred. */ + tmr->stopped_from = type; NET_EPOCH_ENTER(et); /* mark as being serviced now */ if (SCTP_OS_TIMER_PENDING(&tmr->timer)) { @@ -2108,14 +2108,14 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) && (t_type != SCTP_TIMER_TYPE_ASOCKILL)) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not started: inp=%p, stcb=%p, net=%p (stcb deleted).\n", + "Timer type %d not started: inp=%p, stcb=%p, net=%p (stcb deleted).\n", t_type, inp, stcb, net); return; } /* Don't restart timer on net that's been removed. */ if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not started: inp=%p, stcb=%p, net=%p (net deleted).\n", + "Timer type %d not started: inp=%p, stcb=%p, net=%p (net deleted).\n", t_type, inp, stcb, net); return; } @@ -2208,7 +2208,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s if ((net->dest_state & SCTP_ADDR_NOHB) && !(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not started: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d not started: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); return; } @@ -2287,7 +2287,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } if (net->dest_state & SCTP_ADDR_NO_PMTUD) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not started: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d not started: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); return; } @@ -2452,7 +2452,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s * we leave the current one up unchanged. */ SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d already running: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d already running: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); return; } @@ -2474,7 +2474,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s tmr->ticks = sctp_get_tick_count(); if (SCTP_OS_TIMER_START(&tmr->timer, to_ticks, sctp_timeout_handler, tmr) == 0) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d started: ticks=%u, inp=%p, stcb=%p, net=%p.\n", + "Timer type %d started: ticks=%u, inp=%p, stcb=%p, net=%p.\n", t_type, to_ticks, inp, stcb, net); } else { /* @@ -2482,7 +2482,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s * above. */ SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d restarted: ticks=%u, inp=%p, stcb=%p, net=%p.\n", + "Timer type %d restarted: ticks=%u, inp=%p, stcb=%p, net=%p.\n", t_type, to_ticks, inp, stcb, net); } return; @@ -2739,7 +2739,7 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st * return. */ SCTPDBG(SCTP_DEBUG_TIMER2, - "shared timer type %d not running: inp=%p, stcb=%p, net=%p.\n", + "Shared timer type %d not running: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); return; } @@ -2763,14 +2763,14 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st ("sctp_timer_stop of type %d: net = %p, tmr->net = %p", t_type, net, tmr->net)); SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d stopped: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d stopped: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); tmr->ep = NULL; tmr->tcb = NULL; tmr->net = NULL; } else { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not stopped: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d not stopped: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); } return; From owner-svn-src-head@freebsd.org Wed Mar 25 18:20:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECFDB2A7D3E; Wed, 25 Mar 2020 18:20:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nbyh5YRRz4GGD; Wed, 25 Mar 2020 18:20:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8CFC1F520; Wed, 25 Mar 2020 18:20:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PIKb3A069801; Wed, 25 Mar 2020 18:20:37 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PIKbed069800; Wed, 25 Mar 2020 18:20:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003251820.02PIKbed069800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 25 Mar 2020 18:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359306 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359306 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 18:20:45 -0000 Author: tuexen Date: Wed Mar 25 18:20:37 2020 New Revision: 359306 URL: https://svnweb.freebsd.org/changeset/base/359306 Log: Remove an optimization, which was incorrect a couple of times and therefore doesn't seem worth to be there. In this case COOKIE where not retransmitted anymore, when the socket was already closed. MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Mar 25 18:14:12 2020 (r359305) +++ head/sys/netinet/sctputil.c Wed Mar 25 18:20:37 2020 (r359306) @@ -1659,28 +1659,10 @@ sctp_timeout_handler(void *t) KASSERT(tmr->self == tmr, ("tmr->self corrupted")); KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), ("Invalid timer type %d", tmr->type)); type = tmr->type; - tmr->stopped_from = 0xa001; if (inp) { SCTP_INP_INCR_REF(inp); - if ((inp->sctp_socket == NULL) && - ((type != SCTP_TIMER_TYPE_INPKILL) && - (type != SCTP_TIMER_TYPE_INIT) && - (type != SCTP_TIMER_TYPE_SEND) && - (type != SCTP_TIMER_TYPE_RECV) && - (type != SCTP_TIMER_TYPE_HEARTBEAT) && - (type != SCTP_TIMER_TYPE_SHUTDOWN) && - (type != SCTP_TIMER_TYPE_SHUTDOWNACK) && - (type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && - (type != SCTP_TIMER_TYPE_ASOCKILL))) { - SCTP_INP_DECR_REF(inp); - SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type %d handler exiting due to closed socket.\n", - type); - CURVNET_RESTORE(); - return; - } } - tmr->stopped_from = 0xa002; + tmr->stopped_from = 0xa001; if (stcb) { atomic_add_int(&stcb->asoc.refcnt, 1); if (stcb->asoc.state == 0) { @@ -1695,7 +1677,7 @@ sctp_timeout_handler(void *t) return; } } - tmr->stopped_from = 0xa003; + tmr->stopped_from = 0xa002; SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d goes off.\n", type); if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) { if (inp) { @@ -1710,8 +1692,8 @@ sctp_timeout_handler(void *t) CURVNET_RESTORE(); return; } - tmr->stopped_from = 0xa004; + tmr->stopped_from = 0xa003; if (stcb) { SCTP_TCB_LOCK(stcb); atomic_add_int(&stcb->asoc.refcnt, -1); From owner-svn-src-head@freebsd.org Wed Mar 25 19:21:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8260A261443; Wed, 25 Mar 2020 19:21:17 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48ndJX40gGz4dKg; Wed, 25 Mar 2020 19:21:15 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6050B2013D; Wed, 25 Mar 2020 19:12:22 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PJCMpS004382; Wed, 25 Mar 2020 19:12:22 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PJCJLP004368; Wed, 25 Mar 2020 19:12:19 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202003251912.02PJCJLP004368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 25 Mar 2020 19:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359307 - in head: lib/libsecureboot lib/libsecureboot/h stand/common stand/libsa stand/userboot stand/userboot/test stand/userboot/userboot usr.sbin/bhyveload X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head: lib/libsecureboot lib/libsecureboot/h stand/common stand/libsa stand/userboot stand/userboot/test stand/userboot/userboot usr.sbin/bhyveload X-SVN-Commit-Revision: 359307 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 19:21:18 -0000 Author: sjg Date: Wed Mar 25 19:12:19 2020 New Revision: 359307 URL: https://svnweb.freebsd.org/changeset/base/359307 Log: Fix pkgfs stat so it satisfies libsecureboot We need a valid st_dev, st_ino and st_mtime to correctly track which files have been verified and to update our notion of time. ve_utc_set(): ignore utc if it would jump our current time by more than VE_UTC_MAX_JUMP (20 years). Allow testing of install command via userboot. Need to fix its stat implementation too. bhyveload also needs stat fixed - due to change to userboot.h Call ve_error_get() from vectx_close() when hash is wrong. Track the names of files we have hashed into pcr For the purposes of measured boot, it is important to be able to reproduce the hash reflected in loader.ve.pcr so loader.ve.hashed provides a list of names in the order they were added. Reviewed by: imp MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org//D24027 Modified: head/lib/libsecureboot/h/libsecureboot.h head/lib/libsecureboot/vectx.c head/lib/libsecureboot/veopen.c head/lib/libsecureboot/vepcr.c head/lib/libsecureboot/verify_file.c head/lib/libsecureboot/vets.c head/stand/common/install.c head/stand/libsa/pkgfs.c head/stand/userboot/test/test.c head/stand/userboot/userboot.h head/stand/userboot/userboot/conf.c head/stand/userboot/userboot/host.c head/usr.sbin/bhyveload/bhyveload.c Modified: head/lib/libsecureboot/h/libsecureboot.h ============================================================================== --- head/lib/libsecureboot/h/libsecureboot.h Wed Mar 25 18:20:37 2020 (r359306) +++ head/lib/libsecureboot/h/libsecureboot.h Wed Mar 25 19:12:19 2020 (r359307) @@ -78,10 +78,11 @@ unsigned char *verify_sig(const char *, int); unsigned char *verify_asc(const char *, int); /* OpenPGP */ void ve_pcr_init(void); -void ve_pcr_update(unsigned char *, size_t); +void ve_pcr_update(const char *, unsigned char *, size_t); ssize_t ve_pcr_get(unsigned char *, size_t); int ve_pcr_updating_get(void); void ve_pcr_updating_set(int); +char * ve_pcr_hashed_get(int); /* flags for verify_{asc,sig,signed} */ #define VEF_VERBOSE 1 Modified: head/lib/libsecureboot/vectx.c ============================================================================== --- head/lib/libsecureboot/vectx.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/lib/libsecureboot/vectx.c Wed Mar 25 19:12:19 2020 (r359307) @@ -104,8 +104,8 @@ vectx_open(int fd, const char *path, off_t off, struct rc = verify_prep(fd, path, off, stp, __func__); DEBUG_PRINTF(2, - ("vectx_open: caller=%s,name='%s',prep_rc=%d\n", - caller,path, rc)); + ("vectx_open: caller=%s,fd=%d,name='%s',prep_rc=%d\n", + caller, fd, path, rc)); switch (rc) { case VE_FINGERPRINT_NONE: @@ -316,6 +316,9 @@ vectx_lseek(struct vectx *ctx, off_t off, int whence) * We have finished reading file, compare the hash with what * we wanted. * + * Be sure to call this before closing the file, since we may + * need to seek to the end to ensure hashing is complete. + * * @param[in] pctx * pointer to ctx * @@ -337,20 +340,25 @@ vectx_close(struct vectx *ctx, int severity, const cha */ ve_pcr_updating_set((severity == VE_MUST)); #endif + /* make sure we have hashed it all */ + vectx_lseek(ctx, 0, SEEK_END); rc = ve_check_hash(&ctx->vec_ctx, ctx->vec_md, ctx->vec_path, ctx->vec_want, ctx->vec_hashsz); } DEBUG_PRINTF(2, ("vectx_close: caller=%s,name='%s',rc=%d,severity=%d\n", caller,ctx->vec_path, rc, severity)); - if (severity > VE_WANT || rc == VE_FINGERPRINT_WRONG) - printf("%serified %s\n", (rc <= 0) ? "Unv" : "V", - ctx->vec_path); + if (rc == VE_FINGERPRINT_WRONG) { + printf("Unverified: %s\n", ve_error_get()); #if !defined(UNIT_TEST) && !defined(DEBUG_VECTX) - /* we are generally called with VE_MUST */ - if (severity > VE_WANT && rc == VE_FINGERPRINT_WRONG) - panic("cannot continue"); + /* we are generally called with VE_MUST */ + if (severity > VE_WANT) + panic("cannot continue"); #endif + } else if (severity > VE_WANT) { + printf("%serified %s\n", (rc <= 0) ? "Unv" : "V", + ctx->vec_path); + } free(ctx); return ((rc < 0) ? rc : 0); } Modified: head/lib/libsecureboot/veopen.c ============================================================================== --- head/lib/libsecureboot/veopen.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/lib/libsecureboot/veopen.c Wed Mar 25 19:12:19 2020 (r359307) @@ -86,9 +86,11 @@ fingerprint_info_add(const char *filename, const char } nfip->fi_prefix = strdup(filename); cp = strrchr(nfip->fi_prefix, '/'); - if (cp) + if (cp == nfip->fi_prefix) { + cp[1] = '\0'; + } else if (cp) { *cp = '\0'; - else { + } else { free(nfip->fi_prefix); free(nfip); return; @@ -96,7 +98,7 @@ fingerprint_info_add(const char *filename, const char } /* collapse any trailing ..[/] */ n = 0; - while ((cp = strrchr(nfip->fi_prefix, '/')) != NULL) { + while ((cp = strrchr(nfip->fi_prefix, '/')) > nfip->fi_prefix) { if (cp[1] == '\0') { /* trailing "/" */ *cp = '\0'; continue; Modified: head/lib/libsecureboot/vepcr.c ============================================================================== --- head/lib/libsecureboot/vepcr.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/lib/libsecureboot/vepcr.c Wed Mar 25 19:12:19 2020 (r359307) @@ -25,6 +25,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include "libsecureboot-priv.h" /* @@ -43,8 +44,17 @@ __FBSDID("$FreeBSD$"); static const br_hash_class *pcr_md = NULL; static br_hash_compat_context pcr_ctx; static size_t pcr_hlen = 0; -static int pcr_updating; +static int pcr_updating = -1; +struct hashed_info { + const char *hi_path; + const char *hi_basename; + STAILQ_ENTRY(hashed_info) entries; +}; + +static STAILQ_HEAD(, hashed_info) hi_list; + + /** * @brief initialize pcr context * @@ -54,10 +64,13 @@ static int pcr_updating; void ve_pcr_init(void) { - pcr_updating = 0; - pcr_hlen = br_sha256_SIZE; - pcr_md = &br_sha256_vtable; - pcr_md->init(&pcr_ctx.vtable); + if (pcr_updating < 0) { + pcr_updating = 0; + pcr_hlen = br_sha256_SIZE; + pcr_md = &br_sha256_vtable; + pcr_md->init(&pcr_ctx.vtable); + STAILQ_INIT(&hi_list); + } } /** @@ -82,10 +95,28 @@ ve_pcr_updating_set(int updating) * @brief update pcr context */ void -ve_pcr_update(unsigned char *data, size_t dlen) +ve_pcr_update(const char *path, unsigned char *data, size_t dlen) { - if (pcr_updating != 0 && pcr_md != NULL) + struct hashed_info *hip; + + if (pcr_updating > 0 && pcr_md != NULL) { pcr_md->update(&pcr_ctx.vtable, data, dlen); + /* if mallocs fail, measured boot will likely fail too */ + if ((hip = malloc(sizeof(struct hashed_info)))) { + hip->hi_path = strdup(path); + if (!hip->hi_path) { + free(hip); + return; + } + hip->hi_basename = strrchr(hip->hi_path, '/'); + if (hip->hi_basename) { + hip->hi_basename++; + } else { + hip->hi_basename = hip->hi_path; + } + STAILQ_INSERT_TAIL(&hi_list, hip, entries); + } + } } /** @@ -102,3 +133,37 @@ ve_pcr_get(unsigned char *buf, size_t sz) return (pcr_hlen); } +/** + * @brief get list of paths in prc + */ +char * +ve_pcr_hashed_get(int flags) +{ + const char *cp; + char *hinfo; + struct hashed_info *hip; + size_t nbytes; + size_t x; + int n; + + n = 0; + nbytes = x = 0; + hinfo = NULL; + STAILQ_FOREACH(hip, &hi_list, entries) { + nbytes += 1 + strlen(flags ? hip->hi_basename : hip->hi_path); + } + if (nbytes > 1) { + hinfo = malloc(nbytes + 2); + if (hinfo) { + STAILQ_FOREACH(hip, &hi_list, entries) { + cp = flags ? hip->hi_basename : hip->hi_path; + n = snprintf(&hinfo[x], nbytes - x, "%s,", cp); + x += n; + } + if (x > 0) { + hinfo[x-1] = '\0'; + } + } + } + return hinfo; +} Modified: head/lib/libsecureboot/verify_file.c ============================================================================== --- head/lib/libsecureboot/verify_file.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/lib/libsecureboot/verify_file.c Wed Mar 25 19:12:19 2020 (r359307) @@ -117,10 +117,12 @@ is_verified(struct stat *stp) { struct verify_status *vsp; - for (vsp = verified_files; vsp != NULL; vsp = vsp->vs_next) { - if (stp->st_dev == vsp->vs_dev && - stp->st_ino == vsp->vs_ino) - return (vsp->vs_status); + if (stp->st_ino > 0) { + for (vsp = verified_files; vsp != NULL; vsp = vsp->vs_next) { + if (stp->st_dev == vsp->vs_dev && + stp->st_ino == vsp->vs_ino) + return (vsp->vs_status); + } } return (VE_NOT_CHECKED); } @@ -367,10 +369,11 @@ verify_prep(int fd, const char *filename, off_t off, s return (0); } DEBUG_PRINTF(2, - ("caller=%s,fd=%d,name='%s',off=%lld,dev=%lld,ino=%lld\n", + ("verify_prep: caller=%s,fd=%d,name='%s',off=%lld,dev=%lld,ino=%lld\n", caller, fd, filename, (long long)off, (long long)stp->st_dev, (long long)stp->st_ino)); rc = is_verified(stp); + DEBUG_PRINTF(4,("verify_prep: is_verified()->%d\n", rc)); if (rc == VE_NOT_CHECKED) { rc = find_manifest(filename); } else { @@ -458,7 +461,6 @@ verify_file(int fd, const char *filename, off_t off, i #endif } if (severity < VE_MUST) { /* not a kernel or module */ - if ((cp = strrchr(filename, '/'))) { cp++; if (strncmp(cp, "loader.ve.", 10) == 0) { @@ -511,6 +513,7 @@ verify_pcr_export(void) #ifdef VE_PCR_SUPPORT char hexbuf[br_sha256_SIZE * 2 + 2]; unsigned char hbuf[br_sha256_SIZE]; + char *hinfo; char *hex; ssize_t hlen; @@ -520,6 +523,17 @@ verify_pcr_export(void) if (hex) { hex[hlen*2] = '\0'; /* clobber newline */ setenv("loader.ve.pcr", hex, 1); + DEBUG_PRINTF(1, + ("%s: setenv(loader.ve.pcr, %s\n", __func__, + hex)); + hinfo = ve_pcr_hashed_get(1); + if (hinfo) { + setenv("loader.ve.hashed", hinfo, 1); + DEBUG_PRINTF(1, + ("%s: setenv(loader.ve.hashed, %s\n", + __func__, hinfo)); + free(hinfo); + } } } #endif Modified: head/lib/libsecureboot/vets.c ============================================================================== --- head/lib/libsecureboot/vets.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/lib/libsecureboot/vets.c Wed Mar 25 19:12:19 2020 (r359307) @@ -44,6 +44,10 @@ __FBSDID("$FreeBSD$"); #endif #define SECONDS_PER_DAY 86400 +#define SECONDS_PER_YEAR 365 * SECONDS_PER_DAY +#ifndef VE_UTC_MAX_JUMP +# define VE_UTC_MAX_JUMP 20 * SECONDS_PER_YEAR +#endif #define X509_DAYS_TO_UTC0 719528 int DebugVe = 0; @@ -113,12 +117,14 @@ static time_t ve_utc = 0; * set ve_utc used for certificate verification * * @param[in] utc - * time - ignored unless greater than current value. + * time - ignored unless greater than current value + * and not a leap of 20 years or more. */ void ve_utc_set(time_t utc) { - if (utc > ve_utc) { + if (utc > ve_utc && + (ve_utc == 0 || (utc - ve_utc) < VE_UTC_MAX_JUMP)) { DEBUG_PRINTF(2, ("Set ve_utc=%jd\n", (intmax_t)utc)); ve_utc = utc; } @@ -346,10 +352,10 @@ ve_trust_init(void) if (once >= 0) return (once); once = 0; /* to be sure */ - ve_utc_set(time(NULL)); #ifdef BUILD_UTC - ve_utc_set(BUILD_UTC); /* just in case */ + ve_utc_set(BUILD_UTC); /* ensure sanity */ #endif + ve_utc_set(time(NULL)); ve_error_set(NULL); /* make sure it is empty */ #ifdef VE_PCR_SUPPORT ve_pcr_init(); @@ -903,7 +909,7 @@ ve_check_hash(br_hash_compat_context *ctx, const br_ha md->out(&ctx->vtable, hbuf); #ifdef VE_PCR_SUPPORT - ve_pcr_update(hbuf, hlen); + ve_pcr_update(path, hbuf, hlen); #endif hex = hexdigest(hexbuf, sizeof(hexbuf), hbuf, hlen); if (!hex) Modified: head/stand/common/install.c ============================================================================== --- head/stand/common/install.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/stand/common/install.c Wed Mar 25 19:12:19 2020 (r359307) @@ -210,6 +210,13 @@ install(char *pkgname) if (currdev != NULL && strcmp(currdev, "pxe0:") == 0) { devname = "pxe0"; proto = NULL; +#ifdef HOSTPROG + } else if (currdev != NULL && strcmp(currdev, "host0:") == 0) { + extern struct fs_ops host_fsops; + + devname = "host0"; + proto = &host_fsops; +#endif } else { devname = "disk1"; proto = &dosfs_fsops; @@ -236,6 +243,10 @@ install(char *pkgname) goto invalid_url; setenv("serverip", inet_ntoa(servip), 1); + + if (proto == &tftp_fsops) { + tftpip.s_addr = servip.s_addr; + } *pkgname = '/'; } else Modified: head/stand/libsa/pkgfs.c ============================================================================== --- head/stand/libsa/pkgfs.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/stand/libsa/pkgfs.c Wed Mar 25 19:12:19 2020 (r359307) @@ -46,6 +46,7 @@ static int pkg_read(struct open_file *, void *, size static off_t pkg_seek(struct open_file *, off_t, int); static int pkg_stat(struct open_file *, struct stat *); static int pkg_readdir(struct open_file *, struct dirent *); +static off_t pkg_atol(const char *, unsigned); struct fs_ops pkgfs_fsops = { "pkg", @@ -59,7 +60,7 @@ struct fs_ops pkgfs_fsops = { }; #define PKG_BUFSIZE 512 -#define PKG_MAXCACHESZ 4096 +#define PKG_MAXCACHESZ 16384 #define PKG_FILEEXT ".tgz" @@ -334,6 +335,7 @@ pkg_seek(struct open_file *f, off_t ofs, int whence) char buf[512]; struct tarfile *tf; off_t delta; + off_t nofs; size_t sz, res; int error; @@ -359,6 +361,14 @@ pkg_seek(struct open_file *f, off_t ofs, int whence) } if (delta < 0) { + /* seeking backwards - ok if within cache */ + if (tf->tf_cachesz > 0 && tf->tf_fp <= tf->tf_cachesz) { + nofs = tf->tf_fp + delta; + if (nofs >= 0) { + tf->tf_fp = nofs; + return (tf->tf_fp); + } + } DBG(("%s: negative file seek (%jd)\n", __func__, (intmax_t)delta)); errno = ESPIPE; @@ -388,8 +398,15 @@ pkg_stat(struct open_file *f, struct stat *sb) return (EBADF); memset(sb, 0, sizeof(*sb)); sb->st_mode = get_mode(tf); + if ((sb->st_mode & S_IFMT) == 0) { + /* tar file bug - assume regular file */ + sb->st_mode |= S_IFREG; + } sb->st_size = tf->tf_size; sb->st_blocks = (tf->tf_size + 511) / 512; + sb->st_mtime = pkg_atol(tf->tf_hdr.ut_mtime, 12); + sb->st_dev = (off_t)tf->tf_pkg; + sb->st_ino = tf->tf_ofs; /* unique per tf_pkg */ return (0); } Modified: head/stand/userboot/test/test.c ============================================================================== --- head/stand/userboot/test/test.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/stand/userboot/test/test.c Wed Mar 25 19:12:19 2020 (r359307) @@ -224,15 +224,20 @@ test_seek(void *arg, void *h, uint64_t offset, int whe } int -test_stat(void *arg, void *h, int *mode_return, int *uid_return, int *gid_return, - uint64_t *size_return) +test_stat(void *arg, void *h, struct stat *stp) { struct test_file *tf = h; - *mode_return = tf->tf_stat.st_mode; - *uid_return = tf->tf_stat.st_uid; - *gid_return = tf->tf_stat.st_gid; - *size_return = tf->tf_stat.st_size; + if (!stp) + return (-1); + memset(stp, 0, sizeof(struct stat)); + stp->st_mode = tf->tf_stat.st_mode; + stp->st_uid = tf->tf_stat.st_uid; + stp->st_gid = tf->tf_stat.st_gid; + stp->st_size = tf->tf_stat.st_size; + stp->st_ino = tf->tf_stat.st_ino; + stp->st_dev = tf->tf_stat.st_dev; + stp->st_mtime = tf->tf_stat.st_mtime; return (0); } Modified: head/stand/userboot/userboot.h ============================================================================== --- head/stand/userboot/userboot.h Wed Mar 25 18:20:37 2020 (r359306) +++ head/stand/userboot/userboot.h Wed Mar 25 19:12:19 2020 (r359307) @@ -119,8 +119,7 @@ struct loader_callbacks { /* * Return some stat(2) related information about the file */ - int (*stat)(void *arg, void *h, int *mode_return, - int *uid_return, int *gid_return, uint64_t *size_return); + int (*stat)(void *arg, void *h, struct stat *stp); /* * Disk image i/o Modified: head/stand/userboot/userboot/conf.c ============================================================================== --- head/stand/userboot/userboot/conf.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/stand/userboot/userboot/conf.c Wed Mar 25 19:12:19 2020 (r359307) @@ -73,6 +73,11 @@ struct fs_ops *file_system[] = { NULL }; +/* to keep libsa happy */ +struct netif_driver *netif_drivers[] = { + NULL +}; + /* Exported for i386 only */ /* * Sort formats so that those that can detect based on arguments Modified: head/stand/userboot/userboot/host.c ============================================================================== --- head/stand/userboot/userboot/host.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/stand/userboot/userboot/host.c Wed Mar 25 19:12:19 2020 (r359307) @@ -84,16 +84,8 @@ host_seek(struct open_file *f, off_t offset, int where static int host_stat(struct open_file *f, struct stat *sb) { - int mode; - int uid; - int gid; - uint64_t size; - - CALLBACK(stat, f->f_fsdata, &mode, &uid, &gid, &size); - sb->st_mode = mode; - sb->st_uid = uid; - sb->st_gid = gid; - sb->st_size = size; + + CALLBACK(stat, f->f_fsdata, sb); return (0); } Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Wed Mar 25 18:20:37 2020 (r359306) +++ head/usr.sbin/bhyveload/bhyveload.c Wed Mar 25 19:12:19 2020 (r359307) @@ -278,14 +278,19 @@ cb_seek(void *arg, void *h, uint64_t offset, int whenc } static int -cb_stat(void *arg, void *h, int *mode, int *uid, int *gid, uint64_t *size) +cb_stat(void *arg, void *h, struct stat *sbp) { struct cb_file *cf = h; - *mode = cf->cf_stat.st_mode; - *uid = cf->cf_stat.st_uid; - *gid = cf->cf_stat.st_gid; - *size = cf->cf_stat.st_size; + memset(sbp, 0, sizeof(struct stat)); + sbp->st_mode = cf->cf_stat.st_mode; + sbp->st_uid = cf->cf_stat.st_uid; + sbp->st_gid = cf->cf_stat.st_gid; + sbp->st_size = cf->cf_stat.st_size; + sbp->st_mtime = cf->cf_stat.st_mtime; + sbp->st_dev = cf->cf_stat.st_dev; + sbp->st_ino = cf->cf_stat.st_ino; + return (0); } From owner-svn-src-head@freebsd.org Wed Mar 25 20:25:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AFDB262CE4; Wed, 25 Mar 2020 20:25:34 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nfkj4DVPz43hD; Wed, 25 Mar 2020 20:25:33 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3784320EA0; Wed, 25 Mar 2020 20:20:09 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PKK9JE042466; Wed, 25 Mar 2020 20:20:09 GMT (envelope-from alfredo@FreeBSD.org) Received: (from alfredo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PKK9UL042465; Wed, 25 Mar 2020 20:20:09 GMT (envelope-from alfredo@FreeBSD.org) Message-Id: <202003252020.02PKK9UL042465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alfredo set sender to alfredo@FreeBSD.org using -f From: "Alfredo Dal'Ava Junior" Date: Wed, 25 Mar 2020 20:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359309 - head/tests/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: alfredo X-SVN-Commit-Paths: head/tests/sys/netinet X-SVN-Commit-Revision: 359309 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 20:25:34 -0000 Author: alfredo Date: Wed Mar 25 20:20:08 2020 New Revision: 359309 URL: https://svnweb.freebsd.org/changeset/base/359309 Log: so_reuseport_lb_test: correct setsockopt parameter size Change type of variable used in setsocketopt so correct size of option is passed. Test failure was identified when running the test on PowerPC64, and the following error message was seen: "bind () failed: Address already in use" Submitted by: Fernando Valle Reviewed by: melifaro, adalava Approved by: jhibbits (mentor) Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D24164 Modified: head/tests/sys/netinet/so_reuseport_lb_test.c Modified: head/tests/sys/netinet/so_reuseport_lb_test.c ============================================================================== --- head/tests/sys/netinet/so_reuseport_lb_test.c Wed Mar 25 20:16:24 2020 (r359308) +++ head/tests/sys/netinet/so_reuseport_lb_test.c Wed Mar 25 20:20:08 2020 (r359309) @@ -108,7 +108,7 @@ lb_simple_accept_loop(int domain, const struct sockadd static int lb_listen_socket(int domain, int flags) { - size_t one; + int one; int error, sd; sd = socket(domain, SOCK_STREAM | flags, 0); From owner-svn-src-head@freebsd.org Wed Mar 25 23:12:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E7A226652A; Wed, 25 Mar 2020 23:12:54 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nkRl37Q0z47m3; Wed, 25 Mar 2020 23:12:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 882D8238A0; Wed, 25 Mar 2020 23:12:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02PNCjp4051470; Wed, 25 Mar 2020 23:12:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02PNChC7051461; Wed, 25 Mar 2020 23:12:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003252312.02PNChC7051461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 25 Mar 2020 23:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359311 - in head/sys: amd64/include arm/include arm64/include i386/include kern powerpc/include sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: amd64/include arm/include arm64/include i386/include kern powerpc/include sys X-SVN-Commit-Revision: 359311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 23:12:54 -0000 Author: cem Date: Wed Mar 25 23:12:43 2020 New Revision: 359311 URL: https://svnweb.freebsd.org/changeset/base/359311 Log: Expand generic subword atomic primitives The goal of this change is to make the atomic_load_acq_{8,16}, atomic_testandset{,_acq}_long, and atomic_testandclear_long primitives available in MI-namespace. The second goal is to get this draft out of my local tree, as anything that requires a full tinderbox is a big burden out of tree. MD specifics can be refined individually afterwards. The generic implementations may not be ideal for your architecture; feel free to implement better versions. If no subword_atomic definitions are needed, the include can be removed from your arch's machine/atomic.h. Generic definitions are guarded by defined macros of the same name. To avoid picking up conflicting generic definitions, some macro defines are added to various MD machine/atomic.h to register an existing implementation. Include _atomic_subword.h in arm and arm64 machine/atomic.h. For some odd reason, KCSAN only generates some versions of primitives. Generate the _acq variants of atomic_load.*_8, atomic_load.*_16, and atomic_testandset.*_long. There are other questionably disabled primitives, but I didn't run into them, so I left them alone. KCSAN is only built for amd64 in tinderbox for now. Add atomic_subword implementations of atomic_load_acq_{8,16} implemented using masking and atomic_load_acq_32. Add generic atomic_subword implementations of atomic_testandset_long(), atomic_testandclear_long(), and atomic_testandset_acq_long(), using atomic_fcmpset_long() and atomic_fcmpset_acq_long(). On x86, add atomic_testandset_acq_long as an alias for atomic_testandset_long. Reviewed by: kevans, rlibby (previous versions both) Differential Revision: https://reviews.freebsd.org/D22963 Modified: head/sys/amd64/include/atomic.h head/sys/arm/include/atomic-v4.h head/sys/arm/include/atomic-v6.h head/sys/arm/include/atomic.h head/sys/arm64/include/atomic.h head/sys/i386/include/atomic.h head/sys/kern/subr_csan.c head/sys/powerpc/include/atomic.h head/sys/sys/_atomic_subword.h head/sys/sys/_cscan_atomic.h Modified: head/sys/amd64/include/atomic.h ============================================================================== --- head/sys/amd64/include/atomic.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/amd64/include/atomic.h Wed Mar 25 23:12:43 2020 (r359311) @@ -553,6 +553,7 @@ u_long atomic_swap_long(volatile u_long *p, u_long v); #define atomic_readandclear_int(p) atomic_swap_int(p, 0) #define atomic_readandclear_long(p) atomic_swap_long(p, 0) +#define atomic_testandset_acq_long atomic_testandset_long /* Operations on 8-bit bytes. */ #define atomic_set_8 atomic_set_char Modified: head/sys/arm/include/atomic-v4.h ============================================================================== --- head/sys/arm/include/atomic-v4.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/arm/include/atomic-v4.h Wed Mar 25 23:12:43 2020 (r359311) @@ -521,8 +521,10 @@ atomic_swap_32(volatile u_int32_t *p, u_int32_t v) #define atomic_fcmpset_rel_32 atomic_fcmpset_32 #define atomic_fcmpset_acq_32 atomic_fcmpset_32 #ifdef _KERNEL +#define atomic_fcmpset_8 atomic_fcmpset_8 #define atomic_fcmpset_rel_8 atomic_fcmpset_8 #define atomic_fcmpset_acq_8 atomic_fcmpset_8 +#define atomic_fcmpset_16 atomic_fcmpset_16 #define atomic_fcmpset_rel_16 atomic_fcmpset_16 #define atomic_fcmpset_acq_16 atomic_fcmpset_16 #define atomic_fcmpset_rel_64 atomic_fcmpset_64 @@ -533,8 +535,10 @@ atomic_swap_32(volatile u_int32_t *p, u_int32_t v) #define atomic_cmpset_rel_32 atomic_cmpset_32 #define atomic_cmpset_acq_32 atomic_cmpset_32 #ifdef _KERNEL +#define atomic_cmpset_8 atomic_cmpset_8 #define atomic_cmpset_rel_8 atomic_cmpset_8 #define atomic_cmpset_acq_8 atomic_cmpset_8 +#define atomic_cmpset_16 atomic_cmpset_16 #define atomic_cmpset_rel_16 atomic_cmpset_16 #define atomic_cmpset_acq_16 atomic_cmpset_16 #define atomic_cmpset_rel_64 atomic_cmpset_64 Modified: head/sys/arm/include/atomic-v6.h ============================================================================== --- head/sys/arm/include/atomic-v6.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/arm/include/atomic-v6.h Wed Mar 25 23:12:43 2020 (r359311) @@ -245,6 +245,7 @@ atomic_fcmpset_8(volatile uint8_t *_ptr, uint8_t *_old ATOMIC_FCMPSET_CODE(ret, uint8_t, "b"); return (ret); } +#define atomic_fcmpset_8 atomic_fcmpset_8 static __inline int atomic_fcmpset_acq_8(volatile uint8_t *_ptr, uint8_t *_old, uint8_t _new) @@ -274,6 +275,7 @@ atomic_fcmpset_16(volatile uint16_t *_ptr, uint16_t *_ ATOMIC_FCMPSET_CODE(ret, uint16_t, "h"); return (ret); } +#define atomic_fcmpset_16 atomic_fcmpset_16 static __inline int atomic_fcmpset_acq_16(volatile uint16_t *_ptr, uint16_t *_old, uint16_t _new) @@ -429,6 +431,7 @@ atomic_cmpset_8(volatile uint8_t *_ptr, uint8_t _old, ATOMIC_CMPSET_CODE(ret, "b"); return (ret); } +#define atomic_cmpset_8 atomic_cmpset_8 static __inline int atomic_cmpset_acq_8(volatile uint8_t *_ptr, uint8_t _old, uint8_t _new) @@ -458,6 +461,7 @@ atomic_cmpset_16(volatile uint16_t *_ptr, uint16_t _ol ATOMIC_CMPSET_CODE(ret, "h"); return (ret); } +#define atomic_cmpset_16 atomic_cmpset_16 static __inline int atomic_cmpset_acq_16(volatile uint16_t *_ptr, uint16_t _old, uint16_t _new) @@ -899,6 +903,7 @@ atomic_testandclear_long(volatile u_long *p, u_int v) return (atomic_testandclear_32((volatile uint32_t *)p, v)); } +#define atomic_testandclear_long atomic_testandclear_long static __inline int atomic_testandset_32(volatile uint32_t *ptr, u_int bit) @@ -942,6 +947,7 @@ atomic_testandset_long(volatile u_long *p, u_int v) return (atomic_testandset_32((volatile uint32_t *)p, v)); } +#define atomic_testandset_long atomic_testandset_long static __inline int atomic_testandset_64(volatile uint64_t *p, u_int v) Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/arm/include/atomic.h Wed Mar 25 23:12:43 2020 (r359311) @@ -103,4 +103,6 @@ atomic_swap_long(volatile u_long *p, u_long v) #define atomic_store_rel_int atomic_store_rel_32 #define atomic_swap_int atomic_swap_32 +#include + #endif /* _MACHINE_ATOMIC_H_ */ Modified: head/sys/arm64/include/atomic.h ============================================================================== --- head/sys/arm64/include/atomic.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/arm64/include/atomic.h Wed Mar 25 23:12:43 2020 (r359311) @@ -257,6 +257,11 @@ _ATOMIC_FCMPSET_PROTO(t, bar, ) \ _ATOMIC_CMPSET_IMPL(32, w, , bar, a, l) \ _ATOMIC_CMPSET_IMPL(64, , , bar, a, l) +#define atomic_cmpset_8 atomic_cmpset_8 +#define atomic_fcmpset_8 atomic_fcmpset_8 +#define atomic_cmpset_16 atomic_cmpset_16 +#define atomic_fcmpset_16 atomic_fcmpset_16 + _ATOMIC_CMPSET( , , ) _ATOMIC_CMPSET(acq_, a, ) _ATOMIC_CMPSET(rel_, ,l) @@ -465,6 +470,8 @@ atomic_load_acq_##t(volatile uint##t##_t *p) \ return (ret); \ } +#define atomic_load_acq_8 atomic_load_acq_8 +#define atomic_load_acq_16 atomic_load_acq_16 _ATOMIC_LOAD_ACQ_IMPL(8, w, b) _ATOMIC_LOAD_ACQ_IMPL(16, w, h) _ATOMIC_LOAD_ACQ_IMPL(32, w, ) @@ -595,6 +602,8 @@ atomic_thread_fence_seq_cst(void) dmb(sy); } + +#include #endif /* KCSAN && !KCSAN_RUNTIME */ #endif /* _MACHINE_ATOMIC_H_ */ Modified: head/sys/i386/include/atomic.h ============================================================================== --- head/sys/i386/include/atomic.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/i386/include/atomic.h Wed Mar 25 23:12:43 2020 (r359311) @@ -808,6 +808,7 @@ u_long atomic_swap_long(volatile u_long *p, u_long v); #define atomic_readandclear_int(p) atomic_swap_int(p, 0) #define atomic_readandclear_long(p) atomic_swap_long(p, 0) +#define atomic_testandset_acq_long atomic_testandset_long /* Operations on 8-bit bytes. */ #define atomic_set_8 atomic_set_char Modified: head/sys/kern/subr_csan.c ============================================================================== --- head/sys/kern/subr_csan.c Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/kern/subr_csan.c Wed Mar 25 23:12:43 2020 (r359311) @@ -538,7 +538,7 @@ CSAN_ATOMIC_FUNC_ADD(8, uint8_t) CSAN_ATOMIC_FUNC_CLEAR(8, uint8_t) CSAN_ATOMIC_FUNC_CMPSET(8, uint8_t) CSAN_ATOMIC_FUNC_FCMPSET(8, uint8_t) -_CSAN_ATOMIC_FUNC_LOAD(8, uint8_t) +CSAN_ATOMIC_FUNC_LOAD(8, uint8_t) CSAN_ATOMIC_FUNC_SET(8, uint8_t) CSAN_ATOMIC_FUNC_SUBTRACT(8, uint8_t) _CSAN_ATOMIC_FUNC_STORE(8, uint8_t) @@ -554,11 +554,7 @@ CSAN_ATOMIC_FUNC_ADD(16, uint16_t) CSAN_ATOMIC_FUNC_CLEAR(16, uint16_t) CSAN_ATOMIC_FUNC_CMPSET(16, uint16_t) CSAN_ATOMIC_FUNC_FCMPSET(16, uint16_t) -#if defined(__aarch64__) -_CSAN_ATOMIC_FUNC_LOAD(16, uint16_t) -#else CSAN_ATOMIC_FUNC_LOAD(16, uint16_t) -#endif CSAN_ATOMIC_FUNC_SET(16, uint16_t) CSAN_ATOMIC_FUNC_SUBTRACT(16, uint16_t) _CSAN_ATOMIC_FUNC_STORE(16, uint16_t) @@ -632,6 +628,7 @@ CSAN_ATOMIC_FUNC_SWAP(long, u_long) #if !defined(__aarch64__) CSAN_ATOMIC_FUNC_TESTANDCLEAR(long, u_long) CSAN_ATOMIC_FUNC_TESTANDSET(long, u_long) +CSAN_ATOMIC_FUNC_TESTANDSET(acq_long, u_long) #endif CSAN_ATOMIC_FUNC_ADD(ptr, uintptr_t) Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/powerpc/include/atomic.h Wed Mar 25 23:12:43 2020 (r359311) @@ -727,11 +727,15 @@ ATOMIC_CMPSET_ACQ_REL(int); ATOMIC_CMPSET_ACQ_REL(long); +#ifdef ISA_206_ATOMICS #define atomic_cmpset_8 atomic_cmpset_char +#endif #define atomic_cmpset_acq_8 atomic_cmpset_acq_char #define atomic_cmpset_rel_8 atomic_cmpset_rel_char +#ifdef ISA_206_ATOMICS #define atomic_cmpset_16 atomic_cmpset_short +#endif #define atomic_cmpset_acq_16 atomic_cmpset_acq_short #define atomic_cmpset_rel_16 atomic_cmpset_rel_short @@ -894,11 +898,15 @@ atomic_fcmpset_long(volatile u_long *p, u_long *cmpval ATOMIC_FCMPSET_ACQ_REL(int); ATOMIC_FCMPSET_ACQ_REL(long); +#ifdef ISA_206_ATOMICS #define atomic_fcmpset_8 atomic_fcmpset_char +#endif #define atomic_fcmpset_acq_8 atomic_fcmpset_acq_char #define atomic_fcmpset_rel_8 atomic_fcmpset_rel_char +#ifdef ISA_206_ATOMICS #define atomic_fcmpset_16 atomic_fcmpset_short +#endif #define atomic_fcmpset_acq_16 atomic_fcmpset_acq_short #define atomic_fcmpset_rel_16 atomic_fcmpset_rel_short @@ -1018,6 +1026,10 @@ atomic_thread_fence_seq_cst(void) #ifndef ISA_206_ATOMICS #include +#define atomic_cmpset_char atomic_cmpset_8 +#define atomic_cmpset_short atomic_cmpset_16 +#define atomic_fcmpset_char atomic_fcmpset_8 +#define atomic_fcmpset_short atomic_fcmpset_16 #endif /* These need sys/_atomic_subword.h on non-ISA-2.06-atomic platforms. */ Modified: head/sys/sys/_atomic_subword.h ============================================================================== --- head/sys/sys/_atomic_subword.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/sys/_atomic_subword.h Wed Mar 25 23:12:43 2020 (r359311) @@ -41,6 +41,9 @@ #endif #include +#ifndef _KERNEL +#include +#endif #ifndef NBBY #define NBBY 8 @@ -113,6 +116,7 @@ _atomic_fcmpset_masked_word(uint32_t *addr, uint32_t * } #endif +#ifndef atomic_cmpset_8 static __inline int atomic_cmpset_8(__volatile uint8_t *addr, uint8_t old, uint8_t val) { @@ -123,7 +127,9 @@ atomic_cmpset_8(__volatile uint8_t *addr, uint8_t old, return (_atomic_cmpset_masked_word(_ATOMIC_WORD_ALIGNED(addr), old << shift, val << shift, 0xff << shift)); } +#endif +#ifndef atomic_fcmpset_8 static __inline int atomic_fcmpset_8(__volatile uint8_t *addr, uint8_t *old, uint8_t val) { @@ -138,7 +144,9 @@ atomic_fcmpset_8(__volatile uint8_t *addr, uint8_t *ol *old = (wold >> shift) & 0xff; return (ret); } +#endif +#ifndef atomic_cmpset_16 static __inline int atomic_cmpset_16(__volatile uint16_t *addr, uint16_t old, uint16_t val) { @@ -149,7 +157,9 @@ atomic_cmpset_16(__volatile uint16_t *addr, uint16_t o return (_atomic_cmpset_masked_word(_ATOMIC_WORD_ALIGNED(addr), old << shift, val << shift, 0xffff << shift)); } +#endif +#ifndef atomic_fcmpset_16 static __inline int atomic_fcmpset_16(__volatile uint16_t *addr, uint16_t *old, uint16_t val) { @@ -164,9 +174,101 @@ atomic_fcmpset_16(__volatile uint16_t *addr, uint16_t *old = (wold >> shift) & 0xffff; return (ret); } +#endif +#ifndef atomic_load_acq_8 +static __inline uint8_t +atomic_load_acq_8(volatile uint8_t *p) +{ + int shift; + uint8_t ret; + + shift = _ATOMIC_BYTE_SHIFT(p); + ret = (atomic_load_acq_32(_ATOMIC_WORD_ALIGNED(p)) >> shift) & 0xff; + return (ret); +} +#endif + +#ifndef atomic_load_acq_16 +static __inline uint16_t +atomic_load_acq_16(volatile uint16_t *p) +{ + int shift; + uint16_t ret; + + shift = _ATOMIC_HWORD_SHIFT(p); + ret = (atomic_load_acq_32(_ATOMIC_WORD_ALIGNED(p)) >> shift) & + 0xffff; + return (ret); +} +#endif + #undef _ATOMIC_WORD_ALIGNED #undef _ATOMIC_BYTE_SHIFT #undef _ATOMIC_HWORD_SHIFT + +/* + * Provide generic testandset_long implementation based on fcmpset long + * primitive. It may not be ideal for any given arch, so machine/atomic.h + * should define the macro atomic_testandset_long to override with an + * MD-specific version. + * + * (Organizationally, this isn't really subword atomics. But atomic_common is + * included too early in machine/atomic.h, so it isn't a good place for derived + * primitives like this.) + */ +#ifndef atomic_testandset_acq_long +static __inline int +atomic_testandset_acq_long(volatile u_long *p, u_int v) +{ + u_long bit, old; + bool ret; + + bit = (1ul << (v % (sizeof(*p) * NBBY))); + + old = atomic_load_acq_long(p); + ret = false; + while (!ret && (old & bit) == 0) + ret = atomic_fcmpset_acq_long(p, &old, old | bit); + + return (!ret); +} +#endif + +#ifndef atomic_testandset_long +static __inline int +atomic_testandset_long(volatile u_long *p, u_int v) +{ + u_long bit, old; + bool ret; + + bit = (1ul << (v % (sizeof(*p) * NBBY))); + + old = atomic_load_long(p); + ret = false; + while (!ret && (old & bit) == 0) + ret = atomic_fcmpset_long(p, &old, old | bit); + + return (!ret); +} +#endif + +#ifndef atomic_testandclear_long +static __inline int +atomic_testandclear_long(volatile u_long *p, u_int v) +{ + u_long bit, old; + bool ret; + + bit = (1ul << (v % (sizeof(*p) * NBBY))); + + old = atomic_load_long(p); + ret = false; + while (!ret && (old & bit) != 0) + ret = atomic_fcmpset_long(p, &old, old & ~bit); + + return (ret); +} +#endif #endif /* _SYS__ATOMIC_SUBWORD_H_ */ Modified: head/sys/sys/_cscan_atomic.h ============================================================================== --- head/sys/sys/_cscan_atomic.h Wed Mar 25 23:06:04 2020 (r359310) +++ head/sys/sys/_cscan_atomic.h Wed Mar 25 23:12:43 2020 (r359311) @@ -69,7 +69,8 @@ void kcsan_atomic_store_rel_##name(volatile type *, type) #define KCSAN_ATOMIC_TEST(op, name, type) \ - int kcsan_atomic_##op##_##name(volatile type *, u_int) + int kcsan_atomic_##op##_##name(volatile type *, u_int); \ + int kcsan_atomic_##op##_acq_##name(volatile type *, u_int) #define KCSAN_ATOMIC_FUNCS(name, type) \ KCSAN_ATOMIC_FUNC_1(add, name, type); \ @@ -156,6 +157,7 @@ void kcsan_atomic_thread_fence_seq_cst(void); #define atomic_swap_long kcsan_atomic_swap_long #define atomic_testandclear_long kcsan_atomic_testandclear_long #define atomic_testandset_long kcsan_atomic_testandset_long +#define atomic_testandset_acq_long kcsan_atomic_testandset_acq_long #define atomic_add_ptr kcsan_atomic_add_ptr #define atomic_add_acq_ptr kcsan_atomic_add_acq_ptr From owner-svn-src-head@freebsd.org Thu Mar 26 07:37:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E62BF277396; Thu, 26 Mar 2020 07:37:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nxdf1s7fz4Klw; Thu, 26 Mar 2020 07:37:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72D1D1FBB; Thu, 26 Mar 2020 07:37:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02Q7b14j053004; Thu, 26 Mar 2020 07:37:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02Q7b11B053003; Thu, 26 Mar 2020 07:37:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003260737.02Q7b11B053003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 26 Mar 2020 07:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359320 - head/sys/dev/sound/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/usb X-SVN-Commit-Revision: 359320 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 07:37:11 -0000 Author: hselasky Date: Thu Mar 26 07:37:00 2020 New Revision: 359320 URL: https://svnweb.freebsd.org/changeset/base/359320 Log: Avoid scaling USB audio mixer values twice. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Thu Mar 26 05:39:20 2020 (r359319) +++ head/sys/dev/sound/usb/uaudio.c Thu Mar 26 07:37:00 2020 (r359320) @@ -556,10 +556,7 @@ static void uaudio_mixer_add_ctl(struct uaudio_softc * struct uaudio_mixer_node *); static void uaudio_mixer_fill_info(struct uaudio_softc *, struct usb_device *, void *); -static void uaudio_mixer_ctl_set(struct uaudio_softc *, - struct uaudio_mixer_node *, uint8_t, int32_t val); static int uaudio_mixer_signext(uint8_t, int); -static int uaudio_mixer_bsd2value(struct uaudio_mixer_node *, int32_t val); static void uaudio_mixer_init(struct uaudio_softc *); static const struct uaudio_terminal_node *uaudio_mixer_get_input( const struct uaudio_terminal_node *, uint8_t); @@ -5379,7 +5376,7 @@ uaudio_mixer_signext(uint8_t type, int val) } static int -uaudio_mixer_bsd2value(struct uaudio_mixer_node *mc, int32_t val) +uaudio_mixer_bsd2value(struct uaudio_mixer_node *mc, int val) { if (mc->type == MIX_ON_OFF) { val = (val != 0); @@ -5391,7 +5388,7 @@ uaudio_mixer_bsd2value(struct uaudio_mixer_node *mc, i } else { /* compute actual volume */ - val = (val * mc->mul) / 255; + val = (val * mc->mul) / 100; /* add lower offset */ val = val + mc->minval; @@ -5410,7 +5407,7 @@ uaudio_mixer_bsd2value(struct uaudio_mixer_node *mc, i static void uaudio_mixer_ctl_set(struct uaudio_softc *sc, struct uaudio_mixer_node *mc, - uint8_t chan, int32_t val) + uint8_t chan, int val) { val = uaudio_mixer_bsd2value(mc, val); @@ -5499,8 +5496,7 @@ uaudio_mixer_set(struct uaudio_softc *sc, unsigned typ if (mc->ctl == type) { for (chan = 0; chan < mc->nchan; chan++) { uaudio_mixer_ctl_set(sc, mc, chan, - (int)((chan == 0 ? left : right) * - 255) / 100); + chan == 0 ? left : right); } } } From owner-svn-src-head@freebsd.org Thu Mar 26 07:42:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E82E527759E; Thu, 26 Mar 2020 07:42:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nxm46p3yz4MdG; Thu, 26 Mar 2020 07:42:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C11721E3; Thu, 26 Mar 2020 07:42:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02Q7gal1058716; Thu, 26 Mar 2020 07:42:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02Q7gaCP058715; Thu, 26 Mar 2020 07:42:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003260742.02Q7gaCP058715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 26 Mar 2020 07:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359321 - head/sys/dev/sound/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/usb X-SVN-Commit-Revision: 359321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 07:42:46 -0000 Author: hselasky Date: Thu Mar 26 07:42:36 2020 New Revision: 359321 URL: https://svnweb.freebsd.org/changeset/base/359321 Log: Factor out USB audio mixer value range check. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Thu Mar 26 07:37:00 2020 (r359320) +++ head/sys/dev/sound/usb/uaudio.c Thu Mar 26 07:42:36 2020 (r359321) @@ -5380,25 +5380,19 @@ uaudio_mixer_bsd2value(struct uaudio_mixer_node *mc, i { if (mc->type == MIX_ON_OFF) { val = (val != 0); - } else if (mc->type == MIX_SELECTOR) { - if ((val < mc->minval) || - (val > mc->maxval)) { - val = mc->minval; - } - } else { + } else if (mc->type != MIX_SELECTOR) { /* compute actual volume */ val = (val * mc->mul) / 100; /* add lower offset */ val = val + mc->minval; - - /* make sure we don't write a value out of range */ - if (val > mc->maxval) - val = mc->maxval; - else if (val < mc->minval) - val = mc->minval; } + /* make sure we don't write a value out of range */ + if (val > mc->maxval) + val = mc->maxval; + else if (val < mc->minval) + val = mc->minval; DPRINTFN(6, "type=0x%03x val=%d min=%d max=%d val=%d\n", mc->type, val, mc->minval, mc->maxval, val); From owner-svn-src-head@freebsd.org Thu Mar 26 07:46:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E7E22776B3; Thu, 26 Mar 2020 07:46:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nxrJ1sPqz4Np8; Thu, 26 Mar 2020 07:46:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC18921E8; Thu, 26 Mar 2020 07:46:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02Q7kGKq058951; Thu, 26 Mar 2020 07:46:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02Q7kGfa058950; Thu, 26 Mar 2020 07:46:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003260746.02Q7kGfa058950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 26 Mar 2020 07:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359322 - head/sys/dev/sound/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/usb X-SVN-Commit-Revision: 359322 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 07:46:26 -0000 Author: hselasky Date: Thu Mar 26 07:46:16 2020 New Revision: 359322 URL: https://svnweb.freebsd.org/changeset/base/359322 Log: Make mute controls available for USB audio mixers. Submitted by: Horse Ma MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Thu Mar 26 07:42:36 2020 (r359321) +++ head/sys/dev/sound/usb/uaudio.c Thu Mar 26 07:46:16 2020 (r359322) @@ -3579,7 +3579,7 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc, switch (ctl) { case MUTE_CONTROL: MIX(sc).type = MIX_ON_OFF; - MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).ctl = SOUND_MIXER_MUTE; MIX(sc).name = "mute"; break; @@ -3694,7 +3694,7 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc, switch (ctl) { case (3 << 0): MIX(sc).type = MIX_ON_OFF; - MIX(sc).ctl = SOUND_MIXER_NRDEVICES; + MIX(sc).ctl = SOUND_MIXER_MUTE; MIX(sc).name = "mute"; what = MUTE_CONTROL; break; From owner-svn-src-head@freebsd.org Thu Mar 26 08:00:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6641A277DD9; Thu, 26 Mar 2020 08:00:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48ny8t2NZSz4TGH; Thu, 26 Mar 2020 08:00:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0E892282; Thu, 26 Mar 2020 07:52:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02Q7q5AO063953; Thu, 26 Mar 2020 07:52:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02Q7q5l0063952; Thu, 26 Mar 2020 07:52:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003260752.02Q7q5l0063952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 26 Mar 2020 07:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359323 - head/sys/dev/sound/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/usb X-SVN-Commit-Revision: 359323 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 08:00:47 -0000 Author: hselasky Date: Thu Mar 26 07:52:04 2020 New Revision: 359323 URL: https://svnweb.freebsd.org/changeset/base/359323 Log: Be more intelligent when classifying USB audio terminal types, so that we don't end up using SOUND_MIXER_VOLUME for all undefined types. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Thu Mar 26 07:46:16 2020 (r359322) +++ head/sys/dev/sound/usb/uaudio.c Thu Mar 26 07:52:04 2020 (r359323) @@ -4515,52 +4515,61 @@ static const struct uaudio_tt_to_feature uaudio_tt_to_ {UATF_MULTITRACK, SOUND_MIXER_VOLUME}, {0xffff, SOUND_MIXER_VOLUME}, - /* default */ - {0x0000, SOUND_MIXER_VOLUME}, + /* end */ + {} }; static uint16_t -uaudio_mixer_feature_name(const struct uaudio_terminal_node *iot, - struct uaudio_mixer_node *mix) +uaudio_mixer_feature_name_sub(uint16_t terminal_type) { const struct uaudio_tt_to_feature *uat = uaudio_tt_to_feature; - uint16_t terminal_type = uaudio_mixer_determine_class(iot, mix); + uint16_t retval; - if ((mix->class == UAC_RECORD) && (terminal_type == 0)) { - return (SOUND_MIXER_IMIX); - } - while (uat->terminal_type) { - if (uat->terminal_type == terminal_type) { - break; + while (1) { + if (uat->terminal_type == 0) { + switch (terminal_type >> 8) { + case UATI_UNDEFINED >> 8: + retval = SOUND_MIXER_RECLEV; + goto done; + case UATO_UNDEFINED >> 8: + retval = SOUND_MIXER_PCM; + goto done; + default: + retval = SOUND_MIXER_VOLUME; + goto done; + } + } else if (uat->terminal_type == terminal_type) { + retval = uat->feature; + goto done; } uat++; } - +done: DPRINTF("terminal_type=0x%04x -> %d\n", - terminal_type, uat->feature); + terminal_type, retval); + return (retval); +} - return (uat->feature); +static uint16_t +uaudio_mixer_feature_name(const struct uaudio_terminal_node *iot, + struct uaudio_mixer_node *mix) +{ + uint16_t terminal_type = uaudio_mixer_determine_class(iot, mix); + + if (mix->class == UAC_RECORD && terminal_type == 0) + return (SOUND_MIXER_IMIX); + return (uaudio_mixer_feature_name_sub(terminal_type)); } static uint16_t uaudio20_mixer_feature_name(const struct uaudio_terminal_node *iot, struct uaudio_mixer_node *mix) { - const struct uaudio_tt_to_feature *uat; uint16_t terminal_type = uaudio20_mixer_determine_class(iot, mix); - if ((mix->class == UAC_RECORD) && (terminal_type == 0)) + if (mix->class == UAC_RECORD && terminal_type == 0) return (SOUND_MIXER_IMIX); - - for (uat = uaudio_tt_to_feature; uat->terminal_type != 0; uat++) { - if (uat->terminal_type == terminal_type) - break; - } - - DPRINTF("terminal_type=0x%04x -> %d\n", - terminal_type, uat->feature); - - return (uat->feature); + return (uaudio_mixer_feature_name_sub(terminal_type)); } static const struct uaudio_terminal_node * From owner-svn-src-head@freebsd.org Thu Mar 26 08:23:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E345A2784EA; Thu, 26 Mar 2020 08:23:18 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48nyfr75YKz4cf8; Thu, 26 Mar 2020 08:23:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36DFF298C; Thu, 26 Mar 2020 08:23:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02Q8NA9J082931; Thu, 26 Mar 2020 08:23:10 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02Q8N9Qs082930; Thu, 26 Mar 2020 08:23:09 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003260823.02Q8N9Qs082930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 26 Mar 2020 08:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359324 - head X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359324 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 08:23:19 -0000 Author: manu Date: Thu Mar 26 08:23:09 2020 New Revision: 359324 URL: https://svnweb.freebsd.org/changeset/base/359324 Log: Stop building libl and liby Those libs aren't needed anymore so stop building them for the bootstrap tools or the compat libs. Reviewed by: bapt, emaste X-Differential Revision: D24171 Modified: head/Makefile.inc1 head/Makefile.libcompat Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Mar 26 07:52:04 2020 (r359323) +++ head/Makefile.inc1 Thu Mar 26 08:23:09 2020 (r359324) @@ -2039,9 +2039,9 @@ update: .PHONY # -# libnv and libl are both requirements for config(8), which is an unconditional +# libnv is a requirement for config(8), which is an unconditional # bootstrap-tool. -_config_deps= lib/libnv usr.bin/lex/lib +_config_deps= lib/libnv legacy: .PHONY .if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0 @@ -2185,11 +2185,8 @@ _kbdcontrol= usr.sbin/kbdcontrol _bootstrap_tools_links+=kbdcontrol .endif -_yacc= lib/liby \ - usr.bin/yacc +_yacc= usr.bin/yacc -${_bt}-usr.bin/yacc: ${_bt}-lib/liby - .if ${MK_BSNMP} != "no" _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif @@ -2809,7 +2806,7 @@ lib/libcasper__L: lib/libnv__L lib/liblzma__L: lib/libthr__L lib/libzstd__L: lib/libthr__L -_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib +_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} .if ${MK_IPFILTER} != "no" _generic_libs+= sbin/ipf/libipf .endif Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Thu Mar 26 07:52:04 2020 (r359323) +++ head/Makefile.libcompat Thu Mar 26 08:23:09 2020 (r359324) @@ -39,7 +39,6 @@ LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR= _LC_LIBDIRS.yes= lib _LC_LIBDIRS.yes+= gnu/lib -_LC_LIBDIRS.yes+= usr.bin/lex/lib _LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib _LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib _LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib From owner-svn-src-head@freebsd.org Thu Mar 26 09:23:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F8F6279A5B; Thu, 26 Mar 2020 09:23:27 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48p00F2dMjz41jc; Thu, 26 Mar 2020 09:23:25 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E1C53964; Thu, 26 Mar 2020 09:23:17 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02Q9NHCH018597; Thu, 26 Mar 2020 09:23:17 GMT (envelope-from netchild@FreeBSD.org) Received: (from netchild@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02Q9NHeI018596; Thu, 26 Mar 2020 09:23:17 GMT (envelope-from netchild@FreeBSD.org) Message-Id: <202003260923.02Q9NHeI018596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: netchild set sender to netchild@FreeBSD.org using -f From: Alexander Leidinger Date: Thu, 26 Mar 2020 09:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359325 - head/tools/kerneldoc/subsys X-SVN-Group: head X-SVN-Commit-Author: netchild X-SVN-Commit-Paths: head/tools/kerneldoc/subsys X-SVN-Commit-Revision: 359325 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 09:23:27 -0000 Author: netchild Date: Thu Mar 26 09:23:16 2020 New Revision: 359325 URL: https://svnweb.freebsd.org/changeset/base/359325 Log: Remove deprecated options. Modified: head/tools/kerneldoc/subsys/common-Doxyfile Modified: head/tools/kerneldoc/subsys/common-Doxyfile ============================================================================== --- head/tools/kerneldoc/subsys/common-Doxyfile Thu Mar 26 08:23:09 2020 (r359324) +++ head/tools/kerneldoc/subsys/common-Doxyfile Thu Mar 26 09:23:16 2020 (r359325) @@ -66,7 +66,6 @@ GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages @@ -159,7 +158,6 @@ HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = @@ -206,8 +204,6 @@ MAN_LINKS = NO #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output From owner-svn-src-head@freebsd.org Thu Mar 26 11:24:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1673427BE97; Thu, 26 Mar 2020 11:24:52 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48p2hM057Lz3HxC; Thu, 26 Mar 2020 11:24:50 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B4315214; Thu, 26 Mar 2020 11:24:44 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QBOiRM090773; Thu, 26 Mar 2020 11:24:44 GMT (envelope-from carlavilla@FreeBSD.org) Received: (from carlavilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QBOiSd090772; Thu, 26 Mar 2020 11:24:44 GMT (envelope-from carlavilla@FreeBSD.org) Message-Id: <202003261124.02QBOiSd090772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: carlavilla set sender to carlavilla@FreeBSD.org using -f From: Sergio Carlavilla Delgado Date: Thu, 26 Mar 2020 11:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359326 - head/lib/msun/man X-SVN-Group: head X-SVN-Commit-Author: carlavilla X-SVN-Commit-Paths: head/lib/msun/man X-SVN-Commit-Revision: 359326 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 11:24:52 -0000 Author: carlavilla (doc committer) Date: Thu Mar 26 11:24:43 2020 New Revision: 359326 URL: https://svnweb.freebsd.org/changeset/base/359326 Log: Add HISTORY sections to log(3) man page PR: 240265 Submitted by: gbergling@gmail.com Approved by: bcr@(mentor), imp@ MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D24148 Modified: head/lib/msun/man/log.3 Modified: head/lib/msun/man/log.3 ============================================================================== --- head/lib/msun/man/log.3 Thu Mar 26 09:23:16 2020 (r359325) +++ head/lib/msun/man/log.3 Thu Mar 26 11:24:43 2020 (r359326) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2013 +.Dd March 22, 2020 .Dt LOG 3 .Os .Sh NAME @@ -135,3 +135,14 @@ and .Fn log1pl functions conform to .St -isoC-99 . +.Sh HISTORY +The +.Fn log +function first appeared in +.At v1 ; +.Fn log10 +in +.At v7 ; +.Fn log1p +in +.Bx 4.3 . From owner-svn-src-head@freebsd.org Thu Mar 26 12:11:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E35127DA69; Thu, 26 Mar 2020 12:11:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48p3jn4159z45FF; Thu, 26 Mar 2020 12:11:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D11815926; Thu, 26 Mar 2020 12:00:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QC0Qnl009633; Thu, 26 Mar 2020 12:00:26 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QC0QWs009632; Thu, 26 Mar 2020 12:00:26 GMT (envelope-from ae@FreeBSD.org) Message-Id: <202003261200.02QC0QWs009632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 26 Mar 2020 12:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359328 - head/usr.sbin/syslogd X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/usr.sbin/syslogd X-SVN-Commit-Revision: 359328 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 12:11:11 -0000 Author: ae Date: Thu Mar 26 12:00:26 2020 New Revision: 359328 URL: https://svnweb.freebsd.org/changeset/base/359328 Log: Fix typo. MFC after: 2 weeks Modified: head/usr.sbin/syslogd/syslog.conf.5 Modified: head/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- head/usr.sbin/syslogd/syslog.conf.5 Thu Mar 26 11:54:25 2020 (r359327) +++ head/usr.sbin/syslogd/syslog.conf.5 Thu Mar 26 12:00:26 2020 (r359328) @@ -465,7 +465,7 @@ or followed by three comma-separated fields .Em property , operator , \&"value\&" . Value must be double-quoted. A double quote and backslash must be escaped by -a blackslash. +a backslash. .Pp Following .Em properties From owner-svn-src-head@freebsd.org Thu Mar 26 12:11:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89ACC27DABD; Thu, 26 Mar 2020 12:11:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48p3jw2gLYz45H8; Thu, 26 Mar 2020 12:11:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 430FA58CC; Thu, 26 Mar 2020 11:54:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QBsQkS009214; Thu, 26 Mar 2020 11:54:26 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QBsPs8009212; Thu, 26 Mar 2020 11:54:25 GMT (envelope-from ae@FreeBSD.org) Message-Id: <202003261154.02QBsPs8009212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 26 Mar 2020 11:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359327 - head/usr.sbin/syslogd X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/usr.sbin/syslogd X-SVN-Commit-Revision: 359327 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 12:11:18 -0000 Author: ae Date: Thu Mar 26 11:54:25 2020 New Revision: 359327 URL: https://svnweb.freebsd.org/changeset/base/359327 Log: Add property-based filters for syslogd. Property-based filters allow substring and regular expressions (see re_format(7)) matching against various message attributes. Filter specification starts with '#:' or ':' followed by three comma-separated fields property, operator, "value". Value must be double-quoted. A double quote and backslash must be escaped by a blackslash. Following properties are supported as test value: o msg - body of the message received; o programname - program name sent the message; o hostname - hostname of message's originator; o source - an alias for hostname. Supported operators: o contains - true if filter value is found as a substring of property; o isequal - true if filter value is equal to property; o startswith - true if property starts with filter value; o regex - true if property matches basic regular expression defined in filter value; o ereregex - true if property matches extended regular expression defined in filter value; Operator may be prefixed by '!' to invert compare logic or by 'icase_' to make comparison function case insensitive. Submitted by: Boris N. Lytochkin MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23468 Modified: head/usr.sbin/syslogd/syslog.conf.5 head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- head/usr.sbin/syslogd/syslog.conf.5 Thu Mar 26 11:24:43 2020 (r359326) +++ head/usr.sbin/syslogd/syslog.conf.5 Thu Mar 26 11:54:25 2020 (r359327) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd November 1, 2016 +.Dd March 26, 2020 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -44,9 +44,10 @@ file is the configuration file for the program. It consists of blocks of lines separated by -.Em program -and +.Em program , .Em hostname +or +.Em property-based filter specifications (separations appear alone on their lines), with each line containing two fields: the .Em selector @@ -154,14 +155,16 @@ values specified to the library routine. .Pp Each block of lines is separated from the previous block by a -.Em program -or +.Em program , .Em hostname +or +.Em property-based filter specification. A block will only log messages corresponding to the most recent -.Em program -and +.Em program , .Em hostname +and +.Em property-based filter specifications given. Thus, with a block which selects .Ql ppp @@ -236,11 +239,24 @@ As for program specifications, multiple comma-separate values may be specified for hostname specifications. .Pp A -.Em program +.Em property-based filter +specification is a line beginning with +.Ql #: or +.Ql \&: +and the following blocks will be applied only when filter value +matches given filter propertie's value. See +.Sx PROPERTY-BASED FILTERS +section for more details. +.Pp +A +.Em program , .Em hostname -specification may be reset by giving the program or hostname as -.Ql * . +or +.Em property-based filter +specification may be reset by giving +.Ql * +as an argument. .Pp See .Xr syslog 3 @@ -434,6 +450,78 @@ in this case preceding is removed and .Ql # is treated as an ordinary character. +.Sh PROPERTY-BASED FILTERS +.Em program , +.Em hostname +specifications performs exact match filtering against explicit field only. +.Em Property-based filters +feature substring and regular expressions (see +.Xr re_format 7 ) +matching against various message attributes. +Filter specification starts with +.Ql #: +or +.Ql \&: +followed by three comma-separated fields +.Em property , operator , \&"value\&" . +Value must be double-quoted. A double quote and backslash must be escaped by +a blackslash. +.Pp +Following +.Em properties +are supported as test value: +.Pp +.Bl -bullet -compact +.It +.Ql msg +- body of the message received. +.It +.Ql programname +- program name sent the message +.It +.Ql hostname +- hostname of message's originator +.It +.Ql source +- an alias for hostname +.El +.Pp +Operator specifies a comparison function between +.Em propertie's + value against filter's value. +Possible operators: +.Pp +.Bl -bullet -compact +.It +.Ql contains +- true if filter value is found as a substring of +.Em property +.It +.Ql isequal +- true if filter value is equal to +.Em property +.It +.Ql startswith +- true if property starts with filter value +.It +.Ql regex +- true if property matches basic regular expression defined in filter value +.It +.Ql ereregex +- true if property matches extended regular expression defined in filter value +.El +.Pp +Operator may be prefixed by +.Pp +.Bl -bullet -compact +.It +.Ql \&! +- to invert compare logic +.It +.Ql icase_ +- to make comparison function case insensitive +.El +.Pp .Sh IMPLEMENTATION NOTES The .Dq kern @@ -503,6 +591,21 @@ console.* /var/log/console.log # Log ipfw messages without syncing after every message. !ipfw *.* -/var/log/ipfw + +# Log ipfw messages with "Deny" in the message body. +:msg, contains, ".*Deny.*" +*.* /var/log/ipfw.deny + +# Reset program name filtering +!* + +# Log messages from bird or bird6 into one file +:processname, regex, "^bird6?$" +*.* /var/log/bird-all.log + +# Log messages from servers in racks 10-19 in multiple locations, case insensitive +:hostname, icase_ereregex, "^server-(dcA|podB|cdn)-rack1[0-9]{2}\\..*" +*.* /var/log/racks10..19.log .Ed .Sh SEE ALSO .Xr syslog 3 , Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Thu Mar 26 11:24:43 2020 (r359326) +++ head/usr.sbin/syslogd/syslogd.c Thu Mar 26 11:54:25 2020 (r359327) @@ -143,6 +143,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "pathnames.h" #include "ttymsg.h" @@ -217,6 +218,37 @@ struct logtime { #define RFC3164_DATEFMT "%b %e %H:%M:%S" /* + * This structure holds a property-based filter + */ + +struct prop_filter { + uint8_t prop_type; +#define PROP_TYPE_NOOP 0 +#define PROP_TYPE_MSG 1 +#define PROP_TYPE_HOSTNAME 2 +#define PROP_TYPE_PROGNAME 3 + + uint8_t cmp_type; +#define PROP_CMP_CONTAINS 1 +#define PROP_CMP_EQUAL 2 +#define PROP_CMP_STARTS 3 +#define PROP_CMP_REGEX 4 + + uint16_t cmp_flags; +#define PROP_FLAG_EXCLUDE (1 << 0) +#define PROP_FLAG_ICASE (1 << 1) + + union { + char *p_strval; + regex_t *p_re; + } pflt_uniptr; +#define pflt_strval pflt_uniptr.p_strval +#define pflt_re pflt_uniptr.p_re + + size_t pflt_strlen; +}; + +/* * This structure represents the files that will have log * copies printed. * We require f_file to be valid if f_type is F_FILE, F_CONSOLE, F_TTY @@ -235,6 +267,7 @@ struct filed { #define PRI_EQ 0x2 #define PRI_GT 0x4 char *f_program; /* program this applies to */ + struct prop_filter *f_prop_filter; /* property-based filter */ union { char f_uname[MAXUNAMES][MAXLOGNAME]; struct { @@ -381,7 +414,8 @@ static int allowaddr(char *); static int addfile(struct filed *); static int addpeer(struct peer *); static int addsock(struct addrinfo *, struct socklist *); -static struct filed *cfline(const char *, const char *, const char *); +static struct filed *cfline(const char *, const char *, const char *, + const char *); static const char *cvthname(struct sockaddr *); static void deadq_enter(pid_t, const char *); static int deadq_remove(struct deadq_entry *); @@ -407,6 +441,10 @@ static int socklist_recv_sock(struct socklist *); static int socklist_recv_signal(struct socklist *); static void sighandler(int); static int skip_message(const char *, const char *, int); +static int evaluate_prop_filter(const struct prop_filter *filter, + const char *value); +static int prop_filter_compile(struct prop_filter *pfilter, + char *filterstr); static void parsemsg(const char *, char *); static void printsys(char *); static int p_open(const char *, pid_t *); @@ -1435,6 +1473,69 @@ skip_message(const char *name, const char *spec, int c } /* + * Match some property of the message against a filter. + * Return a non-0 value if the message must be ignored + * based on the filter. + */ +static int +evaluate_prop_filter(const struct prop_filter *filter, const char *value) +{ + const char *s = NULL; + const int exclude = ((filter->cmp_flags & PROP_FLAG_EXCLUDE) > 0); + size_t valuelen; + + if (value == NULL) + return (-1); + + if (filter->cmp_type == PROP_CMP_REGEX) { + if (regexec(filter->pflt_re, value, 0, NULL, 0) == 0) + return (exclude); + else + return (!exclude); + } + + valuelen = strlen(value); + + /* a shortcut for equal with different length is always false */ + if (filter->cmp_type == PROP_CMP_EQUAL && + valuelen != filter->pflt_strlen) + return (!exclude); + + if (filter->cmp_flags & PROP_FLAG_ICASE) + s = strcasestr(value, filter->pflt_strval); + else + s = strstr(value, filter->pflt_strval); + + /* + * PROP_CMP_CONTAINS true if s + * PROP_CMP_STARTS true if s && s == value + * PROP_CMP_EQUAL true if s && s == value && + * valuelen == filter->pflt_strlen + * (and length match is checked + * already) + */ + + switch (filter->cmp_type) { + case PROP_CMP_STARTS: + case PROP_CMP_EQUAL: + if (s != value) + return (!exclude); + /* FALLTHROUGH */ + case PROP_CMP_CONTAINS: + if (s) + return (exclude); + else + return (!exclude); + break; + default: + /* unknown cmp_type */ + break; + } + + return (-1); +} + +/* * Logs a message to the appropriate log files, users, etc. based on the * priority. Log messages are always formatted according to RFC 3164, * even if they were in RFC 5424 format originally, The MSGID and @@ -1525,6 +1626,30 @@ logmsg(int pri, const struct logtime *timestamp, const f->f_program, 1)) continue; + /* skip messages if a property does not match filter */ + if (f->f_prop_filter != NULL && + f->f_prop_filter->prop_type != PROP_TYPE_NOOP) { + switch (f->f_prop_filter->prop_type) { + case PROP_TYPE_MSG: + if (evaluate_prop_filter(f->f_prop_filter, + msg)) + continue; + break; + case PROP_TYPE_HOSTNAME: + if (evaluate_prop_filter(f->f_prop_filter, + hostname)) + continue; + break; + case PROP_TYPE_PROGNAME: + if (evaluate_prop_filter(f->f_prop_filter, + app_name == NULL ? "" : app_name)) + continue; + break; + default: + continue; + } + } + /* skip message to console if it has already been printed */ if (f->f_type == F_CONSOLE && (flags & IGN_CONS)) continue; @@ -2216,6 +2341,7 @@ readconfigfile(FILE *cf, int allow_includes) char host[MAXHOSTNAMELEN]; char prog[LINE_MAX]; char file[MAXPATHLEN]; + char pfilter[LINE_MAX]; char *p, *tmp; int i, nents; size_t include_len; @@ -2226,6 +2352,7 @@ readconfigfile(FILE *cf, int allow_includes) include_len = sizeof(include_str) -1; (void)strlcpy(host, "*", sizeof(host)); (void)strlcpy(prog, "*", sizeof(prog)); + (void)strlcpy(pfilter, "*", sizeof(pfilter)); while (fgets(cline, sizeof(cline), cf) != NULL) { /* * check for end-of-section, comments, strip off trailing @@ -2274,7 +2401,7 @@ readconfigfile(FILE *cf, int allow_includes) } if (*p == '#') { p++; - if (*p != '!' && *p != '+' && *p != '-') + if (*p == '\0' || strchr("!+-:", *p) == NULL) continue; } if (*p == '+' || *p == '-') { @@ -2311,6 +2438,17 @@ readconfigfile(FILE *cf, int allow_includes) prog[i] = 0; continue; } + if (*p == ':') { + p++; + while (isspace(*p)) + p++; + if ((!*p) || (*p == '*')) { + (void)strlcpy(pfilter, "*", sizeof(pfilter)); + continue; + } + (void)strlcpy(pfilter, p, sizeof(pfilter)); + continue; + } for (p = cline + 1; *p != '\0'; p++) { if (*p != '#') continue; @@ -2324,7 +2462,7 @@ readconfigfile(FILE *cf, int allow_includes) } for (i = strlen(cline) - 1; i >= 0 && isspace(cline[i]); i--) cline[i] = '\0'; - f = cfline(cline, prog, host); + f = cfline(cline, prog, host, pfilter); if (f != NULL) addfile(f); free(f); @@ -2418,17 +2556,31 @@ init(int signo) STAILQ_REMOVE_HEAD(&fhead, next); free(f->f_program); free(f->f_host); + if (f->f_prop_filter) { + switch (f->f_prop_filter->cmp_type) { + case PROP_CMP_REGEX: + regfree(f->f_prop_filter->pflt_re); + free(f->f_prop_filter->pflt_re); + break; + case PROP_CMP_CONTAINS: + case PROP_CMP_EQUAL: + case PROP_CMP_STARTS: + free(f->f_prop_filter->pflt_strval); + break; + } + free(f->f_prop_filter); + } free(f); } /* open the configuration file */ if ((cf = fopen(ConfFile, "r")) == NULL) { dprintf("cannot open %s\n", ConfFile); - f = cfline("*.ERR\t/dev/console", "*", "*"); + f = cfline("*.ERR\t/dev/console", "*", "*", "*"); if (f != NULL) addfile(f); free(f); - f = cfline("*.PANIC\t*", "*", "*"); + f = cfline("*.PANIC\t*", "*", "*", "*"); if (f != NULL) addfile(f); free(f); @@ -2529,19 +2681,165 @@ init(int signo) } /* + * Compile property-based filter. + * Returns 0 on success, -1 otherwise. + */ +static int +prop_filter_compile(struct prop_filter *pfilter, char *filter) +{ + char *filter_endpos, *p; + char **ap, *argv[2] = {NULL, NULL}; + int re_flags = REG_NOSUB; + int escaped; + + bzero(pfilter, sizeof(struct prop_filter)); + + /* + * Here's some filter examples mentioned in syslog.conf(5) + * 'msg, contains, ".*Deny.*"' + * 'processname, regex, "^bird6?$"' + * 'hostname, icase_ereregex, "^server-(dcA|podB)-rack1[0-9]{2}\\..*"' + */ + + /* + * Split filter into 3 parts: property name (argv[0]), + * cmp type (argv[1]) and lvalue for comparison (filter). + */ + for (ap = argv; (*ap = strsep(&filter, ", \t\n")) != NULL;) { + if (**ap != '\0') + if (++ap >= &argv[2]) + break; + } + + if (argv[0] == NULL || argv[1] == NULL) { + logerror("filter parse error"); + return (-1); + } + + /* fill in prop_type */ + if (strcasecmp(argv[0], "msg") == 0) + pfilter->prop_type = PROP_TYPE_MSG; + else if(strcasecmp(argv[0], "hostname") == 0) + pfilter->prop_type = PROP_TYPE_HOSTNAME; + else if(strcasecmp(argv[0], "source") == 0) + pfilter->prop_type = PROP_TYPE_HOSTNAME; + else if(strcasecmp(argv[0], "programname") == 0) + pfilter->prop_type = PROP_TYPE_PROGNAME; + else { + logerror("unknown property"); + return (-1); + } + + /* full in cmp_flags (i.e. !contains, icase_regex, etc.) */ + if (*argv[1] == '!') { + pfilter->cmp_flags |= PROP_FLAG_EXCLUDE; + argv[1]++; + } + if (strncasecmp(argv[1], "icase_", (sizeof("icase_") - 1)) == 0) { + pfilter->cmp_flags |= PROP_FLAG_ICASE; + argv[1] += sizeof("icase_") - 1; + } + + /* fill in cmp_type */ + if (strcasecmp(argv[1], "contains") == 0) + pfilter->cmp_type = PROP_CMP_CONTAINS; + else if (strcasecmp(argv[1], "isequal") == 0) + pfilter->cmp_type = PROP_CMP_EQUAL; + else if (strcasecmp(argv[1], "startswith") == 0) + pfilter->cmp_type = PROP_CMP_STARTS; + else if (strcasecmp(argv[1], "regex") == 0) + pfilter->cmp_type = PROP_CMP_REGEX; + else if (strcasecmp(argv[1], "ereregex") == 0) { + pfilter->cmp_type = PROP_CMP_REGEX; + re_flags |= REG_EXTENDED; + } else { + logerror("unknown cmp function"); + return (-1); + } + + /* + * Handle filter value + */ + + /* ' ".*Deny.*"' */ + /* remove leading whitespace and check for '"' next character */ + filter += strspn(filter, ", \t\n"); + if (*filter != '"' || strlen(filter) < 3) { + logerror("property value parse error"); + return (-1); + } + filter++; + + /* '.*Deny.*"' */ + /* process possible backslash (\") escaping */ + escaped = 0; + filter_endpos = filter; + for (p = filter; *p != '\0'; p++) { + if (*p == '\\' && !escaped) { + escaped = 1; + /* do not shift filter_endpos */ + continue; + } + if (*p == '"' && !escaped) { + p++; + break; + } + /* we've seen some esc symbols, need to compress the line */ + if (filter_endpos != p) + *filter_endpos = *p; + + filter_endpos++; + escaped = 0; + } + + *filter_endpos = '\0'; + /* '.*Deny.*' */ + + /* We should not have anything but whitespace left after closing '"' */ + if (*p != '\0' && strspn(p, " \t\n") != strlen(p)) { + logerror("property value parse error"); + return (-1); + } + + if (pfilter->cmp_type == PROP_CMP_REGEX) { + pfilter->pflt_re = calloc(1, sizeof(*pfilter->pflt_re)); + if (pfilter->pflt_re == NULL) { + logerror("RE calloc() error"); + free(pfilter->pflt_re); + return (-1); + } + if (pfilter->cmp_flags & PROP_FLAG_ICASE) + re_flags |= REG_ICASE; + if (regcomp(pfilter->pflt_re, filter, re_flags) != 0) { + logerror("RE compilation error"); + free(pfilter->pflt_re); + return (-1); + } + } else { + pfilter->pflt_strval = strdup(filter); + pfilter->pflt_strlen = strlen(filter); + } + + return (0); + +} + +/* * Crack a configuration file line */ static struct filed * -cfline(const char *line, const char *prog, const char *host) +cfline(const char *line, const char *prog, const char *host, + const char *pfilter) { struct filed *f; struct addrinfo hints, *res; int error, i, pri, syncfile; const char *p, *q; - char *bp; + char *bp, *pfilter_dup; char buf[MAXLINE], ebuf[100]; - dprintf("cfline(\"%s\", f, \"%s\", \"%s\")\n", line, prog, host); + dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, + host, pfilter); f = calloc(1, sizeof(*f)); if (f == NULL) { @@ -2578,6 +2876,27 @@ cfline(const char *line, const char *prog, const char if (f->f_program == NULL) { logerror("strdup"); exit(1); + } + } + + if (pfilter) { + f->f_prop_filter = calloc(1, sizeof(*(f->f_prop_filter))); + if (f->f_prop_filter == NULL) { + logerror("pfilter calloc"); + exit(1); + } + if (*pfilter == '*') + f->f_prop_filter->prop_type = PROP_TYPE_NOOP; + else { + pfilter_dup = strdup(pfilter); + if (pfilter_dup == NULL) { + logerror("strdup"); + exit(1); + } + if (prop_filter_compile(f->f_prop_filter, pfilter_dup)) { + logerror("filter compile error"); + exit(1); + } } } From owner-svn-src-head@freebsd.org Thu Mar 26 12:18:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D78927DE14; Thu, 26 Mar 2020 12:18:00 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48p3sf5Tchz47vX; Thu, 26 Mar 2020 12:17:58 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EC795D85; Thu, 26 Mar 2020 12:17:50 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QCHofm021510; Thu, 26 Mar 2020 12:17:50 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QCHo9f021509; Thu, 26 Mar 2020 12:17:50 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003261217.02QCHo9f021509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Thu, 26 Mar 2020 12:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359329 - head/sys/dev/ipmi X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/dev/ipmi X-SVN-Commit-Revision: 359329 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 12:18:00 -0000 Author: luporl Date: Thu Mar 26 12:17:49 2020 New Revision: 359329 URL: https://svnweb.freebsd.org/changeset/base/359329 Log: [PowerPC64] Fix OPAL IPMI driver This change fixes a couple of issues with OPAL IPMI driver and implements a mechanism to detect timeouts and discard old messages left in receive queue, to avoid old messages from being confused with the reply of new ones. Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D24185 Modified: head/sys/dev/ipmi/ipmi_opal.c Modified: head/sys/dev/ipmi/ipmi_opal.c ============================================================================== --- head/sys/dev/ipmi/ipmi_opal.c Thu Mar 26 12:00:26 2020 (r359328) +++ head/sys/dev/ipmi/ipmi_opal.c Thu Mar 26 12:17:49 2020 (r359329) @@ -51,21 +51,113 @@ __FBSDID("$FreeBSD$"); #include +/* + * OPAL_IPMI_DEBUG + * + * 0 - disabled + * 1 - enable error messages (EPRINTF) + * 2 - enable error and debug messages (DPRINTF) + */ +#define OPAL_IPMI_DEBUG 0 +#if OPAL_IPMI_DEBUG >= 2 +/* debug printf */ +#define DPRINTF(fmt, ...) printf("ipmi: " fmt "\n", ## __VA_ARGS__) +#else +#define DPRINTF(fmt, ...) ((void)0) +#endif +#if OPAL_IPMI_DEBUG >= 1 +/* error printf: to print messages only when something fails */ +#define EPRINTF(fmt, ...) printf("ipmi: " fmt "\n", ## __VA_ARGS__) +#else +#define EPRINTF(fmt, ...) ((void)0) +#endif + struct opal_ipmi_softc { struct ipmi_softc ipmi; uint64_t sc_interface; + int sc_timedout; struct opal_ipmi_msg *sc_msg; /* Protected by IPMI lock */ }; static MALLOC_DEFINE(M_IPMI, "ipmi", "OPAL IPMI"); static int +opal_ipmi_recv(struct opal_ipmi_softc *sc, uint64_t *msg_len, int timo) +{ + int err; + + if (timo == 0) + timo = MAX_TIMEOUT; + timo *= 10; /* Timeout is in milliseconds, we delay in 100us */ + + for (;;) { + *msg_len = sizeof(struct opal_ipmi_msg) + IPMI_MAX_RX; + /* Crank the OPAL state machine while we poll for a reply. */ + opal_call(OPAL_POLL_EVENTS, NULL); + err = opal_call(OPAL_IPMI_RECV, sc->sc_interface, + vtophys(sc->sc_msg), vtophys(msg_len)); + if (err != OPAL_EMPTY) + break; + + DELAY(100); + if (timo-- <= 0) { + sc->sc_timedout = 1; + break; + } + } + + if (err != OPAL_SUCCESS) + EPRINTF("RECV: error: %d", err); + + switch (err) { + case OPAL_SUCCESS: + DPRINTF("RECV: rv=%02x len=%ld", + sc->sc_msg->data[0], *msg_len); + return (0); + case OPAL_RESOURCE: + return (ENOMEM); + case OPAL_EMPTY: + return (EAGAIN); + default: + return (EIO); + } +} + +static void +opal_ipmi_discard_msgs(struct opal_ipmi_softc *sc) +{ + uint64_t msg_len; + int err, i = 0; + + /* OPAL_IPMI_RECV fails when msg version is not set. */ + sc->sc_msg->version = OPAL_IPMI_MSG_FORMAT_VERSION_1; + + /* Wait up to 100ms for the 1st timedout message. */ + err = opal_ipmi_recv(sc, &msg_len, 100); + while (err == 0) { + i++; + /* Wait only 10ms for the remaining messages. */ + err = opal_ipmi_recv(sc, &msg_len, 10); + } + if (i > 0) + EPRINTF("Discarded %d message(s)", i); + sc->sc_timedout = 0; +} + +static int opal_ipmi_polled_request(struct opal_ipmi_softc *sc, struct ipmi_request *req, int timo) { uint64_t msg_len; int err; + /* + * Discard timed out messages before sending a new one, to avoid + * them being confused with the reply of the new message. + */ + if (sc->sc_timedout) + opal_ipmi_discard_msgs(sc); + /* Construct and send the message. */ sc->sc_msg->version = OPAL_IPMI_MSG_FORMAT_VERSION_1; sc->sc_msg->netfn = req->ir_addr; @@ -80,57 +172,38 @@ opal_ipmi_polled_request(struct opal_ipmi_softc *sc, s msg_len = sizeof(*sc->sc_msg) + req->ir_requestlen; err = opal_call(OPAL_IPMI_SEND, sc->sc_interface, vtophys(sc->sc_msg), msg_len); + + DPRINTF("SEND: cmd=%02x netfn=%02x len=%ld -> %d", + sc->sc_msg->cmd, sc->sc_msg->netfn, msg_len, err); + + if (err != OPAL_SUCCESS) + EPRINTF("SEND: error: %d", err); + switch (err) { case OPAL_SUCCESS: break; case OPAL_PARAMETER: - err = EINVAL; - goto out; - case OPAL_HARDWARE: - err = EIO; - goto out; case OPAL_UNSUPPORTED: err = EINVAL; goto out; case OPAL_RESOURCE: err = ENOMEM; goto out; + case OPAL_HARDWARE: + default: + err = EIO; + goto out; } - timo *= 10; /* Timeout is in milliseconds, we delay in 100us */ - do { - msg_len = sizeof(struct opal_ipmi_msg) + IPMI_MAX_RX; - /* Crank the OPAL state machine while we poll for a reply. */ - opal_call(OPAL_POLL_EVENTS, NULL); - err = opal_call(OPAL_IPMI_RECV, sc->sc_interface, - vtophys(sc->sc_msg), vtophys(&msg_len)); - if (err != OPAL_EMPTY) - break; - DELAY(100); - } while (err == OPAL_EMPTY && timo-- != 0); - - switch (err) { - case OPAL_SUCCESS: + if ((err = opal_ipmi_recv(sc, &msg_len, timo)) == 0) { /* Subtract one extra for the completion code. */ req->ir_replylen = msg_len - sizeof(struct opal_ipmi_msg) - 1; req->ir_replylen = min(req->ir_replylen, req->ir_replybuflen); memcpy(req->ir_reply, &sc->sc_msg->data[1], req->ir_replylen); req->ir_compcode = sc->sc_msg->data[0]; - err = 0; - break; - case OPAL_RESOURCE: - err = ENOMEM; - break; - case OPAL_EMPTY: - err = EAGAIN; - break; - default: - err = EIO; - break; } out: - return (err); } @@ -150,21 +223,18 @@ opal_ipmi_loop(void *arg) { struct opal_ipmi_softc *sc = arg; struct ipmi_request *req; - int i, ok; + int i, err; IPMI_LOCK(&sc->ipmi); while ((req = ipmi_dequeue_request(&sc->ipmi)) != NULL) { IPMI_UNLOCK(&sc->ipmi); - ok = 0; - for (i = 0; i < 3 && !ok; i++) { + err = EIO; + for (i = 0; i < 3 && err != 0; i++) { IPMI_IO_LOCK(&sc->ipmi); - ok = opal_ipmi_polled_request(sc, req, MAX_TIMEOUT); + err = opal_ipmi_polled_request(sc, req, MAX_TIMEOUT); IPMI_IO_UNLOCK(&sc->ipmi); } - if (ok) - req->ir_error = 0; - else - req->ir_error = EIO; + req->ir_error = err == 0 ? 0 : EIO; IPMI_LOCK(&sc->ipmi); ipmi_complete_request(&sc->ipmi, req); } @@ -204,14 +274,16 @@ static int opal_ipmi_attach(device_t dev) { struct opal_ipmi_softc *sc; + pcell_t ifid; sc = device_get_softc(dev); if (OF_getencprop(ofw_bus_get_node(dev), "ibm,ipmi-interface-id", - (pcell_t*)&sc->sc_interface, sizeof(sc->sc_interface)) < 0) { + &ifid, sizeof(ifid)) < 0) { device_printf(dev, "Missing interface id\n"); return (ENXIO); } + sc->sc_interface = ifid; sc->ipmi.ipmi_startup = opal_ipmi_startup; sc->ipmi.ipmi_driver_request = opal_ipmi_driver_request; sc->ipmi.ipmi_enqueue_request = ipmi_polled_enqueue_request; @@ -220,6 +292,9 @@ opal_ipmi_attach(device_t dev) sc->sc_msg = malloc(sizeof(struct opal_ipmi_msg) + IPMI_MAX_RX, M_IPMI, M_WAITOK | M_ZERO); + + /* Discard old messages that may have remained in receive queue. */ + opal_ipmi_discard_msgs(sc); return (ipmi_attach(dev)); } From owner-svn-src-head@freebsd.org Thu Mar 26 15:02:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25BA82A2348; Thu, 26 Mar 2020 15:02:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48p7Wn0Bvkz4CGQ; Thu, 26 Mar 2020 15:02:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 312A3803A; Thu, 26 Mar 2020 15:02:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QF2bVN024074; Thu, 26 Mar 2020 15:02:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QF2b1U024072; Thu, 26 Mar 2020 15:02:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003261502.02QF2b1U024072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 26 Mar 2020 15:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359330 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 359330 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 15:02:46 -0000 Author: markj Date: Thu Mar 26 15:02:37 2020 New Revision: 359330 URL: https://svnweb.freebsd.org/changeset/base/359330 Log: Remove unused SYSINIT macros for capability rights. Static rights are initialized in cap_rights_sysinit(). MFC after: 1 week Modified: head/sys/kern/subr_capability.c head/sys/sys/capsicum.h Modified: head/sys/kern/subr_capability.c ============================================================================== --- head/sys/kern/subr_capability.c Thu Mar 26 12:17:49 2020 (r359329) +++ head/sys/kern/subr_capability.c Thu Mar 26 15:02:37 2020 (r359330) @@ -101,7 +101,7 @@ __read_mostly cap_rights_t cap_write_rights; __read_mostly cap_rights_t cap_no_rights; static void -__cap_rights_sysinit1(void *arg) +cap_rights_sysinit(void *arg) { cap_rights_init_one(&cap_accept_rights, CAP_ACCEPT); cap_rights_init_one(&cap_bind_rights, CAP_BIND); @@ -149,8 +149,8 @@ __cap_rights_sysinit1(void *arg) cap_rights_init_one(&cap_write_rights, CAP_WRITE); cap_rights_init(&cap_no_rights); } -SYSINIT(cap_rights1_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, \ - __cap_rights_sysinit1, NULL); +SYSINIT(cap_rights_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, cap_rights_sysinit, + NULL); #endif @@ -246,16 +246,6 @@ cap_rights_is_vset(const cap_rights_t *rights, va_list } return (true); -} - -void -__cap_rights_sysinit(void *arg) -{ - struct cap_rights_init_args *cria = arg; - cap_rights_t *rights = cria->cria_rights; - - __cap_rights_init(CAP_RIGHTS_VERSION, rights, cria->cria_value1, - cria->cria_value2, cria->cria_value3, cria->cria_value4, 0ULL); } cap_rights_t * Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Thu Mar 26 12:17:49 2020 (r359329) +++ head/sys/sys/capsicum.h Thu Mar 26 15:02:37 2020 (r359330) @@ -342,7 +342,6 @@ bool __cap_rights_is_set(const cap_rights_t *rights, . bool cap_rights_is_valid(const cap_rights_t *rights); cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); -void __cap_rights_sysinit(void *arg); #ifdef _KERNEL /* @@ -416,63 +415,6 @@ bool cap_rights_contains(const cap_rights_t *big, cons #endif __END_DECLS -struct cap_rights_init_args { - cap_rights_t *cria_rights; - uint64_t cria_value1; - uint64_t cria_value2; - uint64_t cria_value3; - uint64_t cria_value4; - uint64_t cria_value5; -}; - -#define CAP_RIGHTS_SYSINIT0(name, rights) \ - static struct cap_rights_init_args name##_args = { \ - &(rights) \ - }; \ - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT+1, SI_ORDER_ANY, \ - __cap_rights_sysinit, &name##_args); - -#define CAP_RIGHTS_SYSINIT1(name, rights, value1) \ - static struct cap_rights_init_args name##_args = { \ - &(rights), \ - (value1) \ - }; \ - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT+1, SI_ORDER_ANY, \ - __cap_rights_sysinit, &name##_args); - -#define CAP_RIGHTS_SYSINIT2(name, rights, value1, value2) \ - static struct cap_rights_init_args name##_args = { \ - &(rights), \ - (value1), \ - (value2) \ - }; \ - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, \ - __cap_rights_sysinit, &name##_args); - -#define CAP_RIGHTS_SYSINIT3(name, rights, value1, value2, value3) \ - static struct cap_rights_init_args name##_args = { \ - &(rights), \ - (value1), \ - (value2), \ - (value3) \ - }; \ - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, \ - __cap_rights_sysinit, &name##_args); - -#define CAP_RIGHTS_SYSINIT4(name, rights, value1, value2, value3, value4) \ - static struct cap_rights_init_args name##_args = { \ - &(rights), \ - (value1), \ - (value2), \ - (value3), \ - (value4) \ - }; \ - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, \ - __cap_rights_sysinit, &name##_args); - -#define CAP_RIGHTS_DEFINE1(name, value) \ - __read_mostly cap_rights_t name; \ - CAP_RIGHTS_SYSINIT1(name, name, value); #ifdef _KERNEL From owner-svn-src-head@freebsd.org Thu Mar 26 15:03:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78A632A238D; Thu, 26 Mar 2020 15:03:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48p7X85Z96z4CMM; Thu, 26 Mar 2020 15:03:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DC66803D; Thu, 26 Mar 2020 15:02:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QF2uVs024128; Thu, 26 Mar 2020 15:02:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QF2uDZ024127; Thu, 26 Mar 2020 15:02:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003261502.02QF2uDZ024127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 26 Mar 2020 15:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359331 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 359331 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 15:03:05 -0000 Author: markj Date: Thu Mar 26 15:02:56 2020 New Revision: 359331 URL: https://svnweb.freebsd.org/changeset/base/359331 Log: Simplify td_ucred handling in newnfs_connect(). No functional change intended. MFC after: 1 week Modified: head/sys/fs/nfs/nfs_commonkrpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Thu Mar 26 15:02:37 2020 (r359330) +++ head/sys/fs/nfs/nfs_commonkrpc.c Thu Mar 26 15:02:56 2020 (r359331) @@ -233,10 +233,8 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq saddr = NFSSOCKADDR(nrp->nr_nam, struct sockaddr *); error = socreate(saddr->sa_family, &so, nrp->nr_sotype, nrp->nr_soproto, td->td_ucred, td); - if (error) { - td->td_ucred = origcred; + if (error != 0) goto out; - } do { if (error != 0 && pktscale > 2) { if (nmp != NULL && nrp->nr_sotype == SOCK_STREAM && @@ -272,10 +270,8 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq " rsize, wsize\n"); } while (error != 0 && pktscale > 2); soclose(so); - if (error) { - td->td_ucred = origcred; + if (error != 0) goto out; - } client = clnt_reconnect_create(nconf, saddr, nrp->nr_prog, nrp->nr_vers, sndreserve, rcvreserve); @@ -423,11 +419,10 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq mtx_unlock(&nrp->nr_mtx); } - +out: /* Restore current thread's credentials. */ td->td_ucred = origcred; -out: NFSEXITCODE(error); return (error); } From owner-svn-src-head@freebsd.org Thu Mar 26 16:56:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A26D2A4515; Thu, 26 Mar 2020 16:56:11 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48pB2f4zjCz4vRm; Thu, 26 Mar 2020 16:56:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f176.google.com with SMTP id d63so6098996oig.6; Thu, 26 Mar 2020 09:56:09 -0700 (PDT) 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:reply-to :from:date:message-id:subject:to:cc; bh=z+rpma/b4s3PmuUNGA02mRtAKFWIy+Jcwtbn3pxXR44=; b=gE+zQhlm3x9D1s2ZzPjP+nPPEidF8Z33NfTS8ez0wOy662tTboxilvXESezBCiVqD3 DYlLK7q2vFng+RgimP/0jbyMY5vuV4133AqX0NEkcS0w1+WHx5avCJbvtRQW8CFnMUeL MsHEhChZ3gYnegZNDn6Wt5YkjDVd3XHIAPpd8WY74BPypIcTrGZXc8/cc5uFXYPax2Mg cP/txraFVEdmEKxznaWEFt3QjMveoKiZK8EM2jfgTmcIgH7UXohXUHGBu9WOpyHYT264 73VwiTERGIeqfzOvjV7LpHaWdOyt1lIdGaeQdqLhrhXiF8v+08RLcclArBoE/DJB8VK2 /yXQ== X-Gm-Message-State: ANhLgQ01quPqqrAwNpz6G7GLdVCSX32QH2RKGIZ8LWnC3qqL+eVIQJsL ooPOchHER1MkSF+JTwSDogEGEMnu X-Google-Smtp-Source: ADFU+vsxRXTOcT0TXekbYW0WhE2oWs8XZBnsNnh/aHNFHWqlRD7exL+TGXroTIygxSSxvr2HNPl9WQ== X-Received: by 2002:aca:cdd1:: with SMTP id d200mr722554oig.153.1585241348647; Thu, 26 Mar 2020 09:49:08 -0700 (PDT) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com. [209.85.167.179]) by smtp.gmail.com with ESMTPSA id y132sm731972oiy.8.2020.03.26.09.49.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Mar 2020 09:49:08 -0700 (PDT) Received: by mail-oi1-f179.google.com with SMTP id m14so6124615oic.0; Thu, 26 Mar 2020 09:49:08 -0700 (PDT) X-Received: by 2002:aca:f084:: with SMTP id o126mr792208oih.81.1585241347953; Thu, 26 Mar 2020 09:49:07 -0700 (PDT) MIME-Version: 1.0 References: <202003261502.02QF2b1U024072@repo.freebsd.org> In-Reply-To: <202003261502.02QF2b1U024072@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 26 Mar 2020 09:48:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r359330 - in head/sys: kern sys To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 48pB2f4zjCz4vRm X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 16:56:11 -0000 Thanks! On Thu, Mar 26, 2020 at 08:03 Mark Johnston wrote: > Author: markj > Date: Thu Mar 26 15:02:37 2020 > New Revision: 359330 > URL: https://svnweb.freebsd.org/changeset/base/359330 > > Log: > Remove unused SYSINIT macros for capability rights. > > Static rights are initialized in cap_rights_sysinit(). > > MFC after: 1 week > > Modified: > head/sys/kern/subr_capability.c > head/sys/sys/capsicum.h > > Modified: head/sys/kern/subr_capability.c > > ============================================================================== > --- head/sys/kern/subr_capability.c Thu Mar 26 12:17:49 2020 > (r359329) > +++ head/sys/kern/subr_capability.c Thu Mar 26 15:02:37 2020 > (r359330) > @@ -101,7 +101,7 @@ __read_mostly cap_rights_t cap_write_rights; > __read_mostly cap_rights_t cap_no_rights; > > static void > -__cap_rights_sysinit1(void *arg) > +cap_rights_sysinit(void *arg) > { > cap_rights_init_one(&cap_accept_rights, CAP_ACCEPT); > cap_rights_init_one(&cap_bind_rights, CAP_BIND); > @@ -149,8 +149,8 @@ __cap_rights_sysinit1(void *arg) > cap_rights_init_one(&cap_write_rights, CAP_WRITE); > cap_rights_init(&cap_no_rights); > } > -SYSINIT(cap_rights1_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, \ > - __cap_rights_sysinit1, NULL); > +SYSINIT(cap_rights_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, > cap_rights_sysinit, > + NULL); > > #endif > > @@ -246,16 +246,6 @@ cap_rights_is_vset(const cap_rights_t *rights, va_list > } > > return (true); > -} > - > -void > -__cap_rights_sysinit(void *arg) > -{ > - struct cap_rights_init_args *cria = arg; > - cap_rights_t *rights = cria->cria_rights; > - > - __cap_rights_init(CAP_RIGHTS_VERSION, rights, cria->cria_value1, > - cria->cria_value2, cria->cria_value3, cria->cria_value4, 0ULL); > } > > cap_rights_t * > > Modified: head/sys/sys/capsicum.h > > ============================================================================== > --- head/sys/sys/capsicum.h Thu Mar 26 12:17:49 2020 (r359329) > +++ head/sys/sys/capsicum.h Thu Mar 26 15:02:37 2020 (r359330) > @@ -342,7 +342,6 @@ bool __cap_rights_is_set(const cap_rights_t *rights, . > bool cap_rights_is_valid(const cap_rights_t *rights); > cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t > *src); > cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t > *src); > -void __cap_rights_sysinit(void *arg); > > #ifdef _KERNEL > /* > @@ -416,63 +415,6 @@ bool cap_rights_contains(const cap_rights_t *big, cons > #endif > > __END_DECLS > -struct cap_rights_init_args { > - cap_rights_t *cria_rights; > - uint64_t cria_value1; > - uint64_t cria_value2; > - uint64_t cria_value3; > - uint64_t cria_value4; > - uint64_t cria_value5; > -}; > - > -#define CAP_RIGHTS_SYSINIT0(name, rights) \ > - static struct cap_rights_init_args name##_args = { \ > - &(rights) > \ > - }; > \ > - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT+1, > SI_ORDER_ANY, \ > - __cap_rights_sysinit, &name##_args); > - > -#define CAP_RIGHTS_SYSINIT1(name, rights, value1) \ > - static struct cap_rights_init_args name##_args = { \ > - &(rights), > \ > - (value1) > \ > - }; > \ > - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT+1, > SI_ORDER_ANY, \ > - __cap_rights_sysinit, &name##_args); > - > -#define CAP_RIGHTS_SYSINIT2(name, rights, value1, value2) > \ > - static struct cap_rights_init_args name##_args = { \ > - &(rights), > \ > - (value1), > \ > - (value2) > \ > - }; > \ > - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT, > SI_ORDER_ANY, \ > - __cap_rights_sysinit, &name##_args); > - > -#define CAP_RIGHTS_SYSINIT3(name, rights, value1, value2, value3) \ > - static struct cap_rights_init_args name##_args = { \ > - &(rights), > \ > - (value1), > \ > - (value2), > \ > - (value3) > \ > - }; > \ > - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT, > SI_ORDER_ANY, \ > - __cap_rights_sysinit, &name##_args); > - > -#define CAP_RIGHTS_SYSINIT4(name, rights, value1, value2, value3, > value4) \ > - static struct cap_rights_init_args name##_args = { \ > - &(rights), > \ > - (value1), > \ > - (value2), > \ > - (value3), > \ > - (value4) > \ > - }; > \ > - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT, > SI_ORDER_ANY, \ > - __cap_rights_sysinit, &name##_args); > - > -#define CAP_RIGHTS_DEFINE1(name, value) > \ > - __read_mostly cap_rights_t name; > \ > - CAP_RIGHTS_SYSINIT1(name, name, value); > > #ifdef _KERNEL > > From owner-svn-src-head@freebsd.org Thu Mar 26 17:13:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD3E62A4A0F; Thu, 26 Mar 2020 17:13:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pBQ66N22z3J2W; Thu, 26 Mar 2020 17:13:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43FF59B85; Thu, 26 Mar 2020 17:12:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QHCu9E002268; Thu, 26 Mar 2020 17:12:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QHCuPV002267; Thu, 26 Mar 2020 17:12:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003261712.02QHCuPV002267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 26 Mar 2020 17:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359332 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 359332 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 17:13:06 -0000 Author: markj Date: Thu Mar 26 17:12:55 2020 New Revision: 359332 URL: https://svnweb.freebsd.org/changeset/base/359332 Log: compat/linux/linux.h depends on queue.h since r353725. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux.h Modified: head/sys/compat/linux/linux.h ============================================================================== --- head/sys/compat/linux/linux.h Thu Mar 26 15:02:56 2020 (r359331) +++ head/sys/compat/linux/linux.h Thu Mar 26 17:12:55 2020 (r359332) @@ -29,6 +29,8 @@ #ifndef _LINUX_MI_H_ #define _LINUX_MI_H_ +#include + #define LINUX_IFHWADDRLEN 6 #define LINUX_IFNAMSIZ 16 From owner-svn-src-head@freebsd.org Thu Mar 26 17:27:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD8012A4F11; Thu, 26 Mar 2020 17:27:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pBl56P8dz3Np3; Thu, 26 Mar 2020 17:27:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DF649D88; Thu, 26 Mar 2020 17:27:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QHRfef008880; Thu, 26 Mar 2020 17:27:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QHRfE1008879; Thu, 26 Mar 2020 17:27:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003261727.02QHRfE1008879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 26 Mar 2020 17:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359333 - head/contrib/llvm-project/llvm/lib/Target/PowerPC X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/llvm/lib/Target/PowerPC X-SVN-Commit-Revision: 359333 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 17:27:47 -0000 Author: dim Date: Thu Mar 26 17:27:41 2020 New Revision: 359333 URL: https://svnweb.freebsd.org/changeset/base/359333 Log: Merge commit f0990e104 from llvm git (by Justin Hibbits): [PowerPC]: e500 target can't use lwsync, use msync instead The e500 core has a silicon bug that triggers an illegal instruction program trap on any sync other than msync. Other cores will typically ignore illegal sync types, and the documentation even implies that the 'illegal' bits are ignored. Address this hardware deficiency by only using msync, like the PPC440. Differential Revision: https://reviews.llvm.org/D76614 Requested by: jhibbits MFC after: 6 weeks X-MFC-With: 358851 Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td Thu Mar 26 17:12:55 2020 (r359332) +++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td Thu Mar 26 17:27:41 2020 (r359333) @@ -442,7 +442,7 @@ def : ProcessorModel<"g5", G5Model, def : ProcessorModel<"e500", PPCE500Model, [DirectiveE500, FeatureICBT, FeatureBookE, - FeatureISEL, FeatureMFTB, FeatureSPE]>; + FeatureISEL, FeatureMFTB, FeatureMSYNC, FeatureSPE]>; def : ProcessorModel<"e500mc", PPCE500mcModel, [DirectiveE500mc, FeatureSTFIWX, FeatureICBT, FeatureBookE, From owner-svn-src-head@freebsd.org Thu Mar 26 17:29:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E4542A4FB2; Thu, 26 Mar 2020 17:29:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pBmY5ZkRz3PL3; Thu, 26 Mar 2020 17:29:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16B229D89; Thu, 26 Mar 2020 17:28:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QHSs5V008977; Thu, 26 Mar 2020 17:28:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QHSs8x008976; Thu, 26 Mar 2020 17:28:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003261728.02QHSs8x008976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 26 Mar 2020 17:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359334 - head/contrib/llvm-project/llvm/lib/Target/PowerPC X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/llvm/lib/Target/PowerPC X-SVN-Commit-Revision: 359334 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 17:29:02 -0000 Author: dim Date: Thu Mar 26 17:28:54 2020 New Revision: 359334 URL: https://svnweb.freebsd.org/changeset/base/359334 Log: Merge commit 459e8e948 from llvm git (by Justin Hibbits): [PowerPC]: Don't allow r0 as a target for LD_GOT_TPREL_L/32 Summary: The linker is free to relax this (relocation R_PPC_GOT_TPREL16) against R_PPC_TLS, if it sees fit (initial exec to local exec). If r0 is used, this can generate execution-invalid code (converts to 'addi %rX, %r0, FOO, which translates in PPC-lingo to li %rX, FOO). Forbid this instead. This fixes static binaries using locales on FreeBSD/powerpc (tested on FreeBSD/powerpcspe). Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D76662 Requested by: jhibbits MFC after: 6 weeks X-MFC-With: 358851 Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td Thu Mar 26 17:27:41 2020 (r359333) +++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td Thu Mar 26 17:28:54 2020 (r359334) @@ -1110,7 +1110,7 @@ def ADDISgotTprelHA: PPCEmitTimePseudo<(outs g8rc:$rD) (PPCaddisGotTprelHA i64:$reg, tglobaltlsaddr:$disp))]>, isPPC64; -def LDgotTprelL: PPCEmitTimePseudo<(outs g8rc:$rD), (ins s16imm64:$disp, g8rc_nox0:$reg), +def LDgotTprelL: PPCEmitTimePseudo<(outs g8rc_nox0:$rD), (ins s16imm64:$disp, g8rc_nox0:$reg), "#LDgotTprelL", [(set i64:$rD, (PPCldGotTprelL tglobaltlsaddr:$disp, i64:$reg))]>, Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td Thu Mar 26 17:27:41 2020 (r359333) +++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td Thu Mar 26 17:28:54 2020 (r359334) @@ -3167,7 +3167,7 @@ def PPC32GOT: PPCEmitTimePseudo<(outs gprc:$rD), (ins) def PPC32PICGOT: PPCEmitTimePseudo<(outs gprc:$rD, gprc:$rT), (ins), "#PPC32PICGOT", []>, NoEncode<"$rT">; -def LDgotTprelL32: PPCEmitTimePseudo<(outs gprc:$rD), (ins s16imm:$disp, gprc_nor0:$reg), +def LDgotTprelL32: PPCEmitTimePseudo<(outs gprc_nor0:$rD), (ins s16imm:$disp, gprc_nor0:$reg), "#LDgotTprelL32", [(set i32:$rD, (PPCldGotTprelL tglobaltlsaddr:$disp, i32:$reg))]>; From owner-svn-src-head@freebsd.org Thu Mar 26 17:34:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F33C2A5200; Thu, 26 Mar 2020 17:34:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pBtq4Y92z3RFm; Thu, 26 Mar 2020 17:34:27 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2FAD9F95; Thu, 26 Mar 2020 17:34:18 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QHYIwl014501; Thu, 26 Mar 2020 17:34:18 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QHYHq2014497; Thu, 26 Mar 2020 17:34:17 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003261734.02QHYHq2014497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 26 Mar 2020 17:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359335 - in head: etc/mtree lib/kyua lib/kyua/cli usr.bin/kyua X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: etc/mtree lib/kyua lib/kyua/cli usr.bin/kyua X-SVN-Commit-Revision: 359335 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 17:34:29 -0000 Author: brooks Date: Thu Mar 26 17:34:17 2020 New Revision: 359335 URL: https://svnweb.freebsd.org/changeset/base/359335 Log: Install expected kyua docs. The "kyua about" command assumes these files exist causing tests supplied devel/kyua to fail. Fix a bug defining the default KYUA_DOCDIR so the installed files can be found. Reported by: jenkins tests Reviewed by: lwhsu Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24187 Modified: head/etc/mtree/BSD.usr.dist head/lib/kyua/Makefile.kyua head/lib/kyua/cli/Makefile head/usr.bin/kyua/Makefile Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Mar 26 17:28:54 2020 (r359334) +++ head/etc/mtree/BSD.usr.dist Thu Mar 26 17:34:17 2020 (r359335) @@ -219,6 +219,8 @@ .. atf .. + kyua + .. legal .. llvm Modified: head/lib/kyua/Makefile.kyua ============================================================================== --- head/lib/kyua/Makefile.kyua Thu Mar 26 17:28:54 2020 (r359334) +++ head/lib/kyua/Makefile.kyua Thu Mar 26 17:34:17 2020 (r359335) @@ -3,7 +3,7 @@ KYUA_VERSION= 0.13 KYUA_CONFDIR= /etc/kyua -KYUA_DOCDIR= /nonexistant +KYUA_DOCDIR= /usr/share/doc/kyua KYUA_EGDIR= /usr/share/examples/kyua KYUA_MISCDIR= /usr/share/kyua/misc KYUA_STOREDIR= /usr/share/kyua/store Modified: head/lib/kyua/cli/Makefile ============================================================================== --- head/lib/kyua/cli/Makefile Thu Mar 26 17:28:54 2020 (r359334) +++ head/lib/kyua/cli/Makefile Thu Mar 26 17:34:17 2020 (r359335) @@ -4,7 +4,7 @@ KYUA_LIB= cli INTERNALLIB= LIBADD= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils CFLAGS+= -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ - -DKYUA_DOCDIR=\"${KYUA_CONFDIR}\" \ + -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\" \ -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ -DPACKAGE=\"kyua\" \ -DPACKAGE_NAME=\"Kyua\" \ Modified: head/usr.bin/kyua/Makefile ============================================================================== --- head/usr.bin/kyua/Makefile Thu Mar 26 17:28:54 2020 (r359334) +++ head/usr.bin/kyua/Makefile Thu Mar 26 17:34:17 2020 (r359335) @@ -28,10 +28,13 @@ CFLAGS+= -I${KYUA_SRCDIR} # kyua uses auto_ptr CFLAGS+= -Wno-deprecated-declarations -FILESGROUPS= EXAMPLES MISC STORE +FILESGROUPS= DOCS EXAMPLES MISC STORE CONFS= kyua.conf CONFSDIR= ${KYUA_CONFDIR} + +DOCS= AUTHORS CONTRIBUTORS LICENSE +DOCSDIR= ${KYUA_DOCDIR} EXAMPLES= Kyuafile.top kyua.conf EXAMPLESDIR= ${KYUA_EGDIR} From owner-svn-src-head@freebsd.org Thu Mar 26 17:46:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AB262A5524; Thu, 26 Mar 2020 17:46:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pC8y4hMDz41Nh; Thu, 26 Mar 2020 17:46:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80578A294; Thu, 26 Mar 2020 17:46:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QHkYpq020792; Thu, 26 Mar 2020 17:46:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QHkW4b020783; Thu, 26 Mar 2020 17:46:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003261746.02QHkW4b020783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 26 Mar 2020 17:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359338 - in head: contrib/llvm-project/clang/include/clang/Sema contrib/llvm-project/clang/lib/Driver/ToolChains contrib/llvm-project/clang/lib/Parse contrib/llvm-project/clang/lib/Sem... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm-project/clang/include/clang/Sema contrib/llvm-project/clang/lib/Driver/ToolChains contrib/llvm-project/clang/lib/Parse contrib/llvm-project/clang/lib/Sema lib/clang/include lib/c... X-SVN-Commit-Revision: 359338 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 17:46:45 -0000 Author: dim Date: Thu Mar 26 17:46:32 2020 New Revision: 359338 URL: https://svnweb.freebsd.org/changeset/base/359338 Log: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp llvmorg-10.0.0-0-gd32170dbd5b (aka 10.0.0 release). PR: 244251 MFC after: 6 weeks X-MFC-With: 358851 Modified: head/contrib/llvm-project/clang/include/clang/Sema/Sema.h head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.h head/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm-project/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm-project/clang/lib/Sema/TreeTransform.h head/lib/clang/include/VCSVersion.inc head/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: head/contrib/llvm-project/ (props changed) head/contrib/llvm-project/clang/ (props changed) Modified: head/contrib/llvm-project/clang/include/clang/Sema/Sema.h ============================================================================== --- head/contrib/llvm-project/clang/include/clang/Sema/Sema.h Thu Mar 26 17:41:33 2020 (r359337) +++ head/contrib/llvm-project/clang/include/clang/Sema/Sema.h Thu Mar 26 17:46:32 2020 (r359338) @@ -6885,7 +6885,8 @@ class Sema final { (public) QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, SourceLocation TemplateKWLoc = SourceLocation(), - AssumedTemplateKind *ATK = nullptr); + AssumedTemplateKind *ATK = nullptr, + bool Disambiguation = false); TemplateNameKind isTemplateName(Scope *S, CXXScopeSpec &SS, @@ -6894,7 +6895,8 @@ class Sema final { (public) ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, - bool &MemberOfUnknownSpecialization); + bool &MemberOfUnknownSpecialization, + bool Disambiguation = false); /// Try to resolve an undeclared template name as a type template. /// Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp Thu Mar 26 17:41:33 2020 (r359337) +++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp Thu Mar 26 17:46:32 2020 (r359338) @@ -32,26 +32,30 @@ using namespace llvm::opt; // Parses the contents of version.txt in an CUDA installation. It should // contain one line of the from e.g. "CUDA Version 7.5.2". -static CudaVersion ParseCudaVersionFile(const Driver &D, llvm::StringRef V) { +void CudaInstallationDetector::ParseCudaVersionFile(llvm::StringRef V) { + Version = CudaVersion::UNKNOWN; if (!V.startswith("CUDA Version ")) - return CudaVersion::UNKNOWN; + return; V = V.substr(strlen("CUDA Version ")); SmallVector VersionParts; V.split(VersionParts, '.'); if (VersionParts.size() < 2) - return CudaVersion::UNKNOWN; - std::string MajorMinor = join_items(".", VersionParts[0], VersionParts[1]); - CudaVersion Version = CudaStringToVersion(MajorMinor); + return; + DetectedVersion = join_items(".", VersionParts[0], VersionParts[1]); + Version = CudaStringToVersion(DetectedVersion); if (Version != CudaVersion::UNKNOWN) - return Version; + return; - // Issue a warning and assume that the version we've found is compatible with - // the latest version we support. - D.Diag(diag::warn_drv_unknown_cuda_version) - << MajorMinor << CudaVersionToString(CudaVersion::LATEST); - return CudaVersion::LATEST; + Version = CudaVersion::LATEST; + DetectedVersionIsNotSupported = true; } +void CudaInstallationDetector::WarnIfUnsupportedVersion() { + if (DetectedVersionIsNotSupported) + D.Diag(diag::warn_drv_unknown_cuda_version) + << DetectedVersion << CudaVersionToString(Version); +} + CudaInstallationDetector::CudaInstallationDetector( const Driver &D, const llvm::Triple &HostTriple, const llvm::opt::ArgList &Args) @@ -147,7 +151,7 @@ CudaInstallationDetector::CudaInstallationDetector( // version.txt isn't present. Version = CudaVersion::CUDA_70; } else { - Version = ParseCudaVersionFile(D, (*VersionFile)->getBuffer()); + ParseCudaVersionFile((*VersionFile)->getBuffer()); } if (Version >= CudaVersion::CUDA_90) { @@ -565,8 +569,10 @@ CudaToolChain::CudaToolChain(const Driver &D, const ll const Action::OffloadKind OK) : ToolChain(D, Triple, Args), HostTC(HostTC), CudaInstallation(D, HostTC.getTriple(), Args), OK(OK) { - if (CudaInstallation.isValid()) + if (CudaInstallation.isValid()) { + CudaInstallation.WarnIfUnsupportedVersion(); getProgramPaths().push_back(CudaInstallation.getBinPath()); + } // Lookup binaries into the driver directory, this is used to // discover the clang-offload-bundler executable. getProgramPaths().push_back(getDriver().Dir); Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.h ============================================================================== --- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.h Thu Mar 26 17:41:33 2020 (r359337) +++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.h Thu Mar 26 17:46:32 2020 (r359338) @@ -30,6 +30,8 @@ class CudaInstallationDetector { (private) const Driver &D; bool IsValid = false; CudaVersion Version = CudaVersion::UNKNOWN; + std::string DetectedVersion; + bool DetectedVersionIsNotSupported = false; std::string InstallPath; std::string BinPath; std::string LibPath; @@ -75,6 +77,10 @@ class CudaInstallationDetector { (private) std::string getLibDeviceFile(StringRef Gpu) const { return LibDeviceMap.lookup(Gpu); } + void WarnIfUnsupportedVersion(); + +private: + void ParseCudaVersionFile(llvm::StringRef V); }; namespace tools { Modified: head/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp Thu Mar 26 17:41:33 2020 (r359337) +++ head/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp Thu Mar 26 17:46:32 2020 (r359338) @@ -3252,6 +3252,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, goto DoneWithDeclSpec; if (isTypeConstraintAnnotation()) continue; + if (NextToken().is(tok::annot_template_id)) + // Might have been annotated by TryAnnotateTypeConstraint. + continue; // Eat the scope spec so the identifier is current. ConsumeAnnotationToken(); ParsedAttributesWithRange Attrs(AttrFactory); @@ -3404,6 +3407,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, if (TryAnnotateTypeConstraint()) goto DoneWithDeclSpec; if (isTypeConstraintAnnotation()) + continue; + if (Tok.is(tok::annot_template_id)) + // Might have been annotated by TryAnnotateTypeConstraint. continue; ParsedAttributesWithRange Attrs(AttrFactory); if (ParseImplicitInt(DS, nullptr, TemplateInfo, AS, DSContext, Attrs)) { Modified: head/contrib/llvm-project/clang/lib/Parse/ParseTemplate.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Parse/ParseTemplate.cpp Thu Mar 26 17:41:33 2020 (r359337) +++ head/contrib/llvm-project/clang/lib/Parse/ParseTemplate.cpp Thu Mar 26 17:46:32 2020 (r359338) @@ -710,7 +710,8 @@ bool Parser::TryAnnotateTypeConstraint() { /*ObjectType=*/ParsedType(), /*EnteringContext=*/false, PossibleConcept, - MemberOfUnknownSpecialization); + MemberOfUnknownSpecialization, + /*Disambiguation=*/true); if (MemberOfUnknownSpecialization || !PossibleConcept || TNK != TNK_Concept_template) { if (SS.isNotEmpty()) Modified: head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp Thu Mar 26 17:41:33 2020 (r359337) +++ head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp Thu Mar 26 17:46:32 2020 (r359338) @@ -174,7 +174,8 @@ TemplateNameKind Sema::isTemplateName(Scope *S, ParsedType ObjectTypePtr, bool EnteringContext, TemplateTy &TemplateResult, - bool &MemberOfUnknownSpecialization) { + bool &MemberOfUnknownSpecialization, + bool Disambiguation) { assert(getLangOpts().CPlusPlus && "No template names in C!"); DeclarationName TName; @@ -204,7 +205,7 @@ TemplateNameKind Sema::isTemplateName(Scope *S, LookupResult R(*this, TName, Name.getBeginLoc(), LookupOrdinaryName); if (LookupTemplateName(R, S, SS, ObjectType, EnteringContext, MemberOfUnknownSpecialization, SourceLocation(), - &AssumedTemplate)) + &AssumedTemplate, Disambiguation)) return TNK_Non_template; if (AssumedTemplate != AssumedTemplateKind::None) { @@ -371,7 +372,8 @@ bool Sema::LookupTemplateName(LookupResult &Found, bool EnteringContext, bool &MemberOfUnknownSpecialization, SourceLocation TemplateKWLoc, - AssumedTemplateKind *ATK) { + AssumedTemplateKind *ATK, + bool Disambiguation) { if (ATK) *ATK = AssumedTemplateKind::None; @@ -494,8 +496,9 @@ bool Sema::LookupTemplateName(LookupResult &Found, } } - if (Found.empty() && !IsDependent) { - // If we did not find any names, attempt to correct any typos. + if (Found.empty() && !IsDependent && !Disambiguation) { + // If we did not find any names, and this is not a disambiguation, attempt + // to correct any typos. DeclarationName Name = Found.getLookupName(); Found.clear(); // Simple filter callback that, for keywords, only accepts the C++ *_cast Modified: head/contrib/llvm-project/clang/lib/Sema/TreeTransform.h ============================================================================== --- head/contrib/llvm-project/clang/lib/Sema/TreeTransform.h Thu Mar 26 17:41:33 2020 (r359337) +++ head/contrib/llvm-project/clang/lib/Sema/TreeTransform.h Thu Mar 26 17:46:32 2020 (r359338) @@ -11303,7 +11303,7 @@ TreeTransform::TransformRequiresExpr(Requires SemaRef, Sema::ExpressionEvaluationContext::Unevaluated); RequiresExprBodyDecl *Body = RequiresExprBodyDecl::Create( - getSema().Context, E->getBody()->getDeclContext(), + getSema().Context, getSema().CurContext, E->getBody()->getBeginLoc()); Sema::ContextRAII SavedContext(getSema(), Body, /*NewThisContext*/false); Modified: head/lib/clang/include/VCSVersion.inc ============================================================================== --- head/lib/clang/include/VCSVersion.inc Thu Mar 26 17:41:33 2020 (r359337) +++ head/lib/clang/include/VCSVersion.inc Thu Mar 26 17:46:32 2020 (r359338) @@ -1,14 +1,14 @@ // $FreeBSD$ -#define LLVM_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca" +#define LLVM_REVISION "llvmorg-10.0.0-0-gd32170dbd5b" #define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca" +#define CLANG_REVISION "llvmorg-10.0.0-0-gd32170dbd5b" #define CLANG_REPOSITORY "git@github.com:llvm/llvm-project.git" // - -#define LLD_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca-1300007" +#define LLD_REVISION "llvmorg-10.0.0-0-gd32170dbd5b-1300007" #define LLD_REPOSITORY "FreeBSD" -#define LLDB_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca" +#define LLDB_REVISION "llvmorg-10.0.0-0-gd32170dbd5b" #define LLDB_REPOSITORY "git@github.com:llvm/llvm-project.git" Modified: head/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- head/lib/clang/include/llvm/Support/VCSRevision.h Thu Mar 26 17:41:33 2020 (r359337) +++ head/lib/clang/include/llvm/Support/VCSRevision.h Thu Mar 26 17:46:32 2020 (r359338) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca" +#define LLVM_REVISION "llvmorg-10.0.0-0-gd32170dbd5b" #define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git" From owner-svn-src-head@freebsd.org Thu Mar 26 18:05:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 470232A5AAB; Thu, 26 Mar 2020 18:05:32 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pCZg2SNtz47sC; Thu, 26 Mar 2020 18:05:29 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E5C5A4B2; Thu, 26 Mar 2020 17:58:53 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QHwqtl027367; Thu, 26 Mar 2020 17:58:52 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QHwqas027366; Thu, 26 Mar 2020 17:58:52 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003261758.02QHwqas027366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 26 Mar 2020 17:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359340 - head/usr.bin/su X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/su X-SVN-Commit-Revision: 359340 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 18:05:32 -0000 Author: 0mp (doc,ports committer) Date: Thu Mar 26 17:58:52 2020 New Revision: 359340 URL: https://svnweb.freebsd.org/changeset/base/359340 Log: Do not use macros in -width They do not expand. MFC after: 1 day Modified: head/usr.bin/su/su.1 Modified: head/usr.bin/su/su.1 ============================================================================== --- head/usr.bin/su/su.1 Thu Mar 26 17:55:56 2020 (r359339) +++ head/usr.bin/su/su.1 Thu Mar 26 17:58:52 2020 (r359340) @@ -28,7 +28,7 @@ .\" @(#)su.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd August 11, 2013 +.Dd March 26, 2020 .Dt SU 1 .Os .Sh NAME @@ -187,7 +187,7 @@ The user ID is always the effective ID (the target use unless the user ID is 0 (root). .El .Sh FILES -.Bl -tag -width ".Pa /etc/pam.d/su" -compact +.Bl -tag -width "/etc/pam.d/su" -compact .It Pa /etc/pam.d/su PAM configuration for .Nm . From owner-svn-src-head@freebsd.org Thu Mar 26 18:51:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F08092A6D54; Thu, 26 Mar 2020 18:51:03 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pDb83Yj0z4R30; Thu, 26 Mar 2020 18:51:00 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46880B061; Thu, 26 Mar 2020 18:50:55 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02QIotkC057577; Thu, 26 Mar 2020 18:50:55 GMT (envelope-from alfredo@FreeBSD.org) Received: (from alfredo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02QIotTP057576; Thu, 26 Mar 2020 18:50:55 GMT (envelope-from alfredo@FreeBSD.org) Message-Id: <202003261850.02QIotTP057576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alfredo set sender to alfredo@FreeBSD.org using -f From: "Alfredo Dal'Ava Junior" Date: Thu, 26 Mar 2020 18:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359342 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: alfredo X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 359342 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 18:51:04 -0000 Author: alfredo Date: Thu Mar 26 18:50:54 2020 New Revision: 359342 URL: https://svnweb.freebsd.org/changeset/base/359342 Log: msun: swap words order instead of bits order on BIG ENDIAN The "for" loop on big endian was inverting all the bits instead of just the words Issue reported by TestSuite (msun lib nan_test case) Submitted by: Renato Riolino Submitted by: Fernando Valle Reviewed by: pfg, alfredo Approved by: jhibbits (mentor) Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D23926 Modified: head/lib/msun/src/s_nan.c Modified: head/lib/msun/src/s_nan.c ============================================================================== --- head/lib/msun/src/s_nan.c Thu Mar 26 17:59:48 2020 (r359341) +++ head/lib/msun/src/s_nan.c Thu Mar 26 18:50:54 2020 (r359342) @@ -66,14 +66,15 @@ _scan_nan(uint32_t *words, int num_words, const char * ; /* Scan backwards, filling in the bits in words[] as we go. */ -#if _BYTE_ORDER == _LITTLE_ENDIAN for (bitpos = 0; bitpos < 32 * num_words; bitpos += 4) { -#else - for (bitpos = 32 * num_words - 4; bitpos >= 0; bitpos -= 4) { -#endif if (--si < 0) break; +#if _BYTE_ORDER == _LITTLE_ENDIAN words[bitpos / 32] |= digittoint(s[si]) << (bitpos % 32); +#else + words[num_words - 1 - bitpos / 32] |= + digittoint(s[si]) << (bitpos % 32); +#endif } } From owner-svn-src-head@freebsd.org Fri Mar 27 00:29:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B0F826589B; Fri, 27 Mar 2020 00:29:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pN630r0lz4bgP; Fri, 27 Mar 2020 00:29:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CA10FD99; Fri, 27 Mar 2020 00:29:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02R0Tdrx062406; Fri, 27 Mar 2020 00:29:39 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02R0TX25062379; Fri, 27 Mar 2020 00:29:33 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202003270029.02R0TX25062379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 27 Mar 2020 00:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359346 - in head/sys: amd64/vmm/amd contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/dispat... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys: amd64/vmm/amd contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/dispatcher contrib/dev/acpica/c... X-SVN-Commit-Revision: 359346 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 00:29:49 -0000 Author: jkim Date: Fri Mar 27 00:29:33 2020 New Revision: 359346 URL: https://svnweb.freebsd.org/changeset/base/359346 Log: Merge ACPICA 20200326. Modified: head/sys/amd64/vmm/amd/amdvi_priv.h head/sys/amd64/vmm/amd/ivrs_drv.c head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump2.c head/sys/contrib/dev/acpica/common/dmtbinfo2.c head/sys/contrib/dev/acpica/common/dmtbinfo3.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtcompilerparser.l head/sys/contrib/dev/acpica/compiler/dtcompilerparser.y head/sys/contrib/dev/acpica/compiler/dtparser.l head/sys/contrib/dev/acpica/compiler/dttable1.c head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/compiler/prparser.l head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actbinfo.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actbl3.h head/sys/contrib/dev/acpica/include/acuuid.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/amd64/vmm/amd/amdvi_priv.h ============================================================================== --- head/sys/amd64/vmm/amd/amdvi_priv.h Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/amd64/vmm/amd/amdvi_priv.h Fri Mar 27 00:29:33 2020 (r359346) @@ -357,33 +357,15 @@ struct amdvi_domain { }; /* - * I/O Virtualization Hardware Definition Block (IVHD) type 0x10 (legacy) - * uses ACPI_IVRS_HARDWARE define in contrib/dev/acpica/include/actbl2.h - * New IVHD types 0x11 and 0x40 as defined in AMD IOMMU spec[48882] are missing in - * ACPI code. These new types add extra field EFR(Extended Feature Register). - * XXX : Use definition from ACPI when it is available. - */ -typedef struct acpi_ivrs_hardware_efr_sup -{ - ACPI_IVRS_HEADER Header; - UINT16 CapabilityOffset; /* Offset for IOMMU control fields */ - UINT64 BaseAddress; /* IOMMU control registers */ - UINT16 PciSegmentGroup; - UINT16 Info; /* MSI number and unit ID */ - UINT32 Attr; /* IOMMU Feature */ - UINT64 ExtFR; /* IOMMU Extended Feature */ - UINT64 Reserved; /* v1 feature or v2 attribute */ -} __attribute__ ((__packed__)) ACPI_IVRS_HARDWARE_EFRSUP; -CTASSERT(sizeof(ACPI_IVRS_HARDWARE_EFRSUP) == 40); - -/* * Different type of IVHD. * XXX: Use AcpiIvrsType once new IVHD types are available. */ enum IvrsType { - IVRS_TYPE_HARDWARE_LEGACY = 0x10, /* Legacy without EFRi support. */ - IVRS_TYPE_HARDWARE_EFR = 0x11, /* With EFR support. */ + IVRS_TYPE_HARDWARE_LEGACY = ACPI_IVRS_TYPE_HARDWARE1, + /* Legacy without EFRi support. */ + IVRS_TYPE_HARDWARE_EFR = ACPI_IVRS_TYPE_HARDWARE2, + /* With EFR support. */ IVRS_TYPE_HARDWARE_MIXED = 0x40, /* Mixed with EFR support. */ }; Modified: head/sys/amd64/vmm/amd/ivrs_drv.c ============================================================================== --- head/sys/amd64/vmm/amd/ivrs_drv.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/amd64/vmm/amd/ivrs_drv.c Fri Mar 27 00:29:33 2020 (r359346) @@ -54,7 +54,7 @@ int ivhd_count; /* Number of IVHD header. */ * Cached IVHD header list. * Single entry for each IVHD, filtered the legacy one. */ -ACPI_IVRS_HARDWARE *ivhd_hdrs[10]; +ACPI_IVRS_HARDWARE1 *ivhd_hdrs[10]; extern int amdvi_ptp_level; /* Page table levels. */ @@ -161,7 +161,7 @@ ivrs_hdr_find_iter(ACPI_IVRS_HEADER * ivrs_hdr, void * return (1); } -static ACPI_IVRS_HARDWARE * +static ACPI_IVRS_HARDWARE1 * ivhd_find_by_index(int idx) { struct find_ivrs_hdr_args fi; @@ -171,7 +171,7 @@ ivhd_find_by_index(int idx) ivrs_hdr_iterate_tbl(ivrs_hdr_find_iter, &fi); - return ((ACPI_IVRS_HARDWARE *)fi.ptr); + return ((ACPI_IVRS_HARDWARE1 *)fi.ptr); } static void @@ -195,7 +195,7 @@ ivhd_dev_add_entry(struct amdvi_softc *softc, uint32_t * Record device attributes as suggested by BIOS. */ static int -ivhd_dev_parse(ACPI_IVRS_HARDWARE* ivhd, struct amdvi_softc *softc) +ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) { ACPI_IVRS_DE_HEADER *de; uint8_t *p, *end; @@ -209,12 +209,12 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE* ivhd, struct amdvi_ switch (ivhd->Header.Type) { case IVRS_TYPE_HARDWARE_LEGACY: - p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE); + p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE1); break; case IVRS_TYPE_HARDWARE_EFR: case IVRS_TYPE_HARDWARE_MIXED: - p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE_EFRSUP); + p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE2); break; default: @@ -327,7 +327,7 @@ static void ivhd_identify(driver_t *driver, device_t parent) { ACPI_TABLE_IVRS *ivrs; - ACPI_IVRS_HARDWARE *ivhd; + ACPI_IVRS_HARDWARE1 *ivhd; ACPI_STATUS status; int i, count = 0; uint32_t ivrs_ivinfo; @@ -408,7 +408,7 @@ ivhd_identify(driver_t *driver, device_t parent) static int ivhd_probe(device_t dev) { - ACPI_IVRS_HARDWARE *ivhd; + ACPI_IVRS_HARDWARE1 *ivhd; int unit; if (acpi_get_handle(dev) != NULL) @@ -582,7 +582,7 @@ ivhd_print_ext_feature(device_t dev, uint64_t ext_feat } static int -ivhd_print_cap(struct amdvi_softc *softc, ACPI_IVRS_HARDWARE * ivhd) +ivhd_print_cap(struct amdvi_softc *softc, ACPI_IVRS_HARDWARE1 * ivhd) { device_t dev; int max_ptp_level; @@ -612,8 +612,8 @@ ivhd_print_cap(struct amdvi_softc *softc, ACPI_IVRS_HA static int ivhd_attach(device_t dev) { - ACPI_IVRS_HARDWARE *ivhd; - ACPI_IVRS_HARDWARE_EFRSUP *ivhd_efr; + ACPI_IVRS_HARDWARE1 *ivhd; + ACPI_IVRS_HARDWARE2 *ivhd_efr; struct amdvi_softc *softc; int status, unit; @@ -637,7 +637,7 @@ ivhd_attach(device_t dev) * On lgeacy IVHD type(0x10), it is documented as feature * but in newer type it is attribute. */ - softc->ivhd_feature = ivhd->Reserved; + softc->ivhd_feature = ivhd->FeatureReporting; /* * PCI capability has more capabilities that are not part of IVRS. */ @@ -648,12 +648,11 @@ ivhd_attach(device_t dev) softc->event_msix = ivhd->Info & 0x1F; #endif switch (ivhd->Header.Type) { - case IVRS_TYPE_HARDWARE_EFR: - case IVRS_TYPE_HARDWARE_MIXED: - ivhd_efr = (ACPI_IVRS_HARDWARE_EFRSUP *)ivhd; - softc->ext_feature = ivhd_efr->ExtFR; - break; - + case IVRS_TYPE_HARDWARE_EFR: + case IVRS_TYPE_HARDWARE_MIXED: + ivhd_efr = (ACPI_IVRS_HARDWARE2 *)ivhd; + softc->ext_feature = ivhd_efr->EfrRegisterImage; + break; } softc->ctrl = (struct amdvi_ctrl *) PHYS_TO_DMAP(ivhd->BaseAddress); Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/changes.txt Fri Mar 27 00:29:33 2020 (r359346) @@ -1,4 +1,99 @@ ---------------------------------------- +26 March 2020. Summary of changes for version 20200326: + + +1) ACPICA kernel-resident subsystem: + +Performed a code clean-up to prevent build errors on early versions of +GCC-10. + +Added the NHLT table signature. iASL data table compiler/disassembler +support for this table is coming soon. + + +2) iASL Compiler/Disassembler and ACPICA tools: + +AcpiExec: Fixed several problems with the namespace initialization file +(-fi option). Includes fixes to prevent AE_ALREADY_EXISTS +errors, several seg faults, and enhancements to line parsing within the +init file. In addition, each object found in the init file and it's new +value is displayed, as well as any such entries that do not have a +corresponding name in the namespace. For reference, the syntax for the +various supported data types are presented below: + PCHG 0x777788889999BBBB // Integer + \DEV1.STR1 "XYZ" // String + BUF1 (88 99 AA) // Buffer + PKG1 [0x1111 0x2222] // Package + \BF1 0x7980 // BufferField + RCRV 0x0123456789ABCDEF // Field Unit + +iASL: Added a custom iASL macro __EXPECT__(iASL-Error-Code). This macro +can be used anywhere in a given ASL file to configure iASL to expect an +iASL compiler error code on the line where this macro was placed. If the +error code does not exist, an error is generated. This is intended to be +used for ACPICA's ASL test suite, but can be used by ASL developers as +well. + +iASL: table compiler: Implemented IVRS IVHD type 11h parsing. The AMD +IVRS table parsing supported only IVHD type 10h structures. Parsing an +IVHD type 11h caused the iasl to report unknown subtable type. Add +necessary structure definition for IVHD type 11h and apply correct +parsing method based on subtable type. Micha? ?ygowski. + +iASL: table compiler: Fixed IVRS table IVHD type 10h reserved field name +According to AMD IOMMU Specification Revision 3.05 the reserved field +should be IOMMU Feature Reporting. Change the name of the field to the +correct one. Micha? ?ygowski. + +acpiexec: removed redeclaration of AcpiGbl_DbOpt_NoRegionSupport. Patch +based on suggestions by David Seifert and Benjamin Berg. + +iASL: table compiler: removed an unused variable (DtCompilerParserResult) +causing linking errors. Patch based on suggestions by David Seifert and +Benjamin Berg. + +iASL: table compiler: make LexBuffer static to avoid linking errors in +newer compilers. Patch based on suggestions by David Seifert and Benjamin +Berg. + +iASL: fixed type matching between External and Named objects. External +object types can only be expressed with ACPI object type values that are +defined in the ACPI spec. However, iASL uses ACPI object type values that +are local to ACPICA in addition to the values defined in the ACPI spec. +This change implements type matching to map some object type values +specific to ACPICA to ones that are defined in the ACPI spec. + +iASL: Dropped the type mismatch compiler error that can arise from +External declarations to a warning. This warning can occur when there is +a type difference between the external declaration and the actual object +declaration (when compiling multiple files/modules simultaneously). + +iASL: removed an incorrect error message regarding externals. This change +removes an incorrect error that is emitted when a duplicate external +declaration does not contain a type that opens a scope. This is incorrect +because the duplicate external with conflicting types are already caught +by iASL and it doesn't make any sense to enforce what this conflicting +type should be. + +AcpiXtract: fix AX_IS_TABLE_BLOCK_HEADER macro. This macro needs to be +surrounded by parens. Otherwise, a logical statement that applies a +logical not operator to this macro could result in a computation that +applies the operator to the left side of the logical and but not the +right. Reported-by: John Levon + +Fixed a problem with the local version of sprint(): On 32-bit, the +provided sprintf() is non-functional: with a size of ACPI_UINT32_MAX, +String + Size will wrap, meaning End < Start, and +AcpiUtBoundStringOutput() will never output anything as a result. The +symptom seen of this was acpixtract failing to output anything -- with a +custom build that included utprint.c. Signed-off-by: John Levon + + +iASL: Changed the "PlatformCommChannel" ASL keyword to "PCC", as per the +ACPI specification. + + +---------------------------------------- 14 February 2020. Summary of changes for version 20200214: Modified: head/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahtable.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/common/ahtable.c Fri Mar 27 00:29:33 2020 (r359346) @@ -258,7 +258,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] = {ACPI_SIG_WDDT, "Watchdog Description Table"}, {ACPI_SIG_WDRT, "Watchdog Resource Table"}, {ACPI_SIG_WPBT, "Windows Platform Binary Table"}, - {ACPI_SIG_WSMT, "Windows SMM Security Migrations Table"}, + {ACPI_SIG_WSMT, "Windows SMM Security Mitigations Table"}, {ACPI_SIG_XENV, "Xen Environment table"}, {ACPI_SIG_XSDT, "Extended System Description Table"}, {NULL, NULL} Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/common/dmtable.c Fri Mar 27 00:29:33 2020 (r359346) @@ -1676,7 +1676,8 @@ AcpiDmDumpTable ( Temp8 = *Target; switch (Temp8) { - case ACPI_IVRS_TYPE_HARDWARE: + case ACPI_IVRS_TYPE_HARDWARE1: + case ACPI_IVRS_TYPE_HARDWARE2: Name = AcpiDmIvrsSubnames[0]; break; Modified: head/sys/contrib/dev/acpica/common/dmtbdump2.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump2.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/common/dmtbdump2.c Fri Mar 27 00:29:33 2020 (r359346) @@ -475,11 +475,16 @@ AcpiDmDumpIvrs ( switch (Subtable->Type) { - case ACPI_IVRS_TYPE_HARDWARE: + case ACPI_IVRS_TYPE_HARDWARE1: InfoTable = AcpiDmTableInfoIvrs0; break; + case ACPI_IVRS_TYPE_HARDWARE2: + + InfoTable = AcpiDmTableInfoIvrs01; + break; + case ACPI_IVRS_TYPE_MEMORY1: case ACPI_IVRS_TYPE_MEMORY2: case ACPI_IVRS_TYPE_MEMORY3: @@ -514,11 +519,21 @@ AcpiDmDumpIvrs ( /* The hardware subtable can contain multiple device entries */ - if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE) + if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE1 || + Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2) { - EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE); - DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable, - sizeof (ACPI_IVRS_HARDWARE)); + if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE1) + { + EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE1); + DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable, + sizeof (ACPI_IVRS_HARDWARE1)); + } + else if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2) + { + EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE2); + DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable, + sizeof (ACPI_IVRS_HARDWARE2)); + } while (EntryOffset < (Offset + Subtable->Length)) { Modified: head/sys/contrib/dev/acpica/common/dmtbinfo2.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo2.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/common/dmtbinfo2.c Fri Mar 27 00:29:33 2020 (r359346) @@ -403,7 +403,21 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs0[] = {ACPI_DMT_UINT64, ACPI_IVRS0_OFFSET (BaseAddress), "Base Address", 0}, {ACPI_DMT_UINT16, ACPI_IVRS0_OFFSET (PciSegmentGroup), "PCI Segment Group", 0}, {ACPI_DMT_UINT16, ACPI_IVRS0_OFFSET (Info), "Virtualization Info", 0}, - {ACPI_DMT_UINT32, ACPI_IVRS0_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT32, ACPI_IVRS0_OFFSET (FeatureReporting), "Feature Reporting", 0}, + ACPI_DMT_TERMINATOR +}; + +/* 0x10: I/O Virtualization Hardware Definition (IVHD) Block */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs01[] = +{ + {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (CapabilityOffset), "Capability Offset", 0}, + {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (BaseAddress), "Base Address", 0}, + {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (PciSegmentGroup), "PCI Segment Group", 0}, + {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (Info), "Virtualization Info", 0}, + {ACPI_DMT_UINT32, ACPI_IVRS01_OFFSET (Attributes), "Attributes", 0}, + {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (EfrRegisterImage), "EFR Image", 0}, + {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (Reserved), "Reserved", 0}, ACPI_DMT_TERMINATOR }; Modified: head/sys/contrib/dev/acpica/common/dmtbinfo3.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo3.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/common/dmtbinfo3.c Fri Mar 27 00:29:33 2020 (r359346) @@ -691,7 +691,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[] = /******************************************************************************* * - * WSMT - Windows SMM Security Migrations Table + * WSMT - Windows SMM Security Mitigations Table * ******************************************************************************/ Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Fri Mar 27 00:29:33 2020 (r359346) @@ -283,6 +283,7 @@ CmDoCompile ( LsDumpParseTree (); + UtEndEvent (Event); UtEndEvent (FullCompile); return (AE_OK); Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Mar 27 00:29:33 2020 (r359346) @@ -488,7 +488,7 @@ AslCheckExpectedExceptions ( void); ACPI_STATUS -AslExpectException ( +AslLogExpectedException ( char *MessageIdString); ACPI_STATUS @@ -501,8 +501,14 @@ AslDisableException ( BOOLEAN AslIsExceptionIgnored ( + char *Filename, + UINT32 LineNumber, UINT8 Level, UINT16 MessageId); + +void +AslLogExpectedExceptionByLine ( + char *MessageIdString); void AslCoreSubsystemError ( Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Fri Mar 27 00:29:33 2020 (r359346) @@ -156,7 +156,6 @@ #include #include -YYSTYPE AslCompilerlval; /* * Generation: Use the following command line: @@ -195,6 +194,7 @@ count (int type); LeadNameChar [A-Za-z_] DigitChar [0-9] +ErrorCode [(][ ]*[1-9][0-9][0-9][0-9][ ]*[)] OctalChar [0-7] HexDigitChar [A-Fa-f0-9] RootChar [\\] @@ -692,7 +692,7 @@ NamePathTail [.]{NameSeg} "IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); } "GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */ "GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */ -"PlatformCommChannel" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */ +"PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */ "FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); } /* ResourceTypeKeyword: Resource Usage - Resource Descriptors */ @@ -810,6 +810,22 @@ NamePathTail [.]{NameSeg} "__LINE__" { count (0); return (PARSEOP___LINE__); } "__PATH__" { count (0); return (PARSEOP___PATH__); } "__METHOD__" { count (0); return (PARSEOP___METHOD__); } +"__EXPECT__"{ErrorCode} { char *s; + int index = 0; + count (0); + while (!isdigit (AslCompilertext[index])) + { + index++; + } + + /* + * The eror code is contained inside the + * {ErrorCode} pattern. Extract it and log it + * as the expected error code. + */ + s = UtLocalCacheCalloc (ASL_ERROR_CODE_LENGTH + 1); + memcpy (s, AslCompilertext + index, ASL_ERROR_CODE_LENGTH); + AslLogExpectedExceptionByLine (s); } {NameSeg} { char *s; count (0); Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Fri Mar 27 00:29:33 2020 (r359346) @@ -227,6 +227,7 @@ #define ASL_NO_ABORT FALSE #define ASL_EOF ACPI_UINT32_MAX #define ASL_IGNORE_LINE (ACPI_UINT32_MAX -1) +#define ASL_ERROR_CODE_LENGTH 4 /* Listings */ Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Fri Mar 27 00:29:33 2020 (r359346) @@ -162,6 +162,8 @@ AeAddToErrorLog ( static BOOLEAN AslIsExceptionExpected ( + char *Filename, + UINT32 LineNumber, UINT8 Level, UINT16 MessageId); @@ -170,7 +172,8 @@ AslIsExceptionDisabled ( UINT8 Level, UINT16 MessageId); -static void AslInitEnode ( +static void +AslInitEnode ( ASL_ERROR_MSG **Enode, UINT8 Level, UINT16 MessageId, @@ -956,7 +959,7 @@ AslCommonError ( { /* Check if user wants to ignore this exception */ - if (AslIsExceptionIgnored (Level, MessageId)) + if (AslIsExceptionIgnored (Filename, LogicalLineNumber, Level, MessageId)) { return; } @@ -1087,6 +1090,8 @@ GetModifiedLevel ( BOOLEAN AslIsExceptionIgnored ( + char *Filename, + UINT32 LineNumber, UINT8 Level, UINT16 MessageId) { @@ -1096,7 +1101,8 @@ AslIsExceptionIgnored ( /* Note: this allows exception to be disabled and expected */ ExceptionIgnored = AslIsExceptionDisabled (Level, MessageId); - ExceptionIgnored |= AslIsExceptionExpected (Level, MessageId); + ExceptionIgnored |= + AslIsExceptionExpected (Filename, LineNumber, Level, MessageId); return (AslGbl_AllExceptionsDisabled || ExceptionIgnored); } @@ -1104,7 +1110,7 @@ AslIsExceptionIgnored ( /******************************************************************************* * - * FUNCTION: AslCheckExpectException + * FUNCTION: AslCheckExpectedException * * PARAMETERS: none * @@ -1120,6 +1126,8 @@ AslCheckExpectedExceptions ( void) { UINT8 i; + ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList; + ASL_LOCATION_NODE *LocationNode; for (i = 0; i < AslGbl_ExpectedMessagesIndex; ++i) @@ -1130,12 +1138,32 @@ AslCheckExpectedExceptions ( AslGbl_ExpectedMessages[i].MessageIdStr); } } + + while (Current) + { + LocationNode = Current->LocationList; + + while (LocationNode) + { + if (!LocationNode->MessageReceived) + { + AslCommonError (ASL_ERROR, ASL_MSG_EXCEPTION_NOT_RECEIVED, + LocationNode->LineNumber, LocationNode->LineNumber, + LocationNode->LogicalByteOffset, LocationNode->Column, + LocationNode->Filename, Current->MessageIdStr); + } + + LocationNode = LocationNode->Next; + } + + Current = Current->Next; + } } /******************************************************************************* * - * FUNCTION: AslExpectException + * FUNCTION: AslLogExpectedException * * PARAMETERS: MessageIdString - ID of excepted exception during compile * @@ -1148,7 +1176,7 @@ AslCheckExpectedExceptions ( ******************************************************************************/ ACPI_STATUS -AslExpectException ( +AslLogExpectedException ( char *MessageIdString) { UINT32 MessageId; @@ -1184,6 +1212,61 @@ AslExpectException ( /******************************************************************************* * + * FUNCTION: AslLogExpectedExceptionByLine + * + * PARAMETERS: MessageIdString - ID of excepted exception during compile + * + * RETURN: Status + * + * DESCRIPTION: Enter a message ID into the global expected messages table + * based on file and line number. If these messages are not raised + * during the compilation, throw an error. + * + ******************************************************************************/ + +void +AslLogExpectedExceptionByLine ( + char *MessageIdString) +{ + ASL_LOCATION_NODE *NewErrorLocationNode; + ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList; + UINT32 MessageId; + + + NewErrorLocationNode = UtLocalCalloc (sizeof (ASL_LOCATION_NODE)); + + NewErrorLocationNode->LineNumber = AslGbl_CurrentLineNumber; + NewErrorLocationNode->Filename = AslGbl_Files[ASL_FILE_INPUT].Filename; + NewErrorLocationNode->LogicalByteOffset = AslGbl_CurrentLineOffset; + NewErrorLocationNode->Column = AslGbl_CurrentColumn; + + MessageId = (UINT32) strtoul (MessageIdString, NULL, 0); + + /* search the existing list for a matching message ID */ + + while (Current && Current->MessageId != MessageId ) + { + Current = Current->Next; + } + if (!Current) + { + /* ID was not found, create a new node for this message ID */ + + Current = UtLocalCalloc (sizeof (ASL_EXPECTED_MSG_NODE)); + + Current->Next = AslGbl_ExpectedErrorCodeList; + Current->MessageIdStr = MessageIdString; + Current->MessageId = MessageId; + AslGbl_ExpectedErrorCodeList = Current; + } + + NewErrorLocationNode->Next = Current->LocationList; + Current->LocationList = NewErrorLocationNode; +} + + +/******************************************************************************* + * * FUNCTION: AslDisableException * * PARAMETERS: MessageIdString - ID to be disabled @@ -1272,6 +1355,7 @@ AslElevateException ( return (AE_OK); } + /******************************************************************************* * * FUNCTION: AslIsExceptionDisabled @@ -1288,9 +1372,13 @@ AslElevateException ( static BOOLEAN AslIsExceptionExpected ( + char *Filename, + UINT32 LineNumber, UINT8 Level, UINT16 MessageId) { + ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList; + ASL_LOCATION_NODE *CurrentErrorLocation; UINT32 EncodedMessageId; UINT32 i; @@ -1308,6 +1396,28 @@ AslIsExceptionExpected ( } } + while (Current && Current->MessageId != EncodedMessageId) + { + Current = Current->Next; + } + if (!Current) + { + return (FALSE); + } + + CurrentErrorLocation = Current->LocationList; + + while (CurrentErrorLocation) + { + if (!strcmp (CurrentErrorLocation->Filename, Filename) && + CurrentErrorLocation->LineNumber == LineNumber) + { + return (CurrentErrorLocation->MessageReceived = TRUE); + } + + CurrentErrorLocation = CurrentErrorLocation->Next; + } + return (FALSE); } @@ -1410,7 +1520,8 @@ AslDualParseOpError ( /* Check if user wants to ignore this exception */ - if (AslIsExceptionIgnored (Level, MainMsgId) || !MainOp) + if (!MainOp || AslIsExceptionIgnored (MainOp->Asl.Filename, + MainOp->Asl.LogicalLineNumber, Level, MainMsgId)) { return; } Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Fri Mar 27 00:29:33 2020 (r359346) @@ -420,6 +420,7 @@ ASL_EXTERN char ASL_INIT_GLOBAL (* ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_TableId, "NO_ID"); ASL_EXTERN ASL_FILE_INFO ASL_INIT_GLOBAL (*AslGbl_Files, NULL); ASL_EXTERN ASL_GLOBAL_FILE_NODE ASL_INIT_GLOBAL (*AslGbl_FilesList, NULL); +ASL_EXTERN ASL_EXPECTED_MSG_NODE ASL_INIT_GLOBAL (*AslGbl_ExpectedErrorCodeList, NULL); /* Specific to the -q option */ Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Fri Mar 27 00:29:33 2020 (r359346) @@ -1022,6 +1022,74 @@ FinishNode: * * FUNCTION: LdAnalyzeExternals * + * PARAMETERS: Type1 + * Type2 + * + * RETURN: BOOLEAN + * + * DESCRIPTION: Match Type1 and Type2 with the assumption that one might be + * using external types and another might be using local types. + * This should be used to compare the types found in external + * declarations with types found in other external declarations or + * named object declaration. This should not be used to match two + * object type declarations. + * + ******************************************************************************/ + +static BOOLEAN +LdTypesMatchExternType ( + ACPI_OBJECT_TYPE Type1, + ACPI_OBJECT_TYPE Type2) +{ + BOOLEAN Type1IsLocal = Type1 > ACPI_TYPE_EXTERNAL_MAX; + BOOLEAN Type2IsLocal = Type2 > ACPI_TYPE_EXTERNAL_MAX; + ACPI_OBJECT_TYPE ExternalType; + ACPI_OBJECT_TYPE LocalType; + + + /* + * The inputs could represent types that are local to ACPICA or types that + * are known externally. Some local types, such as the OperationRegion + * field units, are defined with more granularity than ACPICA local types. + * + * Therefore, map the local types to the external types before matching. + */ + if (Type1IsLocal && !Type2IsLocal) + { + LocalType = Type1; + ExternalType = Type2; + } + else if (!Type1IsLocal && Type2IsLocal) + { + LocalType = Type2; + ExternalType = Type1; + } + else + { + return (Type1 == Type2); + } + + switch (LocalType) + { + case ACPI_TYPE_LOCAL_REGION_FIELD: + case ACPI_TYPE_LOCAL_BANK_FIELD: + case ACPI_TYPE_LOCAL_INDEX_FIELD: + + LocalType = ACPI_TYPE_FIELD_UNIT; + break; + + default: + break; + } + + return (LocalType == ExternalType); +} + + +/******************************************************************************* + * + * FUNCTION: LdAnalyzeExternals + * * PARAMETERS: Node - Node that represents the named object * Op - Named object declaring this named object * ExternalOpType - Type of ExternalOp @@ -1072,12 +1140,12 @@ LdAnalyzeExternals ( if ((ActualOpType != ACPI_TYPE_ANY) && (ActualExternalOpType != ACPI_TYPE_ANY) && - (ActualExternalOpType != ActualOpType)) + !LdTypesMatchExternType (ActualExternalOpType, ActualOpType)) { if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL && Node->Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) { - AslDualParseOpError (ASL_ERROR, + AslDualParseOpError (ASL_WARNING, ASL_MSG_DUPLICATE_EXTERN_MISMATCH, Op, NULL, ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE, Node->Op, NULL); } @@ -1094,7 +1162,7 @@ LdAnalyzeExternals ( ExternalOp = Node->Op; ActualOp = Op; } - AslDualParseOpError (ASL_ERROR, + AslDualParseOpError (ASL_WARNING, ASL_MSG_DECLARATION_TYPE_MISMATCH, ExternalOp, NULL, ASL_MSG_TYPE_MISMATCH_FOUND_HERE, ActualOp, NULL); } @@ -1139,18 +1207,8 @@ LdAnalyzeExternals ( { /* Allow update of externals of unknown type. */ - if (AcpiNsOpensScope (ExternalOpType)) - { - Node->Type = (UINT8) ExternalOpType; - Status = AE_OK; - } - else - { - sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName, - AcpiUtGetTypeName (Node->Type)); - AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer); - Status = AE_ERROR; - } + Node->Type = (UINT8) ExternalOpType; + Status = AE_OK; } return (Status); Modified: head/sys/contrib/dev/acpica/compiler/asloptions.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloptions.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/asloptions.c Fri Mar 27 00:29:33 2020 (r359346) @@ -942,7 +942,7 @@ AslDoOptions ( return (-1); } - Status = AslExpectException (AcpiGbl_Optarg); + Status = AslLogExpectedException (AcpiGbl_Optarg); if (ACPI_FAILURE (Status)) { return (-1); Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.h Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/asltypes.h Fri Mar 27 00:29:33 2020 (r359346) @@ -381,11 +381,36 @@ typedef struct asl_error_msg typedef struct asl_expected_message { - UINT32 MessageId; - char *MessageIdStr; - BOOLEAN MessageReceived; + UINT32 MessageId; + char *MessageIdStr; + BOOLEAN MessageReceived; } ASL_EXPECTED_MESSAGE; + +/* + * An entry in the line-based expected messages list + * + * TBD: might be possible to merge this with ASL_EXPECTED_MESSAGE + */ +typedef struct asl_expected_msg_node +{ + struct asl_expected_msg_node *Next; + UINT32 MessageId; + char *MessageIdStr; + struct asl_location_node *LocationList; + +} ASL_EXPECTED_MSG_NODE; + +typedef struct asl_location_node +{ + struct asl_location_node *Next; + char *Filename; + UINT32 LineNumber; + UINT32 Column; + UINT32 LogicalByteOffset; + BOOLEAN MessageReceived; + +} ASL_LOCATION_NODE; /* An entry in the listing file stack (for include files) */ Modified: head/sys/contrib/dev/acpica/compiler/dtcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtcompiler.h Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/dtcompiler.h Fri Mar 27 00:29:33 2020 (r359346) @@ -461,7 +461,6 @@ DtCreateTableUnit ( /* dtparser - lex/yacc files */ -UINT64 DtCompilerParserResult; /* Expression return value */ int DtCompilerParserparse ( void); Modified: head/sys/contrib/dev/acpica/compiler/dtcompilerparser.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtcompilerparser.l Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/dtcompilerparser.l Fri Mar 27 00:29:33 2020 (r359346) @@ -153,7 +153,6 @@ #include #include "dtcompilerparser.y.h" -YYSTYPE DtCompilerlval; #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("dtcompilerscanner") Modified: head/sys/contrib/dev/acpica/compiler/dtcompilerparser.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtcompilerparser.y Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/dtcompilerparser.y Fri Mar 27 00:29:33 2020 (r359346) @@ -170,7 +170,6 @@ extern char *DtCompilerParsertext; extern DT_FIELD *AslGbl_CurrentField; extern int DtLabelByteOffset; -extern UINT64 DtCompilerParserResult; /* Expression return value */ extern UINT64 DtCompilerParserlineno; /* Current line number */ extern UINT32 DtTokenFirstLine; Modified: head/sys/contrib/dev/acpica/compiler/dtparser.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtparser.l Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/dtparser.l Fri Mar 27 00:29:33 2020 (r359346) @@ -208,7 +208,7 @@ NewLine [\n] /* * Local support functions */ -YY_BUFFER_STATE LexBuffer; +static YY_BUFFER_STATE LexBuffer; /****************************************************************************** * Modified: head/sys/contrib/dev/acpica/compiler/dttable1.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dttable1.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/dttable1.c Fri Mar 27 00:29:33 2020 (r359346) @@ -1967,11 +1967,16 @@ DtCompileIvrs ( switch (IvrsHeader->Type) { - case ACPI_IVRS_TYPE_HARDWARE: + case ACPI_IVRS_TYPE_HARDWARE1: InfoTable = AcpiDmTableInfoIvrs0; break; + case ACPI_IVRS_TYPE_HARDWARE2: + + InfoTable = AcpiDmTableInfoIvrs01; + break; + case ACPI_IVRS_TYPE_MEMORY1: case ACPI_IVRS_TYPE_MEMORY2: case ACPI_IVRS_TYPE_MEMORY3: @@ -1994,7 +1999,8 @@ DtCompileIvrs ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); - if (IvrsHeader->Type == ACPI_IVRS_TYPE_HARDWARE) + if (IvrsHeader->Type == ACPI_IVRS_TYPE_HARDWARE1 || + IvrsHeader->Type == ACPI_IVRS_TYPE_HARDWARE2) { while (*PFieldList && !strcmp ((*PFieldList)->Name, "Entry Type")) Modified: head/sys/contrib/dev/acpica/compiler/dtutils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtutils.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/dtutils.c Fri Mar 27 00:29:33 2020 (r359346) @@ -189,7 +189,8 @@ DtError ( /* Check if user wants to ignore this exception */ - if (AslIsExceptionIgnored (Level, MessageId)) + if (AslIsExceptionIgnored (AslGbl_Files[ASL_FILE_INPUT].Filename, + FieldObject->Line, Level, MessageId)) { return; } Modified: head/sys/contrib/dev/acpica/compiler/prparser.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/prparser.l Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/compiler/prparser.l Fri Mar 27 00:29:33 2020 (r359346) @@ -224,7 +224,7 @@ Identifier [a-zA-Z][0-9a-zA-Z]* /* * Local support functions */ -YY_BUFFER_STATE LexBuffer; +static YY_BUFFER_STATE LexBuffer; /****************************************************************************** Modified: head/sys/contrib/dev/acpica/components/debugger/dbinput.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbinput.c Thu Mar 26 22:08:31 2020 (r359345) +++ head/sys/contrib/dev/acpica/components/debugger/dbinput.c Fri Mar 27 00:29:33 2020 (r359346) @@ -637,19 +637,16 @@ AcpiDbGetNextToken ( return (NULL); } - /* Remove any spaces at the beginning */ + /* Remove any spaces at the beginning, ignore blank lines */ - if (*String == ' ') + while (*String && isspace (*String)) { - while (*String && (*String == ' ')) - { - String++; - } + String++; + } - if (!(*String)) - { - return (NULL); - } + if (!(*String)) + { + return (NULL); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Mar 27 01:00:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D03A32664AC; Fri, 27 Mar 2020 01:00:16 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pNn85RQfz3K2V; Fri, 27 Mar 2020 01:00:12 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 517631838B; Fri, 27 Mar 2020 01:00:05 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02R105rI080143; Fri, 27 Mar 2020 01:00:05 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02R103fT080135; Fri, 27 Mar 2020 01:00:03 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202003270100.02R103fT080135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Fri, 27 Mar 2020 01:00:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359347 - in head: gnu/usr.bin/binutils share/man/man7 share/mk stand tools/build/mk tools/build/options X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head: gnu/usr.bin/binutils share/man/man7 share/mk stand tools/build/mk tools/build/options X-SVN-Commit-Revision: 359347 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 01:00:17 -0000 Author: bdragon Date: Fri Mar 27 01:00:03 2020 New Revision: 359347 URL: https://svnweb.freebsd.org/changeset/base/359347 Log: [PowerPC] Switch powerpc and powerpcspe to lld Now that LLD 10 is out, and required patches have landed, we are now ready to finally switch away from the ancient in-tree ld.bfd. Special thanks to Fangrui Song for many hours of work on getting the 32-bit powerpc lld ready for prime-time. Reviewed by: emaste (earlier revision), jhibbits Relnotes: yes Differential Revision: https://reviews.freebsd.org/D24111 Modified: head/gnu/usr.bin/binutils/Makefile head/share/man/man7/arch.7 head/share/mk/bsd.compat.mk head/share/mk/bsd.cpu.mk head/share/mk/src.opts.mk head/stand/defs.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/tools/build/options/WITHOUT_BINUTILS head/tools/build/options/WITH_BINUTILS Modified: head/gnu/usr.bin/binutils/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/Makefile Fri Mar 27 00:29:33 2020 (r359346) +++ head/gnu/usr.bin/binutils/Makefile Fri Mar 27 01:00:03 2020 (r359347) @@ -17,12 +17,6 @@ SUBDIR.${MK_BINUTILS}+= objdump SUBDIR.${MK_BINUTILS}+= as .endif -# All archs except powerpc either use lld or require external toolchain. -# powerpc still needs binutils ld to link 32-bit binaries. -.if ${TARGET} == "powerpc" -SUBDIR.${MK_BINUTILS}+=ld -.endif - SUBDIR_DEPEND_libbinutils=libbfd # for bfdver.h SUBDIR_DEPEND_as=libbfd libiberty libopcodes SUBDIR_DEPEND_ld=libbfd libiberty Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Fri Mar 27 00:29:33 2020 (r359346) +++ head/share/man/man7/arch.7 Fri Mar 27 01:00:03 2020 (r359347) @@ -311,8 +311,8 @@ This table shows the default tool chain for each archi .It mips64el Ta Clang Ta lld .It mips64elhf Ta Clang Ta lld .It mips64hf Ta Clang Ta lld -.It powerpc Ta Clang Ta GNU ld 2.17.50 -.It powerpcspe Ta Clang Ta GNU ld 2.17.50 +.It powerpc Ta Clang Ta lld +.It powerpcspe Ta Clang Ta lld .It powerpc64 Ta Clang Ta lld .It riscv64 Ta Clang Ta lld .It riscv64sf Ta Clang Ta lld Modified: head/share/mk/bsd.compat.mk ============================================================================== --- head/share/mk/bsd.compat.mk Fri Mar 27 00:29:33 2020 (r359346) +++ head/share/mk/bsd.compat.mk Fri Mar 27 01:00:03 2020 (r359347) @@ -52,15 +52,11 @@ LIB32CPUFLAGS= -mcpu=${COMPAT_CPUTYPE} LIB32CPUFLAGS+= -m32 .else LIB32CPUFLAGS+= -target powerpc-unknown-freebsd13.0 - -# Use BFD to workaround ld.lld issues on PowerPC 32 bit -LIB32CPUFLAGS+= -fuse-ld=${LD_BFD} .endif LIB32_MACHINE= powerpc LIB32_MACHINE_ARCH= powerpc -LIB32WMAKEFLAGS= \ - LD="${LD_BFD} -m elf32ppc_fbsd" +LIB32WMAKEFLAGS= -m elf32ppc_fbsd .elif ${COMPAT_ARCH:Mmips64*} != "" HAS_COMPAT=32 Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Fri Mar 27 00:29:33 2020 (r359346) +++ head/share/mk/bsd.cpu.mk Fri Mar 27 01:00:03 2020 (r359347) @@ -388,16 +388,3 @@ CFLAGS_NO_SIMD += ${CFLAGS_NO_SIMD.${COMPILER_TYPE}} CFLAGS += ${CFLAGS.${MACHINE_ARCH}} CXXFLAGS += ${CXXFLAGS.${MACHINE_ARCH}} - -# Defines a variable for Binutils linker, to be used to workaround some -# issue with LLVM LLD (i.e. support for PowerPC32 bit on PowerPC64) -# -# This is an unavoidable cross coupling with Makefile.inc1 and -# normal builds works when CROSS_BINUTILS_PREFIX and could be removed -# when LLD PowerPC 32 bit support is completed -.if defined(CROSS_BINUTILS_PREFIX) -LD_BFD=${LOCALBASE}/bin/${CROSS_BINUTILS_PREFIX}-ld.bfd -.else -LD_BFD=${OBJTOP}/tmp/usr/bin/ld.bfd -.endif - Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Mar 27 00:29:33 2020 (r359346) +++ head/share/mk/src.opts.mk Fri Mar 27 01:00:03 2020 (r359347) @@ -131,6 +131,8 @@ __DEFAULT_YES_OPTIONS = \ LIBPTHREAD \ LIBTHR \ LLD \ + LLD_BOOTSTRAP \ + LLD_IS_LD \ LLVM_COV \ LLVM_TARGET_ALL \ LOADER_GELI \ @@ -289,18 +291,13 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF .if ${__T} == "aarch64" || ${__T:Mriscv*} != "" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GDB .endif -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} +.if ${__T} == "amd64" || ${__T} == "i386" __DEFAULT_YES_OPTIONS+=BINUTILS_BOOTSTRAP .else __DEFAULT_NO_OPTIONS+=BINUTILS_BOOTSTRAP .endif .if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=OFED -.endif -.if ${__T} != "powerpc" && ${__T} != "powerpcspe" -__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD -.else -__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" __DEFAULT_YES_OPTIONS+=LLDB Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Fri Mar 27 00:29:33 2020 (r359346) +++ head/stand/defs.mk Fri Mar 27 01:00:03 2020 (r359347) @@ -100,10 +100,6 @@ CFLAGS+= -DLOADER_DISK_SUPPORT # or powerpc64. .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -# Use ld.bfd to workaround ld.lld issues on PowerPC 32 bit -.if "${COMPILER_TYPE}" == "clang" && "${LINKER_TYPE}" == "lld" -CFLAGS+= -fuse-ld=${LD_BFD} -.endif .endif # For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Mar 27 00:29:33 2020 (r359346) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Mar 27 01:00:03 2020 (r359347) @@ -413,11 +413,8 @@ OLD_FILES+=usr/share/man/man7/ldint.7.gz OLD_FILES+=usr/share/man/man7/binutils.7.gz .endif .endif -# powerpc64 still needs ld.bfd for 32-bit binaries/libraries -.if !defined(WITH_PORT_BASE_BINUTILS) && ${TARGET_ARCH} != "powerpc64" -.if ${MK_BINUTILS} == no || ${MK_LLD_IS_LD} == yes +.if !defined(WITH_PORT_BASE_BINUTILS) OLD_FILES+=usr/bin/ld.bfd -.endif .endif .if ${MK_BLACKLIST} == no Modified: head/tools/build/options/WITHOUT_BINUTILS ============================================================================== --- head/tools/build/options/WITHOUT_BINUTILS Fri Mar 27 00:29:33 2020 (r359346) +++ head/tools/build/options/WITHOUT_BINUTILS Fri Mar 27 01:00:03 2020 (r359347) @@ -1,7 +1,6 @@ .\" $FreeBSD$ Do not build or install GNU -.Xr as 1 , -.Xr ld.bfd 1 , and +.Xr as 1 and .Xr objdump 1 as part of the normal system build. Modified: head/tools/build/options/WITH_BINUTILS ============================================================================== --- head/tools/build/options/WITH_BINUTILS Fri Mar 27 00:29:33 2020 (r359346) +++ head/tools/build/options/WITH_BINUTILS Fri Mar 27 01:00:03 2020 (r359347) @@ -2,7 +2,6 @@ Build and install GNU .Xr as 1 on i386 and amd64, -.Xr objdump 1 , and -.Xr ld.bfd 1 -on powerpc as part of the normal system build. +.Xr objdump 1 +as part of the normal system build. From owner-svn-src-head@freebsd.org Fri Mar 27 01:03:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C26F326674D; Fri, 27 Mar 2020 01:03:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pNsS4RFwz3LP8; Fri, 27 Mar 2020 01:03:56 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C53BF1858C; Fri, 27 Mar 2020 01:03:48 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02R13mHB085947; Fri, 27 Mar 2020 01:03:48 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02R13mMs085946; Fri, 27 Mar 2020 01:03:48 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202003270103.02R13mMs085946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Fri, 27 Mar 2020 01:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359348 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 359348 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 01:03:59 -0000 Author: bdragon Date: Fri Mar 27 01:03:48 2020 New Revision: 359348 URL: https://svnweb.freebsd.org/changeset/base/359348 Log: Bump for powerpc/powerpcspe switch to lld. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Mar 27 01:00:03 2020 (r359347) +++ head/sys/sys/param.h Fri Mar 27 01:03:48 2020 (r359348) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300085 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300086 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Fri Mar 27 01:30:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BB1A266FC9; Fri, 27 Mar 2020 01:30:50 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pPSP3twXz40mX; Fri, 27 Mar 2020 01:30:44 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E173C18746; Fri, 27 Mar 2020 01:12:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02R1CB5S090825; Fri, 27 Mar 2020 01:12:11 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02R1CBGE090824; Fri, 27 Mar 2020 01:12:11 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202003270112.02R1CBGE090824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Fri, 27 Mar 2020 01:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359349 - head/gnu/usr.bin/binutils/ld X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/gnu/usr.bin/binutils/ld X-SVN-Commit-Revision: 359349 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 01:30:50 -0000 Author: bdragon Date: Fri Mar 27 01:12:11 2020 New Revision: 359349 URL: https://svnweb.freebsd.org/changeset/base/359349 Log: Now that there are no remaining users of ld.bfd, remove the ld subdir. Deleted: head/gnu/usr.bin/binutils/ld/ From owner-svn-src-head@freebsd.org Fri Mar 27 10:22:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C70C270D3D; Fri, 27 Mar 2020 10:22:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pdGC3mvYz4LZ3; Fri, 27 Mar 2020 10:22:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2EE4C1F59F; Fri, 27 Mar 2020 10:22:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RAMZ7u020399; Fri, 27 Mar 2020 10:22:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RAMZxh020398; Fri, 27 Mar 2020 10:22:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003271022.02RAMZxh020398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 27 Mar 2020 10:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359355 - head/sys/dev/sound/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/usb X-SVN-Commit-Revision: 359355 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 10:22:44 -0000 Author: hselasky Date: Fri Mar 27 10:22:35 2020 New Revision: 359355 URL: https://svnweb.freebsd.org/changeset/base/359355 Log: Improve USB audio mixer support for USB audio class 1 and 2. - make sure volume controls are correctly mapped to "pcm" and "rec" depending on how they deliver audio to the USB host. - make sure there are no duplicate record selections. - remove internal only mixer class type. - don't add software volume controls for recording only. - some minor mixer code cleanup. Tested by: Horse Ma MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Fri Mar 27 09:57:27 2020 (r359354) +++ head/sys/dev/sound/usb/uaudio.c Fri Mar 27 10:22:35 2020 (r359355) @@ -196,7 +196,6 @@ struct uaudio_mixer_node { #define MAX_SELECTOR_INPUT_PIN 256 uint8_t slctrtype[MAX_SELECTOR_INPUT_PIN]; - uint8_t class; uint8_t val_default; uint8_t desc[64]; @@ -457,19 +456,6 @@ static const struct uaudio_format uaudio20_formats[] = {0, 0, 0, NULL} }; -#define UAC_OUTPUT 0 -#define UAC_INPUT 1 -#define UAC_EQUAL 2 -#define UAC_RECORD 3 -#define UAC_NCLASSES 4 - -#ifdef USB_DEBUG -static const char *uac_names[] = { - "outputs", "inputs", "equalization", "record" -}; - -#endif - /* prototypes */ static device_probe_t uaudio_probe; @@ -513,10 +499,7 @@ static void uaudio_mixer_add_extension(struct uaudio_s const struct uaudio_terminal_node *, int); static struct usb_audio_cluster uaudio_mixer_get_cluster(uint8_t, const struct uaudio_terminal_node *); -static uint16_t uaudio_mixer_determine_class(const struct uaudio_terminal_node *, - struct uaudio_mixer_node *); -static uint16_t uaudio_mixer_feature_name(const struct uaudio_terminal_node *, - struct uaudio_mixer_node *); +static uint16_t uaudio_mixer_determine_class(const struct uaudio_terminal_node *); static void uaudio_mixer_find_inputs_sub(struct uaudio_terminal_node *, const uint8_t *, uint8_t, struct uaudio_search_result *); static const void *uaudio_mixer_verify_desc(const void *, uint32_t); @@ -534,10 +517,7 @@ static void uaudio20_mixer_add_feature(struct uaudio_s const struct uaudio_terminal_node *, int); static struct usb_audio20_cluster uaudio20_mixer_get_cluster(uint8_t, const struct uaudio_terminal_node *); -static uint16_t uaudio20_mixer_determine_class(const struct uaudio_terminal_node *, - struct uaudio_mixer_node *); -static uint16_t uaudio20_mixer_feature_name(const struct uaudio_terminal_node *, - struct uaudio_mixer_node *); +static uint16_t uaudio20_mixer_determine_class(const struct uaudio_terminal_node *); static void uaudio20_mixer_find_inputs_sub(struct uaudio_terminal_node *, const uint8_t *, uint8_t, struct uaudio_search_result *); static const void *uaudio20_mixer_verify_desc(const void *, uint32_t); @@ -558,12 +538,6 @@ static void uaudio_mixer_fill_info(struct uaudio_softc struct usb_device *, void *); static int uaudio_mixer_signext(uint8_t, int); static void uaudio_mixer_init(struct uaudio_softc *); -static const struct uaudio_terminal_node *uaudio_mixer_get_input( - const struct uaudio_terminal_node *, uint8_t); -static const struct uaudio_terminal_node *uaudio_mixer_get_output( - const struct uaudio_terminal_node *, uint8_t); -static void uaudio_mixer_find_outputs_sub(struct uaudio_terminal_node *, - uint8_t, uint8_t, struct uaudio_search_result *); static uint8_t umidi_convert_to_usb(struct umidi_sub_chan *, uint8_t, uint8_t); static struct umidi_sub_chan *umidi_sub_by_fifo(struct usb_fifo *); static void umidi_start_read(struct usb_fifo *); @@ -1140,7 +1114,8 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_cla DPRINTF("hardware has swapped left and right\n"); /* uaudio_pcm_setflags(dev, SD_F_PSWAPLR); */ } - if (!(sc->sc_mix_info & SOUND_MASK_PCM)) { + if (sc->sc_play_chan.num_alt > 0 && + (sc->sc_mix_info & SOUND_MASK_PCM) == 0) { DPRINTF("emulating master volume\n"); @@ -2966,7 +2941,6 @@ uaudio_mixer_controls_create_ftu(struct uaudio_softc * memset(&MIX(sc), 0, sizeof(MIX(sc))); MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); MIX(sc).wValue[0] = MAKE_WORD(8, 0); - MIX(sc).class = UAC_OUTPUT; MIX(sc).type = MIX_UNSIGNED_16; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect"; @@ -3013,7 +2987,6 @@ uaudio_mixer_controls_create_ftu(struct uaudio_softc * memset(&MIX(sc), 0, sizeof(MIX(sc))); MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); MIX(sc).wValue[0] = MAKE_WORD(2, 0); - MIX(sc).class = UAC_OUTPUT; MIX(sc).type = MIX_SIGNED_8; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect_vol"; @@ -3030,7 +3003,6 @@ uaudio_mixer_controls_create_ftu(struct uaudio_softc * memset(&MIX(sc), 0, sizeof(MIX(sc))); MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); MIX(sc).wValue[0] = MAKE_WORD(3, 0); - MIX(sc).class = UAC_OUTPUT; MIX(sc).type = MIX_SIGNED_16; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect_dur"; @@ -3047,7 +3019,6 @@ uaudio_mixer_controls_create_ftu(struct uaudio_softc * memset(&MIX(sc), 0, sizeof(MIX(sc))); MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no); MIX(sc).wValue[0] = MAKE_WORD(4, 0); - MIX(sc).class = UAC_OUTPUT; MIX(sc).type = MIX_SIGNED_8; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect_fb"; @@ -3169,12 +3140,7 @@ uaudio_mixer_add_ctl(struct uaudio_softc *sc, struct u { int32_t res; - if (mc->class < UAC_NCLASSES) { - DPRINTF("adding %s.%d\n", - uac_names[mc->class], mc->ctl); - } else { - DPRINTF("adding %d\n", mc->ctl); - } + DPRINTF("adding %d\n", mc->ctl); if (mc->type == MIX_ON_OFF) { mc->minval = 0; @@ -3266,7 +3232,6 @@ uaudio_mixer_add_mixer(struct uaudio_softc *sc, memset(&MIX(sc), 0, sizeof(MIX(sc))); MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); - uaudio_mixer_determine_class(&iot[id], &MIX(sc)); MIX(sc).type = MIX_SIGNED_16; if (uaudio_mixer_verify_desc(d0, ((ichs * ochs) + 7) / 8) == NULL) @@ -3345,7 +3310,6 @@ uaudio20_mixer_add_mixer(struct uaudio_softc *sc, memset(&MIX(sc), 0, sizeof(MIX(sc))); MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); - uaudio20_mixer_determine_class(&iot[id], &MIX(sc)); MIX(sc).type = MIX_SIGNED_16; if (uaudio20_mixer_verify_desc(d0, ((ichs * ochs) + 7) / 8) == NULL) @@ -3385,6 +3349,58 @@ uaudio20_mixer_add_mixer(struct uaudio_softc *sc, } static void +uaudio_mixer_check_selectors(struct uaudio_softc *sc) +{ + uint8_t reserve_feature[] = { + SOUND_MIXER_LINE, + SOUND_MIXER_LINE1, + SOUND_MIXER_LINE2, + SOUND_MIXER_LINE3, + SOUND_MIXER_DIGITAL1, + SOUND_MIXER_DIGITAL2, + SOUND_MIXER_DIGITAL3, + }; + const uint16_t reserve_max = + sizeof(reserve_feature) / sizeof(reserve_feature[0]); + uint16_t i; + uint16_t j; + uint16_t k; + + /* remove existing selector types from the reserve */ + for (i = 0; i < MIX(sc).maxval; i++) { + if (MIX(sc).slctrtype[i] == SOUND_MIXER_NRDEVICES) + continue; + for (j = 0; j != reserve_max; j++) { + if (reserve_feature[j] == MIX(sc).slctrtype[i]) + reserve_feature[j] = SOUND_MIXER_NRDEVICES; + } + } + + /* make sure selector types are not overlapping */ + for (i = 0; i < MIX(sc).maxval; i++) { + if (MIX(sc).slctrtype[i] == SOUND_MIXER_NRDEVICES) + continue; + for (j = i + 1; j < MIX(sc).maxval; j++) { + if (MIX(sc).slctrtype[j] == SOUND_MIXER_NRDEVICES) + continue; + if (MIX(sc).slctrtype[i] != MIX(sc).slctrtype[j]) + continue; + for (k = 0; k != reserve_max; k++) { + if (reserve_feature[k] == SOUND_MIXER_NRDEVICES) + continue; + MIX(sc).slctrtype[j] = reserve_feature[k]; + reserve_feature[k] = SOUND_MIXER_NRDEVICES; + break; + } + if (k == reserve_max) { + DPRINTF("Selector type %d is not selectable!\n", j); + MIX(sc).slctrtype[j] = SOUND_MIXER_NRDEVICES; + } + } + } +} + +static void uaudio_mixer_add_selector(struct uaudio_softc *sc, const struct uaudio_terminal_node *iot, int id) { @@ -3401,7 +3417,6 @@ uaudio_mixer_add_selector(struct uaudio_softc *sc, MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); MIX(sc).wValue[0] = MAKE_WORD(0, 0); - uaudio_mixer_determine_class(&iot[id], &MIX(sc)); MIX(sc).nchan = 1; MIX(sc).type = MIX_SELECTOR; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; @@ -3416,21 +3431,19 @@ uaudio_mixer_add_selector(struct uaudio_softc *sc, MIX(sc).desc[0] = 0; } - if (MIX(sc).maxval > MAX_SELECTOR_INPUT_PIN) { + if (MIX(sc).maxval > MAX_SELECTOR_INPUT_PIN) MIX(sc).maxval = MAX_SELECTOR_INPUT_PIN; - } - MIX(sc).mul = (MIX(sc).maxval - MIX(sc).minval); - for (i = 0; i < MAX_SELECTOR_INPUT_PIN; i++) { - MIX(sc).slctrtype[i] = SOUND_MIXER_NRDEVICES; - } + MIX(sc).mul = MIX(sc).maxval - MIX(sc).minval; + for (i = 0; i < MIX(sc).maxval; i++) { - MIX(sc).slctrtype[i] = uaudio_mixer_feature_name( - &iot[d->baSourceId[i]], &MIX(sc)); + MIX(sc).slctrtype[i] = + uaudio_mixer_determine_class(&iot[d->baSourceId[i]]); } + for (; i < MAX_SELECTOR_INPUT_PIN; i++) + MIX(sc).slctrtype[i] = SOUND_MIXER_NRDEVICES; - MIX(sc).class = 0; /* not used */ - + uaudio_mixer_check_selectors(sc); uaudio_mixer_add_ctl(sc, &MIX(sc)); } @@ -3451,7 +3464,6 @@ uaudio20_mixer_add_selector(struct uaudio_softc *sc, MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); MIX(sc).wValue[0] = MAKE_WORD(0, 0); - uaudio20_mixer_determine_class(&iot[id], &MIX(sc)); MIX(sc).nchan = 1; MIX(sc).type = MIX_SELECTOR; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; @@ -3469,17 +3481,16 @@ uaudio20_mixer_add_selector(struct uaudio_softc *sc, if (MIX(sc).maxval > MAX_SELECTOR_INPUT_PIN) MIX(sc).maxval = MAX_SELECTOR_INPUT_PIN; - MIX(sc).mul = (MIX(sc).maxval - MIX(sc).minval); - for (i = 0; i < MAX_SELECTOR_INPUT_PIN; i++) - MIX(sc).slctrtype[i] = SOUND_MIXER_NRDEVICES; + MIX(sc).mul = MIX(sc).maxval - MIX(sc).minval; for (i = 0; i < MIX(sc).maxval; i++) { - MIX(sc).slctrtype[i] = uaudio20_mixer_feature_name( - &iot[d->baSourceId[i]], &MIX(sc)); + MIX(sc).slctrtype[i] = + uaudio20_mixer_determine_class(&iot[d->baSourceId[i]]); } + for (; i < MAX_SELECTOR_INPUT_PIN; i++) + MIX(sc).slctrtype[i] = SOUND_MIXER_NRDEVICES; - MIX(sc).class = 0; /* not used */ - + uaudio_mixer_check_selectors(sc); uaudio_mixer_add_ctl(sc, &MIX(sc)); } @@ -3540,9 +3551,9 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc, cmask |= uaudio_mixer_feature_get_bmaControls(d, chan); } - if (nchan > MIX_MAX_CHAN) { + if (nchan > MIX_MAX_CHAN) nchan = MIX_MAX_CHAN; - } + MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); i = d->bmaControls[d->bControlSize]; @@ -3574,7 +3585,7 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc, continue; } - mixernumber = uaudio_mixer_feature_name(&iot[id], &MIX(sc)); + mixernumber = uaudio_mixer_determine_class(&iot[id]); switch (ctl) { case MUTE_CONTROL: @@ -3689,7 +3700,7 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc, for (ctl = 3; ctl != 0; ctl <<= 2) { - mixernumber = uaudio20_mixer_feature_name(&iot[id], &MIX(sc)); + mixernumber = uaudio20_mixer_determine_class(&iot[id]); switch (ctl) { case (3 << 0): @@ -3812,7 +3823,6 @@ uaudio_mixer_add_processing_updown(struct uaudio_softc MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); MIX(sc).nchan = 1; MIX(sc).wValue[0] = MAKE_WORD(UD_MODE_SELECT_CONTROL, 0); - uaudio_mixer_determine_class(&iot[id], &MIX(sc)); MIX(sc).type = MIX_ON_OFF; /* XXX */ for (i = 0; i < ud->bNrModes; i++) { @@ -3846,7 +3856,6 @@ uaudio_mixer_add_processing(struct uaudio_softc *sc, MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); MIX(sc).nchan = 1; MIX(sc).wValue[0] = MAKE_WORD(XX_ENABLE_CONTROL, 0); - uaudio_mixer_determine_class(&iot[id], &MIX(sc)); MIX(sc).type = MIX_ON_OFF; uaudio_mixer_add_ctl(sc, &MIX(sc)); } @@ -3891,7 +3900,6 @@ uaudio_mixer_add_extension(struct uaudio_softc *sc, MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no); MIX(sc).nchan = 1; MIX(sc).wValue[0] = MAKE_WORD(UA_EXT_ENABLE, 0); - uaudio_mixer_determine_class(&iot[id], &MIX(sc)); MIX(sc).type = MIX_ON_OFF; uaudio_mixer_add_ctl(sc, &MIX(sc)); @@ -4321,114 +4329,42 @@ done: return (r); } -static uint16_t -uaudio_mixer_determine_class(const struct uaudio_terminal_node *iot, - struct uaudio_mixer_node *mix) +static bool +uaudio_mixer_foreach_input(const struct uaudio_terminal_node *iot, uint8_t *pindex) { - uint16_t terminal_type = 0x0000; - const struct uaudio_terminal_node *input[2]; - const struct uaudio_terminal_node *output[2]; + uint8_t n; - input[0] = uaudio_mixer_get_input(iot, 0); - input[1] = uaudio_mixer_get_input(iot, 1); + n = *pindex; - output[0] = uaudio_mixer_get_output(iot, 0); - output[1] = uaudio_mixer_get_output(iot, 1); - - /* - * check if there is only - * one output terminal: - */ - if (output[0] && (!output[1])) { - terminal_type = - UGETW(output[0]->u.ot_v1->wTerminalType); + while (1) { + if (!n--) + n = iot->usr.id_max; + if (n == 0) + return (false); + if (iot->usr.bit_input[n / 8] & (1 << (n % 8))) + break; } - /* - * If the only output terminal is USB, - * the class is UAC_RECORD. - */ - if ((terminal_type & 0xff00) == (UAT_UNDEFINED & 0xff00)) { - - mix->class = UAC_RECORD; - if (input[0] && (!input[1])) { - terminal_type = - UGETW(input[0]->u.it_v1->wTerminalType); - } else { - terminal_type = 0; - } - goto done; - } - /* - * if the unit is connected to just - * one input terminal, the - * class is UAC_INPUT: - */ - if (input[0] && (!input[1])) { - mix->class = UAC_INPUT; - terminal_type = - UGETW(input[0]->u.it_v1->wTerminalType); - goto done; - } - /* - * Otherwise, the class is UAC_OUTPUT. - */ - mix->class = UAC_OUTPUT; -done: - return (terminal_type); + *pindex = n; + return (true); } -static uint16_t -uaudio20_mixer_determine_class(const struct uaudio_terminal_node *iot, - struct uaudio_mixer_node *mix) +static bool +uaudio_mixer_foreach_output(const struct uaudio_terminal_node *iot, uint8_t *pindex) { - uint16_t terminal_type = 0x0000; - const struct uaudio_terminal_node *input[2]; - const struct uaudio_terminal_node *output[2]; + uint8_t n; - input[0] = uaudio_mixer_get_input(iot, 0); - input[1] = uaudio_mixer_get_input(iot, 1); + n = *pindex; - output[0] = uaudio_mixer_get_output(iot, 0); - output[1] = uaudio_mixer_get_output(iot, 1); - - /* - * check if there is only - * one output terminal: - */ - if (output[0] && (!output[1])) - terminal_type = UGETW(output[0]->u.ot_v2->wTerminalType); - /* - * If the only output terminal is USB, - * the class is UAC_RECORD. - */ - if ((terminal_type & 0xff00) == (UAT_UNDEFINED & 0xff00)) { - - mix->class = UAC_RECORD; - if (input[0] && (!input[1])) { - terminal_type = - UGETW(input[0]->u.it_v2->wTerminalType); - } else { - terminal_type = 0; - } - goto done; + while (1) { + if (!n--) + n = iot->usr.id_max; + if (n == 0) + return (false); + if (iot->usr.bit_output[n / 8] & (1 << (n % 8))) + break; } - /* - * if the unit is connected to just - * one input terminal, the - * class is UAC_INPUT: - */ - if (input[0] && (!input[1])) { - mix->class = UAC_INPUT; - terminal_type = - UGETW(input[0]->u.it_v2->wTerminalType); - goto done; - } - /* - * Otherwise, the class is UAC_OUTPUT. - */ - mix->class = UAC_OUTPUT; -done: - return (terminal_type); + *pindex = n; + return (true); } struct uaudio_tt_to_feature { @@ -4438,8 +4374,6 @@ struct uaudio_tt_to_feature { static const struct uaudio_tt_to_feature uaudio_tt_to_feature[] = { - {UAT_STREAM, SOUND_MIXER_PCM}, - {UATI_MICROPHONE, SOUND_MIXER_MIC}, {UATI_DESKMICROPHONE, SOUND_MIXER_MIC}, {UATI_PERSONALMICROPHONE, SOUND_MIXER_MIC}, @@ -4447,11 +4381,6 @@ static const struct uaudio_tt_to_feature uaudio_tt_to_ {UATI_MICROPHONEARRAY, SOUND_MIXER_MIC}, {UATI_PROCMICROPHONEARR, SOUND_MIXER_MIC}, - {UATO_SPEAKER, SOUND_MIXER_SPEAKER}, - {UATO_DESKTOPSPEAKER, SOUND_MIXER_SPEAKER}, - {UATO_ROOMSPEAKER, SOUND_MIXER_SPEAKER}, - {UATO_COMMSPEAKER, SOUND_MIXER_SPEAKER}, - {UATE_ANALOGCONN, SOUND_MIXER_LINE}, {UATE_LINECONN, SOUND_MIXER_LINE}, {UATE_LEGACYCONN, SOUND_MIXER_LINE}, @@ -4469,63 +4398,21 @@ static const struct uaudio_tt_to_feature uaudio_tt_to_ {UATF_DVDAUDIO, SOUND_MIXER_VIDEO}, {UATF_TVTUNERAUDIO, SOUND_MIXER_VIDEO}, - /* telephony terminal types */ - {UATT_UNDEFINED, SOUND_MIXER_PHONEIN}, /* SOUND_MIXER_PHONEOUT */ - {UATT_PHONELINE, SOUND_MIXER_PHONEIN}, /* SOUND_MIXER_PHONEOUT */ - {UATT_TELEPHONE, SOUND_MIXER_PHONEIN}, /* SOUND_MIXER_PHONEOUT */ - {UATT_DOWNLINEPHONE, SOUND_MIXER_PHONEIN}, /* SOUND_MIXER_PHONEOUT */ - {UATF_RADIORECV, SOUND_MIXER_RADIO}, {UATF_RADIOXMIT, SOUND_MIXER_RADIO}, - {UAT_UNDEFINED, SOUND_MIXER_VOLUME}, - {UAT_VENDOR, SOUND_MIXER_VOLUME}, - {UATI_UNDEFINED, SOUND_MIXER_VOLUME}, - - /* output terminal types */ - {UATO_UNDEFINED, SOUND_MIXER_VOLUME}, - {UATO_DISPLAYAUDIO, SOUND_MIXER_VOLUME}, - {UATO_SUBWOOFER, SOUND_MIXER_VOLUME}, - {UATO_HEADPHONES, SOUND_MIXER_VOLUME}, - - /* bidir terminal types */ - {UATB_UNDEFINED, SOUND_MIXER_VOLUME}, - {UATB_HANDSET, SOUND_MIXER_VOLUME}, - {UATB_HEADSET, SOUND_MIXER_VOLUME}, - {UATB_SPEAKERPHONE, SOUND_MIXER_VOLUME}, - {UATB_SPEAKERPHONEESUP, SOUND_MIXER_VOLUME}, - {UATB_SPEAKERPHONEECANC, SOUND_MIXER_VOLUME}, - - /* external terminal types */ - {UATE_UNDEFINED, SOUND_MIXER_VOLUME}, - - /* embedded function terminal types */ - {UATF_UNDEFINED, SOUND_MIXER_VOLUME}, - {UATF_CALIBNOISE, SOUND_MIXER_VOLUME}, - {UATF_EQUNOISE, SOUND_MIXER_VOLUME}, - {UATF_DAT, SOUND_MIXER_VOLUME}, - {UATF_DCC, SOUND_MIXER_VOLUME}, - {UATF_MINIDISK, SOUND_MIXER_VOLUME}, - {UATF_ANALOGTAPE, SOUND_MIXER_VOLUME}, - {UATF_PHONOGRAPH, SOUND_MIXER_VOLUME}, - {UATF_VCRAUDIO, SOUND_MIXER_VOLUME}, - {UATF_SATELLITE, SOUND_MIXER_VOLUME}, - {UATF_CABLETUNER, SOUND_MIXER_VOLUME}, - {UATF_DSS, SOUND_MIXER_VOLUME}, - {UATF_MULTITRACK, SOUND_MIXER_VOLUME}, - {0xffff, SOUND_MIXER_VOLUME}, - - /* end */ - {} + {} /* END */ }; static uint16_t -uaudio_mixer_feature_name_sub(uint16_t terminal_type) +uaudio_mixer_get_feature_by_tt(uint16_t terminal_type, uint16_t default_type) { const struct uaudio_tt_to_feature *uat = uaudio_tt_to_feature; uint16_t retval; - while (1) { + if (terminal_type == 0) { + retval = default_type; + } else while (1) { if (uat->terminal_type == 0) { switch (terminal_type >> 8) { case UATI_UNDEFINED >> 8: @@ -4534,8 +4421,11 @@ uaudio_mixer_feature_name_sub(uint16_t terminal_type) case UATO_UNDEFINED >> 8: retval = SOUND_MIXER_PCM; goto done; + case UATT_UNDEFINED >> 8: + retval = SOUND_MIXER_PHONEIN; + goto done; default: - retval = SOUND_MIXER_VOLUME; + retval = default_type; goto done; } } else if (uat->terminal_type == terminal_type) { @@ -4545,65 +4435,138 @@ uaudio_mixer_feature_name_sub(uint16_t terminal_type) uat++; } done: - DPRINTF("terminal_type=0x%04x -> %d\n", - terminal_type, retval); + DPRINTF("terminal_type=0x%04x RET=%d DEF=%d\n", + terminal_type, retval, default_type); return (retval); } static uint16_t -uaudio_mixer_feature_name(const struct uaudio_terminal_node *iot, - struct uaudio_mixer_node *mix) +uaudio_mixer_determine_class(const struct uaudio_terminal_node *iot) { - uint16_t terminal_type = uaudio_mixer_determine_class(iot, mix); + const struct uaudio_terminal_node *ptr; + uint16_t terminal_type_input = 0; + uint16_t terminal_type_output = 0; + uint16_t temp; + uint8_t match = 0; + uint8_t i; - if (mix->class == UAC_RECORD && terminal_type == 0) + for (i = 0; uaudio_mixer_foreach_input(iot, &i); ) { + ptr = iot->root + i; + temp = UGETW(ptr->u.it_v1->wTerminalType); + + if (temp == 0) + continue; + else if (temp == UAT_STREAM) + match |= 1; + else if ((temp & 0xFF00) != (UAT_UNDEFINED & 0xff00)) + terminal_type_input = temp; + } + + for (i = 0; uaudio_mixer_foreach_output(iot, &i); ) { + ptr = iot->root + i; + temp = UGETW(ptr->u.ot_v1->wTerminalType); + + if (temp == 0) + continue; + else if (temp == UAT_STREAM) + match |= 2; + else if ((temp & 0xFF00) != (UAT_UNDEFINED & 0xff00)) + terminal_type_output = temp; + } + + DPRINTF("MATCH=%d IN=0x%04x OUT=0x%04x\n", + match, terminal_type_input, terminal_type_output); + + switch (match) { + case 0: /* not connected to USB */ + if (terminal_type_output != 0) { + return (uaudio_mixer_get_feature_by_tt( + terminal_type_output, SOUND_MIXER_MONITOR)); + } else { + return (uaudio_mixer_get_feature_by_tt( + terminal_type_input, SOUND_MIXER_MONITOR)); + } + case 3: /* connected to both USB input and USB output */ return (SOUND_MIXER_IMIX); - return (uaudio_mixer_feature_name_sub(terminal_type)); + case 2: /* connected to USB output */ + return (uaudio_mixer_get_feature_by_tt( + terminal_type_input, SOUND_MIXER_RECLEV)); + case 1: /* connected to USB input */ + return (uaudio_mixer_get_feature_by_tt( + terminal_type_output, SOUND_MIXER_PCM)); + default: + return (SOUND_MIXER_NRDEVICES); + } } static uint16_t -uaudio20_mixer_feature_name(const struct uaudio_terminal_node *iot, - struct uaudio_mixer_node *mix) +uaudio20_mixer_determine_class(const struct uaudio_terminal_node *iot) { - uint16_t terminal_type = uaudio20_mixer_determine_class(iot, mix); + const struct uaudio_terminal_node *ptr; + uint16_t terminal_type_input = 0; + uint16_t terminal_type_output = 0; + uint16_t temp; + uint8_t match = 0; + uint8_t i; - if (mix->class == UAC_RECORD && terminal_type == 0) - return (SOUND_MIXER_IMIX); - return (uaudio_mixer_feature_name_sub(terminal_type)); -} + for (i = 0; uaudio_mixer_foreach_input(iot, &i); ) { + ptr = iot->root + i; + temp = UGETW(ptr->u.it_v2->wTerminalType); -static const struct uaudio_terminal_node * -uaudio_mixer_get_input(const struct uaudio_terminal_node *iot, uint8_t i) -{ - struct uaudio_terminal_node *root = iot->root; - uint8_t n; + if (temp == 0) + continue; + else if (temp == UAT_STREAM) + match |= 1; + else if ((temp & 0xFF00) != (UAT_UNDEFINED & 0xff00)) + terminal_type_input = temp; + } - n = iot->usr.id_max; - do { - if (iot->usr.bit_input[n / 8] & (1 << (n % 8))) { - if (!i--) - return (root + n); - } - } while (n--); + for (i = 0; uaudio_mixer_foreach_output(iot, &i); ) { + ptr = iot->root + i; + temp = UGETW(ptr->u.ot_v2->wTerminalType); - return (NULL); -} + if (temp == 0) + continue; + else if (temp == UAT_STREAM) + match |= 2; + else if ((temp & 0xFF00) != (UAT_UNDEFINED & 0xff00)) + terminal_type_output = temp; + } -static const struct uaudio_terminal_node * -uaudio_mixer_get_output(const struct uaudio_terminal_node *iot, uint8_t i) -{ - struct uaudio_terminal_node *root = iot->root; - uint8_t n; + DPRINTF("MATCH=%d IN=0x%04x OUT=0x%04x\n", + match, terminal_type_input, terminal_type_output); - n = iot->usr.id_max; - do { - if (iot->usr.bit_output[n / 8] & (1 << (n % 8))) { - if (!i--) - return (root + n); + switch (match) { + case 0: /* not connected to USB */ + if (terminal_type_output != 0) { + return (uaudio_mixer_get_feature_by_tt( + terminal_type_output, SOUND_MIXER_MONITOR)); + } else { + return (uaudio_mixer_get_feature_by_tt( + terminal_type_input, SOUND_MIXER_MONITOR)); } - } while (n--); + case 3: /* connected to both USB input and USB output */ + return (SOUND_MIXER_IMIX); + case 2: /* connected to USB output */ + return (uaudio_mixer_get_feature_by_tt( + terminal_type_input, SOUND_MIXER_RECLEV)); + case 1: /* connected to USB input */ + return (uaudio_mixer_get_feature_by_tt( + terminal_type_output, SOUND_MIXER_PCM)); + default: + return (SOUND_MIXER_NRDEVICES); + } +} - return (NULL); +static void +uaudio_mixer_merge_outputs(struct uaudio_search_result *dst, + const struct uaudio_search_result *src) +{ + const uint8_t max = sizeof(src->bit_output) / sizeof(src->bit_output[0]); + uint8_t x; + + for (x = 0; x != max; x++) + dst->bit_output[x] |= src->bit_output[x]; } static void @@ -4614,9 +4577,7 @@ uaudio_mixer_find_inputs_sub(struct uaudio_terminal_no struct uaudio_terminal_node *iot; uint8_t n; uint8_t i; - uint8_t is_last; -top: for (n = 0; n < n_id; n++) { i = p_id[n]; @@ -4633,72 +4594,48 @@ top: if (iot->u.desc == NULL) continue; - is_last = ((n + 1) == n_id); - switch (iot->u.desc->bDescriptorSubtype) { case UDESCSUB_AC_INPUT: + uaudio_mixer_merge_outputs(&iot->usr, info); info->bit_input[i / 8] |= (1 << (i % 8)); break; case UDESCSUB_AC_FEATURE: - if (is_last) { - p_id = &iot->u.fu_v1->bSourceId; - n_id = 1; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio_mixer_find_inputs_sub( root, &iot->u.fu_v1->bSourceId, 1, info); break; case UDESCSUB_AC_OUTPUT: - if (is_last) { - p_id = &iot->u.ot_v1->bSourceId; - n_id = 1; - goto top; - } + info->bit_output[i / 8] |= (1 << (i % 8)); uaudio_mixer_find_inputs_sub( root, &iot->u.ot_v1->bSourceId, 1, info); + info->bit_output[i / 8] &= ~(1 << (i % 8)); break; case UDESCSUB_AC_MIXER: - if (is_last) { - p_id = iot->u.mu_v1->baSourceId; - n_id = iot->u.mu_v1->bNrInPins; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio_mixer_find_inputs_sub( root, iot->u.mu_v1->baSourceId, iot->u.mu_v1->bNrInPins, info); break; case UDESCSUB_AC_SELECTOR: - if (is_last) { - p_id = iot->u.su_v1->baSourceId; - n_id = iot->u.su_v1->bNrInPins; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio_mixer_find_inputs_sub( root, iot->u.su_v1->baSourceId, iot->u.su_v1->bNrInPins, info); break; case UDESCSUB_AC_PROCESSING: - if (is_last) { - p_id = iot->u.pu_v1->baSourceId; - n_id = iot->u.pu_v1->bNrInPins; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio_mixer_find_inputs_sub( root, iot->u.pu_v1->baSourceId, iot->u.pu_v1->bNrInPins, info); break; case UDESCSUB_AC_EXTENSION: - if (is_last) { - p_id = iot->u.eu_v1->baSourceId; - n_id = iot->u.eu_v1->bNrInPins; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio_mixer_find_inputs_sub( root, iot->u.eu_v1->baSourceId, iot->u.eu_v1->bNrInPins, info); @@ -4718,9 +4655,7 @@ uaudio20_mixer_find_inputs_sub(struct uaudio_terminal_ struct uaudio_terminal_node *iot; uint8_t n; uint8_t i; - uint8_t is_last; -top: for (n = 0; n < n_id; n++) { i = p_id[n]; @@ -4737,94 +4672,62 @@ top: if (iot->u.desc == NULL) continue; - is_last = ((n + 1) == n_id); - switch (iot->u.desc->bDescriptorSubtype) { case UDESCSUB_AC_INPUT: + uaudio_mixer_merge_outputs(&iot->usr, info); info->bit_input[i / 8] |= (1 << (i % 8)); break; case UDESCSUB_AC_OUTPUT: - if (is_last) { - p_id = &iot->u.ot_v2->bSourceId; - n_id = 1; - goto top; - } + info->bit_output[i / 8] |= (1 << (i % 8)); uaudio20_mixer_find_inputs_sub( root, &iot->u.ot_v2->bSourceId, 1, info); + info->bit_output[i / 8] &= ~(1 << (i % 8)); break; case UDESCSUB_AC_MIXER: - if (is_last) { - p_id = iot->u.mu_v2->baSourceId; - n_id = iot->u.mu_v2->bNrInPins; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio20_mixer_find_inputs_sub( root, iot->u.mu_v2->baSourceId, iot->u.mu_v2->bNrInPins, info); break; case UDESCSUB_AC_SELECTOR: - if (is_last) { - p_id = iot->u.su_v2->baSourceId; - n_id = iot->u.su_v2->bNrInPins; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio20_mixer_find_inputs_sub( root, iot->u.su_v2->baSourceId, iot->u.su_v2->bNrInPins, info); break; case UDESCSUB_AC_SAMPLE_RT: - if (is_last) { - p_id = &iot->u.ru_v2->bSourceId; - n_id = 1; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio20_mixer_find_inputs_sub( root, &iot->u.ru_v2->bSourceId, 1, info); break; case UDESCSUB_AC_EFFECT: - if (is_last) { - p_id = &iot->u.ef_v2->bSourceId; - n_id = 1; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio20_mixer_find_inputs_sub( root, &iot->u.ef_v2->bSourceId, 1, info); break; case UDESCSUB_AC_FEATURE: - if (is_last) { - p_id = &iot->u.fu_v2->bSourceId; - n_id = 1; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio20_mixer_find_inputs_sub( root, &iot->u.fu_v2->bSourceId, 1, info); break; case UDESCSUB_AC_PROCESSING_V2: - if (is_last) { - p_id = iot->u.pu_v2->baSourceId; - n_id = iot->u.pu_v2->bNrInPins; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio20_mixer_find_inputs_sub( root, iot->u.pu_v2->baSourceId, iot->u.pu_v2->bNrInPins, info); break; case UDESCSUB_AC_EXTENSION_V2: - if (is_last) { - p_id = iot->u.eu_v2->baSourceId; - n_id = iot->u.eu_v2->bNrInPins; - goto top; - } + uaudio_mixer_merge_outputs(&iot->usr, info); uaudio20_mixer_find_inputs_sub( root, iot->u.eu_v2->baSourceId, iot->u.eu_v2->bNrInPins, info); @@ -4933,31 +4836,6 @@ top: } static void -uaudio_mixer_find_outputs_sub(struct uaudio_terminal_node *root, uint8_t id, - uint8_t n_id, struct uaudio_search_result *info) -{ - struct uaudio_terminal_node *iot = (root + id); - uint8_t j; - - j = n_id; - do { - if ((j != id) && ((root + j)->u.desc) && - ((root + j)->u.desc->bDescriptorSubtype == UDESCSUB_AC_OUTPUT)) { - - /* - * "j" (output) <--- virtual wire <--- "id" (input) - * - * if "j" has "id" on the input, then "id" have "j" on - * the output, because they are connected: - */ - if ((root + j)->usr.bit_input[id / 8] & (1 << (id % 8))) { - iot->usr.bit_output[j / 8] |= (1 << (j % 8)); - } - } - } while (j--); -} - -static void uaudio_mixer_fill_info(struct uaudio_softc *sc, struct usb_device *udev, void *desc) { @@ -5049,16 +4927,6 @@ uaudio_mixer_fill_info(struct uaudio_softc *sc, } } while (i--); - /* - * determine outputs for - * all nodes in the tree: - */ - i = ID_max; - do { - uaudio_mixer_find_outputs_sub(iot, - i, ID_max, &((iot + i)->usr)); - } while (i--); - /* set "id_max" and "root" */ i = ID_max; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Mar 27 10:28:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A7D4270F0E; Fri, 27 Mar 2020 10:28:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pdNj5DzJz4NL1; Fri, 27 Mar 2020 10:28:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1B661F5AF; Fri, 27 Mar 2020 10:28:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RASFw6020692; Fri, 27 Mar 2020 10:28:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RASFKL020691; Fri, 27 Mar 2020 10:28:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003271028.02RASFKL020691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 27 Mar 2020 10:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359356 - head/sys/dev/sound/pcm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/pcm X-SVN-Commit-Revision: 359356 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 10:28:24 -0000 Author: hselasky Date: Fri Mar 27 10:28:15 2020 New Revision: 359356 URL: https://svnweb.freebsd.org/changeset/base/359356 Log: Change default microphone level from 0 to 25. Discussed with: Horse Ma MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/pcm/mixer.c Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Fri Mar 27 10:22:35 2020 (r359355) +++ head/sys/dev/sound/pcm/mixer.c Fri Mar 27 10:28:15 2020 (r359356) @@ -83,7 +83,7 @@ static u_int16_t snd_mixerdefaults[SOUND_MIXER_NRDEVIC [SOUND_MIXER_PCM] = 75, [SOUND_MIXER_SPEAKER] = 75, [SOUND_MIXER_LINE] = 75, - [SOUND_MIXER_MIC] = 0, + [SOUND_MIXER_MIC] = 25, [SOUND_MIXER_CD] = 75, [SOUND_MIXER_IGAIN] = 0, [SOUND_MIXER_LINE1] = 75, From owner-svn-src-head@freebsd.org Fri Mar 27 11:08:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B5AC271C5C; Fri, 27 Mar 2020 11:08:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pfGr1wxDz4cvn; Fri, 27 Mar 2020 11:08:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50A3B1FD90; Fri, 27 Mar 2020 11:08:12 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RB8B9n044602; Fri, 27 Mar 2020 11:08:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RB8Bbh044601; Fri, 27 Mar 2020 11:08:11 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003271108.02RB8Bbh044601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 27 Mar 2020 11:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359357 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359357 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 11:08:21 -0000 Author: tuexen Date: Fri Mar 27 11:08:11 2020 New Revision: 359357 URL: https://svnweb.freebsd.org/changeset/base/359357 Log: Use uint32_t where it is expected to be used. No functional change. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_structs.h Modified: head/sys/netinet/sctp_pcb.h ============================================================================== --- head/sys/netinet/sctp_pcb.h Fri Mar 27 10:28:15 2020 (r359356) +++ head/sys/netinet/sctp_pcb.h Fri Mar 27 11:08:11 2020 (r359357) @@ -320,7 +320,7 @@ struct sctp_pcb { uint32_t def_cookie_life; /* defaults to 0 */ - int auto_close_time; + uint32_t auto_close_time; uint32_t initial_sequence_debug; uint32_t adaptation_layer_indicator; uint8_t adaptation_layer_indicator_provided; Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Fri Mar 27 10:28:15 2020 (r359356) +++ head/sys/netinet/sctp_structs.h Fri Mar 27 11:08:11 2020 (r359357) @@ -275,7 +275,7 @@ struct sctp_nets { int lastsa; int lastsv; uint64_t rtt; /* last measured rtt value in us */ - unsigned int RTO; + uint32_t RTO; /* This is used for SHUTDOWN/SHUTDOWN-ACK/SEND or INIT timers */ struct sctp_timer rxt_timer; @@ -1071,7 +1071,7 @@ struct sctp_association { unsigned int max_inbound_streams; /* the cookie life I award for any cookie, in seconds */ - unsigned int cookie_life; + uint32_t cookie_life; /* time to delay acks for */ unsigned int delayed_ack; unsigned int old_delayed_ack; @@ -1080,10 +1080,10 @@ struct sctp_association { unsigned int numduptsns; int dup_tsns[SCTP_MAX_DUP_TSNS]; - unsigned int initial_init_rto_max; /* initial RTO for INIT's */ - unsigned int initial_rto; /* initial send RTO */ - unsigned int minrto; /* per assoc RTO-MIN */ - unsigned int maxrto; /* per assoc RTO-MAX */ + uint32_t initial_init_rto_max; /* initial RTO for INIT's */ + uint32_t initial_rto; /* initial send RTO */ + uint32_t minrto; /* per assoc RTO-MIN */ + uint32_t maxrto; /* per assoc RTO-MAX */ /* authentication fields */ sctp_auth_chklist_t *local_auth_chunks; From owner-svn-src-head@freebsd.org Fri Mar 27 14:40:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01F8F277970; Fri, 27 Mar 2020 14:40:07 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48pkyz3Cvwz40j4; Fri, 27 Mar 2020 14:39:54 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: by mail-lj1-x242.google.com with SMTP id r7so2797523ljg.13; Fri, 27 Mar 2020 07:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=rB6E1o7F6AUeM9qfsRwlVXFtMmzW2KKPbQymI3firik=; b=HBKtYQtsYvby/uBYwqa22C6gnXe6dm2nN7bQllgTRVVWx89n6WSLJf3uFmLNVTM7/u uRnUgmjTsg4YXND2f4I38JPbwI2cJuiUcYFpaQs43hwGxoXwTSLCMmQ2RgDP0UNM6hvp K96EGqLTE1CmIIlYWxstvtJukZF0klc7KPSQgvx8IHP6WfGsvxVS5x77+1i2PSx3cxKu oOMwpyeaB11d76uNvLEBRiJ2vNFiyTwrnf0wvdmFhCQC8e44BZAtqN/4Ct+x5wduMvPT nJNuqL6KsUWdZuzdgLU2Sj93aVHmEcgryaDZriIhf/jR9weMNqhr/nDHHsRhMZQuURSS 1WGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rB6E1o7F6AUeM9qfsRwlVXFtMmzW2KKPbQymI3firik=; b=JY92Hq/IUG/wMmF06RLrEZr3R5ce1aiqlll6O28hQLaSvHpGn/xQasg1rMe7rbf1Mi uvBFlJXKLMQmFi3XGBWXSay2z8vIBJiJteLfg0R+xs+sLxtYxt/44K7kiOj0Q58cJwYt NMSAT8RxDDp4gGsKByXFBjEjwTwc0BiVvR2YSezfEQN6koLGE3uFbYgY6K46zX6P44rJ iVFKlM81GrjlSuaasLcb9gmOdkVM2p1wPwZeyJdfOuYdAwTRv3EnhfBtwrg7Q3RfELEz 5A9fOeBLEY7zfN3+ZNP6eX1SdJ3mZDb7yeGLBxHnpxgS9BNDzeAmZnNOJP+5H3RJoXLG 1aww== X-Gm-Message-State: AGi0PuYskuqveHe38c3Gzpp42WR8X9Bvwqeo4GqHpZe8il96xbOlH54V a/77AwB9cIKtXo+8/bubi9CQeTuEC1A= X-Google-Smtp-Source: ADFU+vtrJtKf3oAHtdx4xAjfg51Z9EH9flCvwhdzaW2lrMeVroAnaBp5sblBfSrcIBmtN8HuE8rjpA== X-Received: by 2002:a2e:95c3:: with SMTP id y3mr8656973ljh.149.1585319984484; Fri, 27 Mar 2020 07:39:44 -0700 (PDT) Received: from [192.168.1.3] ([46.48.69.183]) by smtp.gmail.com with ESMTPSA id 133sm2812377ljj.91.2020.03.27.07.39.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Mar 2020 07:39:43 -0700 (PDT) From: Ruslan Garipov Subject: Re: svn commit: r358989 - in head/stand/efi: libefi loader loader/arch/arm loader/arch/arm64 To: Toomas Soome , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003140636.02E6a3NS020671@repo.freebsd.org> Message-ID: <95805806-b577-d81a-c709-7244d3fea4eb@gmail.com> Date: Fri, 27 Mar 2020 19:39:40 +0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003140636.02E6a3NS020671@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48pkyz3Cvwz40j4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=HBKtYQts; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ruslanngaripov@gmail.com designates 2a00:1450:4864:20::242 as permitted sender) smtp.mailfrom=ruslanngaripov@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; 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,0]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(0.00)[ip: (2.82), ipnet: 2a00:1450::/32(-2.38), asn: 15169(-0.47), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2.4.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE_FREEMAIL(0.00)[]; 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]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 14:40:09 -0000 On 3/14/2020 11:36 AM, Toomas Soome wrote: > Author: tsoome > Date: Sat Mar 14 06:36:03 2020 > New Revision: 358989 > URL: https://svnweb.freebsd.org/changeset/base/358989 > > Log: > loader: add comconsole implementation on top of SIO protocol > > Provide comconsole on top of SIO for arm platforms (x86 does use bios version). > > Added: > head/stand/efi/loader/efiserialio.c (contents, props changed) > Modified: > head/stand/efi/libefi/efi_console.c > head/stand/efi/loader/arch/arm/Makefile.inc > head/stand/efi/loader/arch/arm64/Makefile.inc > head/stand/efi/loader/conf.c > head/stand/efi/loader/main.c > > Modified: head/stand/efi/libefi/efi_console.c > ============================================================================== > --- head/stand/efi/libefi/efi_console.c Sat Mar 14 05:57:22 2020 (r358988) > +++ head/stand/efi/libefi/efi_console.c Sat Mar 14 06:36:03 2020 (r358989) > @@ -377,9 +377,22 @@ efi_cons_respond(void *s __unused, const void *buf __u > { > } > > +/* > + * Set up conin/conout/coninex to make sure we have input ready. > + */ > static void > efi_cons_probe(struct console *cp) > { > + EFI_STATUS status; > + > + conout = ST->ConOut; > + conin = ST->ConIn; > + > + status = BS->OpenProtocol(ST->ConsoleInHandle, &simple_input_ex_guid, > + (void **)&coninex, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); > + if (status != EFI_SUCCESS) > + coninex = NULL; > + > cp->c_flags |= C_PRESENTIN | C_PRESENTOUT; > } > > @@ -889,15 +902,7 @@ efi_cons_init(int arg) > if (conin != NULL) > return (0); > > - conout = ST->ConOut; > - conin = ST->ConIn; > - > conout->EnableCursor(conout, TRUE); > - status = BS->OpenProtocol(ST->ConsoleInHandle, &simple_input_ex_guid, > - (void **)&coninex, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); > - if (status != EFI_SUCCESS) > - coninex = NULL; > - > if (efi_cons_update_mode()) > return (0); Hello, Toomas! I have to return to this revision once again. Speaking in advance, the problem I'll describe isn't a fatal one. I want to find a solution/root cause by myself... well, I had tried to do that but failed, therefore, I need some tips from you, if you have free time for that. The loader started to ignore teken.fg_color after r358989. I like to have green text on black console. Therefore, I have this: teken.fg_color="green" in my /boot/loader.conf. Before r358989 everything worked just like I wanted: not only vt(4) had green text on black, but the loader menu also. After r358989 vt(4) still renders greeen text on black, but the loader doesn't. It use default white on black. The variable is assigned but doesn't affect the output: OK show teken.fg_color green That started to happen after the changes from above: when code from the efi_cons_init() was moved to the efi_cons_probe() (stand/efi/libefi/efi_console.c). Therefore, if I revert those only changes, the loader starts to draw green text on black. If I read the sources correctly, the cons_probe() function in stand/common/console.c calls both those functions. Moreover, the efi_cons_probe() is called twice: first time when the cons_probe() probes all available consoles, and then when it searches an "online" console. And then the cons_probe() calls the efi_cons_init(). I see nothing between those calls which may cause the loader to ignore teken.fg_color (or any other variable). I believe that the efi_set_colors() function from stand/efi/libefi/efi_console.c is not call being the hook function for the teken.fg_color variable. The efi_cons_update_mode() sets the efi_set_colors() as the callback for teken.fg_color, but it's never called. The only reason for that, according to code of the env_setenv() in stand/libsa/environment.c, is that teken.fg_color was already created (without the hook function, of course) when the efi_cons_update_mode() tries to assign the efi_set_colors() hook. Or, the efi_cons_update_mode() failed to allocate the buffer, and, therefore, didn't set teken.fg_color at all. And later teken.fg_color is read from /boot/loader.conf. One more evidence that efi_set_colors() is not called: setting teken.fg_color from the loader prompt to something incorrect: OK set teken.fg_color=foobar doesn't print error message "Allowed values are either ansi color name or number from range ..." Thoomas, is ignoring of teken.fg_color by the loader caused by failing to allocate the buffer within the efi_cons_update_mode()? > > > Modified: head/stand/efi/loader/arch/arm/Makefile.inc > ============================================================================== > --- head/stand/efi/loader/arch/arm/Makefile.inc Sat Mar 14 05:57:22 2020 (r358988) > +++ head/stand/efi/loader/arch/arm/Makefile.inc Sat Mar 14 06:36:03 2020 (r358989) > @@ -1,6 +1,7 @@ > # $FreeBSD$ > > SRCS+= exec.c \ > + efiserialio.c \ > start.S > > HAVE_FDT=yes > > Modified: head/stand/efi/loader/arch/arm64/Makefile.inc > ============================================================================== > --- head/stand/efi/loader/arch/arm64/Makefile.inc Sat Mar 14 05:57:22 2020 (r358988) > +++ head/stand/efi/loader/arch/arm64/Makefile.inc Sat Mar 14 06:36:03 2020 (r358989) > @@ -3,6 +3,7 @@ > HAVE_FDT=yes > > SRCS+= exec.c \ > + efiserialio.c \ > start.S > > .PATH: ${BOOTSRC}/arm64/libarm64 > > Modified: head/stand/efi/loader/conf.c > ============================================================================== > --- head/stand/efi/loader/conf.c Sat Mar 14 05:57:22 2020 (r358988) > +++ head/stand/efi/loader/conf.c Sat Mar 14 06:36:03 2020 (r358989) > @@ -73,16 +73,16 @@ struct netif_driver *netif_drivers[] = { > }; > > extern struct console efi_console; > -#if defined(__amd64__) || defined(__i386__) > extern struct console comconsole; > +#if defined(__amd64__) || defined(__i386__) > extern struct console nullconsole; > extern struct console spinconsole; > #endif > > struct console *consoles[] = { > &efi_console, > -#if defined(__amd64__) || defined(__i386__) > &comconsole, > +#if defined(__amd64__) || defined(__i386__) > &nullconsole, > &spinconsole, > #endif > > Added: head/stand/efi/loader/efiserialio.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/stand/efi/loader/efiserialio.c Sat Mar 14 06:36:03 2020 (r358989) > @@ -0,0 +1,518 @@ > +/*- > + * Copyright (c) 1998 Michael Smith (msmith@freebsd.org) > + * > + * 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 "loader_efi.h" > + > +static EFI_GUID serial = SERIAL_IO_PROTOCOL; > + > +#define COMC_TXWAIT 0x40000 /* transmit timeout */ > + > +#ifndef COMSPEED > +#define COMSPEED 9600 > +#endif > + > +#define PNP0501 0x501 /* 16550A-compatible COM port */ > + > +struct serial { > + uint64_t baudrate; > + uint8_t databits; > + EFI_PARITY_TYPE parity; > + EFI_STOP_BITS_TYPE stopbits; > + uint8_t ignore_cd; /* boolean */ > + uint8_t rtsdtr_off; /* boolean */ > + int ioaddr; /* index in handles array */ > + EFI_HANDLE currdev; /* current serial device */ > + EFI_HANDLE condev; /* EFI Console device */ > + SERIAL_IO_INTERFACE *sio; > +}; > + > +static void comc_probe(struct console *); > +static int comc_init(int); > +static void comc_putchar(int); > +static int comc_getchar(void); > +static int comc_ischar(void); > +static bool comc_setup(void); > +static int comc_parse_intval(const char *, unsigned *); > +static int comc_port_set(struct env_var *, int, const void *); > +static int comc_speed_set(struct env_var *, int, const void *); > + > +static struct serial *comc_port; > +extern struct console efi_console; > + > +struct console comconsole = { > + .c_name = "comconsole", > + .c_desc = "serial port", > + .c_flags = 0, > + .c_probe = comc_probe, > + .c_init = comc_init, > + .c_out = comc_putchar, > + .c_in = comc_getchar, > + .c_ready = comc_ischar, > +}; > + > +static EFI_STATUS > +efi_serial_init(EFI_HANDLE **handlep, int *nhandles) > +{ > + UINTN bufsz = 0; > + EFI_STATUS status; > + EFI_HANDLE *handles; > + > + /* > + * get buffer size > + */ > + *nhandles = 0; > + handles = NULL; > + status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles); > + if (status != EFI_BUFFER_TOO_SMALL) > + return (status); > + > + if ((handles = malloc(bufsz)) == NULL) > + return (ENOMEM); > + > + *nhandles = (int)(bufsz / sizeof (EFI_HANDLE)); > + /* > + * get handle array > + */ > + status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles); > + if (EFI_ERROR(status)) { > + free(handles); > + *nhandles = 0; > + } else > + *handlep = handles; > + return (status); > +} > + > +/* > + * Find serial device number from device path. > + * Return -1 if not found. > + */ > +static int > +efi_serial_get_index(EFI_DEVICE_PATH *devpath, int idx) > +{ > + ACPI_HID_DEVICE_PATH *acpi; > + CHAR16 *text; > + > + while (!IsDevicePathEnd(devpath)) { > + if (DevicePathType(devpath) == MESSAGING_DEVICE_PATH && > + DevicePathSubType(devpath) == MSG_UART_DP) > + return (idx); > + > + if (DevicePathType(devpath) == ACPI_DEVICE_PATH && > + (DevicePathSubType(devpath) == ACPI_DP || > + DevicePathSubType(devpath) == ACPI_EXTENDED_DP)) { > + > + acpi = (ACPI_HID_DEVICE_PATH *)devpath; > + if (acpi->HID == EISA_PNP_ID(PNP0501)) { > + return (acpi->UID); > + } > + } > + > + devpath = NextDevicePathNode(devpath); > + } > + return (-1); > +} > + > +/* > + * The order of handles from LocateHandle() is not known, we need to > + * iterate handles, pick device path for handle, and check the device > + * number. > + */ > +static EFI_HANDLE > +efi_serial_get_handle(int port, EFI_HANDLE condev) > +{ > + EFI_STATUS status; > + EFI_HANDLE *handles, handle; > + EFI_DEVICE_PATH *devpath; > + int index, nhandles; > + > + if (port == -1) > + return (NULL); > + > + handles = NULL; > + nhandles = 0; > + status = efi_serial_init(&handles, &nhandles); > + if (EFI_ERROR(status)) > + return (NULL); > + > + /* > + * We have console handle, set ioaddr for it. > + */ > + if (condev != NULL) { > + for (index = 0; index < nhandles; index++) { > + if (condev == handles[index]) { > + devpath = efi_lookup_devpath(condev); > + comc_port->ioaddr = > + efi_serial_get_index(devpath, index); > + efi_close_devpath(condev); > + free(handles); > + return (condev); > + } > + } > + } > + > + handle = NULL; > + for (index = 0; handle == NULL && index < nhandles; index++) { > + devpath = efi_lookup_devpath(handles[index]); > + if (port == efi_serial_get_index(devpath, index)) > + handle = (handles[index]); > + efi_close_devpath(handles[index]); > + } > + > + /* > + * In case we did fail to identify the device by path, use port as > + * array index. Note, we did check port == -1 above. > + */ > + if (port < nhandles && handle == NULL) > + handle = handles[port]; > + > + free(handles); > + return (handle); > +} > + > +static EFI_HANDLE > +comc_get_con_serial_handle(const char *name) > +{ > + EFI_HANDLE handle; > + EFI_DEVICE_PATH *node; > + EFI_STATUS status; > + char *buf, *ep; > + size_t sz; > + > + buf = NULL; > + sz = 0; > + status = efi_global_getenv(name, buf, &sz); > + if (status == EFI_BUFFER_TOO_SMALL) { > + buf = malloc(sz); > + if (buf != NULL) > + status = efi_global_getenv(name, buf, &sz); > + } > + if (status != EFI_SUCCESS) { > + free(buf); > + return (NULL); > + } > + > + ep = buf + sz; > + node = (EFI_DEVICE_PATH *)buf; > + while ((char *)node < ep) { > + status = BS->LocateDevicePath(&serial, &node, &handle); > + if (status == EFI_SUCCESS) { > + free(buf); > + return (handle); > + } > + if (IsDevicePathEndType(node) && > + DevicePathSubType(node) == > + END_INSTANCE_DEVICE_PATH_SUBTYPE) { > + /* > + * Start of next device path in list. > + */ > + node = NextDevicePathNode(node); > + continue; > + } > + if (IsDevicePathEnd(node)) > + break; > + } > + free(buf); > + return (NULL); > +} > + > +static void > +comc_probe(struct console *sc) > +{ > + EFI_STATUS status; > + EFI_HANDLE handle; > + char name[20]; > + char value[20]; > + unsigned val; > + char *env, *buf, *ep; > + size_t sz; > + > + if (comc_port == NULL) { > + comc_port = malloc(sizeof (struct serial)); > + if (comc_port == NULL) > + return; > + } > + comc_port->baudrate = COMSPEED; > + comc_port->ioaddr = 0; /* default port */ > + comc_port->databits = 8; /* 8,n,1 */ > + comc_port->parity = NoParity; /* 8,n,1 */ > + comc_port->stopbits = OneStopBit; /* 8,n,1 */ > + comc_port->ignore_cd = 1; /* ignore cd */ > + comc_port->rtsdtr_off = 0; /* rts-dtr is on */ > + comc_port->sio = NULL; > + > + handle = NULL; > + env = getenv("efi_com_port"); > + if (comc_parse_intval(env, &val) == CMD_OK) { > + comc_port->ioaddr = val; > + } else { > + /* > + * efi_com_port is not set, we need to select default. > + * First, we consult ConOut variable to see if > + * we have serial port redirection. If not, we just > + * pick first device. > + */ > + handle = comc_get_con_serial_handle("ConOut"); > + comc_port->condev = handle; > + } > + > + handle = efi_serial_get_handle(comc_port->ioaddr, handle); > + if (handle != NULL) { > + comc_port->currdev = handle; > + status = BS->OpenProtocol(handle, &serial, > + (void**)&comc_port->sio, IH, NULL, > + EFI_OPEN_PROTOCOL_GET_PROTOCOL); > + > + if (EFI_ERROR(status)) > + comc_port->sio = NULL; > + } > + > + if (env != NULL) > + unsetenv("efi_com_port"); > + snprintf(value, sizeof (value), "%u", comc_port->ioaddr); > + env_setenv("efi_com_port", EV_VOLATILE, value, > + comc_port_set, env_nounset); > + > + env = getenv("efi_com_speed"); > + if (comc_parse_intval(env, &val) == CMD_OK) > + comc_port->baudrate = val; > + > + if (env != NULL) > + unsetenv("efi_com_speed"); > + snprintf(value, sizeof (value), "%ju", (uintmax_t)comc_port->baudrate); > + env_setenv("efi_com_speed", EV_VOLATILE, value, > + comc_speed_set, env_nounset); > + > + comconsole.c_flags = 0; > + if (comc_setup()) > + sc->c_flags = C_PRESENTIN | C_PRESENTOUT; > +} > + > +static int > +comc_init(int arg __unused) > +{ > + > + if (comc_setup()) > + return (CMD_OK); > + > + comconsole.c_flags = 0; > + return (CMD_ERROR); > +} > + > +static void > +comc_putchar(int c) > +{ > + int wait; > + EFI_STATUS status; > + UINTN bufsz = 1; > + char cb = c; > + > + if (comc_port->sio == NULL) > + return; > + > + for (wait = COMC_TXWAIT; wait > 0; wait--) { > + status = comc_port->sio->Write(comc_port->sio, &bufsz, &cb); > + if (status != EFI_TIMEOUT) > + break; > + } > +} > + > +static int > +comc_getchar(void) > +{ > + EFI_STATUS status; > + UINTN bufsz = 1; > + char c; > + > + > + /* > + * if this device is also used as ConIn, some firmwares > + * fail to return all input via SIO protocol. > + */ > + if (comc_port->currdev == comc_port->condev) { > + if ((efi_console.c_flags & C_ACTIVEIN) == 0) > + return (efi_console.c_in()); > + return (-1); > + } > + > + if (comc_port->sio == NULL) > + return (-1); > + > + status = comc_port->sio->Read(comc_port->sio, &bufsz, &c); > + if (EFI_ERROR(status) || bufsz == 0) > + return (-1); > + > + return (c); > +} > + > +static int > +comc_ischar(void) > +{ > + EFI_STATUS status; > + uint32_t control; > + > + /* > + * if this device is also used as ConIn, some firmwares > + * fail to return all input via SIO protocol. > + */ > + if (comc_port->currdev == comc_port->condev) { > + if ((efi_console.c_flags & C_ACTIVEIN) == 0) > + return (efi_console.c_ready()); > + return (0); > + } > + > + if (comc_port->sio == NULL) > + return (0); > + > + status = comc_port->sio->GetControl(comc_port->sio, &control); > + if (EFI_ERROR(status)) > + return (0); > + > + return (!(control & EFI_SERIAL_INPUT_BUFFER_EMPTY)); > +} > + > +static int > +comc_parse_intval(const char *value, unsigned *valp) > +{ > + unsigned n; > + char *ep; > + > + if (value == NULL || *value == '\0') > + return (CMD_ERROR); > + > + errno = 0; > + n = strtoul(value, &ep, 10); > + if (errno != 0 || *ep != '\0') > + return (CMD_ERROR); > + *valp = n; > + > + return (CMD_OK); > +} > + > +static int > +comc_port_set(struct env_var *ev, int flags, const void *value) > +{ > + unsigned port; > + SERIAL_IO_INTERFACE *sio; > + EFI_HANDLE handle; > + EFI_STATUS status; > + > + if (value == NULL) > + return (CMD_ERROR); > + > + if (comc_parse_intval(value, &port) != CMD_OK) > + return (CMD_ERROR); > + > + handle = efi_serial_get_handle(port, NULL); > + if (handle == NULL) { > + printf("no handle\n"); > + return (CMD_ERROR); > + } > + > + status = BS->OpenProtocol(handle, &serial, > + (void**)&sio, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); > + > + if (EFI_ERROR(status)) { > + printf("OpenProtocol: %lu\n", EFI_ERROR_CODE(status)); > + return (CMD_ERROR); > + } > + > + comc_port->currdev = handle; > + comc_port->ioaddr = port; > + comc_port->sio = sio; > + > + (void) comc_setup(); > + > + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); > + return (CMD_OK); > +} > + > +static int > +comc_speed_set(struct env_var *ev, int flags, const void *value) > +{ > + unsigned speed; > + > + if (value == NULL) > + return (CMD_ERROR); > + > + if (comc_parse_intval(value, &speed) != CMD_OK) > + return (CMD_ERROR); > + > + comc_port->baudrate = speed; > + (void) comc_setup(); > + > + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); > + > + return (CMD_OK); > +} > + > +/* > + * In case of error, we also reset ACTIVE flags, so the console > + * framefork will try alternate consoles. > + */ > +static bool > +comc_setup(void) > +{ > + EFI_STATUS status; > + UINT32 control; > + > + /* port is not usable */ > + if (comc_port->sio == NULL) > + return (false); > + > + status = comc_port->sio->Reset(comc_port->sio); > + if (EFI_ERROR(status)) > + return (false); > + > + status = comc_port->sio->SetAttributes(comc_port->sio, > + comc_port->baudrate, 0, 0, comc_port->parity, > + comc_port->databits, comc_port->stopbits); > + if (EFI_ERROR(status)) > + return (false); > + > + status = comc_port->sio->GetControl(comc_port->sio, &control); > + if (EFI_ERROR(status)) > + return (false); > + if (comc_port->rtsdtr_off) { > + control &= ~(EFI_SERIAL_REQUEST_TO_SEND | > + EFI_SERIAL_DATA_TERMINAL_READY); > + } else { > + control |= EFI_SERIAL_REQUEST_TO_SEND; > + } > + (void) comc_port->sio->SetControl(comc_port->sio, control); > + /* Mark this port usable. */ > + comconsole.c_flags |= (C_PRESENTIN | C_PRESENTOUT); > + return (true); > +} > > Modified: head/stand/efi/loader/main.c > ============================================================================== > --- head/stand/efi/loader/main.c Sat Mar 14 05:57:22 2020 (r358988) > +++ head/stand/efi/loader/main.c Sat Mar 14 06:36:03 2020 (r358989) > @@ -722,7 +722,8 @@ parse_uefi_con_out(void) > while ((char *)node < ep) { > pci_pending = false; > if (DevicePathType(node) == ACPI_DEVICE_PATH && > - DevicePathSubType(node) == ACPI_DP) { > + (DevicePathSubType(node) == ACPI_DP || > + DevicePathSubType(node) == ACPI_EXTENDED_DP)) { > /* Check for Serial node */ > acpi = (void *)node; > if (EISA_ID_TO_NUM(acpi->HID) == 0x501) { > @@ -731,7 +732,7 @@ parse_uefi_con_out(void) > } > } else if (DevicePathType(node) == MESSAGING_DEVICE_PATH && > DevicePathSubType(node) == MSG_UART_DP) { > - > + com_seen = ++seen; > uart = (void *)node; > setenv_int("efi_com_speed", uart->BaudRate); > } else if (DevicePathType(node) == ACPI_DEVICE_PATH && > @@ -897,6 +898,11 @@ main(int argc, CHAR16 *argv[]) > * changes to take effect, regardless of where they come from. > */ > setenv("console", "efi", 1); > + uhowto = parse_uefi_con_out(); > +#if defined(__aarch64__) || defined(__arm__) > + if ((uhowto & RB_SERIAL) != 0) > + setenv("console", "comconsole", 1); > +#endif > cons_probe(); > > /* Init the time source */ > @@ -930,7 +936,6 @@ main(int argc, CHAR16 *argv[]) > if (!has_kbd && (howto & RB_PROBE)) > howto |= RB_SERIAL | RB_MULTIPLE; > howto &= ~RB_PROBE; > - uhowto = parse_uefi_con_out(); > > /* > * Read additional environment variables from the boot device's > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Fri Mar 27 15:15:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50FC42783D0 for ; Fri, 27 Mar 2020 15:15:58 +0000 (UTC) (envelope-from tsoome@me.com) Received: from pv50p00im-ztdg10021801.me.com (pv50p00im-ztdg10021801.me.com [17.58.6.56]) (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 48plmM0bDHz4Db8 for ; Fri, 27 Mar 2020 15:15:46 +0000 (UTC) (envelope-from tsoome@me.com) Received: from nazgul.lan (148-52-235-80.sta.estpak.ee [80.235.52.148]) by pv50p00im-ztdg10021801.me.com (Postfix) with ESMTPSA id 8531B3604E8; Fri, 27 Mar 2020 15:07:55 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r358989 - in head/stand/efi: libefi loader loader/arch/arm loader/arch/arm64 From: Toomas Soome In-Reply-To: <95805806-b577-d81a-c709-7244d3fea4eb@gmail.com> Date: Fri, 27 Mar 2020 17:07:43 +0200 Cc: Toomas Soome , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <35478B22-4EEE-4DE2-B441-7838F676ED68@me.com> References: <202003140636.02E6a3NS020671@repo.freebsd.org> <95805806-b577-d81a-c709-7244d3fea4eb@gmail.com> To: Ruslan Garipov X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2020-03-27_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2003270138 X-Rspamd-Queue-Id: 48plmM0bDHz4Db8 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; FREEMAIL_FROM(0.00)[me.com]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[me.com:+]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_IN_DNSWL_LOW(-0.10)[56.6.58.17.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[me.com]; ASN(0.00)[asn:714, ipnet:17.58.0.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[148.52.235.80.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-5.23), ipnet: 17.58.0.0/20(-2.04), asn: 714(-2.41), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; DWL_DNSWL_LOW(-1.00)[me.com.dwl.dnswl.org : 127.0.5.1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 15:15:58 -0000 > On 27. Mar 2020, at 16:39, Ruslan Garipov = wrote: >=20 > On 3/14/2020 11:36 AM, Toomas Soome wrote: >> Author: tsoome >> Date: Sat Mar 14 06:36:03 2020 >> New Revision: 358989 >> URL: https://svnweb.freebsd.org/changeset/base/358989 >>=20 >> Log: >> loader: add comconsole implementation on top of SIO protocol >>=20 >> Provide comconsole on top of SIO for arm platforms (x86 does use = bios version). >>=20 >> Added: >> head/stand/efi/loader/efiserialio.c (contents, props changed) >> Modified: >> head/stand/efi/libefi/efi_console.c >> head/stand/efi/loader/arch/arm/Makefile.inc >> head/stand/efi/loader/arch/arm64/Makefile.inc >> head/stand/efi/loader/conf.c >> head/stand/efi/loader/main.c >>=20 >> Modified: head/stand/efi/libefi/efi_console.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/stand/efi/libefi/efi_console.c Sat Mar 14 05:57:22 2020 = (r358988) >> +++ head/stand/efi/libefi/efi_console.c Sat Mar 14 06:36:03 2020 = (r358989) >> @@ -377,9 +377,22 @@ efi_cons_respond(void *s __unused, const void = *buf __u >> { >> } >>=20 >> +/* >> + * Set up conin/conout/coninex to make sure we have input ready. >> + */ >> static void >> efi_cons_probe(struct console *cp) >> { >> + EFI_STATUS status; >> + >> + conout =3D ST->ConOut; >> + conin =3D ST->ConIn; >> + >> + status =3D BS->OpenProtocol(ST->ConsoleInHandle, = &simple_input_ex_guid, >> + (void **)&coninex, IH, NULL, = EFI_OPEN_PROTOCOL_GET_PROTOCOL); >> + if (status !=3D EFI_SUCCESS) >> + coninex =3D NULL; >> + >> cp->c_flags |=3D C_PRESENTIN | C_PRESENTOUT; >> } >>=20 >> @@ -889,15 +902,7 @@ efi_cons_init(int arg) >> if (conin !=3D NULL) >> return (0); >>=20 >> - conout =3D ST->ConOut; >> - conin =3D ST->ConIn; >> - >> conout->EnableCursor(conout, TRUE); >> - status =3D BS->OpenProtocol(ST->ConsoleInHandle, = &simple_input_ex_guid, >> - (void **)&coninex, IH, NULL, = EFI_OPEN_PROTOCOL_GET_PROTOCOL); >> - if (status !=3D EFI_SUCCESS) >> - coninex =3D NULL; >> - >> if (efi_cons_update_mode()) >> return (0); > Hello, Toomas! >=20 > I have to return to this revision once again. >=20 > Speaking in advance, the problem I'll describe isn't a fatal one. I > want to find a solution/root cause by myself... well, I had tried to = do > that but failed, therefore, I need some tips from you, if you have = free > time for that. >=20 > The loader started to ignore teken.fg_color after r358989. >=20 > I like to have green text on black console. Therefore, I have this: >=20 > teken.fg_color=3D"green" Oh cool, at least it is useful for someone:) I am sorry, yes this is my bug, I somehow missed the second probe and = assumed we do probe only once.. And yes, your analysis is correct, the = environment with callback should be treated carefully. What probe must do is to set up conin/coninex so the efiserial can use = workaround for buggy SIO, the rest is not that important. >=20 > in my /boot/loader.conf. Before r358989 everything worked just like I > wanted: not only vt(4) had green text on black, but the loader menu > also. After r358989 vt(4) still renders greeen text on black, but the > loader doesn't. It use default white on black. The variable is > assigned but doesn't affect the output: >=20 > OK show teken.fg_color > green >=20 > That started to happen after the changes from above: when code from = the > efi_cons_init() was moved to the efi_cons_probe() > (stand/efi/libefi/efi_console.c). Therefore, if I revert those only > changes, the loader starts to draw green text on black. >=20 > If I read the sources correctly, the cons_probe() function in > stand/common/console.c calls both those functions. Moreover, the > efi_cons_probe() is called twice: first time when the cons_probe() > probes all available consoles, and then when it searches an "online" > console. And then the cons_probe() calls the efi_cons_init(). I see > nothing between those calls which may cause the loader to ignore > teken.fg_color (or any other variable). >=20 > I believe that the efi_set_colors() function from > stand/efi/libefi/efi_console.c is not call being the hook function for > the teken.fg_color variable. The efi_cons_update_mode() sets the > efi_set_colors() as the callback for teken.fg_color, but it's never > called. The only reason for that, according to code of the = env_setenv() > in stand/libsa/environment.c, is that teken.fg_color was already = created > (without the hook function, of course) when the efi_cons_update_mode() > tries to assign the efi_set_colors() hook. Or, the > efi_cons_update_mode() failed to allocate the buffer, and, therefore, > didn't set teken.fg_color at all. And later teken.fg_color is read = from > /boot/loader.conf. >=20 > One more evidence that efi_set_colors() is not called: setting > teken.fg_color from the loader prompt to something incorrect: >=20 > OK set teken.fg_color=3Dfoobar >=20 > doesn't print error message "Allowed values are either ansi color name > or number from range ..." >=20 > Thoomas, is ignoring of teken.fg_color by the loader caused by failing > to allocate the buffer within the efi_cons_update_mode()? That definitely can be the case. If you do not set any custom values, = missing tem.* variables would confirm that. Now, there is still an question, why in your system that allocation does = fail? ou, I found I haven't pushed the workaround for buggy Mode = information=E2=80=A6 rgds, toomas >=20 >>=20 >>=20 >> Modified: head/stand/efi/loader/arch/arm/Makefile.inc >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/stand/efi/loader/arch/arm/Makefile.inc Sat Mar 14 = 05:57:22 2020 (r358988) >> +++ head/stand/efi/loader/arch/arm/Makefile.inc Sat Mar 14 = 06:36:03 2020 (r358989) >> @@ -1,6 +1,7 @@ >> # $FreeBSD$ >>=20 >> SRCS+=3D exec.c \ >> + efiserialio.c \ >> start.S >>=20 >> HAVE_FDT=3Dyes >>=20 >> Modified: head/stand/efi/loader/arch/arm64/Makefile.inc >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/stand/efi/loader/arch/arm64/Makefile.inc Sat Mar 14 = 05:57:22 2020 (r358988) >> +++ head/stand/efi/loader/arch/arm64/Makefile.inc Sat Mar 14 = 06:36:03 2020 (r358989) >> @@ -3,6 +3,7 @@ >> HAVE_FDT=3Dyes >>=20 >> SRCS+=3D exec.c \ >> + efiserialio.c \ >> start.S >>=20 >> .PATH: ${BOOTSRC}/arm64/libarm64 >>=20 >> Modified: head/stand/efi/loader/conf.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/stand/efi/loader/conf.c Sat Mar 14 05:57:22 2020 = (r358988) >> +++ head/stand/efi/loader/conf.c Sat Mar 14 06:36:03 2020 = (r358989) >> @@ -73,16 +73,16 @@ struct netif_driver *netif_drivers[] =3D { >> }; >>=20 >> extern struct console efi_console; >> -#if defined(__amd64__) || defined(__i386__) >> extern struct console comconsole; >> +#if defined(__amd64__) || defined(__i386__) >> extern struct console nullconsole; >> extern struct console spinconsole; >> #endif >>=20 >> struct console *consoles[] =3D { >> &efi_console, >> -#if defined(__amd64__) || defined(__i386__) >> &comconsole, >> +#if defined(__amd64__) || defined(__i386__) >> &nullconsole, >> &spinconsole, >> #endif >>=20 >> Added: head/stand/efi/loader/efiserialio.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is newly = added) >> +++ head/stand/efi/loader/efiserialio.c Sat Mar 14 06:36:03 2020 = (r358989) >> @@ -0,0 +1,518 @@ >> +/*- >> + * Copyright (c) 1998 Michael Smith (msmith@freebsd.org) >> + * >> + * 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 "loader_efi.h" >> + >> +static EFI_GUID serial =3D SERIAL_IO_PROTOCOL; >> + >> +#define COMC_TXWAIT 0x40000 /* transmit timeout */ >> + >> +#ifndef COMSPEED >> +#define COMSPEED 9600 >> +#endif >> + >> +#define PNP0501 0x501 /* 16550A-compatible COM = port */ >> + >> +struct serial { >> + uint64_t baudrate; >> + uint8_t databits; >> + EFI_PARITY_TYPE parity; >> + EFI_STOP_BITS_TYPE stopbits; >> + uint8_t ignore_cd; /* boolean */ >> + uint8_t rtsdtr_off; /* boolean */ >> + int ioaddr; /* index in handles array */ >> + EFI_HANDLE currdev; /* current serial device */ >> + EFI_HANDLE condev; /* EFI Console device */ >> + SERIAL_IO_INTERFACE *sio; >> +}; >> + >> +static void comc_probe(struct console *); >> +static int comc_init(int); >> +static void comc_putchar(int); >> +static int comc_getchar(void); >> +static int comc_ischar(void); >> +static bool comc_setup(void); >> +static int comc_parse_intval(const char *, unsigned *); >> +static int comc_port_set(struct env_var *, int, const void *); >> +static int comc_speed_set(struct env_var *, int, const void *); >> + >> +static struct serial *comc_port; >> +extern struct console efi_console; >> + >> +struct console comconsole =3D { >> + .c_name =3D "comconsole", >> + .c_desc =3D "serial port", >> + .c_flags =3D 0, >> + .c_probe =3D comc_probe, >> + .c_init =3D comc_init, >> + .c_out =3D comc_putchar, >> + .c_in =3D comc_getchar, >> + .c_ready =3D comc_ischar, >> +}; >> + >> +static EFI_STATUS >> +efi_serial_init(EFI_HANDLE **handlep, int *nhandles) >> +{ >> + UINTN bufsz =3D 0; >> + EFI_STATUS status; >> + EFI_HANDLE *handles; >> + >> + /* >> + * get buffer size >> + */ >> + *nhandles =3D 0; >> + handles =3D NULL; >> + status =3D BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, = handles); >> + if (status !=3D EFI_BUFFER_TOO_SMALL) >> + return (status); >> + >> + if ((handles =3D malloc(bufsz)) =3D=3D NULL) >> + return (ENOMEM); >> + >> + *nhandles =3D (int)(bufsz / sizeof (EFI_HANDLE)); >> + /* >> + * get handle array >> + */ >> + status =3D BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, = handles); >> + if (EFI_ERROR(status)) { >> + free(handles); >> + *nhandles =3D 0; >> + } else >> + *handlep =3D handles; >> + return (status); >> +} >> + >> +/* >> + * Find serial device number from device path. >> + * Return -1 if not found. >> + */ >> +static int >> +efi_serial_get_index(EFI_DEVICE_PATH *devpath, int idx) >> +{ >> + ACPI_HID_DEVICE_PATH *acpi; >> + CHAR16 *text; >> + >> + while (!IsDevicePathEnd(devpath)) { >> + if (DevicePathType(devpath) =3D=3D MESSAGING_DEVICE_PATH = && >> + DevicePathSubType(devpath) =3D=3D MSG_UART_DP) >> + return (idx); >> + >> + if (DevicePathType(devpath) =3D=3D ACPI_DEVICE_PATH && >> + (DevicePathSubType(devpath) =3D=3D ACPI_DP || >> + DevicePathSubType(devpath) =3D=3D ACPI_EXTENDED_DP)) = { >> + >> + acpi =3D (ACPI_HID_DEVICE_PATH *)devpath; >> + if (acpi->HID =3D=3D EISA_PNP_ID(PNP0501)) { >> + return (acpi->UID); >> + } >> + } >> + >> + devpath =3D NextDevicePathNode(devpath); >> + } >> + return (-1); >> +} >> + >> +/* >> + * The order of handles from LocateHandle() is not known, we need to >> + * iterate handles, pick device path for handle, and check the = device >> + * number. >> + */ >> +static EFI_HANDLE >> +efi_serial_get_handle(int port, EFI_HANDLE condev) >> +{ >> + EFI_STATUS status; >> + EFI_HANDLE *handles, handle; >> + EFI_DEVICE_PATH *devpath; >> + int index, nhandles; >> + >> + if (port =3D=3D -1) >> + return (NULL); >> + >> + handles =3D NULL; >> + nhandles =3D 0; >> + status =3D efi_serial_init(&handles, &nhandles); >> + if (EFI_ERROR(status)) >> + return (NULL); >> + >> + /* >> + * We have console handle, set ioaddr for it. >> + */ >> + if (condev !=3D NULL) { >> + for (index =3D 0; index < nhandles; index++) { >> + if (condev =3D=3D handles[index]) { >> + devpath =3D efi_lookup_devpath(condev); >> + comc_port->ioaddr =3D >> + efi_serial_get_index(devpath, = index); >> + efi_close_devpath(condev); >> + free(handles); >> + return (condev); >> + } >> + } >> + } >> + >> + handle =3D NULL; >> + for (index =3D 0; handle =3D=3D NULL && index < nhandles; = index++) { >> + devpath =3D efi_lookup_devpath(handles[index]); >> + if (port =3D=3D efi_serial_get_index(devpath, index)) >> + handle =3D (handles[index]); >> + efi_close_devpath(handles[index]); >> + } >> + >> + /* >> + * In case we did fail to identify the device by path, use port = as >> + * array index. Note, we did check port =3D=3D -1 above. >> + */ >> + if (port < nhandles && handle =3D=3D NULL) >> + handle =3D handles[port]; >> + >> + free(handles); >> + return (handle); >> +} >> + >> +static EFI_HANDLE >> +comc_get_con_serial_handle(const char *name) >> +{ >> + EFI_HANDLE handle; >> + EFI_DEVICE_PATH *node; >> + EFI_STATUS status; >> + char *buf, *ep; >> + size_t sz; >> + >> + buf =3D NULL; >> + sz =3D 0; >> + status =3D efi_global_getenv(name, buf, &sz); >> + if (status =3D=3D EFI_BUFFER_TOO_SMALL) { >> + buf =3D malloc(sz); >> + if (buf !=3D NULL) >> + status =3D efi_global_getenv(name, buf, &sz); >> + } >> + if (status !=3D EFI_SUCCESS) { >> + free(buf); >> + return (NULL); >> + } >> + >> + ep =3D buf + sz; >> + node =3D (EFI_DEVICE_PATH *)buf; >> + while ((char *)node < ep) { >> + status =3D BS->LocateDevicePath(&serial, &node, = &handle); >> + if (status =3D=3D EFI_SUCCESS) { >> + free(buf); >> + return (handle); >> + } >> + if (IsDevicePathEndType(node) && >> + DevicePathSubType(node) =3D=3D >> + END_INSTANCE_DEVICE_PATH_SUBTYPE) { >> + /* >> + * Start of next device path in list. >> + */ >> + node =3D NextDevicePathNode(node); >> + continue; >> + } >> + if (IsDevicePathEnd(node)) >> + break; >> + } >> + free(buf); >> + return (NULL); >> +} >> + >> +static void >> +comc_probe(struct console *sc) >> +{ >> + EFI_STATUS status; >> + EFI_HANDLE handle; >> + char name[20]; >> + char value[20]; >> + unsigned val; >> + char *env, *buf, *ep; >> + size_t sz; >> + >> + if (comc_port =3D=3D NULL) { >> + comc_port =3D malloc(sizeof (struct serial)); >> + if (comc_port =3D=3D NULL) >> + return; >> + } >> + comc_port->baudrate =3D COMSPEED; >> + comc_port->ioaddr =3D 0; /* default port = */ >> + comc_port->databits =3D 8; /* 8,n,1 */ >> + comc_port->parity =3D NoParity; /* 8,n,1 */ >> + comc_port->stopbits =3D OneStopBit; /* 8,n,1 */ >> + comc_port->ignore_cd =3D 1; /* ignore cd */ >> + comc_port->rtsdtr_off =3D 0; /* rts-dtr is on */ >> + comc_port->sio =3D NULL; >> + >> + handle =3D NULL; >> + env =3D getenv("efi_com_port"); >> + if (comc_parse_intval(env, &val) =3D=3D CMD_OK) { >> + comc_port->ioaddr =3D val; >> + } else { >> + /* >> + * efi_com_port is not set, we need to select default. >> + * First, we consult ConOut variable to see if >> + * we have serial port redirection. If not, we just >> + * pick first device. >> + */ >> + handle =3D comc_get_con_serial_handle("ConOut"); >> + comc_port->condev =3D handle; >> + } >> + >> + handle =3D efi_serial_get_handle(comc_port->ioaddr, handle); >> + if (handle !=3D NULL) { >> + comc_port->currdev =3D handle; >> + status =3D BS->OpenProtocol(handle, &serial, >> + (void**)&comc_port->sio, IH, NULL, >> + EFI_OPEN_PROTOCOL_GET_PROTOCOL); >> + >> + if (EFI_ERROR(status)) >> + comc_port->sio =3D NULL; >> + } >> + >> + if (env !=3D NULL)=20 >> + unsetenv("efi_com_port"); >> + snprintf(value, sizeof (value), "%u", comc_port->ioaddr); >> + env_setenv("efi_com_port", EV_VOLATILE, value, >> + comc_port_set, env_nounset); >> + >> + env =3D getenv("efi_com_speed"); >> + if (comc_parse_intval(env, &val) =3D=3D CMD_OK) >> + comc_port->baudrate =3D val; >> + >> + if (env !=3D NULL) >> + unsetenv("efi_com_speed"); >> + snprintf(value, sizeof (value), "%ju", = (uintmax_t)comc_port->baudrate); >> + env_setenv("efi_com_speed", EV_VOLATILE, value, >> + comc_speed_set, env_nounset); >> + >> + comconsole.c_flags =3D 0; >> + if (comc_setup()) >> + sc->c_flags =3D C_PRESENTIN | C_PRESENTOUT; >> +} >> + >> +static int >> +comc_init(int arg __unused) >> +{ >> + >> + if (comc_setup()) >> + return (CMD_OK); >> + >> + comconsole.c_flags =3D 0; >> + return (CMD_ERROR); >> +} >> + >> +static void >> +comc_putchar(int c) >> +{ >> + int wait; >> + EFI_STATUS status; >> + UINTN bufsz =3D 1; >> + char cb =3D c; >> + >> + if (comc_port->sio =3D=3D NULL) >> + return; >> + >> + for (wait =3D COMC_TXWAIT; wait > 0; wait--) { >> + status =3D comc_port->sio->Write(comc_port->sio, &bufsz, = &cb); >> + if (status !=3D EFI_TIMEOUT) >> + break; >> + } >> +} >> + >> +static int >> +comc_getchar(void) >> +{ >> + EFI_STATUS status; >> + UINTN bufsz =3D 1; >> + char c; >> + >> + >> + /* >> + * if this device is also used as ConIn, some firmwares >> + * fail to return all input via SIO protocol. >> + */ >> + if (comc_port->currdev =3D=3D comc_port->condev) { >> + if ((efi_console.c_flags & C_ACTIVEIN) =3D=3D 0) >> + return (efi_console.c_in()); >> + return (-1); >> + } >> + >> + if (comc_port->sio =3D=3D NULL) >> + return (-1); >> + >> + status =3D comc_port->sio->Read(comc_port->sio, &bufsz, &c); >> + if (EFI_ERROR(status) || bufsz =3D=3D 0) >> + return (-1); >> + >> + return (c); >> +} >> + >> +static int >> +comc_ischar(void) >> +{ >> + EFI_STATUS status; >> + uint32_t control; >> + >> + /* >> + * if this device is also used as ConIn, some firmwares >> + * fail to return all input via SIO protocol. >> + */ >> + if (comc_port->currdev =3D=3D comc_port->condev) { >> + if ((efi_console.c_flags & C_ACTIVEIN) =3D=3D 0) >> + return (efi_console.c_ready()); >> + return (0); >> + } >> + >> + if (comc_port->sio =3D=3D NULL) >> + return (0); >> + >> + status =3D comc_port->sio->GetControl(comc_port->sio, &control); >> + if (EFI_ERROR(status)) >> + return (0); >> + >> + return (!(control & EFI_SERIAL_INPUT_BUFFER_EMPTY)); >> +} >> + >> +static int >> +comc_parse_intval(const char *value, unsigned *valp) >> +{ >> + unsigned n; >> + char *ep; >> + >> + if (value =3D=3D NULL || *value =3D=3D '\0') >> + return (CMD_ERROR); >> + >> + errno =3D 0; >> + n =3D strtoul(value, &ep, 10); >> + if (errno !=3D 0 || *ep !=3D '\0') >> + return (CMD_ERROR); >> + *valp =3D n; >> + >> + return (CMD_OK); >> +} >> + >> +static int >> +comc_port_set(struct env_var *ev, int flags, const void *value) >> +{ >> + unsigned port; >> + SERIAL_IO_INTERFACE *sio; >> + EFI_HANDLE handle; >> + EFI_STATUS status; >> + >> + if (value =3D=3D NULL) >> + return (CMD_ERROR); >> + >> + if (comc_parse_intval(value, &port) !=3D CMD_OK)=20 >> + return (CMD_ERROR); >> + >> + handle =3D efi_serial_get_handle(port, NULL); >> + if (handle =3D=3D NULL) { >> + printf("no handle\n"); >> + return (CMD_ERROR); >> + } >> + >> + status =3D BS->OpenProtocol(handle, &serial, >> + (void**)&sio, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); >> + >> + if (EFI_ERROR(status)) { >> + printf("OpenProtocol: %lu\n", EFI_ERROR_CODE(status)); >> + return (CMD_ERROR); >> + } >> + >> + comc_port->currdev =3D handle; >> + comc_port->ioaddr =3D port; >> + comc_port->sio =3D sio; >> +=09 >> + (void) comc_setup(); >> + >> + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); >> + return (CMD_OK); >> +} >> + >> +static int >> +comc_speed_set(struct env_var *ev, int flags, const void *value) >> +{ >> + unsigned speed; >> + >> + if (value =3D=3D NULL) >> + return (CMD_ERROR); >> + >> + if (comc_parse_intval(value, &speed) !=3D CMD_OK)=20 >> + return (CMD_ERROR); >> + >> + comc_port->baudrate =3D speed; >> + (void) comc_setup(); >> + >> + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); >> + >> + return (CMD_OK); >> +} >> + >> +/* >> + * In case of error, we also reset ACTIVE flags, so the console >> + * framefork will try alternate consoles. >> + */ >> +static bool >> +comc_setup(void) >> +{ >> + EFI_STATUS status; >> + UINT32 control; >> + >> + /* port is not usable */ >> + if (comc_port->sio =3D=3D NULL) >> + return (false); >> + >> + status =3D comc_port->sio->Reset(comc_port->sio); >> + if (EFI_ERROR(status)) >> + return (false); >> + >> + status =3D comc_port->sio->SetAttributes(comc_port->sio, >> + comc_port->baudrate, 0, 0, comc_port->parity, >> + comc_port->databits, comc_port->stopbits); >> + if (EFI_ERROR(status)) >> + return (false); >> + >> + status =3D comc_port->sio->GetControl(comc_port->sio, &control); >> + if (EFI_ERROR(status)) >> + return (false); >> + if (comc_port->rtsdtr_off) { >> + control &=3D ~(EFI_SERIAL_REQUEST_TO_SEND | >> + EFI_SERIAL_DATA_TERMINAL_READY); >> + } else { >> + control |=3D EFI_SERIAL_REQUEST_TO_SEND; >> + } >> + (void) comc_port->sio->SetControl(comc_port->sio, control); >> + /* Mark this port usable. */ >> + comconsole.c_flags |=3D (C_PRESENTIN | C_PRESENTOUT); >> + return (true); >> +} >>=20 >> Modified: head/stand/efi/loader/main.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/stand/efi/loader/main.c Sat Mar 14 05:57:22 2020 = (r358988) >> +++ head/stand/efi/loader/main.c Sat Mar 14 06:36:03 2020 = (r358989) >> @@ -722,7 +722,8 @@ parse_uefi_con_out(void) >> while ((char *)node < ep) { >> pci_pending =3D false; >> if (DevicePathType(node) =3D=3D ACPI_DEVICE_PATH && >> - DevicePathSubType(node) =3D=3D ACPI_DP) { >> + (DevicePathSubType(node) =3D=3D ACPI_DP || >> + DevicePathSubType(node) =3D=3D ACPI_EXTENDED_DP)) { >> /* Check for Serial node */ >> acpi =3D (void *)node; >> if (EISA_ID_TO_NUM(acpi->HID) =3D=3D 0x501) { >> @@ -731,7 +732,7 @@ parse_uefi_con_out(void) >> } >> } else if (DevicePathType(node) =3D=3D = MESSAGING_DEVICE_PATH && >> DevicePathSubType(node) =3D=3D MSG_UART_DP) { >> - >> + com_seen =3D ++seen; >> uart =3D (void *)node; >> setenv_int("efi_com_speed", uart->BaudRate); >> } else if (DevicePathType(node) =3D=3D ACPI_DEVICE_PATH = && >> @@ -897,6 +898,11 @@ main(int argc, CHAR16 *argv[]) >> * changes to take effect, regardless of where they come from. >> */ >> setenv("console", "efi", 1); >> + uhowto =3D parse_uefi_con_out(); >> +#if defined(__aarch64__) || defined(__arm__) >> + if ((uhowto & RB_SERIAL) !=3D 0) >> + setenv("console", "comconsole", 1); >> +#endif >> cons_probe(); >>=20 >> /* Init the time source */ >> @@ -930,7 +936,6 @@ main(int argc, CHAR16 *argv[]) >> if (!has_kbd && (howto & RB_PROBE)) >> howto |=3D RB_SERIAL | RB_MULTIPLE; >> howto &=3D ~RB_PROBE; >> - uhowto =3D parse_uefi_con_out(); >>=20 >> /* >> * Read additional environment variables from the boot device's >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to = "svn-src-head-unsubscribe@freebsd.org" >>=20 From owner-svn-src-head@freebsd.org Fri Mar 27 15:28:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07664278942; Fri, 27 Mar 2020 15:28:22 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pm2q10gxz4K1S; Fri, 27 Mar 2020 15:28:19 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD0C3234B4; Fri, 27 Mar 2020 15:28:11 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RFSBla001932; Fri, 27 Mar 2020 15:28:11 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RFSB4N001931; Fri, 27 Mar 2020 15:28:11 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202003271528.02RFSB4N001931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Fri, 27 Mar 2020 15:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359364 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 359364 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 15:28:22 -0000 Author: chuck Date: Fri Mar 27 15:28:11 2020 New Revision: 359364 URL: https://svnweb.freebsd.org/changeset/base/359364 Log: bhyve: implement NVMe deallocate command This adds support for the Dataset Management (DSM) command to the NVMe emulation in general, and more specifically, for the deallocate attribute (a.k.a. trim in the ATA protocol). If the backing storage for the namespace supports delete (i.e. deallocate), setting the deallocate attribute in a DSM will trim/delete the requested LBA ranges in the underlying storage. Reviewed by: jhb, araujo, imp Approved by: jhb (maintainer) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21839 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:05 2020 (r359363) +++ head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:11 2020 (r359364) @@ -180,6 +180,7 @@ struct pci_nvme_blockstore { uint32_t sectsz; uint32_t sectsz_bits; uint64_t eui64; + uint32_t deallocate:1; }; struct pci_nvme_ioreq { @@ -209,6 +210,15 @@ struct pci_nvme_ioreq { struct iovec iovpadding[NVME_MAX_BLOCKIOVS-BLOCKIF_IOV_MAX]; }; +enum nvme_dsm_type { + /* Dataset Management bit in ONCS reflects backing storage capability */ + NVME_DATASET_MANAGEMENT_AUTO, + /* Unconditionally set Dataset Management bit in ONCS */ + NVME_DATASET_MANAGEMENT_ENABLE, + /* Unconditionally clear Dataset Management bit in ONCS */ + NVME_DATASET_MANAGEMENT_DISABLE, +}; + struct pci_nvme_softc { struct pci_devinst *nsc_pi; @@ -246,6 +256,8 @@ struct pci_nvme_softc { uint32_t intr_coales_aggr_time; /* 0x08: uS to delay intr */ uint32_t intr_coales_aggr_thresh; /* 0x08: compl-Q entries */ uint32_t async_ev_config; /* 0x0B: async event config */ + + enum nvme_dsm_type dataset_management; }; @@ -285,6 +297,9 @@ static void pci_nvme_io_partial(struct blockif_req *br ((NVME_STATUS_SCT_MASK << NVME_STATUS_SCT_SHIFT) |\ (NVME_STATUS_SC_MASK << NVME_STATUS_SC_SHIFT)) +#define NVME_ONCS_DSM (NVME_CTRLR_DATA_ONCS_DSM_MASK << \ + NVME_CTRLR_DATA_ONCS_DSM_SHIFT) + static __inline void cpywithpad(char *dst, size_t dst_size, const char *src, char pad) { @@ -363,6 +378,19 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) (4 << NVME_CTRLR_DATA_CQES_MIN_SHIFT); cd->nn = 1; /* number of namespaces */ + cd->oncs = 0; + switch (sc->dataset_management) { + case NVME_DATASET_MANAGEMENT_AUTO: + if (sc->nvstore.deallocate) + cd->oncs |= NVME_ONCS_DSM; + break; + case NVME_DATASET_MANAGEMENT_ENABLE: + cd->oncs |= NVME_ONCS_DSM; + break; + default: + break; + } + cd->fna = 0x03; cd->power_state[0].mp = 10; @@ -429,6 +457,9 @@ pci_nvme_init_nsdata(struct pci_nvme_softc *sc, nd->ncap = nd->nsze; nd->nuse = nd->nsze; + if (nvstore->type == NVME_STOR_BLOCKIF) + nvstore->deallocate = blockif_candelete(nvstore->ctx); + nd->nlbaf = 0; /* NLBAF is a 0's based value (i.e. 1 LBA Format) */ nd->flbas = 0; @@ -1340,7 +1371,7 @@ pci_nvme_io_done(struct blockif_req *br, int err) uint16_t code, status; DPRINTF(("%s error %d %s", __func__, err, strerror(err))); - + /* TODO return correct error */ code = err ? NVME_SC_DATA_TRANSFER_ERROR : NVME_SC_SUCCESS; pci_nvme_status_genc(&status, code); @@ -1359,7 +1390,128 @@ pci_nvme_io_partial(struct blockif_req *br, int err) pthread_cond_signal(&req->cv); } +static void +pci_nvme_dealloc_sm(struct blockif_req *br, int err) +{ + struct pci_nvme_ioreq *req = br->br_param; + struct pci_nvme_softc *sc = req->sc; + bool done = true; + uint16_t status; + if (err) { + pci_nvme_status_genc(&status, NVME_SC_INTERNAL_DEVICE_ERROR); + } else if ((req->prev_gpaddr + 1) == (req->prev_size)) { + pci_nvme_status_genc(&status, NVME_SC_SUCCESS); + } else { + struct iovec *iov = req->io_req.br_iov; + + req->prev_gpaddr++; + iov += req->prev_gpaddr; + + /* The iov_* values already include the sector size */ + req->io_req.br_offset = (off_t)iov->iov_base; + req->io_req.br_resid = iov->iov_len; + if (blockif_delete(sc->nvstore.ctx, &req->io_req)) { + pci_nvme_status_genc(&status, + NVME_SC_INTERNAL_DEVICE_ERROR); + } else + done = false; + } + + if (done) { + pci_nvme_set_completion(sc, req->nvme_sq, req->sqid, + req->cid, 0, status, 0); + pci_nvme_release_ioreq(sc, req); + } +} + +static int +nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, + struct nvme_command *cmd, + struct pci_nvme_blockstore *nvstore, + struct pci_nvme_ioreq *req, + uint16_t *status) +{ + int err = -1; + + if ((sc->ctrldata.oncs & NVME_ONCS_DSM) == 0) { + pci_nvme_status_genc(status, NVME_SC_INVALID_OPCODE); + goto out; + } + + if (cmd->cdw11 & NVME_DSM_ATTR_DEALLOCATE) { + struct nvme_dsm_range *range; + uint32_t nr, r; + int sectsz = sc->nvstore.sectsz; + + /* + * DSM calls are advisory only, and compliant controllers + * may choose to take no actions (i.e. return Success). + */ + if (!nvstore->deallocate) { + pci_nvme_status_genc(status, NVME_SC_SUCCESS); + goto out; + } + + if (req == NULL) { + pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); + goto out; + } + + /* copy locally because a range entry could straddle PRPs */ + range = calloc(1, NVME_MAX_DSM_TRIM); + if (range == NULL) { + pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); + goto out; + } + nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, cmd->prp1, cmd->prp2, + (uint8_t *)range, NVME_MAX_DSM_TRIM, NVME_COPY_FROM_PRP); + + req->opc = cmd->opc; + req->cid = cmd->cid; + req->nsid = cmd->nsid; + /* + * If the request is for more than a single range, store + * the ranges in the br_iov. Optimize for the common case + * of a single range. + * + * Note that NVMe Number of Ranges is a zero based value + */ + nr = cmd->cdw10 & 0xff; + + req->io_req.br_iovcnt = 0; + req->io_req.br_offset = range[0].starting_lba * sectsz; + req->io_req.br_resid = range[0].length * sectsz; + + if (nr == 0) { + req->io_req.br_callback = pci_nvme_io_done; + } else { + struct iovec *iov = req->io_req.br_iov; + + for (r = 0; r <= nr; r++) { + iov[r].iov_base = (void *)(range[r].starting_lba * sectsz); + iov[r].iov_len = range[r].length * sectsz; + } + req->io_req.br_callback = pci_nvme_dealloc_sm; + + /* + * Use prev_gpaddr to track the current entry and + * prev_size to track the number of entries + */ + req->prev_gpaddr = 0; + req->prev_size = r; + } + + err = blockif_delete(nvstore->ctx, &req->io_req); + if (err) + pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); + + free(range); + } +out: + return (err); +} + static void pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint16_t idx) { @@ -1411,16 +1563,27 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint continue; } - nblocks = (cmd->cdw12 & 0xFFFF) + 1; - - bytes = nblocks * sc->nvstore.sectsz; - if (sc->nvstore.type == NVME_STOR_BLOCKIF) { req = pci_nvme_get_ioreq(sc); req->nvme_sq = sq; req->sqid = idx; } + if (cmd->opc == NVME_OPC_DATASET_MANAGEMENT) { + if (nvme_opc_dataset_mgmt(sc, cmd, &sc->nvstore, req, + &status)) { + pci_nvme_set_completion(sc, sq, idx, cmd->cid, + 0, status, 1); + if (req) + pci_nvme_release_ioreq(sc, req); + } + continue; + } + + nblocks = (cmd->cdw12 & 0xFFFF) + 1; + + bytes = nblocks * sc->nvstore.sectsz; + /* * If data starts mid-page and flows into the next page, then * increase page count @@ -1869,6 +2032,7 @@ pci_nvme_parse_opts(struct pci_nvme_softc *sc, char *o sc->ioslots = NVME_IOSLOTS; sc->num_squeues = sc->max_queues; sc->num_cqueues = sc->max_queues; + sc->dataset_management = NVME_DATASET_MANAGEMENT_AUTO; sectsz = 0; uopt = strdup(opts); @@ -1913,6 +2077,13 @@ pci_nvme_parse_opts(struct pci_nvme_softc *sc, char *o } } else if (!strcmp("eui64", xopts)) { sc->nvstore.eui64 = htobe64(strtoull(config, NULL, 0)); + } else if (!strcmp("dsm", xopts)) { + if (!strcmp("auto", config)) + sc->dataset_management = NVME_DATASET_MANAGEMENT_AUTO; + else if (!strcmp("enable", config)) + sc->dataset_management = NVME_DATASET_MANAGEMENT_ENABLE; + else if (!strcmp("disable", config)) + sc->dataset_management = NVME_DATASET_MANAGEMENT_DISABLE; } else if (optidx == 0) { snprintf(bident, sizeof(bident), "%d:%d", sc->nsc_pi->pi_slot, sc->nsc_pi->pi_func); @@ -2032,8 +2203,12 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p sem_init(&sc->iosemlock, 0, sc->ioslots); pci_nvme_reset(sc); - pci_nvme_init_ctrldata(sc); + /* + * Controller data depends on Namespace data so initialize Namespace + * data first. + */ pci_nvme_init_nsdata(sc, &sc->nsdata, 1, &sc->nvstore); + pci_nvme_init_ctrldata(sc); pci_nvme_init_logpages(sc); pci_lintr_request(pi); From owner-svn-src-head@freebsd.org Fri Mar 27 15:28:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CF84278984; Fri, 27 Mar 2020 15:28:42 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pm3G04ytz4K8G; Fri, 27 Mar 2020 15:28:41 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 724A5234D2; Fri, 27 Mar 2020 15:28:17 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RFSHqp001978; Fri, 27 Mar 2020 15:28:17 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RFSHH5001977; Fri, 27 Mar 2020 15:28:17 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202003271528.02RFSHH5001977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Fri, 27 Mar 2020 15:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359365 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 359365 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 15:28:43 -0000 Author: chuck Date: Fri Mar 27 15:28:16 2020 New Revision: 359365 URL: https://svnweb.freebsd.org/changeset/base/359365 Log: bhyve: use STAILQ in NVMe emulation Use the standard queue(3) macros instead of hand-crafted linked list code. Reviewed by: imp, jhb Approved by: jhb (maintainer) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24081 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:11 2020 (r359364) +++ head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:16 2020 (r359365) @@ -185,7 +185,7 @@ struct pci_nvme_blockstore { struct pci_nvme_ioreq { struct pci_nvme_softc *sc; - struct pci_nvme_ioreq *next; + STAILQ_ENTRY(pci_nvme_ioreq) link; struct nvme_submission_queue *nvme_sq; uint16_t sqid; @@ -240,7 +240,7 @@ struct pci_nvme_softc { uint32_t num_squeues; struct pci_nvme_ioreq *ioreqs; - struct pci_nvme_ioreq *ioreqs_free; /* free list of ioreqs */ + STAILQ_HEAD(, pci_nvme_ioreq) ioreqs_free; /* free list of ioreqs */ uint32_t pending_ios; uint32_t ioslots; sem_t iosemlock; @@ -1319,8 +1319,7 @@ pci_nvme_release_ioreq(struct pci_nvme_softc *sc, stru pthread_mutex_lock(&sc->mtx); - req->next = sc->ioreqs_free; - sc->ioreqs_free = req; + STAILQ_INSERT_TAIL(&sc->ioreqs_free, req, link); sc->pending_ios--; /* when no more IO pending, can set to ready if device reset/enabled */ @@ -1341,12 +1340,10 @@ pci_nvme_get_ioreq(struct pci_nvme_softc *sc) sem_wait(&sc->iosemlock); pthread_mutex_lock(&sc->mtx); - req = sc->ioreqs_free; + req = STAILQ_FIRST(&sc->ioreqs_free); assert(req != NULL); + STAILQ_REMOVE_HEAD(&sc->ioreqs_free, link); - sc->ioreqs_free = req->next; - - req->next = NULL; req->sc = sc; sc->pending_ios++; @@ -2151,14 +2148,13 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p else error = 0; + STAILQ_INIT(&sc->ioreqs_free); sc->ioreqs = calloc(sc->ioslots, sizeof(struct pci_nvme_ioreq)); for (int i = 0; i < sc->ioslots; i++) { - if (i < (sc->ioslots-1)) - sc->ioreqs[i].next = &sc->ioreqs[i+1]; + STAILQ_INSERT_TAIL(&sc->ioreqs_free, &sc->ioreqs[i], link); pthread_mutex_init(&sc->ioreqs[i].mtx, NULL); pthread_cond_init(&sc->ioreqs[i].cv, NULL); } - sc->ioreqs_free = sc->ioreqs; sc->intr_coales_aggr_thresh = 1; pci_set_cfgdata16(pi, PCIR_DEVICE, 0x0A0A); From owner-svn-src-head@freebsd.org Fri Mar 27 15:28:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52F2227898D; Fri, 27 Mar 2020 15:28:43 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pm3G07xbz4K8J; Fri, 27 Mar 2020 15:28:41 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90DDC234D3; Fri, 27 Mar 2020 15:28:23 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RFSNc4002027; Fri, 27 Mar 2020 15:28:23 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RFSNWH002026; Fri, 27 Mar 2020 15:28:23 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202003271528.02RFSNWH002026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Fri, 27 Mar 2020 15:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359366 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 359366 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 15:28:43 -0000 Author: chuck Date: Fri Mar 27 15:28:22 2020 New Revision: 359366 URL: https://svnweb.freebsd.org/changeset/base/359366 Log: bhyve: fix NVMe emulation missed interrupts The bhyve NVMe emulation has a race in the logic which generates command completion interrupts. On FreeBSD guests, this manifests as kernel log messages similar to: nvme0: Missing interrupt The NVMe emulation code sets a per-submission queue "busy" flag while processing the submission queue, and only generates an interrupt when the submission queue is not busy. Aside from being counter to the NVMe design (i.e. interrupt properties are tied to the completion queue) and adding complexity (e.g. exceptions to not generating an interrupt when "busy"), it causes a race condition under the following conditions: - guest OS has no outstanding interrupts - guest OS submits a single NVMe IO command - bhyve emulation processes the SQ and sets the "busy" flag - bhyve emulation submits the asynchronous IO to the backing storage - IO request to the backing storage completes before the SQ processing loop exits and doesn't generate an interrupt because the SQ is "busy" - bhyve emulation finishes processing the SQ and clears the "busy" flag Fix is to remove the "busy" flag and generate an interrupt when the CQ head and tail pointers do not match. Reported by: khng300 Reviewed by: jhb, imp Approved by: jhb (maintainer) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24082 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:16 2020 (r359365) +++ head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:22 2020 (r359366) @@ -1082,12 +1082,12 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u struct nvme_command *cmd; struct nvme_submission_queue *sq; struct nvme_completion_queue *cq; - int do_intr = 0; uint16_t sqhead; DPRINTF(("%s index %u", __func__, (uint32_t)value)); sq = &sc->submit_queues[0]; + cq = &sc->compl_queues[0]; sqhead = atomic_load_acq_short(&sq->head); @@ -1107,44 +1107,44 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u switch (cmd->opc) { case NVME_OPC_DELETE_IO_SQ: DPRINTF(("%s command DELETE_IO_SQ", __func__)); - do_intr |= nvme_opc_delete_io_sq(sc, cmd, &compl); + nvme_opc_delete_io_sq(sc, cmd, &compl); break; case NVME_OPC_CREATE_IO_SQ: DPRINTF(("%s command CREATE_IO_SQ", __func__)); - do_intr |= nvme_opc_create_io_sq(sc, cmd, &compl); + nvme_opc_create_io_sq(sc, cmd, &compl); break; case NVME_OPC_DELETE_IO_CQ: DPRINTF(("%s command DELETE_IO_CQ", __func__)); - do_intr |= nvme_opc_delete_io_cq(sc, cmd, &compl); + nvme_opc_delete_io_cq(sc, cmd, &compl); break; case NVME_OPC_CREATE_IO_CQ: DPRINTF(("%s command CREATE_IO_CQ", __func__)); - do_intr |= nvme_opc_create_io_cq(sc, cmd, &compl); + nvme_opc_create_io_cq(sc, cmd, &compl); break; case NVME_OPC_GET_LOG_PAGE: DPRINTF(("%s command GET_LOG_PAGE", __func__)); - do_intr |= nvme_opc_get_log_page(sc, cmd, &compl); + nvme_opc_get_log_page(sc, cmd, &compl); break; case NVME_OPC_IDENTIFY: DPRINTF(("%s command IDENTIFY", __func__)); - do_intr |= nvme_opc_identify(sc, cmd, &compl); + nvme_opc_identify(sc, cmd, &compl); break; case NVME_OPC_ABORT: DPRINTF(("%s command ABORT", __func__)); - do_intr |= nvme_opc_abort(sc, cmd, &compl); + nvme_opc_abort(sc, cmd, &compl); break; case NVME_OPC_SET_FEATURES: DPRINTF(("%s command SET_FEATURES", __func__)); - do_intr |= nvme_opc_set_features(sc, cmd, &compl); + nvme_opc_set_features(sc, cmd, &compl); break; case NVME_OPC_GET_FEATURES: DPRINTF(("%s command GET_FEATURES", __func__)); - do_intr |= nvme_opc_get_features(sc, cmd, &compl); + nvme_opc_get_features(sc, cmd, &compl); break; case NVME_OPC_ASYNC_EVENT_REQUEST: DPRINTF(("%s command ASYNC_EVENT_REQ", __func__)); /* XXX dont care, unhandled for now - do_intr |= nvme_opc_async_event_req(sc, cmd, &compl); + nvme_opc_async_event_req(sc, cmd, &compl); */ compl.status = NVME_NO_STATUS; break; @@ -1152,15 +1152,12 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u WPRINTF(("0x%x command is not implemented", cmd->opc)); pci_nvme_status_genc(&compl.status, NVME_SC_INVALID_OPCODE); - do_intr |= 1; } if (NVME_COMPLETION_VALID(compl)) { struct nvme_completion *cp; int phase; - cq = &sc->compl_queues[0]; - cp = &(cq->qbase)[cq->tail]; cp->cdw0 = compl.cdw0; cp->sqid = 0; @@ -1180,7 +1177,7 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u atomic_store_short(&sq->head, sqhead); atomic_store_int(&sq->busy, 0); - if (do_intr) + if (cq->head != cq->tail) pci_generate_msix(sc->nsc_pi, 0); } @@ -1276,7 +1273,6 @@ pci_nvme_set_completion(struct pci_nvme_softc *sc, { struct nvme_completion_queue *cq = &sc->compl_queues[sq->cqid]; struct nvme_completion *compl; - int do_intr = 0; int phase; DPRINTF(("%s sqid %d cqid %u cid %u status: 0x%x 0x%x", @@ -1300,14 +1296,16 @@ pci_nvme_set_completion(struct pci_nvme_softc *sc, cq->tail = (cq->tail + 1) % cq->size; - if (cq->intr_en & NVME_CQ_INTEN) - do_intr = 1; - pthread_mutex_unlock(&cq->mtx); - if (ignore_busy || !atomic_load_acq_int(&sq->busy)) - if (do_intr) + if (cq->head != cq->tail) { + if (cq->intr_en & NVME_CQ_INTEN) { pci_generate_msix(sc->nsc_pi, cq->intr_vec); + } else { + DPRINTF(("%s: CQ%u interrupt disabled\n", + __func__, sq->cqid)); + } + } } static void From owner-svn-src-head@freebsd.org Fri Mar 27 15:28:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D2DD27898E; Fri, 27 Mar 2020 15:28:43 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pm3G07zZz4K8K; Fri, 27 Mar 2020 15:28:42 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84D5C234D4; Fri, 27 Mar 2020 15:28:28 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RFSSHE002071; Fri, 27 Mar 2020 15:28:28 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RFSSkt002070; Fri, 27 Mar 2020 15:28:28 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202003271528.02RFSSkt002070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Fri, 27 Mar 2020 15:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359367 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 359367 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 15:28:43 -0000 Author: chuck Date: Fri Mar 27 15:28:27 2020 New Revision: 359367 URL: https://svnweb.freebsd.org/changeset/base/359367 Log: bhyve: fix NVMe emulation update of SQHD The SQHD field of a Completion Queue entry indicates the current Submission Queue head pointer value. The head pointer represents the next entry to be consumed and is updated after consuming the current entry. In the Admin queue processing, the current code updates the head pointer after reporting the value to the host via the SQHD. This gives the impression that the Controller is perpetually one command behind in its processing of the Admin SQ. And while this doesn't appear to bother some initiators, it is wrong. Fix is to update the SQ head pointer prior to writing the SQHD value in the completion. While here, fix missed update of dword 0 (cdw0) in the completion message. Reported by: khng300 Reviewed by: jhb, imp Approved by: jhb (maintainer) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24083 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:22 2020 (r359366) +++ head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:27 2020 (r359367) @@ -1153,7 +1153,8 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u cmd->opc)); pci_nvme_status_genc(&compl.status, NVME_SC_INVALID_OPCODE); } - + sqhead = (sqhead + 1) % sq->size; + if (NVME_COMPLETION_VALID(compl)) { struct nvme_completion *cp; int phase; @@ -1170,7 +1171,6 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u cq->tail = (cq->tail + 1) % cq->size; } - sqhead = (sqhead + 1) % sq->size; } DPRINTF(("setting sqhead %u", sqhead)); @@ -1285,8 +1285,9 @@ pci_nvme_set_completion(struct pci_nvme_softc *sc, compl = &cq->qbase[cq->tail]; - compl->sqhd = atomic_load_acq_short(&sq->head); + compl->cdw0 = cdw0; compl->sqid = sqid; + compl->sqhd = atomic_load_acq_short(&sq->head); compl->cid = cid; // toggle phase From owner-svn-src-head@freebsd.org Fri Mar 27 15:35:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEB73278EAC; Fri, 27 Mar 2020 15:35:41 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pmCJ574vz4Mmn; Fri, 27 Mar 2020 15:35:40 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6970A234B2; Fri, 27 Mar 2020 15:28:06 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RFS6W7001887; Fri, 27 Mar 2020 15:28:06 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RFS6wJ001886; Fri, 27 Mar 2020 15:28:06 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202003271528.02RFS6wJ001886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Fri, 27 Mar 2020 15:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359363 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 359363 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 15:35:41 -0000 Author: chuck Date: Fri Mar 27 15:28:05 2020 New Revision: 359363 URL: https://svnweb.freebsd.org/changeset/base/359363 Log: bhyve: refactor NVMe namespace initialization Pass the struct pci_nvme_blockstore pointer for this namespace to the namespace initialization function instead of only the desired eui64 value. Minor functional change in that the code updates the eui64 value in the blockstore. Reviewed by: jhb, araujo Approved by: jhb (maintainer) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21838 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:00 2020 (r359362) +++ head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:05 2020 (r359363) @@ -421,20 +421,21 @@ crc16(uint16_t crc, const void *buffer, unsigned int l static void pci_nvme_init_nsdata(struct pci_nvme_softc *sc, struct nvme_namespace_data *nd, uint32_t nsid, - uint64_t eui64) + struct pci_nvme_blockstore *nvstore) { - nd->nsze = sc->nvstore.size / sc->nvstore.sectsz; + /* Get capacity and block size information from backing store */ + nd->nsze = nvstore->size / nvstore->sectsz; nd->ncap = nd->nsze; nd->nuse = nd->nsze; - /* Get LBA and backstore information from backing store */ nd->nlbaf = 0; /* NLBAF is a 0's based value (i.e. 1 LBA Format) */ nd->flbas = 0; /* Create an EUI-64 if user did not provide one */ - if (eui64 == 0) { + if (nvstore->eui64 == 0) { char *data = NULL; + uint64_t eui64 = nvstore->eui64; asprintf(&data, "%s%u%u%u", vmname, sc->nsc_pi->pi_bus, sc->nsc_pi->pi_slot, sc->nsc_pi->pi_func); @@ -443,12 +444,12 @@ pci_nvme_init_nsdata(struct pci_nvme_softc *sc, eui64 = OUI_FREEBSD_NVME_LOW | crc16(0, data, strlen(data)); free(data); } - eui64 = (eui64 << 16) | (nsid & 0xffff); + nvstore->eui64 = (eui64 << 16) | (nsid & 0xffff); } - be64enc(nd->eui64, eui64); + be64enc(nd->eui64, nvstore->eui64); /* LBA data-sz = 2^lbads */ - nd->lbaf[0] = sc->nvstore.sectsz_bits << NVME_NS_DATA_LBAF_LBADS_SHIFT; + nd->lbaf[0] = nvstore->sectsz_bits << NVME_NS_DATA_LBAF_LBADS_SHIFT; } static void @@ -2032,7 +2033,7 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p pci_nvme_reset(sc); pci_nvme_init_ctrldata(sc); - pci_nvme_init_nsdata(sc, &sc->nsdata, 1, sc->nvstore.eui64); + pci_nvme_init_nsdata(sc, &sc->nsdata, 1, &sc->nvstore); pci_nvme_init_logpages(sc); pci_lintr_request(pi); From owner-svn-src-head@freebsd.org Fri Mar 27 15:35:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E7CD278EDD; Fri, 27 Mar 2020 15:35:51 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pmCV2qtsz4MqC; Fri, 27 Mar 2020 15:35:50 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4E52234AE; Fri, 27 Mar 2020 15:28:00 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RFS0hW001843; Fri, 27 Mar 2020 15:28:00 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RFS03b001842; Fri, 27 Mar 2020 15:28:00 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202003271528.02RFS03b001842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Fri, 27 Mar 2020 15:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359362 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 359362 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 15:35:51 -0000 Author: chuck Date: Fri Mar 27 15:28:00 2020 New Revision: 359362 URL: https://svnweb.freebsd.org/changeset/base/359362 Log: bhyve: refactor NVMe PRP memcpy Add a "copy direction" parameter to nvme_prp_memcpy such that data can be copied to the memory specified by the PRP entries (current behavior) or copied from the PRP entries (new behavior). The upcoming deallocate functionality will use the copy from capability. Reviewed by: jhb, araujo Approved by: jhb (maintainer) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21837 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:26:30 2020 (r359361) +++ head/usr.sbin/bhyve/pci_nvme.c Fri Mar 27 15:28:00 2020 (r359362) @@ -140,6 +140,11 @@ enum nvme_cmd_cdw11 { NVME_CMD_CDW11_IV = 0xFFFF0000, }; +enum nvme_copy_dir { + NVME_COPY_TO_PRP, + NVME_COPY_FROM_PRP, +}; + #define NVME_CQ_INTEN 0x01 #define NVME_CQ_INTCOAL 0x02 @@ -545,10 +550,10 @@ pci_nvme_init_controller(struct vmctx *ctx, struct pci } static int -nvme_prp_memcpy(struct vmctx *ctx, uint64_t prp1, uint64_t prp2, uint8_t *src, - size_t len) +nvme_prp_memcpy(struct vmctx *ctx, uint64_t prp1, uint64_t prp2, uint8_t *b, + size_t len, enum nvme_copy_dir dir) { - uint8_t *dst; + uint8_t *p; size_t bytes; if (len > (8 * 1024)) { @@ -559,14 +564,17 @@ nvme_prp_memcpy(struct vmctx *ctx, uint64_t prp1, uint bytes = PAGE_SIZE - (prp1 & PAGE_MASK); bytes = MIN(bytes, len); - dst = vm_map_gpa(ctx, prp1, bytes); - if (dst == NULL) { + p = vm_map_gpa(ctx, prp1, bytes); + if (p == NULL) { return (-1); } - memcpy(dst, src, bytes); + if (dir == NVME_COPY_TO_PRP) + memcpy(p, b, bytes); + else + memcpy(b, p, bytes); - src += bytes; + b += bytes; len -= bytes; if (len == 0) { @@ -575,12 +583,15 @@ nvme_prp_memcpy(struct vmctx *ctx, uint64_t prp1, uint len = MIN(len, PAGE_SIZE); - dst = vm_map_gpa(ctx, prp2, len); - if (dst == NULL) { + p = vm_map_gpa(ctx, prp2, len); + if (p == NULL) { return (-1); } - memcpy(dst, src, len); + if (dir == NVME_COPY_TO_PRP) + memcpy(p, b, len); + else + memcpy(b, p, len); return (0); } @@ -726,16 +737,19 @@ nvme_opc_get_log_page(struct pci_nvme_softc* sc, struc switch (logpage) { case NVME_LOG_ERROR: nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, - command->prp2, (uint8_t *)&sc->err_log, logsize); + command->prp2, (uint8_t *)&sc->err_log, logsize, + NVME_COPY_TO_PRP); break; case NVME_LOG_HEALTH_INFORMATION: /* TODO: present some smart info */ nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, - command->prp2, (uint8_t *)&sc->health_log, logsize); + command->prp2, (uint8_t *)&sc->health_log, logsize, + NVME_COPY_TO_PRP); break; case NVME_LOG_FIRMWARE_SLOT: nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, - command->prp2, (uint8_t *)&sc->fw_log, logsize); + command->prp2, (uint8_t *)&sc->fw_log, logsize, + NVME_COPY_TO_PRP); break; default: WPRINTF(("%s get log page %x command not supported", @@ -760,12 +774,14 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nv switch (command->cdw10 & 0xFF) { case 0x00: /* return Identify Namespace data structure */ nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, - command->prp2, (uint8_t *)&sc->nsdata, sizeof(sc->nsdata)); + command->prp2, (uint8_t *)&sc->nsdata, sizeof(sc->nsdata), + NVME_COPY_TO_PRP); break; case 0x01: /* return Identify Controller data structure */ nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, command->prp2, (uint8_t *)&sc->ctrldata, - sizeof(sc->ctrldata)); + sizeof(sc->ctrldata), + NVME_COPY_TO_PRP); break; case 0x02: /* list of 1024 active NSIDs > CDW1.NSID */ dest = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, From owner-svn-src-head@freebsd.org Fri Mar 27 16:05:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFC96279AB4; Fri, 27 Mar 2020 16:05:59 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pmtC2RwQz4YbQ; Fri, 27 Mar 2020 16:05:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C19C123E47; Fri, 27 Mar 2020 16:05:37 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RG5bHl026369; Fri, 27 Mar 2020 16:05:37 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RG5beI026367; Fri, 27 Mar 2020 16:05:37 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003271605.02RG5beI026367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 27 Mar 2020 16:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359368 - head/etc X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 359368 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 16:05:59 -0000 Author: brooks Date: Fri Mar 27 16:05:37 2020 New Revision: 359368 URL: https://svnweb.freebsd.org/changeset/base/359368 Log: Create and use a tests group for the tests user. No user (except nobody) should be a member of the nobody group. Reported by: rgrimes Reviewed by: rgrimes MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24199 Modified: head/etc/group head/etc/master.passwd Modified: head/etc/group ============================================================================== --- head/etc/group Fri Mar 27 15:28:27 2020 (r359367) +++ head/etc/group Fri Mar 27 16:05:37 2020 (r359368) @@ -32,5 +32,6 @@ www:*:80: ntpd:*:123: _ypldap:*:160: hast:*:845: +tests:*:977: nogroup:*:65533: nobody:*:65534: Modified: head/etc/master.passwd ============================================================================== --- head/etc/master.passwd Fri Mar 27 15:28:27 2020 (r359367) +++ head/etc/master.passwd Fri Mar 27 16:05:37 2020 (r359368) @@ -25,5 +25,5 @@ www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/us ntpd:*:123:123::0:0:NTP Daemon:/var/db/ntp:/usr/sbin/nologin _ypldap:*:160:160::0:0:YP LDAP unprivileged user:/var/empty:/usr/sbin/nologin hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin -tests:*:977:65534::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin +tests:*:977:977::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin From owner-svn-src-head@freebsd.org Fri Mar 27 16:40:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5245B27A538; Fri, 27 Mar 2020 16:40:57 +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) server-signature RSA-PSS (4096 bits) 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 48pnfZ4hGQz3JWN; Fri, 27 Mar 2020 16:40:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-8.local (unknown [IPv6:2601:648:8881:1e90:b012:b1e1:5871:b934]) (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 B28AA44D4; Fri, 27 Mar 2020 16:40:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r359349 - head/gnu/usr.bin/binutils/ld To: Brandon Bergren , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003270112.02R1CBGE090824@repo.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: Fri, 27 Mar 2020 09:40:51 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003270112.02R1CBGE090824@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 16:40:57 -0000 On 3/26/20 6:12 PM, Brandon Bergren wrote: > Author: bdragon > Date: Fri Mar 27 01:12:11 2020 > New Revision: 359349 > URL: https://svnweb.freebsd.org/changeset/base/359349 > > Log: > Now that there are no remaining users of ld.bfd, remove the ld subdir. > > Deleted: > head/gnu/usr.bin/binutils/ld/ I think Ed mentioned some other cleanups to do as part of this change in ObsoleteFiles.inc as well? -- John Baldwin From owner-svn-src-head@freebsd.org Fri Mar 27 16:41:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1434727A778; Fri, 27 Mar 2020 16:41:57 +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 48pngm0bW8z3Jwd; Fri, 27 Mar 2020 16:41:55 +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 02RGfkkU042996; Fri, 27 Mar 2020 09:41:46 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 02RGfkQx042995; Fri, 27 Mar 2020 09:41:46 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003271641.02RGfkQx042995@gndrsh.dnsmgr.net> Subject: Re: svn commit: r359368 - head/etc In-Reply-To: <202003271605.02RG5beI026367@repo.freebsd.org> To: Brooks Davis Date: Fri, 27 Mar 2020 09:41:46 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@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: 48pngm0bW8z3Jwd X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 16:41:57 -0000 > Author: brooks > Date: Fri Mar 27 16:05:37 2020 > New Revision: 359368 > URL: https://svnweb.freebsd.org/changeset/base/359368 > > Log: > Create and use a tests group for the tests user. > > No user (except nobody) should be a member of the nobody group. > > Reported by: rgrimes > Reviewed by: rgrimes > MFC after: 3 days > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D24199 > > Modified: > head/etc/group > head/etc/master.passwd Thank you. > > Modified: head/etc/group > ============================================================================== > --- head/etc/group Fri Mar 27 15:28:27 2020 (r359367) > +++ head/etc/group Fri Mar 27 16:05:37 2020 (r359368) > @@ -32,5 +32,6 @@ www:*:80: > ntpd:*:123: > _ypldap:*:160: > hast:*:845: > +tests:*:977: > nogroup:*:65533: > nobody:*:65534: > > Modified: head/etc/master.passwd > ============================================================================== > --- head/etc/master.passwd Fri Mar 27 15:28:27 2020 (r359367) > +++ head/etc/master.passwd Fri Mar 27 16:05:37 2020 (r359368) > @@ -25,5 +25,5 @@ www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/us > ntpd:*:123:123::0:0:NTP Daemon:/var/db/ntp:/usr/sbin/nologin > _ypldap:*:160:160::0:0:YP LDAP unprivileged user:/var/empty:/usr/sbin/nologin > hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin > -tests:*:977:65534::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin > +tests:*:977:977::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin > nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Mar 27 17:03:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C62A27B395; Fri, 27 Mar 2020 17:03:01 +0000 (UTC) (envelope-from bdragon@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) server-signature RSA-PSS (4096 bits) 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 48pp844PBZz3x39; Fri, 27 Mar 2020 17:03:00 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id BCF7C4609; Fri, 27 Mar 2020 16:54:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id D603227C0054; Fri, 27 Mar 2020 12:54:44 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Fri, 27 Mar 2020 12:54:44 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehledgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdluddtmdenucfjughrpefofg ggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfuehrrghnughonhcuuegv rhhgrhgvnhdfuceosggurhgrghhonheshfhrvggvuefuffdrohhrgheqnecuffhomhgrih hnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrg hlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgv vgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id A6AE8C200A4; Fri, 27 Mar 2020 12:54:44 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-1021-g152deaf-fmstable-20200319v1 Mime-Version: 1.0 Message-Id: <99686e77-8baa-45f3-a80a-c901379eb595@www.fastmail.com> In-Reply-To: References: <202003270112.02R1CBGE090824@repo.freebsd.org> Date: Fri, 27 Mar 2020 11:54:22 -0500 From: "Brandon Bergren" To: "John Baldwin" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359349 - head/gnu/usr.bin/binutils/ld Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 17:03:01 -0000 On Fri, Mar 27, 2020, at 11:40 AM, John Baldwin wrote: > On 3/26/20 6:12 PM, Brandon Bergren wrote: > > Author: bdragon > > Date: Fri Mar 27 01:12:11 2020 > > New Revision: 359349 > > URL: https://svnweb.freebsd.org/changeset/base/359349 > > > > Log: > > Now that there are no remaining users of ld.bfd, remove the ld subdir. > > > > Deleted: > > head/gnu/usr.bin/binutils/ld/ > > I think Ed mentioned some other cleanups to do as part of this change in > ObsoleteFiles.inc as well? The problem is that they're still conditional on whether or not base/binutils is installed, so they *have* to live in OptionalObsoleteFiles.inc as far as I'm aware. > > -- > John Baldwin > -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-head@freebsd.org Fri Mar 27 17:37:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6C9D27BDC2; Fri, 27 Mar 2020 17:37:41 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48ppw41h8Bz49Q7; Fri, 27 Mar 2020 17:37:40 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8042F2511B; Fri, 27 Mar 2020 17:37:32 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RHbWR7080465; Fri, 27 Mar 2020 17:37:32 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RHbV0d080460; Fri, 27 Mar 2020 17:37:31 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202003271737.02RHbV0d080460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Fri, 27 Mar 2020 17:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359371 - in head/stand: forth lua X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in head/stand: forth lua X-SVN-Commit-Revision: 359371 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 17:37:42 -0000 Author: freqlabs Date: Fri Mar 27 17:37:31 2020 New Revision: 359371 URL: https://svnweb.freebsd.org/changeset/base/359371 Log: loader: Fully reset terminal settings, not just colors Reviewed by: kevans Reviewed by: tsoome Approved by: mav (mentor) MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D21733 Modified: head/stand/forth/loader.4th head/stand/forth/loader.rc head/stand/forth/screen.4th head/stand/lua/core.lua head/stand/lua/loader.lua Modified: head/stand/forth/loader.4th ============================================================================== --- head/stand/forth/loader.4th Fri Mar 27 17:06:24 2020 (r359370) +++ head/stand/forth/loader.4th Fri Mar 27 17:37:31 2020 (r359371) @@ -72,6 +72,12 @@ include /boot/check-password.4th only forth definitions +: maybe-resetcons ( -- ) + loader_color? if + ris + then +; + : bootmsg ( -- ) loader_color? dup ( -- bool bool ) if 7 fg 4 bg then Modified: head/stand/forth/loader.rc ============================================================================== --- head/stand/forth/loader.rc Fri Mar 27 17:06:24 2020 (r359370) +++ head/stand/forth/loader.rc Fri Mar 27 17:37:31 2020 (r359371) @@ -14,6 +14,7 @@ try-include /boot/loader.rc.local start maybe-efi-resizecons +maybe-resetcons \ Tests for password -- executes autoboot first if a password was defined check-password Modified: head/stand/forth/screen.4th ============================================================================== --- head/stand/forth/screen.4th Fri Mar 27 17:06:24 2020 (r359370) +++ head/stand/forth/screen.4th Fri Mar 27 17:37:31 2020 (r359371) @@ -39,6 +39,9 @@ marker task-screen.4th \ clear screen : clear ( -- ) ho cld ; +\ reset to initial state +: ris ( -- ) 27 emit [char] c emit ; + \ move cursor to x rows, y cols (1-based coords) ( Esc-[%d;%dH ) : at-xy ( x y -- ) escc .# [char] ; emit .# [char] H emit ; Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Fri Mar 27 17:06:24 2020 (r359370) +++ head/stand/lua/core.lua Fri Mar 27 17:37:31 2020 (r359371) @@ -103,6 +103,7 @@ core.KEY_DELETE = 127 -- other contexts (outside of Lua) may mean 'octal' core.KEYSTR_ESCAPE = "\027" core.KEYSTR_CSI = core.KEYSTR_ESCAPE .. "[" +core.KEYSTR_RESET = core.KEYSTR_ESCAPE .. "c" core.MENU_RETURN = "return" core.MENU_ENTRY = "entry" Modified: head/stand/lua/loader.lua ============================================================================== --- head/stand/lua/loader.lua Fri Mar 27 17:06:24 2020 (r359370) +++ head/stand/lua/loader.lua Fri Mar 27 17:37:31 2020 (r359371) @@ -38,28 +38,21 @@ local color = require("color") local core = require("core") local config = require("config") local password = require("password") --- The menu module will be brought in after config has loaded if we actually --- need it. -local menu config.load() --- Our console may have been setup for a different color scheme before we get --- here, so make sure we set the default. -if color.isEnabled() then - printc(color.default()) -end -try_include("local") -if not core.isMenuSkipped() then - menu = require("menu") -end if core.isUEFIBoot() then loader.perform("efi-autoresizecons") end +-- Our console may have been setup with different settings before we get +-- here, so make sure we reset everything back to default. +if color.isEnabled() then + printc(core.KEYSTR_RESET) +end +try_include("local") password.check() --- menu might be disabled -if menu ~= nil then - menu.run() +if not core.isMenuSkipped() then + require("menu").run() else -- Load kernel/modules before we go config.loadelf() From owner-svn-src-head@freebsd.org Fri Mar 27 17:40:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B5AE27BED8; Fri, 27 Mar 2020 17:40:36 +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) server-signature RSA-PSS (4096 bits) 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 48ppzQ5jKLz4BSg; Fri, 27 Mar 2020 17:40:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-8.local (unknown [IPv6:2601:648:8881:1e90:b012:b1e1:5871:b934]) (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 5483D4ABD; Fri, 27 Mar 2020 17:40:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r359349 - head/gnu/usr.bin/binutils/ld To: Brandon Bergren , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003270112.02R1CBGE090824@repo.freebsd.org> <99686e77-8baa-45f3-a80a-c901379eb595@www.fastmail.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: Fri, 27 Mar 2020 10:40:24 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <99686e77-8baa-45f3-a80a-c901379eb595@www.fastmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 17:40:36 -0000 On 3/27/20 9:54 AM, Brandon Bergren wrote: > > > On Fri, Mar 27, 2020, at 11:40 AM, John Baldwin wrote: >> On 3/26/20 6:12 PM, Brandon Bergren wrote: >>> Author: bdragon >>> Date: Fri Mar 27 01:12:11 2020 >>> New Revision: 359349 >>> URL: https://svnweb.freebsd.org/changeset/base/359349 >>> >>> Log: >>> Now that there are no remaining users of ld.bfd, remove the ld subdir. >>> >>> Deleted: >>> head/gnu/usr.bin/binutils/ld/ >> >> I think Ed mentioned some other cleanups to do as part of this change in >> ObsoleteFiles.inc as well? > > The problem is that they're still conditional on whether or not base/binutils is installed, so they *have* to live in OptionalObsoleteFiles.inc as far as I'm aware. Nope. We moved the GCC ones to ObsoleteFiles.inc and kept the conditionals for the ports version in that file. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Mar 27 18:04:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C781627CA32; Fri, 27 Mar 2020 18:04:06 +0000 (UTC) (envelope-from bdragon@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) server-signature RSA-PSS (4096 bits) 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 48pqVX3PkLz4LWM; Fri, 27 Mar 2020 18:04:04 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 234D34E48; Fri, 27 Mar 2020 18:03:59 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 4F36B27C0054; Fri, 27 Mar 2020 14:03:58 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Fri, 27 Mar 2020 14:03:58 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehledguddthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculddutddmnecujfgurhepof gfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdeurhgrnhguohhnuceu vghrghhrvghnfdcuoegsughrrghgohhnsefhrhgvvgeuufffrdhorhhgqeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhm vghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutd ekheduqdgsughrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 087A3C200A4; Fri, 27 Mar 2020 14:03:58 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-1021-g152deaf-fmstable-20200319v1 Mime-Version: 1.0 Message-Id: <052c15c5-f1da-4e61-ac90-2ed7a869fa6a@www.fastmail.com> In-Reply-To: References: <202003270112.02R1CBGE090824@repo.freebsd.org> <99686e77-8baa-45f3-a80a-c901379eb595@www.fastmail.com> Date: Fri, 27 Mar 2020 13:03:37 -0500 From: "Brandon Bergren" To: "John Baldwin" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359349 - head/gnu/usr.bin/binutils/ld Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 18:04:07 -0000 On Fri, Mar 27, 2020, at 12:40 PM, John Baldwin wrote: > Nope. We moved the GCC ones to ObsoleteFiles.inc and kept the conditionals > for the ports version in that file. Ha, I have no idea how I missed that, you're right. When I looked through it I somehow missed that there ARE conditionals in there. > > -- > John Baldwin > -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-head@freebsd.org Fri Mar 27 18:30:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9114827D3BF; Fri, 27 Mar 2020 18:30:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pr5B1TXwz4VjY; Fri, 27 Mar 2020 18:30:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DC8825ED5; Fri, 27 Mar 2020 18:25:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RIPP5X010864; Fri, 27 Mar 2020 18:25:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RIPOmR010857; Fri, 27 Mar 2020 18:25:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202003271825.02RIPOmR010857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 27 Mar 2020 18:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359374 - in head: . share/man/man4 share/man/man7 share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe sys/dev/cx... X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: . share/man/man4 share/man/man7 share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe sys/dev/cxgbe/crypto sys/dev/cxgbe/... X-SVN-Commit-Revision: 359374 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 18:30:41 -0000 Author: jhb Date: Fri Mar 27 18:25:23 2020 New Revision: 359374 URL: https://svnweb.freebsd.org/changeset/base/359374 Log: Refactor driver and consumer interfaces for OCF (in-kernel crypto). - The linked list of cryptoini structures used in session initialization is replaced with a new flat structure: struct crypto_session_params. This session includes a new mode to define how the other fields should be interpreted. Available modes include: - COMPRESS (for compression/decompression) - CIPHER (for simply encryption/decryption) - DIGEST (computing and verifying digests) - AEAD (combined auth and encryption such as AES-GCM and AES-CCM) - ETA (combined auth and encryption using encrypt-then-authenticate) Additional modes could be added in the future (e.g. if we wanted to support TLS MtE for AES-CBC in the kernel we could add a new mode for that. TLS modes might also affect how AAD is interpreted, etc.) The flat structure also includes the key lengths and algorithms as before. However, code doesn't have to walk the linked list and switch on the algorithm to determine which key is the auth key vs encryption key. The 'csp_auth_*' fields are always used for auth keys and settings and 'csp_cipher_*' for cipher. (Compression algorithms are stored in csp_cipher_alg.) - Drivers no longer register a list of supported algorithms. This doesn't quite work when you factor in modes (e.g. a driver might support both AES-CBC and SHA2-256-HMAC separately but not combined for ETA). Instead, a new 'crypto_probesession' method has been added to the kobj interface for symmteric crypto drivers. This method returns a negative value on success (similar to how device_probe works) and the crypto framework uses this value to pick the "best" driver. There are three constants for hardware (e.g. ccr), accelerated software (e.g. aesni), and plain software (cryptosoft) that give preference in that order. One effect of this is that if you request only hardware when creating a new session, you will no longer get a session using accelerated software. Another effect is that the default setting to disallow software crypto via /dev/crypto now disables accelerated software. Once a driver is chosen, 'crypto_newsession' is invoked as before. - Crypto operations are now solely described by the flat 'cryptop' structure. The linked list of descriptors has been removed. A separate enum has been added to describe the type of data buffer in use instead of using CRYPTO_F_* flags to make it easier to add more types in the future if needed (e.g. wired userspace buffers for zero-copy). It will also make it easier to re-introduce separate input and output buffers (in-kernel TLS would benefit from this). Try to make the flags related to IV handling less insane: - CRYPTO_F_IV_SEPARATE means that the IV is stored in the 'crp_iv' member of the operation structure. If this flag is not set, the IV is stored in the data buffer at the 'crp_iv_start' offset. - CRYPTO_F_IV_GENERATE means that a random IV should be generated and stored into the data buffer. This cannot be used with CRYPTO_F_IV_SEPARATE. If a consumer wants to deal with explicit vs implicit IVs, etc. it can always generate the IV however it needs and store partial IVs in the buffer and the full IV/nonce in crp_iv and set CRYPTO_F_IV_SEPARATE. The layout of the buffer is now described via fields in cryptop. crp_aad_start and crp_aad_length define the boundaries of any AAD. Previously with GCM and CCM you defined an auth crd with this range, but for ETA your auth crd had to span both the AAD and plaintext (and they had to be adjacent). crp_payload_start and crp_payload_length define the boundaries of the plaintext/ciphertext. Modes that only do a single operation (COMPRESS, CIPHER, DIGEST) should only use this region and leave the AAD region empty. If a digest is present (or should be generated), it's starting location is marked by crp_digest_start. Instead of using the CRD_F_ENCRYPT flag to determine the direction of the operation, cryptop now includes an 'op' field defining the operation to perform. For digests I've added a new VERIFY digest mode which assumes a digest is present in the input and fails the request with EBADMSG if it doesn't match the internally-computed digest. GCM and CCM already assumed this, and the new AEAD mode requires this for decryption. The new ETA mode now also requires this for decryption, so IPsec and GELI no longer do their own authentication verification. Simple DIGEST operations can also do this, though there are no in-tree consumers. To eventually support some refcounting to close races, the session cookie is now passed to crypto_getop() and clients should no longer set crp_sesssion directly. - Assymteric crypto operation structures should be allocated via crypto_getkreq() and freed via crypto_freekreq(). This permits the crypto layer to track open asym requests and close races with a driver trying to unregister while asym requests are in flight. - crypto_copyback, crypto_copydata, crypto_apply, and crypto_contiguous_subsegment now accept the 'crp' object as the first parameter instead of individual members. This makes it easier to deal with different buffer types in the future as well as separate input and output buffers. It's also simpler for driver writers to use. - bus_dmamap_load_crp() loads a DMA mapping for a crypto buffer. This understands the various types of buffers so that drivers that use DMA do not have to be aware of different buffer types. - Helper routines now exist to build an auth context for HMAC IPAD and OPAD. This reduces some duplicated work among drivers. - Key buffers are now treated as const throughout the framework and in device drivers. However, session key buffers provided when a session is created are expected to remain alive for the duration of the session. - GCM and CCM sessions now only specify a cipher algorithm and a cipher key. The redundant auth information is not needed or used. - For cryptosoft, split up the code a bit such that the 'process' callback now invokes a function pointer in the session. This function pointer is set based on the mode (in effect) though it simplifies a few edge cases that would otherwise be in the switch in 'process'. It does split up GCM vs CCM which I think is more readable even if there is some duplication. - I changed /dev/crypto to support GMAC requests using CRYPTO_AES_NIST_GMAC as an auth algorithm and updated cryptocheck to work with it. - Combined cipher and auth sessions via /dev/crypto now always use ETA mode. The COP_F_CIPHER_FIRST flag is now a no-op that is ignored. This was actually documented as being true in crypto(4) before, but the code had not implemented this before I added the CIPHER_FIRST flag. - I have not yet updated /dev/crypto to be aware of explicit modes for sessions. I will probably do that at some point in the future as well as teach it about IV/nonce and tag lengths for AEAD so we can support all of the NIST KAT tests for GCM and CCM. - I've split up the exising crypto.9 manpage into several pages of which many are written from scratch. - I have converted all drivers and consumers in the tree and verified that they compile, but I have not tested all of them. I have tested the following drivers: - cryptosoft - aesni (AES only) - blake2 - ccr and the following consumers: - cryptodev - IPsec - ktls_ocf - GELI (lightly) I have not tested the following: - ccp - aesni with sha - hifn - kgssapi_krb5 - ubsec - padlock - safe - armv8_crypto (aarch64) - glxsb (i386) - sec (ppc) - cesa (armv7) - cryptocteon (mips64) - nlmsec (mips64) Discussed with: cem Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D23677 Added: head/share/man/man9/crypto_asym.9 (contents, props changed) head/share/man/man9/crypto_driver.9 (contents, props changed) head/share/man/man9/crypto_request.9 (contents, props changed) head/share/man/man9/crypto_session.9 (contents, props changed) Deleted: head/sys/opencrypto/cryptosoft.h Modified: head/ObsoleteFiles.inc head/share/man/man4/crypto.4 head/share/man/man7/crypto.7 head/share/man/man9/Makefile head/share/man/man9/bus_dma.9 head/share/man/man9/crypto.9 head/sys/crypto/aesni/aesni.c head/sys/crypto/aesni/aesni.h head/sys/crypto/aesni/aesni_wrap.c head/sys/crypto/armv8/armv8_crypto.c head/sys/crypto/blake2/blake2_cryptodev.c head/sys/crypto/ccp/ccp.c head/sys/crypto/ccp/ccp.h head/sys/crypto/ccp/ccp_hardware.c head/sys/crypto/via/padlock.c head/sys/crypto/via/padlock.h head/sys/crypto/via/padlock_cipher.c head/sys/crypto/via/padlock_hash.c head/sys/dev/cesa/cesa.c head/sys/dev/cesa/cesa.h head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/crypto/t4_crypto.c head/sys/dev/cxgbe/crypto/t4_keyctx.c head/sys/dev/cxgbe/tom/t4_tls.c head/sys/dev/glxsb/glxsb.c head/sys/dev/glxsb/glxsb.h head/sys/dev/glxsb/glxsb_hash.c head/sys/dev/hifn/hifn7751.c head/sys/dev/hifn/hifn7751var.h head/sys/dev/safe/safe.c head/sys/dev/safe/safevar.h head/sys/dev/sec/sec.c head/sys/dev/sec/sec.h head/sys/dev/ubsec/ubsec.c head/sys/dev/ubsec/ubsecvar.h head/sys/geom/eli/g_eli.c head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_crypto.c head/sys/geom/eli/g_eli_integrity.c head/sys/geom/eli/g_eli_privacy.c head/sys/kern/subr_bus_dma.c head/sys/kern/uipc_ktls.c head/sys/kgssapi/krb5/kcrypto_aes.c head/sys/kgssapi/krb5/kcrypto_des.c head/sys/kgssapi/krb5/kcrypto_des3.c head/sys/mips/cavium/cryptocteon/cavium_crypto.c head/sys/mips/cavium/cryptocteon/cryptocteon.c head/sys/mips/cavium/cryptocteon/cryptocteonvar.h head/sys/mips/nlm/dev/sec/nlmrsa.c head/sys/mips/nlm/dev/sec/nlmsec.c head/sys/mips/nlm/dev/sec/nlmseclib.c head/sys/mips/nlm/dev/sec/nlmseclib.h head/sys/mips/nlm/hal/nlmsaelib.h head/sys/netipsec/xform.h head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c head/sys/opencrypto/criov.c head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.c head/sys/opencrypto/cryptodev.h head/sys/opencrypto/cryptodev_if.m head/sys/opencrypto/cryptosoft.c head/sys/opencrypto/ktls_ocf.c head/sys/opencrypto/xform_gmac.c head/sys/sys/bus_dma.h head/sys/sys/param.h head/tests/sys/opencrypto/cryptodev.py head/tests/sys/opencrypto/cryptodevh.py head/tests/sys/opencrypto/cryptotest.py head/tools/tools/crypto/cryptocheck.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Mar 27 18:20:36 2020 (r359373) +++ head/ObsoleteFiles.inc Fri Mar 27 18:25:23 2020 (r359374) @@ -36,6 +36,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20200327: OCF refactoring +OLD_FILES+=usr/share/man/man9/crypto_find_driver.9 +OLD_FILES+=usr/share/man/man9/crypto_register.9 +OLD_FILES+=usr/share/man/man9/crypto_unregister.9 + # 20200323: INTERNALLIB don't install headers anymore OLD_FILES+=usr/include/libelftc.h OLD_FILES+=usr/include/libifconfig.h Modified: head/share/man/man4/crypto.4 ============================================================================== --- head/share/man/man4/crypto.4 Fri Mar 27 18:20:36 2020 (r359373) +++ head/share/man/man4/crypto.4 Fri Mar 27 18:25:23 2020 (r359374) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 17, 2019 +.Dd March 27, 2020 .Dt CRYPTO 4 .Os .Sh NAME @@ -156,7 +156,7 @@ file desriptor. The symmetric-key operation mode provides a context-based API to traditional symmetric-key encryption (or privacy) algorithms, or to keyed and unkeyed one-way hash (HMAC and MAC) algorithms. -The symmetric-key mode also permits fused operation, +The symmetric-key mode also permits encrypt-then-authenticate fused operation, where the hardware performs both a privacy algorithm and an integrity-check algorithm in a single pass over the data: either a fused encrypt/HMAC-generate operation, or a fused HMAC-verify/decrypt operation. @@ -314,16 +314,14 @@ supplies the length of the input buffer; the fields .Fa cr_op-\*[Gt]iv supply the addresses of the input buffer, output buffer, one-way hash, and initialization vector, respectively. -If a session is using both a privacy algorithm and a hash algorithm, -the request will generate a hash of the input buffer before -generating the output buffer by default. -If the -.Dv COP_F_CIPHER_FIRST -flag is included in the -.Fa cr_op-\*[Gt]flags -field, -then the request will generate a hash of the output buffer after -executing the privacy algorithm. +.Pp +If a session is using either fused encrypt-then-authenticate or +an AEAD algorithm, +decryption operations require the associated hash as an input. +If the hash is incorrect, the +operation will fail with +.Dv EBADMSG +and the output buffer will remain unchanged. .It Dv CIOCCRYPTAEAD Fa struct crypt_aead *cr_aead .Bd -literal struct crypt_aead { Modified: head/share/man/man7/crypto.7 ============================================================================== --- head/share/man/man7/crypto.7 Fri Mar 27 18:20:36 2020 (r359373) +++ head/share/man/man7/crypto.7 Fri Mar 27 18:25:23 2020 (r359374) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2015 +.Dd March 27, 2020 .Dt CRYPTO 7 .Os .Sh NAME @@ -68,19 +68,13 @@ This algorithm implements Cipher-block chaining. .El .Pp This algorithm implements Galois/Counter Mode. -This is the cipher part of an AEAD +This cipher uses AEAD .Pq Authenticated Encryption with Associated Data mode. -This requires use of the use of a proper authentication mode, one of -.Dv CRYPTO_AES_128_NIST_GMAC , -.Dv CRYPTO_AES_192_NIST_GMAC -or -.Dv CRYPTO_AES_256_NIST_GMAC , -that corresponds with the number of bits in the key that you are using. .Pp -The associated data (if any) must be provided by the authentication mode op. -The authentication tag will be read/written from/to the offset crd_inject -specified in the descriptor for the authentication mode. +The authentication tag will be read/written from/to the offset +.Va crp_digest_start +specified in the request. .Pp Note: You must provide an IV on every call. .It Dv CRYPTO_AES_ICM @@ -117,22 +111,6 @@ as defined in NIST SP 800-38E. .Pp NOTE: The ciphertext stealing part is not implemented which is why this cipher is listed as having a block size of 16 instead of 1. -.El -.Pp -Authentication algorithms: -.Bl -tag -width ".Dv CRYPTO_AES_256_NIST_GMAC" -.It CRYPTO_AES_128_NIST_GMAC -See -.Dv CRYPTO_AES_NIST_GCM_16 -in the cipher mode section. -.It CRYPTO_AES_192_NIST_GMAC -See -.Dv CRYPTO_AES_NIST_GCM_16 -in the cipher mode section. -.It CRYPTO_AES_256_NIST_GMAC -See -.Dv CRYPTO_AES_NIST_GCM_16 -in the cipher mode section. .El .Sh SEE ALSO .Xr crypto 4 , Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Fri Mar 27 18:20:36 2020 (r359373) +++ head/share/man/man9/Makefile Fri Mar 27 18:25:23 2020 (r359374) @@ -71,6 +71,10 @@ MAN= accept_filter.9 \ cr_seeothergids.9 \ cr_seeotheruids.9 \ crypto.9 \ + crypto_asym.9 \ + crypto_driver.9 \ + crypto_request.9 \ + crypto_session.9 \ CTASSERT.9 \ DB_COMMAND.9 \ DECLARE_GEOM_CLASS.9 \ @@ -889,20 +893,33 @@ MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \ cpuset.9 CPU_COPY_STORE_REL.9 MLINKS+=critical_enter.9 critical.9 \ critical_enter.9 critical_exit.9 -MLINKS+=crypto.9 crypto_dispatch.9 \ - crypto.9 crypto_done.9 \ - crypto.9 crypto_freereq.9 \ - crypto.9 crypto_freesession.9 \ - crypto.9 crypto_get_driverid.9 \ - crypto.9 crypto_getreq.9 \ - crypto.9 crypto_kdispatch.9 \ - crypto.9 crypto_kdone.9 \ - crypto.9 crypto_kregister.9 \ - crypto.9 crypto_newsession.9 \ - crypto.9 crypto_register.9 \ - crypto.9 crypto_unblock.9 \ - crypto.9 crypto_unregister.9 \ - crypto.9 crypto_unregister_all.9 +MLINKS+=crypto_asym.9 crypto_kdispatch.9 \ + crypto_asym.9 crypto_kdone.9 \ + crypto_asym.9 crypto_kregister.9 \ + crypto_asym.9 CRYPTODEV_KPROCESS.9 +MLINKS+=crypto_driver.9 crypto_apply.9 \ + crypto_driver.9 crypto_contiguous_segment.9 \ + crypto_driver.9 crypto_copyback.9 \ + crypto_driver.9 crypto_copydata.9 \ + crypto_driver.9 crypto_done.9 \ + crypto_driver.9 crypto_get_driverid.9 \ + crypto_driver.9 crypto_get_driver_session.9 \ + crypto_driver.9 crypto_unblock.9 \ + crypto_driver.9 crypto_unregister_all.9 \ + crypto_driver.9 CRYPTODEV_FREESESSION.9 \ + crypto_driver.9 CRYPTODEV_NEWSESSION.9 \ + crypto_driver.9 CRYPTODEV_PROBESESSION.9 \ + crypto_driver.9 CRYPTODEV_PROCESS.9 \ + crypto_driver.9 hmac_init_ipad.9 \ + crypto_driver.9 hmac_init_opad.9 +MLINKS+=crypto_request.9 crypto_dispatch.9 \ + crypto_request.9 crypto_freereq.9 \ + crypto_request.9 crypto_getreq.9 +MLINKS+=crypto_session.9 crypto_auth_hash.9 \ + crypto_session.9 crypto_cipher.9 \ + crypto_session.9 crypto_get_params.9 \ + crypto_session.9 crypto_newsession.9 \ + crypto_session.9 crypto_freesession.9 MLINKS+=DB_COMMAND.9 DB_SHOW_ALL_COMMAND.9 \ DB_COMMAND.9 DB_SHOW_COMMAND.9 MLINKS+=DECLARE_MODULE.9 DECLARE_MODULE_TIED.9 Modified: head/share/man/man9/bus_dma.9 ============================================================================== --- head/share/man/man9/bus_dma.9 Fri Mar 27 18:20:36 2020 (r359373) +++ head/share/man/man9/bus_dma.9 Fri Mar 27 18:25:23 2020 (r359374) @@ -53,7 +53,7 @@ .\" $FreeBSD$ .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $ .\" -.Dd August 11, 2018 +.Dd March 27, 2020 .Dt BUS_DMA 9 .Os .Sh NAME @@ -68,6 +68,7 @@ .Nm bus_dmamap_load , .Nm bus_dmamap_load_bio , .Nm bus_dmamap_load_ccb , +.Nm bus_dmamap_load_crp , .Nm bus_dmamap_load_mbuf , .Nm bus_dmamap_load_mbuf_sg , .Nm bus_dmamap_load_uio , @@ -118,6 +119,10 @@ "union ccb *ccb" "bus_dmamap_callback_t *callback" "void *callback_arg" \ "int flags" .Ft int +.Fn bus_dmamap_load_crp "bus_dma_tag_t dmat" "bus_dmamap_t map" \ +"struct crypto *crp" "bus_dmamap_callback_t *callback" "void *callback_arg" \ +"int flags" +.Ft int .Fn bus_dmamap_load_mbuf "bus_dma_tag_t dmat" "bus_dmamap_t map" \ "struct mbuf *mbuf" "bus_dmamap_callback2_t *callback" "void *callback_arg" \ "int flags" @@ -387,9 +392,10 @@ the load of a .Vt bus_dmamap_t via .Fn bus_dmamap_load , -.Fn bus_dmamap_load_bio +.Fn bus_dmamap_load_bio , +.Fn bus_dmamap_load_ccb , or -.Fn bus_dmamap_load_ccb . +.Fn bus_dmamap_load_crp . Callbacks are of the format: .Bl -tag -width indent .It Ft void @@ -879,6 +885,15 @@ XPT_CONT_TARGET_IO .It XPT_SCSI_IO .El +.It Fn bus_dmamap_load_crp "dmat" "map" "crp" "callback" "callback_arg" "flags" +This is a variation of +.Fn bus_dmamap_load +which maps buffers pointed to by +.Fa crp +for DMA transfers. +The +.Dv BUS_DMA_NOWAIT +flag is implied, thus no callback deferral will happen. .It Fn bus_dmamap_load_mbuf "dmat" "map" "mbuf" "callback2" "callback_arg" \ "flags" This is a variation of Modified: head/share/man/man9/crypto.9 ============================================================================== --- head/share/man/man9/crypto.9 Fri Mar 27 18:20:36 2020 (r359373) +++ head/share/man/man9/crypto.9 Fri Mar 27 18:25:23 2020 (r359374) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 17, 2019 +.Dd March 27, 2020 .Dt CRYPTO 9 .Os .Sh NAME @@ -25,120 +25,50 @@ .Nd API for cryptographic services in the kernel .Sh SYNOPSIS .In opencrypto/cryptodev.h -.Ft int32_t -.Fn crypto_get_driverid "device_t dev" "size_t session_size" "int flags" -.Ft int -.Fn crypto_register "uint32_t driverid" "int alg" "uint16_t maxoplen" "uint32_t flags" -.Ft int -.Fn crypto_kregister "uint32_t driverid" "int kalg" "uint32_t flags" -.Ft int -.Fn crypto_unregister "uint32_t driverid" "int alg" -.Ft int -.Fn crypto_unregister_all "uint32_t driverid" -.Ft void -.Fn crypto_done "struct cryptop *crp" -.Ft void -.Fn crypto_kdone "struct cryptkop *krp" -.Ft int -.Fn crypto_find_driver "const char *match" -.Ft int -.Fn crypto_newsession "crypto_session_t *cses" "struct cryptoini *cri" "int crid" -.Ft int -.Fn crypto_freesession "crypto_session_t cses" -.Ft int -.Fn crypto_dispatch "struct cryptop *crp" -.Ft int -.Fn crypto_kdispatch "struct cryptkop *krp" -.Ft int -.Fn crypto_unblock "uint32_t driverid" "int what" -.Ft "struct cryptop *" -.Fn crypto_getreq "int num" -.Ft void -.Fn crypto_freereq "struct cryptop *crp" -.Bd -literal -#define CRYPTO_SYMQ 0x1 -#define CRYPTO_ASYMQ 0x2 - -#define EALG_MAX_BLOCK_LEN 16 - -struct cryptoini { - int cri_alg; - int cri_klen; - int cri_mlen; - caddr_t cri_key; - uint8_t cri_iv[EALG_MAX_BLOCK_LEN]; - struct cryptoini *cri_next; -}; - -struct cryptodesc { - int crd_skip; - int crd_len; - int crd_inject; - int crd_flags; - struct cryptoini CRD_INI; -#define crd_iv CRD_INI.cri_iv -#define crd_key CRD_INI.cri_key -#define crd_alg CRD_INI.cri_alg -#define crd_klen CRD_INI.cri_klen - struct cryptodesc *crd_next; -}; - -struct cryptop { - TAILQ_ENTRY(cryptop) crp_next; - crypto_session_t crp_session; - int crp_ilen; - int crp_olen; - int crp_etype; - int crp_flags; - caddr_t crp_buf; - caddr_t crp_opaque; - struct cryptodesc *crp_desc; - int (*crp_callback) (struct cryptop *); - caddr_t crp_mac; -}; - -struct crparam { - caddr_t crp_p; - u_int crp_nbits; -}; - -#define CRK_MAXPARAM 8 - -struct cryptkop { - TAILQ_ENTRY(cryptkop) krp_next; - u_int krp_op; /* ie. CRK_MOD_EXP or other */ - u_int krp_status; /* return status */ - u_short krp_iparams; /* # of input parameters */ - u_short krp_oparams; /* # of output parameters */ - uint32_t krp_hid; - struct crparam krp_param[CRK_MAXPARAM]; - int (*krp_callback)(struct cryptkop *); -}; -.Ed .Sh DESCRIPTION .Nm -is a framework for drivers of cryptographic hardware to register with -the kernel so -.Dq consumers -(other kernel subsystems, and -users through the +is a framework for in-kernel cryptography. +It permits in-kernel consumers to encrypt and decrypt data +and also enables userland applications to use cryptographic hardware +through the .Pa /dev/crypto -device) are able to make use of it. -Drivers register with the framework the algorithms they support, -and provide entry points (functions) the framework may call to -establish, use, and tear down sessions. -Sessions are used to cache cryptographic information in a particular driver -(or associated hardware), so initialization is not needed with every request. -Consumers of cryptographic services pass a set of -descriptors that instruct the framework (and the drivers registered -with it) of the operations that should be applied on the data (more -than one cryptographic operation can be requested). +device. .Pp -Keying operations are supported as well. -Unlike the symmetric operators described above, -these sessionless commands perform mathematical operations using -input and output parameters. +.Nm +supports two modes of operation: +one mode for symmetric-keyed cryptographic requests and digest, +and a second mode for asymmetric-key requests and modular arithmetic. +.Ss Symmetric-Key Mode +Symmetric-key operations include encryption and decryption operations +using block and stream ciphers as well as computation and verification +of message authentication codes (MACs). +In this mode, +consumers allocate sessions to describe a transform as discussed in +.Xr crypto_session 9 . +Consumers then allocate request objects to describe each transformation +such as encrypting a network packet or decrypting a disk sector. +Requests are described in +.Xr crypto_request 9 . .Pp +Device drivers are responsible for processing requests submitted by +consumers. +.Xr crypto_driver 9 +describes the interfaces drivers use to register with the framework, +helper routines the framework provides to faciliate request processing, +and the interfaces drivers are required to provide. +.Ss Asymmetric-Key Mode +Assymteric-key operations do not use sessions. +Instead, +these operations perform individual mathematical operations using a set +of input and output parameters. +These operations are described in +.Xr crypto_asym 9 . +Drivers that support asymmetric operations use additional interfaces +described in +.Xr crypto_asym 9 +in addition to the base interfaces described in +.Xr crypto_driver 9 . +.Ss Callbacks Since the consumers may not be associated with a process, drivers may not .Xr sleep 9 . @@ -148,88 +78,38 @@ to notify a consumer that a request has been completed callback is specified by the consumer on a per-request basis). The callback is invoked by the framework whether the request was successfully completed or not. -An error indication is provided in the latter case. -A specific error code, +Errors are reported to the callback function. +.Pp +Session initialization does not use callbacks and returns errors +synchronously. +.Ss Session Migration +For symmetric-key operations, +a specific error code, .Er EAGAIN , is used to indicate that a session handle has changed and that the request may be re-submitted immediately with the new session. -Errors are only returned to the invoking function if not -enough information to call the callback is available (meaning, there -was a fatal error in verifying the arguments). -For session initialization and teardown no callback mechanism is used. +The consumer should update its saved copy of the session handle +to the value of +.Fa crp_session +so that future requests use the new session. +.Ss Supported Algorithms +More details on some algorithms may be found in +.Xr crypto 7 . +These algorithms are used for symmetric-mode operations. +Asymmetric-mode operations support operations described in +.Xr crypto_asym 9 . .Pp -The -.Fn crypto_find_driver -returns the driver id of the device whose name matches -.Fa match . -.Fa match -can either be the exact name of a device including the unit -or the driver name without a unit. -In the latter case, -the id of the first device with the matching driver name is returned. -If no matching device is found, -the value -1 is returned. +The following authentication algorithms are supported: .Pp -The -.Fn crypto_newsession -routine is called by consumers of cryptographic services (such as the -.Xr ipsec 4 -stack) that wish to establish a new session with the framework. -The -.Fa cri -argument points to a -.Vt cryptoini -structure containing all the necessary information for -the driver to establish the session. -The -.Fa crid -argument is either a specific driver id or a bitmask of flags. -The flags are -.Dv CRYPTOCAP_F_HARDWARE , -to select hardware devices, -or -.Dv CRYPTOCAP_F_SOFTWARE , -to select software devices. -If both are specified, hardware devices are preferred over software -devices. -On success, the opaque session handle of the new session will be stored in -.Fa *cses . -The -.Vt cryptoini -structure pointed to by -.Fa cri -contains these fields: -.Bl -tag -width ".Va cri_next" -.It Va cri_alg -An algorithm identifier. -Currently supported algorithms are: -.Pp -.Bl -tag -width ".Dv CRYPTO_RIPEMD160_HMAC" -compact -.It Dv CRYPTO_AES_128_NIST_GMAC -.It Dv CRYPTO_AES_192_NIST_GMAC -.It Dv CRYPTO_AES_256_NIST_GMAC -.It Dv CRYPTO_AES_CBC -.It Dv CRYPTO_AES_CCM_16 +.Bl -tag -offset indent -width CRYPTO_AES_CCM_CBC_MAC -compact .It Dv CRYPTO_AES_CCM_CBC_MAC -.It Dv CRYPTO_AES_ICM -.It Dv CRYPTO_AES_NIST_GCM_16 .It Dv CRYPTO_AES_NIST_GMAC -.It Dv CRYPTO_AES_XTS -.It Dv CRYPTO_ARC4 .It Dv CRYPTO_BLAKE2B .It Dv CRYPTO_BLAKE2S -.It Dv CRYPTO_BLF_CBC -.It Dv CRYPTO_CAMELLIA_CBC -.It Dv CRYPTO_CAST_CBC -.It Dv CRYPTO_CHACHA20 -.It Dv CRYPTO_DEFLATE_COMP -.It Dv CRYPTO_DES_CBC -.It Dv CRYPTO_3DES_CBC .It Dv CRYPTO_MD5 .It Dv CRYPTO_MD5_HMAC .It Dv CRYPTO_MD5_KPDK .It Dv CRYPTO_NULL_HMAC -.It Dv CRYPTO_NULL_CBC .It Dv CRYPTO_POLY1305 .It Dv CRYPTO_RIPEMD160 .It Dv CRYPTO_RIPEMD160_HMAC @@ -244,488 +124,38 @@ Currently supported algorithms are: .It Dv CRYPTO_SHA2_384_HMAC .It Dv CRYPTO_SHA2_512 .It Dv CRYPTO_SHA2_512_HMAC -.It Dv CRYPTO_SKIPJACK_CBC .El -.It Va cri_klen -For variable-size key algorithms, the length of the key in bits. -.It Va cri_mlen -If non-zero, truncate the calculated hash to this many bytes. -.It Va cri_key -The key to be used. -.It Va cri_iv -An explicit initialization vector if it does not prefix -the data. -This field is ignored during initialization -.Pq Nm crypto_newsession . -If no IV is explicitly passed (see below on details), a random IV is used -by the device driver processing the request. -.It Va cri_next -Pointer to another -.Vt cryptoini -structure. -This is used to establish dual-algorithm sessions, such as combining a -cipher with a MAC. -.El .Pp -The -.Vt cryptoini -structure and its contents will not be modified or referenced by the -framework or any cryptographic drivers. -The memory associated with -.Fa cri -can be released once -.Fn crypto_newsession -returns. +The following encryption algorithms are supported: .Pp -.Fn crypto_freesession -is called with the session handle returned by -.Fn crypto_newsession -to free the session. -.Pp -.Fn crypto_dispatch -is called to process a request. -The various fields in the -.Vt cryptop -structure are: -.Bl -tag -width ".Va crp_callback" -.It Va crp_session -The session handle. -.It Va crp_ilen -The total length in bytes of the buffer to be processed. -.It Va crp_olen -On return, contains the total length of the result. -For symmetric crypto operations, this will be the same as the input length. -This will be used if the framework needs to allocate a new -buffer for the result (or for re-formatting the input). -.It Va crp_callback -Callback routine invoked when a request is completed via -.Fn crypto_done . -The callback routine should inspect the -.Va crp_etype -to determine if the request was successfully completed. -.It Va crp_etype -The error type, if any errors were encountered, or zero if -the request was successfully processed. -If the -.Er EAGAIN -error code is returned, the session handle has changed (and has been recorded -in the -.Va crp_session -field). -The consumer should record the new session handle and use it in all subsequent -requests. -In this case, the request may be re-submitted immediately. -This mechanism is used by the framework to perform -session migration (move a session from one driver to another, because -of availability, performance, or other considerations). -.Pp -This field is only valid in the context of the callback routine specified by -.Va crp_callback . -Errors are returned to the invoker of -.Fn crypto_process -only when enough information is not present to call the callback -routine (i.e., if the pointer passed is -.Dv NULL -or if no callback routine was specified). -.It Va crp_flags -A bitmask of flags associated with this request. -Currently defined flags are: -.Bl -tag -width ".Dv CRYPTO_F_CBIFSYNC" -.It Dv CRYPTO_F_IMBUF -The buffer is an mbuf chain pointed to by -.Va crp_mbuf . -.It Dv CRYPTO_F_IOV -The buffer is a -.Vt uio -structure pointed to by -.Va crp_uio . -.It Dv CRYPTO_F_BATCH -Batch operation if possible. -.It Dv CRYPTO_F_CBIMM -Do callback immediately instead of doing it from a dedicated kernel thread. -.It Dv CRYPTO_F_DONE -Operation completed. -.It Dv CRYPTO_F_CBIFSYNC -Do callback immediately if operation is synchronous (that the driver -specified the -.Dv CRYPTOCAP_F_SYNC -flag). -.It Dv CRYPTO_F_ASYNC -Try to do the crypto operation in a pool of workers -if the operation is synchronous (that is, if the driver specified the -.Dv CRYPTOCAP_F_SYNC -flag). -It aims to speed up processing by dispatching crypto operations -on different processors. -.It Dv CRYPTO_F_ASYNC_KEEPORDER -Dispatch callbacks in the same order they are posted. -Only relevant if the -.Dv CRYPTO_F_ASYNC -flag is set and if the operation is synchronous. +.Bl -tag -offset indent -width CRYPTO_CAMELLIA_CBC -compact +.It Dv CRYPTO_AES_CBC +.It Dv CRYPTO_AES_ICM +.It Dv CRYPTO_AES_XTS +.It Dv CRYPTO_ARC4 +.It Dv CRYPTO_BLF_CBC +.It Dv CRYPTO_CAMELLIA_CBC +.It Dv CRYPTO_CAST_CBC +.It Dv CRYPTO_CHACHA20 +.It Dv CRYPTO_DES_CBC +.It Dv CRYPTO_3DES_CBC +.It Dv CRYPTO_NULL_CBC +.It Dv CRYPTO_SKIPJACK_CBC .El -.It Va crp_buf -Data buffer unless -.Dv CRYPTO_F_IMBUF -or -.Dv CRYPTO_F_IOV -is set in -.Va crp_flags . -The length in bytes is set in -.Va crp_ilen . -.It Va crp_mbuf -Data buffer mbuf chain when -.Dv CRYPTO_F_IMBUF -is set in -.Va crp_flags . -.It Va crp_uio -.Vt struct uio -data buffer when -.Dv CRYPTO_F_IOV -is set in -.Va crp_flags . -.It Va crp_opaque -Cookie passed through the crypto framework untouched. -It is -intended for the invoking application's use. -.It Va crp_desc -A linked list of descriptors. -Each descriptor provides -information about what type of cryptographic operation should be done -on the input buffer. -The various fields are: -.Bl -tag -width ".Va crd_inject" -.It Va crd_iv -When the flag -.Dv CRD_F_IV_EXPLICIT -is set, this field contains the IV. -.It Va crd_key -When the -.Dv CRD_F_KEY_EXPLICIT -flag is set, the -.Va crd_key -points to a buffer with encryption or authentication key. -.It Va crd_alg -An algorithm to use. -Must be the same as the one given at newsession time. -.It Va crd_klen -The -.Va crd_key -key length. -.It Va crd_skip -The offset in the input buffer where processing should start. -.It Va crd_len -How many bytes, after -.Va crd_skip , -should be processed. -.It Va crd_inject -The -.Va crd_inject -field specifies an offset in bytes from the beginning of the buffer. -For encryption algorithms, this may be where the IV will be inserted -when encrypting or where the IV may be found for -decryption (subject to -.Va crd_flags ) . -For MAC algorithms, this is where the result of the keyed hash will be -inserted. -.It Va crd_flags -The following flags are defined: -.Bl -tag -width 3n -.It Dv CRD_F_ENCRYPT -For encryption algorithms, this bit is set when encryption is required -(when not set, decryption is performed). -.It Dv CRD_F_IV_PRESENT -.\" This flag name has nothing to do w/ it's behavior, fix the name. -For encryption, if this bit is not set the IV used to encrypt the packet -will be written at the location pointed to by -.Va crd_inject . -The IV length is assumed to be equal to the blocksize of the -encryption algorithm. -For encryption, if this bit is set, nothing is done. -For decryption, this flag has no meaning. -Applications that do special -.Dq "IV cooking" , -such as the half-IV mode in -.Xr ipsec 4 , -can use this flag to indicate that the IV should not be written on the packet. -This flag is typically used in conjunction with the -.Dv CRD_F_IV_EXPLICIT -flag. -.It Dv CRD_F_IV_EXPLICIT -This bit is set when the IV is explicitly -provided by the consumer in the -.Va crd_iv -field. -Otherwise, for encryption operations the IV is provided for by -the driver used to perform the operation, whereas for decryption -operations the offset of the IV is provided by the -.Va crd_inject -field. -This flag is typically used when the IV is calculated -.Dq "on the fly" -by the consumer, and does not precede the data. -.It Dv CRD_F_KEY_EXPLICIT -For encryption and authentication (MAC) algorithms, this bit is set when the key -is explicitly provided by the consumer in the -.Va crd_key -field for the given operation. -Otherwise, the key is taken at newsession time from the -.Va cri_key -field. -As calculating the key schedule may take a while, it is recommended that often -used keys are given their own session. -.It Dv CRD_F_COMP -For compression algorithms, this bit is set when compression is required (when -not set, decompression is performed). -.El -.It Va CRD_INI -This -.Vt cryptoini -structure will not be modified by the framework or the device drivers. -Since this information accompanies every cryptographic -operation request, drivers may re-initialize state on-demand -(typically an expensive operation). -Furthermore, the cryptographic -framework may re-route requests as a result of full queues or hardware -failure, as described above. -.It Va crd_next -Point to the next descriptor. -Linked operations are useful in protocols such as -.Xr ipsec 4 , -where multiple cryptographic transforms may be applied on the same -block of data. -.El -.El .Pp -.Fn crypto_getreq -allocates a -.Vt cryptop -structure with a linked list of -.Fa num -.Vt cryptodesc -structures. +The following authenticated encryption with additional data (AEAD) +algorithms are supported: .Pp -.Fn crypto_freereq -deallocates a structure -.Vt cryptop -and any -.Vt cryptodesc -structures linked to it. -Note that it is the responsibility of the -callback routine to do the necessary cleanups associated with the -opaque field in the -.Vt cryptop -structure. -.Pp -.Fn crypto_kdispatch -is called to perform a keying operation. -The various fields in the -.Vt cryptkop -structure are: -.Bl -tag -width ".Va krp_callback" -.It Va krp_op -Operation code, such as -.Dv CRK_MOD_EXP . -.It Va krp_status -Return code. -This -.Va errno Ns -style -variable indicates whether lower level reasons -for operation failure. -.It Va krp_iparams -Number of input parameters to the specified operation. -Note that each operation has a (typically hardwired) number of such parameters. -.It Va krp_oparams -Number of output parameters from the specified operation. -Note that each operation has a (typically hardwired) number of such parameters. -.It Va krp_kvp -An array of kernel memory blocks containing the parameters. -.It Va krp_hid -Identifier specifying which low-level driver is being used. -.It Va krp_callback -Callback called on completion of a keying operation. +.Bl -tag -offset indent -width CRYPTO_AES_NIST_GCM_16 -compact +.It Dv CRYPTO_AES_CCM_16 +.It Dv CRYPTO_AES_NIST_GCM_16 .El -.Sh DRIVER-SIDE API -The -.Fn crypto_get_driverid , -.Fn crypto_get_driver_session , -.Fn crypto_register , -.Fn crypto_kregister , -.Fn crypto_unregister , -.Fn crypto_unblock , -and -.Fn crypto_done -routines are used by drivers that provide support for cryptographic -primitives to register and unregister with the kernel crypto services -framework. .Pp -Drivers must first use the -.Fn crypto_get_driverid -function to acquire a driver identifier, specifying the -.Fa flags -as an argument. -One of -.Dv CRYPTOCAP_F_SOFTWARE -or -.Dv CRYPTOCAP_F_HARDWARE -must be specified. -The -.Dv CRYPTOCAP_F_SYNC -may also be specified, and should be specified if the driver does all of -it's operations synchronously. -Drivers must pass the size of their session structure as the second argument. -An appropriately sized memory will be allocated by the framework, zeroed, and -passed to the driver's -.Fn newsession -method. +The following compression algorithms are supported: .Pp -For each algorithm the driver supports, it must then call -.Fn crypto_register . -The first two arguments are the driver and algorithm identifiers. -The next two arguments specify the largest possible operator length (in bits, -important for public key operations) and flags for this algorithm. -.Pp -.Fn crypto_unregister -is called by drivers that wish to withdraw support for an algorithm. -The two arguments are the driver and algorithm identifiers, respectively. -Typically, drivers for -PCMCIA -crypto cards that are being ejected will invoke this routine for all -algorithms supported by the card. -.Fn crypto_unregister_all -will unregister all algorithms registered by a driver -and the driver will be disabled (no new sessions will be allocated on -that driver, and any existing sessions will be migrated to other -drivers). -The same will be done if all algorithms associated with a driver are -unregistered one by one. -After a call to -.Fn crypto_unregister_all -there will be no threads in either the newsession or freesession function -of the driver. -.Pp -The calling convention for the driver-supplied routines are: -.Pp -.Bl -item -compact -.It -.Ft int -.Fn \*[lp]*newsession\*[rp] "device_t" "crypto_session_t" "struct cryptoini *" ; -.It -.Ft void -.Fn \*[lp]*freesession\*[rp] "device_t" "crypto_session_t" ; -.It -.Ft int -.Fn \*[lp]*process\*[rp] "device_t" "struct cryptop *" "int" ; -.It -.Ft int -.Fn \*[lp]*kprocess\*[rp] "device_t" "struct cryptkop *" "int" ; +.Bl -tag -offset indent -width CRYPTO_DEFLATE_COMP -compact +.It Dv CRYPTO_DEFLATE_COMP .El -.Pp -On invocation, the first argument to -all routines is the -.Fa device_t -that was provided to -.Fn crypto_get_driverid . -The second argument to -.Fn newsession -is the opaque session handle for the new session. -The third argument is identical to that of -.Fn crypto_newsession . -.Pp -Drivers obtain a pointer to their session memory by invoking -.Fn crypto_get_driver_session -on the opaque -.Vt crypto_session_t -handle. -.Pp -The -.Fn freesession -routine takes as arguments the opaque data value and the session handle. -It should clear any context associated with the session (clear hardware -registers, memory, etc.). -If no resources need to be released other than the contents of session memory, -the method is optional. -The -.Nm -framework will zero and release the allocated session memory (after running the -.Fn freesession -method, if one exists). -.Pp -The -.Fn process -routine is invoked with a request to perform crypto processing. -This routine must not block or sleep, but should queue the request and return -immediately or process the request to completion. -In case of an unrecoverable error, the error indication must be placed in the -.Va crp_etype -field of the -.Vt cryptop -structure. -When the request is completed, or an error is detected, the -.Fn process -routine must invoke -.Fn crypto_done . -Session migration may be performed, as mentioned previously. -.Pp -In case of a temporary resource exhaustion, the -.Fn process -routine may return -.Er ERESTART -in which case the crypto services will requeue the request, mark the driver -as -.Dq blocked , -and stop submitting requests for processing. -The driver is then responsible for notifying the crypto services -when it is again able to process requests through the -.Fn crypto_unblock -routine. -This simple flow control mechanism should only be used for short-lived -resource exhaustion as it causes operations to be queued in the crypto -layer. -Doing so is preferable to returning an error in such cases as -it can cause network protocols to degrade performance by treating the -failure much like a lost packet. -.Pp -The -.Fn kprocess -routine is invoked with a request to perform crypto key processing. -This routine must not block, but should queue the request and return -immediately. -Upon processing the request, the callback routine should be invoked. -In case of an unrecoverable error, the error indication must be placed in the -.Va krp_status -field of the -.Vt cryptkop -structure. -When the request is completed, or an error is detected, the -.Fn kprocess -routine should invoked -.Fn crypto_kdone . -.Sh RETURN VALUES -.Fn crypto_register , *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Mar 27 18:31:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 377B727D4B5; Fri, 27 Mar 2020 18:31:13 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pr5r5G7Dz4Vvr; Fri, 27 Mar 2020 18:31:12 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F92325C57; Fri, 27 Mar 2020 18:20:37 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RIKbaG005032; Fri, 27 Mar 2020 18:20:37 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RIKb39005031; Fri, 27 Mar 2020 18:20:37 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202003271820.02RIKb39005031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Fri, 27 Mar 2020 18:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359373 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 359373 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 18:31:13 -0000 Author: bdragon Date: Fri Mar 27 18:20:36 2020 New Revision: 359373 URL: https://svnweb.freebsd.org/changeset/base/359373 Log: [PowerPC] Fix LIB32WMAKEFLAGS definition When I modified the LIB32WMAKEFLAGS= definition, I trimmed too much off. -m is meant to be a parameter to LD. Reported by: arichardson Modified: head/share/mk/bsd.compat.mk Modified: head/share/mk/bsd.compat.mk ============================================================================== --- head/share/mk/bsd.compat.mk Fri Mar 27 18:01:01 2020 (r359372) +++ head/share/mk/bsd.compat.mk Fri Mar 27 18:20:36 2020 (r359373) @@ -56,7 +56,8 @@ LIB32CPUFLAGS+= -target powerpc-unknown-freebsd13.0 LIB32_MACHINE= powerpc LIB32_MACHINE_ARCH= powerpc -LIB32WMAKEFLAGS= -m elf32ppc_fbsd +LIB32WMAKEFLAGS= \ + LD="${XLD} -m elf32ppc_fbsd" .elif ${COMPAT_ARCH:Mmips64*} != "" HAS_COMPAT=32 From owner-svn-src-head@freebsd.org Fri Mar 27 18:40:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1A4F27DC31; Fri, 27 Mar 2020 18:40:33 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48prJd1C52z4ZKm; Fri, 27 Mar 2020 18:40:33 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 849CB257E9; Fri, 27 Mar 2020 18:01:01 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RI111h092951; Fri, 27 Mar 2020 18:01:01 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RI11CS092950; Fri, 27 Mar 2020 18:01:01 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003271801.02RI11CS092950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 27 Mar 2020 18:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359372 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 359372 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 18:40:34 -0000 Author: tsoome Date: Fri Mar 27 18:01:01 2020 New Revision: 359372 URL: https://svnweb.freebsd.org/changeset/base/359372 Log: loader.efi: conout->QueryMode() can fail to return screen dimensions Some systems are reported to fail to report screen dimensions unless the screen mode is set first. Modified: head/stand/efi/libefi/efi_console.c Modified: head/stand/efi/libefi/efi_console.c ============================================================================== --- head/stand/efi/libefi/efi_console.c Fri Mar 27 17:37:31 2020 (r359371) +++ head/stand/efi/libefi/efi_console.c Fri Mar 27 18:01:01 2020 (r359372) @@ -388,11 +388,19 @@ efi_cons_probe(struct console *cp) conout = ST->ConOut; conin = ST->ConIn; - status = BS->OpenProtocol(ST->ConsoleInHandle, &simple_input_ex_guid, - (void **)&coninex, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); - if (status != EFI_SUCCESS) - coninex = NULL; + /* + * Call SetMode to work around buggy firmware. + */ + status = conout->SetMode(conout, conout->Mode->Mode); + if (coninex == NULL) { + status = BS->OpenProtocol(ST->ConsoleInHandle, + &simple_input_ex_guid, (void **)&coninex, + IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); + if (status != EFI_SUCCESS) + coninex = NULL; + } + cp->c_flags |= C_PRESENTIN | C_PRESENTOUT; } @@ -824,7 +832,7 @@ efi_cons_update_mode(void) char env[8]; status = conout->QueryMode(conout, conout->Mode->Mode, &cols, &rows); - if (EFI_ERROR(status)) { + if (EFI_ERROR(status) || cols * rows == 0) { cols = 80; rows = 24; } From owner-svn-src-head@freebsd.org Fri Mar 27 19:17:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31ADB27ECD4; Fri, 27 Mar 2020 19:17:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48ps7j3kFxz3LLV; Fri, 27 Mar 2020 19:17:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 134F4268E2; Fri, 27 Mar 2020 19:17:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RJHjSK041683; Fri, 27 Mar 2020 19:17:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RJHj06041682; Fri, 27 Mar 2020 19:17:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003271917.02RJHj06041682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Mar 2020 19:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359376 - head/gnu/usr.bin/binutils X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/gnu/usr.bin/binutils X-SVN-Commit-Revision: 359376 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 19:17:54 -0000 Author: emaste Date: Fri Mar 27 19:17:45 2020 New Revision: 359376 URL: https://svnweb.freebsd.org/changeset/base/359376 Log: remove binutils ld leftovers Modified: head/gnu/usr.bin/binutils/Makefile Modified: head/gnu/usr.bin/binutils/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/Makefile Fri Mar 27 19:08:10 2020 (r359375) +++ head/gnu/usr.bin/binutils/Makefile Fri Mar 27 19:17:45 2020 (r359376) @@ -19,7 +19,6 @@ SUBDIR.${MK_BINUTILS}+= as SUBDIR_DEPEND_libbinutils=libbfd # for bfdver.h SUBDIR_DEPEND_as=libbfd libiberty libopcodes -SUBDIR_DEPEND_ld=libbfd libiberty SUBDIR_DEPEND_objdump=libbfd libiberty libbinutils libopcodes .if !make(install) From owner-svn-src-head@freebsd.org Fri Mar 27 19:39:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B18D27F6BA; Fri, 27 Mar 2020 19:39:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pscW4l0Nz3yVb; Fri, 27 Mar 2020 19:39:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E127B26D02; Fri, 27 Mar 2020 19:39:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RJdE2d054112; Fri, 27 Mar 2020 19:39:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RJdEvO054111; Fri, 27 Mar 2020 19:39:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003271939.02RJdEvO054111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Mar 2020 19:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359377 - head/contrib/binutils/binutils X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/binutils/binutils X-SVN-Commit-Revision: 359377 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 19:39:24 -0000 Author: emaste Date: Fri Mar 27 19:39:14 2020 New Revision: 359377 URL: https://svnweb.freebsd.org/changeset/base/359377 Log: objdump: emit a deprecation notice at program start PR: 212319 Modified: head/contrib/binutils/binutils/objdump.c Modified: head/contrib/binutils/binutils/objdump.c ============================================================================== --- head/contrib/binutils/binutils/objdump.c Fri Mar 27 19:17:45 2020 (r359376) +++ head/contrib/binutils/binutils/objdump.c Fri Mar 27 19:39:14 2020 (r359377) @@ -3248,6 +3248,8 @@ main (int argc, char **argv) } } + non_fatal (_("objdump 2.17.50 is deprecated in FreeBSD and will be removed")); + if (show_version) print_version ("objdump"); From owner-svn-src-head@freebsd.org Fri Mar 27 20:08:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18F0327FE8A; Fri, 27 Mar 2020 20:08:50 +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) server-signature RSA-PSS (4096 bits) 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 48ptGR2tjFz49F8; Fri, 27 Mar 2020 20:08:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-8.local (unknown [IPv6:2601:648:8881:1e90:70cb:195c:670e:3975]) (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 7512C5C65; Fri, 27 Mar 2020 20:08:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r359374 - in head: . share/man/man4 share/man/man7 share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe sys/dev/cx... From: John Baldwin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003271825.02RIPOmR010857@repo.freebsd.org> 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: Fri, 27 Mar 2020 13:08:39 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003271825.02RIPOmR010857@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 20:08:51 -0000 On 3/27/20 11:25 AM, John Baldwin wrote: > Author: jhb > Date: Fri Mar 27 18:25:23 2020 > New Revision: 359374 > URL: https://svnweb.freebsd.org/changeset/base/359374 > > Log: > Refactor driver and consumer interfaces for OCF (in-kernel crypto). I have tested as much as I have accessible. Someone did test cesa(4) I believe and found it worked with cryptocheck but not IPsec. I found a bug in the hash handling related to IPsec that I fixed in cesa(4), but the original submitter didn't retest. kp@ has an out-of-tree driver that he said works with these changes as well. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Mar 27 20:18:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBD48260619; Fri, 27 Mar 2020 20:18:01 +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) server-signature RSA-PSS (4096 bits) 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 48ptT34Y8Hz4DRv; Fri, 27 Mar 2020 20:17:59 +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 A8D585C66; Fri, 27 Mar 2020 20:10:04 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.35.20030802 Date: Fri, 27 Mar 2020 13:10:01 -0700 Subject: Re: svn commit: r359377 - head/contrib/binutils/binutils From: Ravi Pokala To: Ed Maste , , , Message-ID: Thread-Topic: svn commit: r359377 - head/contrib/binutils/binutils References: <202003271939.02RJdEvO054111@repo.freebsd.org> In-Reply-To: <202003271939.02RJdEvO054111@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 20:18:02 -0000 I note there's no version on that deprecation notice...? -Ravi =EF=BB=BF-----Original Message----- From: on behalf of Ed Maste Date: 2020-03-27, Friday at 12:39 To: , , Subject: svn commit: r359377 - head/contrib/binutils/binutils Author: emaste Date: Fri Mar 27 19:39:14 2020 New Revision: 359377 URL: https://svnweb.freebsd.org/changeset/base/359377 =20 Log: objdump: emit a deprecation notice at program start =20 PR: 212319 =20 Modified: head/contrib/binutils/binutils/objdump.c =20 Modified: head/contrib/binutils/binutils/objdump.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/contrib/binutils/binutils/objdump.c Fri Mar 27 19:17:45 2020 (= r359376) +++ head/contrib/binutils/binutils/objdump.c Fri Mar 27 19:39:14 2020 (= r359377) @@ -3248,6 +3248,8 @@ main (int argc, char **argv) } } =20 + non_fatal (_("objdump 2.17.50 is deprecated in FreeBSD and will be r= emoved")); + if (show_version) print_version ("objdump"); =20 =20 From owner-svn-src-head@freebsd.org Fri Mar 27 21:07:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC7582616A5; Fri, 27 Mar 2020 21:07:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48pvZM1v8Kz4X4c; Fri, 27 Mar 2020 21:07:38 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f52.google.com with SMTP id h131so11358321iof.1; Fri, 27 Mar 2020 14:07:38 -0700 (PDT) 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=RXY+TmQcHC7rFZsmPeTbp50ZUcogfzCxaZuBhI+h5/4=; b=EDWKiTyF3VkDdOV6WJFMo9a2v9sXaozcBDPWYXojTNGXDKlodz6DblpLRB0TcI12Tl q2O+eV8qzRlbdpI8dMHgyZn5+xxb+2g7NVNeQpTh2TbzKMwCs78upltTTzKY1rNZFSzu /j8FKHI4vdZBQ7Z7MDknUTvGO3QnLu4HJ8g7duPHoaEyyw/FCzc8YYESEVEfoGmYH9+6 IyxQYV0OnDEUYRRiHg9ffZ4Fnl6IUYfe/7vgdxXGI2u5SztF3i/ol01u2yU+BnQDbQIs YhYtOfMLsgaCy31b7JwuzURjtttVu+K1ISpUoUmAOgbcR3LfoQMHi/2mbkZvyYxFAHr5 4PrQ== X-Gm-Message-State: ANhLgQ336obtgN+5GgSlAGOHP/PTKroDeDWfjK0afiR1vkW5NiSr0IjY 1GuRd4P9gLjiux574/Gu8GcO3eqKxPG4adpjbnOGY4Nb X-Google-Smtp-Source: ADFU+vtptJqazHHNDISkVw7FsaUh6MxdpxYTgy1cFba1Ms3wo8hi4MCGIYoYj1ABP1/91MqX8wcPAbgRQ/5GqWy3qkQ= X-Received: by 2002:a92:a30a:: with SMTP id a10mr1129681ili.100.1585342865550; Fri, 27 Mar 2020 14:01:05 -0700 (PDT) MIME-Version: 1.0 References: <202003271939.02RJdEvO054111@repo.freebsd.org> In-Reply-To: From: Ed Maste Date: Fri, 27 Mar 2020 17:00:53 -0400 Message-ID: Subject: Re: svn commit: r359377 - head/contrib/binutils/binutils To: Ravi Pokala Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48pvZM1v8Kz4X4c X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 21:07:43 -0000 On Fri, 27 Mar 2020 at 16:18, Ravi Pokala wrote: > > I note there's no version on that deprecation notice...? I ran out of space to fit the message in 80 cols, but it will be removed soon - certainly before FreeBSD 13.0. There are a few ports that require objdump but do not depend on binutils and they need to be fixed before objdump is removed. They're listed in the exp-run PR 212319. From owner-svn-src-head@freebsd.org Fri Mar 27 21:49:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 887B6262612; Fri, 27 Mar 2020 21:49:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pwV66y22z3JtR; Fri, 27 Mar 2020 21:49:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7A41867; Fri, 27 Mar 2020 21:48:53 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RLmrji036442; Fri, 27 Mar 2020 21:48:53 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RLmrt0036439; Fri, 27 Mar 2020 21:48:53 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003272148.02RLmrt0036439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 27 Mar 2020 21:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359379 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359379 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 21:49:03 -0000 Author: tuexen Date: Fri Mar 27 21:48:52 2020 New Revision: 359379 URL: https://svnweb.freebsd.org/changeset/base/359379 Log: Some more uint32_t cleanups, no functional change. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_pcb.h ============================================================================== --- head/sys/netinet/sctp_pcb.h Fri Mar 27 20:06:40 2020 (r359378) +++ head/sys/netinet/sctp_pcb.h Fri Mar 27 21:48:52 2020 (r359379) @@ -273,11 +273,11 @@ struct sctp_pcb { uint32_t secret_key[SCTP_HOW_MANY_SECRETS][SCTP_NUMBER_OF_SECRETS]; unsigned int size_of_a_cookie; - unsigned int sctp_timeoutticks[SCTP_NUM_TMRS]; - unsigned int sctp_minrto; - unsigned int sctp_maxrto; - unsigned int initial_rto; - int initial_init_rto_max; + uint32_t sctp_timeoutticks[SCTP_NUM_TMRS]; + uint32_t sctp_minrto; + uint32_t sctp_maxrto; + uint32_t initial_rto; + uint32_t initial_init_rto_max; unsigned int sctp_sack_freq; uint32_t sctp_sws_sender; Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Fri Mar 27 20:06:40 2020 (r359378) +++ head/sys/netinet/sctp_structs.h Fri Mar 27 21:48:52 2020 (r359379) @@ -1062,7 +1062,7 @@ struct sctp_association { uint32_t heart_beat_delay; /* autoclose */ - unsigned int sctp_autoclose_ticks; + uint32_t sctp_autoclose_ticks; /* how many preopen streams we have */ unsigned int pre_open_streams; Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Fri Mar 27 20:06:40 2020 (r359378) +++ head/sys/netinet/sctp_timer.c Fri Mar 27 21:48:52 2020 (r359379) @@ -1524,10 +1524,10 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sc { struct timeval tn, *tim_touse; struct sctp_association *asoc; - int ticks_gone_by; + uint32_t ticks_gone_by; (void)SCTP_GETTIME_TIMEVAL(&tn); - if (stcb->asoc.sctp_autoclose_ticks && + if (stcb->asoc.sctp_autoclose_ticks > 0 && sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) { /* Auto close is on */ asoc = &stcb->asoc; @@ -1539,9 +1539,8 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sc tim_touse = &asoc->time_last_sent; } /* Now has long enough transpired to autoclose? */ - ticks_gone_by = SEC_TO_TICKS(tn.tv_sec - tim_touse->tv_sec); - if ((ticks_gone_by > 0) && - (ticks_gone_by >= (int)asoc->sctp_autoclose_ticks)) { + ticks_gone_by = SEC_TO_TICKS((uint32_t)(tn.tv_sec - tim_touse->tv_sec)); + if (ticks_gone_by >= asoc->sctp_autoclose_ticks) { /* * autoclose time has hit, call the output routine, * which should do nothing just to be SURE we don't @@ -1584,7 +1583,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sc * No auto close at this time, reset t-o to check * later */ - int tmp; + uint32_t tmp; /* fool the timer startup to use the time left */ tmp = asoc->sctp_autoclose_ticks; From owner-svn-src-head@freebsd.org Fri Mar 27 23:10:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C6E0264512; Fri, 27 Mar 2020 23:10:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pyJ16Lctz4KSr; Fri, 27 Mar 2020 23:10:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BCEB1B23; Fri, 27 Mar 2020 23:10:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RNAJJp087295; Fri, 27 Mar 2020 23:10:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RNAIMw087293; Fri, 27 Mar 2020 23:10:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003272310.02RNAIMw087293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Mar 2020 23:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359381 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359381 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 23:10:27 -0000 Author: emaste Date: Fri Mar 27 23:10:18 2020 New Revision: 359381 URL: https://svnweb.freebsd.org/changeset/base/359381 Log: sys/netinet: remove spurious doubled ;s Modified: head/sys/netinet/ip_input.c head/sys/netinet/tcp_ratelimit.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Fri Mar 27 22:13:39 2020 (r359380) +++ head/sys/netinet/ip_input.c Fri Mar 27 23:10:18 2020 (r359381) @@ -1167,7 +1167,7 @@ ip_savecontrol(struct inpcb *inp, struct mbuf **mp, st } if (CHECK_SO_CT(inp->inp_socket, SO_TS_REALTIME_MICRO)) { struct bintime boottimebin, bt1; - struct timespec ts1;; + struct timespec ts1; struct timeval tv; if ((m->m_flags & (M_PKTHDR | M_TSTMP)) == (M_PKTHDR | Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Fri Mar 27 22:13:39 2020 (r359380) +++ head/sys/netinet/tcp_ratelimit.c Fri Mar 27 23:10:18 2020 (r359381) @@ -1485,7 +1485,7 @@ tcp_rs_init(void *st __unused) { CK_LIST_INIT(&int_rs); rs_number_alive = 0; - rs_number_dead = 0;; + rs_number_dead = 0; mtx_init(&rs_mtx, "tcp_rs_mtx", "rsmtx", MTX_DEF); rl_ifnet_departs = EVENTHANDLER_REGISTER(ifnet_departure_event, tcp_rl_ifnet_departure, From owner-svn-src-head@freebsd.org Fri Mar 27 23:28:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C21B5264AC5; Fri, 27 Mar 2020 23:28:04 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48pyhM4rShz4R9T; Fri, 27 Mar 2020 23:28:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA6DC1F4D; Fri, 27 Mar 2020 23:27:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02RNRt8K000104; Fri, 27 Mar 2020 23:27:55 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02RNRtiw000103; Fri, 27 Mar 2020 23:27:55 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003272327.02RNRtiw000103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 27 Mar 2020 23:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359382 - head X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359382 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 23:28:06 -0000 Author: brooks Date: Fri Mar 27 23:27:54 2020 New Revision: 359382 URL: https://svnweb.freebsd.org/changeset/base/359382 Log: Use the real value of MK_TESTS_SUPPORT in _libraries. We need to build kyua libraries for kyua. Because we set MK_TESTS=no, we can't not set MK_TESTS_SUPPORT=${MK_TESTS_SUPPORT} because the latter defaults MK_TESTS_SUPPORT to no. This fixes WITHOUT_TESTS + WITH_TESTS_SUPPORT builds. Reported by: Ruslan Garipov Reviewed by: emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24206 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Mar 27 23:10:18 2020 (r359381) +++ head/Makefile.inc1 Fri Mar 27 23:27:54 2020 (r359382) @@ -1100,7 +1100,8 @@ _libraries: @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ ${WMAKE} -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no \ - MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS} libraries + MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS_SUPPORT} \ + libraries everything: .PHONY @echo @echo "--------------------------------------------------------------" From owner-svn-src-head@freebsd.org Sat Mar 28 01:08:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E42CC267FAA; Sat, 28 Mar 2020 01:08:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48q0wF0zbgz45HB; Sat, 28 Mar 2020 01:08:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95C813369; Sat, 28 Mar 2020 01:08:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02S18Kdd062783; Sat, 28 Mar 2020 01:08:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02S18KWc062782; Sat, 28 Mar 2020 01:08:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202003280108.02S18KWc062782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sat, 28 Mar 2020 01:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359385 - head/usr.bin/kyua X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/usr.bin/kyua X-SVN-Commit-Revision: 359385 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 01:08:31 -0000 Author: ngie Date: Sat Mar 28 01:08:20 2020 New Revision: 359385 URL: https://svnweb.freebsd.org/changeset/base/359385 Log: Check in the generated copies of the manpages These manpages were meant to be templated once per `configure` run. Given that we're not bound by as many constants, e.g., `--prefix` isn't generally changing for kyua in the base system, having to generate the manpages each build seems slightly less than optimal. In the event that one's build environment doesn't define `$SH`, the build will also fail until this change is introduced. Instead of jumping through hoops dealing with shells or permissions, let's just cut to the chase and check the generated copies into the sourcebase under usr.bin/kyua . MFC with: r359260 Reported by: Julian Stacey Modified: head/usr.bin/kyua/Makefile Modified: head/usr.bin/kyua/Makefile ============================================================================== --- head/usr.bin/kyua/Makefile Sat Mar 28 00:41:47 2020 (r359384) +++ head/usr.bin/kyua/Makefile Sat Mar 28 01:08:20 2020 (r359385) @@ -2,7 +2,7 @@ .include "${SRCTOP}/lib/kyua/Makefile.kyua" -.PATH: ${KYUA_SRCDIR} +.PATH: ${.CURDIR} ${.OBJDIR} ${KYUA_SRCDIR} PROG_CXX= kyua SRCS= main.cpp @@ -48,20 +48,6 @@ STORE= migrate_v1_v2.sql migrate_v2_v3.sql schema_v3. STOREDIR= ${KYUA_STOREDIR} .PATH: ${KYUA_SRCDIR}/store -CLEANFILES+= ${MAN} .PATH: ${KYUA_SRCDIR}/doc -.for man in ${MAN} -${man}: ${man}.in - ${SH} ${KYUA_SRCDIR}/doc/manbuild.sh \ - -v "CONFDIR=${KYUA_CONFDIR}" \ - -v "DOCDIR=${KYUA_DOCDIR}" \ - -v "EGDIR=${KYUA_EGDIR}" \ - -v "MISCDIR=${KYUA_MISCDIR}" \ - -v "PACKAGE=kyua" \ - -v "STOREDIR=${KYUA_STOREDIR}" \ - -v "TESTSDIR=${TESTSBASE}" \ - -v "VERSION=${KYUA_VERSION}" \ - ${.ALLSRC} ${.TARGET} -.endfor .include From owner-svn-src-head@freebsd.org Sat Mar 28 01:25:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC0EB2694D4; Sat, 28 Mar 2020 01:25:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48q1Hz61cLz4C7Z; Sat, 28 Mar 2020 01:25:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BA113740; Sat, 28 Mar 2020 01:16:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02S1G66k068753; Sat, 28 Mar 2020 01:16:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02S1G6ND068752; Sat, 28 Mar 2020 01:16:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202003280116.02S1G6ND068752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sat, 28 Mar 2020 01:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359387 - head/usr.bin/kyua X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/usr.bin/kyua X-SVN-Commit-Revision: 359387 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 01:25:38 -0000 Author: ngie Date: Sat Mar 28 01:16:06 2020 New Revision: 359387 URL: https://svnweb.freebsd.org/changeset/base/359387 Log: The .PATH throbbing I added in r359385 is no longer required MFC with: r359385 Modified: head/usr.bin/kyua/Makefile Modified: head/usr.bin/kyua/Makefile ============================================================================== --- head/usr.bin/kyua/Makefile Sat Mar 28 01:14:37 2020 (r359386) +++ head/usr.bin/kyua/Makefile Sat Mar 28 01:16:06 2020 (r359387) @@ -2,7 +2,7 @@ .include "${SRCTOP}/lib/kyua/Makefile.kyua" -.PATH: ${.CURDIR} ${.OBJDIR} ${KYUA_SRCDIR} +.PATH: ${KYUA_SRCDIR} PROG_CXX= kyua SRCS= main.cpp From owner-svn-src-head@freebsd.org Sat Mar 28 01:33:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A1E5269D95; Sat, 28 Mar 2020 01:33:29 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48q1T33vdYz4Fh8; Sat, 28 Mar 2020 01:33:26 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f53.google.com with SMTP id i3so2667652ioo.13; Fri, 27 Mar 2020 18:33:26 -0700 (PDT) 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=vfjU37NSW7ZiOpT5TAGiaeifdR5/ddcepnlG3XAZwEQ=; b=ZA2UGCXqLfmZlfV3xj9kzRlgYpIh6AzE5a3V/w6wcoJQMI0SrwcmPyu2j/mjoeHVha LGxCKMtJQwvfyXrY0KBVa2qLiRh3Bh47/3D98hZCywL0RqaGP1f10z7uOm/sS2G2O9Kp 9vEs+s1+i0H69REJ4G6oCr3jwabuZlI9zYdMs1WocQ9ZnG58pu3F3H+W/Og7g6fZO89D B2KYwdC9quloJbFgdoKhQWFxsNTQtWDcwTdqToA1t1mqvfs/E4yj8fWo8SQ57bW2vkff bCesfrdiXlwMNL6UdYWMMYoFMOrpcxK9/vfQxmil17wiClFxbMenPZXB6MEUqTRtuZYT v7ow== X-Gm-Message-State: ANhLgQ0mqzgpkl1B8qlVYVaCYNR67S6jjgkHbtSTlDb58g80UvCtKcv7 qo6K4B5TYLYvG0HB58yCpbXIKVwVti/b+RrUY4aTfU6o X-Google-Smtp-Source: ADFU+vvu3Ij3K8fh9wOP0ek9xuJIbPbXVPieaqAgHYSmees22FFQhh5a/Wc+VQbkU/jrUk8x4Qeks+pQ6PJTdNn/os4= X-Received: by 2002:a02:ac09:: with SMTP id a9mr1630527jao.128.1585359197393; Fri, 27 Mar 2020 18:33:17 -0700 (PDT) MIME-Version: 1.0 References: <202003280108.02S18KWc062782@repo.freebsd.org> In-Reply-To: <202003280108.02S18KWc062782@repo.freebsd.org> From: Ed Maste Date: Fri, 27 Mar 2020 21:33:05 -0400 Message-ID: Subject: Re: svn commit: r359385 - head/usr.bin/kyua To: Enji Cooper Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48q1T33vdYz4Fh8 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 01:33:29 -0000 On Fri, 27 Mar 2020 at 21:09, Enji Cooper wrote: > > Author: ngie > Date: Sat Mar 28 01:08:20 2020 > New Revision: 359385 > URL: https://svnweb.freebsd.org/changeset/base/359385 > > Log: > Check in the generated copies of the manpages I think this is the wrong change for the issue reported by Julian H Stacey, although I don't think having generated manpages committed to the tree matters too much in practice. > In the event that one's build environment doesn't define `$SH`, the build > will also fail until this change is introduced. This isn't the case - the reported failure occurred because the manbuild.sh script did not have +x set. My local builds and CI builds were fine, without having SH defined. From owner-svn-src-head@freebsd.org Sat Mar 28 02:02:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D82426B8D2; Sat, 28 Mar 2020 02:02:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48q26g5fFhz4QnM; Sat, 28 Mar 2020 02:02:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-oi1-x233.google.com with SMTP id v134so10560368oie.11; Fri, 27 Mar 2020 19:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=N4wpJWJNZ4EC+0dZ5Iag1JJtKdP+glwILTVf/fgi26E=; b=sgrhRY409vrcq/8uUoJ4ftNJpR5FHs/SVUwEb9mozAud3iTrtXvWi/mq3NoxsAjdHm lDpvgsU5cpFia59ErkS/dP+WO0liLgoVIsliwfrHKtLb72buvBWShg72YSWZWc3AmI9O /v+87A8BSH07MAARy9q66/lB0evZPIN4FbtFsi8PLYtm+YxF997Rg1AvEFxIPrpJkiLS x1iNJZ391OwLLyxjMZhUN4qrjBsMWPd7jAveaKt898Jm/sUIf/lFpdMznjyGVW+a6LBg e/lUmywAzzMvWRXgafpzWK0HJwxSI7s6GWVFQNpuX+ICaPghtM67QCc6fj+XsrTL3Gyu jWww== 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=N4wpJWJNZ4EC+0dZ5Iag1JJtKdP+glwILTVf/fgi26E=; b=Yx2uKGDnfI2wyMpk2DrxPwLkzfJwkPDMURXvXnIC9gKzFFRzmOlLBiIGyMlchlUi/p xpIkAWEm6gtVlx7/gfwHyBmJAhcb0KjKuOL2IJQcDVky9b5hHsYMzP/p4L+F9dlRpuAp BW831zfoZXXUKs4IrZt0QOoc2QH5SudoZrGBQHKHP9cuvdjzT3ZBF/w53mUqatWpllyB yT37BInYqRSpb/Cr5k77FKjxcYIqYvbxFD7kmlXaZygarC5zrGe8XiXAD8aO16t2F7Ki 7qG0GHS54+wP6OWxEUBEeVWW4S3HnMR+gT7bCR6Kx+aIYCyiK4tgjrEPeTljSI7NGtmo 4XZg== X-Gm-Message-State: ANhLgQ3xPen4RcSaaK8zvH47YE4tkmZ/KwWThPdLLXBfzmDoqDnDtcJN okFgw7dhwGxVyHV5bNDC0EOvNUm65uE= X-Google-Smtp-Source: ADFU+vt6+2CJsAqgYy4sFTej4NTASXLQE0HqF5vOwedDHBRpw1RVsOt0UVhnj+zYJQAx6Mle9hGuMw== X-Received: by 2002:a17:90a:5802:: with SMTP id h2mr2288269pji.141.1585359350113; Fri, 27 Mar 2020 18:35:50 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id q8sm4560777pjq.28.2020.03.27.18.35.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2020 18:35:49 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r359385 - head/usr.bin/kyua From: Enji Cooper In-Reply-To: Date: Fri, 27 Mar 2020 18:35:48 -0700 Cc: Enji Cooper , src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: <62B0FBBE-9676-4DEC-B2C8-0FCB536094FC@gmail.com> References: <202003280108.02S18KWc062782@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48q26g5fFhz4QnM X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 02:02:37 -0000 > On Mar 27, 2020, at 6:33 PM, Ed Maste wrote: >=20 > On Fri, 27 Mar 2020 at 21:09, Enji Cooper wrote: >>=20 >> Author: ngie >> Date: Sat Mar 28 01:08:20 2020 >> New Revision: 359385 >> URL: https://svnweb.freebsd.org/changeset/base/359385 >>=20 >> Log: >> Check in the generated copies of the manpages >=20 > I think this is the wrong change for the issue reported by Julian H > Stacey, although I don't think having generated manpages committed to > the tree matters too much in practice. >=20 >> In the event that one's build environment doesn't define `$SH`, the = build >> will also fail until this change is introduced. >=20 > This isn't the case - the reported failure occurred because the > manbuild.sh script did not have +x set. My local builds and CI builds > were fine, without having SH defined. I understand, but I=E2=80=99d rather not rely on a script=E2=80=99= s mode, though. This is how build failures happen when the source tree = is checked out somewhere with -o noexec. Thanks, -Enji= From owner-svn-src-head@freebsd.org Sat Mar 28 03:02:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3415626D995; Sat, 28 Mar 2020 03:02:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48q3Rj4LqCz4nqv; Sat, 28 Mar 2020 03:02:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D0B43732; Sat, 28 Mar 2020 01:14:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02S1EdPu068634; Sat, 28 Mar 2020 01:14:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02S1EcwP068627; Sat, 28 Mar 2020 01:14:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202003280114.02S1EcwP068627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sat, 28 Mar 2020 01:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359386 - head/contrib/kyua/doc X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/contrib/kyua/doc X-SVN-Commit-Revision: 359386 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 03:02:29 -0000 Author: ngie Date: Sat Mar 28 01:14:37 2020 New Revision: 359386 URL: https://svnweb.freebsd.org/changeset/base/359386 Log: Follow up to r359385 Actually add the generated manpages to unbreak the build. MFC with: r359385 Added: head/contrib/kyua/doc/kyua-about.1 (contents, props changed) head/contrib/kyua/doc/kyua-config.1 (contents, props changed) head/contrib/kyua/doc/kyua-db-exec.1 (contents, props changed) head/contrib/kyua/doc/kyua-db-migrate.1 (contents, props changed) head/contrib/kyua/doc/kyua-debug.1 (contents, props changed) head/contrib/kyua/doc/kyua-help.1 (contents, props changed) head/contrib/kyua/doc/kyua-list.1 (contents, props changed) head/contrib/kyua/doc/kyua-report-html.1 (contents, props changed) head/contrib/kyua/doc/kyua-report-junit.1 (contents, props changed) head/contrib/kyua/doc/kyua-report.1 (contents, props changed) head/contrib/kyua/doc/kyua-test.1 (contents, props changed) head/contrib/kyua/doc/kyua.1 (contents, props changed) head/contrib/kyua/doc/kyua.conf.5 (contents, props changed) head/contrib/kyua/doc/kyuafile.5 (contents, props changed) Added: head/contrib/kyua/doc/kyua-about.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/kyua/doc/kyua-about.1 Sat Mar 28 01:14:37 2020 (r359386) @@ -0,0 +1,95 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd May 20, 2015 +.Dt KYUA-ABOUT 1 +.Os +.Sh NAME +.Nm "kyua about" +.Nd Shows detailed authors, license, and version information +.Sh SYNOPSIS +.Nm +.Op Ar authors | license | version +.Sh DESCRIPTION +The +.Sq about +command provides generic information about the +.Xr kyua 1 +tool. +In the default synopsis form (no arguments), the information printed +includes: +.Bl -enum +.It +The name of the package, which is +.Sq kyua . +.It +The version number, which is +.Sq 0.13 . +.It +License information. +.It +Authors information. +.It +A link to the project web site. +.El +.Pp +You can customize the information printed by this command by specifying +the desired topic as the single argument to the command. +This can be one of: +.Bl -tag -width authorsXX +.It Ar authors +Displays the list of authors and contributors only. +.It Ar license +Displays the license information and the list of copyrights. +.It Ar version +Displays the package name and the version number in a format that is +compatible with the output of GNU tools that support a +.Fl -version +flag. +Use this whenever you have to query the version number of the package. +.El +.Sh FILES +The following files are read by the +.Nm +command: +.Bl -tag -width XX +.It Pa /usr/share/doc/kyua/AUTHORS +List of authors (aka copyright holders). +.It Pa /usr/share/doc/kyua/CONTRIBUTORS +List of contributors (aka individuals that have contributed to the project). +.It Pa /usr/share/doc/kyua/LICENSE +License information. +.El +.Sh EXIT STATUS +The +.Nm +command always returns 0. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 Added: head/contrib/kyua/doc/kyua-config.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/kyua/doc/kyua-config.1 Sat Mar 28 01:14:37 2020 (r359386) @@ -0,0 +1,59 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd September 9, 2012 +.Dt KYUA-CONFIG 1 +.Os +.Sh NAME +.Nm "kyua config" +.Nd Inspects the values of the loaded configuration +.Sh SYNOPSIS +.Nm +.Op Ar variable1 .. variableN +.Sh DESCRIPTION +The +.Nm +command provides a way to list all defined configuration variables and +their current values. +.Pp +This command is intended to help you in resolving the values of the +configuration variables without having to scan over configuration files. +.Pp +In the default synopsis form (no arguments), the command prints all +configuration variables. +If any arguments are provided, the command will only print the +requested variables. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if any of the specified configuration +variables does not exist. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 Added: head/contrib/kyua/doc/kyua-db-exec.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/kyua/doc/kyua-db-exec.1 Sat Mar 28 01:14:37 2020 (r359386) @@ -0,0 +1,199 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd October 13, 2014 +.Dt KYUA-DB-EXEC 1 +.Os +.Sh NAME +.Nm "kyua db-exec" +.Nd Executes a SQL statement in a results file +.Sh SYNOPSIS +.Nm +.Op Fl -no-headers +.Op Fl -results-file Ar file +.Ar statement +.Sh DESCRIPTION +The +.Nm +command provides a way to execute an arbitrary SQL statement within the +database. +This command is mostly intended to aid in debugging, but can also be used to +extract information from the database when the current interfaces do not +provide the desired functionality. +.Pp +The input database must exist. +It makes no sense to use +.Nm +on a nonexistent or empty database. +.Pp +The +.Nm +command takes one or more arguments, all of which are concatenated to form +a single SQL statement. +Once the statement is executed, +.Nm +prints the resulting table on the screen, if any. +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -no-headers +Avoids printing the headers of the table in the output of the command. +.It Fl -results-file Ar path , Fl s Ar path +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Specifies the results file to operate on. +Defaults to +.Sq LATEST , +which causes +.Nm +to automatically load the latest results file from the current test suite. +.Pp +The following values are accepted: +.Bl -tag -width XX +.It Sq LATEST +Requests the load of the latest results file available for the test suite rooted +at the current directory. +.It Directory +Requests the load of the latest results file available for the test suite rooted +at the given directory. +.It Test suite name +Requests the load of the latest results file available for the given test suite. +.It Results identifier +Requests the load of a specific results file. +.It Explicit file name (aka everything else) +Load the specified results file. +.El +.Pp +See +.Sx Results files +for more details. +.El +.Ss Results files +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Results files contain, as their name implies, the results of the execution of a +test suite. +Each test suite executed by +.Xr kyua-test 1 +generates a new results file, and such results files can be loaded later on by +inspection commands such as +.Xr kyua-report 1 +to analyze their contents. +.Pp +Results files support identifier-based lookups and also path name lookups. +The differences between the two are described below. +.Pp +The default naming scheme for the results files provides simple support for +identifier-based lookups and historical recording of test suite runs. +Each results file is given an identifier derived from the test suite that +generated it and the time the test suite was run. +Kyua can later look up results files by these fields. +.Pp +The identifier follows this pattern: +.Bd -literal -offset indent +\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt +.Ed +.Pp +where +.Sq test_suite +is the path to the root of the test suite that was run with all slashes replaced +by underscores and +.Sq YYYYMMDD-HHMMSS-uuuuuu +is a timestamp with microsecond resolution. +.Pp +When using the default naming scheme, results files are stored in the +.Pa ~/.kyua/store/ +subdirectory and each file holds a name of the form: +.Bd -literal -offset indent +~/.kyua/store/results.\*(Ltidentifier\*(Gt.db +.Ed +.Pp +Results files are simple SQLite databases with the schema described in the +.Pa /usr/share/kyua/store/schema_v?.sql +files. +For details on the schema, please refer to the heavily commented SQL file. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if the SQL statement is invalid or fails +to run. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 , +.Xr kyua-test 1 Added: head/contrib/kyua/doc/kyua-db-migrate.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/kyua/doc/kyua-db-migrate.1 Sat Mar 28 01:14:37 2020 (r359386) @@ -0,0 +1,182 @@ +.\" Copyright 2013 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd October 13, 2014 +.Dt KYUA-DB-MIGRATE 1 +.Os +.Sh NAME +.Nm "kyua db-migrate" +.Nd Upgrades the schema of an existing results file +.Sh SYNOPSIS +.Nm +.Op Fl -results-file Ar file +.Sh DESCRIPTION +The +.Nm +command migrates the schema of an existing database to the latest +version implemented in +.Xr kyua 1 . +.Pp +This operation is not reversible. +However, a backup of the database is created in the same directory where the +database lives. +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -results-file Ar path , Fl s Ar path +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Specifies the results file to operate on. +Defaults to +.Sq LATEST , +which causes +.Nm +to automatically load the latest results file from the current test suite. +.Pp +The following values are accepted: +.Bl -tag -width XX +.It Sq LATEST +Requests the load of the latest results file available for the test suite rooted +at the current directory. +.It Directory +Requests the load of the latest results file available for the test suite rooted +at the given directory. +.It Test suite name +Requests the load of the latest results file available for the given test suite. +.It Results identifier +Requests the load of a specific results file. +.It Explicit file name (aka everything else) +Load the specified results file. +.El +.Pp +See +.Sx Results files +for more details. +.El +.Ss Results files +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Results files contain, as their name implies, the results of the execution of a +test suite. +Each test suite executed by +.Xr kyua-test 1 +generates a new results file, and such results files can be loaded later on by +inspection commands such as +.Xr kyua-report 1 +to analyze their contents. +.Pp +Results files support identifier-based lookups and also path name lookups. +The differences between the two are described below. +.Pp +The default naming scheme for the results files provides simple support for +identifier-based lookups and historical recording of test suite runs. +Each results file is given an identifier derived from the test suite that +generated it and the time the test suite was run. +Kyua can later look up results files by these fields. +.Pp +The identifier follows this pattern: +.Bd -literal -offset indent +\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt +.Ed +.Pp +where +.Sq test_suite +is the path to the root of the test suite that was run with all slashes replaced +by underscores and +.Sq YYYYMMDD-HHMMSS-uuuuuu +is a timestamp with microsecond resolution. +.Pp +When using the default naming scheme, results files are stored in the +.Pa ~/.kyua/store/ +subdirectory and each file holds a name of the form: +.Bd -literal -offset indent +~/.kyua/store/results.\*(Ltidentifier\*(Gt.db +.Ed +.Pp +Results files are simple SQLite databases with the schema described in the +.Pa /usr/share/kyua/store/schema_v?.sql +files. +For details on the schema, please refer to the heavily commented SQL file. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if the migration fails. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 Added: head/contrib/kyua/doc/kyua-debug.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/kyua/doc/kyua-debug.1 Sat Mar 28 01:14:37 2020 (r359386) @@ -0,0 +1,398 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd October 13, 2014 +.Dt KYUA-DEBUG 1 +.Os +.Sh NAME +.Nm "kyua debug" +.Nd Executes a single test case with facilities for debugging +.Sh SYNOPSIS +.Nm +.Op Fl -build-root Ar path +.Op Fl -kyuafile Ar file +.Op Fl -stdout Ar path +.Op Fl -stderr Ar path +.Ar test_case +.Sh DESCRIPTION +The +.Nm +command provides a mechanism to execute a single test case bypassing some +of the Kyua infrastructure and allowing the user to poke into the execution +behavior of the test. +.Pp +The test case to run is selected by providing a test filter, described below in +.Sx Test filters , +that matches a single test case. +The test case is executed and its result is printed as the last line of the +output of the tool. +.Pp +The test executed by +.Nm +is run under a controlled environment as described in +.Sx Test isolation . +.Pp +At the moment, the +.Nm +command allows the following aspects of a test case execution to be +tweaked: +.Bl -bullet +.It +Redirection of the test case's stdout and stderr to the console (the +default) or to arbitrary files. +See the +.Fl -stdout +and +.Fl -stderr +options below. +.El +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -build-root Ar path +Specifies the build root in which to find the test programs referenced +by the Kyuafile, if different from the Kyuafile's directory. +See +.Sx Build directories +below for more information. +.It Fl -kyuafile Ar file , Fl k Ar file +Specifies the Kyuafile to process. +Defaults to +.Pa Kyuafile +file in the current directory. +.It Fl -stderr Ar path +Specifies the file to which to send the standard error of the test +program's body. +The default is +.Pa /dev/stderr , +which is a special character device that redirects the output to +standard error on the console. +.It Fl -stdout Ar path +Specifies the file to which to send the standard output of the test +program's body. +The default is +.Pa /dev/stdout , +which is a special character device that redirects the output to +standard output on the console. +.El +.Pp +For example, consider the following Kyua session: +.Bd -literal -offset indent +$ kyua test +kernel/fs:mkdir -> passed +kernel/fs:rmdir -> failed: Invalid argument + +1/2 passed (1 failed) +.Ed +.Pp +At this point, we do not have a lot of information regarding the +failure of the +.Sq kernel/fs:rmdir +test. +We can run this test through the +.Nm +command to inspect its output a bit closer, hoping that the test case is +kind enough to log its progress: +.Bd -literal -offset indent +$ kyua debug kernel/fs:rmdir +Trying rmdir('foo') +Trying rmdir(NULL) +kernel/fs:rmdir -> failed: Invalid argument +.Ed +.Pp +Luckily, the offending test case was printing status lines as it +progressed, so we could see the last attempted call and we can know match +the failure message to the problem. +.Ss Build directories +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Em Build directories +(or object directories, target directories, product directories, etc.) is +the concept that allows a developer to keep the source tree clean from +build products by asking the build system to place such build products +under a separate subtree. +.Pp +Most build systems today support build directories. +For example, the GNU Automake/Autoconf build system exposes such concept when +invoked as follows: +.Bd -literal -offset indent +$ cd my-project-1.0 +$ mkdir build +$ cd build +$ ../configure +$ make +.Ed +.Pp +Under such invocation, all the results of the build are left in the +.Pa my-project-1.0/build/ +subdirectory while maintaining the contents of +.Pa my-project-1.0/ +intact. +.Pp +Because build directories are an integral part of most build systems, and +because they are a tool that developers use frequently, +.Nm +supports build directories too. +This manifests in the form of +.Nm +being able to run tests from build directories while reading the (often +immutable) test suite definition from the source tree. +.Pp +One important property of build directories is that they follow (or need to +follow) the exact same layout as the source tree. +For example, consider the following directory listings: +.Bd -literal -offset indent +src/Kyuafile +src/bin/ls/ +src/bin/ls/Kyuafile +src/bin/ls/ls.c +src/bin/ls/ls_test.c +src/sbin/su/ +src/sbin/su/Kyuafile +src/sbin/su/su.c +src/sbin/su/su_test.c + +obj/bin/ls/ +obj/bin/ls/ls* +obj/bin/ls/ls_test* +obj/sbin/su/ +obj/sbin/su/su* +obj/sbin/su/su_test* +.Ed +.Pp +Note how the directory layout within +.Pa src/ +matches that of +.Pa obj/ . +The +.Pa src/ +directory contains only source files and the definition of the test suite +(the Kyuafiles), while the +.Pa obj/ +directory contains only the binaries generated during a build. +.Pp +All commands that deal with the workspace support the +.Fl -build-root Ar path +option. +When this option is provided, the directory specified by the +option is considered to be the root of the build directory. +For example, considering our previous fake tree layout, we could invoke +.Nm +as any of the following: +.Bd -literal -offset indent +$ kyua debug --kyuafile=src/Kyuafile --build-root=obj +$ cd src && kyua debug --build-root=../obj +.Ed +.Ss Test filters +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +A +.Em test filter +is a string that is used to match test cases or test programs in a test suite. +Filters have the following form: +.Bd -literal -offset indent +test_program_name[:test_case_name] +.Ed +.Pp +Where +.Sq test_program_name +is the name of a test program or a subdirectory in the test suite, and +.Sq test_case_name +is the name of a test case. +.Ss Test isolation +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The test programs and test cases run by +.Nm +are all executed in a deterministic environment. +This known, clean environment serves to make the test execution as +reproducible as possible and also to prevent clashes between tests that may, +for example, create auxiliary files with overlapping names. +.Pp +For plain test programs and for TAP test programs, the whole test program +is run under a single instance of the environment described in this page. +For ATF test programs (see +.Xr atf 7 ) , +each individual test case +.Em and +test cleanup routine are executed in separate environments. +.Bl -tag -width XX +.It Process space +Each test is executed in an independent processes. +Corollary: the test can do whatever it wants to the current process (such +as modify global variables) without having to undo such changes. +.It Session and process group +The test is executed in its own session and its own process group. +There is no controlling terminal attached to the session. +.Pp +Should the test spawn any children, the children should maintain the same +session and process group. +Modifying any of these settings prevents +.Nm +from being able to kill any stray subprocess as part of the cleanup phase. +If modifying these settings is necessary, or if any subprocess started by +the test decides to use a different process group or session, it is the +responsibility of the test to ensure those subprocesses are forcibly +terminated during cleanup. +.It Work directory +The test is executed in a temporary directory automatically created by the +runtime engine. +Corollary: the test can write to its current directory +without needing to clean any files and/or directories it creates. +The runtime engine takes care to recursively delete the temporary directories +after the execution of a test case. +Any file systems mounted within the temporary directory are also unmounted. +.It Home directory +The +.Va HOME +environment variable is set to the absolute path of the work directory. +.It Umask +The value of the umask is set to 0022. +.It Environment +The +.Va LANG , +.Va LC_ALL , +.Va LC_COLLATE , +.Va LC_CTYPE , +.Va LC_MESSAGES , +.Va LC_MONETARY , +.Va LC_NUMERIC +and +.Va LC_TIME +variables are unset. +.Pp +The +.Va TZ +variable is set to +.Sq UTC . +.Pp +The +.Va TMPDIR +variable is set to the absolute path of the work directory. +This is to prevent the test from mistakenly using a temporary directory +outside of the automatically-managed work directory, should the test use the +.Xr mktemp 3 +familiy of functions. +.It Process limits +The maximum soft core size limit is raised to its corresponding hard limit. +This is a simple, best-effort attempt at allowing tests to dump core for +further diagnostic purposes. +.It Configuration varibles +The test engine may pass run-time configuration variables to the test program +via the environment. +The name of the configuration variable is prefixed with +.Sq TEST_ENV_ +so that a configuration variable of the form +.Sq foo=bar +becomes accessible in the environment as +.Sq TEST_ENV_foo=bar . +.El +.Sh EXIT STATUS +The +.Nm +command returns 0 if the test case passes or 1 if the test case fails. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 , +.Xr kyuafile 5 Added: head/contrib/kyua/doc/kyua-help.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/kyua/doc/kyua-help.1 Sat Mar 28 01:14:37 2020 (r359386) @@ -0,0 +1,64 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd September 9, 2012 +.Dt KYUA-HELP 1 +.Os +.Sh NAME +.Nm "kyua help" +.Nd Shows usage information +.Sh SYNOPSIS +.Nm +.Op Ar command +.Sh DESCRIPTION +The +.Nm +command provides interactive help on all supported commands and options. +If, for some reason, you happen to spot a discrepancy in the output of this +command and this document, the command is the authoritative source of +information. +.Pp +If no arguments are provided, the command prints the list of common options +and the list of supported subcommands. +.Pp +If the +.Ar command *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Mar 28 03:22:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB63B26E479; Sat, 28 Mar 2020 03:22:19 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48q3tf2pGLz3CBj; Sat, 28 Mar 2020 03:22:18 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id EF3703C0199; Sat, 28 Mar 2020 03:22:09 +0000 (UTC) Date: Sat, 28 Mar 2020 03:22:09 +0000 From: Brooks Davis To: Enji Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359385 - head/usr.bin/kyua Message-ID: <20200328032209.GA40889@spindle.one-eyed-alien.net> References: <202003280108.02S18KWc062782@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline In-Reply-To: <202003280108.02S18KWc062782@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48q3tf2pGLz3CBj X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 03:22:19 -0000 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 28, 2020 at 01:08:20AM +0000, Enji Cooper wrote: > Author: ngie > Date: Sat Mar 28 01:08:20 2020 > New Revision: 359385 > URL: https://svnweb.freebsd.org/changeset/base/359385 >=20 > Log: > Check in the generated copies of the manpages > =20 > These manpages were meant to be templated once per `configure` run. > =20 > Given that we're not bound by as many constants, e.g., `--prefix` isn't > generally changing for kyua in the base system, having to generate the > manpages each build seems slightly less than optimal. > =20 > In the event that one's build environment doesn't define `$SH`, the bui= ld > will also fail until this change is introduced. > =20 > Instead of jumping through hoops dealing with shells or permissions, le= t's > just cut to the chase and check the generated copies into the sourcebase > under usr.bin/kyua . This was the wrong fix. Committing generated manpaged was 100% the wrong solution and will make extra work in the future. The correct fix is almost certainly the one attached to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245086. If someone doesn't beat me to it I will revert you wrong and broken commit along with the followups and commit the correct one (this certainly won't be until at least tomorrow). -- Brooks --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJefsLhAAoJEKzQXbSebgfA81kH+wX7ZJZ+Yopu1JlXD6e4jNqL NLRv73raJh0tBaL9XQkqgxqv7jnSrwd7qKZuKVxN50zv0Fa5sZsVoJWfUEiRJlyK m5QWUyXdBA38z3SAeY3zW5R/j20vHGYEacLp9ox3dc2nkPfa4TjyesHEtkDFGGqP R6Vn7llr2t4QG+w1szjzLEZJMiNcLN9//HAF4N9a4htwVbH/aejJxhmFbQY+ss9j yliN2KizzeGo0ICQvcgfmRcZ38EpxeSPJEgcdw85izOx9ybs2aFw0jgzgBDlrcc8 TeSijKGzHJvunxgSo15V/eaeQrxNJtjXftB7Yn8twW05DsaDEoTgOJhw6Zzzo7Q= =ngTc -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS-- From owner-svn-src-head@freebsd.org Sat Mar 28 04:02:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BC1A26F3A8; Sat, 28 Mar 2020 04:02:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48q4md2V8Qz3xCh; Sat, 28 Mar 2020 04:02:09 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E28205D51; Sat, 28 Mar 2020 04:02:00 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02S420UY069740; Sat, 28 Mar 2020 04:02:00 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02S4205Q069739; Sat, 28 Mar 2020 04:02:00 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003280402.02S4205Q069739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 04:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359389 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 359389 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 04:02:10 -0000 Author: kevans Date: Sat Mar 28 04:02:00 2020 New Revision: 359389 URL: https://svnweb.freebsd.org/changeset/base/359389 Log: config(8): fixes for -fno-common Move this handful of definitions into main.c, properly declare these as extern in config.h. This fixes the config(8) build with -fno-common. Unexplained in my previous commit to gas, -fno-common will become the default in GCC10 and LLVM11, so it's worth addressing these in advance. MFC after: 3 days Modified: head/usr.sbin/config/config.h head/usr.sbin/config/main.c Modified: head/usr.sbin/config/config.h ============================================================================== --- head/usr.sbin/config/config.h Sat Mar 28 03:58:57 2020 (r359388) +++ head/usr.sbin/config/config.h Sat Mar 28 04:02:00 2020 (r359389) @@ -45,7 +45,7 @@ struct cfgfile { STAILQ_ENTRY(cfgfile) cfg_next; char *cfg_path; }; -STAILQ_HEAD(, cfgfile) cfgfiles; +extern STAILQ_HEAD(cfgfile_head, cfgfile) cfgfiles; struct file_list { STAILQ_ENTRY(file_list) f_next; @@ -103,8 +103,8 @@ struct config { * in the makerules, etc. machinearch is the global notion of the * MACHINE_ARCH for this MACHINE. */ -char *machinename; -char *machinearch; +extern char *machinename; +extern char *machinearch; /* * For each machine, a set of CPU's may be specified as supported. @@ -115,7 +115,7 @@ struct cputype { SLIST_ENTRY(cputype) cpu_next; }; -SLIST_HEAD(, cputype) cputype; +extern SLIST_HEAD(cputype_head, cputype) cputype; /* * A set of options may also be specified which are like CPU types, @@ -131,7 +131,7 @@ struct opt { SLIST_ENTRY(opt) op_append; }; -SLIST_HEAD(opt_head, opt) opt, mkopt, rmopts; +extern SLIST_HEAD(opt_head, opt) opt, mkopt, rmopts; struct opt_list { char *o_name; @@ -141,7 +141,7 @@ struct opt_list { SLIST_ENTRY(opt_list) o_next; }; -SLIST_HEAD(, opt_list) otab; +extern SLIST_HEAD(opt_list_head, opt_list) otab; struct envvar { char *env_str; @@ -149,21 +149,21 @@ struct envvar { STAILQ_ENTRY(envvar) envvar_next; }; -STAILQ_HEAD(envvar_head, envvar) envvars; +extern STAILQ_HEAD(envvar_head, envvar) envvars; struct hint { char *hint_name; STAILQ_ENTRY(hint) hint_next; }; -STAILQ_HEAD(hint_head, hint) hints; +extern STAILQ_HEAD(hint_head, hint) hints; struct includepath { char *path; SLIST_ENTRY(includepath) path_next; }; -SLIST_HEAD(, includepath) includepath; +extern SLIST_HEAD(includepath_head, includepath) includepath; /* * Tag present in the kernconf.tmpl template file. It's mandatory for those Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Sat Mar 28 03:58:57 2020 (r359388) +++ head/usr.sbin/config/main.c Sat Mar 28 04:02:00 2020 (r359389) @@ -72,6 +72,17 @@ static const char rcsid[] = #define CDIR "../compile/" +char *machinename; +char *machinearch; + +struct cfgfile_head cfgfiles; +struct cputype_head cputype; +struct opt_head opt, mkopt, rmopts; +struct opt_list_head otab; +struct envvar_head envvars; +struct hint_head hints; +struct includepath_head includepath; + char * PREFIX; char destdir[MAXPATHLEN]; char srcdir[MAXPATHLEN]; From owner-svn-src-head@freebsd.org Sat Mar 28 04:15:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2DB326F8F0; Sat, 28 Mar 2020 04:15:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48q54L4Jg2z42hB; Sat, 28 Mar 2020 04:15:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D397F5CB4; Sat, 28 Mar 2020 03:58:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02S3wvjR066344; Sat, 28 Mar 2020 03:58:57 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02S3wv0a066343; Sat, 28 Mar 2020 03:58:57 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003280358.02S3wv0a066343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 03:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359388 - head/contrib/binutils/gas X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/binutils/gas X-SVN-Commit-Revision: 359388 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 04:15:47 -0000 Author: kevans Date: Sat Mar 28 03:58:57 2020 New Revision: 359388 URL: https://svnweb.freebsd.org/changeset/base/359388 Log: gas: mark dwarf2_loc_mark_labels as extern Compiling with -fno-common complains as this header's included in multiple compilation units. In fact, the proper definition of dwarf2_loc_mark_labels already exists in dwarf2dbg.c, so simply mark this declaration with extern. Modified: head/contrib/binutils/gas/dwarf2dbg.h Modified: head/contrib/binutils/gas/dwarf2dbg.h ============================================================================== --- head/contrib/binutils/gas/dwarf2dbg.h Sat Mar 28 01:16:06 2020 (r359387) +++ head/contrib/binutils/gas/dwarf2dbg.h Sat Mar 28 03:58:57 2020 (r359388) @@ -78,7 +78,7 @@ extern void dwarf2_emit_label (symbolS *); /* True when we're supposed to set the basic block mark whenever a label is seen. Unless the target is doing Something Weird, just call dwarf2_emit_label. */ -bfd_boolean dwarf2_loc_mark_labels; +extern bfd_boolean dwarf2_loc_mark_labels; extern void dwarf2_finish (void); From owner-svn-src-head@freebsd.org Sat Mar 28 06:07:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 773F927151A; Sat, 28 Mar 2020 06:07:23 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48q7Y70dh6z3F7b; Sat, 28 Mar 2020 06:07:22 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 0F523C702; Sat, 28 Mar 2020 06:07:13 +0000 (UTC) Date: Sat, 28 Mar 2020 06:07:13 +0000 From: Alexey Dokuchaev To: Toomas Soome Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358989 - in head/stand/efi: libefi loader loader/arch/arm loader/arch/arm64 Message-ID: <20200328060713.GA82801@FreeBSD.org> References: <202003140636.02E6a3NS020671@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202003140636.02E6a3NS020671@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 06:07:23 -0000 On Sat, Mar 14, 2020 at 06:36:03AM +0000, Toomas Soome wrote: > New Revision: 358989 > URL: https://svnweb.freebsd.org/changeset/base/358989 > > Log: > loader: add comconsole implementation on top of SIO protocol > > [...] > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/stand/efi/loader/efiserialio.c Sat Mar 14 06:36:03 2020 (r358989) > @@ -0,0 +1,518 @@ > +/*- > + * Copyright (c) 1998 Michael Smith (msmith@freebsd.org) If this is the new code, then copyright date and maybe attribution seem wrong. If this is the old code, why wasn't it repocopied? ./danfe From owner-svn-src-head@freebsd.org Sat Mar 28 06:25:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F1F227197C for ; Sat, 28 Mar 2020 06:25:11 +0000 (UTC) (envelope-from tsoome@me.com) Received: from pv50p00im-ztdg10021201.me.com (pv50p00im-ztdg10021201.me.com [17.58.6.45]) (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 48q7xP1R69z3LkC for ; Sat, 28 Mar 2020 06:24:56 +0000 (UTC) (envelope-from tsoome@me.com) Received: from nazgul.lan (148-52-235-80.sta.estpak.ee [80.235.52.148]) by pv50p00im-ztdg10021201.me.com (Postfix) with ESMTPSA id 5ACAFA40447; Sat, 28 Mar 2020 06:24:45 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r358989 - in head/stand/efi: libefi loader loader/arch/arm loader/arch/arm64 From: Toomas Soome In-Reply-To: <20200328060713.GA82801@FreeBSD.org> Date: Sat, 28 Mar 2020 08:24:42 +0200 Cc: Toomas Soome , src-committers , svn-src-all , svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <202003140636.02E6a3NS020671@repo.freebsd.org> <20200328060713.GA82801@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2020-03-28_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=510 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2003280059 X-Rspamd-Queue-Id: 48q7xP1R69z3LkC X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16:c]; FREEMAIL_FROM(0.00)[me.com]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[me.com:+]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; RCVD_IN_DNSWL_LOW(-0.10)[45.6.58.17.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[me.com]; ASN(0.00)[asn:714, ipnet:17.58.0.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[148.52.235.80.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-3.93), ipnet: 17.58.0.0/20(-2.04), asn: 714(-2.42), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; DWL_DNSWL_LOW(-1.00)[me.com.dwl.dnswl.org : 127.0.5.1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 06:25:11 -0000 > On 28. Mar 2020, at 08:07, Alexey Dokuchaev wrote: > > On Sat, Mar 14, 2020 at 06:36:03AM +0000, Toomas Soome wrote: >> New Revision: 358989 >> URL: https://svnweb.freebsd.org/changeset/base/358989 >> >> Log: >> loader: add comconsole implementation on top of SIO protocol >> >> [...] >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/stand/efi/loader/efiserialio.c Sat Mar 14 06:36:03 2020 (r358989) >> @@ -0,0 +1,518 @@ >> +/*- >> + * Copyright (c) 1998 Michael Smith (msmith@freebsd.org) > > If this is the new code, then copyright date and maybe attribution > seem wrong. If this is the old code, why wasn't it repocopied? > > ./danfe It is based on libi386 version. rgds, toomas From owner-svn-src-head@freebsd.org Sat Mar 28 12:30:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F94F27ACD3; Sat, 28 Mar 2020 12:30:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qJ3D3gGQz496t; Sat, 28 Mar 2020 12:30:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BBB9C819; Sat, 28 Mar 2020 12:21:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SCLr8a074529; Sat, 28 Mar 2020 12:21:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SCLrnR074528; Sat, 28 Mar 2020 12:21:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003281221.02SCLrnR074528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 28 Mar 2020 12:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359392 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 359392 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 12:30:35 -0000 Author: kib Date: Sat Mar 28 12:21:52 2020 New Revision: 359392 URL: https://svnweb.freebsd.org/changeset/base/359392 Log: ddb show pginfo: print pages reference value in hex. It is more useful this way after the VPRC_ flags were introduced. Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat Mar 28 08:17:00 2020 (r359391) +++ head/sys/vm/vm_page.c Sat Mar 28 12:21:52 2020 (r359392) @@ -5453,7 +5453,7 @@ DB_SHOW_COMMAND(pginfo, vm_page_print_pginfo) else m = (vm_page_t)addr; db_printf( - "page %p obj %p pidx 0x%jx phys 0x%jx q %d ref %u\n" + "page %p obj %p pidx 0x%jx phys 0x%jx q %d ref 0x%x\n" " af 0x%x of 0x%x f 0x%x act %d busy %x valid 0x%x dirty 0x%x\n", m, m->object, (uintmax_t)m->pindex, (uintmax_t)m->phys_addr, m->a.queue, m->ref_count, m->a.flags, m->oflags, From owner-svn-src-head@freebsd.org Sat Mar 28 15:01:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D73A2A4900; Sat, 28 Mar 2020 15:01:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qMNv15qXz4Xfr; Sat, 28 Mar 2020 15:01:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B0F7E7D2; Sat, 28 Mar 2020 15:00:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SF0t96019969; Sat, 28 Mar 2020 15:00:55 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SF0tsv019968; Sat, 28 Mar 2020 15:00:55 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003281500.02SF0tsv019968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 15:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359394 - head/contrib/tcsh X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/tcsh X-SVN-Commit-Revision: 359394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 15:01:03 -0000 Author: kevans Date: Sat Mar 28 15:00:55 2020 New Revision: 359394 URL: https://svnweb.freebsd.org/changeset/base/359394 Log: MFV r359393: tcsh: import 6974bc35a5cd This removes an extra variable definition that causes the -fno-common build to fail, which will be a new default in GCC10/LLVM11. MFC after: 3 days Modified: head/contrib/tcsh/tc.sig.c Directory Properties: head/contrib/tcsh/ (props changed) Modified: head/contrib/tcsh/tc.sig.c ============================================================================== --- head/contrib/tcsh/tc.sig.c Sat Mar 28 14:58:03 2020 (r359393) +++ head/contrib/tcsh/tc.sig.c Sat Mar 28 15:00:55 2020 (r359394) @@ -56,7 +56,6 @@ int alrmcatch_disabled; /* = 0; */ int phup_disabled; /* = 0; */ int pchild_disabled; /* = 0; */ int pintr_disabled; /* = 0; */ -int handle_interrupt; /* = 0; */ int handle_pending_signals(void) From owner-svn-src-head@freebsd.org Sat Mar 28 15:35:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E04BD2A583A; Sat, 28 Mar 2020 15:35:56 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qN973Dnfz3HmS; Sat, 28 Mar 2020 15:35:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAF49EFBF; Sat, 28 Mar 2020 15:35:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SFZlBg041549; Sat, 28 Mar 2020 15:35:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SFZlUH041548; Sat, 28 Mar 2020 15:35:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003281535.02SFZlUH041548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 28 Mar 2020 15:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359395 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 359395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 15:35:57 -0000 Author: emaste Date: Sat Mar 28 15:35:47 2020 New Revision: 359395 URL: https://svnweb.freebsd.org/changeset/base/359395 Log: arch.7: update Default Tool Chain section All architectures use Clang, lld, and ELF Tool Chain now. Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Sat Mar 28 15:00:55 2020 (r359394) +++ head/share/man/man7/arch.7 Sat Mar 28 15:35:47 2020 (r359395) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 23, 2020 +.Dd March 28, 2020 .Dt ARCH 7 .Os .Sh NAME @@ -287,36 +287,13 @@ is 8 bytes on all supported architectures except i386. uses .Xr clang 1 as the default compiler on all supported CPU architectures, -as well as ELF Tool Chain binary utilities such as +LLVM's +.Xr ld.lld 1 +as the default linker, and +ELF Tool Chain binary utilities such as .Xr objcopy 1 and .Xr readelf 1 . -Most supported CPU architectures also use LLVM's -.Xr ld.lld 1 -as the linker. -This table shows the default tool chain for each architecture. -.Bl -column -offset indent "Architecture" "Compiler" "Linker" -.It Sy Architecture Ta Sy Compiler Ta Sy Linker -.It aarch64 Ta Clang Ta lld -.It amd64 Ta Clang Ta lld -.It armv6 Ta Clang Ta lld -.It armv7 Ta Clang Ta lld -.It i386 Ta Clang Ta lld -.It mips Ta Clang Ta lld -.It mipsel Ta Clang Ta lld -.It mipselhf Ta Clang Ta lld -.It mipshf Ta Clang Ta lld -.It mipsn32 Ta Clang Ta lld -.It mips64 Ta Clang Ta lld -.It mips64el Ta Clang Ta lld -.It mips64elhf Ta Clang Ta lld -.It mips64hf Ta Clang Ta lld -.It powerpc Ta Clang Ta lld -.It powerpcspe Ta Clang Ta lld -.It powerpc64 Ta Clang Ta lld -.It riscv64 Ta Clang Ta lld -.It riscv64sf Ta Clang Ta lld -.El .Ss MACHINE_ARCH vs MACHINE_CPUARCH vs MACHINE .Dv MACHINE_CPUARCH should be preferred in Makefiles when the generic From owner-svn-src-head@freebsd.org Sat Mar 28 16:26:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5536B2A6E79; Sat, 28 Mar 2020 16:26:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qPJ00Fnmz46fH; Sat, 28 Mar 2020 16:26:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 848B9FA72; Sat, 28 Mar 2020 16:26:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SGQl1d071853; Sat, 28 Mar 2020 16:26:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SGQltE071852; Sat, 28 Mar 2020 16:26:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003281626.02SGQltE071852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 28 Mar 2020 16:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359396 - head/sys/dev/sound/pci/hda X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 359396 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 16:26:57 -0000 Author: kib Date: Sat Mar 28 16:26:47 2020 New Revision: 359396 URL: https://svnweb.freebsd.org/changeset/base/359396 Log: hdaa: remove verbosity from the normal driver operations. If hdaa is used in polling mode, it logs each change to the poll interval under bootverbose, which makes it unusable (slow). These messages are arguably useless or are a debugging leftovers at best. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sat Mar 28 15:35:47 2020 (r359395) +++ head/sys/dev/sound/pci/hda/hdac.c Sat Mar 28 16:26:47 2020 (r359396) @@ -1413,21 +1413,11 @@ hdac_poll_reinit(struct hdac_softc *sc) pollticks >>= 1; if (pollticks > hz) pollticks = hz; - if (pollticks < 1) { - HDA_BOOTVERBOSE( - device_printf(sc->dev, - "poll interval < 1 tick !\n"); - ); + if (pollticks < 1) pollticks = 1; - } if (min > pollticks) min = pollticks; } - HDA_BOOTVERBOSE( - device_printf(sc->dev, - "poll interval %d -> %d ticks\n", - sc->poll_ival, min); - ); sc->poll_ival = min; if (min == 1000000) callout_stop(&sc->poll_callout); From owner-svn-src-head@freebsd.org Sat Mar 28 17:06:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA4732A7CF0; Sat, 28 Mar 2020 17:06:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qQ9v0GvXz4MfT; Sat, 28 Mar 2020 17:06:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EAC5183F4; Sat, 28 Mar 2020 17:06:35 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SH6ZRq096383; Sat, 28 Mar 2020 17:06:35 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SH6Ybx096379; Sat, 28 Mar 2020 17:06:34 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003281706.02SH6Ybx096379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 17:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359399 - in head/contrib/telnet: libtelnet telnetd X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/contrib/telnet: libtelnet telnetd X-SVN-Commit-Revision: 359399 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 17:06:44 -0000 Author: kevans Date: Sat Mar 28 17:06:34 2020 New Revision: 359399 URL: https://svnweb.freebsd.org/changeset/base/359399 Log: telnet: remove some duplicate definitions, mark terminaltype extern Most of these were already properly declared and defined elsewhere, this is effectively just a minor cleanup that fixes the -fno-common build. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Modified: head/contrib/telnet/libtelnet/encrypt.c head/contrib/telnet/telnetd/ext.h head/contrib/telnet/telnetd/sys_term.c head/contrib/telnet/telnetd/telnetd.c Modified: head/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- head/contrib/telnet/libtelnet/encrypt.c Sat Mar 28 17:02:32 2020 (r359398) +++ head/contrib/telnet/libtelnet/encrypt.c Sat Mar 28 17:06:34 2020 (r359399) @@ -69,13 +69,6 @@ static const char sccsid[] = "@(#)encrypt.c 8.2 (Berke #include "encrypt.h" #include "misc.h" -/* - * These functions pointers point to the current routines - * for encrypting and decrypting data. - */ -void (*encrypt_output)(unsigned char *, int); -int (*decrypt_input)(int); - int EncryptType(char *type, char *mode); int EncryptStart(char *mode); int EncryptStop(char *mode); Modified: head/contrib/telnet/telnetd/ext.h ============================================================================== --- head/contrib/telnet/telnetd/ext.h Sat Mar 28 17:02:32 2020 (r359398) +++ head/contrib/telnet/telnetd/ext.h Sat Mar 28 17:06:34 2020 (r359399) @@ -58,7 +58,7 @@ extern int auth_level; extern slcfun slctab[NSLC + 1]; /* slc mapping table */ -char *terminaltype; +extern char *terminaltype; /* * I/O data buffers, pointers, and counters. @@ -175,6 +175,10 @@ void output_datalen(const char *, int); void startslave(char *, int, char *); #ifdef ENCRYPTION +/* + * These functions pointers point to the current routines + * for encrypting and decrypting data. + */ extern void (*encrypt_output)(unsigned char *, int); extern int (*decrypt_input)(int); extern char *nclearto; Modified: head/contrib/telnet/telnetd/sys_term.c ============================================================================== --- head/contrib/telnet/telnetd/sys_term.c Sat Mar 28 17:02:32 2020 (r359398) +++ head/contrib/telnet/telnetd/sys_term.c Sat Mar 28 17:06:34 2020 (r359399) @@ -376,8 +376,6 @@ spcset(int func, cc_t *valp, cc_t **valpp) * * Returns the file descriptor of the opened pty. */ -char line[32]; - int getpty(int *ptynum __unused) { Modified: head/contrib/telnet/telnetd/telnetd.c ============================================================================== --- head/contrib/telnet/telnetd/telnetd.c Sat Mar 28 17:02:32 2020 (r359398) +++ head/contrib/telnet/telnetd/telnetd.c Sat Mar 28 17:06:34 2020 (r359399) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #ifdef AUTHENTICATION #include -int auth_level = 0; #endif #ifdef ENCRYPTION #include From owner-svn-src-head@freebsd.org Sat Mar 28 17:10:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED9E52A7D99; Sat, 28 Mar 2020 17:10:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qQGd618kz4Nvy; Sat, 28 Mar 2020 17:10:49 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8198218184; Sat, 28 Mar 2020 17:00:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SH0dWM090774; Sat, 28 Mar 2020 17:00:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SH0cTA090771; Sat, 28 Mar 2020 17:00:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003281700.02SH0cTA090771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 17:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359397 - in head/cddl/contrib/opensolaris/cmd: zfs zpool X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/cddl/contrib/opensolaris/cmd: zfs zpool X-SVN-Commit-Revision: 359397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 17:10:51 -0000 Author: kevans Date: Sat Mar 28 17:00:38 2020 New Revision: 359397 URL: https://svnweb.freebsd.org/changeset/base/359397 Log: zfs: fix -fno-common issues A similar (or identical?) fix has already landed in OpenZFS. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h Sat Mar 28 16:26:47 2020 (r359396) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h Sat Mar 28 17:00:38 2020 (r359397) @@ -33,7 +33,7 @@ extern "C" { void * safe_malloc(size_t size); void nomem(void); -libzfs_handle_t *g_zfs; +extern libzfs_handle_t *g_zfs; #ifdef __cplusplus } Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sat Mar 28 16:26:47 2020 (r359396) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sat Mar 28 17:00:38 2020 (r359397) @@ -64,6 +64,8 @@ #include "statcommon.h" +libzfs_handle_t *g_zfs; + static int zpool_do_create(int, char **); static int zpool_do_destroy(int, char **); Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h Sat Mar 28 16:26:47 2020 (r359396) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h Sat Mar 28 17:00:38 2020 (r359397) @@ -64,7 +64,7 @@ void pool_list_free(zpool_list_t *); int pool_list_count(zpool_list_t *); void pool_list_remove(zpool_list_t *, zpool_handle_t *); -libzfs_handle_t *g_zfs; +extern libzfs_handle_t *g_zfs; #ifdef __cplusplus } From owner-svn-src-head@freebsd.org Sat Mar 28 17:21:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10D8C2604A3; Sat, 28 Mar 2020 17:21:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qQVN07rKz4SKQ; Sat, 28 Mar 2020 17:21:00 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A661183E5; Sat, 28 Mar 2020 17:02:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SH2Xue096139; Sat, 28 Mar 2020 17:02:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SH2Xx1096138; Sat, 28 Mar 2020 17:02:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003281702.02SH2Xx1096138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 17:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359398 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 359398 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 17:21:01 -0000 Author: kevans Date: Sat Mar 28 17:02:32 2020 New Revision: 359398 URL: https://svnweb.freebsd.org/changeset/base/359398 Log: sh: remove duplicate el definition el is declared extern in myhistedit.h and defined in histedit.c. Remove the duplicate definition in input.c to appease the -fno-common build. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Modified: head/bin/sh/input.c Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Sat Mar 28 17:00:38 2020 (r359397) +++ head/bin/sh/input.c Sat Mar 28 17:02:32 2020 (r359398) @@ -102,8 +102,6 @@ static struct parsefile basepf = { /* top level input static struct parsefile *parsefile = &basepf; /* current input file */ int whichprompt; /* 1 == PS1, 2 == PS2 */ -EditLine *el; /* cookie for editline package */ - static void pushfile(void); static int preadfd(void); static void popstring(void); From owner-svn-src-head@freebsd.org Sat Mar 28 17:36:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B6FE2609B8; Sat, 28 Mar 2020 17:36:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qQrX0GX0z4YW3; Sat, 28 Mar 2020 17:36:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D25E8189C5; Sat, 28 Mar 2020 17:36:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SHaeMR015051; Sat, 28 Mar 2020 17:36:40 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SHaemM015049; Sat, 28 Mar 2020 17:36:40 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003281736.02SHaemM015049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 17:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359402 - head/contrib/openbsm/bin/auditreduce X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/openbsm/bin/auditreduce X-SVN-Commit-Revision: 359402 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 17:36:46 -0000 Author: kevans Date: Sat Mar 28 17:36:39 2020 New Revision: 359402 URL: https://svnweb.freebsd.org/changeset/base/359402 Log: MFV r359401: OpenBSM: import ee79d73e8df5: auditreduce: add a zone filter This allows one to select audit records that match a -z zone glob. MFC after: 1 week Sponsored by: Modirum MDPay, Klara Systems Modified: head/contrib/openbsm/bin/auditreduce/auditreduce.1 head/contrib/openbsm/bin/auditreduce/auditreduce.c head/contrib/openbsm/bin/auditreduce/auditreduce.h Directory Properties: head/contrib/openbsm/ (props changed) Modified: head/contrib/openbsm/bin/auditreduce/auditreduce.1 ============================================================================== --- head/contrib/openbsm/bin/auditreduce/auditreduce.1 Sat Mar 28 17:34:47 2020 (r359401) +++ head/contrib/openbsm/bin/auditreduce/auditreduce.1 Sat Mar 28 17:36:39 2020 (r359402) @@ -25,7 +25,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 24, 2004 +.Dd February 20, 2020 .Dt AUDITREDUCE 1 .Os .Sh NAME @@ -47,6 +47,7 @@ .Op Fl r Ar ruid .Op Fl u Ar auid .Op Fl v +.Op Fl z Ar zone .Op Ar .Sh DESCRIPTION The @@ -129,6 +130,10 @@ Select records with the given real user ID or name. Select records with the given audit ID. .It Fl v Invert sense of matching, to select records that do not match. +.It Fl z Ar zone +Select records from the given zone(s). +.Ar zone +is a glob for zones to match. .El .Sh EXAMPLES To select all records associated with effective user ID root from the audit Modified: head/contrib/openbsm/bin/auditreduce/auditreduce.c ============================================================================== --- head/contrib/openbsm/bin/auditreduce/auditreduce.c Sat Mar 28 17:34:47 2020 (r359401) +++ head/contrib/openbsm/bin/auditreduce/auditreduce.c Sat Mar 28 17:36:39 2020 (r359402) @@ -62,6 +62,7 @@ #include #include +#include #include #include #include @@ -94,6 +95,7 @@ static int p_egid; /* Effective group id. */ static int p_rgid; /* Real group id. */ static int p_ruid; /* Real user id. */ static int p_subid; /* Subject id. */ +static const char *p_zone; /* Zone. */ /* * Maintain a dynamically sized array of events for -m @@ -114,6 +116,8 @@ static char *p_sockobj = NULL; static uint32_t opttochk = 0; +static int select_zone(const char *zone, uint32_t *optchkd); + static void parse_regexp(char *re_string) { @@ -186,6 +190,7 @@ usage(const char *msg) fprintf(stderr, "\t-r : real user\n"); fprintf(stderr, "\t-u : audit user\n"); fprintf(stderr, "\t-v : select non-matching records\n"); + fprintf(stderr, "\t-z : zone name\n"); exit(EX_USAGE); } @@ -493,6 +498,21 @@ select_subj32(tokenstr_t tok, uint32_t *optchkd) } /* + * Check if the given zone matches the selection criteria. + */ +static int +select_zone(const char *zone, uint32_t *optchkd) +{ + + SETOPT((*optchkd), OPT_z); + if (ISOPTSET(opttochk, OPT_z) && p_zone != NULL) { + if (fnmatch(p_zone, zone, FNM_PATHNAME) != 0) + return (0); + } + return (1); +} + +/* * Read each record from the audit trail. Check if it is selected after * passing through each of the options */ @@ -559,6 +579,10 @@ select_records(FILE *fp) tok_hdr32_copy, &optchkd); break; + case AUT_ZONENAME: + selected = select_zone(tok.tt.zonename.zonename, &optchkd); + break; + default: break; } @@ -629,7 +653,7 @@ main(int argc, char **argv) converr = NULL; - while ((ch = getopt(argc, argv, "Aa:b:c:d:e:f:g:j:m:o:r:u:v")) != -1) { + while ((ch = getopt(argc, argv, "Aa:b:c:d:e:f:g:j:m:o:r:u:vz:")) != -1) { switch(ch) { case 'A': SETOPT(opttochk, OPT_A); @@ -781,6 +805,11 @@ main(int argc, char **argv) case 'v': SETOPT(opttochk, OPT_v); + break; + + case 'z': + p_zone = optarg; + SETOPT(opttochk, OPT_z); break; case '?': Modified: head/contrib/openbsm/bin/auditreduce/auditreduce.h ============================================================================== --- head/contrib/openbsm/bin/auditreduce/auditreduce.h Sat Mar 28 17:34:47 2020 (r359401) +++ head/contrib/openbsm/bin/auditreduce/auditreduce.h Sat Mar 28 17:36:39 2020 (r359402) @@ -57,6 +57,7 @@ struct re_entry { #define OPT_u 0x00010000 #define OPT_A 0x00020000 #define OPT_v 0x00040000 +#define OPT_z 0x00080000 #define FILEOBJ "file" #define MSGQIDOBJ "msgqid" From owner-svn-src-head@freebsd.org Sat Mar 28 17:57:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF62726101B; Sat, 28 Mar 2020 17:57:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qRJr054fz3CmK; Sat, 28 Mar 2020 17:57:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C47A18DBF; Sat, 28 Mar 2020 17:57:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SHvbFb027719; Sat, 28 Mar 2020 17:57:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SHvagt027715; Sat, 28 Mar 2020 17:57:36 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003281757.02SHvagt027715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 17:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359403 - in head/contrib/telnet: libtelnet telnetd X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/contrib/telnet: libtelnet telnetd X-SVN-Commit-Revision: 359403 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 17:57:52 -0000 Author: kevans Date: Sat Mar 28 17:57:36 2020 New Revision: 359403 URL: https://svnweb.freebsd.org/changeset/base/359403 Log: Revert 359399: telnet -fno-common bits There was a large misfire from my local diff that I need to investigate, and this version committed did not build. Modified: head/contrib/telnet/libtelnet/encrypt.c head/contrib/telnet/telnetd/ext.h head/contrib/telnet/telnetd/sys_term.c head/contrib/telnet/telnetd/telnetd.c Modified: head/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- head/contrib/telnet/libtelnet/encrypt.c Sat Mar 28 17:36:39 2020 (r359402) +++ head/contrib/telnet/libtelnet/encrypt.c Sat Mar 28 17:57:36 2020 (r359403) @@ -69,6 +69,13 @@ static const char sccsid[] = "@(#)encrypt.c 8.2 (Berke #include "encrypt.h" #include "misc.h" +/* + * These functions pointers point to the current routines + * for encrypting and decrypting data. + */ +void (*encrypt_output)(unsigned char *, int); +int (*decrypt_input)(int); + int EncryptType(char *type, char *mode); int EncryptStart(char *mode); int EncryptStop(char *mode); Modified: head/contrib/telnet/telnetd/ext.h ============================================================================== --- head/contrib/telnet/telnetd/ext.h Sat Mar 28 17:36:39 2020 (r359402) +++ head/contrib/telnet/telnetd/ext.h Sat Mar 28 17:57:36 2020 (r359403) @@ -58,7 +58,7 @@ extern int auth_level; extern slcfun slctab[NSLC + 1]; /* slc mapping table */ -extern char *terminaltype; +char *terminaltype; /* * I/O data buffers, pointers, and counters. @@ -175,10 +175,6 @@ void output_datalen(const char *, int); void startslave(char *, int, char *); #ifdef ENCRYPTION -/* - * These functions pointers point to the current routines - * for encrypting and decrypting data. - */ extern void (*encrypt_output)(unsigned char *, int); extern int (*decrypt_input)(int); extern char *nclearto; Modified: head/contrib/telnet/telnetd/sys_term.c ============================================================================== --- head/contrib/telnet/telnetd/sys_term.c Sat Mar 28 17:36:39 2020 (r359402) +++ head/contrib/telnet/telnetd/sys_term.c Sat Mar 28 17:57:36 2020 (r359403) @@ -376,6 +376,8 @@ spcset(int func, cc_t *valp, cc_t **valpp) * * Returns the file descriptor of the opened pty. */ +char line[32]; + int getpty(int *ptynum __unused) { Modified: head/contrib/telnet/telnetd/telnetd.c ============================================================================== --- head/contrib/telnet/telnetd/telnetd.c Sat Mar 28 17:36:39 2020 (r359402) +++ head/contrib/telnet/telnetd/telnetd.c Sat Mar 28 17:57:36 2020 (r359403) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #ifdef AUTHENTICATION #include +int auth_level = 0; #endif #ifdef ENCRYPTION #include From owner-svn-src-head@freebsd.org Sat Mar 28 19:43:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B41C263DC1; Sat, 28 Mar 2020 19:43:58 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qTgK4XGpz4Nn7; Sat, 28 Mar 2020 19:43:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07A981A732; Sat, 28 Mar 2020 19:43:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SJhkvT094916; Sat, 28 Mar 2020 19:43:46 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SJhj28094911; Sat, 28 Mar 2020 19:43:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003281943.02SJhj28094911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 19:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359404 - head/contrib/telnet/telnetd X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/telnet/telnetd X-SVN-Commit-Revision: 359404 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 19:43:58 -0000 Author: kevans Date: Sat Mar 28 19:43:45 2020 New Revision: 359404 URL: https://svnweb.freebsd.org/changeset/base/359404 Log: Re-apply r359399: telnet -fno-common fix line and auth_level's redefinitions are just extraneous telnetd will #define extern and then include ext.h to allocate storage for all of these extern'd vars; however, two of them are actually defined in libtelnet instead. Instead of doing an #ifdef extern dance around those function pointers, just add an EXTERN macro to make it easier to differentiate by sight which ones will get allocated in globals.c and which ones are defined elsewhere. MFC after: 3 days Modified: head/contrib/telnet/telnetd/ext.h head/contrib/telnet/telnetd/global.c head/contrib/telnet/telnetd/state.c head/contrib/telnet/telnetd/sys_term.c head/contrib/telnet/telnetd/telnetd.c Modified: head/contrib/telnet/telnetd/ext.h ============================================================================== --- head/contrib/telnet/telnetd/ext.h Sat Mar 28 17:57:36 2020 (r359403) +++ head/contrib/telnet/telnetd/ext.h Sat Mar 28 19:43:45 2020 (r359404) @@ -30,53 +30,57 @@ * $FreeBSD$ */ +#ifndef EXTERN +#define EXTERN extern +#endif + /* * Telnet server variable declarations */ -extern char options[256]; -extern char do_dont_resp[256]; -extern char will_wont_resp[256]; -extern int linemode; /* linemode on/off */ +EXTERN char options[256]; +EXTERN char do_dont_resp[256]; +EXTERN char will_wont_resp[256]; +EXTERN int linemode; /* linemode on/off */ #ifdef LINEMODE -extern int uselinemode; /* what linemode to use (on/off) */ -extern int editmode; /* edit modes in use */ -extern int useeditmode; /* edit modes to use */ -extern int alwayslinemode; /* command line option */ -extern int lmodetype; /* Client support for linemode */ +EXTERN int uselinemode; /* what linemode to use (on/off) */ +EXTERN int editmode; /* edit modes in use */ +EXTERN int useeditmode; /* edit modes to use */ +EXTERN int alwayslinemode; /* command line option */ +EXTERN int lmodetype; /* Client support for linemode */ #endif /* LINEMODE */ -extern int flowmode; /* current flow control state */ -extern int restartany; /* restart output on any character state */ +EXTERN int flowmode; /* current flow control state */ +EXTERN int restartany; /* restart output on any character state */ #ifdef DIAGNOSTICS -extern int diagnostic; /* telnet diagnostic capabilities */ +EXTERN int diagnostic; /* telnet diagnostic capabilities */ #endif /* DIAGNOSTICS */ #ifdef BFTPDAEMON -extern int bftpd; /* behave as bftp daemon */ +EXTERN int bftpd; /* behave as bftp daemon */ #endif /* BFTPDAEMON */ #ifdef AUTHENTICATION -extern int auth_level; +EXTERN int auth_level; #endif -extern slcfun slctab[NSLC + 1]; /* slc mapping table */ +EXTERN slcfun slctab[NSLC + 1]; /* slc mapping table */ -char *terminaltype; +EXTERN char *terminaltype; /* * I/O data buffers, pointers, and counters. */ -extern char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp; +EXTERN char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp; -extern char netibuf[BUFSIZ], *netip; +EXTERN char netibuf[BUFSIZ], *netip; -extern char netobuf[BUFSIZ], *nfrontp, *nbackp; -extern char *neturg; /* one past last bye of urgent data */ +EXTERN char netobuf[BUFSIZ], *nfrontp, *nbackp; +EXTERN char *neturg; /* one past last bye of urgent data */ -extern int pcc, ncc; +EXTERN int pcc, ncc; -extern int pty, net; -extern char line[32]; -extern int SYNCHing; /* we are in TELNET SYNCH mode */ +EXTERN int pty, net; +EXTERN char line[32]; +EXTERN int SYNCHing; /* we are in TELNET SYNCH mode */ -extern void +EXTERN void _termstat(void), add_slc(char, char, cc_t), check_slc(void), @@ -133,7 +137,7 @@ extern void tty_binaryin(int), tty_binaryout(int); -extern int +EXTERN int end_slc(unsigned char **), getnpty(void), #ifndef convex @@ -158,7 +162,7 @@ extern int tty_istrapsig(void), tty_linemode(void); -extern void +EXTERN void tty_rspeed(int), tty_setecho(int), tty_setedit(int), @@ -177,7 +181,7 @@ void startslave(char *, int, char *); #ifdef ENCRYPTION extern void (*encrypt_output)(unsigned char *, int); extern int (*decrypt_input)(int); -extern char *nclearto; +EXTERN char *nclearto; #endif /* ENCRYPTION */ @@ -186,7 +190,7 @@ extern char *nclearto; * the relationship between various variables. */ -extern struct { +EXTERN struct { int system, /* what the current time is */ echotoggle, /* last time user entered echo character */ Modified: head/contrib/telnet/telnetd/global.c ============================================================================== --- head/contrib/telnet/telnetd/global.c Sat Mar 28 17:57:36 2020 (r359403) +++ head/contrib/telnet/telnetd/global.c Sat Mar 28 19:43:45 2020 (r359404) @@ -44,5 +44,5 @@ __FBSDID("$FreeBSD$"); */ #include "defs.h" -#define extern +#define EXTERN #include "ext.h" Modified: head/contrib/telnet/telnetd/state.c ============================================================================== --- head/contrib/telnet/telnetd/state.c Sat Mar 28 17:57:36 2020 (r359403) +++ head/contrib/telnet/telnetd/state.c Sat Mar 28 19:43:45 2020 (r359404) @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); #include #endif +char *terminaltype; + unsigned char doopt[] = { IAC, DO, '%', 'c', 0 }; unsigned char dont[] = { IAC, DONT, '%', 'c', 0 }; unsigned char will[] = { IAC, WILL, '%', 'c', 0 }; Modified: head/contrib/telnet/telnetd/sys_term.c ============================================================================== --- head/contrib/telnet/telnetd/sys_term.c Sat Mar 28 17:57:36 2020 (r359403) +++ head/contrib/telnet/telnetd/sys_term.c Sat Mar 28 19:43:45 2020 (r359404) @@ -376,8 +376,6 @@ spcset(int func, cc_t *valp, cc_t **valpp) * * Returns the file descriptor of the opened pty. */ -char line[32]; - int getpty(int *ptynum __unused) { Modified: head/contrib/telnet/telnetd/telnetd.c ============================================================================== --- head/contrib/telnet/telnetd/telnetd.c Sat Mar 28 17:57:36 2020 (r359403) +++ head/contrib/telnet/telnetd/telnetd.c Sat Mar 28 19:43:45 2020 (r359404) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #ifdef AUTHENTICATION #include -int auth_level = 0; #endif #ifdef ENCRYPTION #include From owner-svn-src-head@freebsd.org Sat Mar 28 20:43:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67D5C265CC8; Sat, 28 Mar 2020 20:43:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qVzw68m5z3HRX; Sat, 28 Mar 2020 20:43:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A64F1B51E; Sat, 28 Mar 2020 20:43:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SKhGXv031093; Sat, 28 Mar 2020 20:43:16 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SKhG0d031092; Sat, 28 Mar 2020 20:43:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003282043.02SKhG0d031092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 28 Mar 2020 20:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359406 - head/contrib/telnet/telnetd X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/telnet/telnetd X-SVN-Commit-Revision: 359406 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 20:43:26 -0000 Author: kevans Date: Sat Mar 28 20:43:15 2020 New Revision: 359406 URL: https://svnweb.freebsd.org/changeset/base/359406 Log: telnet: kill off remaining duplicate definition Modified: head/contrib/telnet/telnetd/state.c Modified: head/contrib/telnet/telnetd/state.c ============================================================================== --- head/contrib/telnet/telnetd/state.c Sat Mar 28 20:25:45 2020 (r359405) +++ head/contrib/telnet/telnetd/state.c Sat Mar 28 20:43:15 2020 (r359406) @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include #endif -char *terminaltype; - unsigned char doopt[] = { IAC, DO, '%', 'c', 0 }; unsigned char dont[] = { IAC, DONT, '%', 'c', 0 }; unsigned char will[] = { IAC, WILL, '%', 'c', 0 }; From owner-svn-src-head@freebsd.org Sat Mar 28 20:46:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 61FC0265E26; Sat, 28 Mar 2020 20:46:12 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qW362cjnz3JN2; Sat, 28 Mar 2020 20:46:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 503EF1B02E; Sat, 28 Mar 2020 20:25:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SKPl1G019311; Sat, 28 Mar 2020 20:25:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SKPjkZ019304; Sat, 28 Mar 2020 20:25:45 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003282025.02SKPjkZ019304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 28 Mar 2020 20:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359405 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 20:46:14 -0000 Author: tuexen Date: Sat Mar 28 20:25:45 2020 New Revision: 359405 URL: https://svnweb.freebsd.org/changeset/base/359405 Log: Handle integer overflows correctly when converting msecs and secs to ticks and vice versa. These issues were caught by recently added panic() calls on INVARIANTS systems. Reported by: syzbot+b44787b4be7096cd1590@syzkaller.appspotmail.com Reported by: syzbot+35f82d22805c1e899685@syzkaller.appspotmail.com MFC after: 1 week Modified: head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Sat Mar 28 19:43:45 2020 (r359404) +++ head/sys/netinet/sctp_cc_functions.c Sat Mar 28 20:25:45 2020 (r359405) @@ -1914,7 +1914,7 @@ measure_rtt(struct sctp_nets *net) if (net->fast_retran_ip == 0 && net->ssthresh < 0xFFFF && htcp_ccount(&net->cc_mod.htcp_ca) > 3) { if (net->cc_mod.htcp_ca.maxRTT < net->cc_mod.htcp_ca.minRTT) net->cc_mod.htcp_ca.maxRTT = net->cc_mod.htcp_ca.minRTT; - if (net->cc_mod.htcp_ca.maxRTT < srtt && srtt <= net->cc_mod.htcp_ca.maxRTT + MSEC_TO_TICKS(20)) + if (net->cc_mod.htcp_ca.maxRTT < srtt && srtt <= net->cc_mod.htcp_ca.maxRTT + sctp_msecs_to_ticks(20)) net->cc_mod.htcp_ca.maxRTT = srtt; } } @@ -1975,7 +1975,7 @@ htcp_beta_update(struct htcp *ca, uint32_t minRTT, uin } } - if (ca->modeswitch && minRTT > (uint32_t)MSEC_TO_TICKS(10) && maxRTT) { + if (ca->modeswitch && minRTT > sctp_msecs_to_ticks(10) && maxRTT) { ca->beta = (minRTT << 7) / maxRTT; if (ca->beta < BETA_MIN) ca->beta = BETA_MIN; Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sat Mar 28 19:43:45 2020 (r359404) +++ head/sys/netinet/sctp_constants.h Sat Mar 28 20:25:45 2020 (r359405) @@ -577,16 +577,6 @@ __FBSDID("$FreeBSD$"); #define SCTP_ASOC_MAX_CHUNKS_ON_QUEUE 512 -/* The conversion from time to ticks and vice versa is done by rounding - * upwards. This way we can test in the code the time to be positive and - * know that this corresponds to a positive number of ticks. - */ -#define MSEC_TO_TICKS(x) ((hz == 1000) ? x : ((((x) * hz) + 999) / 1000)) -#define TICKS_TO_MSEC(x) ((hz == 1000) ? x : ((((x) * 1000) + (hz - 1)) / hz)) - -#define SEC_TO_TICKS(x) ((x) * hz) -#define TICKS_TO_SEC(x) (((x) + (hz - 1)) / hz) - /* * Basically the minimum amount of time before I do a early FR. Making this * value to low will cause duplicate retransmissions. Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Mar 28 19:43:45 2020 (r359404) +++ head/sys/netinet/sctp_input.c Sat Mar 28 20:25:45 2020 (r359405) @@ -2600,7 +2600,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in */ (void)SCTP_GETTIME_TIMEVAL(&now); /* Expire time is in Ticks, so we convert to seconds */ - time_expires.tv_sec = cookie->time_entered.tv_sec + TICKS_TO_SEC(cookie->cookie_life); + time_expires.tv_sec = cookie->time_entered.tv_sec + sctp_ticks_to_secs(cookie->cookie_life); time_expires.tv_usec = cookie->time_entered.tv_usec; if (timevalcmp(&now, &time_expires, >)) { /* cookie is stale! */ Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Mar 28 19:43:45 2020 (r359404) +++ head/sys/netinet/sctp_pcb.c Sat Mar 28 20:25:45 2020 (r359405) @@ -2556,13 +2556,13 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) m = &inp->sctp_ep; /* setup the base timeout information */ - m->sctp_timeoutticks[SCTP_TIMER_SEND] = SEC_TO_TICKS(SCTP_SEND_SEC); /* needed ? */ - m->sctp_timeoutticks[SCTP_TIMER_INIT] = SEC_TO_TICKS(SCTP_INIT_SEC); /* needed ? */ - m->sctp_timeoutticks[SCTP_TIMER_RECV] = MSEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_delayed_sack_time_default)); - m->sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = MSEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_heartbeat_interval_default)); - m->sctp_timeoutticks[SCTP_TIMER_PMTU] = SEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_pmtu_raise_time_default)); - m->sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] = SEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_shutdown_guard_time_default)); - m->sctp_timeoutticks[SCTP_TIMER_SIGNATURE] = SEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_secret_lifetime_default)); + m->sctp_timeoutticks[SCTP_TIMER_SEND] = sctp_secs_to_ticks(SCTP_SEND_SEC); /* needed ? */ + m->sctp_timeoutticks[SCTP_TIMER_INIT] = sctp_secs_to_ticks(SCTP_INIT_SEC); /* needed ? */ + m->sctp_timeoutticks[SCTP_TIMER_RECV] = sctp_msecs_to_ticks(SCTP_BASE_SYSCTL(sctp_delayed_sack_time_default)); + m->sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = sctp_msecs_to_ticks(SCTP_BASE_SYSCTL(sctp_heartbeat_interval_default)); + m->sctp_timeoutticks[SCTP_TIMER_PMTU] = sctp_secs_to_ticks(SCTP_BASE_SYSCTL(sctp_pmtu_raise_time_default)); + m->sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] = sctp_secs_to_ticks(SCTP_BASE_SYSCTL(sctp_shutdown_guard_time_default)); + m->sctp_timeoutticks[SCTP_TIMER_SIGNATURE] = sctp_secs_to_ticks(SCTP_BASE_SYSCTL(sctp_secret_lifetime_default)); /* all max/min max are in ms */ m->sctp_maxrto = SCTP_BASE_SYSCTL(sctp_rto_max_default); m->sctp_minrto = SCTP_BASE_SYSCTL(sctp_rto_min_default); @@ -2610,7 +2610,7 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL); /* How long is a cookie good for ? */ - m->def_cookie_life = MSEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_valid_cookie_life_default)); + m->def_cookie_life = sctp_msecs_to_ticks(SCTP_BASE_SYSCTL(sctp_valid_cookie_life_default)); /* * Initialize authentication parameters */ Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Sat Mar 28 19:43:45 2020 (r359404) +++ head/sys/netinet/sctp_timer.c Sat Mar 28 20:25:45 2020 (r359405) @@ -1539,7 +1539,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sc tim_touse = &asoc->time_last_sent; } /* Now has long enough transpired to autoclose? */ - ticks_gone_by = SEC_TO_TICKS((uint32_t)(tn.tv_sec - tim_touse->tv_sec)); + ticks_gone_by = sctp_secs_to_ticks((uint32_t)(tn.tv_sec - tim_touse->tv_sec)); if (ticks_gone_by >= asoc->sctp_autoclose_ticks) { /* * autoclose time has hit, call the output routine, Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sat Mar 28 19:43:45 2020 (r359404) +++ head/sys/netinet/sctp_usrreq.c Sat Mar 28 20:25:45 2020 (r359405) @@ -1600,7 +1600,7 @@ sctp_getopt(struct socket *so, int optname, void *optv break; case SCTP_AUTOCLOSE: if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) - val = TICKS_TO_SEC(inp->sctp_ep.auto_close_time); + val = sctp_ticks_to_secs(inp->sctp_ep.auto_close_time); else val = 0; break; @@ -2012,7 +2012,7 @@ flags_out: ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && (sack->sack_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); - sack->sack_delay = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); + sack->sack_delay = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); sack->sack_freq = inp->sctp_ep.sctp_sack_freq; SCTP_INP_RUNLOCK(inp); } else { @@ -2493,7 +2493,7 @@ flags_out: /* Use endpoint defaults */ SCTP_INP_RLOCK(inp); paddrp->spp_pathmaxrxt = inp->sctp_ep.def_net_failure; - paddrp->spp_hbinterval = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); + paddrp->spp_hbinterval = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); paddrp->spp_assoc_id = SCTP_FUTURE_ASSOC; /* get inp's default */ if (inp->sctp_ep.default_dscp & 0x01) { @@ -2765,7 +2765,7 @@ flags_out: SCTP_FIND_STCB(inp, stcb, sasoc->sasoc_assoc_id); if (stcb) { - sasoc->sasoc_cookie_life = TICKS_TO_MSEC(stcb->asoc.cookie_life); + sasoc->sasoc_cookie_life = sctp_ticks_to_msecs(stcb->asoc.cookie_life); sasoc->sasoc_asocmaxrxt = stcb->asoc.max_send_times; sasoc->sasoc_number_peer_destinations = stcb->asoc.numnets; sasoc->sasoc_peer_rwnd = stcb->asoc.peers_rwnd; @@ -2777,7 +2777,7 @@ flags_out: ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && (sasoc->sasoc_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); - sasoc->sasoc_cookie_life = TICKS_TO_MSEC(inp->sctp_ep.def_cookie_life); + sasoc->sasoc_cookie_life = sctp_ticks_to_msecs(inp->sctp_ep.def_cookie_life); sasoc->sasoc_asocmaxrxt = inp->sctp_ep.max_send_times; sasoc->sasoc_number_peer_destinations = 0; sasoc->sasoc_peer_rwnd = 0; @@ -3855,7 +3855,7 @@ sctp_setopt(struct socket *so, int optname, void *optv * The value is in ticks. Note this does not effect * old associations, only new ones. */ - inp->sctp_ep.auto_close_time = SEC_TO_TICKS(*mopt); + inp->sctp_ep.auto_close_time = sctp_secs_to_ticks(*mopt); break; } SCTP_INP_WLOCK(inp); @@ -4252,10 +4252,12 @@ sctp_setopt(struct socket *so, int optname, void *optv SCTP_CHECK_AND_CAST(sack, optval, struct sctp_sack_info, optsize); SCTP_FIND_STCB(inp, stcb, sack->sack_assoc_id); if (sack->sack_delay) { - if (sack->sack_delay > SCTP_MAX_SACK_DELAY) - sack->sack_delay = SCTP_MAX_SACK_DELAY; - if (MSEC_TO_TICKS(sack->sack_delay) < 1) { - sack->sack_delay = TICKS_TO_MSEC(1); + if (sack->sack_delay > SCTP_MAX_SACK_DELAY) { + error = EINVAL; + if (stcb != NULL) { + SCTP_TCB_UNLOCK(stcb); + } + break; } } if (stcb) { @@ -4274,7 +4276,7 @@ sctp_setopt(struct socket *so, int optname, void *optv (sack->sack_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); if (sack->sack_delay) { - inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV] = MSEC_TO_TICKS(sack->sack_delay); + inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV] = sctp_msecs_to_ticks(sack->sack_delay); } if (sack->sack_freq) { inp->sctp_ep.sctp_sack_freq = sack->sack_freq; @@ -5637,14 +5639,14 @@ sctp_setopt(struct socket *so, int optname, void *optv else if (paddrp->spp_hbinterval != 0) { if (paddrp->spp_hbinterval > SCTP_MAX_HB_INTERVAL) paddrp->spp_hbinterval = SCTP_MAX_HB_INTERVAL; - inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = MSEC_TO_TICKS(paddrp->spp_hbinterval); + inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = sctp_msecs_to_ticks(paddrp->spp_hbinterval); } if (paddrp->spp_flags & SPP_HB_ENABLE) { if (paddrp->spp_flags & SPP_HB_TIME_IS_ZERO) { inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = 0; } else if (paddrp->spp_hbinterval) { - inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = MSEC_TO_TICKS(paddrp->spp_hbinterval); + inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = sctp_msecs_to_ticks(paddrp->spp_hbinterval); } sctp_feature_off(inp, SCTP_PCB_FLAGS_DONOT_HEARTBEAT); } else if (paddrp->spp_flags & SPP_HB_DISABLE) { @@ -5759,7 +5761,7 @@ sctp_setopt(struct socket *so, int optname, void *optv if (sasoc->sasoc_asocmaxrxt) stcb->asoc.max_send_times = sasoc->sasoc_asocmaxrxt; if (sasoc->sasoc_cookie_life) { - stcb->asoc.cookie_life = MSEC_TO_TICKS(sasoc->sasoc_cookie_life); + stcb->asoc.cookie_life = sctp_msecs_to_ticks(sasoc->sasoc_cookie_life); } SCTP_TCB_UNLOCK(stcb); } else { @@ -5771,7 +5773,7 @@ sctp_setopt(struct socket *so, int optname, void *optv if (sasoc->sasoc_asocmaxrxt) inp->sctp_ep.max_send_times = sasoc->sasoc_asocmaxrxt; if (sasoc->sasoc_cookie_life) { - inp->sctp_ep.def_cookie_life = MSEC_TO_TICKS(sasoc->sasoc_cookie_life); + inp->sctp_ep.def_cookie_life = sctp_msecs_to_ticks(sasoc->sasoc_cookie_life); } SCTP_INP_WUNLOCK(inp); } else { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Mar 28 19:43:45 2020 (r359404) +++ head/sys/netinet/sctputil.c Sat Mar 28 20:25:45 2020 (r359405) @@ -773,6 +773,80 @@ sctp_audit_log(uint8_t ev, uint8_t fd) #endif /* + * The conversion from time to ticks and vice versa is done by rounding + * upwards. This way we can test in the code the time to be positive and + * know that this corresponds to a positive number of ticks. + */ + +uint32_t +sctp_msecs_to_ticks(uint32_t msecs) +{ + uint64_t temp; + uint32_t ticks; + + if (hz == 1000) { + ticks = msecs; + } else { + temp = (((uint64_t)msecs * hz) + 999) / 1000; + if (temp > UINT32_MAX) { + ticks = UINT32_MAX; + } else { + ticks = (uint32_t)temp; + } + } + return (ticks); +} + +uint32_t +sctp_ticks_to_msecs(uint32_t ticks) +{ + uint64_t temp; + uint32_t msecs; + + if (hz == 1000) { + msecs = ticks; + } else { + temp = (((uint64_t)ticks * 1000) + (hz - 1)) / hz; + if (temp > UINT32_MAX) { + msecs = UINT32_MAX; + } else { + msecs = (uint32_t)temp; + } + } + return (msecs); +} + +uint32_t +sctp_secs_to_ticks(uint32_t secs) +{ + uint64_t temp; + uint32_t ticks; + + temp = (uint64_t)secs * hz; + if (temp > UINT32_MAX) { + ticks = UINT32_MAX; + } else { + ticks = (uint32_t)temp; + } + return (ticks); +} + +uint32_t +sctp_ticks_to_secs(uint32_t ticks) +{ + uint64_t temp; + uint32_t secs; + + temp = ((uint64_t)ticks + (hz - 1)) / hz; + if (temp > UINT32_MAX) { + secs = UINT32_MAX; + } else { + secs = (uint32_t)temp; + } + return (secs); +} + +/* * sctp_stop_timers_for_shutdown() should be called * when entering the SHUTDOWN_SENT or SHUTDOWN_ACK_SENT * state to make sure that all timers are stopped. @@ -1065,7 +1139,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb SCTP_SET_STATE(stcb, SCTP_STATE_INUSE); asoc->max_burst = inp->sctp_ep.max_burst; asoc->fr_max_burst = inp->sctp_ep.fr_max_burst; - asoc->heart_beat_delay = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); + asoc->heart_beat_delay = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); asoc->cookie_life = inp->sctp_ep.def_cookie_life; asoc->sctp_cmt_on_off = inp->sctp_cmt_on_off; asoc->ecn_supported = inp->ecn_supported; @@ -1151,7 +1225,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb asoc->context = inp->sctp_context; asoc->local_strreset_support = inp->local_strreset_support; asoc->def_send = inp->def_send; - asoc->delayed_ack = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); + asoc->delayed_ack = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); asoc->sack_freq = inp->sctp_ep.sctp_sack_freq; asoc->pr_sctp_cnt = 0; asoc->total_output_queue_size = 0; @@ -2115,9 +2189,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_INIT: @@ -2135,9 +2209,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_RECV: @@ -2154,7 +2228,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s #endif } tmr = &stcb->asoc.dack_timer; - to_ticks = MSEC_TO_TICKS(stcb->asoc.delayed_ack); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.delayed_ack); break; case SCTP_TIMER_TYPE_SHUTDOWN: /* Here we use the RTO of the destination. */ @@ -2168,9 +2242,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_HEARTBEAT: @@ -2215,7 +2289,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s * Now we must convert the to_ticks that are now in ms to * ticks. */ - to_ticks = MSEC_TO_TICKS(to_ticks); + to_ticks = sctp_msecs_to_ticks(to_ticks); break; case SCTP_TIMER_TYPE_COOKIE: /* @@ -2233,9 +2307,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_NEWCOOKIE: @@ -2288,9 +2362,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_ASCONF: @@ -2308,9 +2382,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &stcb->asoc.asconf_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: @@ -2328,7 +2402,11 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &stcb->asoc.shut_guard_timer; if (inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] == 0) { - to_ticks = 5 * MSEC_TO_TICKS(stcb->asoc.maxrto); + if (stcb->asoc.maxrto < UINT32_MAX / 5) { + to_ticks = sctp_msecs_to_ticks(5 * stcb->asoc.maxrto); + } else { + to_ticks = sctp_msecs_to_ticks(UINT32_MAX); + } } else { to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN]; } @@ -2360,9 +2438,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &stcb->asoc.strreset_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_INPKILL: @@ -2380,7 +2458,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s #endif } tmr = &inp->sctp_ep.signature_change; - to_ticks = MSEC_TO_TICKS(SCTP_INP_KILL_TIMEOUT); + to_ticks = sctp_msecs_to_ticks(SCTP_INP_KILL_TIMEOUT); break; case SCTP_TIMER_TYPE_ASOCKILL: if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { @@ -2392,7 +2470,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s #endif } tmr = &stcb->asoc.strreset_timer; - to_ticks = MSEC_TO_TICKS(SCTP_ASOC_KILL_TIMEOUT); + to_ticks = sctp_msecs_to_ticks(SCTP_ASOC_KILL_TIMEOUT); break; case SCTP_TIMER_TYPE_ADDR_WQ: if ((inp != NULL) || (stcb != NULL) || (net != NULL)) { @@ -2417,7 +2495,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s #endif } tmr = &stcb->asoc.delete_prim_timer; - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); break; default: #ifdef INVARIANTS Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sat Mar 28 19:43:45 2020 (r359404) +++ head/sys/netinet/sctputil.h Sat Mar 28 20:25:45 2020 (r359405) @@ -392,5 +392,10 @@ void sctp_hc_set_mtu(union sctp_sockstore *, uint16_t, uint32_t sctp_hc_get_mtu(union sctp_sockstore *, uint16_t); void sctp_set_state(struct sctp_tcb *, int); void sctp_add_substate(struct sctp_tcb *, int); +uint32_t sctp_ticks_to_msecs(uint32_t); +uint32_t sctp_msecs_to_ticks(uint32_t); +uint32_t sctp_ticks_to_secs(uint32_t); +uint32_t sctp_secs_to_ticks(uint32_t); + #endif /* _KERNEL */ #endif From owner-svn-src-head@freebsd.org Sat Mar 28 21:47:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9E3326732F; Sat, 28 Mar 2020 21:47:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qXQL2wvxz4BPl; Sat, 28 Mar 2020 21:47:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7AF0C1C37E; Sat, 28 Mar 2020 21:47:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SLljf0067523; Sat, 28 Mar 2020 21:47:45 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SLljCo067522; Sat, 28 Mar 2020 21:47:45 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003282147.02SLljCo067522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 28 Mar 2020 21:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359407 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 359407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 21:47:54 -0000 Author: tsoome Date: Sat Mar 28 21:47:44 2020 New Revision: 359407 URL: https://svnweb.freebsd.org/changeset/base/359407 Log: loader: add knob to build with user malloc This option is intended to aid development, to allow building with user malloc. The use case would be to build userboot & test with libc (or other) malloc and use extra malloc debug features. Modified: head/stand/libsa/stand.h Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Sat Mar 28 20:43:15 2020 (r359406) +++ head/stand/libsa/stand.h Sat Mar 28 21:47:44 2020 (r359407) @@ -436,7 +436,14 @@ extern void mallocstats(void); const char *x86_hypervisor(void); -#ifdef DEBUG_MALLOC +#ifdef USER_MALLOC +extern void *malloc(size_t); +extern void *memalign(size_t, size_t); +extern void *calloc(size_t, size_t); +extern void free(void *); +extern void *realloc(void *, size_t); +extern void *reallocf(void *, size_t); +#elif DEBUG_MALLOC #define malloc(x) Malloc(x, __FILE__, __LINE__) #define memalign(x, y) Memalign(x, y, __FILE__, __LINE__) #define calloc(x, y) Calloc(x, y, __FILE__, __LINE__) From owner-svn-src-head@freebsd.org Sat Mar 28 21:50:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 935F12673CB; Sat, 28 Mar 2020 21:50:52 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qXTm2947z4CKv; Sat, 28 Mar 2020 21:50:52 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F41241C384; Sat, 28 Mar 2020 21:50:27 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SLoRfW067735; Sat, 28 Mar 2020 21:50:27 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SLoRao067734; Sat, 28 Mar 2020 21:50:27 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003282150.02SLoRao067734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 28 Mar 2020 21:50:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359408 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 359408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 21:50:52 -0000 Author: tsoome Date: Sat Mar 28 21:50:27 2020 New Revision: 359408 URL: https://svnweb.freebsd.org/changeset/base/359408 Log: loader: strdup name strings from dataset walker The removal of zfs scratch buffer did miss the fact the dataset lookup was picking up the names from zap list. Modified: head/stand/libsa/zfs/zfs.c Modified: head/stand/libsa/zfs/zfs.c ============================================================================== --- head/stand/libsa/zfs/zfs.c Sat Mar 28 21:47:44 2020 (r359407) +++ head/stand/libsa/zfs/zfs.c Sat Mar 28 21:50:27 2020 (r359408) @@ -92,7 +92,7 @@ static int zfs_env_count; SLIST_HEAD(zfs_be_list, zfs_be_entry) zfs_be_head = SLIST_HEAD_INITIALIZER(zfs_be_head); struct zfs_be_list *zfs_be_headp; struct zfs_be_entry { - const char *name; + cha *name; SLIST_ENTRY(zfs_be_entry) entries; } *zfs_be, *zfs_be_tmp; @@ -906,6 +906,7 @@ zfs_bootenv_initial(const char *name) while (!SLIST_EMPTY(&zfs_be_head)) { zfs_be = SLIST_FIRST(&zfs_be_head); SLIST_REMOVE_HEAD(&zfs_be_head, entries); + free(zfs_be->name); free(zfs_be); } @@ -973,6 +974,7 @@ zfs_bootenv(const char *name) while (!SLIST_EMPTY(&zfs_be_head)) { zfs_be = SLIST_FIRST(&zfs_be_head); SLIST_REMOVE_HEAD(&zfs_be_head, entries); + free(zfs_be->name); free(zfs_be); } @@ -992,7 +994,11 @@ zfs_belist_add(const char *name, uint64_t value __unus if (zfs_be == NULL) { return (ENOMEM); } - zfs_be->name = name; + zfs_be->name = strdup(name); + if (zfs_be->name == NULL) { + free(zfs_be); + return (ENOMEM); + } SLIST_INSERT_HEAD(&zfs_be_head, zfs_be, entries); zfs_env_count++; From owner-svn-src-head@freebsd.org Sat Mar 28 21:55:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45B472678C8; Sat, 28 Mar 2020 21:55:52 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qXbW60XZz4F5p; Sat, 28 Mar 2020 21:55:51 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D6011C56C; Sat, 28 Mar 2020 21:55:43 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SLthhl073771; Sat, 28 Mar 2020 21:55:43 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SLthVO073770; Sat, 28 Mar 2020 21:55:43 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003282155.02SLthVO073770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 28 Mar 2020 21:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359409 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 359409 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 21:55:52 -0000 Author: tsoome Date: Sat Mar 28 21:55:42 2020 New Revision: 359409 URL: https://svnweb.freebsd.org/changeset/base/359409 Log: loader: typo did slip into 359408 somehow r was lost from 'char'. Modified: head/stand/libsa/zfs/zfs.c Modified: head/stand/libsa/zfs/zfs.c ============================================================================== --- head/stand/libsa/zfs/zfs.c Sat Mar 28 21:50:27 2020 (r359408) +++ head/stand/libsa/zfs/zfs.c Sat Mar 28 21:55:42 2020 (r359409) @@ -92,7 +92,7 @@ static int zfs_env_count; SLIST_HEAD(zfs_be_list, zfs_be_entry) zfs_be_head = SLIST_HEAD_INITIALIZER(zfs_be_head); struct zfs_be_list *zfs_be_headp; struct zfs_be_entry { - cha *name; + char *name; SLIST_ENTRY(zfs_be_entry) entries; } *zfs_be, *zfs_be_tmp; From owner-svn-src-head@freebsd.org Sat Mar 28 22:12:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B097268541; Sat, 28 Mar 2020 22:12:06 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48qXyC6GrTz4LG9; Sat, 28 Mar 2020 22:12:03 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-ot1-x331.google.com with SMTP id c9so13862200otl.12; Sat, 28 Mar 2020 15:12:03 -0700 (PDT) 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=KLp80RYfRZDGsUGkL+4ZNB7R9FbuHdwMMqKitQNbcaI=; b=ZKKOiXsqJVgK2Hy3m2pxyEA/anNF8hOnHwRragmJ5W5C7BTyNaHcEnqcvI9n4w/ZFD VO3uWpygM6ukVhi2mfATy2K9kcVcv7jtsLCmJUctVaMbSHudPWUcoCvrf4ZvHcCXd1yR AUJTUxCkebuqkkw6Vfpmw03u6pJUXvP7824SPVBY0GaJoZQc2NAsNFHQbyMSEmrXpxjG 5eGjGATbW2r985XVMHFS2/pm+OUQw74F4mXnoTOHbpsfjqv36t/gNFDZbrwJ9xpM0ORh 2eauOiAiz1ptlWJupPgrxozs73yaEB+J2Pz/hCp0EECg59XS8WxjSwFSRBXg5eZ/rkCd 6u+A== 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=KLp80RYfRZDGsUGkL+4ZNB7R9FbuHdwMMqKitQNbcaI=; b=mIvC66dLAYCXPhwqwqZ32zWApReFLFUhQqZE0V3pDcNXLSH6hnb7r1KV7VjZgj8mLg 6ZsnwfBE+HrWrSrgFl5pRS7TKaIqlWge+j69acAUcj5DmVfpggkAMTNmsEOwtGtn2MoB H01nH0gIkhVu1gyfRYPJGQWzibBCywb2BKZFM/XlElEyktDrmhyqBd7tzOLAxXCCSiyW wJ77jzDXuk/PBsH0yhsrCpzlTNRWsqmgIQ56024U0q5p9MBM8LZlgQOG9mZ+nQ1I1zdV pwmMpWjLsr8Mv3n+0oUZfMUy+teaTdmsFeqxfc/53NllOQAVYYr7M9z96arq7RmczjwH saeQ== X-Gm-Message-State: ANhLgQ0jk4T94D/7OUlrHq2FVMcrgxq2AOr9NF6YbsCnFqSLQfPzrvyC BCB/Jt5jKe+PWFfr2L3xCDjBb4/APsNTlOUt2XKStg== X-Google-Smtp-Source: ADFU+vtIQbEjTI3TJkK6Mi2WOaObyjiN31Z3IgUMsa5IQLfoJ/vAIEhYbpY9xj+TOvbZjNQFKXl/7fzilkLFionXcpU= X-Received: by 2002:a25:61c7:: with SMTP id v190mr8812371ybb.314.1585433042624; Sat, 28 Mar 2020 15:04:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:a291:0:0:0:0:0 with HTTP; Sat, 28 Mar 2020 15:04:01 -0700 (PDT) In-Reply-To: <202003282150.02SLoRao067734@repo.freebsd.org> References: <202003282150.02SLoRao067734@repo.freebsd.org> From: Oliver Pinter Date: Sat, 28 Mar 2020 23:04:01 +0100 Message-ID: Subject: Re: svn commit: r359408 - head/stand/libsa/zfs To: Toomas Soome Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 48qXyC6GrTz4LG9 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 22:12:06 -0000 On Saturday, March 28, 2020, Toomas Soome wrote: > Author: tsoome > Date: Sat Mar 28 21:50:27 2020 > New Revision: 359408 > URL: https://svnweb.freebsd.org/changeset/base/359408 > > Log: > loader: strdup name strings from dataset walker > > The removal of zfs scratch buffer did miss the fact the dataset > lookup was picking up the names from zap list. > > Modified: > head/stand/libsa/zfs/zfs.c > > Modified: head/stand/libsa/zfs/zfs.c > ============================================================ > ================== > --- head/stand/libsa/zfs/zfs.c Sat Mar 28 21:47:44 2020 (r359407) > +++ head/stand/libsa/zfs/zfs.c Sat Mar 28 21:50:27 2020 (r359408) > @@ -92,7 +92,7 @@ static int zfs_env_count; > SLIST_HEAD(zfs_be_list, zfs_be_entry) zfs_be_head = > SLIST_HEAD_INITIALIZER(zfs_be_head); > struct zfs_be_list *zfs_be_headp; > struct zfs_be_entry { > - const char *name; > + cha *name; I think this will be "char *". > SLIST_ENTRY(zfs_be_entry) entries; > } *zfs_be, *zfs_be_tmp; > > @@ -906,6 +906,7 @@ zfs_bootenv_initial(const char *name) > while (!SLIST_EMPTY(&zfs_be_head)) { > zfs_be = SLIST_FIRST(&zfs_be_head); > SLIST_REMOVE_HEAD(&zfs_be_head, entries); > + free(zfs_be->name); > free(zfs_be); > } > > @@ -973,6 +974,7 @@ zfs_bootenv(const char *name) > while (!SLIST_EMPTY(&zfs_be_head)) { > zfs_be = SLIST_FIRST(&zfs_be_head); > SLIST_REMOVE_HEAD(&zfs_be_head, entries); > + free(zfs_be->name); > free(zfs_be); > } > > @@ -992,7 +994,11 @@ zfs_belist_add(const char *name, uint64_t value __unus > if (zfs_be == NULL) { > return (ENOMEM); > } > - zfs_be->name = name; > + zfs_be->name = strdup(name); > + if (zfs_be->name == NULL) { > + free(zfs_be); > + return (ENOMEM); > + } > SLIST_INSERT_HEAD(&zfs_be_head, zfs_be, entries); > zfs_env_count++; > > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Sat Mar 28 22:16:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F00C42686F1 for ; Sat, 28 Mar 2020 22:16:07 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st43p00im-ztfb10063301.me.com (st43p00im-ztfb10063301.me.com [17.58.63.179]) (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 48qY2h5mQxz4MTl for ; Sat, 28 Mar 2020 22:15:56 +0000 (UTC) (envelope-from tsoome@me.com) Received: from nazgul.lan (148-52-235-80.sta.estpak.ee [80.235.52.148]) by st43p00im-ztfb10063301.me.com (Postfix) with ESMTPSA id 7E08DA403AC; Sat, 28 Mar 2020 22:15:46 +0000 (UTC) From: Toomas Soome Message-Id: <12C6C7A4-F1F8-469A-860A-9DD064DE8240@me.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r359408 - head/stand/libsa/zfs Date: Sun, 29 Mar 2020 00:15:44 +0200 In-Reply-To: Cc: Toomas Soome , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" To: Oliver Pinter References: <202003282150.02SLoRao067734@repo.freebsd.org> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2020-03-28_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2003280209 X-Rspamd-Queue-Id: 48qY2h5mQxz4MTl X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.10 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[me.com]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16:c]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[me.com:+]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_IN_DNSWL_LOW(-0.10)[179.63.58.17.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[me.com]; ASN(0.00)[asn:714, ipnet:17.58.63.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[148.52.235.80.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE_FREEMAIL(0.00)[]; DWL_DNSWL_LOW(-1.00)[me.com.dwl.dnswl.org : 127.0.5.1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(0.00)[ip: (-5.13), ipnet: 17.58.63.0/24(-1.62), asn: 714(-2.42), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 22:16:08 -0000 > On 29. Mar 2020, at 00:04, Oliver Pinter = wrote: >=20 >=20 >=20 > On Saturday, March 28, 2020, Toomas Soome > wrote: > Author: tsoome > Date: Sat Mar 28 21:50:27 2020 > New Revision: 359408 > URL: https://svnweb.freebsd.org/changeset/base/359408 = >=20 > Log: > loader: strdup name strings from dataset walker >=20 > The removal of zfs scratch buffer did miss the fact the dataset > lookup was picking up the names from zap list. >=20 > Modified: > head/stand/libsa/zfs/zfs.c >=20 > Modified: head/stand/libsa/zfs/zfs.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/stand/libsa/zfs/zfs.c Sat Mar 28 21:47:44 2020 = (r359407) > +++ head/stand/libsa/zfs/zfs.c Sat Mar 28 21:50:27 2020 = (r359408) > @@ -92,7 +92,7 @@ static int zfs_env_count; > SLIST_HEAD(zfs_be_list, zfs_be_entry) zfs_be_head =3D = SLIST_HEAD_INITIALIZER(zfs_be_head); > struct zfs_be_list *zfs_be_headp; > struct zfs_be_entry { > - const char *name; > + cha *name; >=20 > I think this will be "char *".=20 Yes, I guess I must have (accidentally) removed the =E2=80=98r' after = the build. The fix is already posted. rgds, toomas > =20 > SLIST_ENTRY(zfs_be_entry) entries; > } *zfs_be, *zfs_be_tmp; >=20 > @@ -906,6 +906,7 @@ zfs_bootenv_initial(const char *name) > while (!SLIST_EMPTY(&zfs_be_head)) { > zfs_be =3D SLIST_FIRST(&zfs_be_head); > SLIST_REMOVE_HEAD(&zfs_be_head, entries); > + free(zfs_be->name); > free(zfs_be); > } >=20 > @@ -973,6 +974,7 @@ zfs_bootenv(const char *name) > while (!SLIST_EMPTY(&zfs_be_head)) { > zfs_be =3D SLIST_FIRST(&zfs_be_head); > SLIST_REMOVE_HEAD(&zfs_be_head, entries); > + free(zfs_be->name); > free(zfs_be); > } >=20 > @@ -992,7 +994,11 @@ zfs_belist_add(const char *name, uint64_t value = __unus > if (zfs_be =3D=3D NULL) { > return (ENOMEM); > } > - zfs_be->name =3D name; > + zfs_be->name =3D strdup(name); > + if (zfs_be->name =3D=3D NULL) { > + free(zfs_be); > + return (ENOMEM); > + } > SLIST_INSERT_HEAD(&zfs_be_head, zfs_be, entries); > zfs_env_count++; >=20 > _______________________________________________ > svn-src-head@freebsd.org mailing = list > https://lists.freebsd.org/mailman/listinfo/svn-src-head = > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org = " From owner-svn-src-head@freebsd.org Sat Mar 28 22:35:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF98E269123; Sat, 28 Mar 2020 22:35:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qYSx2s8Mz4TlD; Sat, 28 Mar 2020 22:35:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89F6F1CF05; Sat, 28 Mar 2020 22:35:05 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SMZ5r3097718; Sat, 28 Mar 2020 22:35:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SMZ5fN097717; Sat, 28 Mar 2020 22:35:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003282235.02SMZ5fN097717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 28 Mar 2020 22:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359410 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 22:35:15 -0000 Author: tuexen Date: Sat Mar 28 22:35:04 2020 New Revision: 359410 URL: https://svnweb.freebsd.org/changeset/base/359410 Log: Small cleanup by using a variable just assigned. MFC after: 1 week Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sat Mar 28 21:55:42 2020 (r359409) +++ head/sys/netinet/sctp_usrreq.c Sat Mar 28 22:35:04 2020 (r359410) @@ -2658,8 +2658,8 @@ flags_out: net = stcb->asoc.primary_destination; if (net != NULL) { memcpy(&sstat->sstat_primary.spinfo_address, - &stcb->asoc.primary_destination->ro._l_addr, - ((struct sockaddr *)(&stcb->asoc.primary_destination->ro._l_addr))->sa_len); + &net->ro._l_addr, + ((struct sockaddr *)(&net->ro._l_addr))->sa_len); ((struct sockaddr_in *)&sstat->sstat_primary.spinfo_address)->sin_port = stcb->rport; /* * Again the user can get info from From owner-svn-src-head@freebsd.org Sat Mar 28 22:45:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CC952694B2; Sat, 28 Mar 2020 22:45:34 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qYht20hbz4Y2S; Sat, 28 Mar 2020 22:45:34 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 841FF1CF08; Sat, 28 Mar 2020 22:37:51 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SMbp3O097879; Sat, 28 Mar 2020 22:37:51 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SMbpmC097878; Sat, 28 Mar 2020 22:37:51 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003282237.02SMbpmC097878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 28 Mar 2020 22:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359411 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 359411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 22:45:34 -0000 Author: tsoome Date: Sat Mar 28 22:37:50 2020 New Revision: 359411 URL: https://svnweb.freebsd.org/changeset/base/359411 Log: loader.efi: restore the init and fix the color setup The efi console init is avoided since conin setup was moved to probe. In case the console is re-initialized, we need to pick up colors from environment. Modified: head/stand/efi/libefi/efi_console.c Modified: head/stand/efi/libefi/efi_console.c ============================================================================== --- head/stand/efi/libefi/efi_console.c Sat Mar 28 22:35:04 2020 (r359410) +++ head/stand/efi/libefi/efi_console.c Sat Mar 28 22:37:50 2020 (r359411) @@ -828,8 +828,9 @@ efi_cons_update_mode(void) { UINTN cols, rows; const teken_attr_t *a; + teken_attr_t attr; EFI_STATUS status; - char env[8]; + char env[8], *ptr; status = conout->QueryMode(conout, conout->Mode->Mode, &cols, &rows); if (EFI_ERROR(status) || cols * rows == 0) { @@ -866,18 +867,35 @@ efi_cons_update_mode(void) if (buffer != NULL) { teken_set_winsize(&teken, &tp); a = teken_get_defattr(&teken); + attr = *a; - snprintf(env, sizeof(env), "%d", a->ta_fgcolor); - env_setenv("teken.fg_color", EV_VOLATILE, env, - efi_set_colors, env_nounset); - snprintf(env, sizeof(env), "%d", a->ta_bgcolor); - env_setenv("teken.bg_color", EV_VOLATILE, env, - efi_set_colors, env_nounset); + /* + * On first run, we set up the efi_set_colors() + * callback. If the env is already set, we + * pick up fg and bg color values from the environment. + */ + ptr = getenv("teken.fg_color"); + if (ptr != NULL) { + attr.ta_fgcolor = strtol(ptr, NULL, 10); + ptr = getenv("teken.bg_color"); + attr.ta_bgcolor = strtol(ptr, NULL, 10); + teken_set_defattr(&teken, &attr); + } else { + snprintf(env, sizeof(env), "%d", + attr.ta_fgcolor); + env_setenv("teken.fg_color", EV_VOLATILE, env, + efi_set_colors, env_nounset); + snprintf(env, sizeof(env), "%d", + attr.ta_bgcolor); + env_setenv("teken.bg_color", EV_VOLATILE, env, + efi_set_colors, env_nounset); + } + for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) { buffer[col + row * tp.tp_col].c = ' '; - buffer[col + row * tp.tp_col].a = *a; + buffer[col + row * tp.tp_col].a = attr; } } } @@ -907,9 +925,6 @@ static int efi_cons_init(int arg) { EFI_STATUS status; - - if (conin != NULL) - return (0); conout->EnableCursor(conout, TRUE); if (efi_cons_update_mode()) From owner-svn-src-head@freebsd.org Sat Mar 28 22:50:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F3E1269641; Sat, 28 Mar 2020 22:50:52 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48qYpz0PvZz4ZfZ; Sat, 28 Mar 2020 22:50:51 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1F0C1D102; Sat, 28 Mar 2020 22:44:08 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02SMi8oG003609; Sat, 28 Mar 2020 22:44:08 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02SMi8DF003608; Sat, 28 Mar 2020 22:44:08 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202003282244.02SMi8DF003608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Sat, 28 Mar 2020 22:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359412 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 359412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 22:50:52 -0000 Author: grog Date: Sat Mar 28 22:44:08 2020 New Revision: 359412 URL: https://svnweb.freebsd.org/changeset/base/359412 Log: Add year to Boganda's death. Modified: head/usr.bin/calendar/calendars/calendar.holiday Modified: head/usr.bin/calendar/calendars/calendar.holiday ============================================================================== --- head/usr.bin/calendar/calendars/calendar.holiday Sat Mar 28 22:37:50 2020 (r359411) +++ head/usr.bin/calendar/calendars/calendar.holiday Sat Mar 28 22:44:08 2020 (r359412) @@ -103,7 +103,7 @@ 03/26 Independence Day in Bangladesh 03/26 Prince Jonah Kuhio Kalanianaole Day in Hawaii 03/27 Armed Forces Day in Burma -03/29 Death of President Barthelemy Boganda in Central African Republic +03/29 Death of President Barthelemy Boganda in Central African Republic, 1959 03/29 Memorial Day in Madagascar 03/31 National Day in Malta 03/MonLast Seward's Day in Alaska (last Monday) From owner-svn-src-head@freebsd.org Sat Mar 28 23:10:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D300269E77 for ; Sat, 28 Mar 2020 23:10:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48qZFy2f0Vz3DRt for ; Sat, 28 Mar 2020 23:10:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x832.google.com with SMTP id z24so10763951qtu.4 for ; Sat, 28 Mar 2020 16:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DYAeTEHYwQ/LaWVTloMTg3nINdJvhr1h9/bWJhOGudg=; b=dTS+0w59UaSfLP+DQBOHM/0G+EOMb7hYQJWkNiDGn9A7sgfF2qCYM/LIVXyrYXI0UI 4uZ8B0qh7gCtLNQNdtazonRXm2q9nUw7A7VrRjJpDRlR6PJb0m6ytk7gq32Qs4RSfCuw w60zE6YDSiVvHRO47sEwNUT4Yw2YGf7PIeSIp2alj60+cFQeSgdzlXwAP4R0zKcmpmWy lL9H3V5+ilQzzVgGHaJN32VpWsIy3znGvAY9gvJAaSAs4bOE7NDG42yD3H7Ej3qiKzSU JtB4GG6L0OGkUNN4blQ8NJ4Q9zzi13VG1SxnTaoTCH4eS0k2AHR7wZPDpcN0j7SamK5d kRzQ== 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=DYAeTEHYwQ/LaWVTloMTg3nINdJvhr1h9/bWJhOGudg=; b=r7oNaQXUCxQy9xPcmhcTsorsdY5YkKfCNw95K00LgO+e9pnPFDJ+dPT0KmnStJWUlw DtsrceZgF5BBkKYRNIC/6KYcwCZBrCbA+G6ng7I/Psv5mtcDL+VfHggFwIJH4qHa1OuR Gcc0A2Wks++cv6NnKmhbZ5N5Ak1gPNKUcfq+RM1mNY3UNWxIoc44NtiOC3w+L0YiWizg 5r99RSnjenVLNFImuDpShPca9sdo1b6G5dd4muzjKJe2kpizuTrBbufv3dMlR2Nh3b4l 4sd3UrI5H8j7IzcXWYZyBOEX+uPlHzdtA5TCOwN4IcxAirDhNgHJn3xX2T25ugD8pSOg i8Xg== X-Gm-Message-State: ANhLgQ01mCbheMTCGoHhVkQkE0ZqhondvtuSktbW95rL3xEnPSMC4VpI YPmu460ZmX/3nIsV74AZiNacpzb4jehB0Pt4V1nMEA== X-Google-Smtp-Source: ADFU+vuvzAuZwKQHwiNTbGWWBwFZf5yodJcvNo8KH63J3OEAgzNjRZT5FMkQsZygZwrO+eyZ8q+2rsBWvwdJY5Raz0Y= X-Received: by 2002:ac8:4449:: with SMTP id m9mr5717299qtn.175.1585437039888; Sat, 28 Mar 2020 16:10:39 -0700 (PDT) MIME-Version: 1.0 References: <202003282147.02SLljCo067522@repo.freebsd.org> In-Reply-To: <202003282147.02SLljCo067522@repo.freebsd.org> From: Warner Losh Date: Sat, 28 Mar 2020 17:10:28 -0600 Message-ID: Subject: Re: svn commit: r359407 - head/stand/libsa To: Toomas Soome Cc: src-committers , svn-src-all , svn-src-head@freebsd.org X-Rspamd-Queue-Id: 48qZFy2f0Vz3DRt X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=dTS+0w59; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::832) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.03 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.03)[ip: (-9.29), ipnet: 2607:f8b0::/32(-0.36), asn: 15169(-0.46), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 23:10:58 -0000 On Sat, Mar 28, 2020, 3:49 PM Toomas Soome wrote: > Author: tsoome > Date: Sat Mar 28 21:47:44 2020 > New Revision: 359407 > URL: https://svnweb.freebsd.org/changeset/base/359407 > > Log: > loader: add knob to build with user malloc > > This option is intended to aid development, to allow building with user > malloc. > The use case would be to build userboot & test with libc (or other) > malloc and > use extra malloc debug features. > > Modified: > head/stand/libsa/stand.h > > Modified: head/stand/libsa/stand.h > > ============================================================================== > --- head/stand/libsa/stand.h Sat Mar 28 20:43:15 2020 (r359406) > +++ head/stand/libsa/stand.h Sat Mar 28 21:47:44 2020 (r359407) > @@ -436,7 +436,14 @@ extern void mallocstats(void); > > const char *x86_hypervisor(void); > > -#ifdef DEBUG_MALLOC > +#ifdef USER_MALLOC > +extern void *malloc(size_t); > +extern void *memalign(size_t, size_t); > +extern void *calloc(size_t, size_t); > +extern void free(void *); > +extern void *realloc(void *, size_t); > +extern void *reallocf(void *, size_t); > +#elif DEBUG_MALLOC > This is missing a defined(). Warner > #define malloc(x) Malloc(x, __FILE__, __LINE__) > #define memalign(x, y) Memalign(x, y, __FILE__, __LINE__) > #define calloc(x, y) Calloc(x, y, __FILE__, __LINE__) >