Commit Graph

4926 Commits

Author SHA1 Message Date
Warner Losh
f86e60008b Regularize my copyright notice
o Remove All Rights Reserved from my notices
o imp@FreeBSD.org everywhere
o regularize punctiation, eliminate date ranges
o Make sure that it's clear that I don't claim All Rights reserved by listing
  All Rights Reserved on same line as other copyright holders (but not
  me). Other such holders are also listed last where it's clear.
2019-12-04 16:56:11 +00:00
Dimitry Andric
1bb8eb56ef libclang_rt: enable on powerpc*
Summary:
Enable on powerpc64 and in lib/libclang_rt/Makefile change
MACHINE_CPUARCH to MACHINE_ARCH because on powerpc64
MACHINE_ARCH==MACHINE_CPUARCH so the 32-bit library overwrites 64-bit
library during installworld.

This patch doesn't enable any other libclang_rt libraries because they
need to be separately ported.

I have verified that games/julius (which fails on powerpc64 elfv2
without this change because of no libclang_rt profiling library) builds.

Test Plan: Ship it, test on powerpc and powerpcspe

Submitted by:	pkubaj
Reviewed by:	dim, jhibbits
Differential Revision: https://reviews.freebsd.org/D22425
MFC after:	1 month
X-MFC-With:	r353358
2019-11-23 19:35:09 +00:00
Ed Maste
9bf64d023d Add description for WITH_AMD
WITHOUT_AMD is now the default as of r354902.

Sponsored by:	The FreeBSD Foundation
2019-11-20 17:45:31 +00:00
Kyle Evans
f22a592111 Convert in-tree sysent targets to use new makesyscalls.lua
flua is bootstrapped as part of the build for those on older
versions/revisions that don't yet have flua installed. Once upgraded past
r354833, "make sysent" will again naturally work as expected.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D21894
2019-11-18 23:28:23 +00:00
Konstantin Belousov
0857931660 Update controlelf(1) to ahndle stack gap disable flag.
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D22379
2019-11-17 14:54:43 +00:00
Poul-Henning Kamp
183b6fead8 If /usr/obj is a symlink, cpio(1) needs persuation to DTRT. 2019-11-02 10:15:34 +00:00
Poul-Henning Kamp
1d03de96c1 Mention that ports/net-mgmt/libsmi is required 2019-11-02 10:14:15 +00:00
Vincenzo Maffione
c7c7805531 add valectl to the system commands
The valectl(4) program is used to manage vale(4) switches.
Add it to the system commands so that it can be used right away.
This program was previously called vale-ctl, and stored in
tools/tools/netmap

Reviewed by:	hrs, bcr, lwhsu, kevans
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22146
2019-10-31 21:01:34 +00:00
Simon J. Gerraty
17adf17b30 Building head on stable/11 requires libzstd
Add lib/libzstd to _elftoolchain_libs

tools/build/Makefile needs to create the install dir for libzstd
Since this would make the line too long, rework to use a list
in one per line format (easier to add in future)
and dispense with the .for loop

Reviewed by:	emaste bapt
Differential Revision:	https://reviews.freebsd.org/D220134
2019-10-28 20:45:29 +00:00
Dimitry Andric
de19b521ee Slightly expand description of WITH_SHARED_TOOLCHAIN, add a
corresponding WITHOUT_SHARED_TOOLCHAIN description, and regenerate
src.conf(5).

MFC after:	 3 days
2019-10-23 16:48:17 +00:00
Yuri Pankov
a9b0e78c84 tools/tools/locale: allow POSIX target to be built in parallel
While it's rarely used target, more so a one not used during the
buildworld, it helps when it's not taking hours (literally).
2019-10-21 03:01:05 +00:00
Vincenzo Maffione
760fa2ab5d netmap: minor misc improvements
- use ring->head rather than ring->cur in lb(8)
 - use strlcat() rather than strncat()
 - fix bandwidth computation in pkt-gen(8)

MFC after:	1 week
2019-10-20 14:15:45 +00:00
Dimitry Andric
29d6838150 Provide a src.conf(5) description for the new WITHOUT_CAROOT option, and
rename the WITH_LOADER_VERIEXEC_PASS_MANFIEST description to its correct
name.  Also correct a bunch of spelling errors in that description.

MFC after:	3 days
2019-10-18 19:30:12 +00:00
Eugene Grosbein
931a7d3e56 Add missing port to the list of needed tools in the README file
describing locale rebuild process:

devel/apache-ant
2019-10-14 14:31:21 +00:00
Dimitry Andric
8b3bc70a2b Merge ^/head r352764 through r353315. 2019-10-08 18:17:02 +00:00
Edward Tomasz Napierala
1a13f2e6b4 Introduce stats(3), a flexible statistics gathering API.
This provides a framework to define a template describing
a set of "variables of interest" and the intended way for
the framework to maintain them (for example the maximum, sum,
t-digest, or a combination thereof).  Afterwards the user
code feeds in the raw data, and the framework maintains
these variables inside a user-provided, opaque stats blobs.
The framework also provides a way to selectively extract the
stats from the blobs.  The stats(3) framework can be used in
both userspace and the kernel.

See the stats(3) manual page for details.

This will be used by the upcoming TCP statistics gathering code,
https://reviews.freebsd.org/D20655.

The stats(3) framework is disabled by default for now, except
in the NOTES kernel (for QA); it is expected to be enabled
in amd64 GENERIC after a cool down period.

Reviewed by:	sef (earlier version)
Obtained from:	Netflix
Relnotes:	yes
Sponsored by:	Klara Inc, Netflix
Differential Revision:	https://reviews.freebsd.org/D20477
2019-10-07 19:05:05 +00:00
Yuri Pankov
f01edb6f5d Mark "private use area" characters as printable.
At least some of the characters in E000-F8FF range are used by Powerline
fonts, and having no attributes for these ranges in UnicodeData.txt
other than "Other, Private Use" it should be safe to mark all of them as
printable.  Some actually were before r340491, so this fixes the
regression introduced there as well.

PR:		240911
Reviewed by:	bapt
Tested by:	Daniel Ponte <amigan@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D21850
2019-10-05 22:17:54 +00:00
Yuri Pankov
b07934b7c0 Pre-generate Big5 charmap from CLDR data.
The one used previously was missing the characters in 0-127 range,
making various tools try to escape them in output.

PR:		235100
Reviewed by:	bapt
Tested by:	Ting-Wei Lan <lantw44@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D21794
2019-10-05 21:28:46 +00:00
Baptiste Daroussin
4d22a29af2 Do not remove the locale directory when building a system without locales
This directory is actually needed during make installworld and will prevent
to reinstall a system after make delete-old is done.

PR:		226137
Reported by:	rakuco
MFC after:	3 days
2019-10-04 10:24:10 +00:00
Kyle Evans
2d0a92c9ab Move simple_httpd out of picobsd, add HTTPD option (default OFF)
picobsd/tinyware has had this compact HTTPD server for a long time, and some
people do use it. Move it out into usr.sbin well in advance of any action
being taken on picobsd.

This has been gated behind an HTTPD option defaulted to *off*, primarily for
two reasons:
1.) This code likely needs a good audit, as it's been living off in picobsd
    land for a long time, and
2.) We don't currently ship an httpd and this may not be a welcome surprise.

Reviewed by:	eugen
Differential Revision:	https://reviews.freebsd.org/D21724
2019-10-01 14:55:16 +00:00
Warner Losh
b4d3716bcc Use set -o xtrace in preference to set -x for consistency with
the rest of nanobsd.sh.
2019-09-27 20:56:49 +00:00
Warner Losh
04b9e9473d Push and pop xtrace correctly for run_early_customize
run_early_customize is run as a shell list, not as a subshell, so that the side
effects of setting variables can affect later stages of the build (for better or
worse, it's been like this since it was introduced). It therefore has the side
effect of turning off xtrace always, which limits the usefulness of sh -x
nanobsd.sh. Remember the old setting and only turn off tracing after the command
if tracing was off before. All the other places where we do similar things we use
a subshell, so we don't need to do this.
2019-09-27 20:56:44 +00:00
Warner Losh
067f74c267 Remove workaround for building on FreeBSD hosts prior to FreeBSD 10.
rm -x was introduced in the FreeBSD 10 time frame. 4 years ago I added a
function to cope with building nanobsd images on hosts as old FreeBSD 7 that
lacked rm -x. The workaround is no longer needed as FreeBSD 9 hasn't been
supported for almost 3 years. Eliminate the wrapper and use rm -x directly
again.
2019-09-27 20:56:31 +00:00
Ed Maste
f84ed82834 controlelf: update man page
Some minor corrections, clarifications or rewording.
2019-09-27 19:26:52 +00:00
Ed Maste
43b40779db controlelf: exit with error if file endianness does not match host
We need to add support for cross-endian operation, but until that's done
just exit with an error rather than misbehaving.
2019-09-27 19:07:11 +00:00
Ed Maste
6abfc627d6 controlelf: simplify feature string parsing
Also add error handling on failure to seek/write updated value.
2019-09-27 18:49:13 +00:00
Ed Maste
3801c66a97 controlelf: tidy up option parsing
Sponsored by:	The FreeBSD Foundation
2019-09-27 18:39:05 +00:00
Ed Maste
d70d327f0e controlelf: add protmax control
Sponsored by:	The FreeBSD Foundation
2019-09-27 17:28:25 +00:00
Ed Maste
33ac844050 controlelf: some style(9) cleanup
Submitted by:	clang-format
2019-09-27 16:57:32 +00:00
Ed Maste
02ebf42d80 controlelf: install standard BSD 2 clause license
Reported by:	kaktus
Sponsored by:	The FreeBSD Foundation
2019-09-27 16:44:29 +00:00
Ed Maste
d6f95d83b4 controlelf: clean up warnings
- use explicit ELF note name when not found
- no trailing . on warnings
- no \n

Sponsored by:	The FreeBSD Foundation
2019-09-27 16:35:08 +00:00
Ed Maste
d5cd80c811 Add tool to modify ELF binary feature control bits
This will allow feature control bits (e.g. for ASLR, PROT_MAX) to be
inspected or modified.

Some clean-up and additional work is likely still required, but we can
iterate on this in the tree.

Submitted by:	Bora Özarslan <borako.ozarslan@gmail.com>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19290
2019-09-27 16:27:52 +00:00
Dimitry Andric
668ee10168 Merge ^/head r352587 through r352763. 2019-09-26 18:25:54 +00:00
Gleb Smirnoff
e7dd6e9402 Enhance the 'ps' command so that it prints a line per proc and a line
per thread, so that instead of repeating the same info for all threads
in proc, it would print thread specific info. Also includes thread number
that would match 'info threads' info and can be used as argument for
thread swithcing with 'thread' command.
2019-09-25 18:03:15 +00:00
Dimitry Andric
0f80acb965 Merge ^/head r352436 through r352536. 2019-09-19 19:26:12 +00:00
Kyle Evans
4759088665 Add description for WITH_GOOGLETEST
This is the logical negation of WITHOUT_GOOGLETEST, and helpful to have as
we now have different per-arch defaults for this option.
2019-09-18 02:03:39 +00:00
Dimitry Andric
61c1328eb0 Merge ^/head r352105 through r352307. 2019-09-13 21:15:01 +00:00
Baptiste Daroussin
bbcce8d0c4 Insert proper copyright/license headers
Those scripts are without copyright and license assignement since their creation
After grabbing information from The various authors and contributors assign
proper license header and copyrights.

This has been reported by yuripv in his work on integrating those in Illumos!

Reported by:	yuripv
Discussed with:	marino, edwin
MFC after:	3 days
2019-09-13 06:36:24 +00:00
Dimitry Andric
f993ed2fbd Merge ^/head r351732 through r352104. 2019-09-09 19:58:46 +00:00
Warner Losh
606478ebb2 Remove obsolete WITHOUT names that are no longer in the system.
Noticed by: swills@
2019-09-09 18:46:28 +00:00
Warner Losh
50e3bde2f3 These should have been removed when we removed atmel port before 12. 2019-09-09 18:45:52 +00:00
Ed Maste
3e6b8ce30e ci-qemu-test: if firmware is not available, hint at pkg to install
uefi-edk2-qemu-x86_64 provides the firmware ci-qemu-test.sh expects to
use.

Sponsored by:	The FreeBSD Foundation
2019-09-09 14:51:25 +00:00
Rebecca Cran
9a2b7c5fce The efifat files are no longer used: remove the code to build them
Reviewed by:	imp, tsoome, emaste
Differential Revision:	https://reviews.freebsd.org/D20562
2019-09-04 20:55:48 +00:00
Kris Moore
59e50df3cd - Retire pc-sysinstall(8)
https://reviews.freebsd.org/D21094

Submitted by: kmoore@FreeBSD.org
Approved by: imp@FreeBSD.org
2019-09-03 19:42:04 +00:00
Matt Macy
14113f123e Use makefs -t msdos in make_esp_file
With this last piece in place, make -C /usr/src/release release.iso is
finally able to run in a jail. This was not possible before because
msdosfs cannot be mounted inside a jail.

Submitted by:	ryan@ixsystems.com
Reviewed by:	emaste@, imp@, gjb@
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D21385
2019-09-03 18:37:55 +00:00
Dimitry Andric
c5c3ba6b43 Merge ^/head r351317 through r351731. 2019-09-03 05:58:43 +00:00
Dimitry Andric
f57be329fc Update libclang_rt:
* Add cfi, dd, fuzzer and xray
* Update arch support
* Update OptionalObsoleteFiles.inc
2019-09-01 18:21:06 +00:00
Dimitry Andric
2f3724e658 Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.
2019-08-31 18:04:33 +00:00
John Baldwin
b2e60773c6 Add kernel-side support for in-kernel TLS.
KTLS adds support for in-kernel framing and encryption of Transport
Layer Security (1.0-1.2) data on TCP sockets.  KTLS only supports
offload of TLS for transmitted data.  Key negotation must still be
performed in userland.  Once completed, transmit session keys for a
connection are provided to the kernel via a new TCP_TXTLS_ENABLE
socket option.  All subsequent data transmitted on the socket is
placed into TLS frames and encrypted using the supplied keys.

Any data written to a KTLS-enabled socket via write(2), aio_write(2),
or sendfile(2) is assumed to be application data and is encoded in TLS
frames with an application data type.  Individual records can be sent
with a custom type (e.g. handshake messages) via sendmsg(2) with a new
control message (TLS_SET_RECORD_TYPE) specifying the record type.

At present, rekeying is not supported though the in-kernel framework
should support rekeying.

KTLS makes use of the recently added unmapped mbufs to store TLS
frames in the socket buffer.  Each TLS frame is described by a single
ext_pgs mbuf.  The ext_pgs structure contains the header of the TLS
record (and trailer for encrypted records) as well as references to
the associated TLS session.

KTLS supports two primary methods of encrypting TLS frames: software
TLS and ifnet TLS.

Software TLS marks mbufs holding socket data as not ready via
M_NOTREADY similar to sendfile(2) when TLS framing information is
added to an unmapped mbuf in ktls_frame().  ktls_enqueue() is then
called to schedule TLS frames for encryption.  In the case of
sendfile_iodone() calls ktls_enqueue() instead of pru_ready() leaving
the mbufs marked M_NOTREADY until encryption is completed.  For other
writes (vn_sendfile when pages are available, write(2), etc.), the
PRUS_NOTREADY is set when invoking pru_send() along with invoking
ktls_enqueue().

A pool of worker threads (the "KTLS" kernel process) encrypts TLS
frames queued via ktls_enqueue().  Each TLS frame is temporarily
mapped using the direct map and passed to a software encryption
backend to perform the actual encryption.

(Note: The use of PHYS_TO_DMAP could be replaced with sf_bufs if
someone wished to make this work on architectures without a direct
map.)

KTLS supports pluggable software encryption backends.  Internally,
Netflix uses proprietary pure-software backends.  This commit includes
a simple backend in a new ktls_ocf.ko module that uses the kernel's
OpenCrypto framework to provide AES-GCM encryption of TLS frames.  As
a result, software TLS is now a bit of a misnomer as it can make use
of hardware crypto accelerators.

Once software encryption has finished, the TLS frame mbufs are marked
ready via pru_ready().  At this point, the encrypted data appears as
regular payload to the TCP stack stored in unmapped mbufs.

ifnet TLS permits a NIC to offload the TLS encryption and TCP
segmentation.  In this mode, a new send tag type (IF_SND_TAG_TYPE_TLS)
is allocated on the interface a socket is routed over and associated
with a TLS session.  TLS records for a TLS session using ifnet TLS are
not marked M_NOTREADY but are passed down the stack unencrypted.  The
ip_output_send() and ip6_output_send() helper functions that apply
send tags to outbound IP packets verify that the send tag of the TLS
record matches the outbound interface.  If so, the packet is tagged
with the TLS send tag and sent to the interface.  The NIC device
driver must recognize packets with the TLS send tag and schedule them
for TLS encryption and TCP segmentation.  If the the outbound
interface does not match the interface in the TLS send tag, the packet
is dropped.  In addition, a task is scheduled to refresh the TLS send
tag for the TLS session.  If a new TLS send tag cannot be allocated,
the connection is dropped.  If a new TLS send tag is allocated,
however, subsequent packets will be tagged with the correct TLS send
tag.  (This latter case has been tested by configuring both ports of a
Chelsio T6 in a lagg and failing over from one port to another.  As
the connections migrated to the new port, new TLS send tags were
allocated for the new port and connections resumed without being
dropped.)

ifnet TLS can be enabled and disabled on supported network interfaces
via new '[-]txtls[46]' options to ifconfig(8).  ifnet TLS is supported
across both vlan devices and lagg interfaces using failover, lacp with
flowid enabled, or lacp with flowid enabled.

Applications may request the current KTLS mode of a connection via a
new TCP_TXTLS_MODE socket option.  They can also use this socket
option to toggle between software and ifnet TLS modes.

In addition, a testing tool is available in tools/tools/switch_tls.
This is modeled on tcpdrop and uses similar syntax.  However, instead
of dropping connections, -s is used to force KTLS connections to
switch to software TLS and -i is used to switch to ifnet TLS.

Various sysctls and counters are available under the kern.ipc.tls
sysctl node.  The kern.ipc.tls.enable node must be set to true to
enable KTLS (it is off by default).  The use of unmapped mbufs must
also be enabled via kern.ipc.mb_use_ext_pgs to enable KTLS.

KTLS is enabled via the KERN_TLS kernel option.

This patch is the culmination of years of work by several folks
including Scott Long and Randall Stewart for the original design and
implementation; Drew Gallatin for several optimizations including the
use of ext_pgs mbufs, the M_NOTREADY mechanism for TLS records
awaiting software encryption, and pluggable software crypto backends;
and John Baldwin for modifications to support hardware TLS offload.

Reviewed by:	gallatin, hselasky, rrs
Obtained from:	Netflix
Sponsored by:	Netflix, Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D21277
2019-08-27 00:01:56 +00:00
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