Commit Graph

19801 Commits

Author SHA1 Message Date
Vladimir Kondratyev
0c8a908463 psm(4): respect tap_disabled configuration with enabled Extended support
This fixes a bug where, even when hw.psm.tap_enabled=0, touchpad taps
were processed.
tap_enabled has three states: unconfigured, disabled, and enabled (-1, 0, 1).
To respect PR kern/139272, taps are ignored only when explicity disabled.

Submitted by:	Ben LeMasurier <ben@crypt.ly> (initial version)
MFC after:	2 weeks
2019-04-20 21:04:56 +00:00
Conrad Meyer
6b97c2e306 Revert r346410 and r346411
libkern in .PATH has too many filename conflicts with libc and my -DNO_CLEAN
tinderbox didn't catch that ahead of time.  Mea culpa.
2019-04-19 22:08:17 +00:00
Conrad Meyer
7deb4b1964 libkern: Bring in arc4random_uniform(9) from libc
It is a useful arc4random wrapper in the kernel for much the same reasons as
in userspace.  Move the source to libkern (because kernel build is
restricted to sys/, but userspace can include any file it likes) and build
kernel and libc versions from the same source file.

Copy the documentation from arc4random_uniform(3) to the section 9 page.

While here, add missing arc4random_buf(9) symlink.

Sponsored by:	Dell EMC Isilon
2019-04-19 20:05:47 +00:00
Conrad Meyer
55084da106 random.4: Include description of knobs added in r346358
Reported by:	ngie
Sponsored by:	Dell EMC Isilon
2019-04-19 17:15:58 +00:00
Tom Jones
40a06c5b29 Add a bugs section to pflog man page
FreeBSD does not set the pid field in the pfloghdr struct. This field is
populated on other platforms, document this to save people from trying
to use this field.

Event:	Aberdeen hackathon 2019
Reviewed by:	kp, bcr, bz
Approved by:	bz (mentor)
Differential Revision:	https://reviews.freebsd.org/D19952
2019-04-18 11:06:45 +00:00
Emmanuel Vadot
9a4eed0be2 ofw_graph: Add functions for graph bindings
Those functions are helpers to work on graph bindings.
graphs are mostly use with video related devices.
See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/graph.txt?id=4436a3711e3249840e0679e92d3c951bcaf25515

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D19877
2019-04-17 20:09:01 +00:00
Pedro F. Giffuni
adefd2ea56 Add orphan mentee. 2019-04-17 14:20:55 +00:00
Pedro F. Giffuni
3df1d861a4 Add myself to ports committers.
Approved by: pfg (mentor)
2019-04-17 14:12:11 +00:00
Kyle Evans
924f8189b0 fdt: further consolidate DTB building and revise manpage
FDT_DTS_FILE was built separately with a rule in sys/conf/files and
recreated the rules we used in dtb.mk. Now that we have other infrastructure
to build a DTB along with the kernel, fold FDT_DTS_FILE into that since it
doesn't have any special requirements.

fdt(4) never got revised to mention the DTS/DTSO make options, so do that
now.

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D19736
2019-04-17 03:29:16 +00:00
Ed Maste
4066060c0b iflibtxrx.9: update function descriptions to match implementation
isc_rxd_refill, isc_rxd_flush return nothing, not void *.

isc_txd_credits_update, isc_rxd_available return int, not int *.

isc_txd_credits_update has a bool as final argument, not a uint32_t.
Prior to r315217 it took four arguments; the final two were
uint32_t, bool.

Reported by:	Gerald Aryeetey <aryeeteygerald_rogers.com>
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-04-16 20:41:04 +00:00
Conrad Meyer
f3d2512db6 random(4): Add is_random_seeded(9) KPI
The imagined use is for early boot consumers of random to be able to make
decisions based on whether random is available yet or not.  One such
consumer seems to be __stack_chk_init(), which runs immediately after random
is initialized.  A follow-up patch will attempt to address that.

Reported by:	many
Reviewed by:	delphij (except man page)
Approved by:	secteam(delphij)
Differential Revision:	https://reviews.freebsd.org/D19926
2019-04-16 17:12:17 +00:00
Tom Jones
76fe80844b Update and clarify pflog man page
The pflog0 interface is created when the module is loaded, this can
be triggered by pf and pflogd being enabled or by kldloading the module.

By default the interface would be pflog0, add the ifconfig stage of the
example to make this example clearer.

Reviewed by:	kp, bz, bcr, jtl, 0mp
Approved by:	jtl (mentor), bz (mentor)
Differential Revision:	https://reviews.freebsd.org/D19861
2019-04-16 13:31:16 +00:00
Cy Schubert
dcb916f4f4 Document when I received my commit bits. 2019-04-16 05:11:39 +00:00
Piotr Kubaj
dbd34bda9c Add myself to committer list.
Approved by:	tcberner (mentor)
2019-04-15 19:21:45 +00:00
Conrad Meyer
13774e8228 random(4): Block read_random(9) on initial seeding
read_random() is/was used, mostly without error checking, in a lot of
very sensitive places in the kernel -- including seeding the widely used
arc4random(9).

Most uses, especially arc4random(9), should block until the device is seeded
rather than proceeding with a bogus or empty seed.  I did not spy any
obvious kernel consumers where blocking would be inappropriate (in the
sense that lack of entropy would be ok -- I did not investigate locking
angle thoroughly).  In many instances, arc4random_buf(9) or that family
of APIs would be more appropriate anyway; that work was done in r345865.

A minor cleanup was made to the implementation of the READ_RANDOM function:
instead of using a variable-length array on the stack to temporarily store
all full random blocks sufficient to satisfy the requested 'len', only store
a single block on the stack.  This has some benefit in terms of reducing
stack usage, reducing memcpy overhead and reducing devrandom output leakage
via the stack.  Additionally, the stack block is now safely zeroed if it was
used.

One caveat of this change is that the kern.arandom sysctl no longer returns
zero bytes immediately if the random device is not seeded.  This means that
FreeBSD-specific userspace applications which attempted to handle an
unseeded random device may be broken by this change.  If such behavior is
needed, it can be replaced by the more portable getrandom(2) GRND_NONBLOCK
option.

On any typical FreeBSD system, entropy is persisted on read/write media and
used to seed the random device very early in boot, and blocking is never a
problem.

This change primarily impacts the behavior of /dev/random on embedded
systems with read-only media that do not configure "nodevice random".  We
toggle the default from 'charge on blindly with no entropy' to 'block
indefinitely.'  This default is safer, but may cause frustration.  Embedded
system designers using FreeBSD have several options.  The most obvious is to
plan to have a small writable NVRAM or NAND to persist entropy, like larger
systems.  Early entropy can be fed from any loader, or by writing directly
to /dev/random during boot.  Some embedded SoCs now provide a fast hardware
entropy source; this would also work for quickly seeding Fortuna.  A 3rd
option would be creating an embedded-specific, more simplistic random
module, like that designed by DJB in [1] (this design still requires a small
rewritable media for forward secrecy).  Finally, the least preferred option
might be "nodevice random", although I plan to remove this in a subsequent
revision.

To help developers emulate the behavior of these embedded systems on
ordinary workstations, the tunable kern.random.block_seeded_status was
added.  When set to 1, it blocks the random device.

I attempted to document this change in random.4 and random.9 and ran into a
bunch of out-of-date or irrelevant or inaccurate content and ended up
rototilling those documents more than I intended to.  Sorry.  I think
they're in a better state now.

PR:		230875
Reviewed by:	delphij, markm (earlier version)
Approved by:	secteam(delphij), devrandom(markm)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D19744
2019-04-15 18:40:36 +00:00
Alan Somers
084e97b866 fusefs: add a fusefs(5) man page
PR:		233393
Reported by:	tech-lists@zyxst.net
Reviewed by:	cem
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19651
2019-04-13 13:59:01 +00:00
Chris Rees
b11974c250 Revert r346017 pending compiled-in zfs fix
PR:		237172
Approved by:	jilles
Differential Revision:	https://reviews.freebsd.org/D18670
2019-04-10 07:51:13 +00:00
Edward Tomasz Napierala
1842b0778b Remove spurious comma.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2019-04-09 10:17:24 +00:00
Chris Rees
f5dfe75da5 Remove now unnecessary kldstat check before attempting to load modules.
Since r233109, kldload has the -n option, which silently ignores options
that are already loaded.

https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html

Note that this script no longer reports if the module is already loaded,
but it could be argued this wasn't particularly useful information.

PR:			docs/234248
Reviewed by:		bcr (docs), kib, rgrimes (visual)
Approved by:		jilles
Differential Revision:	https://reviews.freebsd.org/D18670
2019-04-07 18:31:45 +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
Guangyuan Yang
00ef9f43b3 Rewrite intro(4) man page.
- Remove issues that no longer apply thanks to devfs
- Add language pointing out devfs's role and referencing its config
- Add a "historical notes" section and move discussion of block vs character devs to it, including pointing out the removal of block devs
- Modernize some examples

MFC after:	1 week
PR:		236970
Submitted by:	andrew@tao173.riddles.org.uk
Reviewed by:	0mp
Differential Revision:	https://reviews.freebsd.org/D19799
2019-04-04 18:52:03 +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
Guangyuan Yang
4224e9d37f Correct SMC definition in asmc(4) man page.
MFC after:	3 days
PR:		236954
Submitted by:	fbsdbugs4@sentry.org
2019-04-02 20:03:03 +00:00
Enji Cooper
1c50bec8ef Allow programs to set NO_SHARED on a per-PROG basis
This is particularly useful when installing programs for tests that need to be
linked statically, e.g., mini-me from capsicum-test, which is linked statically
to avoid the dynamic library lookup in the upstream project.

Reviewed by:	emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D19756
2019-03-30 17:23:15 +00:00
Enji Cooper
b89cf12cc6 PROG_OVERRIDE_VARS should override default values if specified
The behavior prior to this change would not override default values if set in
`bsd.own.mk`, or (in the more general case) globally before `bsd.progs.mk` was
included. This affected `bsd.test.mk` as well, since it consumes
`bsd.progs.mk`.

Some examples of this failing behavior are as follows:

* `BINMODE` defaults to 0555 per `bsd.own.mk`. If someone wanted to set the
  `BINMODE` to `NOBINMODE` (0444) for `prog`, for example, like
  `BINMODE.prog= ${NOBINMODE}`, `bsd.progs.mk` would not honor the per-PROG
  setting.
* An application, `prog`, does not build at `WARNS?= 6`. Before this change,
  setting to a lower `WARNS` value, e.g., `WARNS.prog= 3`, would have been
  impossible, requiring that `prog` be built from another directory,
  the global `WARNS` be lowered, or a per-PROG value needing to be set
  across the board. None of the above workarounds is desirable.

This change unbreaks variables defined in `PROG_OVERRIDE_VARS` which have
defaults set before `bsd.progs.mk` is included, by setting them to their
defined values if set on a per-PROG basis.

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D19755
2019-03-30 00:57:33 +00:00
Enji Cooper
0eb97cca9f Allow users to override CSTD/CXXSTD on a per-prog basis
The current logic for CSTD/CXXSTD requires homogenity as far as the
supported C/C++ standards, which is a sensible default. However, when
dealing with differing versions of C++, some code may compile with C++11, but
not C++17 (for instance). So in order to avoid having people convert over their
code to the new standard, give the users the ability to specify the standard on
a per-program basis.

This will allow a user to override the supporting standard for a set of
programs, mixing C++11 with C++14 (for instance).

Reviewed by:	asomers
Apprved by:	emaste (mentor)
MFC after:	1 month
MFC with:	r345708
Differential Revision: https://reviews.freebsd.org/D19738
2019-03-29 18:49:08 +00:00
Enji Cooper
e8067928ff Standardize -std=c++* as CXXSTD`
CXXSTD was added as the C++ analogue to CSTD.

CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
MFC with:	r345203, r345704, r345705
Relnotes:	yes
Tested with:	make tinderbox
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:45:27 +00:00
Enji Cooper
bdbf3440ce Revert r345706: the third time will be the charm
When a review is closed via Phabricator it updates the patch attached to the
review. I downloaded the raw patch from Phabricator, applied it, and repeated
my mistake from r345704 by accident mixing content from D19732 and D19738.

For my own personal sanity, I will try not to mix reviews like this in the
future.

MFC after:	1 month
MFC with:	r345706
Approved by:	emaste (mentor, implicit)
2019-03-29 18:43:46 +00:00
Enji Cooper
760b1a815b Standardize -std=c++* as CXXSTD`
CXXSTD was added as the C++ analogue to CSTD.

CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
MFC with:	r345203, r345704, r345705
Relnotes:	yes
Tested with:	make tinderbox
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:31:48 +00:00
Enji Cooper
752cabaa1c Revert r345704
I accidentally committed code from two reviews. I will reintroduce the code to
bsd.progs.mk as part of a separate commit from r345704.

Approved by:	emaste (mentor, implicit)
MFC after:	2 months
MFC with:	r345704
2019-03-29 18:16:33 +00:00
Enji Cooper
9a41926bfb CXXSTD is the C++ analogue to CSTD.
CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:13:44 +00:00
Alan Somers
b432a7f8cb Add man page for VOP_FDATASYNC(9)
Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D19678
2019-03-29 02:44:20 +00:00
Enji Cooper
fb72cf61ac Spam CXXFLAGS with -I${DESTDIR}/usr/include/private, instead of GTEST_CXXFLAGS
This makes it easier for googletest users to leverage googletest, instead of
forcing them to plug GTEST_CXXFLAGS into CXXFLAGS manually (resulting in
unnecessary duplication).

I will be following this up with a more proper fix in src.libnames.mk, as
src.libnames.mk should be automatically adding this directory to
CFLAGS/CXXFLAGS when private libraries are referenced. Not doing so can result
in mismatches between base-provided private library's and ports-provided
library's headers.

While here, tweak the comment to clarify what the intent is behind spamming
CXXFLAGS.

MFC after:	5 weeks
MFC with:	r345203
Reported by:	asomers
Reviewed by:	asomers
Approved by:	emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D19731
2019-03-28 17:22:31 +00:00
John Baldwin
ffad9893e7 Remove the TIMED src option from the list of options.
This was missed in r342139 when timed(8) was removed and fixes a
warning when running makeman to regenerate src.conf.5.

Differential Revision:	https://reviews.freebsd.org/D19486
2019-03-26 20:44:02 +00:00
Philip Paeps
107510b8a4 SZ has been known as Eswatini since April 2018 (formerly Swaziland).
Sources:
https://www.iso.org/obp/ui/#iso:code:3166:SZ
http://www.un.org/en/member-states/index.html#gotoE
http://www.times.co.sz/news/118373-kingdom-of-eswatini-change-now-official.html

MFC after:	3 days
2019-03-26 09:46:17 +00:00
Michael Tuexen
0999766ddf Add sysctl variable net.inet.tcp.rexmit_initial for setting RTO.Initial
used by TCP.

Reviewed by:		rrs@, 0mp@
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D19355
2019-03-23 21:36:59 +00:00
Andrey V. Elsukov
0bd4858ed3 Add ability to automatically load ipfw_nat64, ipfw_nptv6 and ipfw_pmod
modules by declaring corresponding variables in rc.conf. Also document
them in rc.conf(5).

Submitted by:	Dries Michiels
Differential Revision:	https://reviews.freebsd.org/D19673
2019-03-23 15:41:32 +00:00
Konstantin Belousov
fc56fdf35a Add UPDATING note for geom_uzip(4)/xz, and bump geom_uzip(4) man page date.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2019-03-23 10:13:01 +00:00
Alan Somers
f6a363a50d Add man page for VOP_FDATASYNC(9)
Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19678
2019-03-22 18:42:34 +00:00
Mitchell Horne
0d3cbca80b Update mentor and calendar files
Add an entry for myself (mhorne) to these files.

Approved by:	markj
2019-03-22 17:37:14 +00:00
Jung-uk Kim
0fa5ee1f53 Catch up with Clang 8.0. 2019-03-21 21:45:02 +00:00
Jung-uk Kim
f4590b8c3a Catch up with Clang 7.0.
MFC after:	3 days
2019-03-21 21:43:23 +00:00
Edward Tomasz Napierala
6017706303 Attach the vmci(4) man page to the build. Looks like it's been
missed by mistake.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2019-03-21 08:51:32 +00:00
Eric Joyner
10a1e981d4 iflib: mark isc_driver_version as constant
From Jake:
The iflib core never modifies the isc_driver_version string. Allow
drivers to safely assign pointers to constant buffers by marking this
parameter const.

Submitted by:	Jacob Keller <jacob.e.keller@intel.com>
Reviewed by:	erj@, gallatin@, jhb@
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D19577
2019-03-19 23:44:26 +00:00
Dimitry Andric
07302582b6 Turn on MK_OPENMP for i386 by default, now that it can build.
Noticed by:	jbeich
PR:		236062, 236582
MFC after:	1 month
X-MFC-With:	r344779
2019-03-19 06:58:28 +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
Oleksandr Tymoshenko
0004c28dda Fix build for KLD dyn_sysctl example
Looks like the example was broken by change of SYSCTL_STATIC_CHILDREN
definition in r267992. Fix build by switching to using SYSCTL_ADD_ROOT_NODE

PR:		236139
Submitted by:	Andrew Reiter <arr@watson.org>
MFC after:	1 week
2019-03-16 04:24:02 +00:00
Enji Cooper
7840b63a78 Regenerate src.conf(5) after r345203 (MK_GOOGLETEST addition)
MFC after:	2 months
MFC with:	r345203
Approved by:	emaste (mentor; implicit: https://reviews.freebsd.org/D19551)
2019-03-15 21:46:54 +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
Alan Somers
398467c1e4 VOP_INACTIVE(9): clarify wording
Reviewed by:	kib, 0mp
MFC after: 	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19596
2019-03-15 21:11:47 +00:00
Guangyuan Yang
ee072597f3 Add myself to committers-doc.dot.
Reminded by:	rgrimes
2019-03-15 00:20:28 +00:00
Ed Maste
22ae5464d6 firmware(9): remove uuencoded example
We can (should) just commit the binary files to the source tree.

Reviewed by:	bz, imp, 0mp
Differential Revision:	https://reviews.freebsd.org/D19581
2019-03-14 17:09:07 +00:00
Eugene Grosbein
9405761f7b mfi.4, mrsas.4: document how to get ATA TRIM support for SSD
while using LSI RAID adapters as it was completely obscure before:
mfi has no TRIM support at all and mrsas provides TRIM
if underlying adapter does it (for Non-RAID drives generally).
2019-03-13 09:48:33 +00:00
Benedict Reuschling
1b35da5af7 Extend descriptions and comments about the need to create /etc/pf.conf.
FreeBSD removed the default /etc/pf.conf file in previous releases, but
the documentation kept mentioning it like any other file present in the
system.  Change pf.conf(5) to mention in the description of the default
ruleset location that this file needs to be created manually. Also, the
default rc.conf file had it's comment extended a bit to let people know
that this file does not exist by default.

PR:		    231977
Submitted by:	    koobs@
Reviewed by:	    kp@, 0mp@
Approved by:	    kp@
MFC after:	    10 days
Differential Revision:	https://reviews.freebsd.org/D19530
2019-03-12 20:08:37 +00:00
Mateusz Piotrowski
96fdbc90b2 ports.7: Add an example of how to use flavors
At the moment the manual page is not documenting how to build
a flavored package. Let's start documenting flavors with
an example of a typical use case.

Reported by:	cem, dim
Reviewed by:	bcr, cem, mat, matthew
Approved by:	cem (src)
Differential Revision:	https://reviews.freebsd.org/D19531
2019-03-12 09:27:37 +00:00
John Baldwin
1c37687de1 Update ccr(4) to note recent support for SHA2-224 and plain SHA hashes.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2019-03-11 23:18:09 +00:00
Enji Cooper
eb1761b004 MFhead@r345025 2019-03-11 21:00:58 +00:00
Enji Cooper
9bfc4020c4 Compile and install most of the googletest examples
sample9_unittest is not compiled/installed, because it intentionally fails
and would result in red test runs until broken to always pass.
2019-03-11 19:50:44 +00:00
Glen Barber
735a3eae28 Update entries for accounts@, backups@, dnsadm@, mirror-admin@, and
remove refadm@.

Sponsored by:	The FreeBSD Foundation
2019-03-11 15:47:26 +00:00
Glen Barber
1da1f2c229 Update the re@ member list.
Sponsored by:	The FreeBSD Foundation
2019-03-11 15:36:24 +00:00
Enji Cooper
ff511f1f39 MFhead@r344996 2019-03-11 03:02:58 +00:00
Andriy Voskoboinyk
786ac7035f Fix ieee80211_radiotap(9) usage in wireless drivers:
- Alignment issues:
 * Add missing __packed attributes + padding across all drivers; in
most places there was an assumption that padding will be always
minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
padding was just missing.
 * Add __aligned(8) attribute for all Rx radiotap headers since they can
contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
just drop the attribute here. Refresh ieee80211_radiotap(9) man page
accordingly.

- Since net80211 automatically updates channel frequency / flags in
ieee80211_radiotap_chan_change() drop duplicate setup for these fields
in drivers.

Tested with Netgear WG111 v3 (urtw(4)), STA mode.

MFC after:	2 weeks
2019-03-11 01:27:01 +00:00
Mateusz Piotrowski
ca588aed6d style.mdoc.5: Fix formatting issues
Reviewed by:	bcr
Approved by:	bcr (doc)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D19532
2019-03-10 20:58:59 +00:00
Benedict Reuschling
849bfb6d3d Update members of doceng in the chart.
Update the members of the doceng team to include ryusuke@ and me.
Sort and reduce number of line breaks so that our bubble in the
chart is a bit more compact (similar to portmgr next to it).

Reminded by:    gjb
2019-03-08 18:58:41 +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
John Baldwin
e91609a771 Divorce MK_GDB from MK_BINUTILS.
This permits legacy GDB to still be built and installed if
WITHOUT_BINUTILS is set (e.g. if base/binutils is installed).

Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19480
2019-03-06 20:13:02 +00:00
John Baldwin
bfdf8aa9f7 Regenerate src.conf.5 for recent changes.
Updates include removal of DRM2 and addition of several options
related to secure booting.
2019-03-06 20:10:23 +00:00
Benedict Reuschling
1e61b94049 Update the core-secretary role.
With the last core election, matthew@ stepped down and handed over to jrm@ to
serve as new core secretary. Update this file to match.

Approved by:	core (implicit)
2019-03-06 17:37:56 +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
Enji Cooper
b18a4ccab9 MFhead@r344786 2019-03-05 01:00:38 +00:00
Ian Lepore
e70ece1297 Allow the sector size of the disk device to be configured using hints or
FDT data.  The sector size must be a multiple of the device's page size.
If not configured, use the historical default of the device page size.

Setting the disk sector size to 512 or 4096 allows a variety of standard
filesystems to be used on the device.  Of course you wouldn't want to be
writing frequently to a SPI flash chip like it was a disk drive, but for
data that gets written once (or rarely) and read often, using a standard
filesystem is a nice convenient thing.
2019-03-02 23:20:47 +00:00
Enji Cooper
1ece6232d2 Remove references to pdwait4(2) and CAP_PDWAIT from rights(4)
@cem removed references to pdwait4(2) (a nonexistent syscall) in
r320058.

This change removes references to pdwait4(2) and `CAP_PDWAIT` in
rights(4) to not mislead the user into thinking that pdwait4(2)/`CAP_PDWAIT` is
actually implemented in the stock FreeBSD kernel.

The goal of this functionality was to simplify monitoring/manipulating
processes started with `pdfork`, et al, and avoid races with waiting on pids.
The syscall was never completed though--just discussed on the capsicum mailing
list back in 2015:
https://lists.cam.ac.uk/pipermail/cl-capsicum-discuss/2015-May/msg00012.html
. That being said, there are members of the project (@rwatson, etc) who
have longterm goals to implement this syscall to better secure pdfork(2)
calls.

PR:		235871
Reviewed by:	emaste
Discussed with:	rwatson
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D18950
2019-02-28 18:12:14 +00:00
Alexander Motin
17ec774693 Add to isp(4) tunables to limit MSI/MSI-X usage.
There are some problem reports possibly related to the new driver use of
multiple interrupts on older cards.  Hopefully this allow to workaround
them.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2019-02-28 15:24:00 +00:00
Ian Lepore
5a978eadf7 Add manpages for at45d(4) and mx25l(4). 2019-02-26 22:50:01 +00:00
Konstantin Belousov
e8643b01e6 Modularize xz.
Embedded lzma decompression library becomes a module usable by other
consumers, in addition to geom_uzip.

Most important code changes are
- removal of XZ_DEC_SINGLE define, we need the code to work
  with XZ_DEC_DYNALLOC;
- xz_crc32_init() call is removed from geom_uzip, xz module handles
  initialization on its own.

xz is no longer embedded into geom_uzip, instead the depend line for
the module is provided, and corresponding kernel option is added to
each MIPS kernel config file using geom_uzip.

The commit also carries unrelated cleanup by removing excess "device geom_uzip"
in places which were missed in r344479.

Reviewed by:	cem, hselasky, ray, slavash (previous versions)
Sponsored by:	Mellanox Technologies
Differential revision:	https://reviews.freebsd.org/D19266
MFC after:	3 weeks
2019-02-26 19:55:03 +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
Ed Maste
e1157dcec4 Make libifconfig INTERNALLIB
Instead of PRIVATELIB + NO_PIC.  This avoids the need for the wlandebug
PIE special case added in r344211, and provides a stronger guarantee
against 3rd party software coming to depend on the API or ABI.

If / when we declare the API/ABI to be stable we can make it a normal
library.

Discussed with:	bapt
Sponsored by:	The FreeBSD Foundation
2019-02-25 18:22:20 +00:00
Enji Cooper
18b18078f2 MFhead@r344527 2019-02-25 18:00:14 +00:00
Mateusz Piotrowski
9a593520b5 Add missing types to the sysctl(9) manual page
Update the diff to include other missing sysctl types found in sysctl.h.

Some of these sysctls are already documented in other pages (e.g counter(9)
and ZONE(9)), but they should at least be mentioned here for completeness.

This patch now documents all of the following:
- SYSCTL_BOOL/SYSCTL_ADD_BOOL
- SYSCTL_COUNTER_U64/SYSCTL_ADD_COUNTER_U64
- SYSCTL_COUNTER_U64_ARRAY/SYSCTL_ADD_COUNTER_U64_ARRAY
- SYSCTL_SBINTIME_MSEC/SYSCTL_ADD_SBINTIME_MSEC
- SYSCTL_SBINTIME_USEC/SYSCTL_ADD_SBINTIME_USEC
- SYSCTL_UMA_CUR/SYSCTL_ADD_UMA_CUR
- SYSCTL_UMA_MAX/SYSCTL_ADD_UMA_MAX

Submitted by:	mhorne063_gmail.com
Reviewed by:	bcr, hselasky
Approved by:	bcr (doc), hselasky (src)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D19272
2019-02-25 15:03:50 +00:00
Mateusz Piotrowski
6e33d37f86 style.mdoc.5: Fix a typo
Reviewed by:	eadler
Approved by:	eadler (doc)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D19328
2019-02-24 14:20:47 +00:00
Christian Brueffer
1adc28f5a8 Fix a slew of mdoc errors and warnings.
MFC after:	1 week
2019-02-23 09:34:57 +00:00
Gleb Smirnoff
0dfc145abe Support struct ip_mreqn as argument for IP_ADD_MEMBERSHIP. Legacy support
for struct ip_mreq remains in place.

The struct ip_mreqn is Linux extension to classic BSD multicast API. It
has extra field allowing to specify the interface index explicitly. In
Linux it used as argument for IP_MULTICAST_IF and IP_ADD_MEMBERSHIP.
FreeBSD kernel also declares this structure and supports it as argument
to IP_MULTICAST_IF since r170613. So, we have structure declared but
not fully supported, this confused third party application configure
scripts.

Code handling IP_ADD_MEMBERSHIP was mixed together with code for
IP_ADD_SOURCE_MEMBERSHIP.  Bringing legacy and new structure support
into the mess would made the "argument switcharoo" intolerable, so
code was separated into its own switch case clause.

MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D19276
2019-02-23 06:03:18 +00:00
Bruce Evans
d09131e044 Connect the restored dumb and sc terminal emulators to the kernel build.
Add or fix options to control static and dynamic configuration.  Keep
the default of scteken, but default to statically configuring all available
emulators (now 3 instead of 1).

The dumb emulator is almost usable.  libedit and libreadline handle
dumb terminals perfectly for at least shell history.  less(1) works
as well as possible except on exit.  But curses programs make messes.
The dumb emulator has strange color support, with 2 dumb colors for
normal output but fancy colorization for the cursor, mouse pointer and
(with a non-dumb initial emulator) for low-level console output.

Using the sc emulator instead of the default of scteken fixes at least
the following bugs:
- NUL is a printing character in cons25 but not in teken
- teken doesn't support fixed colors for "reverse" video.
- The best versions of sc are about 10 times faster than scteken (for
  printing to the frame buffer).  This version is only about 5 times
  faster.

Fix configuration features:
- make SC_DFLT_TERM (for setting the initial emulator) a normal option.

Add configuration features:
- negative options SC_NO_TERM_* for omitting emulators in the static config.
  Modules for emulators might work, but I don't know of any
- vidcontrol -e shows the available emulators
- vidcontrol -E <emulator> sets the active emulator.
2019-02-22 06:41:47 +00:00
Enji Cooper
7b1136bd59 Remove redundant CXXFLAGS and fix constant names
- Specifying -std=c++11 and -frtti tweaks those flags with clang/gcc.
- The constants are prefixed with `GTEST_`, not `GTESTS_`.
2019-02-22 04:52:12 +00:00
Enji Cooper
1d4fb286a0 Move NO_WTHREAD_SAFETY to googletest.test.inc.mk
This variable is necessary to compile with googletest at a global level. Move
it there.
2019-02-21 06:49:20 +00:00
Enji Cooper
c1bcc48b3c Use gmock/gtest headers when PRIVATELIB is defined
The move to /usr/include/private prefixed paths seems to require a bit more
effort in order to compile programs.

Install the headers to /usr/include/private/g{mock,test}/... and automatically
include /usr/include/private in GTESTS_CXXFLAGS to make compilation seamless. I
will work on the more global problem later with @bdrewery.
2019-02-21 04:47:44 +00:00
Enji Cooper
900e7b9404 Fix a typo
A previous iteration referenced/used googletest.test.flags.mk, not
googletest.test.inc.mk. The latter name is what I settled on as this
Makefile snippet can include more logic than flags.
2019-02-21 03:36:09 +00:00
Enji Cooper
833018816d Correct gmock/gtest expectations w.r.t. C++11/RTTI
Long story short, some of the tests were failing because they expected either
dynamic_cast or RTTI to be functional and it wasn't.

Move all common CXXFLAGS out to googletest.test.inc.mk and reference it from
googletest.test.mk and .../googletest/Makefile.inc
2019-02-20 20:09:59 +00:00
Enji Cooper
d0527c3f06 Document GTESTS variable in googletest.test.mk 2019-02-20 01:12:59 +00:00
Enji Cooper
bd71398d1e Add googletest.test.mk and integrate into bsd.test.mk
googletest.test.mk is a rudimentary wrapper around the plain test interface
(for now), which only supports C++ programs, specified by the `GTESTS`
variable.

In the future, kyua will support gtests in a more native manner.
2019-02-20 01:09:03 +00:00
Enji Cooper
06beea0e7e MK_GOOGLETEST should be enabled/disabled based on MK_TESTS_SUPPORT
Making MK_GOOGLETEST rely on MK_TESTS makes it impossible to rely on in
buildworld, which is not desirable for items like `cddl/usr.sbin/zfsd/tests`.
2019-02-20 00:12:24 +00:00
Enji Cooper
4309e4b5b4 Fix typos
LIBGMOCK_MAIN and LIBGTEST_MAIN were missing corresponding underscores in the
variable names.
2019-02-20 00:10: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
Enji Cooper
30e009fc3a MFhead@r344270 2019-02-19 03:46:32 +00:00
Conrad Meyer
a335df48bd Fixup bsd.prog.mk after r344182
Reported by:	tinderbox
Sponsored by:	Dell EMC Isilon
2019-02-15 23:41:54 +00:00
Ed Maste
447b492eb8 Use make's :tl instead of checking "no" and "NO"
Suggested by:	kevans
Reviewed by:	kevans
2019-02-15 22:48:50 +00:00
Ed Maste
8094f70b77 Fix Makefile conditional after r344179 2019-02-15 22:30:09 +00:00
Ed Maste
b3a27c81f3 Regen src.conf.5 after r344179 2019-02-15 22:28:34 +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
Enji Cooper
f3c5273d31 Merge build glue for libraries and tests done on github
I need to doublecheck my work vs the port, but I believe that this covers the
initial integration of all upstream tests.

Ref: https://github.com/ngie-eign/freebsd/tree/googletest-integration
2019-02-13 04:58:15 +00:00
Enji Cooper
0b0c50e1ad Add rc.resume(8) alias for rc(8) to fix the manpage cross references
This issue was noticed when running `make manlint` as part of MFCing r342597 to
^/stable/11:
```
$ make -C share/man/man8 rc.8lint
mandoc -Tascii -Tlint rc.8
mandoc: rc.8:548:6: STYLE: referenced manual not found: Xr rc.resume 8
$
```

This is a followup commit to r339818.

Reviewed by:	eugen
Approved by:	jtl (mentor)
MFC after:	1 week
MFC to:		^/stable/12
Differential Revision: https://reviews.freebsd.org/D19158
2019-02-12 23:33:16 +00:00
Poul-Henning Kamp
50619ae7d5 Point people to SMP(4) for CPU<->domain mapping. 2019-02-12 21:06:07 +00:00
Edward Tomasz Napierala
240d69b9b4 Fix markup - use .Pa for the directory component, not .Fa.
Reported by:	0mp
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2019-02-12 13:01:55 +00:00
Ben Widawsky
2d8cb2f494 termcap: Add an entry for kitty
The project is here:
https://github.com/kovidgoyal/kitty/

I created a port (which now needs updating):
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233010

If only we could use terminfo :(

MFC after:      5 days
Approved by:    bapt
Differential Revision:	https://reviews.freebsd.org/D19060
2019-02-12 05:15:36 +00:00
Edward Tomasz Napierala
22427daf7e Add explanation of branches to the ports(7) man page.
Reviewed by:	matthew@, freebsd@mhka.no
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D19146
2019-02-11 20:46:32 +00:00
Johannes Lundberg
5515886768 Add myself to committers-src.dot and calendar.freebsd
Reviewed by:	imp (mentor)
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D19101
2019-02-09 16:53:39 +00:00
Justin Hibbits
63d33e48d6 Correct the CPU target for powerpcspe
The MPC8540 is actually e500v1, which doesn't have double-precision floating
point support.  The 8548 does, so use that as the CPU target.

MFC after:	2 weeks
2019-02-09 02:04:27 +00:00
Kai Knoblich
78aa2590c1 Add myself to committers-ports.dot and calendar.freebsd
Reviewed by:	miwi (mentor)
Approved by:	miwi (mentor)
Differential Revision:	https://reviews.freebsd.org/D19119
2019-02-08 17:57:39 +00:00
Sergey Kandaurov
1f0a97618b Add macOS 10.14. 2019-02-08 11:49:59 +00:00
Gleb Smirnoff
938864b71b Allow some nesting of ng_iface(4) interfaces and add a configuration knob.
PR:		235500
MFC after:	1 week
2019-02-08 06:19:28 +00:00
Enji Cooper
04d6e324fc Clean up all directories created by make hier
The logic I introduced in r322511 unfortunately left chflags schg'ed
directories behind created by `make hier` (in the stock /etc/mtree
files, this is limited to /var/empty).

The proposed change calls `chflags -R 0` and `rm -Rf ...` to clean all
of the directories that could not be removed by `${MAKE} clean`.
`${MAKE} clean` in bsd.obj.mk calls `cleandir`/`cleanobj`, which handles
the first directory tree walk/removal.

Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D18641
2019-02-06 21:24:44 +00:00
Ed Maste
26fcd29066 Retire CTM option after r342126 2019-02-06 16:30:08 +00:00
Yuri Pankov
6ef91a2136 pwm.9: fix markup in interfaces description
Reviewed by:	manu
Differential revision:	https://reviews.freebsd.org/D18830
2019-02-06 03:57:51 +00:00
Warner Losh
d3f1313287 Remove All Rights Reserved
Remove the all rights reserved clause from my copyright, and make
other minor tweaks needed where that might have created ambiguity.
2019-02-05 21:37:34 +00:00
Warner Losh
8590b14e9d Remove a few stray "All Rights Reserved." declarations on stuff I've
written.
2019-02-05 21:28:29 +00:00
Warner Losh
52467047aa Regularize the Netflix copyright
Use recent best practices for Copyright form at the top of
the license:
1. Remove all the All Rights Reserved clauses on our stuff. Where we
   piggybacked others, use a separate line to make things clear.
2. Use "Netflix, Inc." everywhere.
3. Use a single line for the copyright for grep friendliness.
4. Use date ranges in all places for our stuff.

Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files)
2019-02-04 21:28:25 +00:00
Gleb Smirnoff
b252313f0b New pfil(9) KPI together with newborn pfil API and control utility.
The KPI have been reviewed and cleansed of features that were planned
back 20 years ago and never implemented.  The pfil(9) internals have
been made opaque to protocols with only returned types and function
declarations exposed. The KPI is made more strict, but at the same time
more extensible, as kernel uses same command structures that userland
ioctl uses.

In nutshell [KA]PI is about declaring filtering points, declaring
filters and linking and unlinking them together.

New [KA]PI makes it possible to reconfigure pfil(9) configuration:
change order of hooks, rehook filter from one filtering point to a
different one, disconnect a hook on output leaving it on input only,
prepend/append a filter to existing list of filters.

Now it possible for a single packet filter to provide multiple rulesets
that may be linked to different points. Think of per-interface ACLs in
Cisco or Juniper. None of existing packet filters yet support that,
however limited usage is already possible, e.g. default ruleset can
be moved to single interface, as soon as interface would pride their
filtering points.

Another future feature is possiblity to create pfil heads, that provide
not an mbuf pointer but just a memory pointer with length. That would
allow filtering at very early stages of a packet lifecycle, e.g. when
packet has just been received by a NIC and no mbuf was yet allocated.

Differential Revision:	https://reviews.freebsd.org/D18951
2019-01-31 23:01:03 +00:00
Konstantin Belousov
c75f49f7d8 Make iflib a loadable module.
iflib is already a module, but it is unconditionally compiled into the
kernel.  There are drivers which do not need iflib(4), and there are
situations where somebody might not want iflib in kernel because of
using the corresponding driver as module.

Reviewed by:	marius
Discussed with:	erj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D19041
2019-01-31 19:05:56 +00:00
Ed Maste
1f7d148368 regen src.conf.5 after r343606 2019-01-31 15:50:11 +00:00
Ed Maste
ca5efb62ee Enable lld as the system linker by default on i386
The migration to LLVM's lld linker has been in progress for quite some
time - I opened an LLVM tracking bug (23214) in April 2015 to track
issues using lld as FreeBSD's linker, and requested the first exp-run
using lld as /usr/bin/ld in November 2016.

In 12.0 LLD is the system linker on amd64, arm64, and armv7.  i386 was
not switched initially as there were additional ports failures not found
on amd64.  Those have largely been addressed now, although there are a
small number of issues that are still being worked on.  In some of these
cases having lld as the system linker makes it easier for developers and
third parties to investigate failures.

Thanks to antoine@ for handling the exp-runs and to everyone in the
FreeBSD and LLVM communites who have fixed issues with lld to get us to
this point.

PR:		214864
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2019-01-31 15:07:32 +00:00
Ravi Pokala
475a76e3ce Remove unecessary "All rights reserved" from files under my or Panasas's
copyright.

When all member nations of the Buenos Aires Convention adopted the Berne
Convention, the phrase "All rights reserved" became unnecessary to assert
copyright. Remove it from files under my or Panasas's copyright. The files
related to jedec_dimm(4) also bear avg@'s copyright; he has approved this
change.

Approved by:	avg
Sponsored by:	Panasas
2019-01-30 16:55:00 +00:00
Baptiste Daroussin
93b904b310 Update pci_vendors to 2019.01.29
MFC after:	2 days
2019-01-29 08:07:14 +00:00
Andriy Voskoboinyk
6bda1ad8a2 rtwn_usb(4): add new USB id.
Submitted by:	<yklaxds@gmail.com>
Github issue:	https://github.com/s3erios/rtwn/issues/4
MFC after:	5 days
2019-01-28 02:15:41 +00:00
Andriy Voskoboinyk
c188c336f3 wlan.4: improve wording
PR:		218075
Submitted by:	Aaron Taylor <halfnote1004@gmail.com>
MFC after:	5 days
2019-01-27 15:10:20 +00:00
Andriy Voskoboinyk
daeb432a7a otus(4): fix a typo in man page (802.11 -> 802.11n)
MFC after:	3 days
2019-01-26 14:14:25 +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
Edward Tomasz Napierala
d81ca439e7 Make sh(1) support \u in PS1. This removes one fork/exec on interactive
shell startup.

Reviewed by:	0mp (man page), jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18790
2019-01-24 11:59:46 +00:00
Brooks Davis
dab0311030 Remove documentation for the nonexistant cred_update_thread(9).
This was a tangential change submitted as part of D18930.

Submitted by:	jack@gandi.net
2019-01-23 23:25:42 +00:00
Edward Tomasz Napierala
ed1cfd30ce Don't mess with BLOCKSIZE in shell startup files - it's set by login.conf(5);
there's no need to even mention it in shell rc files.  Not that it's wrong;
just pointless and somewhat misleading.

Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18809
2019-01-20 22:08:49 +00:00
Simon J. Gerraty
fe868b9bd2 Fix STAGE_DIR.* to handle indirect *DIR variables.
bsd.{files,conf}.mk recently changed to allow *DIR to name a variable
rather than a path.
STAGE_DIR.* need to adapt.

Reviewed by:	bdrewery
Differential Revision:	D18847
2019-01-15 23:37:49 +00:00
Simon J. Gerraty
fee919421d Use .undef per variable
Attempting to expand a variable to a list of vars to .undef
does not actually work.

Reviewed by:	bdrewery
Differential Revision:	D17251
2019-01-15 23:35:53 +00:00
Gleb Smirnoff
25e6655a1f Remove pbuf(9) manual page that is now nearly 100% outdated. 2019-01-15 01:19:29 +00:00
Allan Jude
707347f886 Add missing documentation for dev.acpi_ibm.0.mic_led added in r335304
PR:		229074
X-MFC-With:	335304
Submitted by:	Ali Abdallah <aliovx@gmail.com>
2019-01-12 17:52:52 +00:00
Warner Losh
fc6eed429e Add man page for device_delete_children.
Submitted by: Jeroen Ruigrok van der Werven
Differential Revision: https://reviews.freebsd.org/D18452
2019-01-11 19:05:40 +00:00
Enji Cooper
8304f1265f Update my committer name and add my new mentor relationship
## Regarding the name change

A few years ago I changed my legal name to "Enji Cooper". When I rejoined the
project, I requested that accounts@ use my legal name instead of my [previous]
nickname. This change syncs up a reference to use the proper name for clarity.

## Regarding the new mentor relationship

@emaste and @jtl graciously accepted my request to mentor me this time around
with my src commits while I get up to speed.

I am leaving my previous mentorship details in committers-src.dot for historical
reasons, per @emaste's request.

-- Thank you very much @jmmv and @rpaulo for the help with my previous
   mentorship; I really appreciate it!

Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D18644
2019-01-10 17:27:47 +00:00
Vincenzo Maffione
e1344f3c32 netmap: fix bridge example in netmap(4)
PR:	https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194872
Reported by:	adrian
MFC after:	3 days
2019-01-09 15:03:54 +00:00
Vincenzo Maffione
e4ae22e669 netmap: fix sysctl variable in vale(4)
PR:	https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212333
MFC after:	3 days
2019-01-09 14:54:24 +00:00
Edward Tomasz Napierala
4cea05a273 Make sh(1) recognize the default $HOME. By default /home
is a symlink; without this change, when you log in, sh(1)
won't realize the current directory (eg '/usr/home/test')
is the same as $HOME ('/home/test').

Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18775
2019-01-09 11:04:27 +00:00
Mark Johnston
9cf6837897 Add termcap entries for TI Silent 703/707 terminals.
PR:		234716
Submitted by:	Robert Clausecker <fuz@fuz.su>
MFC after:	1 week
2019-01-08 17:08:10 +00:00
Mateusz Piotrowski
af1f5e647a ports.7: Do not mention deprecated WITH_SSP_PORTS and WITH_GHOSTSCRIPT_VER
As mentioned in this special status report[1] from EuroBSDCon 2013,
WITH_SSP_PORTS was relevant in the FreeBSD 9 and FreeBSD 10 days.
Nowadays, -fstack-protector is set by default. Relevant knobs and variables
are documented in ports/Mk/bsd.port.mk.

WITH_GHOSTSCRIPT_VER was part of USE_GHOSTSCRIPT, which is deprecated.

[1]: https://www.freebsd.org/news/status/report-2013-09-devsummit.html#Ports-and-Packages

Reviewed by:	bcr, mat, tobik
Approved by:	bcr (doc)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D18056
2019-01-08 09:41:52 +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
Edward Tomasz Napierala
488174ba70 Give sh(1) a proper default prompt instead of just "$".
Reviewed by:	jilles
MFC after:	2 weeks
Relnotes:	totally
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18697
2019-01-06 16:23:28 +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
Kyle Evans
ac102a2a63 rc.subr: Provide rc_service variable for service scripts
Some rc scripts in ports (e.g. uwsgi, apache, openvpn) allow for
'application profiles' that usually require the rc script to be invoked
again for each active profile. Because there's no consistent way to
determine the path because it differs between manual/service(8) invocations
and /etc/rc invocations, this leads to patterns like these:

- www/uwsgi hardcodes the script path
- security/openvpn guesses either $_file or $0 based on $0 = /etc/rc

Instead of forcing rc scripts to guess, provide an rc_service variable to
the scripts that gets set appropriately both for direct execution or when a
script is being executed via run_rc_script (e.g. /etc/rc).

This is our analog of an OpenRC variable with the same name, different case
(RC_SERVICE).

PR:		234614
Reported by:	koobs
Reviewed by:	dteske, jilles
MFC after:	3 days
2019-01-05 21:23:25 +00:00
Kristof Provost
e65e209520 pf: Remove references to pflow from the pf.conf man page
pflow no longer exists. It was removed as part of a pf update back in 2012
(r240233).

PR:		223957
MFC after:	1 week
2019-01-05 05:50:16 +00:00
Conrad Meyer
6b83069e05 Expose threads-per-core and physical core count information
With new sysctls (to the best of our ability do detect them).  Restructured
smp.4 slightly for clarity (keep relevant stuff closer to the top) while
documenting.

Reviewed by:	markj, jhibbits (ppc parts)
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D18322
2019-01-04 18:31:17 +00:00
Andriy Voskoboinyk
d42e525cbc rtwnfw(4): refresh this manpage too (add rtwn-rtl8188eefw module).
MFC after:	3 days
2019-01-03 03:27:37 +00:00
Andriy Voskoboinyk
b2facf8191 rtwn(4): refresh manpages.
- Add 'device rtwn' to rtwn_pci(4) and rtwn_usb(4) config sample;
kernel will not compile otherwise.
- Refresh devices list in rtwn_usb(4); add 'chipset' column.
- Bump Dd after this commit and r342682.

MFC after:	4 days
2019-01-02 18:30:22 +00:00
Mark Johnston
a51c7dc5fe Typo.
Reported by:	Christian Barthel
MFC after:	3 days
2019-01-02 16:01:54 +00:00
Andriy Voskoboinyk
b3f3786e5d rtwn_pci(4): add support for RTL8188EE chipset.
Initially based on https://reviews.freebsd.org/D15692;
later deduplicated and improved a bit (Tx reports, IQ calibration support).

Submitted by:	Farhan Khan <khanzf@gmail.com>
MFC after:	4 days
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D15692
2019-01-02 06:48:53 +00:00
Edward Tomasz Napierala
72e7eb2c64 Add current working directory to the default (although commented out) sh(1)
prompt, so it looks just like the tcsh(1) one when you uncomment it.

Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18673
2018-12-31 10:17:42 +00:00
Xin LI
55d621a104 Fix various issues with Chinese locales:
- Change short weekday names to use only one Chinese character.
   (note: this is a somewhat misunfortunate compromise due to the fact
   that some applications are using short buffer for weekday names,
   and in ~1905 when 星期 system was created to replace the traditional
   七曜 system, which can use 日月火水木金土 to represent Sunday through
   Saturday with just one character without any confusion).
 - for zh_CN locales: use Arabic numerals for month names, matching the
   practice of all other CJK locales
 - Regenerate zh_CN.{GB2312,GBK} locales from zh_CN.UTF-8.

Reported by:	ygy
Reviewed by:	kevlo
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D18689
2018-12-30 23:04:02 +00:00
Pedro F. Giffuni
9d35d9a12a ext2fs.5: Update the manpage.
General update of the driver description and mention some important credits.
Add a symlink for ext4fs as it is of special interest nowadays.

Fic some `mandoc -Tlint` issues while here.

MFC after:	15 days
Differential Revision:	https://reviews.freebsd.org/D18445
2018-12-30 19:44:50 +00:00
Mateusz Piotrowski
154b4d392c ports.7: Add an example of getting dependencies without building them
While here, improve formatting of the EXAMPLES section in general.

Reviewed by:	bcr
Approved by:	bcr (doc)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D18682
2018-12-30 00:27:28 +00:00
Mateusz Piotrowski
e84f645584 style.mdoc.5: Suggest preferred formatting for EXAMPLES
Add an example of how to format examples in EXAMPLES sections. The
suggested format is heavily based on zfs.8.

While here, capitalize subsection titles.

Reviewed by:	bcr
Approved by:	bcr (doc),
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D18681
2018-12-29 23:00:20 +00:00
Enji Cooper
735f0ef041 Remove legacy rc.d infrastructure references from rc(8)
Legacy rc.d scripts (.sh extension) have not been supported since
r193118. Remove the outdated references to the legacy format, as they
are no longer valid.

Bug:	193936
MFC after:	1 week
Reviewed by:	cress, emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D18666
2018-12-29 20:02:20 +00:00
Mateusz Piotrowski
13bf4d9e88 Add a style.mdoc(5) manual page.
The aim of this manual page is to act as a style and formatting guide for
mdoc(7) manual pages. Currently, mdoc(7) does not provide much guidance
when it comes to the usage of macros making it difficult to format manual
pages in a consistent way.

Reviewed by:	bcr
Approved by:	bcr (doc), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D18394
2018-12-28 19:49:58 +00:00
Edward Tomasz Napierala
f6d3cd4b9e Simplify the way we set the default sh(1) PS1. No functional changes.
Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18662
2018-12-28 17:50:40 +00:00
Ed Maste
9fbbfa5d7f vnet.9: clarify VNET sponsorship
The FreeBSD Foundation and NLnet Foundation sponsored the original work,
and the Foundation sponsored followon work and integration efforts by
bz@.

Sponsored by:	The FreeBSD Foundation
2018-12-27 16:50:28 +00:00
Maxim Konovalov
d71831dbbb DragonFly 5.4.0, 5.4.1 and FreeBSD 12.0 releases added. 2018-12-24 16:36:39 +00:00
Chris Rees
261e62db4c Clarify kld_list format
PR:		docs/234248
Submitted by:	David Fiander
Submitted by:	Miroslav Lachman
2018-12-24 10:47:48 +00:00
Eugene Grosbein
8ebaf58450 ifconfig.4, lagg.4: fix documentation bug: -use_flowid needs to be used
to force local hash computation and disable usage of RSS hash
provided by driver.

PR:		234242
MFC after:	1 week
2018-12-22 11:38:54 +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
Mateusz Guzik
405c3050f1 Remove iBCS2, part1: userspace
iBCS2 was disconnected from the build in 2015 (see r291419)

bsdconfig parts submitted by dteske.

Reviewed by:	kib (previous version)
Sponsored by:	The FreeBSD Foundation
2018-12-19 21:56:54 +00:00
Mateusz Guzik
1ea91370ae Update priv(9) after r341827
Reported by:	trasz
Sponsored by:	The FreeBSD Foundation
2018-12-19 20:25:58 +00:00
Andriy Gapon
d4ee942054 cyapa.4, isl.4: cross-reference and document use of chromebook_platform(4)
PR:		218632
Reported by:	Denis Kozadaev <denis@tambov.ru>
MFC after:	1 week
2018-12-18 21:43:33 +00:00
Maxim Sobolev
b7841ae650 Allow ng_nat to be attached to a ethernet interface directly via ng_ether(4)
or the likes. Add new control message types: setdlt and getdlt to switch
from default DLT_RAW (no encapsulation) to DLT_EN10MB (ethernet).

Approved by:	glebius
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D18535
2018-12-17 16:00:35 +00:00
Cy Schubert
0060ae1876 Add a missing leading / in a filename.
MFC after:	3 days
2018-12-16 04:06:53 +00:00
Konstantin Belousov
6b5007c893 Document new required MI behaviour of pmap_enter(9) for CoW.
Reviewed by:	markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D18568
2018-12-16 01:51:38 +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
Conrad Meyer
26649bb5e8 efirt: When present, attempt to use EFI runtime services to shutdown
PR:		maybe related to 233998 (inconclusive at this time)
Submitted by:	byuu <byuu AT tutanota.com> (previous version)
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D18506
2018-12-15 05:46:04 +00:00
Eugene Grosbein
bc044625ed ng_bpf.4: fix EXAMPLES: do not activate promiscuous mode
PR:		102719
MFC after:	3 days
2018-12-14 09:24:14 +00:00
Emmanuel Vadot
9312900f6d Add a pwm subsystem so we can configure pwm controller from kernel and userland.
The pwm subsystem consist of API for PWM controllers, pwmbus to register them
and a pwm(8) utility to talk to them from userland.

Reviewed by:	oshgobo (capsicum), bcr (manpage), 0mp (manpage)
Differential Revision:	https://reviews.freebsd.org/D17938
2018-12-12 20:56:56 +00:00
Vincenzo Maffione
76ed4255b5 netmap: add man page for ptnet
Add a man page for ptnet(4), describing the guest driver for netmap passthrough.

Reviewed by:	bcr
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D18518
2018-12-12 17:05:47 +00:00
Dimitry Andric
893405b45f Merge ^/head r341764 through r341812. 2018-12-11 06:47:04 +00:00
Dimitry Andric
12401698f6 For arm and armv6, only enable LLVM target support for arm by default,
to shrink libllvm.a.

This is a workaround for "relocation truncated to fit" errors with BFD
ld 2.17.50 on arm and armv6, when linking executables against it.

The required range extensions are not yet supported by this very old
version of BFD ld.  When arm and armv6 userland can be successfully
linked by lld, this workaround can be removed.
2018-12-11 06:45:53 +00:00
David Bright
735bd25d31 Add uk.macbook.kbd keymap (vt)
PR:		215185
Submitted by:	James Wright <james.wright@jigsawdezign.com>
Reported by:	James Wright <james.wright@jigsawdezign.com>
Reviewed by:	emaste (earlier version)
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D18395
2018-12-11 02:14:40 +00:00
Dimitry Andric
67350cb56a Merge ^/head r340918 through r341763. 2018-12-09 11:39:45 +00:00
Maxim Sobolev
470b28812f Hook up ng_checksum(4) module and appropriate manpage to the build. The module
was added back in 2016, but has never been connected.

MFC after:	1 week
2018-12-09 02:58:53 +00:00
Warner Losh
80c8ffad94 Add nda(4) cross reference to nvme(4) 2018-12-07 21:57:39 +00:00
Warner Losh
228c425533 Dynamically load .so modules to expand functionality
o Dynamically load all the .so files found in /libexec/nvmecontrol and
  /usr/local/libexec/nvmecontrol.
o Link nvmecontrol -rdynamic so that its symbols are visible to the
  libraries we load.
o Create concatinated linker sets that we dynamically expand.
o Add the linked-in top and logpage linker sets to the mirrors for them
  and add those sets to the mirrors when we load a new .so.
o Add some macros to help hide the names of the linker sets.
o Update the man page.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18455

fold
2018-12-06 22:58:26 +00:00
Ed Maste
407345752d hier.7: add /lib/casper directory
Reported by:	imp
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-12-06 21:27:36 +00:00
Joel Dahl
788cf7253a Minor mandoc fixes. 2018-12-06 20:04:01 +00:00
Joel Dahl
eb687a6e70 Sort .Xr 2018-12-06 19:49:08 +00:00
Kristof Provost
4fc65bcbe3 pfsync: Performance improvement
pfsync code is called for every new state, state update and state
deletion in pf. While pf itself can operate on multiple states at the
same time (on different cores, assuming the states hash to a different
hashrow), pfsync only had a single lock.
This greatly reduced throughput on multicore systems.

Address this by splitting the pfsync queues into buckets, based on the
state id. This ensures that updates for a given connection always end up
in the same bucket, which allows pfsync to still collapse multiple
updates into one, while allowing multiple cores to proceed at the same
time.

The number of buckets is tunable, but defaults to 2 x number of cpus.
Benchmarking has shown improvement, depending on hardware and setup, from ~30%
to ~100%.

MFC after:	1 week
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D18373
2018-12-06 19:27:15 +00:00
Maxim Sobolev
617095d9de Apparently @portmgr does not feel like my current level of contribution
warrants me a repo access to the ports tree anymore. Move myself into alumni
at least for a time being.
2018-12-06 18:12:50 +00:00
Edward Tomasz Napierala
a3c733b261 Add examples for "make buildenv".
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-12-06 13:52:02 +00:00
Yuri Pankov
4e04e8bd78 termcap: add italics and tmux entries
- add "ecma+italics" cap
- use it in "xterm-basic"
- add "tmux"/"tmux-256color" caps, fixing "so" and "se" caps,
  and sourcing "ecma+italics" and "screen"/"screen-256color"

Reviewed by:	bapt
Differential revision:	https://reviews.freebsd.org/D18363
2018-12-06 13:46:18 +00:00
Mark Johnston
5e97950ded ixl(4) has netdump support via iflib.
Reported by:	kbowling
MFC after:	3 days
2018-12-05 18:19:29 +00:00
Mark Johnston
fd6c1171d2 Netdump support was added to mlx4en(4) in r341548.
MFC with:	r341548
2018-12-05 16:55:45 +00:00
Pedro F. Giffuni
ab8998c257 ext2fs.4: basic updates.
Starting with FreeBSD 12 we fully support writing ext4 filesystems.
Mention some features that we don't support while here.

MFC after:	3 days
2018-12-04 22:51:13 +00:00
Vincenzo Maffione
668e070f0b netmap(4): improve man page
Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D18057
2018-12-03 17:17:59 +00:00
Edward Tomasz Napierala
ecc0f5f63b Use less misleading directory name.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-12-03 13:15:54 +00:00
Andrew Turner
f74c331a51 Disable the BSD CRT code on powerpc and sparc64, they need extra crt*.o
files that haven't been implemented.

Reported by:	sbruno
MFC with:	r339738
Sponsored by:	DARPA, AFRL
2018-12-03 09:40:37 +00:00
Edward Tomasz Napierala
5167a1a737 Silence down the example builds a bit.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 16:02:27 +00:00
Edward Tomasz Napierala
f1d1d6f66e Add an example of quick kernel rebuild.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 16:01:43 +00:00
Edward Tomasz Napierala
873a1193b7 Add an example of rebuilding a single piece of userspace.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 15:56:14 +00:00
Edward Tomasz Napierala
7f92f23316 Revert r341337; according to imp@ we still support these.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 15:52:03 +00:00
Edward Tomasz Napierala
fd2f7a7f90 Use .Va for sysctls, not .Dv.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 12:17:35 +00:00