]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoUpdate bridge(4) default values.
brueffer [Wed, 29 Feb 2012 21:11:02 +0000 (21:11 +0000)]
Update bridge(4) default values.

PR: 164564
Submitted by: "Rudy (bulk)" <crapsh@monkeybrains.net>
MFC after: 2 weeks

12 years agoUse a more appropriate default for the maximum number of addresses in the
thompsa [Wed, 29 Feb 2012 20:58:21 +0000 (20:58 +0000)]
Use a more appropriate default for the maximum number of addresses in the
bridge forwarding table.

PR: docs/164564
Discussed with: brueffer

12 years agoAdd myself, and show marck@ as my mentor.
pluknet [Wed, 29 Feb 2012 20:13:53 +0000 (20:13 +0000)]
Add myself, and show marck@ as my mentor.

Approved by: marck (mentor)

12 years agoFix order of arguments to lseek().
brueffer [Wed, 29 Feb 2012 19:50:49 +0000 (19:50 +0000)]
Fix order of arguments to lseek().

PR: 160867
Submitted by: Henning Petersen <henning.petersen@t-online.de>
MFC after: 1 week

12 years agoRegenerate src.conf(5) after r231530 (and to correct a little screwup
dim [Wed, 29 Feb 2012 19:18:32 +0000 (19:18 +0000)]
Regenerate src.conf(5) after r231530 (and to correct a little screwup
with the WITH_CLANG_EXTRAS fragment I added).

12 years agoFix a long standing bug. The caller expects a non-zero value for success.
jkim [Wed, 29 Feb 2012 18:11:33 +0000 (18:11 +0000)]
Fix a long standing bug.  The caller expects a non-zero value for success.
Luckily keyboard probing was turned off by default from the first revision.

Submitted by: Alexander Sack (asack at niksun dot com)
MFC after: 3 days

12 years agoblkif interface comment cleanups. No functional changes
gibbs [Wed, 29 Feb 2012 17:47:01 +0000 (17:47 +0000)]
blkif interface comment cleanups.  No functional changes

sys/xen/interface/io/blkif.h:
 o Insert space in "Red Hat".
 o Fix typo "discard-aligment" -> "discard-alignment"
 o Fix typo "unamp" -> "unmap"
 o Fix typo "formated" -> "formatted"
 o Clarify the text for "params".
 o Clarify the text for "sector-size".
 o Clarify the text for "max-requests" in the backend section.

12 years agoAdd "export" to devfs_opts[] and return EOPNOTSUPP if called with it.
mm [Wed, 29 Feb 2012 16:16:36 +0000 (16:16 +0000)]
Add "export" to devfs_opts[] and return EOPNOTSUPP if called with it.
Fixes mountd warnings.

Reported by: kib
MFC after: 1 week

12 years agoAllow shared locks for reads when lower filesystem accept shared locking.
kib [Wed, 29 Feb 2012 15:18:53 +0000 (15:18 +0000)]
Allow shared locks for reads when lower filesystem accept shared locking.

Tested by: pho
MFC after: 1 week

12 years agoDocument that null_nodeget() cannot take shared-locked lowervp due to
kib [Wed, 29 Feb 2012 15:18:04 +0000 (15:18 +0000)]
Document that null_nodeget() cannot take shared-locked lowervp due to
insmntque() requirements.

Tested by: pho
MFC after: 1 week

12 years agoIn null_reclaim(), assert that reclaimed vnode is fully constructed,
kib [Wed, 29 Feb 2012 15:15:36 +0000 (15:15 +0000)]
In null_reclaim(), assert that reclaimed vnode is fully constructed,
instead of accepting half-constructed vnode. Previous code cannot decide
what to do with such vnode anyway, and although processing it for hash
removal, paniced later when getting rid of nullfs reference on lowervp.

While there, remove initializations from the declaration block.

Tested by: pho
MFC after: 1 week

12 years agoAlways request exclusive lock for the lower vnode in nullfs_vget().
kib [Wed, 29 Feb 2012 15:09:20 +0000 (15:09 +0000)]
Always request exclusive lock for the lower vnode in nullfs_vget().
The null_nodeget() requires exclusive lock on lowervp to be able to
insmntque() new vnode.

Reported by: rea
Tested by: pho
MFC after: 1 week

12 years agoUpdate the description for -s flag after r232182.
pluknet [Wed, 29 Feb 2012 15:06:40 +0000 (15:06 +0000)]
Update the description for -s flag after r232182.
When displaying security credential information show also process umask.

X-MFC-with: r232182

12 years agoMove the code to destroy half-contructed nullfs vnode into helper
kib [Wed, 29 Feb 2012 15:06:00 +0000 (15:06 +0000)]
Move the code to destroy half-contructed nullfs vnode into helper
function null_destroy_proto() from null_insmntque_dtr(). Also
apply null_destroy_proto() in null_nodeget() when we raced and a vnode
is found in the hash, so the currently allocated protonode shall be
destroyed.

Lock the vnode interlock around reassigning the v_vnlock.

In fact, this path will not be exercised after several later commits,
since null_nodeget() cannot take shared-locked lowervp at all due to
insmntque() requirements.

Reported by: rea
Tested by: pho
MFC after: 1 week

12 years agoGrammar: tzsetup now has more than one option.
emaste [Wed, 29 Feb 2012 14:44:42 +0000 (14:44 +0000)]
Grammar: tzsetup now has more than one option.

12 years agoMerge a split multi-line comment.
kib [Wed, 29 Feb 2012 14:43:27 +0000 (14:43 +0000)]
Merge a split multi-line comment.

MFC after: 1 week

12 years agoMake sure we do not provide the page 0 to the VM. It can't handle it properly,
cognet [Wed, 29 Feb 2012 12:44:34 +0000 (12:44 +0000)]
Make sure we do not provide the page 0 to the VM. It can't handle it properly,
because pmap_extract() returns 0 when there's no mapping.

PR: arm/154227
MFC after: 1 week

12 years agoBump .Dd to reflect latest update
mm [Wed, 29 Feb 2012 07:33:07 +0000 (07:33 +0000)]
Bump .Dd to reflect latest update

Reported by: bz
MFC after: 1 week

12 years agoRevert part of old logic of assigning MAC addressess:
gonzo [Wed, 29 Feb 2012 05:48:29 +0000 (05:48 +0000)]
Revert part of old logic of assigning MAC addressess:

- Reserver respective number of addresses for managment port
- octm uses base address directly
- other drivers get MACs on "first come first served" basis

Reviewed by: juli

12 years agoSimplify kmem_alloc() by eliminating code that existed on account of
alc [Wed, 29 Feb 2012 05:41:29 +0000 (05:41 +0000)]
Simplify kmem_alloc() by eliminating code that existed on account of
external pagers in Mach.  FreeBSD doesn't implement external pagers.
Moreover, it don't pageout the kernel object.  So, the reasons for
having code don't hold.

Reviewed by: kib
MFC after: 6 weeks

12 years agoinitialize clock ID and flags only when copying timespec, a _umtx_time
davidxu [Wed, 29 Feb 2012 02:01:48 +0000 (02:01 +0000)]
initialize clock ID and flags only when copying timespec, a _umtx_time
copy already contains these fields.

12 years agoAdd procfs to jail-mountable filesystems.
mm [Wed, 29 Feb 2012 00:30:18 +0000 (00:30 +0000)]
Add procfs to jail-mountable filesystems.

Reviewed by: jamie
MFC after: 1 week

12 years agoCopy amd64 stdarg.h to x86 and replace amd64/i386/pc98 stdarg.h with stubs.
tijl [Tue, 28 Feb 2012 22:30:58 +0000 (22:30 +0000)]
Copy amd64 stdarg.h to x86 and replace amd64/i386/pc98 stdarg.h with stubs.

12 years agoCopy amd64 setjmp.h to x86 and replace amd64/i386/pc98 setjmp.h with stubs.
tijl [Tue, 28 Feb 2012 22:17:52 +0000 (22:17 +0000)]
Copy amd64 setjmp.h to x86 and replace amd64/i386/pc98 setjmp.h with stubs.

12 years agoDocument the 'URL' argument.
obrien [Tue, 28 Feb 2012 22:15:46 +0000 (22:15 +0000)]
Document the 'URL' argument.

12 years ago- Refresh dynamic tcp rule only if both sides answered keepalive packets.
oleg [Tue, 28 Feb 2012 22:00:41 +0000 (22:00 +0000)]
- Refresh dynamic tcp rule only if both sides answered keepalive packets.
- Remove some useless assignments.

MFC after: 1 month

12 years agolookup_dyn_rule_locked(): style(9) cleanup
oleg [Tue, 28 Feb 2012 21:53:39 +0000 (21:53 +0000)]
lookup_dyn_rule_locked(): style(9) cleanup

MFC after: 1 month

12 years agoChange definition of pipe_chmod() from K&R to C99, to avoid the
dim [Tue, 28 Feb 2012 21:45:21 +0000 (21:45 +0000)]
Change definition of pipe_chmod() from K&R to C99, to avoid the
following clang warning:

sys/kern/sys_pipe.c:1556:10: error: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'mode_t'
      (aka 'unsigned short') declared in a previous prototype [-Werror]
        mode_t mode;
               ^
sys/kern/sys_pipe.c:155:19: note: previous declaration is here
static fo_chmod_t       pipe_chmod;
                        ^

12 years agoOnly increment is_beacon_bad if we're not scanning.
adrian [Tue, 28 Feb 2012 21:43:29 +0000 (21:43 +0000)]
Only increment is_beacon_bad if we're not scanning.

Otherwise things such as off-channel probe responses and beacons are also
silently discarded and logged against this error counter.

12 years agoPrint out the bogus beacon interval.
adrian [Tue, 28 Feb 2012 21:41:47 +0000 (21:41 +0000)]
Print out the bogus beacon interval.

12 years agoRevert r232260.
emaste [Tue, 28 Feb 2012 19:50:14 +0000 (19:50 +0000)]
Revert r232260.

The problem is now fixed by a general workaround in r232267.

12 years agoWorkaround for PCIe 4GB boundary issue
emaste [Tue, 28 Feb 2012 19:42:40 +0000 (19:42 +0000)]
Workaround for PCIe 4GB boundary issue

Enforce a boundary of no more than 4GB - transfers crossing a 4GB
boundary can lead to data corruption due to PCIe limitations.  This
change is a less-intrusive workaround that can be quickly merged back
to older branches; a cleaner implementation will arrive in HEAD later
but may require KPI changes.

This change is based on a suggestion by jhb@.

Reviewed by:    scottl, jhb
Sponsored by:   Sandvine Incorporated
MFC after:      3 days

12 years agoCopy amd64 endian.h to x86 and merge with i386 endian.h. Replace
tijl [Tue, 28 Feb 2012 19:39:54 +0000 (19:39 +0000)]
Copy amd64 endian.h to x86 and merge with i386 endian.h. Replace
amd64/i386/pc98 endian.h with stubs.

In __bswap64_const(x) the conflict between 0xffUL and 0xffULL has been
resolved by reimplementing the macro in terms of __bswap32(x). As a side
effect __bswap64_var(x) is now implemented using two bswap instructions on
i386 and should be much faster. __bswap32_const(x) has been reimplemented
in terms of __bswap16(x) for consistency.

12 years agoProperly clear a device's devclass if DEVICE_ATTACH() fails if the device
jhb [Tue, 28 Feb 2012 19:16:02 +0000 (19:16 +0000)]
Properly clear a device's devclass if DEVICE_ATTACH() fails if the device
does not have a fixed devclass.

Reviewed by: imp
MFC after: 2 weeks

12 years agoCopy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace
tijl [Tue, 28 Feb 2012 18:38:33 +0000 (18:38 +0000)]
Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace
amd64/i386/pc98 _stdint.h with stubs.

12 years agoDefine several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
dim [Tue, 28 Feb 2012 18:30:18 +0000 (18:30 +0000)]
Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang       (disables -Werror)
- NO_WCAST_ALIGN.clang  (disables -Wcast-align)
- NO_WFORMAT.clang (disables -Wformat and friends)
- CLANG_NO_IAS (disables integrated assembler)
- CLANG_OPT_SMALL (adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf!  For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

MFC after: 2 weeks

12 years agoCopy amd64 _limits.h to x86 and merge with i386 _limits.h. Replace
tijl [Tue, 28 Feb 2012 18:24:28 +0000 (18:24 +0000)]
Copy amd64 _limits.h to x86 and merge with i386 _limits.h. Replace
amd64/i386/pc98 _limits.h with stubs.

12 years agoCopy amd64 _types.h to x86 and merge with i386 _types.h. Replace existing
tijl [Tue, 28 Feb 2012 18:15:28 +0000 (18:15 +0000)]
Copy amd64 _types.h to x86 and merge with i386 _types.h. Replace existing
amd64/i386/pc98 _types.h with stubs.

12 years agoAvoid transfers crossing a 4GB boundary, which can lead to data
emaste [Tue, 28 Feb 2012 17:29:31 +0000 (17:29 +0000)]
Avoid transfers crossing a 4GB boundary, which can lead to data
corruption.  Thanks to scottl@ for the suggestion.

This change will likely be revised after consideration of a general
method to address this type of issue for other drivers.

Sponsored by:   Sandvine Incorporated
MFC after:      3 days

12 years agoMention mos(4)
kevlo [Tue, 28 Feb 2012 15:47:39 +0000 (15:47 +0000)]
Mention mos(4)

12 years agoAdd support for the MCS7832
kevlo [Tue, 28 Feb 2012 15:45:42 +0000 (15:45 +0000)]
Add support for the MCS7832

Obtained from: OpenBSD

12 years agoAdd missing MODULE_DEPEND() so that acpi.ko and aibs.ko can be
kevlo [Tue, 28 Feb 2012 15:12:26 +0000 (15:12 +0000)]
Add missing MODULE_DEPEND() so that acpi.ko and aibs.ko can be
loaded dynamically.

12 years agoFix checks for error return from amr_sglist_map() and amr_ccb_map()
kevlo [Tue, 28 Feb 2012 15:09:56 +0000 (15:09 +0000)]
Fix checks for error return from amr_sglist_map() and amr_ccb_map()

12 years agoFix typos
kevlo [Tue, 28 Feb 2012 15:07:05 +0000 (15:07 +0000)]
Fix typos

12 years agoCorrect pathname for manpages after libarchive 3.0.3 update.
pluknet [Tue, 28 Feb 2012 14:35:36 +0000 (14:35 +0000)]
Correct pathname for manpages after libarchive 3.0.3 update.

12 years agoCorrect capitalization of "Hz" in user-visible text (manpages, printf(),
gavin [Tue, 28 Feb 2012 13:19:34 +0000 (13:19 +0000)]
Correct capitalization of "Hz" in user-visible text (manpages, printf(),
etc).

MFC after: 3 days

12 years agoAdd lib32 part after libarchive 3.0.3 update.
pluknet [Tue, 28 Feb 2012 11:06:52 +0000 (11:06 +0000)]
Add lib32 part after libarchive 3.0.3 update.

12 years agomdoc(7) stype - start new sentences on new line
mm [Tue, 28 Feb 2012 07:35:07 +0000 (07:35 +0000)]
mdoc(7) stype - start new sentences on new line

MFC after: 1 week

12 years agoPrefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to
yongari [Tue, 28 Feb 2012 05:23:29 +0000 (05:23 +0000)]
Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to
extract a link status of PHY when parent driver is re(4).
RGEPHY_MII_SSR register does not seem to report correct PHY status
on some integrated PHYs used with re(4).
Unfortunately, RealTek PHYs have no additional information to
differentiate integrated PHYs from external ones so relying on PHY
model number is not enough to know that.  However, it seems
RGEPHY_MII_SSR register exists for external RealTek PHYs so
checking parent driver would be good indication to know which PHY
was used. In other words, for non-re(4) controllers, the PHY is
external one and its revision number is greater than or equal to 2.
This change fixes intermittent link UP/DOWN messages reported on
RTL8169 controller.

Also, mii_attach(9) is tried after setting interface name since
rgephy(4) have to know parent driver name.

PR: kern/165509

12 years agoAdd is_beacon_bad.
adrian [Tue, 28 Feb 2012 04:06:42 +0000 (04:06 +0000)]
Add is_beacon_bad.

PR: kern/165517

12 years agoTrack the number of bad beacons received.
adrian [Tue, 28 Feb 2012 04:05:35 +0000 (04:05 +0000)]
Track the number of bad beacons received.

PR: kern/165517

12 years agoFix a few rendering nits in rc.conf(5) with regards to mentioning
gjb [Tue, 28 Feb 2012 03:11:02 +0000 (03:11 +0000)]
Fix a few rendering nits in rc.conf(5) with regards to mentioning
jail_parallel_enable.

12 years agoCurrently, the debugger attached to the process executing vfork() does
kib [Mon, 27 Feb 2012 21:10:10 +0000 (21:10 +0000)]
Currently, the debugger attached to the process executing vfork() does
not get syscall exit notification until the child performed exec of
exit.  Swap the order of doing ptracestop() and waiting for P_PPWAIT
clearing, by postponing the wait into syscallret after ptracestop()
notification is done.

Reported, tested and reviewed by: Dmitry Mikulin <dmitrym juniper net>
MFC after:  2 weeks

12 years agoFix a race in top non-interactive mode. Use plain sleep(3) call instead
kib [Mon, 27 Feb 2012 20:52:20 +0000 (20:52 +0000)]
Fix a race in top non-interactive mode.  Use plain sleep(3) call instead
of arming timer and then pausing.  If SIGALRM is delivered before pause(3)
is entered, top hangs.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoA bunch of netmap fixes:
luigi [Mon, 27 Feb 2012 19:05:01 +0000 (19:05 +0000)]
A bunch of netmap fixes:

USERSPACE:
1. add support for devices with different number of rx and tx queues;

2. add better support for zero-copy operation, adding an extra field
   to the netmap ring to indicate how many buffers we have already processed
   but not yet released (with help from Eddie Kohler);

3. The two changes above unfortunately require an API change, so while
   at it add a version field and some spares to the ioctl() argument
   to help detect mismatches.

4. update the manual page for the two changes above;

5. update sample applications in tools/tools/netmap

KERNEL:

1. simplify the internal structures moving the global wait queues
   to the 'struct netmap_adapter';

2. simplify the functions that map kring<->nic ring indexes

3. normalize device-specific code, helps mainteinance;

4. start exploring the impact of micro-optimizations (prefetch etc.)
   in the ixgbe driver.
   Use 'legacy' descriptors on the tx ring and prefetch slots gives
   about 20% speedup at 900 MHz. Another 7-10% would come from removing
   the explict calls to bus_dmamap* in the core (they are effectively
   NOPs in this case, but it takes expensive load of the per-buffer
   dma maps to figure out that they are all NULL.

   Rx performance not investigated.

I am postponing the MFC so i can import a few more improvements
before merging.

12 years agoTypo.
jhb [Mon, 27 Feb 2012 18:28:31 +0000 (18:28 +0000)]
Typo.

12 years agoBackout r230934 which didn't work with unix sockets and
pluknet [Mon, 27 Feb 2012 17:39:34 +0000 (17:39 +0000)]
Backout r230934 which didn't work with unix sockets and
several filesystem layers mounted at the specified path.

Pointy hat to: pluknet

12 years ago- Panic up front if a kernel does not include 'device atpic' and an
jhb [Mon, 27 Feb 2012 17:33:16 +0000 (17:33 +0000)]
- Panic up front if a kernel does not include 'device atpic' and an
  APIC is not found.
- Don't panic if lapic_enable_cmc() is called and the APIC is not enabled.
  This can happen due to booting a kernel with APIC disabled on a CPU that
  supports CMCI.
- Wrap a long line.

12 years agoMFamd64: Don't whine about interrupts being disabled for an NMI.
jhb [Mon, 27 Feb 2012 17:31:38 +0000 (17:31 +0000)]
MFamd64: Don't whine about interrupts being disabled for an NMI.

12 years agoRemove completely duplicate '#ifdef XEN' section.
jhb [Mon, 27 Feb 2012 17:30:21 +0000 (17:30 +0000)]
Remove completely duplicate '#ifdef XEN' section.

12 years agoResort the IDT_DTRACE_RET constant after it was changed to be less than
jhb [Mon, 27 Feb 2012 17:29:37 +0000 (17:29 +0000)]
Resort the IDT_DTRACE_RET constant after it was changed to be less than
IDT_SYSCALL.

12 years agoCorrect function prototype for read_rflags().
jhb [Mon, 27 Feb 2012 17:28:47 +0000 (17:28 +0000)]
Correct function prototype for read_rflags().

12 years agoUpdate incorrect comment.
jhb [Mon, 27 Feb 2012 17:28:22 +0000 (17:28 +0000)]
Update incorrect comment.

12 years agoUpdate PCI-IDs with devices found on Intel SDP
sbruno [Mon, 27 Feb 2012 17:04:18 +0000 (17:04 +0000)]
Update PCI-IDs with devices found on Intel SDP

Return  BUS_PROBE_DEFAULT so that non-default drivers may be loaded

Reviewed by: jharris@
Obtained from: Yahoo! Inc. and Intel
MFC after: 3 days

12 years agoRemove unused variable count.
kevlo [Mon, 27 Feb 2012 16:10:26 +0000 (16:10 +0000)]
Remove unused variable count.
This variable is initialized but not used.

12 years agoClear the a device's description string anytime it's driver changes.
jhb [Mon, 27 Feb 2012 16:08:18 +0000 (16:08 +0000)]
Clear the a device's description string anytime it's driver changes.
Descriptions  are specific to drivers and we don't change drivers on attached
devices.  This fixes a few places where we were not clearing the description
when detaching a driver (e.g. with device_attach() failed).  While here, fix
a few other nits:
- Remove spurious call to remove a device's driver from
  devclass_driver_deleted().  device_detach() removes it already.
- Fix a typo.

12 years agoFollow changes made in revision 232144, pass absolute timeout to kernel,
davidxu [Mon, 27 Feb 2012 13:38:52 +0000 (13:38 +0000)]
Follow changes made in revision 232144, pass absolute timeout to kernel,
this eliminates a clock_gettime() syscall.

12 years agoRework CPU load balancing in SCHED_ULE:
mav [Mon, 27 Feb 2012 10:31:54 +0000 (10:31 +0000)]
Rework CPU load balancing in SCHED_ULE:
 - In sched_pickcpu() be more careful taking previous CPU on SMT systems.
Do it only if all other logical CPUs of that physical one are idle to avoid
extra resource sharing.
 - In sched_pickcpu() change general logic of CPU selection. First
look for idle CPU, sharing last level cache with previously used one,
skipping SMT CPU groups. If none found, search all CPUs for the least loaded
one, where the thread with its priority can run now. If none found, search
just for the least loaded CPU.
 - Make cpu_search() compare lowest/highest CPU load when comparing CPU
groups with equal load. That allows to differentiate 1+1 and 2+0 loads.
 - Make cpu_search() to prefer specified (previous) CPU or group if load
is equal. This improves cache affinity for more complicated topologies.
 - Randomize CPU selection if above factors are equal. Previous code tend
to prefer CPUs with lower IDs, causing unneeded collisions.
 - Rework periodic balancer in sched_balance_group(). With cpu_search()
more intelligent now, make balansing process flat, removing recursion
over the topology tree. That fixes double swap problem and makes load
distribution more even and predictable.

All together this gives 10-15% performance improvement in many tests on
CPUs with SMT, such as Core i7, for number of threads is less then number
of logical CPUs. In some tests it also gives positive effect to systems
without SMT.

Reviewed by: jeff
Tested by: flo, hackers@
MFC after: 1 month
Sponsored by: iXsystems, Inc.

12 years agoFix logic error
kevlo [Mon, 27 Feb 2012 08:57:02 +0000 (08:57 +0000)]
Fix logic error

12 years agoRemove duplicate assignment of SF_IMR_RXDQ2_DMADONE bit
kevlo [Mon, 27 Feb 2012 08:55:32 +0000 (08:55 +0000)]
Remove duplicate assignment of SF_IMR_RXDQ2_DMADONE bit

12 years agoDrop setuid status while doing file operations to prevent potential
delphij [Mon, 27 Feb 2012 05:49:00 +0000 (05:49 +0000)]
Drop setuid status while doing file operations to prevent potential
information leak.  This changeset is intended to be a minimal one
to make backports easier.

Reviewed by: kevlo, remko
MFC after: 1 week

12 years agoxargs: Remove an unclear comment that only tried to repeat what the code did
jilles [Sun, 26 Feb 2012 23:06:30 +0000 (23:06 +0000)]
xargs: Remove an unclear comment that only tried to repeat what the code did

Reported by: bde

12 years agoFix segfault if distfetch and distextract binaries are run standalone
nwhitehorn [Sun, 26 Feb 2012 22:09:21 +0000 (22:09 +0000)]
Fix segfault if distfetch and distextract binaries are run standalone
without the DISTRIBUTIONS environment variable set.

PR: bin/165492
Submitted by: Fernando Apesteguia
MFC after: 4 days

12 years agoFix apparent logic reversal in setting the 'auto_mode' flag.
kan [Sun, 26 Feb 2012 21:24:27 +0000 (21:24 +0000)]
Fix apparent logic reversal in setting the 'auto_mode' flag.

MFC after: 2 weeks

12 years agoAlso call the low-level driver if ->c_iflag & (IXON|IXOFF|IXANY) changes.
phk [Sun, 26 Feb 2012 20:56:49 +0000 (20:56 +0000)]
Also call the low-level driver if ->c_iflag & (IXON|IXOFF|IXANY) changes.

Uftdi(4) examines (c_iflag & (IXON|IXOFF)) to control hw XON-XOFF support.
This is obviously no good, if changes to those bits are not communicated
down the stack.

12 years agoFix typo.
alc [Sun, 26 Feb 2012 19:10:14 +0000 (19:10 +0000)]
Fix typo.

MFC after: 1 week

12 years agoxargs: Fix comma splice in error message.
jilles [Sun, 26 Feb 2012 17:39:46 +0000 (17:39 +0000)]
xargs: Fix comma splice in error message.

Reported by: bde

12 years agoAnalogous to r232059, add a parameter for the ZFS file system:
mm [Sun, 26 Feb 2012 16:30:39 +0000 (16:30 +0000)]
Analogous to r232059, add a parameter for the ZFS file system:

allow.mount.zfs:
allow mounting the zfs filesystem inside a jail

This way the permssions for mounting all current VFCF_JAIL filesystems
inside a jail are controlled wia allow.mount.* jail parameters.

Update sysctl descriptions.
Update jail(8) and zfs(8) manpages.

TODO: document the connection of allow.mount.* and VFCF_JAIL for kernel
developers

MFC after: 10 days

12 years agoRemove duplicate assignment of CTS_SPI_VALID_SYNC_RATE bit
kevlo [Sun, 26 Feb 2012 16:05:20 +0000 (16:05 +0000)]
Remove duplicate assignment of CTS_SPI_VALID_SYNC_RATE bit

12 years agoCheck fchmod()/fchown() in fifo_misc test.
jilles [Sun, 26 Feb 2012 15:32:02 +0000 (15:32 +0000)]
Check fchmod()/fchown() in fifo_misc test.

12 years agoFix fchmod() and fchown() on fifos.
jilles [Sun, 26 Feb 2012 15:14:29 +0000 (15:14 +0000)]
Fix fchmod() and fchown() on fifos.

The new fifo implementation in r232055 broke fchmod() and fchown() on fifos.
Postfix needs this.

Submitted by: gianni
Reported by: dougb

12 years agoWhen displaying security credential information show also process umask.
trociny [Sun, 26 Feb 2012 14:27:34 +0000 (14:27 +0000)]
When displaying security credential information show also process umask.

Submitted by: Dmitry Banschikov <me ubique spb ru>
Discussed with: rwatson
MFC after: 2 weeks

12 years agoAdd sysctl to retrieve or set umask of another process.
trociny [Sun, 26 Feb 2012 14:25:48 +0000 (14:25 +0000)]
Add sysctl to retrieve or set umask of another process.

Submitted by: Dmitry Banschikov <me ubique spb ru>
Discussed with: kib, rwatson
Reviewed by: kib
MFC after: 2 weeks

12 years agoDocument SO_PROTOCOL socket option.
kib [Sun, 26 Feb 2012 13:57:24 +0000 (13:57 +0000)]
Document SO_PROTOCOL socket option.

Discussed with: bz
Reviewed by: glebius
MFC after: 2 weeks

12 years agoAdd SO_PROTOCOL/SO_PROTOTYPE socket SOL_SOCKET-level option to get the
kib [Sun, 26 Feb 2012 13:55:43 +0000 (13:55 +0000)]
Add SO_PROTOCOL/SO_PROTOTYPE socket SOL_SOCKET-level option to get the
socket protocol number.  This is useful since the socket type can
be implemented by different protocols in the same protocol family,
e.g. SOCK_STREAM may be provided by both TCP and SCTP.

Submitted by: Jukka A. Ukkonen <jau iki fi>
PR:   kern/162352
Discussed with: bz
Reviewed by: glebius
MFC after: 2 weeks

12 years agoRemove apparently redundand checks for socket so_proto being non-NULL
kib [Sun, 26 Feb 2012 13:51:05 +0000 (13:51 +0000)]
Remove apparently redundand checks for socket so_proto being non-NULL
from sosetopt() and sogetopt().  No exposed sockets may have so_proto
invalid.

Discussed with: bz, rwatson
Reviewed by: glebius
MFC after: 2 weeks

12 years agoAdd backlight control to ATI-graphics PowerBooks and iBooks.
jhibbits [Sun, 26 Feb 2012 13:45:25 +0000 (13:45 +0000)]
Add backlight control to ATI-graphics PowerBooks and iBooks.

Approved by: nwhitehorn (mentor)
MFC after: 1 week

12 years agoFix the scc(4) module build. Without the file it's missing a required symbol.
jhibbits [Sun, 26 Feb 2012 13:27:22 +0000 (13:27 +0000)]
Fix the scc(4) module build.  Without the file it's missing a required symbol.

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

12 years agoAdd in some debugging code to check whether the current rate table has
adrian [Sun, 26 Feb 2012 06:04:44 +0000 (06:04 +0000)]
Add in some debugging code to check whether the current rate table has
been bait-and-switched from the rate control code.

This will avoid the panic that I saw and will avoid sending invalid rates
(eg 11a/11g OFDM rates when in 11b, on 11b-only NICs (AR5211)) where the
rate table is not "big".

It also will point out situations where this occurs for the 11n NICs
which will have sufficiently large rate tables that "invalid rix" doesn't
occur.

I'll try to follow this up with a commit that adds a current operating mode
check. The "rix" is only relevant to the current operating mode and rate
table.

PR: kern/165475

12 years agoSimplify vm_mmap()'s control flow.
alc [Sat, 25 Feb 2012 21:06:39 +0000 (21:06 +0000)]
Simplify vm_mmap()'s control flow.

Add a comment describing what vm_mmap_to_errno() does.

Reviewed by: kib
MFC after: 3 weeks
X-MFC after: r232071

12 years agoAttempt to further fix some of the concurrency/reset issues that occur.
adrian [Sat, 25 Feb 2012 19:12:54 +0000 (19:12 +0000)]
Attempt to further fix some of the concurrency/reset issues that occur.

* ath_reset() is being called in softclock context, which may have the
  thing sleep on a lock.  To avoid this, since we really _shouldn't_
  be sleeping on any locks, break out the no-loss reset path into a tasklet
  and call that from:

  + ath_calibrate()
  + ath_watchdog()

  This has the added advantage that it'll end up also doing the frame
  RX cleanup from within the taskqueue context, rather than the softclock
  context.

* Shuffle around the taskqueue_block() call to be before we grab the lock
  and disable interrupts.

  The trouble here is that taskqueue_block() doesn't block currently
  queued (but not yet running) tasks so calling it doesn't guarantee
  no further tasks (that weren't running on _A_ CPU at the time of this
  call) will complete.  Calling taskqueue_drain() on these tasks won't
  work because if any _other_ thread calls taskqueue_enqueue() for whatever
  reason, everything gets very angry and stops working.

  This slightly changes the race condition enough to let ath_rx_tasklet()
  run before we try disabling it, and thus quietens the warnings a bit.

  The (more) true solution will be doing something like the following:

  * having a taskqueue_blocked mask in ath_softc;
  * having an interrupt_blocked mask in ath_softc;
  * only calling taskqueue_drain() on each individual task _after_ the
    lock has been acquired - that way no further tasklet scheduling
    is going to occur.
  * Then once the tasks have been blocked _and_ the interrupt has been
    disabled, call taskqueue_drain() on each, ensuring that anything
    that _was_ scheduled or running is removed.

  The trouble is if something calls taskqueue_enqueue() on a task
  after taskqueue_blocked() has been called but BEFORE taskqueue_drain()
  has been called, ta_pending will be set to 1 and taskqueue_drain()
  will sit there stuck in msleep() until you hard-kill the machine.

PR: kern/165382
PR: kern/165220

12 years agoSimplify vmspace_fork()'s control flow by copying immutable data before
alc [Sat, 25 Feb 2012 17:49:59 +0000 (17:49 +0000)]
Simplify vmspace_fork()'s control flow by copying immutable data before
the vm map locks are acquired.  Also, eliminate redundant initialization
of the new vm map's timestamp.

Reviewed by: kib
MFC after: 3 weeks

12 years agoWhitespace cleanup:
gjb [Sat, 25 Feb 2012 16:02:12 +0000 (16:02 +0000)]
Whitespace cleanup:
 o Wrap sentences on to new lines
 o Rewrap lines where possible while trying to keep the diff to a
   minimum

Found with: textproc/igor
MFC after: 1 week
X-MFC-With: r232157

12 years agoWhitespace cleanup:
gjb [Sat, 25 Feb 2012 15:21:43 +0000 (15:21 +0000)]
Whitespace cleanup:
 o Wrap sentences on to new lines
 o Cleanup trailing whitespace

Found with: textproc/igor
MFC after: 1 week
X-MFC-With: r232157

12 years agoFix various typos in manual pages.
gjb [Sat, 25 Feb 2012 14:31:25 +0000 (14:31 +0000)]
Fix various typos in manual pages.

Submitted by: amdmi3
PR: 165431
MFC after: 1 week

12 years agoo Reduce chances for integer overflow.
maxim [Sat, 25 Feb 2012 12:06:40 +0000 (12:06 +0000)]
o Reduce chances for integer overflow.
o More verbose sysctl description added.

MFC after: 2 weeks
Sponsored by: Nginx, Inc.

12 years agoBump __FreeBSD_version due to libarchive update.
mm [Sat, 25 Feb 2012 11:03:13 +0000 (11:03 +0000)]
Bump __FreeBSD_version due to libarchive update.

12 years agoUpdate libarchive to 3.0.3
mm [Sat, 25 Feb 2012 10:58:02 +0000 (10:58 +0000)]
Update libarchive to 3.0.3

Some of new features:
  - New readers: RAR, LHA/LZH, CAB reader, 7-Zip
  - New writers: ISO9660, XAR
  - Improvements to many formats, especially including ISO9660 and Zip
  - Stackable write filters to write, e.g., tar.gz.uu in a single pass
  - Exploit seekable input; new "seekable" Zip reader can exploit the Zip
    Central Directory when it's available; the old "streamable" Zip reader
    is still fully supported for cases where seeking is not possible.

Full release notes available at:
https://github.com/libarchive/libarchive/wiki/ReleaseNotes

12 years agoWhen detaching an unix domain socket, uipc_detach() checks
trociny [Sat, 25 Feb 2012 10:15:41 +0000 (10:15 +0000)]
When detaching an unix domain socket, uipc_detach() checks
unp->unp_vnode pointer to detect if there is a vnode associated with
(binded to) this socket and does necessary cleanup if there is.

The issue is that after forced unmount this check may be too late as
the unp_vnode is reclaimed and the reference is stale.

To fix this provide a helper function that is called on a socket vnode
reclamation to do necessary cleanup.

Pointed by: kib
Reviewed by: kib
MFC after: 2 weeks

12 years agoIf an interrupt is received with no vap attached, just fail LINK events.
adrian [Sat, 25 Feb 2012 08:01:29 +0000 (08:01 +0000)]
If an interrupt is received with no vap attached, just fail LINK events.

This fixes a NULL pointer dereference which occurs if the vap list is
empty but someone brings up the wi0 interface.