Commit Graph

4877 Commits

Author SHA1 Message Date
Dimitry Andric
72e1e27118 Change clang lib dir to 9.0.0. 2019-08-23 22:12:20 +00:00
Vladimir Kondratyev
7f32f0e227 iwmbtfw: Firmware loader for Intel Wireless 8260 based Bluetooth USB devices
Currently supported models are: 8260, 8265, 9560, 9260 and 22161.
Firmware files can be installed with comms/iwmbt-firmware port.

PR:			237083
Reviewed by:		hps, emax
X-MFC with:		r351196
Differential Revision:	https://reviews.freebsd.org/D21071
2019-08-18 22:20:28 +00:00
Ed Maste
029d6957cc Remove rlogin/rsh references from src.conf(5) WITHOUT_BLACKLIST_SUPPORT
rcmds were removed in r324351

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-08-13 14:51:16 +00:00
Conrad Meyer
162022d77d tools/tools/crypto: cryptokeytest: Fix build with newer OpenSSL
Also, drag into this decade.
2019-08-09 02:11:47 +00:00
Leandro Lupori
403c9d52eb [PPC64] Don't mark ld.bfd as obsolete
PowerPC64 still needs ld.bfd for 32-bit binaries/libraries.

This will be needed when ELFv2 becomes default, but there is no harm in
committing it already.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D21136
2019-08-05 13:28:21 +00:00
Mark Johnston
fbe12f2085 Include caph_rights_limit() in libegacy if need be.
Reported by:	jenkins
Sponsored by:	The FreeBSD Foundation
2019-08-01 19:26:16 +00:00
Ed Maste
a5ada504b3 remove obsolete kernel debugging script
For quite some time kgdb has been internally handling FreeBSD kernel
module state; add-on scripts and tools are not needed.  asf(8) served
a similar purpose to this script and was removed in r335222.

PR:		229046
Reported by:	jhb
Sponsored by:	The FreeBSD Foundation
2019-08-01 17:02:58 +00:00
Eric van Gyzen
8c5a9161d1 Save the last callout function executed on each CPU
Save the last callout function pointer (and its argument) executed
on each CPU for inspection by a debugger.  Add a ddb `show callout_last`
command to show these pointers.  Add a kernel module that I used
for testing that command.

Relocate `ce_migration_cpu` to reduce padding and therefore preserve
the size of `struct callout_cpu` (320 bytes on amd64) despite the
added members.

This should help diagnose reference-after-free bugs where the
callout's mutex has already been freed when `softclock_call_cc`
tries to unlock it.

You might hope that the pointer would still be available, but it
isn't.  The argument to that function is on the stack (because
`softclock_call_cc` uses it later), and that might be enough in
some cases, but even then, it's very laborious.  A pointer to the
callout is saved right before these newly added fields, but that
callout might have been freed.  We still have the pointer to its
associated mutex, and the name within might be enough, but it might
also have been freed.

Reviewed by:	markj jhb
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20794
2019-07-03 19:22:44 +00:00
Tijl Coosemans
330014fd65 Also remove lib32 versions of libradius.
MFC after:	1 week
2019-07-03 09:14:39 +00:00
Marcel Moolenaar
da4f5bdaff Add support for Python 3 and make it the default.
Python 2.7 will retire on Januari 1, 2020.
2019-06-30 02:29:12 +00:00
Cy Schubert
015cb6cde4 Create a link to the ipmon.conf.5 man page as documented in ipmon.5.
Add its corresponding optional removal entry.

PR:		238816
MFC after:	1 week
2019-06-27 12:37:44 +00:00
Cy Schubert
74bc7fc0b4 Add the ipmon.5 man page.
PR/238816 initially addressed updates to usage() however the PR has
morphed into a shopping list of updates to usage() and man pages.

PR:		238816 (I added to the list during discussion)
MFC after:	1 week
2019-06-27 02:43:26 +00:00
Warner Losh
804b78634d Mount and unmount devfs around calls to add packages.
pkg now uses /dev/null for some of its operations. NanoBSD's packaging
stuff didn't mount that for the chroot it ran in, so any config that
added packages would see the error:
	pkg: Cannot open /dev/null:No such file or directory
when trying to actually add those packages. It's easy enough for
nanobsd to mount /dev and it won't hurt anything that was already
working and may help things that weren't (like this). I moved the
mount/unmount pair to be in the right push/pop order from the
submitted patch.

PR: 238727
Submitted by: mike tancsa
Tested by: Karl Denninger
2019-06-21 03:49:36 +00:00
Conrad Meyer
c363b16c63 sys: Remove DEV_RANDOM device option
Remove 'device random' from kernel configurations that reference it (most).
Replace perhaps mistaken 'nodevice random' in two MIPS configs with 'options
RANDOM_LOADABLE' instead.  Document removal in UPDATING; update NOTES and
random.4.

Reviewed by:	delphij, markm (previous version)
Approved by:	secteam(delphij)
Differential Revision:	https://reviews.freebsd.org/D19918
2019-06-21 00:16:30 +00:00
Marius Strobl
c36f427632 Add <sys/dnv.h> required for libnv to SYSINCS, too, apparently missed
in r336335.
2019-06-15 09:45:00 +00:00
Dimitry Andric
efc5c4420a Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2).  The 8.0.1 release should follow this within a
week or so.

MFC after:	2 weeks
2019-06-12 21:10:37 +00:00
Dimitry Andric
687a64222b Vendor import of llvm release_80 branch r363030:
https://llvm.org/svn/llvm-project/llvm/branches/release_80@363030
2019-06-11 18:16:27 +00:00
Jung-uk Kim
f02125cdfd Move llvm-ranlib to appropriate location in OptionalObsoleteFiles.inc.
Note llvm-ar is linked to llvm-ranlib since r311565.  r348677 fixed
"make delete-old" issue with llvm-ar but missed it somehow.

Discussed with:	emaste, jhb
2019-06-06 21:24:40 +00:00
Michael Zhilin
5568e57d72 [ath] [fix] athani compilation was broken by recent ath change
* This commit is going to fix build of AR724x on 13-CURRENT with additional
tools like athani. See r344841
2019-06-05 19:55:30 +00:00
Ed Maste
e4e92b4d5f Use CLANG knob to remove llvm-symbolizer man page
r348504 moved llvm-symbolizer from the CLANG_EXTRAS knob to CLANG, but
the man page was still in the CLANG_EXTRAS section in
OptionalObsoleteFiles.inc.

Reported by:	jhb
MFC after:	3 days
MFC with:	r348504
2019-06-05 14:08:39 +00:00
Ed Maste
7120683d7f move llvm-ar and llvm-nm to appropriate location in OptionalObsoleteFiles.inc
After r348610 `make delete-old` was still removing llvm-ar and llvm-nm
(and associated man pages).

Reported by:	jhb
Sponsored by:	The FreeBSD Foundation
2019-06-05 00:55:22 +00:00
Kyle Evans
71259635f7 llvm-symbolizer: Move out of CLANG_EXTRAS, into CLANG
ASAN reports become a lot more useful with llvm-symbolizer in $PATH, and the
build is not much more time-consuming. The added benefit is that the
resulting reports will actually include symbol information; without, thread
trace information includes a bunch of addresses that immediately resolve to
an inline function in
^/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h and take a
little more effort to examine.

Reviewed by:	emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20484
2019-06-02 04:04:21 +00:00
Ed Maste
b7ebd3eff2 nanobsd: exclude .git (and .hg) in the same places we exclude .svn
Allow support of other VCSes.  Note that two other nanobsd files already
had a similar case, excluding .git and .hg in addition to CVS and .svn.

Sponsored by:	The FreeBSD Foundation
2019-05-24 15:21:23 +00:00
Dimitry Andric
001ec17e68 To avoid unnecessarily modifying ports, add a -lgomp symlink, since GCC
does not ship a -lomp symlink.  Also update OptionalObsoleteFiles for
this, and add 32-bit variants while here.

Submitted by:	jbeich
PR:		237975
MFC after:	3 days
2019-05-19 20:13:55 +00:00
Dimitry Andric
6da8876256 Fix OptionalObsoleteFiles copy/paste mistake from r345236, which
connected libomp to the build.  The comparison should not have been
against ${MK_OPENSSH}, but against ${MK_OPENMP}, obviously.

MFC after:	3 days
2019-05-19 19:42:35 +00:00
Brooks Davis
ffda67901e Change ed(4), ep(4), and fxp(4) examples to em(4).
ed(4) and ep(4) have been removed. fxp(4) remains popular in older
systems, but isn't as future proof as em(4).

Reviewed by:	bz, jhb
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D20311
2019-05-18 21:01:36 +00:00
Brad Davis
1935b8f92e Update beinstall to use the mergemaster/etcupdate from the source tree instead
of the installed one.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D20291
2019-05-18 17:13:08 +00:00
Ed Maste
dc93026776 revert QEMU q35 platform use from r346748
It seems to be incompatible with the OVMF.fd (of unknown provenance)
in use by the Cirrus-CI config.  We will soon have a known OVMF build
via a port/package (see review D19869) and we can switch back to q35
once packages are available.

Discussed with:	bcran
2019-04-30 15:28:52 +00:00
Alan Somers
f9fffe9e2b fsx: seed more randomly with the -S0 option
When using -S0, seed the PRNG with the current time in nanoseconds, not
seconds, so consecutive runs don't accidentally use the same seed.

Also, rename some variables for clarity.

Reviewed by:	ngie
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20078
2019-04-28 17:27:06 +00:00
Rebecca Cran
c1ffbf2da0 Fix tools/boot/ci-qemu-test.sh and make some improvements
Update ci-qemu-test.sh

o Update the path to the OVMF file, which is now in /usr/local/share/uefi-edk2-qemu.
o Use the more modern q35, pc-q35-3.0 (Q35 + ICH9, 2009) QEMU machine
  instead of the default, obsolete pc, pc-i440fx-3.0 (i440FX + PIIX, 1996).
  For example this adds ACPI support.
o Specify the system firmware using the newer pflash drive syntax instead
  of bios.
o Remove extra, unneeded devices by passing -nodefaults.
o Change text to talk about 'firmware' instead of 'bios', since UEFI
  isn't a BIOS.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D20074
2019-04-26 14:44:46 +00:00
Ian Lepore
0c0ffba5d6 For the geli-gpt-zfs test images, both bios and uefi flavors, add a dummy
ufs partition as p2, and put the zfs partition at p3, to test the ability
of the zfs probe code to find a zfs pool on something other than the first
partition.
2019-04-25 00:08:15 +00:00
Ian Lepore
827f1973cb The zfs module has grown a dependency on zcl_nfs4.ko, so copy it into all
the test images.
2019-04-24 23:52:38 +00:00
Ian Lepore
f576caac25 Complain and exit the script if the 'make install' phase fails. Also,
there is no need to install any debug files.
2019-04-24 23:51:12 +00:00
Rebecca Cran
0661cd79ca Fix install-boot.sh and rootgen.sh UEFI bugs
tools/boot/install-boot.sh was assuming that if a device was passed in,
it should operate on the current system and run efibootmgr etc. to
update the boot manager. However, rootgen.sh passes a md(4) device and
not a fixed disk.

Add a -u option to install-boot.sh to tell it to update the system
in-place and run efibootmgr etc.

Also, source install-boot.sh in rootgen.sh to allow it to find and
call make_esp_file etc. And pass the loader file to make_esp_file instead
of a directory name.

Reported by:	ian
Reviewed by:	ian,imp,tsoome
Differential Revision:	https://reviews.freebsd.org/D19992
2019-04-24 22:35:29 +00:00
Cy Schubert
6389bef8f1 As an interim measure until a more permanent solution is implemented
workaround the following error:

/usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of
undeclared identifier
'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);

Reported by:	O. Hartmann <ohartmann@walstatt.org>
Reported by:	Michael Butler <imb@protected-networks.net>
Reported by:	gjb@ & cy@ (implicit)
Reviewed by:	emaste@
Noted by:	rgrimes@
2019-04-18 01:02:00 +00:00
Ed Maste
79b02e7017 Put QEMU CI smoke test boot log in /tmp if TMPDIR not set
Sponsored by:	The FreeBSD Foundation
2019-04-17 19:24:41 +00:00
Ed Maste
297ce4ce2d Install some entropy for QEMU CI smoke test
See r346250 and followup commits and mailing list discussion.
We currently fail to boot properly in the absense of boot-time entropy.

Sponsored by:	The FreeBSD Foundation
2019-04-17 19:16:26 +00:00
Ian Lepore
2614c4835f Allow this test script to be run from within src/tools/boot dir, and create
the temporary image in $TMPDIR.

Allow the script to be run from the src/tools/boot directory by using make
-V SRCTOP to find the top of the tree, because this script is handy for
quick smoke-testing of loader changes, as well as being useful in CI testing.

Also, use a temp directory in $TMPDIR to assemble the boot image, and write
the boot log file to $TMPDIR.  Arrange to have the temporary image clean
itself up, but leave the log file in $TMPDIR for post-mortem analysis of
failures when the script is run interactively.

Differential Revision:	https://reviews.freebsd.org/D19876
2019-04-17 16:27:43 +00:00
Ed Maste
cc2e55c7ea Add a smoke test QEMU boot script for CI
Reviewed by:	imp, lwhsu (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19661
2019-04-10 13:41:34 +00:00
Tycho Nightingale
e92a9a8c52 ioatcontrol(8) crc-copy flag bug and misc usage tweak
Reviewed by:	cem
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D19855
2019-04-09 10:33:18 +00:00
Mitchell Horne
b2689b12b1 Add option to build LLVM RISC-V target
Reviewed by:	emaste, dim
Approved by:	markj (mentor)
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D19759
2019-04-07 18:24:26 +00:00
Mariusz Zaborski
d5f4dd1be7 Add cap_fileargs.h to -legacy if needed.
Reviewed by:	arichardson
Differential Revision:	https://reviews.freebsd.org/D19685
2019-04-04 04:14:20 +00:00
Marcin Wojtas
b0fefb25c5 Create kernel module to parse Veriexec manifest based on envs
The current approach of injecting manifest into mac_veriexec is to
verify the integrity of it in userspace (veriexec (8)) and pass its
entries into kernel using a char device (/dev/veriexec).
This requires verifying root partition integrity in loader,
for example by using memory disk and checking its hash.
Otherwise if rootfs is compromised an attacker could inject their own data.

This patch introduces an option to parse manifest in kernel based on envs.
The loader sets manifest path and digest.
EVENTHANDLER is used to launch the module right after the rootfs is mounted.
It has to be done this way, since one might want to verify integrity of the init file.
This means that manifest is required to be present on the root partition.
Note that the envs have to be set right before boot to make sure that no one can spoof them.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: sjg
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D19281
2019-04-03 03:57:37 +00:00
Tycho Nightingale
a8d9ee9c50 ioatcontrol(8) could exercise 8k-aligned copy with page-break, crc and
crc-copy modes.

Reviewed by:	cem
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D19780
2019-04-02 19:06:25 +00:00
Ed Maste
2a965e2836 revert r302146: makeroot: zero out subsecond component of time= keywords
After r345281 by mhorne subsecond components are supported.

PR:		194703
Sponsored by:	The FreeBSD Foundation
2019-03-27 17:28:23 +00:00
John Baldwin
608289394f Add special psuedo-options for the base/{binutils,gcc} ports.
The WITH_PORT_BASE_{BINUTILS,GCC} options are used to prevent 'make check-old'
and 'make delete-old' from deleting files installed by the base/binutils
and base/gcc packages as normally one disables the in-tree variants
(e.g. WITHOUT_BINUTILS) when using these packages.

Reviewed by:	bapt (earlier version)
Differential Revision:	https://reviews.freebsd.org/D19483
2019-03-26 20:56:12 +00:00
Ed Maste
876d02f135 Add description for WITHOUT_RETPOLINE
Not used by default at the moment, but added for the benefit of
downstream projects/branches with different options.
2019-03-24 23:26:03 +00:00
Cy Schubert
5d3d68abae From r345400, remove the ippool rc script when ipfilter is not wanted
by the user.

PR:		218433
MFC after:	2 weeks
X-MFC with:	r345400
2019-03-22 01:43:55 +00:00
Dimitry Andric
b0840a28f6 Connect lib/libomp to the build.
* Set MK_OPENMP to yes by default only on amd64, for now.
* Bump __FreeBSD_version to signal this addition.
* Ensure gcc's conflicting omp.h is not installed if MK_OPENMP is yes.
* Update OptionalObsoleteFiles.inc to cope with the conflicting omp.h.
* Regenerate src.conf(5) with new WITH/WITHOUT fragments.

Relnotes:	yes
PR:		236062
MFC after:	1 month
X-MFC-With:	r344779
2019-03-16 15:45:15 +00:00
Enji Cooper
5193fcde8d Initial googlemock/googletest integration into the build/FreeBSD test suite
This initial integration takes googlemock/googletest release 1.8.1, integrates
the library, tests, and sample unit tests into the build.

googlemock/googletest's inclusion is optionally available via `MK_GOOGLETEST`.
`MK_GOOGLETEST` is dependent on `MK_TESTS` and is enabled by default when
built with a C++11 capable toolchain.

Google tests can be specified via the `GTESTS` variable, which, in comparison
with the other test drivers, is more simplified/streamlined, as Googletest only
supports C++ tests; not raw C or shell tests (C tests can be written in C++
using the standard embedding methods).

No dependent libraries are assumed for the tests. One must specify `gmock`,
`gmock_main`, `gtest`, or `gtest_main`, via `LIBADD` for the program.

More information about googlemock and googletest can be found on the
Googletest [project page](https://github.com/google/googletest), and the
[GoogleMock](https://github.com/google/googletest/blob/v1.8.x/googlemock/docs/Documentation.md)
and
[GoogleTest](https://github.com/google/googletest/tree/v1.8.x/googletest/docs)
docs.

These tests are originally integrated into the build as plain driver tests, but
will be natively integrated into Kyua in a later version.

Known issues/Errata:
* [WhenDynamicCastToTest.AmbiguousCast fails on FreeBSD](https://github.com/google/googletest/issues/2172)

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	2 months
Differential Revision: https://reviews.freebsd.org/D19551
2019-03-15 21:43:52 +00:00
Cy Schubert
77e6f9282e Fix still installing ipfilter rc.d files even when WITHOUT_IPFILTER
is specified.

When WITHOUT_IPFILTER is specified, delete-old-files fails to delete
the optional rc.d files from above. Fix this.

WITHOUT_IPFILTER fails to delete the ipfilter.5 optional file during
delete-old-files. Fix this.

Reported by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2019-03-12 19:34:33 +00:00
Enji Cooper
ff511f1f39 MFhead@r344996 2019-03-11 03:02:58 +00:00
John Baldwin
2e43efd0bb Drop "All rights reserved" from my copyright statements.
Reviewed by:	rgrimes
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D19485
2019-03-06 22:11:45 +00:00
Adrian Chadd
28adfbfe13 [athani] Add a simple tool to list and control ANI parameters.
This is a WIP tool I'm using to figure out why ANI is weirdly busted in my
home FreeBSD AP/STA setup.  Although athstats (mostly) gets the ANI statistics
correct, ANI is making the radio deaf it doesn't recover without being disabled.

It's very WIP.

Tested:

* Carambola 2,  (AR9331), AP/STA mode.
2019-03-06 07:58:19 +00:00
Marcin Wojtas
13ea0450a9 Extend libsecureboot(old libve) to obtain trusted certificates from UEFI and implement revocation
UEFI related headers were copied from edk2.

A new build option "MK_LOADER_EFI_SECUREBOOT" was added to allow
loading of trusted anchors from UEFI.

Certificate revocation support is also introduced.
The forbidden certificates are loaded from dbx variable.
Verification fails in two cases:

There is a direct match between cert in dbx and the one in the chain.
The CA used to sign the chain is found in dbx.
One can also insert a hash of TBS section of a certificate into dbx.
In this case verifications fails only if a direct match with a
certificate in chain is found.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: sjg
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision:	https://reviews.freebsd.org/D19093
2019-03-06 06:39:42 +00:00
Alexander Leidinger
3df898baed remove the removed-from-source drm/drm2 parts 2019-03-05 15:23:28 +00:00
Enji Cooper
b18a4ccab9 MFhead@r344786 2019-03-05 01:00:38 +00:00
Dimitry Andric
844fc3e907 Merge ^/head r344549 through r344775. 2019-03-04 19:14:32 +00:00
Dimitry Andric
1d6bb9f417 Vendor import of llvm release_80 branch r355313:
https://llvm.org/svn/llvm-project/llvm/branches/release_80@355313
2019-03-04 18:25:41 +00:00
Vincenzo Maffione
406e77236a netmap: pkt-gen: fix bug in send_packets()
The send_packets() function was using ring->cur as index to scan
the transmit ring. This function may also set ring->cur ahead of
ring->head, in case no more slots are available. However, the function
also uses nm_ring_space() which looks at ring->head to check how many
slots are available. If ring->head and ring->cur are different, this
results in pkt-gen advancing ring->cur beyond ring->tail.

This patch fixes send_packets() (and similar source locations) to
use ring->head as a index, rather than using ring->cur.

MFC after:	1 week
2019-03-01 09:10:16 +00:00
Bryan Drewery
2e881c1ae3 bsd.nls.mk isn't optional.
It is protected by MK_NLS.  If it should really be optional then
it needs to be documented as such in share/mk/bsd.README and
.sinclude used where needed.

This fixes a regression from r335011.

PR:		232527
Submitted by:	jarrod@downtools.com.au
Reported by:	ktullavik@gmail.com
MFC after:	3 days
2019-02-28 20:48:18 +00:00
Sean Eric Fagan
247f5bd056 Have cryptocheck toggle kern.cryptodevallowsoft if necessary (this
requires root access).

Reviewed by:	cem, jhb
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D19372
2019-02-27 19:27:16 +00:00
Simon J. Gerraty
a92958df34 Enable build of libbearssl
Reviewed by:	emaste
Sponsored by:	Juniper Networks
Differential Revision:	D16337
2019-02-26 06:11:01 +00:00
Enji Cooper
18b18078f2 MFhead@r344527 2019-02-25 18:00:14 +00:00
Dimitry Andric
a8fe8db49a Merge ^/head r344178 through r344512. 2019-02-25 11:59:29 +00:00
Sean Eric Fagan
5ed4fb69ff It turns out that setting the IV length is necessary with CCM in OpenSSL.
This adds that back.

Reviewed by:	cem
2019-02-20 21:24:56 +00:00
Enji Cooper
43e25f47a7 Add MK_GOOGLETEST option for building/installing gmock/gtest
These libraries don't compile on non-C++-11 capable compilers, e.g., g++ 4.2.1
and its corresponding implementation of the c++ library, i.e., libstdc++.

Blacklist compilation on all non-C++-11 capable compilers and give others the
option of opting out of building/installing gmock/gtest via MK_GOOGLETEST.

This option is controlled by MK_CXX and MK_TESTS, as ATF compilation is.
2019-02-19 22:40:32 +00:00
Andriy Voskoboinyk
7588d90e4a Few more corrections to WITHOUT_OFED=1 make delete-old removal:
- Drop profile libraries; MK_PROFILE=no is set in all Makefile's.
- Correct library path to libmlx5.so.1 and libibverbs.so.1

MFC after:	5 days
MFC with:	344207
2019-02-16 16:34:23 +00:00
Andriy Voskoboinyk
fe3d954e9a Remove corresponding lib32/ files when WITHOUT_OFED=1 is set
MFC after:	5 days
MFC with:	344207
2019-02-16 16:17:46 +00:00
Andriy Voskoboinyk
4a0225e5fe Refresh OptionalObsoleteFiles.inc for MK_PMC:
- Add missing /usr/sbin/pmc, pmcformat.h, libpmcstat.h and pmc.haswellxeon.3
to the list.
- Correct man page section for pmcstudy.8.
- Include recently added libipt and libopencsd for corresponding TARGET_ARCH

MFC after:	5 days
2019-02-16 16:01:23 +00:00
Andriy Voskoboinyk
b94a281e1e Add more rc.d scripts / empty directors / config files into
OptionalObsoleteFiles.inc

Note: only files with conditional installation logic were
included from the PR.

PR:		233046
Submitted by:	<rozhuk.im@gmail.com>
MFC after:	5 days
2019-02-16 05:04:01 +00:00
Andriy Voskoboinyk
48514fe196 Allow to remove unused files via 'make delete-old(-libs)' when WITHOUT_OFED
and / or WITHOUT_OFED_EXTRA src.conf(5) options are set.

MFC after:	5 days
2019-02-16 04:49:51 +00:00
Andriy Voskoboinyk
ebd13ba3d4 Remove vi(1)-related files via 'make delete-old' when WITHOUT_VI=1 is set.
MFC after:	5 days
2019-02-16 03:49:48 +00:00
Ed Maste
bcf99d2d99 Add WITH_PIE knob to build Position Independent Executables
Building binaries as PIE allows the executable itself to be loaded at a
random address when ASLR is enabled (not just its shared libraries).

With this change PIE objects have a .pieo extension and INTERNALLIB
libraries libXXX_pie.a.

MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, as
they explicitly reference .a libraries in their Makefiles.  These can
be addressed on an individual basis later.  MK_PIE is also disabled for
rtld-elf because it is already position-independent using bespoke
Makefile rules.

Currently only dynamically linked binaries will be built as PIE.

Discussed with:	dim
Reviewed by:	kib
MFC after:	1 month
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18423
2019-02-15 22:22:38 +00:00
Dimitry Andric
c981cbbd13 Merge ^/head r343956 through r344177. 2019-02-15 21:50:45 +00:00
Dimitry Andric
519e1985ae Vendor import of llvm release_80 branch r354130:
https://llvm.org/svn/llvm-project/llvm/branches/release_80@354130
2019-02-15 20:48:51 +00:00
Sean Eric Fagan
507281e55e Add AES-CCM encryption, and plumb into OCF.
This commit essentially has three parts:

* Add the AES-CCM encryption hooks.  This is in and of itself fairly small,
as there is only a small difference between CCM and the other ICM-based
algorithms.
* Hook the code into the OpenCrypto framework.  This is the bulk of the
changes, as the algorithm type has to be checked for, and the differences
between it and GCM dealt with.
* Update the cryptocheck tool to be aware of it.  This is invaluable for
confirming that the code works.

This is a software-only implementation, meaning that the performance is very
low.

Sponsored by:	iXsystems Inc.
Differential Revision:	https://reviews.freebsd.org/D19090
2019-02-15 03:53:03 +00:00
Dimitry Andric
9e43c218d5 Merge ^/head r343807 through r343955. 2019-02-10 12:49:34 +00:00
Ed Maste
f0cdb4cbc8 Mention clang-format in WITH_CLANG_EXTRAS
It's a useful tool and gives a further hint at the types of additional
binaries enabled by the option.
2019-02-07 14:05:21 +00:00
Andriy Voskoboinyk
984aff2894 Correct ypldap(8) install path in OptionalObsoleteFiles.inc
It's installed to /usr/sbin, not to /usr/bin (and was always here).

While here, add missing manpages and /var/yp directory to the list.

MFC after:	1 week
2019-02-07 13:12:43 +00:00
Dimitry Andric
7e565c552a Merge ^/head r343320 through r343570. 2019-01-30 07:10:33 +00:00
Andriy Voskoboinyk
31f53eaa40 Remove RADIUS-related files when WITHOUT_RADIUS_SUPPORT=true is set
in src.conf(5)

PR:		234041
MFC after:	5 days
2019-01-27 18:53:36 +00:00
Alexander Leidinger
030a1f8ba2 Catch up with some years of driver development.
Most impressive in terms of doxygen stuff are the isci and
ocs_fc drivers.
2019-01-26 18:23:19 +00:00
Andriy Voskoboinyk
86d535ab47 Garbage collect AH_SUPPORT_AR5416 config option.
It does nothing since r318857.
2019-01-25 13:48:40 +00:00
Oleksandr Tymoshenko
95ad3a2dca Fix prompt for MFSROOT in tinybsd
tinybsd offers two choices when prompting user for MFSROOT: 'YES'
and 'NO'. Script logic only handles 'yes'. Change offered values
to lower case.

PR:		131059
Submitted by:	Brock Williams <brock@cotcomsol.com>
MFC after:	1 week
2019-01-24 06:34:29 +00:00
Dimitry Andric
88148a071b Merge ^/head r343202 through r343319. 2019-01-22 20:24:58 +00:00
Dimitry Andric
58a7b5d64a Update libc++ build glue, and ObsoleteFiles. 2019-01-22 19:03:51 +00:00
Oleksandr Tymoshenko
6b77b5ece3 Add more profile-enabled libraries to remove when WITHOUT_PROFILE is defined
PR:		230898
Submitted by:	Herbert J. Skuhra <herbert@mailbox.org>
MFC after:	1 week
2019-01-20 22:34:04 +00:00
Dimitry Andric
0bf31f1fdc Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb.  Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.
2019-01-20 18:34:30 +00:00
Andriy Voskoboinyk
4945f79a4c Remove IEEE80211_AMPDU_AGE config option.
It is noop since r297774.
2019-01-20 15:17:56 +00:00
Dimitry Andric
94994d372d Vendor import of lldb trunk r351319 (just before the release_80 branch
point):
https://llvm.org/svn/llvm-project/lldb/trunk@351319
2019-01-19 10:06:29 +00:00
Dimitry Andric
e2fd426bda Vendor import of lld trunk r351319 (just before the release_80 branch
point):
https://llvm.org/svn/llvm-project/lld/trunk@351319
2019-01-19 10:05:49 +00:00
Dimitry Andric
676fbe8105 Vendor import of clang trunk r351319 (just before the release_80 branch
point):
https://llvm.org/svn/llvm-project/cfe/trunk@351319
2019-01-19 10:04:05 +00:00
Dimitry Andric
d8e91e4626 Vendor import of llvm trunk r351319 (just before the release_80 branch
point):
https://llvm.org/svn/llvm-project/llvm/trunk@351319
2019-01-19 10:01:25 +00:00
Oleksandr Tymoshenko
33b63711e4 Add ypldap to the list of conditional obsolete files
ypldap should be removed during delete-old if WITHOUT_NIS flag is enabled

PR:		230727
Submitted by:	Dmitry Wagin <dmitry.wagin@ya.ru>
MFC after:	1 week
2019-01-18 00:39:17 +00:00
Oleksandr Tymoshenko
0a34fc885b Fix conditional obsolete files entry for WITHOUT_EXAMPLES
Add all the files under /usr/share/examples to the MK_EXAMPLES
section. OLD_DIRS entries are not removed if they're not empty so
prior to this change WITHOUT_EXAMPLES didn't have significant effect
on the updated system.

PR:		228484
Submitted by:	Dmitry Wagin <dmitry.wagin@ya.ru> (original patch)
MFC after:	1 week
2019-01-17 06:34:39 +00:00
Oleksandr Tymoshenko
aca16d284e Add optional obsolete files for the installworld without sendmail
Add two more entries for WITHOUT_SENDMAIL install. The /var/spool/clientmqueue
entry would be deleted only if there are no files/dirs in it, so the
content generated during previous lifecycle of the system is safe

PR:		228484
Submitted by:	Dmitry Wagin <dmitry.wagin@ya.ru>
MFC after:	1 week
2019-01-17 06:22:14 +00:00
Oleksandr Tymoshenko
d46dea5037 Add four kerberos CLI utilities to OptionalObsoleteFiles.inc
Add asn1_compile, make-roken, kcc, and slc to the OptionalObsoleteFiles.inc
so they would be removed during delete-old stage if the new world is built
without Kerberos support.

PR:		230725
Submitted by:	Dmitry Wagin <dmitry.wagin@ya.ru>
MFC after:	1 week
2019-01-14 03:13:31 +00:00
Lars Engels
0fc0faf846 Add bluetooth-config script to simplify setting up bluetooth connections to
devices like mice, keyboards, bt-audio, ...

This script currently allows scanning for nearby devices, adds one to
/etc/bluetooth/hosts, adds an entry to hcsecd's conf and if it is a HID, add an
entry to bthidd's configs, as well.

Submitted by:	erdgeist <erdgeist@erdgeist.org>
Approved by:	bapt
MFC after:	2 weeks
Differential Revision:	D3778
Reviewers:	bapt, emax
2019-01-11 15:52:09 +00:00
Ed Maste
354c6a4422 OptionalObsoleteFiles: remove groff leftovers
usr/share/dict/eign is removed unconditionally as of r319664, so it no
longer needs to be in OptionalObsoleteFiles.

PR:		230353
Reported by:	philippe.michel7 sfr.fr
2019-01-07 15:53:54 +00:00
Warner Losh
f871c5d99d Create MK_LOADER_VERBOSE and connect it to ELF_VERBOSE in the loader
code.

PR: 18498
Submitted by: mellon at pobox dot com
2019-01-07 05:49:27 +00:00
Matt Macy
fbeb31a26b MK_ZFS -> {MK_ZFS|MK_LOADER_ZFS}, this is so we can diable userland / kernel
ZFS but keep the boot-loaders when using ZoL port.

MFC after: 1 week
Reviewed by: rgrimes
Differential Revision: https://reviews.freebsd.org/D18739
2019-01-05 22:45:20 +00:00
Will Andrews
2728d6307d beinstall: try to save progress from pkg updates.
This is primarily aimed at failed updates due to package conflicts, and
affects treatment of failed updates.  Whereas before potentially a large
number of packages would need to be synced for each attempt, they can now
be persisted.  Requires rsync.  There may be better ways to implement this,
e.g. using secondary cache path that is only used on followup attempts and
then wiped on success, which avoids polluting current cache.
2018-12-27 23:27:48 +00:00
Vincenzo Maffione
c2231fb0f8 netmap: update nmreplay(8)
Small modifications to the nmreplay man page.
Used igor and mandoc tools to fix warnings and errors.

Reviewed by:	bcr
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D18629
2018-12-21 14:45:10 +00:00
Vincenzo Maffione
4b45250941 netmap: nmreplay: import various fixes from upstream (2704a51839906)
Changelist:
    - General reformatting
    - Fix packet duplication in cons(). Whenever cons() reached the
      burst limit it would send all pending packets without advancing
      head. This caused the last injected packet to be sent again in
      the next round.
    - Fix full-speed transmissions after first loop.

MFC after:	3 days
2018-12-21 13:56:57 +00:00
Rebecca Cran
db8b561345 Rework UEFI ESP generation
Currently, the installer uses pre-created 800KB FAT12 filesystems that
it dd's onto the ESP partition.
This changeset improves that by having the installer generate a FAT32
filesystem directly onto the ESP using newfs_msdos and then copying
loader.efi into /EFI/freebsd.
For live installs it then runs efibootmgr to add a FreeBSD boot entry
in the BIOS.

Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D17947
2018-12-20 19:39:37 +00:00
Alan Somers
b1ce931bd8 Conditionalize installtion audit(4) tests on MK_AUDIT
MK_AUDIT already controls auditd(8), praudit(1), etc.  It should also control
the audit test suite.

Submitted by:	ngie
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd/pull/240
2018-12-17 18:35:32 +00:00
Alan Somers
314ce98edf OptionalObsoleteFiles: Fix deleting usr/tests/usr.sbin/sa
It's a directory, not a file.

Reported by:	ngie
MFC after:	2 weeks
X-MFC-With:	300938
2018-12-16 23:45:46 +00:00
Alan Somers
738ea87196 Conditionally install /etc/rc.d/audit* based on ${MK_AUDIT}
/usr/sbin/audit(dist)?d are only installed if ${MK_AUDIT} == yes. Their
supporting scripts should only be installed in those instances as well.

Submitted by:	ngie
Reviewed by:	emaste
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd/pull/242
2018-12-16 23:38:46 +00:00
Cy Schubert
11783f005c Repair build post-r342139 2018-12-15 22:02:02 +00:00
George V. Neville-Neil
53fc043d41 Remove, the now very outdated, timed.
Submitted by:	Kyle Spiers ksspiers at gmail
Reviewed by:	bcr,brooks,bz,sbruno
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D18505
2018-12-15 21:34:40 +00:00
Stefan Eßer
385e98080c Remove CTM from 13-CURRENT after the release of FreeBSD-12.0.
The removal (and creation of a port) has been pre-announced in UPDATING
1 month ago. Packages are available for all supported FreeBSD vesions.

I did not think that another entry in UPDATING is required to note the
actual removal.

No MFC is planned - CTM shall be kept in base for all releases up to 12.x.

Reviewed by:	rgrimes
Approved by:	imp, bcr (manpages)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D17935
2018-12-15 16:53:15 +00:00
Bjoern A. Zeeb
7984cba7d7 Remove a dead file. CVS was removed in r251794. 2018-12-11 21:16:09 +00:00
Dimitry Andric
67350cb56a Merge ^/head r340918 through r341763. 2018-12-09 11:39:45 +00:00
Vincenzo Maffione
9e53f3bd67 tools: netmap: pkt-gen: check packet length against interface MTU
Validate the value of the -l argument (packet length) against the MTU of the netmap port.
In case the netmap port does not refer to a physical interface (e.g. VALE port or pipe), then
the netmap buffer size is used as MTU.
This change also sets a better default value for the -M option, so that pkt-gen uses
the largest possible fragments in case of multi-slot packets.

Differential Revision:	https://reviews.freebsd.org/D18436
2018-12-08 12:52:09 +00:00
Brooks Davis
1b5dbfa8a0 Remove test for KSE (removed in 2008).
Approved by:	julian
2018-12-04 00:22:08 +00:00
Yuri Pankov
ea22b5bd75 Add ga_IE.UTF-8 locale.
PR:		228587
Submitted by:	Micil <micheal.maclochlainn@oegaillimh.ie> (LC_TIME)
Reviewed by:	bapt
Approved by:	kib (mentor, implicit)
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D17997
2018-11-26 19:39:49 +00:00
Ed Maste
eda7d3bec4 Do not install GNU ld if lld is /usr/bin/ld
GNU binutils ld.bfd 2.17.50 does not support ifuncs and produces broken
binaries when ifuncs are in use.  When LLD_IS_LD is default we have an
ifunc-capable system linker and can just avoid installing ld.bfd.

Reported by:	theraven
Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18340
2018-11-26 17:07:35 +00:00
Dimitry Andric
3d5db45595 Merge ^/head r340427 through r340868. 2018-11-24 14:46:06 +00:00
Ed Maste
0161256ccc Add some non-default src.conf(5) knob descriptions
Some WITH_/WITHOUT_ defaults will likey change in the future (e.g. as we
migrate to copyfree base system components).

Add non-default descriptions for the benefit of WIP branches.
2018-11-21 14:50:45 +00:00
Ben Widawsky
4a88e7dc00 git-svn-init: Add docs to the choice of repos 2018-11-20 23:27:15 +00:00
Alex Richardson
3b7e9bfef4 Add capsicum_helpers.h to -legacy if needed
This fixes bootstrap of capsicumized strings on FreeBSD 11.

Reviewed By:	oshogbo, bdrewery
Differential Revision: https://reviews.freebsd.org/D17971
2018-11-19 18:58:34 +00:00
Yuri Pankov
dbcf594ac9 Use UnicodeData.txt to create UTF-8 ctype map.
This should provide more complete coverage of currently defined Unicode
characters as compared to manually assembled one we use currently.

Comparison of original and new UTF-8 ctype maps by character class:

TYPE    ORIG    NEW
alnum   94229   126029
alpha   93557   125419
blank   4       2
cntrl   73      137685
digit   469     622
graph   109615  137203
lower   1478    2145
print   109641  137222
punct   3428    797
rune    110481  274907
space   33      24
upper   983     1781
xdigit  469     622

Large number of added cntrl definitions is due to the fact that private-use
planes are currently defined as such, this can change in the future.

Discussed with:	bapt
Approved by:	kib (mentor, implicit)
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D17842
2018-11-17 10:36:00 +00:00
Dimitry Andric
6149ed01a1 Merge ^/head r340368 through r340426. 2018-11-14 06:46:44 +00:00
Kirk McKusick
9fc5d538fc In preparation for adding inode check-hashes, clean up and
document the libufs interface for fetching and storing inodes.
The undocumented getino / putino interface has been replaced
with a new getinode / putinode interface.

Convert the utilities that had been using the undocumented
interface to use the new documented interface.

No functional change (as for now the libufs library does not
do inode check-hashes).

Reviewed by:  kib
Tested by:    Peter Holm
Sponsored by: Netflix
2018-11-13 21:40:56 +00:00
Dimitry Andric
9b5cb2f639 Merge ^/head r340235 through r340367. 2018-11-12 16:41:41 +00:00
Vincenzo Maffione
80ad548dca netmap: pkt-gen: several updates from upstream
Various improvements to the netmap pkt-gen program:

 - indentation fixes
 - support for IPV6
 - fixes to checksum computation
 - support for NS_MOREFRAG
 - rate limiting in ping mode

Reviewed by:	bcr, 0mp
Approved by:	gnn (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D17698
2018-11-10 15:10:22 +00:00
Ed Maste
e8bd280446 Move llvm-profdata build into MK_LLVM_COV block
llvm-profdata is used with llvm-cov for code coverage (although llvm-cov
can also operate independently in a gcov-compatible mode).
Although llvm-profdata can be used independently of llvm-cov it makes
sense to group these under one option.

Also handle these in OptionalObsoleteFiles.inc while here.

Sponsored by:	The FreeBSD Foundation
2018-11-09 18:35:09 +00:00
Ed Maste
9f7331ad2c llvm-cov: also install as gcov (if GNU gcov is disabled)
llvm-cov provides a gcov-compatible interface when invoked as gcov.

Reviewed by:	dim, markj
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17923
2018-11-09 17:43:19 +00:00
Ed Maste
2f02c9d6d5 Consolidate gcov entries in OptionalObsoleteFiles
Sponsored by:	The FreeBSD Foundation
2018-11-09 15:27:41 +00:00
Vincenzo Maffione
689f146bdd netmap: add load balancer program
Add the lb program, which is able to load-balance input traffic
received from a netmap port over M groups, with N netmap pipes in
each group. Each received packet is forwarded to one of the pipes
chosen from each group (using an L3/L4 connection-consistent hash function).
This also adds a man page for lb and some cross-references in related
man pages.

Reviewed by:	bcr, 0mp
Approved by:	gnn (mentor)
Differential Revision:	https://reviews.freebsd.org/D17735
2018-11-09 08:43:40 +00:00
Dimitry Andric
8c1538224a Merge ^/head r340213 through r340234. 2018-11-07 18:54:24 +00:00
Dimitry Andric
c06e7b66a1 Merge ^/head r340126 through r340212. 2018-11-07 18:52:28 +00:00
Edward Tomasz Napierala
768893cdb5 Add benchmarks for lstat(2) and readlink(2).
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-07 11:46:12 +00:00
Yuri Pankov
2350a089e7 Cleanup locale tools:
- Simplify the source dir specification, and update README
  appropriately
- Drop the LC (doonly) processing, it's broken, and even if fixed, not
  really useful
- Don't remove the target directories while installing new data as it
  removes Makefile.depend which we don't manage; only rm the files we
  are going to add/replace/delete instead
- Restrict adding bsd.endian.mk to colldef and ctypedef Makefiles, it's
  not needed in other (text-only) categories
- GC unused scripts; they don't seem to be particularly helpful standalone
  as well

Reviewed by:	bapt
Approved by:	kib (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D17858
2018-11-06 21:49:50 +00:00
Ed Maste
bf81eb3ca9 Add a WITH_BIND_NOW build knob
The linker's -z now flag sets the DF_BIND_NOW flag, which signals to the
runtime loader that all relocation processing should be performed at
process startup rather than on demand.  In combination with lld's
default of enabling relro this causes the GOT to be made read-only when
the process starts, preventing straightforward GOT overwrite attacks.

Shawn Webb discovered a failure on HardenedBSD with BIND_NOW and ifunc
use, which resulted in my rtld fix in r340137.  Add a BIND_NOW knob as
it is trivial to do so and is a useful ELF hardening feature.  This
change is equivalent to HardenedBSD's but not identical as there are
other diffs/conflicts nearby.

Note that our ELF Tool Chain readelf does not currently decode the
DF_BIND_NOW flag - see PR232983.

Reviewed by:	brooks
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17846
2018-11-06 15:52:49 +00:00
Alex Richardson
b25c717954 Fix -DNO_CLEAN build after r340157
Approved By:	jhb (mentor)
2018-11-05 21:30:00 +00:00
Alex Richardson
8f62bca488 Allow building world without inheriting $PATH
Inheriting $PATH during the build phase can cause the build to fail when
compiling on a different system due to missing build tools or incompatible
versions somewhere in $PATH. This has cause build failures for us before
due to the jenkins slaves still running FreeBSD 10.
Listing the tools we depend on explicitly instead of just using whatever
happens to be in $PATH allows us to check that we don't accidentally add a
new build dependency.

All tools that do no need to be bootstrapped will now be symlinked to
${WORLDTMP}/legacy/bin and during the build phase $PATH will only contain
${WORLDTMP}. There is also a new variable "BOOTSTRAP_ALL_TOOLS" which can
be set to force compiling almost all bootstrap tools instead of symlinking
them. This will not bootstrap tools such as cp,mv, etc. since they may be
used during the build and for those we should really only be using POSIX
compatible options.

Furthermore, this change is required in order to be able to build on
non-FreeBSD hosts. While the same binaries may exist on Linux/MacOS they
often accept different flags or produce incompatible output.

Approved By:	brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D16815
2018-11-05 19:51:10 +00:00
Ed Maste
7ae5db1f37 Expand WITH_LLD_BOOTSTRAP description
Reported by:	bz
2018-11-05 15:22:41 +00:00
Yuri Pankov
dd7c41a378 Add hybrid C.UTF-8 locale being identical to default C locale except
that it uses the same ctype maps and functions as other UTF-8 locales.

Reviewed by:	bapt, cem, eadler
Approved by:	kib (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D17833
2018-11-04 22:13:22 +00:00
Conrad Meyer
d83db3fb6a Drop ed(1) "crypto"
You should not be using DES.  You should not have been using DES for the
past 30 years.

The ed DES-CBC scheme lacked several desirable properties of a sealed
document system, even ignoring DES itself.  In particular, it did not
provide the "integrity" cryptographic property (detection of tampering), and
it treated ASCII passwords as 64-bit keys (instead of using a KDF like
scrypt or PBKDF2).

Some general approaches ed(1) users might consider to replace the removed
DES mode:

1. Full disk encryption with something like AES-XTS.  This is easy to
conceptualize, design, and implement, and it provides confidentiality for
data at rest.  Like CBC, it lacks tampering protection.  Examples include
GELI, LUKS, FileVault2.

2. Encrypted overlay ("stackable") filesystems (EncFS, PEFS?, CryptoFS,
others).

3. Native encryption at the filesystem layer.  Ext4/F2FS, ZFS, APFS, and
NTFS all have some flavor of this.

4. Storing your files unencrypted.  It's not like DES was doing you much
good.

If you have DES-CBC scrambled files produced by ed(1) prior to this change,
you may decrypt them with:

  openssl des-cbc -d -iv 0 -K <key in hex> -in <inputfile> -out <plaintext>

Reviewed by:	allanjude, bapt, emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D17829
2018-11-04 17:56:16 +00:00
Dimitry Andric
2a22df74e9 Merge ^/head r339813 through r340125. 2018-11-04 15:49:06 +00:00
Dimitry Andric
689486003b Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR:		230240, 230355
2018-11-04 15:46:30 +00:00
Dimitry Andric
86392292ee Vendor import of llvm release_70 branch r346007:
https://llvm.org/svn/llvm-project/llvm/branches/release_70@346007
2018-11-04 14:41:47 +00:00
Yuri Pankov
1ade1c4113 Update to CLDR 34 and UNICODE 11.
Discussed with:	bapt
Approved by:	kib (mentor)
MFC after:	1 month
2018-11-03 22:02:10 +00:00
Ed Maste
4db78cacde Remove apparently unused 0-byte files that cause grief on Windows
r235274 added a sort regression test (it operates by comparing output
against GNU sort).  The commit included a number of 0-byte files, one
of which ends in a trailing . which reportedly breaks svn/git checkouts
on Windows.

It appears these were added accidentally, so just remove them.

PR:		232479
MFC after:	1 month
2018-11-03 01:53:26 +00:00
John Baldwin
921540789b Compile cryptocheck with in-tree openssl again.
Reviewed by:	cem
MFC after:	2 months
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D17767
2018-11-01 21:25:26 +00:00
Bjoern A. Zeeb
43f75d57a2 Introduce an EXPERIMENTAL option for both src.conf(5) and the kernel.
In the last decade(s) we have seen both short term or long term projects
committed to the tree which were considered or even marked "experimental".
While out-of-tree development has become easier than it used to be in
CVS times, there still is a need to have the code shipping with HEAD but
not enabled by default.

While people may think about VIMAGE as one of the recent larger, long term
projects, early protocol implementations (before they are standardised)
are others.  (Free)BSD historically was one of the operating systems
which would have running code at early stages and help develop and
influence standardisation and the industry.

Give developers an opportunity to be more pro-active for early adoption
or running large scale code changes stumbling over each others but not
the user's feet.  I have not added the option to NOTES in order to avoid
breaking supported option builds, which require constant compile testing.

Discussed with:	people in the corridor
2018-10-30 15:46:30 +00:00
Dimitry Andric
fda9adafa3 Merge ^/head r339670 through r339812. 2018-10-27 14:44:39 +00:00
Warner Losh
24b6d87155 Redo r339563: Remove joy(4) driver.
This driver was marked as gone in 12. We're at 13 now. Remove it.
Data from nycbug's dmesg cache shows only one potential user,
suggesting it never was used much. However, even though this device
has been obsolete for 15 years at least, sys/joystick.h is included in
a number of graphics packages still, so that remains. A full exprun
is needed before that can be removed.

RelNotes: yes
Differential Revision: https://reviews.freebsd.org/D17629
2018-10-26 16:03:30 +00:00
Warner Losh
7c320a22df Revert r339563.
I held the mistaken belief this was completely unused. While the
driver is unused and likely not relevant for a long time,
sys/joystick.h lives on in maybe half a dozen ports, even though
hardware to use it hasn't been widely used in maybe 15 years.
2018-10-26 04:10:32 +00:00
Andrew Turner
31d62a73c2 Implement a BSD licensed crtbegin/crtend
These are needed for .ctors/.dtors and .jcr handling. The former needs
all the function pointers to be called in the correct order from the
.init/.fini section. The latter just needs to call a gcj specific function
if it exists with a pointer to the start of the .jcr section.

This is currently disabled until __dso_handle support is added.

Reviewed by:	emaste
MFC after:	1 month
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17587
2018-10-25 17:39:41 +00:00
Kyle Evans
f98c671d07 Update lualoader test script a little bit
Use userboot.so from the test directory if possible, fall back to .OBJDIR.
This avoids a problem that we've had since userboot coexistence was added,
where userboot.so alone no longer exists in the .OBJDIR but is instead just
a link installed later.
2018-10-25 02:04:01 +00:00
Vincenzo Maffione
dde8fe66d6 netmap: add man page for the vale-ctl program
Added man page for vale-ctl program.
Small fixes to vale-ctl, including the support for -m option
(to specify the netmap memory allocator id).

Reviewed by:	0mp
Approved by:	gnn (mentor)
Differential Revision:	https://reviews.freebsd.org/D17683
2018-10-24 16:01:56 +00:00
Dimitry Andric
c6879c6c14 Merge ^/head r339015 through r339669. 2018-10-23 21:09:37 +00:00
Vincenzo Maffione
1a7d3c055b netmap: add man page for the bridge program
Added bridge(8).
Also, minor fixes to the netmap "bridge" application:
 - indentation fixes and code cleanup
 - better usage description
 - better processing of netmap flags

Reviewed by:	0mp
Approved by:	gnn (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D17664
2018-10-23 15:34:43 +00:00
Warner Losh
c1cdf6a42f Remove mse(4) from tree
Remove mse and all support for bus and inport devices from the tree.
Data from nycbug's dmesg database shows the last sighting of this
driver was in 4.10 on only one machine.

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D17628
2018-10-22 02:34:10 +00:00
Warner Losh
33a54d778b Remove joy(4) driver.
This driver was marked as gone in 12. We're at 13 now. Remove it.
Data from nycbug's dmesg cache shows only one potential user,
suggesting it never was used much.

RelNotes: yes
Differential Revision: https://reviews.freebsd.org/D17629
2018-10-22 02:34:00 +00:00
Warner Losh
8edab9cd00 Add missing options.
WITHOUT_LOADER_LUA is only needed since we turned it off by default on
powerpc and sparc64 in r338203. Same with
WITHOUT_LOADER_GEIL. WITH_NVME, WITHOUT_NVME, WITH_LOADER_FORCE_LE
have been needed since they were added.
2018-10-21 06:33:35 +00:00
Ed Maste
fc191b1111 Introduce src.conf knob to build userland with retpoline
WITH_RETPOLINE enables -mretpoline vulnerability mitigation in userland
for CVE-2017-5715.

Reported by:	Peter Malcom
Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17421
2018-10-21 00:27:59 +00:00
Yuri Pankov
4644f9bef6 Add -b/-l options to localedef(1) to specify output endianness and use
it appropriately when building share/ctypedef and share/colldef.

This makes the resulting locale data in EL->EB (amd64->powerpc64) cross
build and in the native EB build match.  Revert the changes done to libc
in r308170 as they are no longer needed.

PR:		231965
Reviewed by:	bapt, emaste, sbruno, 0mp
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17603
2018-10-20 20:51:05 +00:00
Yuri Pankov
98fc050515 Restore some of the ctype definitions reported in the PR from pre-CLDR
data, namely 0xE000-0xF8FF private use area, and 0xFF00-0xFFF half- and
fullwidth punctuation.

While here, update tools/tools/locale/README based on my experience
rebuilding the locale data.

PR:		225692
Reviewed by:	bapt, cem (previous version)
Approved by:	re (gjb), kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17471
2018-10-11 18:30:12 +00:00
Dimitry Andric
ce44d80853 Merge ^/head r338731 through r338987. 2018-09-27 20:00:07 +00:00
Ed Maste
25569cea2b Do not remove ld man page if lld is enabled and binutils is not
Reported by:	Mark Millard
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2018-09-25 18:54:18 +00:00
Brooks Davis
5b87c94a46 Only enable HyperV support by default on x86.
Without this we get spurious output during boot as we try to run
nonexistant HyperV scripts on non-x86 models.

Reviewed by:	kib
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D17211
2018-09-18 16:06:24 +00:00
Dimitry Andric
c0b5e99154 Merge ^/head r338595 through r338689, and resolve conflicts. 2018-09-14 19:50:36 +00:00
Ed Maste
e6f0c1bba2 Add WITHOUT_REPRODUCIBLE_BUILD description
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2018-09-13 14:53:42 +00:00
Dimitry Andric
3af64f0311 Merge ^/head r338392 through r338594. 2018-09-11 18:41:00 +00:00
Ed Maste
3efdd5800f Remove strings from OptionalObsoleteFiles.inc
Since r326030 strings is installed unconditionally so should not be
removed when WITHOUT_TOOLCHAIN is set.

Reported by:	Dan McGregor
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2018-09-07 23:12:17 +00:00
Rodney W. Grimes
5b029767e2 Increase size of working imgfile from 250MB to 4GB
Submitted by:	dexter
Approved by:	re(gjb), phk (mentor)
MFC after:	3 days
2018-09-07 15:52:20 +00:00
Rodney W. Grimes
0b19a7a17a Remove rsync to phk's server
Submitted by:	dexter
Approved by:	re(gjb), phk (mentor)
MFC after:	3 days
2018-09-07 15:48:01 +00:00
Dimitry Andric
da2d1e9d25 Merge ^/head r338298 through r338391. 2018-08-29 20:54:56 +00:00
Warner Losh
c0386fa3af Put building of drm and drm2 modules behind options.
Make the building of drm dependent on MK_MODULE_DRM and the building
of module drm2 on MK_MODULE_DRM2. The defaults are unchanged.

Approved by: re@ (gjb)
Differential Review: https://reviews.freebsd.org/D16894
2018-08-28 14:46:49 +00:00
Kyle Evans
fd239e7ff8 Fix bsdbox build WITH_OFED
hostapd requires libpcap, which links against libmlx5 and libibverbs when
building WITH_OFED. These were not pulled in to bsdbox and most bsdbox
builds were WITHOUT_OFED up until recently, so it was not noticed.

Approved by:	re (gjb)
2018-08-27 19:34:50 +00:00
Mark Murray
19fa89e938 Remove the Yarrow PRNG algorithm option in accordance with due notice
given in random(4).

This includes updating of the relevant man pages, and no-longer-used
harvesting parameters.

Ensure that the pseudo-unit-test still does something useful, now also
with the "other" algorithm instead of Yarrow.

PR:		230870
Reviewed by:	cem
Approved by:	so(delphij,gtetlow)
Approved by:	re(marius)
Differential Revision:	https://reviews.freebsd.org/D16898
2018-08-26 12:51:46 +00:00
Kyle Evans
8369ba427a libbe(3)/bectl(8): Make consistent with beadm
vermaden (maintainer of beadm) points out the following inconsistencies:
- "missing command" is not printed prior to usage if the error is simply a
   missing command; this should be obvious from the context
- "bectl rename" isn't using the "don't unmount" flag (zfs rename -u), so
   the active BE can't be renamed. It doesn't make sense in our context to
   *not* use -u, so use it.

Documentation updates reflect the above and note an inconsistency with the
'destroy' command that is consistent with other parts of the base system.

A fix for libbe(3) not properly being installed to /lib is included.
SHLIBDIR should have been added when it was moved in r337995.

Approved by:	re (kib)
2018-08-24 20:44:58 +00:00
Dimitry Andric
7847e04111 Merge ^/head r338026 through r338297, and resolve conflicts. 2018-08-24 18:09:23 +00:00
Warner Losh
592ffb2175 Revert drm2 removal.
Revert r338177, r338176, r338175, r338174, r338172

After long consultations with re@, core members and mmacy, revert
these changes. Followup changes will be made to mark them as
deprecated and prent a message about where to find the up-to-date
driver.  Followup commits will be made to make this clear in the
installer. Followup commits to reduce POLA in ways we're still
exploring.

It's anticipated that after the freeze, this will be removed in
13-current (with the residual of the drm2 code copied to
sys/arm/dev/drm2 for the TEGRA port's use w/o the intel or
radeon drivers).

Due to the impending freeze, there was no formal core vote for
this. I've been talking to different core members all day, as well as
Matt Macey and Glen Barber. Nobody is completely happy, all are
grudgingly going along with this. Work is in progress to mitigate
the negative effects as much as possible.

Requested by: re@ (gjb, rgrimes)
2018-08-24 00:02:00 +00:00
Marius Strobl
e94a7c27df Following r335259, don't copy boot1 from the running system for sparc64
either.
2018-08-23 22:57:42 +00:00
Kyle Evans
d7f41421d2 Remove hyper-v leftovers when WITHOUT_HYPERV is set
hv_vss_daemon was missed.

Submitted by:	Oliver Pinter
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D16811
2018-08-23 18:06:31 +00:00
Kyle Evans
ea8b116b32 Remove ZFS leftovers when WITHOUT_ZFS is set
Submitted by:	Oliver Pinter
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D16810
2018-08-23 02:14:39 +00:00
Matt Macy
d494a4a745 r338172 followup - removal of stray drm references 2018-08-22 03:04:43 +00:00
Matt Macy
92c151322b r338172 follow - remove firmwares 2018-08-22 02:53:35 +00:00
Alex Richardson
cd4d034fd6 Relax the check added in 338096
Checking for any include below ${SRCTOP}/sys is too strict and breaks
e.g. mkimg which includes sys/sys/disk. ABI issues will only be caused
by including headers in sys/sys since they might not match the host.

Approved By:	jhb (mentor)
Suggested By:	imp
2018-08-21 16:52:14 +00:00
Alex Richardson
2f0437dab1 Fix -DWITHOUT_AUTO_OBJ build of rescue after r338096
Approved By:	jhb (mentor)
2018-08-21 09:35:56 +00:00
Kirk McKusick
28ac223823 Fix incorrect output when printing block lists for files small enough
to fit in only direct blocks whose size is exactly a multiple of the
filesystem block size.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: Netflix
2018-08-20 20:44:11 +00:00
Alex Richardson
4acc8a67ba Don't create directories in ${WORLDTMP}/legacy with mtree
This has two advantages:
1) We no longer create lots of empty directories that are not needed
2) This is a requirement for building on non-FreeBSD hosts since mtree will
only exist after the bootstrap-tools phase there.

Aproved By:	jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D16773
2018-08-20 10:39:53 +00:00
Alex Richardson
958dc017a7 Avoid depending on system headers from the source tree during bootstrap
This can cause surprising errors if the build tools is built against
headers that don't match the host system. It is also required in order
to allow building on non-FreeBSD systems where the headers in
/usr/include/sys are usually completely incompatible with those in the
source tree.

I added an error to Makefile.boot if this is done and found this was
only the case in libnv. With this error in the Makefile ABI breakages
such as r336019 should no longer be possible.

Reviewed By:	bdrewery, kevans
Approved By:	jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D16186
2018-08-20 10:39:42 +00:00
Dimitry Andric
3611ec6048 Merge ^/head r337646 through r338014. 2018-08-18 12:15:54 +00:00
Warner Losh
6ba33ab591 Specify DB_FROM_SRC=yes when doing any installation target.
We want to use the UIDs from the installed system, not the host
system, when installing things.

Sponsored by: Netflix
2018-08-16 22:13:43 +00:00
Dimitry Andric
f9c0a51283 Merge ^/head r337286 through r337585. 2018-08-10 21:02:28 +00:00
Poul-Henning Kamp
a34b3be4c2 Make distribution now happens from top of source tree.
Silence debugging output
2018-08-10 06:28:25 +00:00
Dimitry Andric
89edb881e6 Add optional LLVM BPF target support
BPF (eBPF) is an independent instruction set architecture which is
introduced in Linux a few years ago. Originally, eBPF execute
environment was only inside Linux kernel. However, recent years there
are some user space implementation (https://github.com/iovisor/ubpf,
https://doc.dpdk.org/guides/prog_guide/bpf_lib.html) and kernel space
implementation for FreeBSD is going on
(https://github.com/YutaroHayakawa/generic-ebpf).

The BPF target support can be enabled using WITH_LLVM_TARGET_BPF, as it
is not built by default.

Submitted by:	Yutaro Hayakawa <yhayakawa3720@gmail.com>
Reviewed by:	dim, bdrewery
Differential Revision: https://reviews.freebsd.org/D16033
2018-08-09 21:28:31 +00:00
Alan Somers
47cc9ee1b1 Switch the default pager for most commands to less
Finally, a pager for the nineties.

MFC after:	Never
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D13465
Poll:		https://reviews.freebsd.org/V7
2018-08-08 19:24:20 +00:00
Ben Widawsky
94b92b567c git-svn-init: Clarify branch creation commands
Suggested by:	eadler
Reviewed by:	eadler
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D16593
2018-08-06 01:08:43 +00:00
Dimitry Andric
5c03f3e190 Vendor import of llvm release_70 branch r338892:
https://llvm.org/svn/llvm-project/llvm/branches/release_70@338892
2018-08-04 13:15:05 +00:00
Dimitry Andric
bbd7a9298f Merge ^/head r336870 through r337285, and resolve conflicts. 2018-08-04 11:53:41 +00:00
Dimitry Andric
a757dfacfa Update lib/libclang_rt for compiler-rt trunk r338150. 2018-08-03 15:30:32 +00:00
Ben Widawsky
be223cad78 tools: Add a git-svn bootstrap script
codified version of https://wiki.freebsd.org/GitWorkflow/GitSvn#Using_git-svn

Approved by:	emaste (mentor)
Suggested by:	Warner Losh (imp)
Differential Revision:  https://reviews.freebsd.org/D16528
2018-08-02 18:28:02 +00:00
Dimitry Andric
488aa40ab0 Update libc++ and libc++experimental Makefiles, add libc++fs Makefile,
and update OptionalObsoleteFiles.inc for new additions.
2018-08-02 18:24:03 +00:00