Commit Graph

5188 Commits

Author SHA1 Message Date
Peter Holm
201434ecac stress2: Added two test scenarios based on Bug 256205 2021-06-07 07:35:10 +02:00
Peter Holm
b3b695604d stress2: Added a few syzkaller reproducers 2021-06-07 07:33:32 +02:00
Dimitry Andric
95aa617e4b Add C++ headers <barrier> <concepts> <execution> <latch> <numbers> <semaphore>
I missed adding these to the libc++ Makefile, when importing
llvm-project 11.0.0-rc1, even though they were supplied by upstream.

While here, update OptionalObsoleteFiles.inc to add these new headers,
and cleanup old cruft.

Reported by:	yuri
Submitted by:	jkim (Makefile diff)
PR:		255374
MFC after:	3 days
2021-06-03 20:53:18 +02:00
Peter Holm
8682abbf7b stress2: Remove thr_new() from the ignore list after 6cda627556 2021-06-03 07:23:01 +02:00
Peter Holm
0a9e7899e2 stress2: Removed three mksnap_ffs(8) tests from the exclude list 2021-05-27 08:52:12 +02:00
Peter Holm
0b5d6b8173 stress2: Added a new ptrace() test scenario 2021-05-26 08:08:56 +02:00
Peter Holm
bad9303974 stress2: Update the exclude list 2021-05-26 08:06:38 +02:00
Peter Holm
79f27053e4 stress2: Fix cleanup on exit 2021-05-26 08:05:55 +02:00
Adrian Chadd
da7f6e6790 [athstats] Add a tag to listen for beacon stuff
I'm debugging weird beacon issues and thus here we are.
2021-05-22 15:54:44 -07:00
Adrian Chadd
079bd2e750 [athstats] Add some (but not all, sigh) missing statistics.
This adds a few recent statistics, including TSFOOR that I just
added to the driver.
2021-05-22 15:54:25 -07:00
Allan Jude
20d684ecc9 pkt-gen: Allow limiting received packets
Makes pkg-gen quit after having received N packets, the same way it
already supports doing for sent packets.

Reviewed by:	vmaffione
Sponsored by:	Klara Inc.
MFC after:	4 weeks
Differential Revision:	https://reviews.freebsd.org/D30266
2021-05-22 01:55:29 +00:00
Peter Holm
7de0aa0135 stress2: Added a new "mdconfig -o force" test scenario 2021-05-19 08:22:09 +02:00
Mitchell Horne
cf653b7abe git-arc(1): fix usage formatting for stage command
The branch argument is conditional on the -b flag.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D30262
2021-05-14 17:34:04 -03:00
Peter Holm
2a60dec091 stress2: Added a regression test. Fixed a type on an old test 2021-05-14 09:18:39 +02:00
Peter Holm
1025baec7b stress2: Added two new syzkaller reproducers. Update the exclude list 2021-05-13 07:57:32 +02:00
Peter Holm
2018d48862 stress2: Added two new syzkaller reproducers. Update the exclude list 2021-05-08 08:24:42 +02:00
John Baldwin
0ac711e07e Add a description for WITH_SVNLITE.
Reviewed by:	emaste
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30106
2021-05-05 14:11:32 -07:00
Peter Holm
c85b57ac01 stress2: New test scenario added 2021-05-04 12:55:58 +02:00
Peter Holm
cff133b05b stress2: Added a regression test 2021-05-03 09:08:43 +02:00
Peter Holm
a7d46ad087 stress2: Added a syzkaller reproducer 2021-05-03 09:05:32 +02:00
Peter Holm
573bd33a33 stress2: Fix a typo. 2021-05-03 08:45:55 +02:00
Thomas Munro
18f21f0355 Update tools/regression/poll/sockpoll.c for POLLRDPOLL.
Add a POLLRDHUP example to this tool, for comparison with other
operating systems.  Also record current output on FreeBSD and Linux.

Reviewed by:    kib
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D29757
2021-04-28 23:15:39 +12:00
Alex Richardson
f8e57f89f3 tools/build/bootstrap-m4: regenerate after d37f81e35b
Reviewed by:	jkim
2021-04-21 10:57:51 +01:00
Alex Richardson
3bca8d2b32 Revert "contrib/flex: Drop local __dead2 patch"
I missed the review comment to commit the changes separately, will
reland in multiple smaller commits.

Requested By:   jkim
This reverts commit bbd421cdf6.
2021-04-21 10:48:47 +01:00
Sofian Brabez
b8be809495 wlanstats: fix build
Add -Wno-cast-align to the CFLAGS to fix the build of wlanstats

Approved by:	adrian
MFC after:	1 week
2021-04-20 19:31:44 +00:00
Sofian Brabez
561d34d705 iwnstats: fix build with clang and allow install under /usr/local/sbin
iwnstats was not compiling because of some issues raised by the clang
compiler due to -Werror. As a tool it is not connected to world build.

Add missing field "barker_mrc" initialization in struct
iwn_sensitivity_limits for -Wmissing-field-initializers, remove unused
pointer *is on iwn_stats_*_print functions and unused variables for
-Wunused-parameter and -Wunused-variable.

The value for field "barker_mrc" of struct iwn2030_sensitivity_limits
was obtained from linux 3.2 wireless/iwlwifi driver code (iwl-2000.c:115
.barker_corr_th_min_mrc = 390).

Also set BINDIR in Makefile to make it possible to install under
/usr/local/sbin/iwnstats as it require super user.

Reviewed by:	adrian
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D29800
2021-04-20 18:07:56 +00:00
Alex Richardson
bbd421cdf6 contrib/flex: Drop local __dead2 patch
Upstream flex has added a yynoreturn, so this diff is no longer needed.
Partially reverts r181269. Also regenerate the pre-generated files that
are used for bootstrapping.

Reviewed By:	jkim

Differential Revision: https://reviews.freebsd.org/D29679
2021-04-20 01:46:42 +01:00
Peter Holm
7f014be5ea stress2: Added a syzkaller reproducer. A variation of syzkaller32.sh 2021-04-18 07:19:07 +02:00
John Baldwin
76681661be OCF: Remove support for asymmetric cryptographic operations.
There haven't been any non-obscure drivers that supported this
functionality and it has been impossible to test to ensure that it
still works.  The only known consumer of this interface was the engine
in OpenSSL < 1.1.  Modern OpenSSL versions do not include support for
this interface as it was not well-documented.

Reviewed by:	cem
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D29736
2021-04-12 14:28:43 -07:00
Ed Maste
9d178c925f Drop 'Set to' from most src.conf(5) knobs
The description is clearly what effect the knob has when set, so the
additional text was unnecessary.

Reviewed by:	jhb, se
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29583
2021-04-09 22:23:03 -04:00
Peter Holm
6f646494e1 stress2: Added a new regression test 2021-04-04 10:36:09 +02:00
Peter Holm
a17a9c931a stress2: update the list of test not to run 2021-04-04 10:31:52 +02:00
Peter Holm
332a600138 stress2: Add note about problems found. 2021-04-04 10:27:53 +02:00
Vincenzo Maffione
45c67e8f6b netmap: several typo fixes
No functional changes intended.
2021-04-02 07:01:20 +00:00
John Baldwin
c86de1dab8 cryptocheck: Expand the set of sizes tested by -z.
Test individual sizes up to the max encryption block length as well as
a few sizes that include 1 full block and a partial block before
doubling the size.

Reviewed by:	cem, markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D29518
2021-04-01 15:49:07 -07:00
Vincenzo Maffione
51cc31088b netmap: bridge: fix transmission in busy-wait mode
In busy-wait mode (BUSYWAIT defined), NIOCTXSYNC should be
performed after packets have been moved to the TX ring
(rather than before).
Before the change, moved packets may stall for an indefinite
time in the TX ring.

MFC after:	1 week
2021-03-30 06:24:56 +00:00
Vincenzo Maffione
27bf5dd3d4 netmap: pkt-gen: allow -Z and -z to be used together
These options are used for generating random source/destination
IP/ports within transmitted packets.

MFC after:	1 week
2021-03-30 06:18:46 +00:00
Alex Richardson
142cb88bc6 git-arc.sh: Make it compatible with Ubuntu 18.04
dash does not allow function names containing a ":", so replace it with
a '_'. Additionally, Ubunutu 18.04 ships git 2.17 which does not support
the `--default false` flag for git config.

Reviewed By:	markj
Differential Revision: https://reviews.freebsd.org/D29374
2021-03-25 11:17:58 +00:00
Alex Richardson
4fd0c6ab1a Fix most shellcheck warnings in git-arc.sh
Mostly adding quotes and replacing egrep/fgrep with grep -E/grep -F

Reviewed By:	markj
Differential Revision: https://reviews.freebsd.org/D29373
2021-03-25 11:17:32 +00:00
Alex Richardson
c8c62548bf Don't add -Winline for WARNS=6
This warning is very rarely useful (inline is a hint and not mandatory).
This flag results in many warnings being printed when compiling C++
code that uses the standard library with GCC.

This flag was originally added in back in r94332 but the flag is a no-op
in Clang ("This diagnostic flag exists for GCC compatibility, and has no
effect in Clang"). Removing it should make the GCC build output slightly
more readable.

Reviewed By:	jrtc27, imp
Differential Revision: https://reviews.freebsd.org/D29235
2021-03-22 11:55:45 +00:00
Alex Richardson
2b181156c8 tools/build/make.py: Avoid calling brew --prefix on macOS unnecessarily
If all the require variables (XCC/XCXX/XCPP/XLD) are already set in the
environment, we don't have to infer a default value for the cross toolchain
path. This avoids an additional `brew --prefix` call when building with
cheribuild (since it already sets all these variables).
2021-03-22 11:55:07 +00:00
Peter Holm
e54257d92a stress2: Updated the exclude list 2021-03-22 11:32:05 +01:00
Peter Holm
6d5586da63 stress2: Added two syzkaller reproducers. 2021-03-22 11:26:39 +01:00
Dimitry Andric
15deee52d6 Move GH_BC ObsoleteFiles.inc section to OptionalObsoleteFiles.inc
Optional features belong in the latter file, and should be tested using:

.if ${MK_FEATURE} == no
[...]
.endif
2021-03-20 23:15:01 +01:00
Jessica Clarke
8c9e45503f tools/build: Improve host-symlinks failure mode
Since set -e is enabled by sys.mk, if the tool cannot be found in PATH
then the entire shell command line fails, causing us to not print the
error message below and instead silently (due to the @) fail, only
getting the usual "Error code 1" print from bmake. Thus, provide a dummy
default that will never exist (the same as is used by meta2deps.sh) if
which fails so that we get the error message as intended.

MFC after:	1 week
2021-03-20 13:00:34 +00:00
Emmanuel Vadot
c7e6cb9e08 pkgbase: Add an src.conf option for splitting man pages
Man pages can be big in total, add an options to split man pages
in -man packages so we produce smaller packages.
This is useful for small jails or mfsroot produced of pkgbase.
The option is off by default.

Reviewed by:	bapt, Mina Galić <me@igalic.co>
Differential Revision:	https://reviews.freebsd.org/D29169
MFC after:      2 weeks
2021-03-16 07:13:09 +01:00
Peter Holm
cefb959e18 stress2: Update expetced errno 2021-03-15 12:16:52 +01:00
Peter Holm
f619b21d0f stress2: Fix usage of unitializer data 2021-03-15 12:00:01 +01:00
Gordon Bergling
5666643a95 Fix some common typos in comments
- occured -> occurred
- normaly -> normally
- controling -> controlling
- fileds -> fields
- insterted -> inserted
- outputing -> outputting

MFC after:	1 week
2021-03-13 18:26:15 +01:00
Peter Holm
e0fd837a30 stress2: open(2) tests with BENEATH flags.
Update tests to reflect the changes of "open(2): Remove O_BENEATH and
AT_BENEATH" in 20e91ca36a.
2021-03-08 09:19:37 +01:00
John Baldwin
442a293611 cryptocheck: Free generated IV after each GMAC test.
Reviewed by:	cem
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D28753
2021-03-03 15:20:57 -08:00
John Baldwin
68c0373448 cryptocheck: Add support for the Poly1305 digest.
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D28758
2021-03-03 15:20:56 -08:00
John Baldwin
e6cfd2939a Remove the usr/tests/usr.bin/yacc/yacc directory when removing yacc.
MFC after:	1 week
2021-03-03 14:46:45 -08:00
Mark Johnston
c113740f26 git-arc.1: Fix synopsis for the "update" verb 2021-03-03 17:01:04 -05:00
Mark Johnston
c49b075305 git-arc: Handle commit ranges in the "update" verb
Reported by:	imp
2021-03-03 17:00:58 -05:00
Peter Holm
8a272653d9 stress2: Initial import
Discussed with:	 kib
2021-03-03 15:11:40 +01:00
Kyle Evans
e4d63c5d5f Remove fmtree(8)
fmtree(8) deprecation was announced on February 12, 2021, and no longer
built by default as of that date.  The deprecation notice was merged
back to stable/12 and stable/13 + releng/13.0.

Continue with the plan by finishing the removal.

Relnotes:	yes
2021-03-02 15:22:05 -06:00
Alex Richardson
10f2a0c2e8 Silence a macro-redefined warning when crossbuilding
This is already defined by the ncurses headers, so just undef it before
defining it again.
2021-03-01 14:22:47 +00:00
Alex Richardson
a26ace4db6 tools/build/make.py: Don't call brew --prefix if --cross-bindir is set
Also updated the logic to use subprocess.run() instead of the old
subprocess.getoutput() which also includes stderr and therefore
can trigger an exception inside Path().exists().

Reported by:	gnn
2021-03-01 12:53:46 +00:00
Ed Maste
aa8ae5fe17 git hooks: add "Fixes" trailer to commit message template
A number of projects use "Fixes: <hash>" to identify a commit that is
fixed by a given change.  Adopt that convention.

Differential Revision:	https://reviews.freebsd.org/D28693
2021-02-22 10:29:56 -05:00
John Baldwin
1bd9fc96d4 cryptocheck: Add Chacha20-Poly1305 AEAD coverage.
- Make openssl_gcm_encrypt generic to AEAD ciphers (aside from CCM)
  and use it for Chacha20-Poly1305.

- Use generic AEAD control constants instead of GCM/CCM specific names.

Reviewed by:	cem
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D27838
2021-02-18 09:26:32 -08:00
Mark Johnston
cd6114d1a6 git-arc: Preserve the commit author when staging commits
Reported by:	jhb
2021-02-18 11:00:09 -05:00
Mark Johnston
57ba8673d7 git-arc: Globally save and restore the git checkout head
This script uses -e, so it's prone to exiting in awkward places.  In
particular, if arc diff fails, the script just exits without restoring
the checkout.

Mitigate this for now by using a global variable to record the previous
checkout and use a trap handler to restore it in the face of errors.  A
better solution might be to use arc diff's --head parameter but that
will require more testing.

Reported by:	kevans
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D28631
2021-02-18 11:00:09 -05:00
Alex Richardson
962a3814d4 Fix bootstrap tools build on macOS after 02af91c52e
After changing the namespace.h header we need to provide _err on macOS, too.
Previously we used the system libc err*/warn*, but that does not provide
_err/_warn (which is used by other bootstrapped files from libc).
To fix this problem bootstrap err.c on macOS as well.

Fixes:		02af91c52 (Fix crossbuild bootstrap tools build with Clang 12)
2021-02-17 16:35:14 +00:00
Alex Richardson
02af91c52e Fix crossbuild bootstrap tools build with Clang 12
Clang 12 no longer allows re-defining a weak symbol as non-weak. This
happed here because we compile err.c with _err defined to err. To fix
this, use the same approach as the libc namespace.h
2021-02-17 09:54:59 +00:00
Alex Richardson
88db1cc9f1 tools/build/make.py: drop workaround for cc --version not being parsed
Previously bsd.compiler.mk was not able to detect the compiler type for
Ubuntu's /usr/bin/cc unless we were invoking the /usr/bin/gcc symlink.
This problem has been fixed by 9c6954329a
so we can drop the workaround from make.py.

Reviewed By:	jrtc27
Differential Revision: https://reviews.freebsd.org/D28323
2021-02-13 13:54:25 +00:00
Kyle Evans
c975494ad7 build: turn off FMTREE by default to prepare for removal
nmtree is derived from fmtree, and has been the default mtree(8) since
6adfbbbf16, a little over a year after its introduction.

fmtree has not seen any substantial work since then, except for build
fixes and runtime issues that were diagnosed in nmtree and backported
because this was still in the tree.

Turn it off by default.

Reviewed by:	bdrewery, brooks, cy, emaste
Differential Revision:	https://reviews.freebsd.org/D28573
2021-02-12 23:16:06 -06:00
Daniel Ebdrup Jensen
5ae8b01832 git-arc(1): Fix nits pointed out in final review
Pointy hat to:	me
2021-02-12 23:39:00 +01:00
Daniel Ebdrup Jensen
30f78a063e git-arc(1): Add manual page
Add manual page based on the usage in the script with a few changes and
hook it up to the build.

Reviewed by:	0mp, markj
Differential Revision:	https://reviews.freebsd.org/D28519
2021-02-12 23:35:02 +01:00
Mark Johnston
62374dfa0f git-arc: Use a separate message file
Rather than putting revision metadata in .git/arc/create-message, create
a tmpfile and use that.  Otherwise arc diff always prompts about it and
in some cases complains because its standard input is piped.

Reported by:	imp
Differential Revision:	https://reviews.freebsd.org/D28614
2021-02-12 15:58:17 -05:00
Daniel Ebdrup Jensen
d242f782c2 prepare-commit-msg: Remove blank character
Approved by:	emaste@ (maintainer)
2021-02-08 20:18:39 +01:00
Mark Johnston
3279329b2d tools/git: Add git-arc
This is a handy script for creating and updating Differential revisions
from git commits.  It tries to avoid forcing the user to manage their
git tree in any particular way, but makes two major assumptions:
- there is a one-to-one mapping between git commits and Differential
  revisions,
- the title of a Differential revision is the same as the summary line
  of the corresponding commit.

A verbose description of the script's functionality is provided in its
usage message, which should probably be converted to a man page.

A description of workflows using git-arc is here:
https://lists.freebsd.org/pipermail/freebsd-hackers/2021-January/056979.html

There are some loose ends but this is functional enough to be useful.

Discussed with:	jhb
Differential Revision:	https://reviews.freebsd.org/D28334
2021-02-05 09:47:05 -05:00
Alex Richardson
43e083be81 tools/build/make.py: -DNO_CLEAN -> -DWITHOUT_CLEAN 2021-02-03 17:06:07 +00:00
Ed Maste
9d0f1092cf git hooks: add "Tested by" to commit message template
Reported by:	mjg
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2021-02-02 13:41:08 -05:00
Konstantin Belousov
ff975f15d8 WITH_OFED build option: fix
Userspace has OFED build enabled for quite some time, but kernel modules
were not. This is useless config because any userspace IB code requires
kernel support. So enable modules build by default.

Move WITH_OFED to WITHOUT_OFED since defaults are now enabled.

Reviewed by:	emaste, hselasky, kevans
MFC after:	3 days
Sponsored by:	NVidia Networking / Mellanox Technologies
Differential Revision:	https://reviews.freebsd.org/D28460
2021-02-02 18:44:52 +02:00
Alex Richardson
5cf6f1c4bc Remove the MK_LIBCPLUSPLUS option
This option has been equivalent to any form of C++ support since libstdc++
was removed. Therefore, replace all MK_LIBCPLUSPLUS uses with MK_CXX.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27974
2021-02-01 09:32:07 +00:00
Kyle Evans
8eeeee38f4 tools: boot: use four jobs for building stand
Parallel builds of stand should be assumed both possible and safe as of
7012461c9b, so let's start using some jobs to speed up lualoader test
harness builds.
2021-01-31 10:11:41 -06:00
Ed Maste
6955737522 Remove unused GNUCXX option descriptions
Missed from 57f804675e

Reported by:	arhchardson in D27974
Sponsored by:	The FreeBSD Foundation
2021-01-30 12:47:33 -05:00
Kyle Evans
7587d9823a build: options: mention ports in the WITH_OPENLDAP description
There's a third party dependency on this option; currently,
net/openldap24-{,sasl-}client.  At least mention that an openldap from ports
is needed for this option.

PR:		252866
Reported-by:	Build Option Survey via Michael Dexter
MFC-after:	3 days
2021-01-30 10:41:52 -06:00
John Baldwin
aa906e2a49 OpenSSL: Support for kernel TLS offload (KTLS)
This merges upstream patches from OpenSSL's master branch to add
KTLS infrastructure for TLS 1.0-1.3 including both RX and TX
offload and SSL_sendfile support on both Linux and FreeBSD.

Note that TLS 1.3 only supports TX offload.

A new WITH/WITHOUT_OPENSSL_KTLS determines if OpenSSL is built with
KTLS support.  It defaults to enabled on amd64 and disabled on all
other architectures.

Reviewed by:	jkim (earlier version)
Approved by:	secteam
Obtained from:	OpenSSL (patches from master)
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D28273
2021-01-28 10:24:13 -08:00
Marius Strobl
84876bf702 build: remove NDIS option
ndis(4) has been removed in bfc99943b0.
2021-01-26 22:59:36 +01:00
Brooks Davis
bfc99943b0 ndis(4): remove as previous announced
nids(4) was a clever idea in the early 2000's when the market was
flooded with 10/100 NICs with Windows-only drivers, but that hasn't been
the case for ages and the driver has had no meaningful maintenance in
ages. It only supports Windows-XP era drivers.

Also remove:
 - ndis support from wpa_supplicant
 - ndiscvt(8)

Reviewed By:	emaste, bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D27609
2021-01-25 21:45:03 +00:00
Alexander Richardson
a8b20f4fab Create symlinks to host tools on non-FreeBSD hosts
This is unnecessary when cross-building from Linux/macOS.
Additionally, cp -p appears to be broken on macOS Big Sur
(https://openradar.appspot.com/8957219).

For some unknown reason this commit appears to fix
freezes when building on macOS Big Sur.
This also fixes building in docker with volume mounts
with ACLs, since setting the ACL with cp -p fails otherwise.

Obtained From:	CheriBSD
Tested By:	gnn (macOS Big Sur), Nathaniel Wesley Filardo (docker)
Reviewed By:	jrtc27, imp
Differential Revision: https://reviews.freebsd.org/D28267
2021-01-25 15:09:43 +00:00
Ed Maste
b23665f316 Remove Binutils from src.conf(5) option descriptions
All binutils remnants have been removed before FreeBSD 13.

PR:		252842
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2021-01-24 12:22:01 -05:00
Jessica Clarke
d6327ae8c1 Fix cross-build support for Ubuntu 16.04
Older glibc headers did some very nasty things that have since been
sanitised. We could also fix this by adding a linux/getopt.h wrapper
alongside the existing common/getopt.h that #undef's __need_getopt, but
that seems a little more hacky and complicated.

Reviewed by:	arichardson
2021-01-23 20:59:15 +00:00
Kyle Evans
123ae3045d build: remove LIBPTHREAD/LIBTHR build options
WITHOUT_LIBTHR has been broken for a little over five years now, since the
xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building
a useful system without threading support is becoming increasingly more
difficult.

Additionally, in the five plus years that it's been broken more reverse
dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among
others) that make it more and more difficult to reconcile the effort needed
to fix these options.

Remove the broken options.

PR:		252760
Reviewed by:	brooks, emaste, kib
Differential Revision:	https://reviews.freebsd.org/D28263
2021-01-22 12:33:27 -06:00
Alex Richardson
0348c8fcfa getopt: Fix conversion from string-literal to non-const char *
Define a non-const static char EMSG[] = "" to avoid having to add
__DECONST() to all uses of EMSG. Also make current_dash a const char *
to fix this warning.
2021-01-19 21:23:25 +00:00
Marius Strobl
145f01a3df kerneldoc: remove Doxyfile for cmx(4)
The latter has been removed in 0d3a424a89.
2021-01-16 23:53:13 +01:00
Dimitry Andric
7593c13e18 Add libclang_rt.profile-powerpc64le.a to (Optional)?ObsoleteFiles.inc
On little-endian PowerPC64, this prevented /usr/lib/clang/11.0.0 being
cleaned up completely after upgrading to clang 11.0.1.

Noticed by:	pkubaj
MFC after:	4 weeks
X-MFC-With:	r364284
2021-01-16 17:25:56 +01:00
Mariusz Zaborski
aefe30c543 cat: capsicumize it
Reviewed by:	markj, arichardson
Differential Revision:	https://reviews.freebsd.org/D28083
2021-01-15 21:23:42 +01:00
Kyle Evans
03774659d1 tools: git hooks: drop "submitted by" from commit template
With the switch to git, we should strive to properly attribute every
commit appropriately with the metadata that's provided to do so. In this
case, the submitter should be recorded via the author metadata.  Committing
an arbitrary patch, one can set it as such:

git commit --author="John Smith <smith@example.com>"

Reviewed-by:	emaste
Differential-Revision:	https://reviews.freebsd.org/D28069
2021-01-14 00:33:07 -06:00
Vincenzo Maffione
d7493759fb netmap: pkt-gen: fix offset hex formatting
PR:		252594
Reported by:	brpoole@vt.edu
MFC after:	3 days
2021-01-12 22:05:04 +00:00
Kyle Evans
14a16fd3e7 build: add WITHOUT_CLEAN workaround for 821aa63a09
The *w variants of ncurses directories went away, and the remaining names
build the widechar variants instead of non-widechar variants. As such, the
entire ncurses tree should be regenerated.

Key off of lib/ncurses/ncursesw being present and remove the whole ncurses
hierarchy if it is.

Reviewed by:	emaste (IRC)
2021-01-08 10:43:53 -06:00
Warner Losh
a21def4d56 pccard: Remove wi(4) driver
Remove wi(4). pccard is going away, and wi only supports PC Card
devices, though it has a minor amount of glue to also support
PCI cards. However, removing the one without removing the other
is hard, so the whole driver is being removed.

Relnotes: Yes
2021-01-07 20:41:06 -07:00
Alex Richardson
d146f83180 prepare-commit-msg: Avoid warning on macOS and shellcheck fixes
The macOS /bin/sh complains about using return outside of functions.
Replace `return 0` with `exit 0` to fix this. While editing this files
I've also fixed all the shellcheck warnings that were displayed by my IDE.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D28016
2021-01-07 14:00:32 +00:00
Alex Richardson
b500c184b6 Drop some unncessary stale code from Makefile.boot
No longer required after 0e1e341b48.
2021-01-07 10:55:21 +00:00
Alex Richardson
d037edf820 tools/build/make.py: Fix macOS build after a920b9817
If we set STRIPBIN, we also have to set XSTRIPBIN since we otherwise
use the host /usr/bin/strip during buildworld. However, this does not
work on macOS since /usr/bin/strip doesn't handle ELF binaries.
2021-01-07 10:55:21 +00:00
Alex Richardson
7fa2f2a62f Rename NO_WERROR -> MK_WERROR=no
As suggested in D27598. This also supports MK_WERROR.clang=no and
MK_WERROR.gcc=no to support the existing NO_WERROR.<compiler> uses.

Reviewed By:	brooks
Differential Revision: https://reviews.freebsd.org/D27601
2021-01-07 09:31:03 +00:00
Alex Richardson
7467c537a5 Fix warnings during bootstrap phase on macOS 2021-01-07 09:31:03 +00:00
Alex Richardson
4e64fb9f49 Fix warnings during bootstrap on Linux systems
Most warnings are currently off for the boostrap phase, but once D27598
lands they will be enabled again.
2021-01-07 09:30:50 +00:00
Alex Richardson
ed8455806e Fix all warnings emitted in make kernel-toolchain
With this change and D27598 make kernel-toolchain no longer emits any
warnings for me.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27599
2021-01-07 09:26:22 +00:00
Vincenzo Maffione
163f4f1573 netmap: bridge: fix NS_MOREFRAG support
Support for NS_MOREFRAG is broken, as NS_MOREFRAG is copied from
the TX slot to the RX slot rather than the other way around.
Also, the NS_MOREFRAG must be copied also in case of packet
copy (no zerocopy).

Reported by:	rajesh1.kumar_amd.com
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D27980
2021-01-07 07:05:57 +00:00
Kristof Provost
c38e59ce1b pfctl: Fix NOCLEAN build
We've created a new pf_ruleset.c file for pfctl and no longer use the
kernel vrsion, but the build system doesn't handle this dependency
change correctly. Delete the dependency file if it contains the kernel
version of the file.

MFC after:	2 weeks
2021-01-06 22:07:46 +01:00
Baptiste Daroussin
821aa63a09 ncurses: only keep the version with widechar support
Only keep the widechar version of ncurses as libncursesw.so.9

Keep the old name to avoid breaking the ABI compatibility (the non
widechar version libncurses.so.9 is not binary compatible with
libncursesw.so.9) since all ports and base are already only linking
against the widechar version we can simply remove libncurses.so.9

Since the .9 version only lived in the dev branch and never ended in a
release, it is simply removed and not added to any binary compat
package.

Add symlinks to keep build time compatibility for anyone linking against
-lncurses
2021-01-05 14:01:32 +01:00
Dimitry Andric
eaeb601bd6 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after:	4 weeks
X-MFC-With:	r364284
2021-01-03 13:54:24 +01:00
Ed Maste
b67e440755 Add comment explaining Git commit message hook
Suggested by:	jhb
2020-12-30 12:33:19 -05:00
Poul-Henning Kamp
07b0027f6c Handle ports FLAVOR better. (+minor polish) 2020-12-30 16:05:09 +00:00
Hiroki Sato
916806472a Fix generation of colldef source files for non-UTF-8 locales
- Files for colldef were generated by duplicating UTF-8 collation files
  for each language and included invalid characters in the non-UTF-8
  encodings.  localedef(1) does not allow those characters.
  cldr2def.pl now checks if the characters are valid based on charmap files.

  TODO: ja_JP.UTF-8 locale should not be generated solely from CLDR because
  it was standardized in a document "UI-OSF Application Platform Profile for
  Japanese Environment" which was incompatible with information in CLDR.
  Most of commercial Unix vendors adopt this pre-Unicode-era document
  as the reference even for UTF-8 locale.  Newer versions of Solaris have
  added a CLDR version as ja_JP.UTF-8@cldr, and IBM AIX has used
  JA_JP.UTF-8 for the UI-OSF specification and ja_JP.UTF-8 for CLDR.

  Note that this commit does not change generation of ja_JP.UTF-8.
  Changes related to this issue will be committed separately later.

- Generate POSIX charamap UTF-32 as a reference.  It was confusing that
  charmap.xml used Unicode names defined in UnicodeData.txt though POSIX
  charmap used slightly different names for the same code points.
  cldr2def.pl now uses UTF-32.cm as single information source for Unicode
  symbol names and code points.  Charset.xml is also updated to use them.

- Fix a bug in get_encodings() in cldr2def.pl which did not understand
  0x00+0x00 notation correctly in charmaps/ISCII-DEV.TXT.

- Do not regenerate posix/xx_Comm_C.UTF-8.src every time when doing
  "make build".

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27809
2020-12-30 04:40:27 +09:00
Adrian Chadd
66585c3fe2 [wlanwatch] fix compiler warnings-as-errors on gcc-6.4 mips
* argc/argv are currently unused
* msglen is currently unused
* "default" is a const buffer, but char *cp isn't, so
  change default string to be a non-const global string variable
* Make 'cp' private to each context that's using it, which fixes
  a "variable shadows previous declaration" warning and makes it
  easier to track where it was being leaked between address family
  sections
2020-12-29 10:24:36 -08:00
Adrian Chadd
1fef838b91 [wlanwds] Fix compiler warnings-as-errors on freebsd gcc-6.4 mips
* Remove unused verbose global; things are now done through syslog
* Mark a variable as unused in handle_rtmsg()

Tested:

* FreeBSD/mips32 using gcc-6.4
2020-12-29 10:24:33 -08:00
Adrian Chadd
ff7c2c5a3b [wlanstats] Fix warnings-as-errors on gcc-6.4 on mips
* use CLLADDR() to not try deconsting a const
* Unsigned where they should be
* static where it should be

Tested:

* freebsd/mips32, using gcc-6.4
2020-12-29 10:24:30 -08:00
Kyle Evans
8aff76fb37 build: remove the option to build gnugrep
Unconditionally install bsdgrep as grep, bootstrap or not. Remove all
build glue and stop installing both gnugrep and libgnuregex now that
all consumers of the latter are gone.

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D27732
2020-12-25 15:14:17 -06:00
Marius Strobl
9cca83b6db mk48txx(4): remove obsolete driver
It's no longer used since 58aa35d429
and r357455 respectively.
2020-12-25 19:47:45 +01:00
Marius Strobl
d141239c56 mc146818(4): remove obsolete driver
It's no longer used since 58aa35d429
and r357455 respectively.
2020-12-25 19:47:45 +01:00
Ed Maste
a62107ed19 make the git commit message template more compact
git's default commit message includes the list of staged, unstaged, and
untracked files; adding our metadata tags and then their descriptions
made for a very long template.

Move the descriptions to the metadata lines themselves.

Reviewed by:	bcr
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27664
2020-12-23 08:58:17 -05:00
Yuri Pankov
f952bdf142 tools/tools/locale: skip control character widths
Do not explicitly encode control characters widths as 0
allowing wcwidth() to return the proper implicit value for
non-printable characters (-1).

Reported by:	naddy
2020-12-23 15:53:43 +03:00
Yuri Pankov
150367e9aa tools/tools/locale: fix static-colldef 2020-12-18 08:43:06 +00:00
Yuri Pankov
43835d120f tools/tools/locale: install generated files in current src checkout 2020-12-18 04:01:05 +00:00
Ed Maste
f3fec471a3 Describe the commit message template our git hook script produces
Reported by:	rpokala
2020-12-17 20:31:45 +00:00
Ed Maste
352b4e2092 chmod +x the git commit message prep hook 2020-12-17 20:11:31 +00:00
Ed Maste
9f13adee8b Add initial version of git commit message preparation hook
Start with a slightly modified version of the SVN commit template, to
allow developers to experiment.  This will be updated in the future as
our process and techniques evolve.

This can be installed by copying or symlinking into the .git/hooks/
directory.

Feedback from:	cem, jhb
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27633
2020-12-17 19:58:29 +00:00
Kyle Evans
29842cb36e lualoader: fix lua-lint run
luacheck rightfully complains that i is unused in the show-module-options
loop at the end (it was used for some debugging in the process).

We've added a new pager module that's compiled in, so declare that as an
acceptable global.
2020-12-17 18:29:30 +00:00
Brooks Davis
a7e24b48d2 Remove Doxyfiles for removed drivers
Reported by:	emaste
2020-12-15 18:44:41 +00:00
Ed Maste
1c0ea326aa Retire obsolete GDB 6.1.1
GDB 6.1.1 was released in June 2004 and is long obsolete. It does not
support all of the architectures that FreeBSD does, and imposes
limitations on the FreeBSD kernel build, such as the continued use of
DWARF2 debugging information.

It was kept (in /usr/libexec/) only for use by crashinfo(8), which
extracts some basic information from a kernel core dump after a crash.
Crashinfo already prefers gdb from port/package if installed.

Future work may add kernel debug support to LLDB or find another path
for crashinfo's needs, but in any case we do not want to ship the
excessively outdated GDB in FreeBSD 13.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27610
2020-12-15 17:44:19 +00:00
Ed Maste
369d70ec92 Remove more cx,ctau leftovers
Missed in r359178
2020-12-15 01:45:19 +00:00
Yuri Pankov
89b418d69e locale: fix mode for installed files to be 644, not 755
While here, drop '-c' flag to install as it's default and provided for
backward compatibility only.
2020-12-12 23:41:47 +00:00
Ian Lepore
ff3468ac94 Provide userland notification of gpio pin changes ("userland gpio interrupts").
This is an import of the Google Summer of Code 2018 project completed by
Christian Kramer (and, sadly, ignored by us for two years now).  The goals
stated for that project were:

    FreeBSD already has support for interrupts implemented in the GPIO
    controller drivers of several SoCs, but there are no interfaces to take
    advantage of them out of user space yet. The goal of this work is to
    implement such an interface by providing descriptors which integrate
    with the common I/O system calls and multiplexing mechanisms.

The initial imported code supports the following functionality:

 -  A kernel driver that provides an interface to the user space; the
    existing gpioc(4) driver was enhanced with this functionality.
 -  Implement support for the most common I/O system calls / multiplexing
    mechanisms:
     -  read() Places the pin number on which the interrupt occurred in the
        buffer. Blocking and non-blocking behaviour supported.
     -	poll()/select()
     -	kqueue()
     -	signal driven I/O. Posting SIGIO when the O_ASYNC was set.
 -  Many-to-many relationship between pins and file descriptors.
     -  A file descriptor can monitor several GPIO pins.
     -  A GPIO pin can be monitored by multiple file descriptors.
 -  Integration with gpioctl and libgpio.

I added some fixes (mostly to locking) and feature enhancements on top of
the original gsoc code.  The feature ehancements allow the user to choose
between detailed and summary event reporting.  Detailed reporting provides
a record describing each pin change event.  Summary reporting provides the
time of the first and last change of each pin, and a count of how many times
it changed state since the last read(2) call.  Another enhancement allows
the recording of multiple state change events on multiple pins between each
call to read(2) (the original code would track only a single event at a time).

The phabricator review for these changes timed out without approval, but I
cite it below anyway, because the review contains a series of diffs that
show how I evolved the code from its original state in Christian's github
repo for the gsoc project to what is being commited here.  (In effect,
the phab review extends the VC history back to the original code.)

Submitted by:	Christian Kramer
Obtained from:	https://github.com/ckraemer/freebsd/tree/gsoc2018
Differential Revision:	https://reviews.freebsd.org/D27398
2020-12-12 18:34:15 +00:00
Mitchell Horne
d46a2a0013 riscv: allow building virtual machine images
RISC-V has the same booting requirements as arm64 (loader.efi, no legacy
boot options), so generated images for both architectures have the same
partition layout.

Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D27044
2020-12-08 00:37:11 +00:00
Hiroki Sato
6c9838ca71 Fix the source directory when installing the results. The install
target did not install them actually.

Spotted by:	Thomas Munro, bapt, yuripv
2020-12-07 04:45:29 +00:00
Yuri Pankov
2c8d44449b update wcwidth data from utf8proc
Character width data being out of date is a constant source
of weird rendering issues and wasted time trying to diagnose
those, e.g. as reported by Jeremy Chadwick:

https://gitlab.com/muttmua/mutt/-/issues/67

Sadly, there is no real ("standard") wcwidth data source, so
this tries to rectify the problem using the utf8proc one (through
its C API) which would hopefully benefeat both FreeBSD and
utf8proc through bug reports (if any).

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27259
2020-12-06 16:44:41 +00:00
Kyle Evans
7c2f310f6d Retire GNU_GREP_COMPAT knob
This was introduced and then disabled by default primarily to avoid dealing
with bugs in libgnuregex. rS363823 switched to using libregex for it, so
let's just rip the option out now so we can make sure we're getting tested
with libregex via bsdgrep.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D27476
2020-12-05 02:21:58 +00:00
Alex Richardson
a920b9817e make.py: Also pass STRIPBIN
This is required for cross-building to allow stripping the installed binaries.

Submitted By:	Henry Vogt <hv@tue.mpg.de>
2020-12-04 15:53:44 +00:00
Olivier Cochard
6b97a6e365 Fix compilation on head and while here:
- remove unwanted whitespaces
- remove useless function ifphys()
- fix the Makefile to install it into /usr/bin

PR:		250133
Reviewed by:	glebius, maxim
Approved by:	glebius
Differential Revision:	https://reviews.freebsd.org/D27155
2020-11-30 15:04:35 +00:00
Alan Somers
d262451715 ping: add a ping6 hard link for backwards compatibility
When invoked as "ping6", ping will now attempt to use ICMPv6 for hostnames
that resolve both IPv4 and IPv6 addresses.

Reviewed by:	bz, manu
MFC-With:	r368045
Differential Revision:	https://reviews.freebsd.org/D27384
2020-11-26 18:33:04 +00:00
Ulrich Spörlein
accf961151 GH Actions: Use pre-installed clang packages
Also fix the run by setting up the environment in non-deprecated way.

Always run with --debug to understand better what sort of stuff is happening in
the background. Also split out the bmake bootstrap stage (takes about 31s on
ubuntu, but 1m14 on macOS?)

Drops the dependency on coreutils (realpath, nproc) and thus (?) fixes macOS to
be just as fast (4 logical cores vs 2 physical cores before, go figure.)

Reviewed by:		arichardson
2020-11-26 14:42:16 +00:00
Alan Somers
3cde9171d2 Merge ping6 to ping
There is now a single ping binary, which chooses to use ICMP or ICMPv4
based on the -4 and -6 options, and the format of the address.

Submitted by:	Ján Sučan <sucanjan@gmail.com>
Sponsored by:	Google LLC (Google Summer of Code 2019)
MFC after:	Never
Differential Revision:	https://reviews.freebsd.org/D21377
2020-11-26 04:29:30 +00:00
John Baldwin
a4a23d2137 Remove uses of CRIOGET in OCF tests after r368005.
Pointy hat to:	jhb
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D27367
2020-11-25 01:31:00 +00:00
John Baldwin
688f8b822c Remove the cloned file descriptors for /dev/crypto.
Crypto file descriptors were added in the original OCF import as a way
to provide per-open data (specifically the list of symmetric
sessions).  However, this gives a bit of a confusing API where one has
to open /dev/crypto and then invoke an ioctl to obtain a second file
descriptor.  This also does not match the API used with /dev/crypto on
other BSDs or with Linux's /dev/crypto driver.

Character devices have gained support for per-open data via cdevpriv
since OCF was imported, so use cdevpriv to simplify the userland API
by permitting ioctls directly on /dev/crypto descriptors.

To provide backwards compatibility, CRIOGET now opens another
/dev/crypto descriptor via kern_openat() rather than dup'ing the
existing file descriptor.  This preserves prior semantics in case
CRIOGET is invoked multiple times on a single file descriptor.

Reviewed by:	markj
Relnotes:	yes
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D27302
2020-11-25 00:10:54 +00:00
Vincenzo Maffione
7ebc0ac4c9 netmap: bridge: improve readability
Multiple cosmetic changes, plus a fix to a verbose print
(indicating wrong net->host/host->net direction).

MFC after:	3 days
2020-11-22 13:39:21 +00:00
Vincenzo Maffione
91c60ce828 netmap: nmreplay: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

MFC after:      3 days
2020-11-22 09:38:01 +00:00
Vincenzo Maffione
73b2e3e56b netmap: lb: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

MFC after:	3 days
2020-11-22 09:28:50 +00:00
Vincenzo Maffione
4bfe1a4fe2 netmap: pkt-gen: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h
2020-11-22 09:20:08 +00:00
Vincenzo Maffione
ecfd9756ce netmap: bridge: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h
2020-11-22 09:10:12 +00:00
Vincenzo Maffione
f234252d16 netmap: bridge, pkt-gen: fix man page typo
Reported by:	ian
MFC after:	3 days
2020-11-21 18:47:13 +00:00
Vincenzo Maffione
792d05c2c8 netmap: bridge: update man page with more information
Update the man page to describe how it is necessary to
enable promiscuous mode and/or disable offloads.
2020-11-21 18:20:21 +00:00
Alex Richardson
d34f599cd2 Revert "When building on Ubuntu bootstrap bmake with bash as the default shell"
This reverts r365950 since the latest bmake update includes fixes for the test
failures that prompted the change.
2020-11-16 11:38:51 +00:00
Dimitry Andric
2406f943a8 Ensure make delete-old does not unlink the llvm-cxxfilt and its manpage,
after r367304 and r367324, when WITH_LLVM_CXXFILT is enabled.

Noticed by:	"Herbert J. Skuhra" <herbert@gojira.at>
MFC after:	3 days
X-MFC-With:	r367304
2020-11-15 22:49:28 +00:00
Brooks Davis
e268fd0a02 Support initializing stack variables on function entry
There are two options:
 - WITH_INIT_ALL_ZERO: Zero all variables on the stack.
 - WITH_INIT_ALL_PATTERN: Initialize variables with well-defined patterns.

The exact pattern are a compiler implementation detail and vary by type.
They are somewhat documented in the LLVM commit message:
https://reviews.llvm.org/rL349442
I've used WITH_INIT_ALL_* to match Microsoft's InitAll feature rather
than naming them after the LLVM specific compiler flags.

In a range of consumer products, options like these are used in
both debug and production builds with debugs builds using patterns
(intended to provoke crashes on use of uninitialized values) and
production using zeros (deemed more likely to lead to harmless
misbehavior or NULL-pointer dereferences).

Reviewed by:	emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D27131
2020-11-10 19:15:13 +00:00
Thomas Munro
cc7edd258c Add collation version support to querylocale(3).
Provide a way to ask for an opaque version string for a locale_t, so
that potential changes in sort order can be detected.  Similar to
ICU's ucol_getVersion() and Windows' GetNLSVersionEx(), this API is
intended to allow databases to detect when text order-based indexes
might need to be rebuilt.

The CLDR version is extracted from CLDR source data by the Makefile
under tools/tools/locale, written into the machine-generated Makefile
under shared/colldef, passed to localedef -V, and then written into
LC_COLLATE file headers.  The initial version is 34.0.
tools/tools/locale was recently updated to pull down 35.0, but the
output hasn't been committed under share/colldef yet, so that will
provide the first observable change when it happens.  Other versioning
schemes are possible in future, because the format is unspecified.

Reviewed by:	bapt, 0mp, kib, yuripv (albeit a long time ago)
Differential Revision:	https://reviews.freebsd.org/D17166
2020-11-08 02:50:34 +00:00
John Baldwin
760bb6e210 Remove unnecessary __DECONST().
Reviewed by:	markj
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D27063
2020-11-03 22:53:23 +00:00