Commit Graph

15271 Commits

Author SHA1 Message Date
Tycho Nightingale
48a9d8f214 To allow a request to be submitted from within the callback routine of
a completing one increase the total by 1 but don't advertise it.

Reviewed by:	grehan
2014-11-09 21:08:52 +00:00
Alexander Motin
40259c79cd Make both iSCSI initiator and target support base64 encoded CHAP data.
While all tested initiators and targets use hex-encoded CHAP data, RFC also
allows base64 encoding there, and Microsoft certificaition tool uses it.

Reviewed by:	trasz (earlier version)
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2014-11-09 20:39:08 +00:00
Edward Tomasz Napierala
d02d7de76c Add HISTORY section to ctld(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-09 13:45:35 +00:00
Edward Tomasz Napierala
7889a0832f Fix several nits in redirection handling - don't use wrong CSG,
and avoid use-after-free.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-09 13:30:02 +00:00
Edward Tomasz Napierala
6dbdbf825d Add support for sending redirections to iSCSI target.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-09 13:01:09 +00:00
Edward Tomasz Napierala
1195fe34b0 Improve wording in ctl.conf(5).
Differential Revision:	https://reviews.freebsd.org/D1020
Reviewed by:	bcr@ (earlier version), wblock@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-08 07:54:34 +00:00
Edward Tomasz Napierala
aed31534cd ctld(8) doesn't require -lcam or -lssl; remove those from DPADD and LDADD.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-08 07:50:57 +00:00
Alexander Motin
d5cc4a4a61 Remove unused assignments, noticed by Clang analyzer.
MFC after:	1 week
2014-11-07 19:32:10 +00:00
Baptiste Daroussin
4465557ac2 Backout 274170 it breaks for mips 2014-11-06 18:50:59 +00:00
Baptiste Daroussin
10b5ed75fb fifolog_writer does not depend on libutil 2014-11-06 13:13:47 +00:00
Baptiste Daroussin
295e858606 fifolog_reader does not depend on libutil 2014-11-06 13:12:12 +00:00
Baptiste Daroussin
160c039d4e iscsid does not need to link to libssl 2014-11-06 10:30:10 +00:00
Baptiste Daroussin
0e97acdf58 sntp does not depend on libm 2014-11-06 10:16:05 +00:00
Baptiste Daroussin
7a78c2b3d8 rpcbind does not need to be linked to libutil 2014-11-06 10:07:26 +00:00
Alexander Motin
c3e7ba3e6d Add to CTL support for logical block provisioning threshold notifications.
For ZVOL-backed LUNs this allows to inform initiators if storage's used or
available spaces get above/below the configured thresholds.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2014-11-06 00:48:36 +00:00
Devin Teske
e8f6aafb54 Add EXAMPLES-section entry for new key+=append syntax of sysrc(8).
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
X-MFC-with:	274068
Thanks to:	@SeanChittenden
2014-11-05 01:24:44 +00:00
Tycho Nightingale
ae45750d6c Improve the ability to cancel an in-flight request by using an
interrupt, via SIGCONT, to force the read or write system call to
return prematurely.

Reviewed by:	grehan
2014-11-04 01:06:33 +00:00
Devin Teske
7431dfd458 Follow-up to r255036; remove beforeinstall directives from bsdconfig(8)
Makefile's, fixing concurrent installworld (`make -j17 installworld').

Thanks to:	delphij, emaste
Reviewed by:	delphij
MFC after:	3 days
X-MFC-to:	stable/10, stable/9
2014-11-04 00:14:38 +00:00
Devin Teske
a7bdf21cf7 Add key+=append syntax to sysrc(8).
Reviewed by:	shurd
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2014-11-03 23:43:41 +00:00
Tycho Nightingale
26bf96112b If the start bit, PxCMD.ST, is cleared and nothing is in-flight then
PxCI, PxSACT, PxCMD.CCS and PxCMD.CR should be 0.

Reviewed by:	grehan
2014-11-03 12:55:31 +00:00
Enji Cooper
e5f33ae3e7 Require root when running the pw_delete and pw_modify test programs (pw(8)
requires it)
2014-11-03 09:26:39 +00:00
Enji Cooper
bf1e083e01 Integrate usr.sbin/useradd/t_useradd.sh from NetBSD into FreeBSD as pw_test
- Suffix useradd/userdel commands with pw
- Remove the atf_expect_fail for bin/39546

Phabric: D921
Reviewed by: brd
Sponsored by: EMC / Isilon Storage Division
2014-11-03 06:07:55 +00:00
Nathan Whitehorn
5b9ee78d49 Rewrite some of the disk setup documentation to be clearer and contain
less obsolete information. Also move the entropy command down the list --
the list is ordered by likelihood of use rather than alphabetically.

MFC after:	1 week
2014-10-31 23:52:02 +00:00
John Baldwin
079e563cae Rework the EXAMPLES section to be a bit clearer.
- Add an example of using etcupdate diff.
- Create a subsection on bootstrapping that is below the simple
  examples.  This should make it clearer that 'etcupdate extract' is
  a one-time operation and not part of the common workflow.  It also
  adds more suggestions on when bootstrapping is needed and additional
  steps to make future merges simpler.

Reviewed by:	adrian
MFC after:	3 days
2014-10-29 18:01:09 +00:00
Edward Tomasz Napierala
1cb587dc9c Fix iscsictl(8) and ctld(8) to correctly handle Windows newlines
(CRLF) in iscsi.conf and ctl.conf.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-29 12:22:32 +00:00
Edward Tomasz Napierala
dbb1ee18cc Keep the token list sorted.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-29 12:12:27 +00:00
Edward Tomasz Napierala
f948858032 Make it possible to optionally use semicolon to separate statements.
This makes it possible to format stuff like this:

target xxx {
	lun 0 { path /foo/bar; size 4G; }
}

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-29 12:10:39 +00:00
Edward Tomasz Napierala
bd833b11c2 Simplify code; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-29 09:36:02 +00:00
Edward Tomasz Napierala
0537488353 Add discovery-filter. This makes it possible to restrict which targets
are returned during discovery based on initiator portal, name, and CHAP
credentials.

Reviewed by:	mav@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-29 09:26:55 +00:00
Edward Tomasz Napierala
be6527d545 Document iSNS defaults.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-28 17:11:51 +00:00
Baptiste Daroussin
6e6c53f063 Fix renaming a group via the gr_copy function
Add a regression test to pw(8) because the bug was discovered via using:
pw groupmod

PR:		187189
Reported by:	mcdouga9@egr.msu.edu
Tested by:	mcdouga9@egr.msu.edu
Patch by:	Marc de la Gueronniere
2014-10-28 16:27:29 +00:00
Baptiste Daroussin
0def1c7441 Ensure pw userdel -u <invalid> do not try to remove root
Check the uid passed is actually a number as early as possible

MFC after:	1 week
2014-10-28 15:46:22 +00:00
Baptiste Daroussin
3b640d6bfc Fix atf syntax 2014-10-28 15:33:15 +00:00
Baptiste Daroussin
156ebc2878 Do not delete the group wheel when bad argument is passed to pw groupdel -g
Check that the -g argument is actually a number, if not report an error.
This argument is converted without checking with atoi(3) later so without this
check it converts any alpha entries into 0 meaning it deletes the group wheel

Add a regression test about it

PR:		90114
Reported by:	bkoenig@cs.tu-berlin.de
MFC after:	1 week
2014-10-28 14:54:04 +00:00
Baptiste Daroussin
6697d7663b Fix a regression in pw usermod -G list
The user was perperly adding the to different groups from "list" but was not
removed from the other groups it could have belong to.
While here add a regression test about this bug

PR:		185666
Reported by:	sub.mesa@gmail.com
MFC after:	1 week
2014-10-28 14:19:17 +00:00
Nathan Whitehorn
ffcaf4d24f Remove spurious libelf dependency.
Submitted by:	pluknet
2014-10-28 14:11:54 +00:00
Baptiste Daroussin
fb7830888d When a group is renamed then the group has been invalidated for sure.
In that case get the group information using the new name.

Add a regression test about this bug

PR:		193704
Reported by:	az
2014-10-28 11:20:30 +00:00
Edward Tomasz Napierala
d9b4554dbd Fix build after previous commit. While here, improve error messages.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-28 10:39:29 +00:00
Edward Tomasz Napierala
4524db570f Remove the distinction between strings and numbers from ctld(8) yacc parser.
This fixes problems with passing strings that look like numbers to clauses
that expect strings; previously it caused syntax errors and had to be worked
by user, using quotes.  The workaround introduced in r267833 is no longer
neccessary.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-28 10:25:59 +00:00
Nathan Whitehorn
60b9a1fcf3 Use pkg-1.4-style platform identifiers based on MACHINE_ARCH (e.g.
FreeBSD:11:amd64 instead of freebsd:11:x86:64) when bootstrapping pkg.
Thanks to portmgr for providing symlinks so both styles work.

Reviewed by:	bapt
MFC after:	3 weeks
2014-10-27 23:19:51 +00:00
Baptiste Daroussin
f42d8dec6c Fix rendering
Submitted by:	brueffer
2014-10-27 15:50:47 +00:00
Baptiste Daroussin
99e33eab01 Clarify the documentation of pmcstat:
the -d argument should be passed before -p, -s, -P or -S to be taken in account

Differential Revision:	https://reviews.freebsd.org/D1011
Reviewed by:	adrian, gnn
MFC after:	1 week
2014-10-27 15:33:44 +00:00
Neel Natu
c17d4a83b8 Add a comment explaining the intent behind the I/O reservation [0x72-0x77]. 2014-10-26 21:17:44 +00:00
Alexander Motin
6f67ce91ca Add "rpm" and "formfactor" LUN options to match istgt functionality.
MFC after:	1 week
2014-10-26 07:40:37 +00:00
Neel Natu
160ef77abf Move the ACPI PM timer emulation into vmm.ko.
This reduces variability during timer calibration by keeping the emulation
"close" to the guest. Additionally having all timer emulations in the kernel
will ease the transition to a per-VM clock source (as opposed to using the
host's uptime keep track of time).

Discussed with:	grehan
2014-10-26 04:44:28 +00:00
Alexander Motin
829603e21f Add basic iSNS client to the iSCSI target.
This makes ctld(8) register its iSCSI targets and portals on configured
iSNS servers to allow initiators find them without active discovery.

Fetching of allowed initiators from iSNS is not implemented now, so target
ACLs still should be configured manually.

Reviewed by:	trasz@
MFC after:	1 month
Sponsored by:	iXsystems, Inc.
2014-10-25 12:50:26 +00:00
Edward Tomasz Napierala
3bea5b97f8 Improve ctld.conf example.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-24 12:30:43 +00:00
Edward Tomasz Napierala
e867e16225 Make the initiator-name and initiator-portal checks a little nicer.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-24 11:40:09 +00:00
Edward Tomasz Napierala
ff982835f8 Tidy up the login code; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-24 11:34:55 +00:00
Jean-Sébastien Pédron
069f1c256a vt(4): Add PIO_VFONT_DEFAULT ioctl to restore the default builtin font
To restore the default font using vidcontrol(1), use the "-f" flag
without an argument:
    vidcontrol -f < /dev/ttyv0

PR:		193910
Differential Revision:	https://reviews.freebsd.org/D971
Submitted by:	Marcin Cieslak <saper@saper.info>
Reviewed by:	ray@, emaste@
Approved by:	ray@
MFC after:	1 week
2014-10-23 12:38:05 +00:00
Edward Tomasz Napierala
7c8e3a7f48 Clean up (refactor) discovery a little; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-23 12:02:27 +00:00
Mark Johnston
d4fef7d342 Fix some buglets in the error-handling of getdevice(). In particular, report
an error if the argument to pciconf -a doesn't have a unit number, rather
than triggering an assertion failure.

PR:		194506
Reported by:	Anthony Cornehl <accornehl@gmail.com>
Sponsored by:	EMC / Isilon Storage Division
2014-10-22 23:35:56 +00:00
Edward Tomasz Napierala
a178d09eee Fix ctl.conf example to use proper paths to ZVOLs.
Sponsored by:	The FreeBSD Foundation
2014-10-22 11:30:56 +00:00
Edward Tomasz Napierala
4af184b9f7 Remove misleading statement. Bump date.
MFC after:	1 month
Sponsored by:	FreeBSD Foundation
2014-10-22 11:09:03 +00:00
Edward Tomasz Napierala
3a6accd5a5 Comment out parts about iSER; it's not implemented.
Sponsored by:	The FreeBSD Foundation
2014-10-22 11:06:05 +00:00
Edward Tomasz Napierala
e2eb7f476c Remove spurious empty line.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-22 10:53:25 +00:00
Edward Tomasz Napierala
4e5c38f8b7 Fix ctld(8) to not show the "auth-group <name> not assigned to any target"
warning for auth-groups assigned to a portal-group.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-22 09:40:46 +00:00
Edward Tomasz Napierala
2bd282696a Whitespace fixes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-22 09:17:17 +00:00
Edward Tomasz Napierala
45078155e3 Untangle iSCSI authentication code by splitting off the CHAP
implementation.

Reviewed by:	mav@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-22 08:59:23 +00:00
Neel Natu
408ea86538 IFC @r273338 2014-10-21 01:57:36 +00:00
Neel Natu
e1a172e1c2 IFC @r273214 2014-10-20 02:57:30 +00:00
Neel Natu
867b59607c IFC @r273206 2014-10-19 23:05:18 +00:00
Neel Natu
592cd7d3be Don't advertise the "OS visible workarounds" feature in cpuid.80000001H:ECX.
bhyve doesn't emulate the MSRs needed to support this feature at this time.

Don't expose any model-specific RAS and performance monitoring features in
cpuid leaf 80000007H.

Emulate a few more MSRs for AMD: TSEG base address, TSEG address mask and
BIOS signature and P-state related MSRs.

This eliminates all the unimplemented MSRs accessed by Linux/x86_64 kernels
2.6.32, 3.10.0 and 3.17.0.
2014-10-19 21:38:58 +00:00
Yoshihiro Takahashi
5c0a54a380 Disable hyperv on pc98. 2014-10-18 08:07:17 +00:00
Rui Paulo
2a6e267d4e Fix the watchdog/watchdog man pages.
The default timeout is 128 seconds.

MFC after:	1 week
2014-10-18 07:38:46 +00:00
Tycho Nightingale
3ef05c4677 Support stopping and restarting the AHCI command list via toggling
PxCMD.ST from '1' to '0' and back.  This allows the driver a chance to
recover if for instance a timeout occurred due to activity on the
host.

Reviewed by:	grehan
2014-10-17 11:37:50 +00:00
Neel Natu
2688a818a3 Don't advertise the Instruction Based Sampling feature because it requires
emulating a large number of MSRs.

Ignore writes to a couple more AMD-specific MSRs and return 0 on read.

This further reduces the unimplemented MSRs accessed by a Linux guest on boot.
2014-10-17 06:23:04 +00:00
Neel Natu
02904c45ab Hide extended PerfCtr MSRs on AMD processors by clearing bits 23, 24 and 28 in
CPUID.80000001H:ECX.

Handle accesses to PerfCtrX and PerfEvtSelX MSRs by ignoring writes and
returning 0 on reads.

This further reduces the number of unimplemented MSRs hit by a Linux guest
during boot.
2014-10-17 03:04:38 +00:00
Neel Natu
913d54b96e Emulate the "Hardware Configuration" MSR when running on an AMD host.
This gets rid of the "TSC doesn't count with P0 frequency!" message when
booting a Linux guest.

Tested on an "AMD Opteron 6320" courtesy of Ben Perrault.
2014-10-16 19:27:26 +00:00
Edward Tomasz Napierala
75afaef266 Fix automountd(8) not to leave zombies.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-16 08:33:04 +00:00
Edward Tomasz Napierala
4cdc52bdef Make automountd(8) inform autofs(4) whether directory being handled can
have wildcards.  This makes it possible for autofs(4) to avoid requesting
automountd(8) action on access to nonexistent nodes - unless wildcards
are actually used.

Note that this change breaks ABI for automountd(8).

Tested by:	dhw@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-15 09:28:45 +00:00
Edward Tomasz Napierala
45c3925d9d Silence down a warning that doesn't provide any useful information unless
debug is enabled.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-15 07:09:45 +00:00
Edward Tomasz Napierala
6392ec7159 Make automount(8)/automountd(8) treat percent sign as a valid part
of path.  It's useful for spaces encoded as %20 as msdosfs labels.

Submitted by:	glebius@
MFC after:	1 month
2014-10-14 19:55:34 +00:00
Neel Natu
f1a52b6917 IFC @r273066 2014-10-14 03:39:31 +00:00
Devin Teske
09866e97a6 Rename awk(1) implementation of GNU awk's built-in asorti() function to
prevent fatal conflict should one-true-awk ever be replaced -- e.g., in
an appliance -- with GNU awk. NB: Renamed my implementation to _asorti()

MFC after:	3 days
X-MFC-to:	stable/10, stable/9
2014-10-14 03:22:37 +00:00
Devin Teske
489979a77d Fix awk(1) asorti() implementation to work when called in a loop.
MFC after:	3 days
X-MFC-to:	stable/10, stable/9
2014-10-14 03:11:46 +00:00
Xin LI
f972197651 Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile.
This allows us to use libevent for other application in the future.

For now libevent is still INTERNALLIB and no shared library is installed.

MFC after:	1 month
2014-10-13 22:15:26 +00:00
Nathan Whitehorn
403a3c8c82 Only allow ZFS boot on GPT; the MBR ZFS bootblocks cannot be installed using
gpart bootcode as /boot/zfsboot needs to be split into multiple pieces by
hand and copied to different areas of the partition.
2014-10-12 17:59:31 +00:00
Nathan Whitehorn
be01d6e9f2 Centralize determination of boot firmware (UEFI vs. BIOS/CSM) into a
function x86_bootmethod() and fix deviations from style(9).
2014-10-12 17:50:25 +00:00
Alexander Motin
555e99a3bf Improve and document ctladm portlist subcommand.
Make this subcommand less FC-specific, reporting target and port addresses
in more generic way.  Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.

MFC after:	1 week
2014-10-12 06:55:34 +00:00
Hiroki Sato
e72e4280cf Check buffer length more strictly.
MFC after:	1 day
2014-10-11 23:24:09 +00:00
Hiroki Sato
0546aa1b97 Fix off-by-one.
MFC after:	1 day
2014-10-11 23:08:00 +00:00
Jilles Tjoelker
3e83ac2bfa pstat(8): Correct description of the SESS column in pstat -t.
MFC after:	1 week
2014-10-11 21:53:06 +00:00
Hiroki Sato
e58fde506c Fix buffer overrun.
MFC after:	1 day
2014-10-11 20:46:06 +00:00
Neel Natu
ed6aacb51f IFC @r272887 2014-10-10 23:52:56 +00:00
Neel Natu
faba66190e Fix bhyvectl so it works correctly on AMD/SVM hosts. Also, add command line
options to display some key VMCB fields.

The set of valid options that can be passed to bhyvectl now depends on the
processor type. AMD-specific options are identified by a "--vmcb" or "--avic"
in the option name. Intel-specific options are identified by a "--vmcs" in
the option name.

Submitted by:	Anish Gupta (akgupt3@gmail.com)
2014-10-10 21:48:59 +00:00
Alexander Motin
19720f4113 Make ctld start even if some LUNs are unable to open backing storage.
Such LUNs will be visible to initiators, but return "not ready" status
on media access commands.  If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.
2014-10-10 19:41:09 +00:00
Neel Natu
5295c3e61d Support Intel-specific MSRs that are accessed when booting up a linux in bhyve:
- MSR_PLATFORM_INFO
- MSR_TURBO_RATIO_LIMITx
- MSR_RAPL_POWER_UNIT

Reviewed by:	grehan
MFC after:	1 week
2014-10-09 19:13:33 +00:00
Neel Natu
02c282e862 iasl(8) expects integer fields in data tables to be specified as hexadecimal
values. Therefore the bit width of the "PM Timer Block" was actually being
interpreted as 50-bits instead of the expected 32-bit.

This eliminates an error message emitted by a Linux 3.17 guest during boot:
"Invalid length for FADT/PmTimerBlock: 50, using default 32"

Reviewed by:	grehan
MFC after:	1 week
2014-10-09 19:02:32 +00:00
Dag-Erling Smørgrav
25f5ad760c Two more places where login_setcryptfmt() defaults to MD5 were missed
in r252688.

MFC after:	3 days
2014-10-09 17:39:11 +00:00
Enji Cooper
56695221dd Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua
In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-09 00:32:33 +00:00
Mark Johnston
9f08174d47 If we fail to send a signal after rotation, print the pidfile from which
the corresponding PID was obtained.

PR:		194143
Submitted by:	Lyndon Nerenberg <lyndon@orthanc.ca>
MFC after:	1 week
2014-10-08 17:44:30 +00:00
Alexander Motin
5396f4d279 Implement software (mode page) and hardware (config) write protection. 2014-10-08 12:24:24 +00:00
Edward Tomasz Napierala
7ebeea9aa6 Remove call to access(2) which didn't serve any purpose, and make it more
tolerant to errors.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-07 19:08:02 +00:00
Neel Natu
8ccb28efcd Implement the FLUSH operation in the virtio-block emulation.
This gets rid of the following error message during FreeBSD guest bootup:
"vtbd0: hard error cmd=flush fsbn 0"

Reported by:	rodrigc
Reviewed by:	grehan
2014-10-07 17:08:53 +00:00
John Baldwin
23c7e79ad8 Properly set the timeout in a query_state. The global query_timeout
configuration value is an integer count of seconds, it is not a timeval.
Using memcpy() to copy a timeval from it put garbage into the tv_usec
field.

PR:		194025
Submitted by:	David Shane Holden <dpejesh@yahoo.com>
MFC after:	1 week
2014-10-06 18:16:45 +00:00
Brad Davis
4630309ca3 - Add some tests for modifying groups
Reviewed by:	will
2014-10-06 00:16:23 +00:00
Neel Natu
107af8f2ed IFC @r272481 2014-10-05 01:28:21 +00:00
Peter Grehan
8b58e6af3c Add new fields in the FADT, required by IASL 20140926-64.
The new IASL from the recent acpi-ca import will error out
if it doesn't see these new fields, which were previously
reserved.

Reported by:	lme
Reviewed by:	neel
2014-10-03 17:27:30 +00:00
Brad Davis
a85f6c3043 - Add a test for bug 191427 where pw(8) will go into an infinite loop
Reviewed by:	will
MFC after:	1 month
2014-10-02 19:53:37 +00:00
Jung-uk Kim
313a0c13ef Merge ACPICA 20140926. 2014-10-02 19:11:18 +00:00
Devin Teske
bd1df63614 Optimize program flow for execution speed. Also fix some more style(9) nits
while here:
+ Fix an issue when extracting small archives where dialog_mixedgauge was
  not rendering; leaving the user wondering if anything happened.
+ Add #ifdef's to assuage compilation against older libarchive
  NB: Minimize diff between branches; make merging easier.
+ Add missing calls to end_dialog(3)
+ Change string processing from strtok(3) to strcspn(3) (O(1) optimization)
+ Use EXIT_SUCCESS and EXIT_FAILURE instead of 0/1
+ Optimize getenv(3) use, using stored results instead of calling repeatedly
  NB: Fixes copy/paste error wherein we display getenv(BSDINSTALL_DISTDIR) in
      an error msgbox when chdir(2) to getenv(BSDINSTALL_CHROOT) fails
      (wrong variable displayed in msgbox).
+ Use strtol(3) instead of [deprecated] atoi(3)
+ Add additional error checking (e.g., check return of archive_read_new(3))
+ Assign DECONST strings to static variables
+ Fix typo in distextract.c error message (s/Could could/Could not/)
+ Add comments and make a minor whitespace adjustment

Reviewed by:	nwhitehorn, julian
2014-10-01 18:59:57 +00:00
Devin Teske
82ac9f2bf7 Use snprintf(3) in place of unbounded sprintf(3) (prevent buffer overflow).
Use adequately sized buffer for error(s) (512 -> PATH_MAX + 512).
Fix the following style(9) nits while here:
- distfetch.c uses PATH_MAX while distextract.c uses MAXPATHLEN;
  standardize on one (PATH_MAX)
- Move $FreeBSD$ from comment to __FBSDID()
- Sort included headers (alphabetically, sys/* at top)
- Add missing header includes (e.g., <stdlib.h> for getenv(3),
  calloc(3)/malloc(3)/free(3), and atoi(3); <string.h> for strdup(3),
  strrchr(3), strsep(3), and strcmp(3); <ctype.h> for isspace(3); and
  <unistd.h> for chdir(2), etc.)
- Remove rogue newline at end of distfetch.c
- Don't declare variables in if-, while-, or other statement
NB: To prevent masking of prior declarations atop function
- Perform stack alignment for variable declarations
- Add missing function prototype for count_files() in distextract.c
- Break out single-line multivariable-declarations
NB: Aligning similarly-named variables with one-char difference(s)
NB: Minimizes diffs and makes future diffs more clear
- Use err(3) family of functions (requires s/int err;/int retval;/g)

Reviewed by:	nwhitehorn, julian
2014-09-29 00:35:12 +00:00
Allan Jude
1aec0f4f91 Change the /var dataset in the default ZFS layout to have the
ZFS property canmount=off so that /var/db/pkg and other such directories
are part of the / dataset, and only /var/mail, /var/log, and /var/crash
are excluded from the ZFS boot environment (beadm).

PR:		193971
Approved by:	jmg
MFC after:	ASAP
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
2014-09-28 21:44:23 +00:00
Yoshihiro Takahashi
2606213f89 - Cleanups pc98 code.
- Remove unworked formats.
2014-09-28 11:32:46 +00:00
Neel Natu
970388bf8d IFC @r272185 2014-09-27 22:15:50 +00:00
Neel Natu
d3e19acf3d After r271635 mmap(2) requires either MAP_PRIVATE or MAP_SHARED
for non-anonymous mappings.

This gets 'bhyvectl --get-all' working again.

Reported by:	Anish Gupta (akgupt3@gmail.com)
2014-09-27 03:43:49 +00:00
Dag-Erling Smørgrav
58eb9abb31 Add a line to the post-installation configuration dialog to enable the
local_unbound service.

MFC after:	3 days
2014-09-26 11:38:10 +00:00
Edward Tomasz Napierala
c37463b3e8 Fix thinko that, with two map entries like shown below, in that order,
made automountd(8) mix them up: trying to access the second one would
trigger mount for the first one.

foo             host:/foo
foobar          host:/foobar

PR:		193584
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-09-23 19:12:06 +00:00
Bryan Drewery
0fb1b79f4d Make it more explicitly clear that -t will not change filename.
MFC after:	3 days
2014-09-23 13:58:39 +00:00
Peter Grehan
5ed6ab5baa Correct display of bhyve SMBIOS UUIDs with dmidecode by bumping the version.
The mixed little/big-endianness of SMBIOS UUIDs was clarified in v2.6
of the SMBIOS spec. dmidecode uses the reported version of SMBIOS to
determine the layout and what to byte-swap.

bhyve's SMBIOS reported as 2.4 though it implemented the 2.6-style of
memory layout. This resulted in dmidecode reporting a different
UUID than one passed in via the -U option.

Fix by exporting a version of 2.6.

Reviewed by:	tychon
Reported by:	julian
MFC after:	1 day
2014-09-23 01:17:22 +00:00
Neel Natu
8f02c5e456 IFC r271888.
Restructure MSR emulation so it is all done in processor-specific code.
2014-09-20 21:46:31 +00:00
Neel Natu
b6cf6c8ca6 IFC @r271887 2014-09-20 06:27:37 +00:00
Neel Natu
c3498942a5 Restructure the MSR handling so it is entirely handled by processor-specific
code. There are only a handful of MSRs common between the two so there isn't
too much duplicate functionality.

The VT-x code has the following types of MSRs:

- MSRs that are unconditionally saved/restored on every guest/host context
  switch (e.g., MSR_GSBASE).

- MSRs that are restored to guest values on entry to vmx_run() and saved
  before returning. This is an optimization for MSRs that are not used in
  host kernel context (e.g., MSR_KGSBASE).

- MSRs that are emulated and every access by the guest causes a trap into
  the hypervisor (e.g., MSR_IA32_MISC_ENABLE).

Reviewed by:	grehan
2014-09-20 02:35:21 +00:00
Steven Hartland
92958cd02d Style (9) fixes, spaces to tabs.
Fix style issues noticed when I went to MFC r257820

MFC after:	2 days
X-MFC-With:	r257820
Sponsored by:	Multiplay
2014-09-19 23:38:44 +00:00
Alexander Motin
8cf98331b0 Make kernel to update LUN size from the backing storage on configuration
reload also if that size was not specified in the new configuration.

Previously it happened only if size was explicitly changed in config.

MFC after:	3 days
2014-09-18 17:39:04 +00:00
Pedro F. Giffuni
7162347871 lpr: replace setpgrp(2) with setpgid(2).
setpgid(2) is more portable than setpgrp(2).
The BSD variant of setpgrp is a wrapper for
setpgid(2) anyways.

MFC after:	5 weeks
2014-09-18 17:01:45 +00:00
Will Andrews
76479f1d3f Fix incremental builds involving non-root users with read-only source files.
Makefiles should not assume that source files can be overwritten.  This is the
common case for Perforce source trees.

This is a followup commit to r211243 in the same vein.

MFC after:	1 month
Sponsored by:	Spectra Logic
MFSpectraBSD:	r1036319 on 2014/01/29, r1046711 on 2014/03/06
2014-09-18 14:41:57 +00:00
Davide Italiano
9d5a327fb5 r258695 introduces a sanity check for makefs in order to verify that
the minimum image size specified is always less than the maximum
image size. If makefs(1) is invoked specifying minimum image size,
but not maximum one, the program exits with an error. Example:

# sudo -E makefs -M 538968064 -B be /home/davide/disk.img $DESTDIR
makefs: `/home/davide/tftproot/mips' minsize of 538968064 rounded up
to ffs bsize of 8192 exceeds maxsize 0.  Lower bsize, or round the
minimum and maximum sizes to bsize.

Assert then that minsize < maxsize iff maxsize is specified.
This change allows me to build MIPS images using makefs(1) and following
what specified in the wiki again.

Reviewed by:	jmallett, ngie
2014-09-18 03:11:59 +00:00
Neel Natu
4e27d36d38 IFC @r271694 2014-09-17 18:46:51 +00:00
Glen Barber
7fca1ad503 Update the bhyve(8) manual to reflect that it is no
longer considered 'experimental.'

Reviewed by:	grehan
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-09-17 16:45:20 +00:00
Edward Tomasz Napierala
4f66b23341 Fix two small nits in ctl.conf(5).
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-09-14 08:35:44 +00:00
Neel Natu
bbadcde418 Set the 'vmexit->inst_length' field properly depending on the type of the
VM-exit and ultimately on whether nRIP is valid. This allows us to update
the %rip after the emulation is finished so any exceptions triggered during
the emulation will point to the right instruction.

Don't attempt to handle INS/OUTS VM-exits unless the DecodeAssist capability
is available. The effective segment field in EXITINFO1 is not valid without
this capability.

Add VM_EXITCODE_SVM to flag SVM VM-exits that cannot be handled. Provide the
VMCB fields exitinfo1 and exitinfo2 as collateral to help with debugging.

Provide a SVM VM-exit handler to dump the exitcode, exitinfo1 and exitinfo2
fields in bhyve(8).

Reviewed by:	Anish Gupta (akgupt3@gmail.com)
Reviewed by:	grehan
2014-09-14 04:39:04 +00:00
Nathan Whitehorn
d73bf00760 ZFS support isn't actually experimental anymore, so no need to scare
people.
2014-09-14 02:31:53 +00:00
Allan Jude
1230701891 Make the root-on-zfs part of the installer warn a user who booted the installer via UEFI that we do not support booting ZFS via UEFI yet
PR:		193595
Approved by:	nwhitehorn
MFC after:	5 days
Sponsored by:	ScaleEngine Inc.
CR:		https://reviews.freebsd.org/D782
2014-09-14 01:57:22 +00:00
Allan Jude
ce20734f95 Resolve an ambiguity with the definition of a new auth-group
Resolve a markup mistake

Reviewed by:	trasz
Approved by:	bcr (mentor), wblock (mentor)
Sponsored by:	ScaleEngine Inc.
CR:		https://reviews.freebsd.org/D735
2014-09-13 23:50:51 +00:00
Nathan Whitehorn
7c1db22805 Rename the choices in the partitioning methods dialog to reflect current
reality. In particular, draw a connection between the auto ZFS script and
the auto UFS one, since they fulfill similar functions. I'm not sure the
auto ZFS code is actually experimental anymore, so it might be worth
changing that label still.
2014-09-13 22:14:19 +00:00
Nathan Whitehorn
44a25dd6c6 Make the default choice for the chroot shell at the end be "No". This allows
just pressing enter repeatedly to successfully install a reasonable system.
2014-09-13 22:03:51 +00:00
Allan Jude
4f9ec02771 Add the new iscsi(4) man page
Cross reference it from iscsid(8) and iscsictl(8)

Reviewed by:	trasz
Approved by:	bcr (mentor), wblock (mentor)
Sponsored by:	ScaleEngine Inc.
CR:		https://reviews.freebsd.org/D741
2014-09-13 18:40:12 +00:00
Nathan Whitehorn
6e15678a47 Add ZFS support to the bsdinstall partition editor and sade.
Submitted by:	Kurt Lidl (original version)
MFC after:	6 weeks
2014-09-13 18:24:54 +00:00
Alexander Motin
ab55ae255a Implement control over command reordering via options and control mode page.
It allows to bypass range checks between UNMAP and READ/WRITE commands,
which may introduce additional delays while waiting for UNMAP parameters.
READ and WRITE commands are always processed in safe order since their
range checks are almost free.
2014-09-13 10:34:23 +00:00
Alexander Motin
8e6441d87d Add "readcache" and "writecache" LUN options to control default behavior.
Default values are "on".  Disabling requires backend to support IO_DIRECT
and IO_SYNC flags respectively, or some alternatives.
2014-09-13 08:55:22 +00:00
Xin LI
e72055b7fe Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

This is a stable/10 candidate for inclusion with 10.1-RELEASE.

Submitted by:	Wei Hu <weh microsoft com>
MFC after:	1 week
2014-09-13 02:15:31 +00:00
Allan Jude
263be6a9d1 Fix minor syntax error
Submitted by:	bjk
Approved by:	bcr (mentor)
Sponsored by:	ScaleEngine Inc.
2014-09-12 00:55:42 +00:00
Allan Jude
d1e933edda Improve markup and language throughout the ctl.conf man page
Reviewed by:	trasz
Approved by:	bcr (mentor)
Sponsored by:	ScaleEngine Inc.
2014-09-12 00:08:19 +00:00
Neel Natu
1aba8e7ff8 Initialize 'bc_rdonly' to the right value.
Note that independent of this change a readonly disk file would still be
opened O_RDONLY and protected from writes by the guest.

Reviewed by:	grehan
2014-09-11 21:15:20 +00:00
Edward Tomasz Napierala
0686a20b8a Don't blindly assume the target agreed to transition to Full Feature Phase;
if we got a Login Response PDU without the "T" bit set, try again with
an empty request.  This fixes interoperability with COMSTAR.

Reviewed by:	mav@
Tested by:	mav@
MFC after:	1 week
2014-09-11 20:01:57 +00:00
Alan Somers
cec2add46f Conditionalize build of etcupdate(8) on MK_RCS. Since etcupdate calls
merge(1), which is part of the RCS package, it must not be installed if
WITHOUT_RCS update is set. Otherwise, it will produce confusing errors.

CR:		https://reviews.freebsd.org/D691
MFC after:	1 week
Sponsored by:	Spectra Logic
2014-09-10 19:00:17 +00:00
Alexander Motin
eb4e5b0ad5 Fix memory leak, reported by Coverity.
CID:		1229996
2014-09-10 08:06:31 +00:00
Peter Grehan
82560f19d0 Allow vtnet operation without merged rx buffers.
NetBSD's virtio-net implementation doesn't negotiate
the merged rx-buffers feature. To support this, check
to see if the feature was negotiated, and then adjust
the operation of the receive path accordingly by using
a larger iovec, and a smaller rx header.
In addition, ignore writes to the (read-only) status byte.

Tested with NetBSD/amd64 5.2.2, 6.1.4 and 7-beta.

Reviewed by:	neel, tychon
Phabric:	D745
MFC after:	3 days
2014-09-09 22:35:02 +00:00
Edward Tomasz Napierala
2e779f745b Use keys_add_int() where appropriate. No functional changes.
Sponsored by:	The FreeBSD Foundation
2014-09-09 16:57:02 +00:00
Edward Tomasz Napierala
dce704a67a Fix ctld(8) to not forget to send TargetPortalGroupTag and TargetAlias
when the initiator skips security negotiation.  This fixes interoperability
with Xtend SAN initiator.

PR:		193021
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-09-09 16:45:36 +00:00
Peter Grehan
e18f344b9b Add a callback to be notified about negotiated features.
Submitted by:	luigi
Obtained from:	Vincenzo Maffione, Universita` di Pisa
MFC after:	3 days
2014-09-09 04:11:54 +00:00
Dag-Erling Smørgrav
24de4f90fa Fix support for IPv6 nameservers.
PR:		188931
Submitted by:	Takefu <takefu@airport.fm>
MFC after:	3 days
2014-09-08 09:16:07 +00:00
Edward Tomasz Napierala
44a5953aa1 Avoid ctld(8) crash on getaddrinfo(3) failure.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-09-06 09:03:13 +00:00
Edward Tomasz Napierala
a5f9f526bd Document initiator-portal netmask support.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-09-05 14:58:24 +00:00
Edward Tomasz Napierala
0488e848d9 Turn two errors, which are possible to trigger only by bugs,
into assertions.

Discussed with:	mav@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-09-05 14:48:06 +00:00
Edward Tomasz Napierala
a5e9e2bee7 Make it possible to quote names in autofs maps using double quotes.
Note that this is a workaround, not a proper solution.  If you know
lex well, and want to help - please let me know, I'll explain how it
should work.

PR:		192968
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-09-05 14:32:09 +00:00
Edward Tomasz Napierala
d69440367c Fix typo.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-09-05 11:10:44 +00:00
Devin Teske
b74ae45b45 Fix regression introduced by SVN r270954. Correct way to reset getopts
is to set OPTIND to 1, not unset it (which causes an error).

Thanks to:	jilles
2014-09-02 22:59:40 +00:00