14433 Commits

Author SHA1 Message Date
trasz
57c5c94274 MFC r261749:
Refactor.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:53:47 +00:00
trasz
b76cdca91a MFC r261768:
Make the debug messages during ctld(8) shutdown less confusing.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:46:46 +00:00
trasz
68324fc037 MFC r261767:
Show proper configuration file line numbers in error messages.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:45:03 +00:00
trasz
e5c161c379 MFC r261766:
Make ctld error out on invalid characters in ctl.conf.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:43:09 +00:00
trasz
70b9e78e3d MFC r261765:
Improve error reporting.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:41:10 +00:00
glebius
dd5a1b8699 Merge r263658 from head: remove unneeded fake _KERNEL definition.
Should fix broken builds.
2014-03-23 19:07:14 +00:00
bdrewery
4cc5e3a4e5 MFC r263181:
Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL conversion.
2014-03-22 10:47:49 +00:00
bdrewery
cbf71ae1cf MFC r263180:
Fix ABI from /usr/local/etc/pkg.conf not being respected.
2014-03-22 10:40:04 +00:00
glebius
f937dcf2bd Bulk sync of pf changes from head, in attempt to fixup broken build I
made in r263029.

Merge r257186,257215,257349,259736,261797.

These changesets split pfvar.h into several smaller headers and make
userland utilities to include only some of them.
2014-03-12 10:45:58 +00:00
jhb
cbdb898ddf MFC 261030:
Similar to cap_mkdb(1), add endianness support to services_mkdb(1)
to support cross-builds once this is invoked during releases.
2014-03-11 15:28:41 +00:00
bapt
cc2de0e857 r262400,r262401,r262418
Sync pkg(7) with head
2014-03-11 13:16:03 +00:00
trasz
2e120a0184 MFC r261748:
So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).

This makes those short-lived iscsid(8) zombies disappear.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:15:54 +00:00
trasz
222c71033f MFC r261747:
Empty data segment during Login Phase is rather unlikely, but it's not
a protocol error.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:14:36 +00:00
trasz
80217e6e6e MFC r261715:
The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of __printf0like.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:13:26 +00:00
zeising
a43dfff75f MFC r261832-261834:
r261832:
    Add cross references between rc.conf(5) and jail.conf(5).

r261833:
    Add commas (,) to the list in the SEE ALSO section, to match most
    other manuals.

r261834:
    Bump .Dd forgotten in r261832.
2014-03-06 10:26:25 +00:00
brueffer
2a078eee0e MFC: r262494
Rough cleanup (new sentence -> new line, grammar, spelling, mdoc).
This could use more work.

PR:		187035 (in part)
Submitted by:	Bjorn Heidotting
2014-03-05 13:25:01 +00:00
tijl
bcdab2824d Revert r262648 to stop severe tinderbox spamming on stable@. 2014-03-01 13:00:40 +00:00
brooks
ac9b0c8c58 MFC r261299:
Merge from CheriBSD:
commit 2d581e8caf79d7a0f5a24590eccd06da90cccb74
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Mon Jan 27 22:57:51 2014 +0000

	Add WITHOUT_FMTREE to disable building fmtree.

Sponsored by:	DARPA, AFRL
2014-03-01 04:25:52 +00:00
brooks
1135c91d00 MFC: 261298
Merge from CheriBSD:
commit 70b8f0c127db6b80411789d237b403cc64a93573
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Mon Jan 27 22:53:57 2014 +0000

	Move mtree.5 to usr.sbin/nmtree.
	Remove note that mtree 2.0 format files aren't supported.

Sponsored by:	DARPA, AFRL
2014-03-01 03:39:56 +00:00
brooks
12b5ca7c28 MFC r261296:
Merge from CheriBSD:
commit c1acf022c533c5ae27e0cd556977eafe3f5959eb
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Fri Jan 17 21:46:44 2014 +0000

	Add an option WITHOUT_NCURSESW to suppress building and linking to
	libncursesw.  While wide character support it useful we'd like to
	only need one ncurses library on embedded systems.

Sponsored by:	DARPA, AFRL
2014-03-01 03:09:16 +00:00
des
9dee28c898 MFH (r261511, r261542): add an example to the man page 2014-02-27 17:31:59 +00:00
brueffer
f1dc1aea80 MFC: r261773
In acline_init(), initialize ac_line to SRC_UNKNOWN.  Previously
this could lead to the -n option effectively being ignored (in case
ac_line happened to be 0 aka SRC_AC), or other undefined behaviour.

PR:		169779
Submitted by:	Alex Gonzalez <loox at e-shell.com>
Reviewed by:	jhb
2014-02-25 07:55:03 +00:00
jhb
69d17427ca MFC 258859,259081,259085,259205,259213,259275,259482,259537,259702,259779:
Several changes to the local APIC support in bhyve:
- Rename 'vm_interrupt_hostcpu()' to 'vcpu_notify_event()'.
- If a vcpu disables its local apic and then executes a 'HLT' then spin
  down the vcpu and destroy its thread context. Also modify the 'HLT'
  processing to ignore pending interrupts in the IRR if interrupts have
  been disabled by the guest.  The interrupt cannot be injected into the
  guest in any case so resuming it is futile.
- Use callout(9) to drive the vlapic timer instead of clocking it on each
  VM exit.
- When the guest is bringing up the APs in the x2APIC mode a write to the
  ICR register will now trigger a return to userspace with an exitcode of
  VM_EXITCODE_SPINUP_AP.
- Change the vlapic timer lock to be a spinlock because the vlapic can be
  accessed from within a critical section (vm run loop) when guest is using
  x2apic mode.
- Fix the vlapic version register.
- Add a command to bhyvectl to inject an NMI on a specific vcpu.
- Add an API to deliver message signalled interrupts to vcpus. This allows
  callers to treat the MSI 'addr' and 'data' fields as opaque and also lets
  bhyve implement multiple destination modes: physical, flat and clustered.
- Rename the ambiguously named 'vm_setup_msi()' and 'vm_setup_msix()' to
  'vm_setup_pptdev_msi()' and 'vm_setup_pptdev_msix()' respectively.
- Consolidate the virtual apic initialization in a single function:
  vlapic_reset()
- Add a generic routine to trigger an LVT interrupt that supports both
  fixed and NMI delivery modes.
- Add an ioctl and bhyvectl command to trigger local interrupts inside a
  guest.  In particular, a global NMI similar to that raised by SERR# or
  PERR# can be simulated by asserting LINT1 on all vCPUs.
- Extend the LVT table in the vCPU local APIC to support CMCI.
- Flesh out the local APIC error reporting a bit to cache errors and
  report them via ESR when ESR is written to.  Add support for asserting
  the error LVT when an error occurs.  Raise illegal vector errors when
  attempting to signal an invalid vector for an interrupt or when sending
  an IPI.
- Export table entries in the MADT and MP Table advertising the stock x86
  config of LINT0 set to ExtInt and LINT1 wired to NMI.
2014-02-23 00:46:05 +00:00
brueffer
9f9257101a MFC: r261900
In chat_UpdateSet(), initialize the input buffer to prevent stale data
from previous timed out commands.

PR:		186530
Submitted by:	Alexander Zagrebin <alexz at visp.ru>
Reviewed by:	brian
2014-02-21 09:25:52 +00:00
jhb
f840747a6b MFC 261607:
Mark the I/O ports used by the bhyve console and debug devices as system
resources.
2014-02-19 18:36:53 +00:00
jhb
6e1e8b0ada MFC 260926:
Add support for displaying VPD for PCI devices via pciconf.
- Store the length of each read-only VPD value since not all values are
  guaranteed to be ASCII values (though most are).
- Add a new pciio ioctl to fetch VPD for a single PCI device.  The values
  are returned as a list of variable length records, one for the device
  name and each keyword.
- Add a new -V flag to pciconf's list mode which displays VPD data for
  each device.
2014-02-17 22:19:49 +00:00
bdrewery
92000681d7 MFC r261401:
Fix newsyslog(8) to use the size of the file instead of the blocks it
  takes on disk, as advertised in newsyslog.conf(5).

Approved by:	bapt (mentor, implicit)
2014-02-17 15:57:16 +00:00
markj
2a0c06b067 MFC r257600:
Initialize the struct tm before handing it to strptime(3).
2014-02-13 04:54:47 +00:00
eadler
ec294fd7f5 MFC r258779,r258780,r258787,r258822:
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit.  Instead use (1U << 31) which gets the
expected result.

Similar to the (1 << 31) case it is not defined to do (2 << 30).

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.
2014-02-04 03:36:42 +00:00
jhb
647b92bf0a MFC 260206:
Rework the DSDT generation code a bit to generate more accurate info about
LPC devices.  Among other things, the LPC serial ports now appear as
ACPI devices.
2014-01-29 13:35:12 +00:00
jhb
2fa5ef25cf MFC 260910:
- Allow PCI devices that are attached to a driver to be identified by their
  device name instead of just the selector.
- Accept an optional device argument to -l to restrict the output to only
  listing details about a single device.  This is mostly useful in
  conjunction with other flags like -e or -c to allow a user to query
  details about a single device.
2014-01-28 21:56:18 +00:00
ache
1626ab813a MFC: r261146
Bad timespec_subtract() calculations produce negative tv_nsec on i386
which cause EINVAL returned from nanosleep() which cause loop in
cron_sleep() and making all cron jobs to start about 30 seconds earlier
(which cause f.e. logfiles rotation by newsyslog delayed by 1 hour).

Use simple and proved calculations from kernel's timespecsub() instead.
2014-01-28 13:29:54 +00:00
glebius
c3a529c9ca Merged /head:r256510,256512,257376,257469,260052:
Make 'netstat -i' use getifaddrs(3) instead of kvm(3).
2014-01-27 08:15:21 +00:00
bapt
4b032c82b7 Implicit include of sys/queue.h instead of relying on gelf.h/libelf.h to bring it
Newer version of gelf.h and libelf.h does not include sys/queue.h anymore

Submitted by:	kaiw
2014-01-25 01:08:35 +00:00
jhb
6414202f61 MFC 259826,259997,259998:
Support soft power-off via the ACPI S5 state for bhyve guests and wire
up a virtual power button to SIGTERM:
- Implement the PM1_EVT and PM1_CTL registers required by ACPI.
- Emulate the Reset Control register at I/O port 0xcf9.
- Advertise an _S5 package.
- Implement an SMI_CMD register with commands to enable and disable ACPI.
  Currently the only change when ACPI is enabled is to enable the virtual
  power button via SIGTERM.
- Implement a fixed-feature power button when ACPI is enabled by asserting
  PWRBTN_STS in PM1_EVT when SIGTERM is received.
- Add support for EVFILT_SIGNAL events to mevent.
- Implement support for the ACPI system command interrupt (SCI) and assert
  it when needed based on the values in PM1_EVT.  Mark the SCI as active-low
  and level triggered in the MADT and MP Table.
2014-01-23 20:35:32 +00:00
jhb
e1016866c7 MFC 257422,257661,258075,258476,258494,258579,258609,258699:
Several enhancements to the I/O APIC support in bhyve including:
- Move the I/O APIC device model from userspace into vmm.ko and add
  ioctls to assert and deassert I/O APIC pins.
- Add HPET device emulation including a single timer block with 8 timers.
- Remove the 'vdev' abstraction.

Approved by:	neel
2014-01-23 20:21:39 +00:00
glebius
6cb9337539 Merge r259855: We have in base iconv.
PR:		185135
2014-01-22 10:35:30 +00:00
dteske
1f9d47c9f7 MFC r260261 (gavin):
Lower the priority of the "connect to any open wireless network" network
description, so guaranteeing that any other defined network will be tried
first.

MFC r260262 (gavin):
Allow bsdinstall to use WPA-Enterprise networks when installing.  This
only allows basic username/password config, and does not provide the
ability to set any of the other WPA options.  Regardless, this is
generally sufficient to associate.

Perhaps in the future this could allow full configuring (e.g. being able
to set "anonymous identity", and perhaps some of the more obscure WPA
options), though perhaps that will better belong in bsdconfig when that
grows wlan config ability.
2014-01-15 08:17:31 +00:00
dteske
b12b4da87e MFC r260260 (gavin): Remove what appears to be a stray debugging printf. 2014-01-15 08:12:19 +00:00
dteske
c7d6611e4d MFC r259686:
Move the installer's keymap solution introduced by SVN r259468. The new
location of /etc/rc.local on the install media is more appropriate as it
knows serial vs. non-serial and can also do the change earlier (so that
even the initial Install dialog can benefit from the change).

Discussed with:	nwhitehorn
2014-01-15 08:10:41 +00:00
dteske
75e3be07b8 MFC r257824,257826-257830,258411: Updates to sysrc(8)
257824: Fix a bug with `-d' form working as documented
257826: Add `--version' long option
257827: Add a `-c' option for `check only'
257828: Comments and whitespace
257829: Fix a bug with `-e' introduced by above 257828
257830: Document SYSRC_VERBOSE enviroment variable in the manual
258411: Revert the above 257830 (both merged to get .Dd bump in man-page)
2014-01-15 08:03:01 +00:00
dteske
a35804263c MFC r259054:
Performance and debugging enhancements:
+ Remove UNAME_P=$(...) from startup/misc -- already supplied by common.subr
+ Use f_getvar instead of $(eval echo \$$var) -- f_getvar is sub-shell free
+ Add `-e' and `-k var' options to f_eval_catch -- increasing use-cases
+ Use f_eval_catch to display errors on failure -- reducing duplicated code
+ Use f_eval_catch when we need output from a command -- improving debugging
+ Optimize f_isinter of strings.subr for performance -- now sub-shell free
+ Improve error checking on pidfiles -- using f_eval_catch and f_isinteger
+ Use $var_to_set arg of f_ifconfig_{inet,netmask} -- eliminate sub-shells
+ Use f_sprintf instead of $(printf ...) -- consolidate sub-shells
+ Use $var_to_set arg of f_route_get_default -- eliminate sub-shells
+ Add f_count to replace $(set -- ...;echo $#) -- eliminate sub-shells
+ Add f_count_ifs to replace $(IFS=x;set -- ...;echo $#) -- no sub-shells
+ Replace var="$var${var:+ }..." in loops with var="$var ..." with a follow-
  up var="${var# }" to trim leading whitespace -- optimize loops
+ Use $var_to_set arg of f_resolv_conf_nameservers -- eliminate sub-shells
+ Comments for the f_eval_catch function
+ Remove a duplicate `local ... desc ...' in f_device_get_all of device.subr
+ Use $var_to_set arg of f_device_capacity -- eliminate sub-shells
+ Whitespace fixes in f_dialog_init of dialog.subr
+ Optimize f_inet_atoi of media/tcpip.subr for performance -- sub-shell free
+ In several cases, send stderr to /dev/null -- clean up runtime execution
+ Change f_err of common.subr to go to program stderr not terminal stderr,
  allowing redirection of output from functions that use f_err
+ Disable debugging when using f_getvar to get variable argument to
  f_startup_rcconf_map_expand of startup/rcconf.subr
+ Use f_replace_all instead of $(echo ... | tr | sed) -- performance
+ Add a $var_to_set option to f_index_{file,menusel_{command,keyword}} of
  common.subr -- centralize sub-shells
2014-01-15 07:49:17 +00:00
dteske
44abef9537 MFC r258458:
Improve network device scanning in the netdev module. First, make it use the
`device.subr' framework (improving performane and reducing sub-shells). Next
improve the `device.subr' framework itself. Make use of the `flags' device
struct member for network interfaces to indicate if an interface is Active,
Wired Ethernet, or 802.11 Wireless. Functions have been added to make checks
against the `flags' bit-field quick and efficient. Last, add function for
rescanning the network to update the device registers. Remove an unnecessary
local (ifn) while we're here (use already provided local `if').
2014-01-15 07:42:31 +00:00
dteske
a623494f5e MFC r258355,258360,258400-258401,258406-258407,258418,258430,258439,258589-
258590,258592,258727-258728,258785, with the following descriptions:

Revisions 258400-258401,258406-258407,258590,258727-258728,258785:
+ Add a new `includes' module (see: bsdconfig includes -h) for exploring
  the bsdconfig(8) API

Remaining revisions:
258592: Sort all the messages.subr files
258355: Fix typo in a comment in networking/device.subr
258360: Whitespace, style, and other changes in networking/device.subr
258418: Quote interface names for good measure in networking/device.subr
258430: Remove an unused line in networking/device.subr
258439: Minor bugfix to f_die() function in common.subr
258589: Minor bugfix to syscons_ttys module
2014-01-15 07:36:34 +00:00
remko
dfee5da730 MFC r260446
virtio-block does not exist, the correct name is virtio-blk.

  PR:	    185573
  Submitted by:    Allan Jude
  Facilitated by: Snow B.V.
2014-01-11 23:10:59 +00:00
dim
01c13c7d48 MFC r260334:
Split the last gcc-specific flags off into CFLAGS.gcc.  This also
removes the need to use -Qunused-arguments for clang throughout the
tree.

MFC r260369:

Apply band-aid for 32-bit compat libs failures after r260334: put back
-Qunused-arguments for clang for now, until I can figure out a way to
make it unneeded in all scenarios.  Sorry about the breakage.
2014-01-09 23:08:56 +00:00
trociny
5eee015d1e MFC r260049:
Add mibs for hastd(1) queue stats.
2014-01-07 21:23:41 +00:00
sbruno
1bba01828c MFC r258901:
svn r251516 resized the buf argument a bit too much. Pass a hardcoded
size of 6 to humanize_number() to resolve this.

PR:	bin/184405
Submitted by:	jhb
2014-01-05 17:29:53 +00:00
pluknet
988d1d6a86 MFC r259870:
Do not truncate the ``command'' column in ``ps'' output.
2014-01-02 15:43:23 +00:00
jhb
33f454b5c1 MFC 258063,258064,258066,258097,258185,259134:
- Add an -s option to the regression tests that specifies a path to an
  alternate etcupdate.sh script to test.  This allows a non-installed
  version of the script to be tested more easily.
- Add a pre-world mode of updating similar to the -p option that can be
  passed to mergemaster.
- Fix a couple of issues with -F:
  - Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks.
  - Fix the -F option in the case that the only upstream change is a
    change in the FreeBSD ID and the local file is removed.
- Refresh /etc/localtime after each update using tzsetup -r.
- Regenerate /var/db/services.db when /etc/services changes.
2013-12-27 19:53:42 +00:00