]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoBuild and install drill(1).
des [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.
kib [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
kib [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
kib [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 [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
des [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.
des [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
alc [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.
bz [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 [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
glebius [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 [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
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.
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.
des [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.
des [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.
markj [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
markj [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.
markj [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 [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
des [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
hselasky [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.
des [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.
des [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
des [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 [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 [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 [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
des [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
bz [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 [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 [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 [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 [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
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
gjb [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
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:
delphij [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 [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 [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 [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 [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
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
trasz [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.
zbb [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
davidch [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 [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 [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.
jhb [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 [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
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:
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.
alc [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
emaste [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
emaste [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
emaste [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
delphij [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.
trociny [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
trociny [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
db [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
trociny [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
emaste [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.
gjb [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 [Thu, 19 Sep 2013 19:43:38 +0000 (19:43 +0000)]
Minor mdoc improvements.

Approved by: re (blanket)

10 years agoRegen.
jhb [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
jhb [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.
trociny [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:
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)
bdrewery [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.
dim [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().
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
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
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
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,
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
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
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.
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/
emaste [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
trasz [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.
pjd [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.
rdivacky [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.
rdivacky [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.
rdivacky [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
rdivacky [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
des [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
emaste [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,
trasz [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 [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
bdrewery [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
sbruno [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 [Tue, 17 Sep 2013 20:49:05 +0000 (20:49 +0000)]
Regenerate for freebsd32_cap_enter().

Approved by: re (hrs)

10 years agoDisallow cap_enter() in freebsd32 compatibility mode.
jilles [Tue, 17 Sep 2013 20:48:19 +0000 (20:48 +0000)]
Disallow cap_enter() in freebsd32 compatibility mode.

The freebsd32 compatibility mode (for running 32-bit binaries on 64-bit
kernels) does not currently allow any system calls in capability mode, but
still permits cap_enter(). As a result, 32-bit binaries on 64-bit kernels
that use capability mode do not work (they crash after being disallowed to
call sys_exit()). Affected binaries include dhclient and uniq. The latter's
crashes cause obscure build failures.

This commit makes freebsd32 cap_enter() fail with [ENOSYS], as if capability
mode was not compiled in. Applications deal with this by doing their work
without capability mode.

This commit does not fix the uncommon situation where a 64-bit process
enters capability mode and then executes a 32-bit binary using fexecve().

This commit should be reverted when allowing the necessary freebsd32 system
calls in capability mode.

Reviewed by: pjd
Approved by: re (hrs)

10 years agoWe have grown a bit too big lately. Shrinking the kernel for TP-Link
hiren [Tue, 17 Sep 2013 20:33:42 +0000 (20:33 +0000)]
We have grown a bit too big lately. Shrinking the kernel for TP-Link
TL-WR1043ND.

Submitted by:   loos (initial version)
Reviewed by:    adrian
Approved by:    sbruno (mentor, implicit)
Approved by: re (delphij)
Tested by:      hiren

10 years agoAdd EXAMPLES section to explain the format of fstab(5).
hrs [Tue, 17 Sep 2013 20:25:29 +0000 (20:25 +0000)]
Add EXAMPLES section to explain the format of fstab(5).

Approved by: re (marius)
Reviewed by: wblock

10 years ago- Fix pidfile handling in sendmail_msp_queue. The pidfile was ignored
hrs [Tue, 17 Sep 2013 20:24:03 +0000 (20:24 +0000)]
- Fix pidfile handling in sendmail_msp_queue.  The pidfile was ignored
  and multiple instances were invoked by start/stop cycles.

- Remove redundant start_cmd rewrite.

Approved by: re (gjb)
Tested by: jmg

10 years agoFix parsing lines of ifconfig output which include \t in the case of
hrs [Tue, 17 Sep 2013 20:22:24 +0000 (20:22 +0000)]
Fix parsing lines of ifconfig output which include \t in the case of
inet and inet6.

Approved by: re (delphij)

10 years agoRemove description "ifconfig_IF_aliasN is deprecated". While this
hrs [Tue, 17 Sep 2013 20:20:04 +0000 (20:20 +0000)]
Remove description "ifconfig_IF_aliasN is deprecated".  While this
sentence was added in 2005, many users still need it.

Approved by: re (gjb)
PR: docs/162354

10 years agoshare/i18n: Fix installworld with read-only obj.
jilles [Tue, 17 Sep 2013 20:09:25 +0000 (20:09 +0000)]
share/i18n: Fix installworld with read-only obj.

Since iconv was enabled (r254273, August 13), it has been impossible to
installworld using a read-only obj tree. This is common with NFS. Parts of
share/i18n unconditionally rebuild files like mapper.dir during
installation.

This patch ensures the files like mapper.dir are not rewritten with the same
contents.

Tested by: joel
Approved by: re (hrs)

10 years agoFix a typo when accounting for tx_broadcast statistics.
delphij [Tue, 17 Sep 2013 18:46:10 +0000 (18:46 +0000)]
Fix a typo when accounting for tx_broadcast statistics.

Submitted by: Paul A. Patience <paul-a patience polymtl ca>
MFC after: 2 weeks
Approved by: re (hrs)