]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoImport a new libcxxrt. This fixes some potential crashing in the demangler.
David Chisnall [Mon, 23 Sep 2013 13:16:21 +0000 (13:16 +0000)]
Import a new libcxxrt.  This fixes some potential crashing in the demangler.

Approved by: re (gjb)
MFC after: 1 week

10 years agoPrevent "lock (iscsi) sx does not match earlier (sleep mutex) lock" panic
Edward Tomasz Napierala [Mon, 23 Sep 2013 10:36:03 +0000 (10:36 +0000)]
Prevent "lock (iscsi) sx does not match earlier (sleep mutex) lock" panic
triggered by "kldload iscsi_initiator; kldunload iscsi_initiator; kldload
iscsi".

Approved by: re (marius)

10 years agoAdd a setup script for unbound(8) called local-unbound-setup. It
Dag-Erling Smørgrav [Mon, 23 Sep 2013 04:36:51 +0000 (04:36 +0000)]
Add a setup script for unbound(8) called local-unbound-setup.  It
generates a configuration suitable for running unbound as a caching
forwarding resolver, and configures resolvconf(8) to update unbound's
list of forwarders in addition to /etc/resolv.conf.  The initial list
is taken from the existing resolv.conf, which is rewritten to point to
localhost.  Alternatively, a list of forwarders can be provided on the
command line.

To assist this script, add an rc.subr command called "enabled" which
does nothing except return 0 if the service is enabled and 1 if it is
not, without going through the usual checks.  We should consider doing
the same for "status", which is currently pointless.

Add an rc script for unbound, called local_unbound.  If there is no
configuration file, the rc script runs local-unbound-setup to generate
one.

Note that these scripts place the unbound configuration files in
/var/unbound rather than /etc/unbound.  This is necessary so that
unbound can reload its configuration while chrooted.  We should
probably provide symlinks in /etc.

Approved by: re (blanket)

10 years agoLaunch the bourne shell using "sh" rather than "${SHELL}", as the latter
Ian Lepore [Mon, 23 Sep 2013 00:04:36 +0000 (00:04 +0000)]
Launch the bourne shell using "sh" rather than "${SHELL}", as the latter
may come in from the environment and reflect the user's interactive shell.
Using bare "sh" is the dominant pattern in existing makefiles.

MFC this together with r255775.

Approved by: re ()
MFC after: 2 weeks

10 years agoExport two new DCMD enums. These allow set/get of the mfi_ctrl_properties
Sean Bruno [Sun, 22 Sep 2013 23:48:41 +0000 (23:48 +0000)]
Export two new DCMD enums.  These allow set/get of the mfi_ctrl_properties
structure in the driver.

Having these in 10.0 means that mfiutil can be modified to take adavantage
of new updates without a kernel recompile.

Approved by: re (gjb)
MFC after: 2 weeks

10 years agoAlways request zeroed memory, in case we're dumb enough to leak it later.
Dag-Erling Smørgrav [Sun, 22 Sep 2013 23:47:56 +0000 (23:47 +0000)]
Always request zeroed memory, in case we're dumb enough to leak it later.

Approved by: re (gjb)

10 years agoPull in r191165 from upstream llvm trunk:
Dimitry Andric [Sun, 22 Sep 2013 22:03:30 +0000 (22:03 +0000)]
Pull in r191165 from upstream llvm trunk:

  ISelDAG: spot chain cycles involving MachineNodes

  Previously, the DAGISel function WalkChainUsers was spotting that it
  had entered already-selected territory by whether a node was a
  MachineNode (amongst other things). Since it's fairly common practice
  to insert MachineNodes during ISelLowering, this was not the correct
  check.

  Looking around, it seems that other nodes get their NodeId set to -1
  upon selection, so this makes sure the same thing happens to all
  MachineNodes and uses that characteristic to determine whether we
  should stop looking for a loop during selection.

  This should fix PR15840.

Specifically, this fixes the long-standing assertion failure when
compiling the multimedia/gstreamer port on i386.  Thanks to Tijl
Coosemans for his help in getting upstream to fix it.

Approved by: re (marius)

10 years agoRemove drill(1) if MK_LDNS_UTILS is false.
Dag-Erling Smørgrav [Sun, 22 Sep 2013 20:32:28 +0000 (20:32 +0000)]
Remove drill(1) if MK_LDNS_UTILS is false.
Remove host(1) if both MK_BIND and MK_LDNS_UTILS are false.

Approved by: re (blanket)

10 years agoBuild and install drill(1).
Dag-Erling Smørgrav [Sun, 22 Sep 2013 20:30:55 +0000 (20:30 +0000)]
Build and install drill(1).

Approved by: re (blanket)

10 years agoRevert r255797. The LK_UPGRADE | LK_NOWAIT drops the lock.
Konstantin Belousov [Sun, 22 Sep 2013 20:29:03 +0000 (20:29 +0000)]
Revert r255797.  The LK_UPGRADE | LK_NOWAIT drops the lock.

Approved by: re (marius, implicit)

10 years agoPre-acquire the filedesc sx when a possibility exists that the later
Konstantin Belousov [Sun, 22 Sep 2013 19:54:47 +0000 (19:54 +0000)]
Pre-acquire the filedesc sx when a possibility exists that the later
code could need to remove a kqueue from the filedesc list.  Global
lock is already locked, which causes sleepable after non-sleepable
lock acquisition.

Reported and tested by: pho
Reviewed by: jmg
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Approved by: re (gjb)

10 years agoIncrease the chance of the buffer write from the bufdaemon helper
Konstantin Belousov [Sun, 22 Sep 2013 19:23:48 +0000 (19:23 +0000)]
Increase the chance of the buffer write from the bufdaemon helper
context to succeed.  If the locked vnode which owns the buffer to be
written is shared locked, try the non-blocking upgrade of the lock to
exclusive.

PR: kern/178997
Reported and tested by: Klaus Weber <fbsd-bugs-2013-1@unix-admin.de>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (marius)

10 years agoLaunch the shell, passing it the path to the mk-osreldate script, rather
Ian Lepore [Sun, 22 Sep 2013 19:15:24 +0000 (19:15 +0000)]
Launch the shell, passing it the path to the mk-osreldate script, rather
than launching the script directly and relying on #! to launch the shell.
This avoids problems when the source is mounted with the noexec flag.

MFC this together with r255775.

Approved by: re (kib)
MFC after: 2 weeks

10 years agoDue to a missing command-line argument, yacc regenerated the parser but
Dag-Erling Smørgrav [Sun, 22 Sep 2013 19:09:43 +0000 (19:09 +0000)]
Due to a missing command-line argument, yacc regenerated the parser but
not its header file, resulting in a mismatch between the lexer and parser
and strange errors when reading the configuration file.

Approved by: re (blanket)

10 years agoFix indentation.
Dag-Erling Smørgrav [Sun, 22 Sep 2013 18:31:49 +0000 (18:31 +0000)]
Fix indentation.

Approved by: re (blanket)

10 years agoBoth the vm_map and vmspace zones are defined as "no free". So, there is no
Alan Cox [Sun, 22 Sep 2013 17:48:10 +0000 (17:48 +0000)]
Both the vm_map and vmspace zones are defined as "no free".  So, there is no
point in defining a fini function for these zones.

Reviewed by: kib
Approved by: re (glebius)
Sponsored by: EMC / Isilon Storage Division

10 years agoUpdate comment from draft to RFC number.
Bjoern A. Zeeb [Sun, 22 Sep 2013 14:53:07 +0000 (14:53 +0000)]
Update comment from draft to RFC number.

Submitted by: Loganaden Velvindron (logan elandsys.com)
Approved by: re (gjb)
MFC after: 6 days

10 years agoConsistently use the same value to indicate exclusively-held and
Davide Italiano [Sun, 22 Sep 2013 14:09:07 +0000 (14:09 +0000)]
Consistently use the same value to indicate exclusively-held and
shared-held locks for all the primitives in lc_lock/lc_unlock routines.
This fixes the problems introduced in r255747, which indeed introduced an
inversion in the logic.

Reported by: many
Tested by: bdrewery, pho, lme, Adam McDougall, O. Hartmann
Approved by: re (glebius)

10 years ago- Create kern.ipc.sendfile namespace, and put the new "readhead" OID
Gleb Smirnoff [Sun, 22 Sep 2013 13:36:52 +0000 (13:36 +0000)]
- Create kern.ipc.sendfile namespace, and put the new "readhead" OID
  there as "kern.ipc.sendfile.readahead".
- Push all nsfbuf related tunables into MD code. Don't move them
  to new namespace in favor of POLA.

Reviewed by: scottl
Approved by: re (gjb)

10 years agoRemove the armv6eb architecture as it is unused, and almost certainly
Andrew Turner [Sun, 22 Sep 2013 07:30:17 +0000 (07:30 +0000)]
Remove the armv6eb architecture as it is unused, and almost certainly
broken. None of our kernels can boot armv6eb. The little-endian kernels do
not have the required code to be able to switch endian when running a
big-endian executable.

Approved by: re (gjb)

10 years agoFix ia64 and mips kernel builds due to XENHVM=>GENERIC integration in
Justin T. Gibbs [Sun, 22 Sep 2013 02:46:13 +0000 (02:46 +0000)]
Fix ia64 and mips kernel builds due to XENHVM=>GENERIC integration in
revision 255744.

sys/kern/subr_smp.c:
IPI_SUSPEND is only available on amd64 and i386.  Protect
new uses of this constant with #ifdefs to avoid impacting
other platforms.

Approved by: re (blanket Xen)

10 years agoFix compilation of the i386 PAE kernel config.
Justin T. Gibbs [Sun, 22 Sep 2013 00:54:22 +0000 (00:54 +0000)]
Fix compilation of the i386 PAE kernel config.

sys/i386/include/xen/xenvar.h:
Provide vtomach() when PAE is defined.

Approved by: re (blanket Xen)

10 years agoRemove autoprops.
Dag-Erling Smørgrav [Sat, 21 Sep 2013 23:30:32 +0000 (23:30 +0000)]
Remove autoprops.

Approved by: re (blanket)

10 years agoSet props and correct RCS ID tag.
Dag-Erling Smørgrav [Sat, 21 Sep 2013 23:29:02 +0000 (23:29 +0000)]
Set props and correct RCS ID tag.

Approved by: re (blanket)

10 years agoRegenerate syscall argument strings after r255777.
Mark Johnston [Sat, 21 Sep 2013 23:06:36 +0000 (23:06 +0000)]
Regenerate syscall argument strings after r255777.

Approved by: re (gjb)
MFC after: 1 week

10 years agoOmit "__restrict" when generating syscall argument strings. DTrace doesn't
Mark Johnston [Sat, 21 Sep 2013 23:05:44 +0000 (23:05 +0000)]
Omit "__restrict" when generating syscall argument strings. DTrace doesn't
handle it and cannot determine the argument type when it's present.

Approved by: re (gjb)
MFC after: 1 week

10 years agoGive argtype struct names a different prefix than probe struct names.
Mark Johnston [Sat, 21 Sep 2013 22:43:50 +0000 (22:43 +0000)]
Give argtype struct names a different prefix than probe struct names.
Otherwise it's possible to declare SDT probes in such a way that a name
collision occurs, causing an unexpected compilation error.

Approved by: re (gjb)
MFC after: 1 week

10 years agoCreate a separate script to generate osreldate.h rather than sourcing
Ian Lepore [Sat, 21 Sep 2013 22:36:07 +0000 (22:36 +0000)]
Create a separate script to generate osreldate.h rather than sourcing
newvers.sh into a temporary subshell with inline make rules.

Using a separate script fixes a variety of problems, including establishing
the correct dependencies in the makefiles.  It also eliminates a problem
with the way newvers.sh uses `realpath $0`, because $0 expands differently
within a script sourced into a rule in a makefile depending on the version
of make and of /bin/sh being used.  The latter can cause build breakage in a
cross-build environment, and can also make it difficult to compile 10.0 on
older pre-10.0 systems.

PR: 160646 174422
Submitted by: Garrett Cooper <yaneurabeya@gmail.com>
Approved by: re (gjb)
MFC after: 2 weeks

10 years agoPull in all the OpenSSH bits that we'd previously left out because we
Dag-Erling Smørgrav [Sat, 21 Sep 2013 22:24:10 +0000 (22:24 +0000)]
Pull in all the OpenSSH bits that we'd previously left out because we
didn't use them.  This will make future merges from the vendor tree much
easier.

Approved by: re (gjb)

10 years agoStability fixes for Intel LynxPoint XHCI controllers. Disable XHCI port
Hans Petter Selasky [Sat, 21 Sep 2013 21:40:57 +0000 (21:40 +0000)]
Stability fixes for Intel LynxPoint XHCI controllers. Disable XHCI port
routing if we get certain errors. Poll for command completion upon
command timeouts. The XHCI error events might not generate interrupts.

MFC after: 1 week
Reported by: Daniel Gerzo <danger@rulez.sk>, Antonis Anastasiadis <anastasiadis@datalive.gr>
PR: usb/181159
Approved by: re (gjb)

10 years agoUpgrade to 6.3p1.
Dag-Erling Smørgrav [Sat, 21 Sep 2013 21:36:09 +0000 (21:36 +0000)]
Upgrade to 6.3p1.

Approved by: re (gjb)

10 years agoDitch the random seeding code, which never really worked as intended.
Dag-Erling Smørgrav [Sat, 21 Sep 2013 21:34:22 +0000 (21:34 +0000)]
Ditch the random seeding code, which never really worked as intended.
Add config variables to enable / disable individual host key algorithms.
Clean up the host key generation code.

Approved by: re (gjb)
MFC after: 3 weeks

10 years agoMake the directory mapping functionality, which was previously only
Dag-Erling Smørgrav [Sat, 21 Sep 2013 21:03:52 +0000 (21:03 +0000)]
Make the directory mapping functionality, which was previously only
available in 32-bit compatibility mode, unconditional.

Overhaul the man page, which had evolved more by accretion than by design.

Approved by: re (gjb)
MFC after: 3 weeks

10 years agoFix the AR933x CPU UART support by using the correct clock when calculating
Adrian Chadd [Sat, 21 Sep 2013 19:42:37 +0000 (19:42 +0000)]
Fix the AR933x CPU UART support by using the correct clock when calculating
the UART frequency.

Tested:

* AR933x (carambola 2 board), UART now works again

Approved by: re

10 years agoRemove redundant files.
Cy Schubert [Sat, 21 Sep 2013 14:23:20 +0000 (14:23 +0000)]
Remove redundant files.

Approved by:    glebius (mentor)
Approved by:    re (blanket)

10 years agoCheck return code from inet_pton.
Cy Schubert [Sat, 21 Sep 2013 14:22:07 +0000 (14:22 +0000)]
Check return code from inet_pton.

Discovered by: Coverity.
Approved by: glebius (mentor)
Approved by: re (blanket)

10 years agoReplace claims that DES is a strong cryptosystem with a warning stating
Dag-Erling Smørgrav [Sat, 21 Sep 2013 11:10:09 +0000 (11:10 +0000)]
Replace claims that DES is a strong cryptosystem with a warning stating
that it should no longer be considered secure.

Approved by: re (gjb)

10 years agoIntroduce spares in the TCP syncache and timewait structures
Bjoern A. Zeeb [Sat, 21 Sep 2013 10:01:51 +0000 (10:01 +0000)]
Introduce spares in the TCP syncache and timewait structures
so that fixed TCP_SIGNATURE handling can later be merged.

This is derived from follow-up work to SVN r183001 posted to
net@ on Sep 13 2008.

Approved by: re (gjb)

10 years agoAddress double init of ip_log mutex, fixing a panic after ipfilter is
Cy Schubert [Sat, 21 Sep 2013 04:11:51 +0000 (04:11 +0000)]
Address double init of ip_log mutex, fixing a panic after ipfilter is
re-enabled following it being disabled.

Approved by: glebius (mentor)
Approved by: re (blanket)

10 years agoEnable main ipfilter sysctl MIBs.
Cy Schubert [Sat, 21 Sep 2013 04:08:52 +0000 (04:08 +0000)]
Enable main ipfilter sysctl MIBs.

Approved by: glebius (mentor)
Approved by: re (blanket)

10 years agoConvert ipfilter from timeout(9) to callout(9).
Cy Schubert [Sat, 21 Sep 2013 04:05:38 +0000 (04:05 +0000)]
Convert ipfilter from timeout(9) to callout(9).

Submitted by: jhb
Approved by: glebius (mentor)
Approved by: re (blanket)

10 years agoRemove additional non-FreeBSD code.
Cy Schubert [Sat, 21 Sep 2013 03:57:56 +0000 (03:57 +0000)]
Remove additional non-FreeBSD code.

Approved by: glebius (mentor)
Approved by: re (blanket)

10 years agoOptimize the block size used on ZFS cache devices as is already done
Justin T. Gibbs [Sat, 21 Sep 2013 03:52:08 +0000 (03:52 +0000)]
Optimize the block size used on ZFS cache devices as is already done
for data and log devices.

Reported by: Dmitryy Makarov
Submitted by: smh
Reviewed by: gibbs
Approved by: re (delphij)
MFC after: 2 weeks

10 years agoPut 'device hyperv' back in amd64/GENERIC, incorrectly removed with
Glen Barber [Sat, 21 Sep 2013 01:07:27 +0000 (01:07 +0000)]
Put 'device hyperv' back in amd64/GENERIC, incorrectly removed with
r255736.

Pointed out by: gibbs
Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation

10 years agoReorder/regroup the vmm ioctl api definitions to allow some
Peter Grehan [Sat, 21 Sep 2013 00:27:53 +0000 (00:27 +0000)]
Reorder/regroup the vmm ioctl api definitions to allow some
semblance of API stability and growth during the 10.* timeframe.

Userland/kernel bhyve will have to be recompiled after this.

Reviewed by: neel
Approved by: re@ (blanket)

10 years agoMFV r254750:
Xin LI [Sat, 21 Sep 2013 00:17:26 +0000 (00:17 +0000)]
MFV r254750:

Add support of Illumos dumps on zvol over RAID-Z.

Note that this only adds the features.  FreeBSD would
still need more work to support dumping on zvols.

Illumos ZFS issues:
  2932 support crash dumps to raidz, etc. pools

MFC after: 1 month
Approved by: re (ZFS blanket)

10 years agoFixup cross-device rename checks in ZFS. Add a check for the case
Davide Italiano [Fri, 20 Sep 2013 23:22:00 +0000 (23:22 +0000)]
Fixup cross-device rename checks in ZFS. Add a check for the case
where 'fdvp' is a directory, 'tvp' is an already existing directory
and they have different mount points.

Reported by: avg, pjd
Reviewed by: pjd
Approved by: re (rodrigc)

10 years agoFix callout_init_rm() in the shared case, allocating storage for 'struct
Davide Italiano [Fri, 20 Sep 2013 23:16:15 +0000 (23:16 +0000)]
Fix callout_init_rm() in the shared case, allocating storage for 'struct
rm_priotracker' directly in the softclock thread. Now consumers can
pass CALLOUT_SHAREDLOCK flag to callout initialization routine safely.
The choice of the already existing flags  instead of special casing
shared rmlocks is done to prevent consumer footshooting.

Suggested by: jhb
Reviewed by: jhb
Approved by: re (delphij)

10 years agoRemove local change leftover, this should never have been part of
Davide Italiano [Fri, 20 Sep 2013 23:10:52 +0000 (23:10 +0000)]
Remove local change leftover, this should never have been part of
r255745.

Pointy-hat to: davide
Approved by: re (implicit)

10 years agoFix lc_lock/lc_unlock() support for rmlocks held in shared mode. With
Davide Italiano [Fri, 20 Sep 2013 23:06:21 +0000 (23:06 +0000)]
Fix lc_lock/lc_unlock() support for rmlocks held in shared mode. With
current lock classes KPI it was really difficult because there was no
way to pass an rmtracker object to the lock/unlock routines. In order
to accomplish the task, modify the aforementioned functions so that
they can return (or pass as argument) an uinptr_t, which is in the rm
case used to hold a pointer to struct rm_priotracker for current
thread. As an added bonus, this fixes rm_sleep() in the rm shared
case, which right now can communicate priotracker structure between
lc_unlock()/lc_lock().

Suggested by: jhb
Reviewed by: jhb
Approved by: re (delphij)

10 years agoMerge Xen PVHVM support into the GENERIC kernel config for both
Justin T. Gibbs [Fri, 20 Sep 2013 22:59:22 +0000 (22:59 +0000)]
Merge Xen PVHVM support into the GENERIC kernel config for both
amd64 and i386.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: re (blanket Xen)
MFC after: 2 weeks

sys/amd64/amd64/mp_machdep.c:
sys/amd64/include/cpu.h:
sys/i386/i386/mp_machdep.c:
sys/i386/include/cpu.h:
- Introduce two new CPU hooks for initialization and resume
  purposes. This allows us to get rid of the XENHVM ifdefs in
  mp_machdep, and also sets some hooks into common code that can be
  used by other hypervisor implementations.

sys/amd64/conf/XENHVM:
sys/i386/conf/XENHVM:
- Remove these configs now that GENERIC has builtin support for Xen
  HVM.

sys/kern/subr_smp.c:
- Make sure there are no pending IPIs when suspending a system.

sys/x86/xen/hvm.c:
- Add cpu init and resume vectors that are called from mp_machdep
  using the new hooks.
- Only clear the vcpu_info mapping data on resume.  It is already
  clear for the BSP on a cold boot and is set correctly as APs
  are started.
- Gate xen_hvm_init_cpu only to systems running under Xen.

sys/x86/xen/xen_intr.c:
 - Gate the setup of event channels only to systems running under Xen.

10 years agoAdd some spare fields to structs used by the new iSCSI stack - some just
Edward Tomasz Napierala [Fri, 20 Sep 2013 21:26:51 +0000 (21:26 +0000)]
Add some spare fields to structs used by the new iSCSI stack - some just
in case, some for future MC/S support.

This requires kernel and world rebuild.

Approved by: re (blanket)
Sponsored by: FreeBSD Foundation

10 years agoFix GCC build for all ARMs. Revert bug introduced in r255613.
Zbigniew Bodek [Fri, 20 Sep 2013 20:44:32 +0000 (20:44 +0000)]
Fix GCC build for all ARMs. Revert bug introduced in r255613.

Previous change applied in r255613 fixed build for ARMv6 but
broke it for previous architecture revisions. This commit
eventually fixes GCC build for all ARM revisions.

Approved by: cognet (mentor)
Approved by: re (kib)

10 years agoSubstantial rewrite of bxe(4) to add support for the BCM57712 and
David Christensen [Fri, 20 Sep 2013 20:18:49 +0000 (20:18 +0000)]
Substantial rewrite of bxe(4) to add support for the BCM57712 and
BCM578XX controllers.

Approved by: re
MFC after: 4 weeks

10 years agoImprove grammar and readability.
Hiren Panchasara [Fri, 20 Sep 2013 19:25:01 +0000 (19:25 +0000)]
Improve grammar and readability.

Reviewed by: sbruno, loos
Approved by: re (gjb)

10 years agoMerge the following changes from projects/bhyve_npt_pmap:
Neel Natu [Fri, 20 Sep 2013 17:06:49 +0000 (17:06 +0000)]
Merge the following changes from projects/bhyve_npt_pmap:
- add fields to 'struct pmap' that are required to manage nested page tables.
- add a parameter to 'vmspace_alloc()' that can be used to override the
  default pmap initialization routine 'pmap_pinit()'.

These changes are pushed ahead of the remaining changes in 'bhyve_npt_pmap'
in anticipation of the upcoming KBI freeze for 10.0.

Reviewed by: kib@, alc@
Approved by: re (glebius)

10 years agoCorrect stale comments.
John Baldwin [Fri, 20 Sep 2013 16:05:09 +0000 (16:05 +0000)]
Correct stale comments.

Approved by: re (joel)

10 years agoFix a range check and a display string.
Hiren Panchasara [Fri, 20 Sep 2013 15:57:50 +0000 (15:57 +0000)]
Fix a range check and a display string.

Reviewed by: loos
Approved by: sbruno (mentor, implicit)
Approved by: re (glebius)

10 years agoAdd support for suspend/resume/migration operations when running as a
Justin T. Gibbs [Fri, 20 Sep 2013 05:06:03 +0000 (05:06 +0000)]
Add support for suspend/resume/migration operations when running as a
Xen PVHVM guest.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: re (blanket Xen)
MFC after: 2 weeks

sys/amd64/amd64/mp_machdep.c:
sys/i386/i386/mp_machdep.c:
- Make sure that are no MMU related IPIs pending on migration.
- Reset pending IPI_BITMAP on resume.
- Init vcpu_info on resume.

sys/amd64/include/intr_machdep.h:
sys/i386/include/intr_machdep.h:
sys/x86/acpica/acpi_wakeup.c:
sys/x86/x86/intr_machdep.c:
sys/x86/isa/atpic.c:
sys/x86/x86/io_apic.c:
sys/x86/x86/local_apic.c:
- Add a "suspend_cancelled" parameter to pic_resume().  For the
  Xen PIC, restoration of interrupt services differs between
  the aborted suspend and normal resume cases, so we must provide
  this information.

sys/dev/acpica/acpi_timer.c:
sys/dev/xen/timer/timer.c:
sys/timetc.h:
- Don't swap out "suspend safe" timers across a suspend/resume
  cycle.  This includes the Xen PV and ACPI timers.

sys/dev/xen/control/control.c:
- Perform proper suspend/resume process for PVHVM:
- Suspend all APs before going into suspension, this allows us
  to reset the vcpu_info on resume for each AP.
- Reset shared info page and callback on resume.

sys/dev/xen/timer/timer.c:
- Implement suspend/resume support for the PV timer. Since FreeBSD
  doesn't perform a per-cpu resume of the timer, we need to call
  smp_rendezvous in order to correctly resume the timer on each CPU.

sys/dev/xen/xenpci/xenpci.c:
- Don't reset the PCI interrupt on each suspend/resume.

sys/kern/subr_smp.c:
- When suspending a PVHVM domain make sure there are no MMU IPIs
  in-flight, or we will get a lockup on resume due to the fact that
  pending event channels are not carried over on migration.
- Implement a generic version of restart_cpus that can be used by
  suspended and stopped cpus.

sys/x86/xen/hvm.c:
- Implement resume support for the hypercall page and shared info.
- Clear vcpu_info so it can be reset by APs when resuming from
  suspension.

sys/dev/xen/xenpci/xenpci.c:
sys/x86/xen/hvm.c:
sys/x86/xen/xen_intr.c:
- Support UP kernel configurations.

sys/x86/xen/xen_intr.c:
- Properly rebind per-cpus VIRQs and IPIs on resume.

10 years agosys/i386/xen/mp_machdep.c:
Justin T. Gibbs [Fri, 20 Sep 2013 04:35:09 +0000 (04:35 +0000)]
sys/i386/xen/mp_machdep.c:
sys/i386/xen/mptable.c:
Set PCPU apic_id and acpi_id fields in a fasion compatible with
both UP and SMP configurations.

Suggested by: jhb
Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: re (blanket Xen)
MFC after: 2 weeks

10 years agoThe pmap function pmap_clear_reference() is no longer used. Remove it.
Alan Cox [Fri, 20 Sep 2013 04:30:18 +0000 (04:30 +0000)]
The pmap function pmap_clear_reference() is no longer used.  Remove it.

pmap_clear_reference() has had exactly one caller in the kernel for
several years, more precisely, since FreeBSD 8.  Now, that call no
longer exists.

Approved by: re (kib)
Sponsored by: EMC / Isilon Storage Division

10 years agoRegenerate after addition of WITH_LLDB
Ed Maste [Fri, 20 Sep 2013 01:55:37 +0000 (01:55 +0000)]
Regenerate after addition of WITH_LLDB

Approved by: re (blanket)

10 years agoAdd LLDB bmake infrastructure
Ed Maste [Fri, 20 Sep 2013 01:52:02 +0000 (01:52 +0000)]
Add LLDB bmake infrastructure

This connects LLDB to the build, but it is disabled by default.  Add
WITH_LLDB= to src.conf to build it.

Note that LLDB requires a C++11 compiler so is disabled on platforms
using GCC.

Approved by: re (gjb)
Sponsored by: DARPA, AFRL

10 years agoDisable LLDB OSX ABI plugin
Ed Maste [Fri, 20 Sep 2013 01:18:50 +0000 (01:18 +0000)]
Disable LLDB OSX ABI plugin

Approved by: re (blanket)

10 years agoUpdate arcmsr(4) driver to 1.20.00.28 which fixes mutex recursion in
Xin LI [Thu, 19 Sep 2013 20:30:35 +0000 (20:30 +0000)]
Update arcmsr(4) driver to 1.20.00.28 which fixes mutex recursion in
CCB abort codepath.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>
MFC after: 2 weeks
Approved by: re (?)

10 years agoFix comments.
Mikolaj Golub [Thu, 19 Sep 2013 20:20:59 +0000 (20:20 +0000)]
Fix comments.

Approved by: re (marius)
MFC after: 3 days

10 years agoWhen updating the map of dirty extents, most recently used extents are
Mikolaj Golub [Thu, 19 Sep 2013 20:19:08 +0000 (20:19 +0000)]
When updating the map of dirty extents, most recently used extents are
kept dirty to reduce the number of on-disk metadata updates. The
sequence of operations is:

1) acquire the activemap lock;
2) update in-memory map;
3) if the list of keepdirty extents is changed, update on-disk metadata;
4) release the lock.

On-disk updates are not frequent in comparison with in-memory updates,
while require much more time. So situations are possible when one
thread is updating on-disk metadata and another one is waiting for the
activemap lock just to update the in-memory map.

Improve this by introducing additional, on-disk map lock: when
in-memory map is updated and it is detected that the on-disk map needs
update too, the on-disk map lock is acquired and the on-memory lock is
released before flushing the map.

Reported by: Yamagi Burmeister yamagi.org
Tested by: Yamagi Burmeister yamagi.org
Reviewed by: pjd
Approved by: re (marius)
MFC after: 2 weeks

10 years ago- calendar uses cpp internally, this diff removes this usage and
Diane Bruce [Thu, 19 Sep 2013 20:17:50 +0000 (20:17 +0000)]
- calendar uses cpp internally, this diff removes this usage and
  substitutes a limited subset cpp processor internally.

PR: src/178463
Approved by: re (gjb)

10 years agoUse cv_broadcast() instead of cv_signal() when waking up threads
Mikolaj Golub [Thu, 19 Sep 2013 20:15:24 +0000 (20:15 +0000)]
Use cv_broadcast() instead of cv_signal() when waking up threads
waiting on an empty queue as the queue may have several consumers.

Before the fix the following scenario was possible: 2 threads are
waiting on empty queue, 2 threads are inserting simultaneously. The
first inserting thread detects that the queue is empty and is going to
send the signal, but before it sends the second thread inserts
too. When the first sends the signal only one of the waiting threads
receive it while the other one may wait forever.

The scenario above is is believed to be the cause of the observed
cases, when ggate_recv_thread() was getting stuck on taking free
request, while the free queue was not empty.

Reviewed by: pjd
Tested by: Yamagi Burmeister yamagi.org
Approved by: re (marius)
MFC after: 2 weeks

10 years agoFurther refinement to bmake bootstrapping
Ed Maste [Thu, 19 Sep 2013 20:09:56 +0000 (20:09 +0000)]
Further refinement to bmake bootstrapping

Include PROGNAME and DESTDIR in ${MMAKE} so that it doesn't need to be
passed to each make invocation.

Suggested by: hrs
Reviewed by: hrs
Approved by: re (gjb)

10 years agoRemove extra 'MAKE_FLAGS' line.
Glen Barber [Thu, 19 Sep 2013 19:49:31 +0000 (19:49 +0000)]
Remove extra 'MAKE_FLAGS' line.

Submitted by: jhb
Approved by: re (marius)
Sponsored by: The FreeBSD Foundation

10 years agoMinor mdoc improvements.
Joel Dahl [Thu, 19 Sep 2013 19:43:38 +0000 (19:43 +0000)]
Minor mdoc improvements.

Approved by: re (blanket)

10 years agoRegen.
John Baldwin [Thu, 19 Sep 2013 18:56:00 +0000 (18:56 +0000)]
Regen.

Approved by: re (delphij)

10 years agoExtend the support for exempting processes from being killed when swap is
John Baldwin [Thu, 19 Sep 2013 18:53:42 +0000 (18:53 +0000)]
Extend the support for exempting processes from being killed when swap is
exhausted.
- Add a new protect(1) command that can be used to set or revoke protection
  from arbitrary processes.  Similar to ktrace it can apply a change to all
  existing descendants of a process as well as future descendants.
- Add a new procctl(2) system call that provides a generic interface for
  control operations on processes (as opposed to the debugger-specific
  operations provided by ptrace(2)).  procctl(2) uses a combination of
  idtype_t and an id to identify the set of processes on which to operate
  similar to wait6().
- Add a PROC_SPROTECT control operation to manage the protection status
  of a set of processes.  MADV_PROTECT still works for backwards
  compatability.
- Add a p_flag2 to struct proc (and a corresponding ki_flag2 to kinfo_proc)
  the first bit of which is used to track if P_PROTECT should be inherited
  by new child processes.

Reviewed by: kib, jilles (earlier version)
Approved by: re (delphij)
MFC after: 1 month

10 years ago1. Properly clean pid files in the case of the error.
Mikolaj Golub [Thu, 19 Sep 2013 18:00:05 +0000 (18:00 +0000)]
1. Properly clean pid files in the case of the error.
2. Write the supervisor pid before the restart loop, so we don't
   uselessly rewrite it after every child restart.
3. Remove duplicate ppfh and pfh initialization.

Approved by: re (glebius)
MFC after: 2 weeks

10 years agosys/i386/xen_mp_machdep.c:
Justin T. Gibbs [Thu, 19 Sep 2013 14:41:10 +0000 (14:41 +0000)]
sys/i386/xen_mp_machdep.c:
Set a 'fake' acpi_id for the i386 PV port, it is needed in
order to use VIRQs or IPI event channels.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: re (blanket Xen)
MFC after: 2 weeks

10 years agocap_new(2) and cap_getrights2) were replaced with cap_rights_limit(2)
Bryan Drewery [Thu, 19 Sep 2013 10:56:36 +0000 (10:56 +0000)]
cap_new(2) and cap_getrights2) were replaced with cap_rights_limit(2)
and cap_rights_get(2) in r247602

Reviewed by: pjd
Approved by: gjb
Approved by: re (rodrigc)

10 years agoMake svnlite (actually libapr) work correctly on big-endian arches.
Dimitry Andric [Thu, 19 Sep 2013 06:31:03 +0000 (06:31 +0000)]
Make svnlite (actually libapr) work correctly on big-endian arches.
Otherwise, you would get errors similar to:

$ svn co svn://svn.freebsd.org/base/head test
A    test/lib
A    test/lib/libutil
svn: E200014: Checksum mismatch for
'/home/dim/test/lib/libutil/kinfo_getproc.3':
   expected:  0882097a545210d88edff8f63b328602
     actual:  b378eb08a0f4d4c97c513c4b17207f59

Approved by: re (gjb, marius)

10 years agoRemove an unused variable and fix a memory leak in sctp_connectx().
Michael Tuexen [Thu, 19 Sep 2013 06:19:24 +0000 (06:19 +0000)]
Remove an unused variable and fix a memory leak in sctp_connectx().

Approved by: re (gjb)
MFC after: 3 days

10 years agoReconnect the hyperv drivers back into GENERIC now that the
Peter Grehan [Thu, 19 Sep 2013 05:07:51 +0000 (05:07 +0000)]
Reconnect the hyperv drivers back into GENERIC now that the
disengage driver issue has been resolved.

Approved by: re@ (gjb)

10 years agoImplement support for the interrupt-on-terminal-count and
Peter Grehan [Thu, 19 Sep 2013 04:59:44 +0000 (04:59 +0000)]
Implement support for the interrupt-on-terminal-count and
s/w-strobe timer modes. These are commonly used by non-FreeBSD
o/s's.

Approved by: re@ (blanket)

10 years agoAdd simplistic periodic timer support to mevent using kqueue's
Peter Grehan [Thu, 19 Sep 2013 04:48:26 +0000 (04:48 +0000)]
Add simplistic periodic timer support to mevent using kqueue's
timer support. This should be enough for the emulation of
h/w periodic timers (and no more) e.g. some of the 8254's
more esoteric modes that happen to be used by non-FreeBSD o/s's.

Approved by: re@ (blanket)

10 years agoAllow the alarm hours/mins/seconds registers to be read/written,
Peter Grehan [Thu, 19 Sep 2013 04:29:03 +0000 (04:29 +0000)]
Allow the alarm hours/mins/seconds registers to be read/written,
though without any action. This avoids a hypervisor exit when
o/s's access these regs (Linux).

Reviewed by: neel
Approved by: re@ (blanket)

10 years agoUse correct offset for the high byte of high memory written to
Peter Grehan [Thu, 19 Sep 2013 04:20:18 +0000 (04:20 +0000)]
Use correct offset for the high byte of high memory written to
RTC NVRAM.

Submitted by: Bela Lubkin   bela dot lubkin at tidalscale dot com
Approved by: re@ (blanket)

10 years agoReorder the hypervisor presence test to avoid claiming ATA disks
Peter Grehan [Thu, 19 Sep 2013 02:34:52 +0000 (02:34 +0000)]
Reorder the hypervisor presence test to avoid claiming ATA disks
on non hyperv systems.

Reviewed by: neel, abgupta at microsoft dot com
Approved by: re@ (hrs)

10 years agoFix missing SVN properties.
Peter Grehan [Thu, 19 Sep 2013 02:02:15 +0000 (02:02 +0000)]
Fix missing SVN properties.

Approved by: re@ (hrs)

10 years agoMerge lldb man page from r188801 to contrib/llvm/tools/lldb/docs/
Ed Maste [Thu, 19 Sep 2013 00:32:07 +0000 (00:32 +0000)]
Merge lldb man page from r188801 to contrib/llvm/tools/lldb/docs/

Approved by: re (gjb)

10 years agoFix several problems in the new iSCSI stack; this includes interoperability
Edward Tomasz Napierala [Wed, 18 Sep 2013 21:15:21 +0000 (21:15 +0000)]
Fix several problems in the new iSCSI stack; this includes interoperability
fix for LIO (Linux target), removing possibility for the target to avoid mutual
CHAP by choosing to skip authentication altogether, and fixing truncated error
messages in iscsictl(8) output.  This also fixes several of the problems found
with Coverity.

Note that this change requires world rebuild.

Coverity CID: 1088038108799810879901088004108804410880411088040
Approved by: re (blanket)
Sponsored by: FreeBSD Foundation

10 years agoFix panic in ktrcapfail() when no capability rights are passed.
Pawel Jakub Dawidek [Wed, 18 Sep 2013 19:26:08 +0000 (19:26 +0000)]
Fix panic in ktrcapfail() when no capability rights are passed.
While here, correct all consumers to pass NULL instead of 0 as we pass
capability rights as pointers now, not uint64_t.

Reported by: Daniel Peyrolon
Tested by: Daniel Peyrolon
Approved by: re (marius)

10 years agoRegen.
Roman Divacky [Wed, 18 Sep 2013 18:49:26 +0000 (18:49 +0000)]
Regen.

Approved by: re (delphij)

10 years agoRevert r255672, it has some serious flaws, leaking file references etc.
Roman Divacky [Wed, 18 Sep 2013 18:48:33 +0000 (18:48 +0000)]
Revert r255672, it has some serious flaws, leaking file references etc.

Approved by: re (delphij)

10 years agoRegen.
Roman Divacky [Wed, 18 Sep 2013 17:58:03 +0000 (17:58 +0000)]
Regen.

Approved by:    re (delphij)

10 years agoImplement epoll support in Linuxulator. This is a tiny wrapper around kqueue
Roman Divacky [Wed, 18 Sep 2013 17:56:04 +0000 (17:56 +0000)]
Implement epoll support in Linuxulator. This is a tiny wrapper around kqueue
to implement epoll subset of functionality. The kqueue user data are 32bit
on i386 which is not enough for epoll user data so this patch overrides
kqueue fileops to maintain enough space in struct file.

Initial patch developed by me in 2007 and then extended and finished
by Yuri Victorovich.

Approved by:    re (delphij)
Sponsored by:   Google Summer of Code
Submitted by:   Yuri Victorovich <yuri at rawbw dot com>
Tested by:      Yuri Victorovich <yuri at rawbw dot com>

10 years agoVendor import of OpenSSH 6.3p1
Dag-Erling Smørgrav [Wed, 18 Sep 2013 17:27:38 +0000 (17:27 +0000)]
Vendor import of OpenSSH 6.3p1

10 years agoImport lldb.1 man page as of SVN r188801
Ed Maste [Wed, 18 Sep 2013 16:32:43 +0000 (16:32 +0000)]
Import lldb.1 man page as of SVN r188801

10 years agoMake iscsictl(8) automatically try to load the iscsi module. While here,
Edward Tomasz Napierala [Wed, 18 Sep 2013 08:37:14 +0000 (08:37 +0000)]
Make iscsictl(8) automatically try to load the iscsi module.  While here,
improve module loading in iscsid(8) and ctld(8).

Approved by: re (delphij)

10 years agomdoc: sort SEE ALSO.
Joel Dahl [Wed, 18 Sep 2013 04:44:54 +0000 (04:44 +0000)]
mdoc: sort SEE ALSO.

Approved by: re (blanket)

10 years agoFix 'make installcheck' to check for missing UID/GID as well, broken
Bryan Drewery [Wed, 18 Sep 2013 00:33:24 +0000 (00:33 +0000)]
Fix 'make installcheck' to check for missing UID/GID as well, broken
since r249893, by adding a separate _installcheck_world and
_installcheck_kernel so the destination targets can be more explicit
on which they are needed for.

installcheck will call both, while installworld only calls
_installcheck_world and installkernel only calls _installcheck_kernel

While here, mark the internal targets as starting with _.

Reported by: des
Reviewed by: des
Pointyhat to: bdrewery
Approved by: re (delphij)

10 years agoBring in configuration for Buffalo Airstation WZR-300HP, Atheros based
Sean Bruno [Tue, 17 Sep 2013 22:26:07 +0000 (22:26 +0000)]
Bring in configuration for Buffalo Airstation WZR-300HP, Atheros based
wireless home router.

Notable things:
2x 16 MB flash devices
Atheros Wireless
Atheros Switching

Many thanks to adrian@ for his guidance on this and keeping the drivers in
the base system up to date

Approved by:    re (delphij)

10 years agoRegenerate for freebsd32_cap_enter().
Jilles Tjoelker [Tue, 17 Sep 2013 20:49:05 +0000 (20:49 +0000)]
Regenerate for freebsd32_cap_enter().

Approved by: re (hrs)