freebsd.git
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: 1088038, 1087998, 1087990, 1088004, 1088044, 1088041, 1088040
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 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)

10 years agoPass the number of supported vectors to pci_emul_add_msicap() and
grehan [Tue, 17 Sep 2013 18:42:13 +0000 (18:42 +0000)]
Pass the number of supported vectors to pci_emul_add_msicap() and
not the actual PCI BAR number.

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

10 years agopsm: Update "struct synapticshw" in psm(4) man page
dumbbell [Tue, 17 Sep 2013 18:41:32 +0000 (18:41 +0000)]
psm: Update "struct synapticshw" in psm(4) man page

This structure was updated in r255153 and r255154.

PR: kern/170834
Approved by: re (hrs)

10 years agoHide TSC-deadline APIC timer support from guests. This mode
grehan [Tue, 17 Sep 2013 17:56:53 +0000 (17:56 +0000)]
Hide TSC-deadline APIC timer support from guests. This mode
isn't yet implemented in bhyve's APIC emulation.

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

10 years agoMerge in support for PAPR-compliant (Power Architecture Platform
nwhitehorn [Tue, 17 Sep 2013 17:37:04 +0000 (17:37 +0000)]
Merge in support for PAPR-compliant (Power Architecture Platform
Requirements) systems from the projects/pseries branch. This in principle
includes all IBM POWER hardware released in the last 15 years with the
exception of POWER3-based systems when run in 64-bit mode. The main
development target, however, has been the PAPR logical partition support
that is the default target in KVM on POWER and QEMU -- mileage may vary
on actual hardware at present. Much of the heavy lifting here was done
by Andreas Tobler.

Approved by: re (kib)

10 years agoOnly attach if properties we need (address, in particular) are present.
nwhitehorn [Tue, 17 Sep 2013 17:31:53 +0000 (17:31 +0000)]
Only attach if properties we need (address, in particular) are present.
This is the correct version of r255420.

Approved by: re (kib)

10 years agoCDs are not partitioned, so this is not correct syntax for loading from
nwhitehorn [Tue, 17 Sep 2013 17:30:49 +0000 (17:30 +0000)]
CDs are not partitioned, so this is not correct syntax for loading from
ISO 9660. Omit the partition ID.

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

10 years agoAdd POWER7+ and POWER8 to the CPU ID table.
nwhitehorn [Tue, 17 Sep 2013 17:29:56 +0000 (17:29 +0000)]
Add POWER7+ and POWER8 to the CPU ID table.

Approved by: re (kib)

10 years agoMake sure to copy segments back to the segs array if non-NULL. This is
nwhitehorn [Tue, 17 Sep 2013 17:29:07 +0000 (17:29 +0000)]
Make sure to copy segments back to the segs array if non-NULL. This is
relied upon by bus_dmamap_load_mbuf_sg() (i.e. all network drivers).

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

10 years agoFix a bug in decoding an instruction that has an SIB byte as well as an
neel [Tue, 17 Sep 2013 16:06:07 +0000 (16:06 +0000)]
Fix a bug in decoding an instruction that has an SIB byte as well as an
immediate operand. The presence of an SIB byte in decoding the ModR/M field
would cause 'imm_bytes' to not be set to the correct value.

Fix this by initializing 'imm_bytes' independent of the ModR/M decoding.

Reported by: grehan@
Approved by: re@

10 years agoDon't attempt to build ports with missing dependencies.
phk [Tue, 17 Sep 2013 15:19:26 +0000 (15:19 +0000)]
Don't attempt to build ports with missing dependencies.

Approved by: re (gjb)

10 years agoImprove iSCSI address resolution, fixing "InitiatorAddress" handling,
trasz [Tue, 17 Sep 2013 14:23:15 +0000 (14:23 +0000)]
Improve iSCSI address resolution, fixing "InitiatorAddress" handling,
and error reporting.

Approved by: re (kib)

10 years agoExplicitly require Security Officer's approval for kernel PRNG bits.
trasz [Tue, 17 Sep 2013 14:19:05 +0000 (14:19 +0000)]
Explicitly require Security Officer's approval for kernel PRNG bits.

Note that there is ongoing discussion about approval requirement
for userland PRNG bits.

Reviewed by: so (des)
Approved by: core (jhb)
Approved by: re (gjb)

10 years agoAdd unbound to the list of UIDs / GIDs to check fore before installing.
des [Tue, 17 Sep 2013 12:59:37 +0000 (12:59 +0000)]
Add unbound to the list of UIDs / GIDs to check fore before installing.

Approved by: re (blanket)

10 years agoAssume that the -f argument is /dev/gpioc0 if it is not passed.
sbruno [Tue, 17 Sep 2013 11:48:47 +0000 (11:48 +0000)]
Assume that the -f argument is /dev/gpioc0 if it is not passed.

hrs@ provided this verison of the patch and showed me where all the needed
changes were to be made outside of gpioctl.c

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

10 years agoSet the correct path for LIBUNBOUND.
des [Tue, 17 Sep 2013 07:41:08 +0000 (07:41 +0000)]
Set the correct path for LIBUNBOUND.

Approved by: re (blanket)

10 years agoPG_SLAB no longer serves a useful purpose, since m->object is no
kib [Tue, 17 Sep 2013 07:35:26 +0000 (07:35 +0000)]
PG_SLAB no longer serves a useful purpose, since m->object is no
longer abused to store pointer to slab. Remove it.

Reviewed by:    alc
Sponsored by:   The FreeBSD Foundation
Approved by: re (hrs)

10 years ago Fix assertion in sendfile_readpage() to assert only the validity
glebius [Tue, 17 Sep 2013 06:37:21 +0000 (06:37 +0000)]
  Fix assertion in sendfile_readpage() to assert only the validity
of requested amount of data in a page. Move assertion down below
object unlock.

Approved by: re (kib)
Sponsored by: Nginx, Inc.
Sponsored by: Netflix

10 years ago- Reword the 20121201 entry.
gjb [Tue, 17 Sep 2013 04:24:34 +0000 (04:24 +0000)]
- Reword the 20121201 entry.
- Clean up minor whitespace nit.

Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation

10 years agoAdd vmx(4) to i386 and amd64 GENERIC
bryanv [Tue, 17 Sep 2013 01:54:13 +0000 (01:54 +0000)]
Add vmx(4) to i386 and amd64 GENERIC

Approved by: re (gjb)

10 years agoDocument that the 'unbound' user is required for installworld since
gjb [Tue, 17 Sep 2013 00:13:42 +0000 (00:13 +0000)]
Document that the 'unbound' user is required for installworld since
the import of ldns/unbound.

Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation

10 years agoMerge the change r255607 from amd64 to i386.
kib [Mon, 16 Sep 2013 19:58:37 +0000 (19:58 +0000)]
Merge the change r255607 from amd64 to i386.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (gjb)

10 years agoUpdate head/ to -ALPHA2 status.
gjb [Mon, 16 Sep 2013 19:29:18 +0000 (19:29 +0000)]
Update head/ to -ALPHA2 status.

Approved by: re (implicit)

10 years agoAdd a loader tunable to use only device tree-provided PCI devices. This is
nwhitehorn [Mon, 16 Sep 2013 15:10:11 +0000 (15:10 +0000)]
Add a loader tunable to use only device tree-provided PCI devices. This is
needed on some more fragile systems to avoid machine checks when blindly
probing the PCI bus. Also reduce ofw_pcibus's priority slightly so that it
can be overridden.

Approved by: re (gjb)

10 years agoFix bug in busdma: if segs is a preexisting buffer, we memcpy it
nwhitehorn [Mon, 16 Sep 2013 14:32:56 +0000 (14:32 +0000)]
Fix bug in busdma: if segs is a preexisting buffer, we memcpy it
into the DMA map. The length of the buffer had not yet been
initialized, however, so this would copy gibberish unless it
happened to be right by chance. This bug mostly only affected
systems with IOMMUs.

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

10 years agoFix GCC build error when building for ARMv6
zbb [Mon, 16 Sep 2013 10:46:58 +0000 (10:46 +0000)]
Fix GCC build error when building for ARMv6

Apply theravens's idea to move __strong_reference
macros into the proper ifdef section.

Approved by: cognet (mentor)
Approved by: re

10 years agoImplement pmap_advise() for ARMv6/v7 pmap module
zbb [Mon, 16 Sep 2013 10:39:35 +0000 (10:39 +0000)]
Implement pmap_advise() for ARMv6/v7 pmap module

Apply the given advice to the specified range of addresses within the
given pmap. Depending on the advice, clear the referenced and/or
modified flags in each mapping. Superpage within the given range will
be demoted or destroyed.

Reviewed by: alc
Approved by: cognet (mentor)
Approved by: re

10 years agoWrite protect base page after superpage demotion so that it may repromote
zbb [Mon, 16 Sep 2013 10:34:44 +0000 (10:34 +0000)]
Write protect base page after superpage demotion so that it may repromote

When clearing the modification status of the superpage, one of the
base pages produced during demotion should be marked as write disabled.
The intention is that subsequent write access may repromote.
In the current implementation this was done wrong as write permission was
granted instead of forbidden.

Approved by: cognet (mentor)
Approved by: re

10 years agoRemove zero-copy sockets code. It only worked for anonymous memory,
kib [Mon, 16 Sep 2013 06:25:54 +0000 (06:25 +0000)]
Remove zero-copy sockets code.  It only worked for anonymous memory,
and the equivalent functionality is now provided by sendfile(2) over
posix shared memory filedescriptor.

Remove the cow member of struct vm_page, and rearrange the remaining
members.  While there, make hold_count unsigned.

Requested and reviewed by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation
Approved by: re (delphij)

10 years agoIn pmap_copy(), when the copied region is mapped with superpage but does
kib [Mon, 16 Sep 2013 06:15:15 +0000 (06:15 +0000)]
In pmap_copy(), when the copied region is mapped with superpage but does
not cover entire superpage, avoid copying.  Doing partial copy would
require demotion, which is incompatible with the already held locks.

Reported by:    cperciva
Reviewed by:    alc
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Approved by: re (delphij)

10 years agoUse the address of the inpcb rather than the tcpcb to identify TCP
markj [Sun, 15 Sep 2013 21:38:46 +0000 (21:38 +0000)]
Use the address of the inpcb rather than the tcpcb to identify TCP
connections. This keeps the tcp provider consistent with the other network
providers.

Approved by: re (delphij)

10 years agoSet NO_WERROR for unbound until I can figure out how to unbreak the
des [Sun, 15 Sep 2013 16:27:25 +0000 (16:27 +0000)]
Set NO_WERROR for unbound until I can figure out how to unbreak the
non-clang build.

Approved by: re (blanket)

10 years agoMove libldns to the correct (ordered) library list.
des [Sun, 15 Sep 2013 15:55:21 +0000 (15:55 +0000)]
Move libldns to the correct (ordered) library list.

Approved by: re (blanket)

10 years agoRemove duplicate function declaration.
des [Sun, 15 Sep 2013 15:52:07 +0000 (15:52 +0000)]
Remove duplicate function declaration.

Approved by: re (blanket)

10 years agoThe Unbound developers have never met a pointer game they didn't like.
des [Sun, 15 Sep 2013 15:49:17 +0000 (15:49 +0000)]
The Unbound developers have never met a pointer game they didn't like.
Fix needless deconsting.

Approved by: re (blanket)

10 years agoRegnerate.
des [Sun, 15 Sep 2013 15:23:50 +0000 (15:23 +0000)]
Regnerate.

Approved by: re (blanket)

10 years agoBuild and install the Unbound caching DNS resolver daemon.
des [Sun, 15 Sep 2013 14:51:23 +0000 (14:51 +0000)]
Build and install the Unbound caching DNS resolver daemon.

Approved by: re (blanket)

10 years agoAdd a kernel interface (OF_xref_phandle()) for systems where phandles
nwhitehorn [Sun, 15 Sep 2013 14:19:17 +0000 (14:19 +0000)]
Add a kernel interface (OF_xref_phandle()) for systems where phandles
used as cross-references in the device tree and phandles as used by the
Open Firmware client interface are in different namespaces. This include
IBM pSeries hardware as well as FDT systems. FDT certainly abuses
ihandles for this purpose and should be modified to use this API
eventually. This changes no behavior on systems where FreeBSD already
worked.

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

10 years agoPrevious commit accidentally left out the umask change.
des [Sun, 15 Sep 2013 13:50:56 +0000 (13:50 +0000)]
Previous commit accidentally left out the umask change.

Approved by: re (blanket)