Commit Graph

15374 Commits

Author SHA1 Message Date
Alexander Motin
f5f4836d62 Add variable initialization missed by me and clang.
Reported by:	grehan
MFC after:	2 weeks
2015-03-05 20:29:18 +00:00
Alexander Motin
371f1d88b6 Fix error translation broken in r279658.
Reported by:	grehan
MFC after:	2 weeks
2015-03-05 20:24:34 +00:00
Alexander Motin
2d678f1f4f Implement cache flush for ahci-hd and for virtio-blk over device.
MFC after:	2 weeks
2015-03-05 15:29:18 +00:00
Alexander Motin
d951589ddb Add check for absent stripe size to r279652.
MFC after:	2 weeks
2015-03-05 13:52:30 +00:00
Alexander Motin
94682383d9 Report logical/physical sector sizes for virtual SATA disk.
MFC after:	2 weeks
2015-03-05 12:21:12 +00:00
Alexander Motin
297c4868dd Add support for TOPOLOGY feature of virtio block device.
Passing through physical block size/offset from underlying storage allows
guest to manage proper data and I/O alignment to improve performance.

MFC after:	2 weeks
2015-03-05 10:40:45 +00:00
Devin Teske
3a40fd5ebd sysrc(8): Add key-=remove' and improve key+=append' syntax
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-03-05 05:54:34 +00:00
Alexander Motin
3bac1be816 Add example configuration for FibreChannel ports.
MFC after:	1 week
2015-03-04 14:30:09 +00:00
Alexander Motin
aadf439b22 If target name starts with "naa.", set it as WWNN for CTL port.
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2015-03-04 14:12:38 +00:00
Alexander Motin
e9b7390bb2 Fix handling of queued text and logout requests.
While it may have little sense, text and logout requests can be queued.
If they are, they consume cmdsn, so we should increment our conn_cmdsn.

MFC after:	1 week
2015-03-04 12:12:46 +00:00
Allan Jude
8935f24251 Add a new safetly belt to freebsd-update to prevent a user doing a minor update (-pX) while having an unfinished major upgrade (9.x to 9.y)
Safetly belt can be disabled with the -F flag

Additionally, add the --not-running-from-cron flag they bypasses the TTY requirement, and allows freebsd-update to be invoked by orchestration frameworks, scripts, or otherwise.

PR:		196760
Differential Revision:	https://reviews.freebsd.org/D1550
Reviewed by:	cperciva, delphij
Approved by:	bcr (mentor), rodrigc (src)
MFC after:	1 month
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
2015-03-03 23:20:18 +00:00
Sergey Kandaurov
fb0e21cfe8 Update .Dd, sync usage() for -F. Missed in previous change. 2015-03-03 20:23:59 +00:00
Rui Paulo
36285e787f Add and document an option to cause syslogd to run in the
foreground.

This allows a separate process to monitor when and how
syslogd exits. That process can then restart syslogd if needed.

Differential Revision:	https://reviews.freebsd.org/D1985
Submitted by:	Ravi Pokala
Reviewed by:	allanjude (man page)
2015-03-03 20:07:59 +00:00
Ryan Stone
9f8dca7d57 Correct a typo.
X-MFC-With:	r279458
2015-03-01 02:45:46 +00:00
Ryan Stone
7fdbba5e46 Teach pciconf how to dump out SR-IOV capability
Differential Revision:	https://reviews.freebsd.org/D1639
Reviewed by:		jhb
MFC after:		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:59:35 +00:00
Ryan Stone
1905e4a3fd Add main() for iovctl and hook iovctl into build
Differential Revision:	https://reviews.freebsd.org/D87
Reviewed by:		jhb
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:41 +00:00
Ryan Stone
d9266cbaef Add functions for parsing the iovctl config file
Add two functions for parsing the iovctl config file.  The config
file is parsed using libucl[1], which accepts most YAML files and
a superset of JSON.  The first function is an ad-hoc parser that
searches the file for the PF.DEVICE configuration value.  We need
to know that value in order to fetch the schema from the kernel,
and we need the schema in order to be able to fully parse the file.

The second function parses the config file and validates it
against a schema.  This function will exit with an error message
if any validation error occurs.  If it succeeds, the configuration
is returned as an nvlist suitable for passing to the kernel.

[1] https://github.com/vstakhov/libucl

Differential Revision:	https://reviews.freebsd.org/D86
Reviewed by:		jhb
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:34 +00:00
Ryan Stone
dba9ec3462 Add iovctl functions for validating config
Add an function to iovctl that validates the configuration against
a schema.  This function is able to assume that the parser has
done most of the validation already and it's only responsible for
applying default VF values specified in the config file, confirming
that all required parameters have been set and that no invalid VF
numbers have been specified.

Differential Revision:	https://reviews.freebsd.org/D85
Reviewed by:		bcr
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:28 +00:00
Ryan Stone
b3c0355681 Add manpage documenting iovctl config file format.
Differential Revision:	https://reviews.freebsd.org/D84
Reviewed by:		emaste, bcr, wblock
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:21 +00:00
Ryan Stone
8129906902 Add a manpage for iovctl(8)
Differential Revision:	https://reviews.freebsd.org/D83
Reviewed by:		wblock
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:15 +00:00
Ryan Stone
8625a33ea1 Revert r279454. The new directory didn't get added to svn properly.
Pointy hat to: rstone
2015-03-01 00:44:15 +00:00
Ryan Stone
b431478e05 Add main() for iovctl and hook iovctl into build
Differential Revision:	https://reviews.freebsd.org/D87
Reviewed by:		jhb
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:41:17 +00:00
Edward Tomasz Napierala
a9d7821075 Move the "offload" clause from the target section to portal-group
section; it makes more sense there.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-02-28 12:02:32 +00:00
Ian Lepore
b96bd95b85 Allow the kern.osrelease and kern.osreldate sysctl values to be set in a
jail's creation parameters.  This allows the kernel version to be reliably
spoofed within the jail whether examined directly with sysctl or
indirectly with the uname -r and -K options.

The values can only be set at jail creation time, to eliminate the need
for any locking when accessing the values via sysctl.

The overridden values are inherited by nested jails (unless the config for
the nested jails also overrides the values).

There is no sanity or range checking, other than disallowing an empty
release string or a zero release date, by design.  The system
administrator is trusted to set sane values.  Setting values that are
newer than the actual running kernel will likely cause compatibility
problems.

Differential Revision:	https://reviews.freebsd.org/D1948
Relnotes:	yes
2015-02-27 16:28:55 +00:00
Edward Tomasz Napierala
54ba3522ae Use LIBADD.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-02-26 15:48:20 +00:00
Edward Tomasz Napierala
e595e65b8a Add uefisign(8), UEFI Secure Boot signing utility.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-02-26 09:15:24 +00:00
Edward Tomasz Napierala
f584f51d96 Add missing error check.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-02-26 09:08:48 +00:00
Alexander Motin
678b68798f Fix memory leak on incorrect initiator portal.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	3 days
2015-02-25 10:10:40 +00:00
Alexander Motin
16fa28094c Add checks for malloc() failures.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	3 days
2015-02-25 10:07:39 +00:00
Brad Davis
2cf395883e Fix a race condition by allowing up to 5 seconds of difference between the time stamps.
PR:		197861
Approved by:	will
2015-02-24 22:22:06 +00:00
Neel Natu
12f91c70a3 Emulate MSR 0xC0011024 when running on AMD processors.
OpenBSD guests test bit 0 of this MSR to detect whether the workaround for
erratum 721 has been applied.

Reported by:	Jason Tubnor (jason@tubnor.net)
MFC after:	1 week
2015-02-24 05:15:40 +00:00
Neel Natu
c974767896 Add "-u" option to bhyve(8) to indicate that the RTC should maintain UTC time.
The default remains localtime for compatibility with the original device model
in bhyve(8). This is required for OpenBSD guests which assume that the RTC
keeps UTC time.

Reviewed by:	grehan
Pointed out by:	Jason Tubnor (jason@tubnor.net)
MFC after:	2 weeks
2015-02-24 02:04:16 +00:00
Peter Grehan
65392c66a5 Don't close a block context if it couldn't be opened,
for example if the backing file doesn't exist,
avoiding a null deref.

Reviewed by:	neel
MFC after:	1 week.
2015-02-23 22:31:39 +00:00
Pedro F. Giffuni
62debcc7f3 pmccontrol(8): Replace malloc() + memset() with calloc()
PMCC_OP_IGNORE happens to be zero, so just use calloc() here.
2015-02-22 14:45:00 +00:00
Jamie Gritton
b2ea411de2 Allow for parameters added with the JP_OPT flag to not exist.
That's why the flag exists in the first place.

MFC after:	1 week
2015-02-22 00:00:10 +00:00
Jamie Gritton
b687b02ffc Fix the logic for skipping parameters (with -s) that have "jailsys"
parents (such as host.hostname); these were being skipped all the time.
That it went this long without anyone noticing is a sign that this feature
isn't actually used by anyone, but it's there so it might as well work.

MFC after:	1 week
2015-02-20 20:12:05 +00:00
Jamie Gritton
b300bd470f Allow parameters listed on the command line to override the -v option,
instead of crashing.

PR:		197701
MFC after:	1 week
2015-02-20 19:48:24 +00:00
Gleb Smirnoff
b1499feb9e Now that IGMP and MLD sysctls provide a clean API structures that do not
leak kernel internal stuff, reconnect ifmcstat(1) back to build.  However,
disable kvm(3) support in it, since it requires uncovering tons of _KERNEL
defined declarations, which can be achieved either uncovering them globally
or providing dirty hacks such as _WANT_IFADDR.  If anyone demands an
ifmcstat-like kvm-based tool, please take the code out of usr.sbin/ifmstat
and create a tool in src/tools/tools.
2015-02-19 22:42:33 +00:00
Ed Schouten
0f0d5f6e45 Make syslogd work in case shutdown() is POSIX-ly correct.
On POSIX conformant systems, shutdown() should return ENOTCONN when not
connected. We attempted to fix this once (kern/84761), but this change
got backed out because it 'breaks code' (r150155).

I just reapplied the patch and indeed, syslogd fails on startup. Make it
easier to re-enable this change in the future by paching up syslogd to
do the right thing.

MFC after:	3 weeks
Sponsored by:	Nuxi
2015-02-19 18:56:39 +00:00
Enji Cooper
57e8e48f53 Unbreak freshly installed worlds by properly "commenting" out ifmcstat
Pointyhat to: glebius
2015-02-19 11:17:36 +00:00
Gleb Smirnoff
53d3d92f4b Temporarily disconnect ifmcstat(8) from build, to make world buildable
ifmcstat(8) noses in kernel memory too much, and thus is very tentative
to any changes in kernel.

I will rewrite it to use some API instead of libkvm(3) and connect back
to build.
2015-02-19 06:27:14 +00:00
Jung-uk Kim
1c0e1b6da9 Merge ACPICA 20141107 and 20150204. 2015-02-18 20:33:00 +00:00
Brad Davis
258e07800c Add tests for account and password expiration.
Approved by:	will
2015-02-17 14:48:16 +00:00
Sean Bruno
13087ee99f Add example for upcoming aarch64/arm64 targets. 2015-02-16 20:55:37 +00:00
John-Mark Gurney
add9975cd1 install the man page...
Sponsored by:	FreeBSD Foundation
2015-02-16 02:20:11 +00:00
Sean Bruno
b8fc9a86a8 If no arguments are passed to a subcommand that requires arguments,
error out before we deref a null pointer in the check for max length.

Thanks to otis in IRC for the bug report.

MFC after:	3 days
2015-02-15 23:58:57 +00:00
Brad Davis
cec1a873d7 Really fix the pw_usernext tests.
PR:		197612
Approved by:	will
2015-02-15 21:42:10 +00:00
Brad Davis
270d667cd2 Remove an extra curly bracket that was causing intermittent failures.
PR:		197612
Submitted by:	Robert O'Niel <oneil.rs@gmail.com>
Approved by:	will
2015-02-14 18:22:31 +00:00
Gleb Smirnoff
2698a8a55b Use less ugly code to allocate buffer of SORCVBUF_SIZE. 2015-02-13 23:57:20 +00:00
Thomas Quinot
c4a0c62ce8 (backup_kernel_finddir, backup_kernel, install_files):
Add missing references to $BASEDIR, in order to allow correct operation
when updating a system mounted at another location than / (e.g. when
updating an alternate Boot Environment).

Reviewed by:	cperciva
MFC after:	1 week
2015-02-13 22:55:25 +00:00