]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoMerge r236137 from x86:
marius [Wed, 30 May 2012 20:13:49 +0000 (20:13 +0000)]
Merge r236137 from x86:
Enable GNU hash generation for dynamic ELF binaries.

While at it, sync the order of options with x86 and pass along the verbose
flag.

12 years agoTry to finally get the point in time at which bge_add_sysctls() is called
marius [Wed, 30 May 2012 20:04:07 +0000 (20:04 +0000)]
Try to finally get the point in time at which bge_add_sysctls() is called
right; it needs to be called before bge_can_use_msi() but in turn requires
bge_flags to be properly set.

Submitted by: yongari
MFC after: 3 days

12 years agoWhen we return deprecated addresses, we need to reference them.
emax [Wed, 30 May 2012 20:02:39 +0000 (20:02 +0000)]
When we return deprecated addresses, we need to reference them.

Reviewed by: bz, scottl
MFC after: 3 days

12 years agoPanic openly if we cannot retrieve memory information from the device tree.
raj [Wed, 30 May 2012 18:05:48 +0000 (18:05 +0000)]
Panic openly if we cannot retrieve memory information from the device tree.
This is a critical condition and can lead to all sorts of misterious hangs if
not handled.

Obtained from: Semihalf
Also reported by: thompsa

12 years agoExtract vendor specific Book-E pieces into separate files and have a common
raj [Wed, 30 May 2012 17:34:40 +0000 (17:34 +0000)]
Extract vendor specific Book-E pieces into separate files and have a common
skeleton (maybe we should kobj-tize this one day).

Note the PPC4xx bit is not connected to the build yet.

Obtained from: AppliedMicro, Semihalf.

12 years agoCosmetic nit. If a configured volume has no label, don't emit an empty
sbruno [Wed, 30 May 2012 17:07:50 +0000 (17:07 +0000)]
Cosmetic nit.  If a configured volume has no label, don't emit an empty
string for the name during probe.  Simply indicate that it has no label.

Submitted by: bhaga@
MFC after: 3 days

12 years agoEnable vn_io_fault() lock avoidance for UFS.
kib [Wed, 30 May 2012 16:45:41 +0000 (16:45 +0000)]
Enable vn_io_fault() lock avoidance for UFS.

Tested by: pho
MFC after: 2 months

12 years agovn_io_fault() is a facility to prevent page faults while filesystems
kib [Wed, 30 May 2012 16:42:08 +0000 (16:42 +0000)]
vn_io_fault() is a facility to prevent page faults while filesystems
perform copyin/copyout of the file data into the usermode
buffer. Typical filesystem hold vnode lock and some buffer locks over
the VOP_READ() and VOP_WRITE() operations, and since page fault
handler may need to recurse into VFS to get the page content, a
deadlock is possible.

The facility works by disabling page faults handling for the current
thread and attempting to execute i/o while allowing uiomove() to
access the usermode mapping of the i/o buffer. If all buffer pages are
resident, uiomove() is successfull and request is finished. If EFAULT
is returned from uiomove(), the pages backing i/o buffer are faulted
in and held, and the copyin/out is performed using uiomove_fromphys()
over the held pages for the second attempt of VOP call.

Since pages are hold in chunks to prevent large i/o requests from
starving free pages pool, and since vnode lock is only taken for
i/o over the current chunk, the vnode lock no longer protect atomicity
of the whole i/o request. Use newly added rangelocks to provide the
required atomicity of i/o regardind other i/o and truncations.

Filesystems need to explicitely opt-in into the scheme, by setting the
MNTK_NO_IOPF struct mount flag, and optionally by using
vn_io_fault_uiomove(9) helper which takes care of calling uiomove() or
converting uio into request for uiomove_fromphys().

Reviewed by: bf (comments), mdf, pjd (previous version)
Tested by: pho
Tested by: flo, Gustau P?rez <gperez entel upc edu> (previous version)
MFC after: 2 months

12 years agoAdd a rangelock implementation, intended to be used to range-locking
kib [Wed, 30 May 2012 16:06:38 +0000 (16:06 +0000)]
Add a rangelock implementation, intended to be used to range-locking
the i/o regions of the vnode data space. The implementation is quite
simple-minded, it uses the list of the lock requests, ordered by
arrival time. Each request may be for read or for write. The
implementation is fair FIFO.

MFC after:     2 month

12 years agoCapitalize start of sentence.
kib [Wed, 30 May 2012 14:00:23 +0000 (14:00 +0000)]
Capitalize start of sentence.

MFC after: 3 days

12 years agoClarify that the v_lockf is advisory lock list.
kib [Wed, 30 May 2012 13:58:01 +0000 (13:58 +0000)]
Clarify that the v_lockf is advisory lock list.

MFC after: 3 days

12 years agoUnbreak make depend.
uqs [Wed, 30 May 2012 13:55:43 +0000 (13:55 +0000)]
Unbreak make depend.

12 years agoImprove style(9) of bcopy() to and from mbuf tag.
glebius [Wed, 30 May 2012 13:51:00 +0000 (13:51 +0000)]
Improve style(9) of bcopy() to and from mbuf tag.

Submitted by: bde

12 years agoAssert that TDP_NOFAULTING and TDP_NOSPEEPING thread flags do not leak
kib [Wed, 30 May 2012 13:44:42 +0000 (13:44 +0000)]
Assert that TDP_NOFAULTING and TDP_NOSPEEPING thread flags do not leak
when thread returns from a syscall to usermode.

Tested by: pho
MFC after: 1 week

12 years agoPrint userspace backtrace for current thread.
gber [Wed, 30 May 2012 13:33:27 +0000 (13:33 +0000)]
Print userspace backtrace for current thread.

Reviewed by: imp
Obtained from: Semihalf

12 years agoFlush D and I caches after setting a breakpoint.
gber [Wed, 30 May 2012 13:31:08 +0000 (13:31 +0000)]
Flush D and I caches after setting a breakpoint.

Reviewed by: imp
Obtained from: Semihalf

12 years agoUpdate the previous openssl fix. [12:01]
bz [Wed, 30 May 2012 12:01:28 +0000 (12:01 +0000)]
Update the previous openssl fix. [12:01]

Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02]

Security: FreeBSD-SA-12:01.openssl (revised)
Security: FreeBSD-SA-12:02.crypt
Approved by: so (bz, simon)

12 years agoAfter r228571 carp_output() expects carp_softc * pointer in the mtag.
glebius [Wed, 30 May 2012 07:11:27 +0000 (07:11 +0000)]
After r228571 carp_output() expects carp_softc * pointer in the mtag.

Noticed by: thompsa

12 years agoCatch up to the carp rewrite and refer to vhids instead of interfaces.
bjk [Wed, 30 May 2012 05:42:40 +0000 (05:42 +0000)]
Catch up to the carp rewrite and refer to vhids instead of interfaces.

Pointy hat to: bjk
Submitted by: glebius
Approved by: hrs (mentor)

12 years agoEliminate some purely stylistic differences among the amd64, i386 native,
alc [Wed, 30 May 2012 04:16:54 +0000 (04:16 +0000)]
Eliminate some purely stylistic differences among the amd64, i386 native,
and i386 xen PV entry allocators.

12 years agoDocument daily_status_security_chkportsum_enable
eadler [Wed, 30 May 2012 04:14:38 +0000 (04:14 +0000)]
Document daily_status_security_chkportsum_enable

PR: docs/167980
Submitted by: "Bryan Drewery" <bryan@shatow.net>
Reported by: rank1seeker@gmail.com
Approved by: cperciva
MFC after: 2 weeks

12 years agoRelax security permissions on '.seq' file creation - the strict,
eadler [Wed, 30 May 2012 04:08:29 +0000 (04:08 +0000)]
Relax security permissions on '.seq' file creation - the strict,
but odd permissions resulted in a security alert from 110.neggrpperm

PR: kern/165533
Submitted by: Anton Shterenlikht <mexas@bristol.ac.uk>
Submitted by: J B <jb.1234abcd@gmail.com>
Approved by: cperciva
MFC after: 1 week

12 years agoOnly set _w to 0 when the file stream is not currently reading. Without
eadler [Wed, 30 May 2012 04:06:38 +0000 (04:06 +0000)]
Only set _w to 0 when the file stream is not currently reading. Without
this fflush may fail to write data in the buffer.

PR: kern/137819
Submitted by: Eric Blake <ebb9@byu.net>
Reviewed by: theraven
Approved by: cperciva
MFC after: 2 weeks

12 years agoadd missing variable declaration when DEBUG is defined forgotten in
eadler [Wed, 30 May 2012 03:57:49 +0000 (03:57 +0000)]
add missing variable declaration when DEBUG is defined forgotten in
r215046

PR: bin/166404
Submitted by: "Conrad J. Sabatier" <conrads@cox.net>
Approved by: cperciva
MFC after: 3 days

12 years agoFix likely race condition if wait_child() is interrupted by sigchild()
eadler [Wed, 30 May 2012 03:55:44 +0000 (03:55 +0000)]
Fix likely race condition if wait_child() is interrupted by sigchild()

PR: bin/102834
Submitted by: Andreas Longwitz <longwitz@incore.de>
Approved by: cperciva
MFC after: 2 weeks

12 years agoAdd missing flag enable when certain arguments are parsed
eadler [Wed, 30 May 2012 03:54:10 +0000 (03:54 +0000)]
Add missing flag enable when certain arguments are parsed

PR: bin/163053
Submitted by: Peter <pmc@citylink.dinoex.sub.org>
Approved by: cperciva
MFC after: 1 week

12 years agoDon't attempt to delete .sujournal in /tmp
eadler [Wed, 30 May 2012 03:51:46 +0000 (03:51 +0000)]
Don't attempt to delete .sujournal in /tmp

PR: conf/163828
Submitted by: Tatsuki Makino <tatsuki_makino@hotmail.com>
Approved by: cperciva
MFC after: 1 week

12 years agoAdd support for newer garmin devices
eadler [Wed, 30 May 2012 03:50:58 +0000 (03:50 +0000)]
Add support for newer garmin devices

PR: kern/163932
Submitted by: Bartosz Fabianowski <freebsd@chillt.de>
Approved by: cperciva
MFC after: 1 week

12 years agoAdd support for Sun 1040 PCI Quad Serial
eadler [Wed, 30 May 2012 03:47:51 +0000 (03:47 +0000)]
Add support for Sun 1040 PCI Quad Serial

PR: kern/163450
Submitted by: Anonymous Hardware Hacker <silicium@harmony-p.ath.cx>
Approved by: cperciva
MFC after: 1 week

12 years ago- FreeBSD ships a KDE PAM module in base, but it's missing support for passwordless...
miwi [Wed, 30 May 2012 03:10:22 +0000 (03:10 +0000)]
- FreeBSD ships a KDE PAM module in base, but it's missing support for passwordless login (kde-np),
  and it doesn't really belong in base system.

PR: misc/167261
Submitted by: avilla@
Approved by: rwatson (mentor)
MFC after: 3 days

12 years agoRegen src.conf.5 after r236279.
gjb [Wed, 30 May 2012 02:41:09 +0000 (02:41 +0000)]
Regen src.conf.5 after r236279.

MFC after: 3 days

12 years agoAdd '-width Pa' to src.conf.5 for mdoc(7) style consistency.
gjb [Wed, 30 May 2012 02:37:20 +0000 (02:37 +0000)]
Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.

MFC after: 3 days

12 years agoFix mdoc(7) style nits.
gjb [Wed, 30 May 2012 02:29:47 +0000 (02:29 +0000)]
Fix mdoc(7) style nits.

MFC after: 3 days

12 years agoHook up wbwd man page to the build.
kevlo [Wed, 30 May 2012 02:02:37 +0000 (02:02 +0000)]
Hook up wbwd man page to the build.

12 years agoFix an mdoc(7) formatting nit.
gjb [Wed, 30 May 2012 01:52:01 +0000 (01:52 +0000)]
Fix an mdoc(7) formatting nit.

MFC after: 3 days

12 years agoFix style(9) nits, reduce unnecessary type castings, etc., for bpf_setf().
jkim [Tue, 29 May 2012 22:28:46 +0000 (22:28 +0000)]
Fix style(9) nits, reduce unnecessary type castings, etc., for bpf_setf().

12 years ago- Save the previous filter right before we set new one.
jkim [Tue, 29 May 2012 22:21:53 +0000 (22:21 +0000)]
- Save the previous filter right before we set new one.
- Reduce duplicate code and make it little easier to read.

MFC after: 2 weeks

12 years agoPull in r156591 from upstream llvm trunk:
dim [Tue, 29 May 2012 21:59:09 +0000 (21:59 +0000)]
Pull in r156591 from upstream llvm trunk:

  Allow unique_file to take a mode for file permissions, but default
  to user only read/write.

and r156592 from upstream clang trunk:

  For final output files create them with mode 0664 to match other
  compilers and expected defaults.

This should fix clang creating files with mode 0600.

Reported by: James <james@hicag.org>
MFC after: 3 days

12 years agoFor clang, similar to r236137, enable gnu hash generation for dynamic
dim [Tue, 29 May 2012 20:21:24 +0000 (20:21 +0000)]
For clang, similar to r236137, enable gnu hash generation for dynamic
ELF binaries on x86.

12 years agoAdd myself and my relation to my mentors.
olivierd [Tue, 29 May 2012 20:16:26 +0000 (20:16 +0000)]
Add myself and my relation to my mentors.

Approved by: miwi@, rene@

12 years agoadd support to build netmap as a module,
luigi [Tue, 29 May 2012 19:55:07 +0000 (19:55 +0000)]
add support to build netmap as a module,
but for the time being keep it disconnected from the main build.

MFC after: 3 days

12 years agoAdd the latest FreeBSD versions.
obrien [Tue, 29 May 2012 19:49:52 +0000 (19:49 +0000)]
Add the latest FreeBSD versions.

12 years agoFix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor
jkim [Tue, 29 May 2012 18:44:53 +0000 (18:44 +0000)]
Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor
and reset statistics as it should.

MFC after: 3 days

12 years agoTighten up the assertion: because size can't be 0 and even if sm_space is equal
pjd [Tue, 29 May 2012 18:11:45 +0000 (18:11 +0000)]
Tighten up the assertion: because size can't be 0 and even if sm_space is equal
to sm_size, any 'sm_space - size' will be less than sm_size.

MFC after: 3 days

12 years agoEliminate 'where' argument, we don't use it.
pjd [Tue, 29 May 2012 18:09:14 +0000 (18:09 +0000)]
Eliminate 'where' argument, we don't use it.

MFC after: 3 days

12 years agoRemove unused variable.
pjd [Tue, 29 May 2012 18:05:24 +0000 (18:05 +0000)]
Remove unused variable.

MFC after: 3 days

12 years agoRemove unused sysctl.
pjd [Tue, 29 May 2012 17:53:11 +0000 (17:53 +0000)]
Remove unused sysctl.

MFC after: 3 days

12 years agoAdd device ids for the Winbond 83627DHG-P chip and set the registers to
rnoland [Tue, 29 May 2012 16:39:42 +0000 (16:39 +0000)]
Add device ids for the Winbond 83627DHG-P chip and set the registers to
trigger the keyboard reset line on timeout.

Reviewed by: bz
MFC after: 1 week

12 years agoFix a typo in wbwd so that CRF5 is actually written to the data register
rnoland [Tue, 29 May 2012 16:25:01 +0000 (16:25 +0000)]
Fix a typo in wbwd so that CRF5 is actually written to the data register
rather than the index register.

Reviewed by: bz
MFC after: 3 days

12 years agoMFi386 pmap r233433
alc [Tue, 29 May 2012 16:11:15 +0000 (16:11 +0000)]
MFi386 pmap r233433
  Disable detailed PV entry accounting by default.  (A config option for
  enabling it was already introduced in r233433.)

12 years agoAdd quirk for Marvell based AHCI controller.
hselasky [Tue, 29 May 2012 15:56:30 +0000 (15:56 +0000)]
Add quirk for Marvell based AHCI controller.

MFC after: 3 days
Suggested by: mav @

12 years agoRename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no
alc [Tue, 29 May 2012 15:41:20 +0000 (15:41 +0000)]
Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no
longer uses the active and inactive paging queues.  Instead, the pmap now
maintains an LRU-ordered list of pv entry pages, and pmap_pv_reclaim() uses
this list to select pv entries for reclamation.

Note: The old pmap_collect() tried to avoid reclaiming mappings for pages
that have either a hold_count or a busy field that is non-zero.  However,
this isn't necessary for correctness, and the locking in pmap_collect() was
insufficient to guarantee that such mappings weren't reclaimed.  The new
pmap_pv_reclaim() doesn't even try.

Tested by: sbruno
MFC after: 5 weeks

12 years agoFix lock interaction table for rmlocks - by default they cannot sleep,
trasz [Tue, 29 May 2012 14:41:16 +0000 (14:41 +0000)]
Fix lock interaction table for rmlocks - by default they cannot sleep,
just like rwlocks.

MFC after: 1 week

12 years agoAllow to change number of openings (used tags) for ATA/SATA devices
mav [Tue, 29 May 2012 14:28:46 +0000 (14:28 +0000)]
Allow to change number of openings (used tags) for ATA/SATA devices
via `camcontrol tags ... -N ...`.  There is no need to tune it in
usual cases, but some users want to have it for debugging purposes.

MFC after: 2 weeks

12 years agoFix BPF_JITTER code broken by r235746.
melifaro [Tue, 29 May 2012 12:52:30 +0000 (12:52 +0000)]
Fix BPF_JITTER code broken by r235746.

Pointed by:       jkim
Reviewed by:      jkim (except locking changes)
Approved by:      (mentor)
MFC after:        2 weeks

12 years agoPlug request and references leak caused by race between invalidated
mav [Tue, 29 May 2012 11:22:40 +0000 (11:22 +0000)]
Plug request and references leak caused by race between invalidated
ond probe periph destruction and new incoming probe request.

This at least caused problems with SATA Port Multipliers hot-plug.

MFC after: 2 weeks

12 years agoPass a filename, rather than a file descriptor, to libarchive.
des [Tue, 29 May 2012 09:11:19 +0000 (09:11 +0000)]
Pass a filename, rather than a file descriptor, to libarchive.

Submitted by: Alex Kozlov <spam@rm-rf.kiev.ua>
MFC after: 1 week

12 years agoReorder resume procedures.
iwasaki [Tue, 29 May 2012 05:28:34 +0000 (05:28 +0000)]
Reorder resume procedures.

DEVICE_RESUME() should be done before AcpiLeaveSleepState() because
PCI config space evaluation can be occurred during control method
executions.

This should fix one of the hang up problems on resuming.

MFC after: 3 days

12 years agoFix the problem acpi_sleep_force() hang.
iwasaki [Tue, 29 May 2012 05:09:40 +0000 (05:09 +0000)]
Fix the problem acpi_sleep_force() hang.

Suspending from callout cause the freeze in DEVICE_SUSPEND().
Suspend from acpi_task thread in stead.

MFC after: 3 days

12 years agoCompute the master clock frequency, so we no longer need to have it
imp [Tue, 29 May 2012 03:23:18 +0000 (03:23 +0000)]
Compute the master clock frequency, so we no longer need to have it
compiled into the kernel.  This allows us to boot the same kernel on
machines with different master clock frequencies, so long as we can
determine the main clock frequency accurately.  Cleanup the pmc clock
init function so it can be called in early boot so we can use the
serial port just after we call cninit.

# We have two calls to at91_pmc_clock_init for reasons unknown, that will
# be fixed later -- it is harmless for now.

12 years agoReplace all uses of the vm page queues lock by a r/w lock that is private
alc [Tue, 29 May 2012 01:52:38 +0000 (01:52 +0000)]
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.c.  This new r/w lock is used primarily to synchronize access
to the TTE lists.  However, it will be used in a somewhat unconventional
way.  As finer-grained TTE list locking is added to each of the pmap
functions that acquire this r/w lock, its acquisition will be changed from
write to read, enabling concurrent execution of the pmap functions with
finer-grained locking.

Reviewed by: attilio
Tested by: flo
MFC after: 10 days

12 years agoMake sure that each va_start has one and only one matching va_end,
kevlo [Tue, 29 May 2012 01:48:06 +0000 (01:48 +0000)]
Make sure that each va_start has one and only one matching va_end,
especially in error cases.

12 years agoUpdate mxge(4) firmware to the latest version available from
gallatin [Tue, 29 May 2012 00:53:51 +0000 (00:53 +0000)]
Update mxge(4) firmware to the latest version available from
Myricom (1.4.55).

MFC after: 3 days
Sponored by: Myricom, Inc.

12 years agoA small simplification to i915_gem_pager_fault().
alc [Mon, 28 May 2012 21:15:54 +0000 (21:15 +0000)]
A small simplification to i915_gem_pager_fault().

Reviewed by: kib

12 years agoWhen writing the jid via the -i flag, do it right when the jail is created,
jamie [Mon, 28 May 2012 20:44:11 +0000 (20:44 +0000)]
When writing the jid via the -i flag, do it right when the jail is created,
before any commands run.  /etc/rc.d/jail depends on this.

12 years agoUpgrade to BIND version 9.8.3, the latest from ISC.
dougb [Mon, 28 May 2012 19:47:56 +0000 (19:47 +0000)]
Upgrade to BIND version 9.8.3, the latest from ISC.

Feature Change

*  BIND now recognizes the TLSA resource record type, created to
   support IETF DANE (DNS-based Authentication of Named Entities)

Bug Fix

*  The locking strategy around the handling of iterative queries
   has been tuned to reduce unnecessary contention in a multi-
   threaded environment.

Other critical bug fixes are included.

All BIND users are encouraged to upgrade.

12 years agolibfetch: Avoid SIGPIPE on network connections.
jilles [Mon, 28 May 2012 19:22:23 +0000 (19:22 +0000)]
libfetch: Avoid SIGPIPE on network connections.

To avoid unexpected process termination from SIGPIPE when writing to a
closed network connection, enable SO_NOSIGPIPE on all network connections.

The POSIX standard MSG_NOSIGNAL is not used since it requires modifying all
send calls to add this flag. This is particularly nasty for SSL connections.

Reviewed by: des
Tested by: bapt
MFC after: 5 days

12 years ago- Correct the comments regarding the sizes of some partitions in the
marius [Mon, 28 May 2012 17:58:10 +0000 (17:58 +0000)]
- Correct the comments regarding the sizes of some partitions in the
  DataFlash.
- Add a mapping for the Nut/OS configuration DataFlash partition according
  to the board manual (but not known to either Linux or U-Boot (patches).

12 years agoUpdate a comment in get_pv_entry() to reflect the changes to the
alc [Mon, 28 May 2012 17:35:23 +0000 (17:35 +0000)]
Update a comment in get_pv_entry() to reflect the changes to the
synchronization of pv_vafree in r236158.

12 years agoCatch a corner case where ssegs could be 0 and thus i would be 0 and
marcel [Mon, 28 May 2012 16:33:58 +0000 (16:33 +0000)]
Catch a corner case where ssegs could be 0 and thus i would be 0 and
we index suinfo out of bounds (i.e. -1).

Approved by: gber

12 years ago- Include forgotten bsd.own.mk and fix condition
gabor [Mon, 28 May 2012 14:45:12 +0000 (14:45 +0000)]
- Include forgotten bsd.own.mk and fix condition

Reported by: Jan Beich <jbeich@tormail.org>

12 years agoMake legacy ATA to not call device_add_child() with unit number but
mav [Mon, 28 May 2012 14:33:15 +0000 (14:33 +0000)]
Make legacy ATA to not call device_add_child() with unit number but
without driver name. This fixed legacy ATA breakage by r235978.

MFC after: 1 week

12 years agoDisable end of buffer fixup by default. New DDX does not need this, and
kib [Mon, 28 May 2012 13:58:08 +0000 (13:58 +0000)]
Disable end of buffer fixup by default. New DDX does not need this, and
since batch_len is unused by Linux driver, it seems that it is sometimes
gets passed wrong. This causes command buffer corruption and GPU hung.

Old GEMified DDX drivers that needs this workaround are not supported.

MFC after: 1 month

12 years agoFix calculation of the execution buffer end in the mapped pages
kib [Mon, 28 May 2012 13:55:49 +0000 (13:55 +0000)]
Fix calculation of the execution buffer end in the mapped pages
when it is spilled into the next page.

MFC after: 1 month

12 years agoif_lagg: allow to invoke SIOCSLAGGPORT multiple times in a row
rea [Mon, 28 May 2012 12:13:04 +0000 (12:13 +0000)]
if_lagg: allow to invoke SIOCSLAGGPORT multiple times in a row

Currently, 'ifconfig laggX down' does not remove members from this
lagg(4) interface.  So, 'service netif stop laggX' followed by
'service netif start laggX' will choke, because "stop" will leave
interfaces attached to the laggX and ifconfig from the "start" will
refuse to add already-existing interfaces.

The real-world case is when I am bundling together my Ethernet and
WiFi interfaces and using multiple profiles for accessing network in
different places: system being booted up with one profile, but later
this profile being exchanged to another one, followed by 'service
netif restart' will not add WiFi interface back to the lagg: the
"stop" action from 'service netif restart' will shut down my main WiFi
interface, so wlan0 that exists in the lagg0 will be destroyed and
purged from lagg0; the "start" action will try to re-add both
interfaces, but since Ethernet one is already in lagg0, ifconfig will
refuse to add the wlan0 from WiFi interface.

Since adding the interface to the lagg(4) when it is already here
should be an idempotent action: we're really not changing anything,
so this fix doesn't change the semantics of interface addition.

Approved by: thompsa
Reviewed by: emaste
MFC after: 1 week

12 years agoCorrectly export operator new / delete for things linking against libsupc++ but
theraven [Mon, 28 May 2012 12:11:00 +0000 (12:11 +0000)]
Correctly export operator new / delete for things linking against libsupc++ but
not libstdc++.

Unfortunately, it appears that libsupc++ / libstdc++ have a different idea of
the type of size_t to the rest of the world, which may cause problems later
on...

Reported by: des
MFC after: 1 week

12 years agoRemoved the IFCAP_ prefix when printing the IPv6 checksum capabilities.
bz [Mon, 28 May 2012 10:45:51 +0000 (10:45 +0000)]
Removed the IFCAP_ prefix when printing the IPv6 checksum capabilities.

Submitted by: dim
MFC after: 3 days

12 years agoVendor import of BIND 9.8.3
dougb [Mon, 28 May 2012 09:49:28 +0000 (09:49 +0000)]
Vendor import of BIND 9.8.3

12 years agoIt turns out that too many drivers are not only parsing the L2/3/4
bz [Mon, 28 May 2012 09:30:13 +0000 (09:30 +0000)]
It turns out that too many drivers are not only parsing the L2/3/4
headers for TSO but also for generic checksum offloading.  Ideally we
would only have one common function shared amongst all drivers, and
perhaps when updating them for IPv6 we should introduce that.
Eventually we should provide the meta information along with mbufs to
avoid (re-)parsing entirely.

To not break IPv6 (checksums and offload) and to be able to MFC the
changes without risking to hurt 3rd party drivers, duplicate the v4
framework, as other OSes have done as well.

Introduce interface capability flags for TX/RX checksum offload with
IPv6, to allow independent toggling (where possible).  Add CSUM_*_IPV6
flags for UDP/TCP over IPv6, and reserve further for SCTP, and IPv6
fragmentation.  Define CSUM_DELAY_DATA_IPV6 as we do for legacy IP and
add an alias for CSUM_DATA_VALID_IPV6.

This pretty much brings IPv6 handling in line with IPv4.
TSO is still handled in a different way and not via if_hwassist.

Update ifconfig to allow (un)setting of the new capability flags.
Update loopback to announce the new capabilities and if_hwassist flags.

Individual driver updates will have to follow, as will SCTP.

Reported by: gallatin, dim, ..
Reviewed by: gallatin (glanced at?)
MFC after: 3 days
X-MFC with: r235961,235959,235958

12 years agoAllow the load address used by ARM ubldr to be set via Make argument.
kientzle [Sun, 27 May 2012 16:27:04 +0000 (16:27 +0000)]
Allow the load address used by ARM ubldr to be set via Make argument.

In particular, this simplifies scripts that build system
images.

12 years agoReplace all uses of the vm page queues lock by a r/w lock that is private
alc [Sun, 27 May 2012 16:24:00 +0000 (16:24 +0000)]
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.c.  This new r/w lock is used primarily to synchronize access
to the PV lists.  However, it will be used in a somewhat unconventional
way.  As finer-grained PV list locking is added to each of the pmap
functions that acquire this r/w lock, its acquisition will be changed from
write to read, enabling concurrent execution of the pmap functions with
finer-grained locking.

X-MFC after: r236045

12 years agoAdd IPPROTO_MPLS (rfc4023) IP protocol definition
emaste [Sun, 27 May 2012 16:16:28 +0000 (16:16 +0000)]
Add IPPROTO_MPLS (rfc4023) IP protocol definition

There are currently no in-tree consumers; I'm adding it now for use by
vendor code.  This matches the change OpenBSD made while implementing
MPLS in gif(4).

12 years ago- Fix some typos in mmc_acquire_bus() and mmc_send_csd().
marius [Sun, 27 May 2012 16:08:58 +0000 (16:08 +0000)]
- Fix some typos in mmc_acquire_bus() and mmc_send_csd().
- Fix some math errors in mmc_decode_csd_sd().
- Fix incorrect arguments to mmc_send_app_op_cond() in mmc_go_discovery().
- Add reporting of CSD for debug purposes.
- Add detection (and skipping) of password-locked cards.
- Add setting of block length on card if necessary.

Submitted by: Patrick Kelsey
MFC after: 3 days

12 years agoImport illumos changeset 13570:3411fd5f1589
mm [Sun, 27 May 2012 16:00:00 +0000 (16:00 +0000)]
Import illumos changeset 13570:3411fd5f1589
1948 zpool list should show more detailed pool information

Display per-vdev information with "zpool list -v".
The added expandsize property has currently no value on FreeBSD.
This changeset allows adding expansion support to individual vdevs
in the future.

References:
https://www.illumos.org/issues/1948

Obtained from: illumos (issue #1948)
MFC after: 2 weeks

12 years agoPull in r157212 from upstream clang trunk:
dim [Sun, 27 May 2012 13:33:54 +0000 (13:33 +0000)]
Pull in r157212 from upstream clang trunk:

  Revert r115805. An array type is required to have a range type,
  however, the range can be unknown for the upper bound.

  Testcase to follow.

  Part of rdar://11457152

This should fix ctfconvert producing error messages during kernel
builds, similar to:

  ERROR: scsi_all.c: die 24561: failed to retrieve array bounds

These were caused by incorrect debug information for flexible array
members of structs.

MFC after: 3 days

12 years agoAllow inclusion of libc++ <cmath> to work after including math.h
theraven [Sun, 27 May 2012 12:54:41 +0000 (12:54 +0000)]
Allow inclusion of libc++ <cmath> to work after including math.h

Submitted by: Yamaya Takashi
Reviewed by: das
MFC after: 1 week

12 years agoImport illumos changeset 13605:b5c2b5db80d6 (partial)
mm [Sun, 27 May 2012 12:31:57 +0000 (12:31 +0000)]
Import illumos changeset 13605:b5c2b5db80d6 (partial)
763 FMD msg URLs should refer to something visible

Replace sun.com URL's with illumos.org

References:
https://www.illumos.org/issues/763

Obtained from: illumos (issue #763)
MFC after: 1 week

12 years agoImport illumos changeset 13564:cf89c0c60496
mm [Sun, 27 May 2012 12:22:15 +0000 (12:22 +0000)]
Import illumos changeset 13564:cf89c0c60496
1946 incorrect formatting when listing output of multiple pools with
zpool iostat -v

References:
https://www.illumos.org/issues/1946

Obtained from: illumos (issue #1946)
MFC after: 1 week

12 years agoImport illumos changeset 13571:a5771a96228c
mm [Sun, 27 May 2012 11:37:24 +0000 (11:37 +0000)]
Import illumos changeset 13571:a5771a96228c
1950 ztest backwards compatibility testing option

References:
https://www.illumos.org/issues/1950

Obtained from: illumos (issue #1950)
MFC after: 2 weeks

12 years agoRemove redundant check, we catch ULE platform support in common
raj [Sun, 27 May 2012 10:32:10 +0000 (10:32 +0000)]
Remove redundant check, we catch ULE platform support in common
sys/kern/sched_ule.c

12 years agoLet us manage differences of Book-E PowerPC variations i.e. vendor /
raj [Sun, 27 May 2012 10:25:20 +0000 (10:25 +0000)]
Let us manage differences of Book-E PowerPC variations i.e. vendor /
implementation specific vs. the common architecture definition.

Bring PPC4XX defines (PSL, SPR, TLB). Note the new definitions under
BOOKE_PPC4XX are not used in the code yet.

This change set is not supposed to affect existing E500 support, it's just
another reorg step before bringing support for E500mc, E5500 and PPC465.

Obtained from: AppliedMicro, Freescale, Semihalf

12 years agoFix style and consistency:
ed [Sun, 27 May 2012 09:34:47 +0000 (09:34 +0000)]
Fix style and consistency:

- Use tabs, not spaces.
- Add tab after #define.
- Don't mix the use of BSD and ISO C unsigned integer types. Prefer the
  ISO C ones.

12 years agoOpenSSH: allow VersionAddendum to be used again
rea [Sun, 27 May 2012 06:53:35 +0000 (06:53 +0000)]
OpenSSH: allow VersionAddendum to be used again

Prior to this, setting VersionAddendum will be a no-op: one will
always have BASE_VERSION + " " + VERSION_HPN for VersionAddendum
set in the config and a bare BASE_VERSION + VERSION_HPN when there
is no VersionAddendum is set.

HPN patch requires both parties to have the "hpn" inside their
advertized versions, so we add VERSION_HPN to the VERSION_BASE
if HPN is enabled and omitting it if HPN is disabled.

VersionAddendum now uses the following logics:
 * unset (default value): append " " and VERSION_ADDENDUM;
 * VersionAddendum is set and isn't empty: append " "
   and VersionAddendum;
 * VersionAddendum is set and empty: don't append anything.

Approved by: des
Reviewed by: bz
MFC after: 3 days

12 years agoWork around a race condition in devfs by changing the way closes
ken [Sun, 27 May 2012 06:11:09 +0000 (06:11 +0000)]
Work around a race condition in devfs by changing the way closes
are handled in most CAM peripheral drivers that are not handled by
GEOM's disk class.

The usual character driver open and close semantics are that the
driver gets N open calls, but only one close, when the last caller
closes the device.

CAM peripheral drivers expect that behavior to be honored to the
letter, and the CAM peripheral driver code (specifically
cam_periph_release_locked_busses()) panics if it is done incorrectly.

Since devfs has to drop its locks while it calls a driver's close
routine, and it does not have a way to delay or prevent open calls
while it is calling the close routine, there is a race.

The sequence of events, simplified a bit, is:

- devfs acquires a lock
- devfs checks the reference count, and if it is 1, continues to close.
- devfs releases the lock

- 2nd process open call on the device happens here

- devfs calls the driver's close routine

- devfs acquires a lock
- devfs decrements the reference count
- devfs releases the lock

- 2nd process close call on the device happens here

At the second close, we get a panic in
cam_periph_release_locked_busses(), complaining that peripheral
has been released when the reference count is already 0.  This is
because we have gotten two closes in a row, which should not
happen.

The fix is to add the D_TRACKCLOSE flag to the driver's cdevsw, so
that we get a close() call for each open().  That does happen
reliably, so we can make sure that our reference counts are
correct.

Note that the sa(4) and pt(4) drivers only allow one context
through the open routine.  So these drivers aren't exposed to the
same race condition.

scsi_ch.c,
scsi_enc.c,
scsi_enc_internal.h,
scsi_pass.c,
scsi_sg.c:
For these drivers, change the open() routine to
increment the reference count for every open, and
just decrement the reference count in the close.

Call cam_periph_release_locked() in some scenarios
to avoid additional lock and unlock calls.

scsi_pt.c: Call cam_periph_release_locked() in some scenarios
to avoid additional lock and unlock calls.

MFC after: 3 days

12 years agoEnable gnu hash generation for dynamic ELF binaries on x86.
kib [Sun, 27 May 2012 05:27:47 +0000 (05:27 +0000)]
Enable gnu hash generation for dynamic ELF binaries on x86.

Reviewed by: kan

12 years agoFix ki_cow for compat32 binaries.
kib [Sun, 27 May 2012 05:24:53 +0000 (05:24 +0000)]
Fix ki_cow for compat32 binaries.

MFC after: 3 days

12 years agoReturn EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not
davidxu [Sun, 27 May 2012 01:24:51 +0000 (01:24 +0000)]
Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not
be acquired.

PR: 168317
MFC after: 3 days

12 years agoCorrectly get the payload length in host byte order. While we
bz [Sat, 26 May 2012 23:58:51 +0000 (23:58 +0000)]
Correctly get the payload length in host byte order.  While we
already plan to support >64k payload here, the IPv6 header payload
length obviously is only 16 bit and the calculations need to be right.

Reported by: dim
Tested by: dim
MFC after: 1 day
X-MFC: with r235958

12 years agoOpenPAM Micrampelis was re-rolled due to a showstopper bug.
des [Sat, 26 May 2012 23:10:21 +0000 (23:10 +0000)]
OpenPAM Micrampelis was re-rolled due to a showstopper bug.

12 years agoWording corrections and simplifications.
wblock [Sat, 26 May 2012 21:30:18 +0000 (21:30 +0000)]
Wording corrections and simplifications.

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