Commit Graph

17919 Commits

Author SHA1 Message Date
Yuri Pankov
8d56c80545 Provide basic descriptions for VMX exit reason (from "Intel 64 and IA-32
Architectures Software Developer’s Manual Volume 3").  Add the document
to SEE ALSO in bhyve.8 (and pet manlint here a bit).

Reviewed by:	jhb, rgrimes, 0mp
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17531
2018-10-27 21:24:28 +00:00
Eugene Grosbein
b25a469f94 rcorder(8): add support for /etc/rc.resume, so it calls "rcorder -k resume"
and runs scripts containing "KEYWORD: resume" with single "resume" argument.

Working example is the port sysutils/cpupdate that defines
extra_commands="resume" to reload CPU microcode cleared
by suspend/resume sequence.

This change does nothing for a system having no scripts with KEYWORD: resume.

MFC after:		1 month
Differential Revision:	https://reviews.freebsd.org/D15247
2018-10-27 17:21:13 +00:00
Navdeep Parhar
9edef078cc cxgbetool(8): Add a subaction (tcbrss <n>) that can be used with "pass"
action to distribute traffic using the half of the VI's RSS indirection
table.

The value specified should either be the start of the VI's RSS slice
(available at dev.<ifname>.<inst>.rss_base since r339700) or the
midpoint (rss_base + rss_size/2).  The traffic that hits the filter will
use the first or second half of the indirection table respectively.
The indirection table can be populated in different ways to achieve
different kinds of traffic/load distributions.  For example, r339749
allows a netmap interface to have half the rx queues in the first half
of the table and the rest in the other.

Sponsored by:	Chelsio Communications
2018-10-27 05:26:09 +00:00
Warner Losh
92f9212ba6 Fix pointer arithmetic botch.
Pointer subtraction to find size only works with char pointers.

Noticed by: jhb@
Sponsored by: Netflix, Inc
2018-10-26 23:44:39 +00:00
Warner Losh
46fabdaffc Require that we have at least a device path header before
trying to decode the next device path.

Sponsored by: Netflix, Inc
2018-10-26 22:49:25 +00:00
Warner Losh
e08bb1091c Implenent --fromfile to read variable values when printing variables
So

./efivar --fromfile Boot0001.bin --print --load-option

will take the value from Boot0001.bin file and then decode it as if it
were a load-option. This is useful for debugging handling of such
variables that may be hanging the boot for some people.

Sponsored by: Netflix, Inc
2018-10-26 22:13:40 +00:00
Devin Teske
bb22479803 Add blank line after each item in "ngctl ls -l"
The output of "ngctl ls -l" is hard to read. To make it easier, add a blank
line after each listed item much how traditional "ls -l" does when listing
the contents of multiple directories.

Sponsored by:	Smule, Inc.
2018-10-26 19:16:17 +00:00
Devin Teske
ee21b0efc8 Adjust bsdinstall zfsboot code to 80-columns and whitespace fixes
No functional changes.

Sponsored by:	Smule, Inc.
2018-10-26 05:25:22 +00:00
Devin Teske
f0c98fded6 Fix dialog autosizing in bsdinstall auto error messages
Sponsored by:	Smule, Inc.
2018-10-26 02:08:44 +00:00
Devin Teske
224df38669 Whitespace alignment in bsdinstall hostname
Aligning line-continuation characters to prevent mistakes.
This is also the prevalent style replication throughout.

Sponsored by:	Smule, Inc.
2018-10-26 01:57:32 +00:00
Devin Teske
be99b53818 Sort i18n strings in bsdinstall hostname
Sponsored by:	Smule, Inc.
2018-10-26 01:47:52 +00:00
Devin Teske
6fd587f9f9 Add improved error checking to bsdinstall hostname
Sponsored by:	Smule, Inc.
2018-10-26 01:06:03 +00:00
Devin Teske
05b1c42540 Fix dialog autosizing in bsdinstall hostname
Sponsored by:	Smule, Inc.
2018-10-26 00:08:27 +00:00
Devin Teske
fef4815e9a Remove vestigial DIALOG_ITEM_HELP value in bsdconfig dialog.subr
Sponsored by:	Smule, Inc.
2018-10-25 23:32:32 +00:00
Mark Johnston
2b2135b8b5 Minor style fixes around script execution.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-10-25 21:45:24 +00:00
Mark Johnston
af19302315 Clarify the description of the -u option.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-10-25 21:41:58 +00:00
Xin LI
afa89716f9 Now that the portsnap buildbox is generating the raw bits for INDEX-13,
add it to the set of INDEX files built by portsnap.

Switch to INDEX-13 for head/.
2018-10-25 08:05:53 +00:00
Warner Losh
61ac1e28cc add links to the saga of CTM
Submitted by: phk
2018-10-24 19:21:04 +00:00
Mark Johnston
04c07c31eb Always free dynamically allocated memory before returning.
CID:		1007418
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-10-24 16:46:26 +00:00
Bjoern A. Zeeb
8883128b8e Allow the bhyve VNC server to listen on IPv6 for incoming connections.
Alternatively to IPv4 address:port this will allow to listen on IPv6
link-local (incl. scope), a specific address, or ::.  Addresses have
to be given in RFC2732 format so that [::]:port parsing will work.

This patch also starts to introduce WITH_INET/INET6_SUPPORT to bhyve.

PR:			232018
Submitted by:		Dave Rush (northwoodlogic.free gmail.com) (original)
Reviewed by:		Dave Rush (updated verison)
MFC after:		3 days
2018-10-24 08:45:33 +00:00
Bjoern A. Zeeb
fb72b618c5 In bhyve's fbuf emulation improve the overall "usage" message and
for the vga option, rather than printing the entire option string,
only print vga (as we do for everything else).

MFC after:	3 days
2018-10-22 11:43:43 +00:00
Warner Losh
c1cdf6a42f Remove mse(4) from tree
Remove mse and all support for bus and inport devices from the tree.
Data from nycbug's dmesg database shows the last sighting of this
driver was in 4.10 on only one machine.

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D17628
2018-10-22 02:34:10 +00:00
Yuri Pankov
ea7fdebe80 pw: fix the checks in boolean_str() after r326738. Add related test
cases for `pw useradd -D -w`.

PR:		231649
Reviewed by:	eugen
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17299
2018-10-21 14:23:56 +00:00
Ed Maste
8e1887fa1a pwd_mkdb: retire -B and -L endianness options
Legacy v3 db support was retired in r333133, and it was v3 support that
required the -B and -L options.  The options were retained temporarily,
but now that stable/12 has branched they can be removed.

Sponsored by:	The FreeBSD Foundation
2018-10-21 00:48:38 +00:00
Mark Johnston
618703b57b Fix a dead store.
We would fail to clear DNS search list configuration if a router
stopped specifying the DNSSL RA option.  I suspect that the bug
was mostly harmless, as the RDNSS and DNSSL options are typically used
together and omitting the RDNSS option would have the same effect.

CID:		1006219
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-10-20 18:00:13 +00:00
Mark Johnston
d2f6957c1c Remove dead code.
No functional change intended.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-10-20 17:44:23 +00:00
Mark Johnston
3d7dd2d69a Staticize a couple of functions.
No functional change intended.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-10-20 17:43:27 +00:00
Mark Johnston
1a97dd3cc3 Remove some obsolete compatibility code.
No functional change intended.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-10-20 17:40:30 +00:00
Benedict Reuschling
6aca7aa44b A single comma was missing to separate the "see also" items in
last.1 and lastlogin.8. Add it back.

PR:		231187
Submitted by:	david.marec@davenulle.org
2018-10-20 17:22:04 +00:00
Tobias Kortkamp
b287b40c49 vidcontrol(1): Fix a typo in the description of -f
While here:
- Fix markup in -c
- Fix mandoc -Tlint and igor warnings

Reviewed by:	0mp, bjk
Approved by:	bjk
Differential Revision:	https://reviews.freebsd.org/D17428
2018-10-20 16:59:43 +00:00
Dag-Erling Smørgrav
d0d49703a5 Add support for DNS-over-TLS to the local_unbound service.
Approved by:	re (kib)
2018-10-18 15:35:13 +00:00
Jamie Gritton
4520f617c9 Fix typos from r339409.
Reported by:	maxim
Approved by:	re (gjb)
2018-10-18 15:02:57 +00:00
Jamie Gritton
b19d66fd5a Add a new jail permission, allow.read_msgbuf. When true, jailed processes
can see the dmesg buffer (this is the current behavior).  When false (the
new default), dmesg will be unavailable to jailed users, whether root or
not.

The security.bsd.unprivileged_read_msgbuf sysctl still works as before,
controlling system-wide whether non-root users can see the buffer.

PR:		211580
Submitted by:	bz
Approved by:	re@ (kib@)
MFC after:	3 days
2018-10-17 16:11:43 +00:00
Yuri Pankov
4835c3b1df pw: (file == NULL) check is always false in read_userconfig(), remove
it.  Drop the now unused _PATH_PW_CONF definition. [1]

While here, change the last remaining hardcoded "/etc" to _PATH_PWD.

Noted by:	glebius [1]
Reviewed by:	eugen
Approved by:	re (gjb), kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17575
2018-10-16 16:00:41 +00:00
Yuri Pankov
03da20c5fa pw: respect path specified using -V when writing pw.conf, and -C is not
explicitly specified.  -V path is already used to determine which file
to read default values from, so it's only logical to write them to the
same file.

PR:		231653
Reviewed by:	eugen, bapt
Approved by:	re (gjb), kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17566
2018-10-15 20:11:53 +00:00
Allan Jude
84cf7c1df7 Make mfiutil show progress print out the elapsed time estimate in a
more humanized way

PR:		225993
Submitted by:	Enji Cooper <yaneurabeya@gmail.com>
Reviewed by:	jhb (previous version)
Approved by:	re (rgrimes)
2018-10-13 02:21:23 +00:00
Dag-Erling Smørgrav
0ff59c3e99 Improved substitution logic for Unbound man pages.
Approved by:	re (kib)
2018-10-10 08:20:14 +00:00
Glen Barber
1da7787f71 Merge the remainder of the projects/openssl111 branch to head.
- Update OpenSSL to version 1.1.1.
- Update Kerberos/Heimdal API for OpenSSL 1.1.1 compatibility.
- Bump __FreeBSD_version.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2018-10-09 21:28:26 +00:00
Jung-uk Kim
6f1f1a6395 Update ACPICA to 20181003.
Approved by:	re (gjb)
2018-10-09 18:40:36 +00:00
Ed Maste
539a27e105 Switch ntp's embedded libevent to 2.1.18
For OpenSSL 1.1.1 compatibility.

In Makefile.inc1 add (to the existing similar cases) a hack to handle
dependencies across the migration.

Reviewed by:	jhb
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation.
Differential Revision:	https://reviews.freebsd.org/D17481
2018-10-09 18:35:45 +00:00
Glen Barber
7c32835287 MFH r338661 through r339253.
Sponsored by:	The FreeBSD Foundation
2018-10-09 14:27:55 +00:00
Glen Barber
2ba8b5b375 Fix the distribution path for -ALPHA builds, which are under
the snapshots directory, not releases.

Reported by:	David Marec david.marec _at_ davenulle _dot_ org
Approved by:	re (rgrimes)
Sponsored by:	The FreeBSD Foundation
2018-10-08 19:48:58 +00:00
Glen Barber
846803208a Fix a mismerge from head to projects/openssl111.
r339213 was cherry-picked back to head from the project branch, which
caused a conflict.  This commit properly records the mergeinfo from
head.

r339205 was missed, and r339214 is required for reintegration.

Sponsored by:	The FreeBSD Foundation
2018-10-08 19:39:05 +00:00
John Baldwin
1bcac4ba99 Add support for relocations in RISC-V kernel modules to kldxref.
Reviewed by:	br, markj
Approved by:	re (gjb)
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D17415
2018-10-08 19:15:58 +00:00
Edward Tomasz Napierala
c0936c90d3 Remove BUGS section from nscd.conf(5) man page. This was missed in r339194.
Approved by:	re (rgrimes)
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-10-06 17:40:14 +00:00
Glen Barber
01d4e2149e MFH r338661 through r339200.
Sponsored by:	The FreeBSD Foundation
2018-10-05 17:53:47 +00:00
Edward Tomasz Napierala
19fa5a5066 Remove the BUGS section of nscd(8) man page. According to bushman@'s
reponse quoted in PR, he no longer maintains it.

PR:		210590
Approved by:	re (kib)
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-10-05 12:08:32 +00:00
Mateusz Piotrowski
ace6712810 bsdinstall(8): Fix a typo.
Reported by:	Jose Luis Duran
Reviewed by:	bcr
Approved by:	re (gjb), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D17409
2018-10-05 08:17:29 +00:00
Mateusz Piotrowski
5475ce6290 bsdinstall(8): Document ZFS installation scripting.
- Extend the bsdinstall(8) man page with ZFS installation scripting
  details. [1]
- Extend the bsdinstall(8) man page with the description of all the ZFS
  variables involved in a scripted installation of ZFS-based systems. [1]
- Extend the SCRIPTING section with an example for a ZFS-based scripted
  installation. [1]
- Create a new section explaining how ZFS datasets must be written into
  a variable to get them set on the final system. [1]

While here:
- Add Roberto to the copyrights for recognition as changes to the manual
  page are huge.
- Use "Dq" for default values.
- Use sysrc(8) instead of echo in examples.

Submitted by:	Roberto Fernandez Cueto <roberfern@gmail.com> [1]
Reviewed by:	dteske
Approved by:	re (gjb), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D14169
2018-10-04 09:28:40 +00:00
Ruslan Bukin
e8e87febec Fix build with GCC 8.1.
GCC 8.1 failed to build LLVM's libc++ when -Wshadow is set,
so lower down WARNS flag to 3.

This is similar to dtc(1) which uses libc++ and sets WARNS to 3.

Approved by:	re (gjb)
Sponsored by:	DARPA, AFRL
2018-10-01 16:16:05 +00:00
Warner Losh
517a1827f7 Relax syntax requirements of source string
The original spec for the strings describing the PNP info didn't allow
spaces. Several times now people have broken the install by including
them. Relax the syntax to allow them after the ; which is where
people's muscle memory tends to put them.

Approved by: re@ (gjb)
2018-09-26 19:41:06 +00:00
Bryan Drewery
d51abd5fe1 Handle overflow of uid or gid in arguments for chown
chown incorrectly allows a uid or gid greater than UID_MAX/GID_MAX respectively.
Using such an argument rolls over to accounts such as root, operator, etc.

Approved by:	re (gjb)
Relnotes:	yes
Reviewed by:	cem, kib
Submitted by:	Don Morris <dgmorris@earthlink.net>
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D15119
2018-09-26 18:40:57 +00:00
Matt Macy
7362ac9ca9 restore pmccontrol -L behavior on x86
When I updated counter definition handling for x86 I broke
'pmccontrol -L' listing counter names. This just changes
pmccontrol to call the library function on x86.

PR:	230984
Approved by:	re (kib@)
2018-09-24 19:06:09 +00:00
Ed Maste
9f9d314d11 Switch ntp's embedded libevent to 2.1.18
For OpenSSL 1.1.1 compatibility.

Sponsored by:	The FreeBSD Foundation.
2018-09-24 17:51:56 +00:00
Navdeep Parhar
1e16837679 cxgbetool(8): The VLAN tag provided in the action for a filter must be prefixed
with either '=' or '+'.  Fix the description of the parameter in the man page
while here.

Approved by:	re@ (kib@)
Sponsored by:	Chelsio Communications
2018-09-21 23:48:40 +00:00
Dag-Erling Smørgrav
c3afb29bb6 Add an installer option to disable destructive dtrace.
Submitted by:		Jörg Pernfuß <code.jpe@gmail.com>
Approved by:		re (kib)
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D12474
2018-09-21 09:27:32 +00:00
Mark Johnston
33a5ef3587 Fix variable name typo in the bsdinstall ttys hardening code.
Submitted by:	Jörg Pernfuß <code.jpe@gmail.com>
Reviewed by:	allanjude, dab, emaste
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D12476
2018-09-20 16:37:50 +00:00
Brad Davis
80994f8119 Move hosts.lpd and printcap to usr.sbin/lpr/lpd/
This leverages CONFS to handle the install

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17238
2018-09-20 09:21:05 +00:00
Jung-uk Kim
6bd321e62b Make uefisign(8) buildable. 2018-09-19 07:10:28 +00:00
Jung-uk Kim
16e2656210 Make ppp(8) buildable. 2018-09-19 07:09:55 +00:00
Navdeep Parhar
93dcd0775f cxgbetool(8): Clarify the meaning of the "queue" parameter used to steer
traffic to a particular queue.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
Approved by:	re@ (kib@)
2018-09-18 22:41:30 +00:00
Brad Davis
af734c7746 Move amd.map to usr.sbin/amd/amd/
This leverages CONFS to handle the install of the config file.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17159
2018-09-18 00:32:10 +00:00
Matt Macy
3b9156971f re-enable pmcstat, pmccontrol, and pmcannotate for gcc4 builds
I had disabled building of the aforementioned targets due to warnings breaking
tinderbox. This silences the warning and restores them to the build.

Reported by:	jhibbits
Reviewed by:	jhibbits
Approved by:	re (gjb)
2018-09-14 01:11:10 +00:00
Ed Maste
26dfa867d2 cpucontrol: correct typo
There should be no 't' in processort_rev_id.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2018-09-11 17:09:16 +00:00
Edward Tomasz Napierala
94df44ee6c Add u3g ppp.conf entry. It provides some starting point to making
use of u3g(4) dongles, and in many cases can work out of the box.

Reviewed by:	hselasky
Approved by:	re (gjb)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D16974
2018-09-11 17:05:26 +00:00
David E. O'Brien
ca8882cad6 Add MPLS LSP-echo (RFC8029, March 2017) port.
Reviewed by:	stevek
Approved by:	re(gjb)
Obtained from:	Juniper Networks
2018-09-06 18:34:11 +00:00
Brad Davis
2d7bc6b39b Move etc/crontab to usr.sbin/cron/cron/
Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16786
2018-09-06 14:55:54 +00:00
Warner Losh
de6b4aa8c4 Make -a (to make the entry active) apply to creation of a new boot
variable.

Approved by: re@ (rgrimes)
PR: 231013
Differential Revision:  https://reviews.freebsd.org/D16977
2018-09-02 18:40:18 +00:00
Brad Davis
412e58bf47 Move defaults/periodic.conf back to a config file.
Ths prevents etcupdate and mergemaster from deleting it for now.

Approved by:	re (rgrimes), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16975
2018-09-02 15:53:56 +00:00
Kyle Evans
d3d381b2b1 userboot: handle guest interpreter mismatches more intelligently
The switch to lualoader creates a problem with userboot: the host is
inclined to build userboot with Lua, but the host userboot's interpreter
must match what's available on the guest. For almost all FreeBSD guests in
the wild, Lua is not yet available and a Lua-based userboot will fail.

This revision updates userboot protocol to version 5, which adds a
swap_interpreter callback to request a different interpreter, and tries to
determine the proper interpreter to be used based on how the guest
/boot/loader is compiled. This is still a bit of a guess, but it's likely
the best possible guess we can make in order to get it right. The
interpreter is now embedded in the resulting executable, so we can open
/boot/loader on the guest and hunt that down to derive the interpreter it
was built with.

Using -l with bhyveload will not allow an intepreter swap, even if the
loader specified happens to be a userboot with the wrong interpreter. We'll
simply complain about the mismatch and bail out.

For legacy guests without the interpreter marker, we assume they're 4th.
For new guests with the interpreter marker, we'll read it and swap over
to the proper interpreter if it doesn't match what the userboot we're using
was compiled with.

Both flavors of userboot are installed by default, userboot_4th.so and
userboot_lua.so. This fixes the build WITHOUT_FORTH as a coincidence, which
was broken by userboot being forced to 4th.

Reviewed by:	imp, jhb, araujo (earlier version)
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D16945
2018-09-01 02:23:45 +00:00
Philip Paeps
427b88d77e Add libxo(3) support to lastlogin(8).
Reviewed by:	kp
Approved by:	re (gjb)
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D16919
2018-08-28 17:12:37 +00:00
Mark Johnston
670c1e4b1c Add missing endpwent() and endgrent() calls to nfsuserd(8).
PR:		230937
Submitted by:	Peter Eriksson <peter@ifm.liu.se>
Reviewed by:	rmacklem
Approved by:	re (gjb)
MFC after:	1 week
2018-08-28 15:18:14 +00:00
Brad Davis
00d5b07760 Fix the install location of hcsecd.conf
Submitted by:	vangyzen
Approved by:	re (marius)
2018-08-26 02:09:20 +00:00
Brad Davis
f1722afc8d Remove trailing slash in pathname so that valid METALOG is created in the
NO_ROOT case of make packages.

Submitted by:	Dan McGregor <dan.mcgregor@usask.ca>
Approved by:	re (rgrimes)
2018-08-25 20:19:16 +00:00
Allan Jude
aa2a0e0fc3 bsdinstall/zfsboot: Enable new UEFI+GELI support
After r336252 it is no longer necessary to have a separate bootpool when
booting from an encrypted disk with UEFI.

This change also switches the EFI System Partition contents from
the 800 KB boot1.efifat to a new 200 MB filesystem created with newfs_msdos
and uses loader.efi directly, instead of boot1.efi.

PR:		228916
Reviewed by:	dteske
MFC after:	1 month
Relnotes:	yes
Sponsored by:	Klara Systems
Differential Revision:	https://reviews.freebsd.org/D12315
2018-08-23 22:50:11 +00:00
Renato Botelho
7ae43b318f usr.sbin/ndp: Cleanup in preparation to add libxo support
* Constify rtpref_str declaration
* Remove unused h_errno declaration
* Use time_t type for expire
* Use strlcpy to set static "?" value to ifname
* Rename local variable 's' to stop shadowing global definition
* Close socket used in pfx_flush()
* Use local variables for sock() in setdefif() and getdefif()
* Increase WARNS to 3

Reviewed by:	allanjude, kevans
Approved by:	allanjude
Sponsored by:	Rubicon Communications, LLC (Netgate)
Differential Revision:	https://reviews.freebsd.org/D11118
2018-08-23 10:38:59 +00:00
Marcelo Araujo
1aa56353ad Add manpage entry for the new bhyve options -s "help" and -l "help".
Reported by:	0mp
Sponsored by:	iXsystems Inc.
2018-08-23 07:34:51 +00:00
Warner Losh
5fa2979791 Create devctl freeze/thaw.
This adds it to devctl, libdevctl, defines the two IOCTLs and
implements the kernel bits. causes any new drivers that are added via
kldload to be deferred until a 'thaw' comes in. These do not stack: it
is an error to freeze while frozen, or thaw while thawed.

Differential Revision: https://reviews.freebsd.org/D16735
2018-08-23 05:05:47 +00:00
Rick Macklem
9893bfe27f Fix the nfsuserd.8 man page for the changes made to support uid/gid
numbers in owner and owner_group strings.

This is a content change.
2018-08-23 00:05:13 +00:00
Brad Davis
376a4e3255 Move services to usr.sbin/services_mkdb/
This is pkgbase related as it switches to CONFS to properly tag this as a
config file.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16848
2018-08-22 21:22:40 +00:00
Marcelo Araujo
657d21589e Add -s "help" and -l "help" to print a list of supported PCI and LPC devices.
For tools that uses bhyve such like libvirt, it is important to be able to
probe what features are supported by the given bhyve binary.

To give more context, libvirt probes bhyve's capabilities in a not very
effective way:
- Running 'bhyve -h' and parsing output.
- To detect devices, it runs 'bhyve -s 0,dev' for every each device and
  parses error output to identify if the device is supported or not.

PR:		2101111
Submitted by:	novel
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	iXsystems Inc.
2018-08-22 20:23:08 +00:00
Patrick Kelsey
249cc75fd1 Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of
2^32 bps or greater to be used.  Prior to this, bandwidth parameters
would simply wrap at the 2^32 boundary.  The computations in the HFSC
scheduler and token bucket regulator have been modified to operate
correctly up to at least 100 Gbps.  No other algorithms have been
examined or modified for correct operation above 2^32 bps (some may
have existing computation resolution or overflow issues at rates below
that threshold).  pfctl(8) will now limit non-HFSC bandwidth
parameters to 2^32 - 1 before passing them to the kernel.

The extensions to the pf(4) ioctl interface have been made in a
backwards-compatible way by versioning affected data structures,
supporting all versions in the kernel, and implementing macros that
will cause existing code that consumes that interface to use version 0
without source modifications.  If version 0 consumers of the interface
are used against a new kernel that has had bandwidth parameters of
2^32 or greater configured by updated tools, such bandwidth parameters
will be reported as 2^32 - 1 bps by those old consumers.

All in-tree consumers of the pf(4) interface have been updated.  To
update out-of-tree consumers to the latest version of the interface,
define PFIOC_USE_LATEST ahead of any includes and use the code of
pfctl(8) as a guide for the ioctls of interest.

PR:	211730
Reviewed by:	jmallett, kp, loos
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	RG Nets
Differential Revision:	https://reviews.freebsd.org/D16782
2018-08-22 19:38:48 +00:00
Rick Macklem
04499b28af Revert r320758, which was the man page update for r320757 just reverted.
This is a content change.

PR:		230752
2018-08-22 12:26:17 +00:00
Rick Macklem
7897d2a532 Revert r320757 since it can cause "excl->shared" panics.
PR#230752 shows a panic where an nfsd thread tries to do soconnect() on
the AF_LOCAL socket used by the nfsuserd while already holding an
exclusive lock on it. I am not 100% sure how this happens, but since an
AF_LOCAL socket is in the file system namespace it is conceivable that it
could lock it and then attempt an upcall to the nfsuserd.
However, reverting r320757 stops the nfsuserd from using an AF_LOCAL
socket, so it should avoid any such panic().
r320757 did fix a problem with running the nfsuserd when jails were
enabled, but that can be dealt with less elegantly by allowing the
use of an alternate address instead of 127.0.0.1.
The gssd daemon also uses an AF_LOCAL socket, but it will do upcalls
before the nfsd thread processes the RPC, so I think it should not
be suseptible to this problem.

PR:		230752
2018-08-22 12:20:10 +00:00
Alex Richardson
266fbc83fe Use unifdef -x1 instead of ignoring the shell exit code
This way the target fails if unifdef doesn't exist or doesn't modify the
file instead of just generating an empty .c file.
I found this while building without inherited $PATH (D16815)

Approved By:	jhb (mentor)
2018-08-22 11:56:51 +00:00
Chuck Tuffli
9544e6dcf1 Make NVMe compatible with the original API
The original NVMe API used bit-fields to represent fields in data
structures defined by the specification (e.g. the op-code in the command
data structure). The implementation targeted x86_64 processors and
defined the bit fields for little endian dwords (i.e. 32 bits).

This approach does not work as-is for big endian architectures and was
changed to use a combination of bit shifts and masks to support PowerPC.
Unfortunately, this changed the NVMe API and forces #ifdef's based on
the OS revision level in user space code.

This change reverts to something that looks like the original API, but
it uses bytes instead of bit-fields inside the packed command structure.
As a bonus, this works as-is for both big and little endian CPU
architectures.

Bump __FreeBSD_version to 1200081 due to API change

Reviewed by: imp, kbowling, smh, mav
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D16404
2018-08-22 04:29:24 +00:00
Conrad Meyer
c657f9385b newsyslog(8): Reject configurations that specify setuid or executable logs
Prevent some classes of foot-shooting that may result in permissions
problems.

Reviewed by:	dab, delphij, vangyzen (earlier version)
Relnotes:	yes (behavior change)
Sponsored by:	Dell EMC Isilon
Differential Revision:	D16831
2018-08-21 23:12:46 +00:00
Marcelo Araujo
1465a1e1eb Fix resource leak when using strdup(3).
Reported by:	Coverity
CID:		1394929
Sponsored by:	iXsystems Inc.
2018-08-21 23:11:26 +00:00
Brad Davis
c8e7055577 Move all bluetooth related config files out of etc
This helps with pkgbase by switching to CONFS so they are properly tagged as
config files.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16833
2018-08-21 19:28:53 +00:00
Brad Davis
64be79ef76 Move all syslogd related configs to usr.sbin/syslogd/
This helps with pkgbase as it switches these to use CONFS which properly tags
them as config files.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16783
2018-08-21 17:01:47 +00:00
Marcelo Araujo
0b9079bf95 - Add CSV output to gstat via -C flag.
Add a -C option, similar to -B, that allows gstat to produce basic CSV output
with absolute timestamps (ISO 8601, nearly.) Multiple devices are handled by
way of a single-pivot CSV table with duplicated timestamps for each object
output.

Submitted by:	Nick Principe <nap__ixsystems.com>
Reviewed by:	myself, imp@, asomers (earlier verison), bcr (manpages)
Sponsored by:	iXsystems Inc.
Differential Revision:	https://reviews.freebsd.org/D16151
2018-08-21 11:22:49 +00:00
Xin LI
4e1ef62a36 MFV r338092: ntp 4.2.8p12.
Relnotes:	yes
2018-08-21 02:38:07 +00:00
Kyle Evans
4b09be036d config(8): Allow escape-quoted empty strings
For use with things like BOOT_TAG=\"\" -- there are valid reasons to allow
empty strings, especially as these are usually being passed through as
options. The same argument could perhaps be made for the unquoted
variant in things like MODULES_OVERRIDE="", but it's not immediately clear
that this is an issue so I've left it untouched.

MFC after:	3 days
2018-08-20 22:08:03 +00:00
Warner Losh
9b78aedb69 mergemaster: better defaults for SOURCEDIR
If we can't find a Makefile.inc1 in the specified / default SOURCEDIR, and
there's a Makefile.inc1 in the current directory, offer the user the choice
of using . for SOURCEDIR.

Differential Revsion: https://reviews.freebsd.org/D16709
2018-08-20 19:39:49 +00:00
Bjoern Heidotting
951de5548b In r324732 sysinstall was replaced by bsdinstall.
However, for post-install configuration, bsdinstall
is not of much use. Point the user to bsdconfig instead.

Reviewed by:	0mp, bcr
Approved by:	0mp, bcr
Differential Revision:	https://reviews.freebsd.org/D16751
2018-08-20 18:17:50 +00:00
Will Andrews
a4671335c5 iostat: update man page for r277566
The original commit added granularity to the transaction latency display
in the extended device stats mode, but didn't update the man page.

Reported by:	Miroslav Lachman <000.fbsd@quip.cz> via jmg
MFC after:	1 day
2018-08-20 13:42:22 +00:00
Marcelo Araujo
6b2c20cd98 NVMe spec version 1.3c says that "serial number" field must be 7-bit ASCII,
with unused bytes padded by space characters. Same for firmware number and
namespace number.

Discussed with:	imp@
Sponsored by:	iXsystems Inc.
2018-08-20 04:56:37 +00:00
Marcelo Araujo
b018ea0174 Users must set the number of queues from 1 to maximum 16 queues.
Sponsored by:	iXsystems Inc.
2018-08-20 04:50:11 +00:00
Marcelo Araujo
df90fce298 Fix double mutex lock.
Reported by:	Coverity
CID:		1394833
Discussed with:	Leon Dang
Sponsored by:	iXsystems Inc.
2018-08-20 04:44:29 +00:00
Eitan Adler
4750b59aca send-pr: wave goodbye
Entering into the world of 12.x we no longer need even the placeholder
for send-pr. It has not done anything for some time.

With Hat: bugmeister
2018-08-19 07:12:35 +00:00