14407 Commits

Author SHA1 Message Date
asomers
2ab6848d63 MFC r263429
Fix kern/187712: config(8) does not respect KERNCONFDIR.
The impact of this bug is that you cannot build a kernel if both of the
following are true:
1) The kernel config file is in a non-default location
2) The kernel config file uses the "include" statement from config(5).

usr.sbin/config/main.c
usr.sbin/config/config.8
usr.sbin/config/config.h
usr.sbin/config/lang.l
	Added a "-I path" option to config(8).  By analogy to cc(1), it adds
	an extra path in which the "include" statement will search for
	files.

Makefile.inc1
        Pass "-I ${KERNCONFDIR}" to config(8).
2014-04-10 19:51:33 +00:00
dim
b4a5074609 MFC r263778:
Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
all the SUBDIR entries in parallel, instead of serially.  Apply this
option to a selected number of Makefiles, which can greatly speed up the
build on multi-core machines, when using make -j.

This can be extended to more Makefiles later on, whenever they are
verified to work correctly with parallel building.

I tested this on a 24-core machine, with make -j48 buildworld (N = 6):

		before    stddev       after    stddev
		=======   ======       =======  ======
real time        1741.1     16.5         959.8     2.7
user time       12468.7     16.4       14393.0    16.8
sys  time        1825.0     54.8        2110.6    22.8

(user+sys)/real     8.2                   17.1

E.g. the build was approximately 45% faster in real time.  On machines
with less cores, or with lower -j settings, the speedup will not be as
impressive.  But at least you can now almost max out a machine with
buildworld!

Submitted by:	jilles

MFC r263833:

Enable parallel building for gnu/usr.bin and usr.bin/clang too.
2014-04-09 18:16:58 +00:00
glebius
a25c39725c Merge r263203: garbage collect long time obsoleted (or never used) stuff
from routing API.
2014-04-09 11:15:50 +00:00
glebius
ecc4e56cfa Remove useless embedding of kernel struct rtentry into userland one.
This is direct commit to stable/10.

Sponsored by:	Nginx, Inc.
2014-04-09 11:10:44 +00:00
jhb
98708b1b49 MFC 259635:
Add an option to ignore accesses by the guest to unimplemented MSRs.

Also, ignore a couple of SandyBridge uncore PMC MSRs that Centos 6.4 writes
to during boot.
2014-04-08 20:40:54 +00:00
dteske
33929c7923 MFC revisions 260894,260899,262895-262902,262904,262908-262910,262982,
262984,263133-263137,263139,263141,263144-263150, and (partially) 263249
(31 revisions; summarized below)...
r260894: Optimize f_expand_number(), improving performance
r260899: s/__number/__num/ in f_expand_number()
r262895: Allow dispatched reswords to carry arguments
r262896: Add missing local declaration
r262897: Fix a typo in a comment
r262898: Fix incorrect return status if var_to_set and var_to_get are same
r262899: Make f_show_err non-fatal
r262900: Centralize function name; Update a comment while here
r262901: s/__num/__number/ in f_expand_number()
r262902: Comment to go with NL global introduced by previous commit
r262904: Rewrite groupmgmt -- hooking it into the scripting system
r262908: Change dispatch words from group* to *Group for backward compat
r262909: Fix copy/paste error in a comment
r262910: Take a group name on the command-line if available
r262982: Whitespace
r262984: Remove vestigial global, no longer used since r262904
r263133: Remove indexfile from debug statement (already logged)
r263134: Add debug statement just before attempting to exec a module
r263135: Comments
r263136: Update copyright
r263137: Fix future namespace issues for functions taking $var_to_set
r263139: Remove useless NULL string in compound strings
r263141: Pointy hat! Fix a broken f_isinteger()
r263144: Fix a code-typo that prevented auto-sizing of a dialog
r263145: Fix comments and whitespace
r263146: Reduce the sleep cycle when using dialog(1) [infobox] to 1-second
r263147: Fix a bug preventing errors from pw(8) from appearing
r263148: For non-interactive scripts, forgot to check argument
r263149: Add protection against input containing single-quotes
r263150: Rewrite usermgmt
r263249: (partial) Add more obsolete files
2014-04-01 00:19:13 +00:00
brueffer
91720dd7bb MFC: r262484
In puthdr(), start the ELF .data section on a new page, as this is
what btxldr expects (.set MEM_DATA,start+0x1000 in btxldr.S).

This makes resulting ELF binaries bootable with grub, gptboot and boot2.

PR:		153801
Submitted by:	Gleb Kurtsou <gleb.kurtsou at gmail.com>
Tested by:	Ruben Kerkhof <ruben at rubenkerkhof.com>
Glanced at by:	jhb, peter
2014-03-27 20:19:11 +00:00
dim
fb422e6d31 MFC r262613:
Merge the projects/clang-sparc64 branch back to head.  This brings in
several updates from the llvm and clang trunks to make the sparc64
backend fully functional.

Apart from one patch to sys/sparc64/include/pcpu.h which is still under
discussion, this makes it possible to let clang fully build world and
kernel for sparc64.

Any assistance with testing this on actual sparc64 hardware is greatly
appreciated, as there will unavoidably be bugs left.

Many thanks go to Roman Divacky for his upstream work on getting the
sparc64 backend into shape.

MFC r262985:

Repair a few minor mismerges from r262261 in the clang-sparc64 project
branch.  This is also to minimize differences with upstream.
2014-03-26 07:31:57 +00:00
trasz
59337a66a6 MFC r263356:
Make the error message more clear.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:38:43 +00:00
trasz
4a35e9f814 MFC r261752:
Empty data segment during Login Phase is rather unlikely, but it's
not, by itself, a protocol error.  This fixes interoperability with
OpenBSD initiator.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:33:16 +00:00
trasz
9a3c8da93d MFC r261751:
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-25 12:31:08 +00:00
trasz
b25383a8f9 MFC r261764:
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 ctld(8) zombies disappear.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:24:18 +00:00
trasz
5fb75e3b8f MFC r261763:
Use new auth-type "deny" instead of using "chap" with no chap entries;
it's cleaner this way, and gives better feedback to the user.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:22:30 +00:00
trasz
d3e539d4a4 MFC r261762:
Use "default" as default discovery-auth-group, instead of "no-access".
It doesn't change visible behaviour, as previously auth-group "default"
wasn't redefinable, so by default access was always denied.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:20:29 +00:00
trasz
760d220cff MFC r261761:
Update manual page to match recent auth-group "default" changes.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:18:37 +00:00
trasz
60885b6065 MFC r261760:
Add a new auth-group "default", defaulting to deny, and make it possible
to redefine it.  From now on, assigning auth-group to a target is no longer
mandatory.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:16:52 +00:00
trasz
d57dc1f923 MFC r261759:
Make it possible to redefine portal-group "default".

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:14:48 +00:00
trasz
47c8dbe543 MFC r261758:
Add auth-type.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:12:37 +00:00
trasz
b76fc2462a MFC r261757:
Rename a variable, no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:10:30 +00:00
trasz
8783fbbc56 MFC r261756:
Yacc cleanup; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:08:35 +00:00
trasz
225da9bc73 MFC r261755:
Make function ordering slightly more logical; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:06:42 +00:00
trasz
c67809725b MFC r261754:
Implement initiator-name and initiator-portal restrictions.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:01:55 +00:00
trasz
cf1ffe3cac MFC r261753:
Daemonize after applying configuration, not before, so that
any problems - including "daemon already running" - are visible
on the terminal and not just in logs.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:00:05 +00:00
trasz
930438f7d5 MFC r261750:
Improve check for duplicated paths.  It shows the warning twice for every
path (once for each duplicate found), but it should do for now.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:58:24 +00:00
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