]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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.

12 years agoWhen using uidstart in /etc/adduser.conf, get the next
deischen [Sat, 25 Feb 2012 07:58:59 +0000 (07:58 +0000)]
When using uidstart in /etc/adduser.conf, get the next
available user id and show it in the "Uid [xxx]" prompt.

PR: 163863
Submitted by: Moritz Wilhelmy (mw at wzff dot de)
MFC after: 2 weeks

12 years agoUse correct Config registers for RTL8139 family. Unlike RTL8168 and
yongari [Sat, 25 Feb 2012 04:54:51 +0000 (04:54 +0000)]
Use correct Config registers for RTL8139 family. Unlike RTL8168 and
RTL810x family , RTL8139 has different register map for Config
registers.

While here, follow the lead of re(4) in WOL configuration.
 - Disable WOL_UCAST and WOL_MCAST capabilities by default.
 - Config5 register write does not need to unlock EEPROM access
   on RTL8139 family but unlocking EEPROM access does not affect
   its operation and make it consistent with re(4).

Reported by: Matt Renzelmann  mjr <> cs dot wisc dot edu

12 years agoIn revision 231989, we pass a 16-bit clock ID into kernel, however
davidxu [Sat, 25 Feb 2012 02:12:17 +0000 (02:12 +0000)]
In revision 231989, we pass a 16-bit clock ID into kernel, however
according to POSIX document, the clock ID may be dynamically allocated,
it unlikely will be in 64K forever. To make it future compatible, we
pack all timeout information into a new structure called _umtx_time, and
use fourth argument as a size indication, a zero means it is old code
using timespec as timeout value, but the new structure also includes flags
and a clock ID, so the size argument is different than before, and it is
non-zero. With this change, it is possible that a thread can sleep
on any supported clock, though current kernel code does not have such a
POSIX clock driver system.

12 years agoDo not write to the user address directly, use suword().
kib [Sat, 25 Feb 2012 01:33:39 +0000 (01:33 +0000)]
Do not write to the user address directly, use suword().

Reported by: Bengt Ahlgren <bengta sics se>
MFC after: 1 week

12 years agoFix a long-standing bug for AcpiOsGetTimer(). time_t is 32-bit on i386 and
jkim [Fri, 24 Feb 2012 23:15:21 +0000 (23:15 +0000)]
Fix a long-standing bug for AcpiOsGetTimer().  time_t is 32-bit on i386 and
it needs proper casting before multiplication.

MFC after: 3 days

12 years agoFix style in previous commit.
jhb [Fri, 24 Feb 2012 20:12:53 +0000 (20:12 +0000)]
Fix style in previous commit.

Submitted by: bde

12 years agoIn selectroute() add a missing fibnum argument to an in6_rtalloc()
bz [Fri, 24 Feb 2012 20:06:04 +0000 (20:06 +0000)]
In selectroute() add a missing fibnum argument to an in6_rtalloc()
call in an #if 0 section.

In in6_selecthlim() optimize a case where in6p cannot be NULL due to an
earlier check.

More consistently use u_int instead of int for fibnum function arguments.

Sponsored by: Cisco Systems, Inc.
MFC after: 3 days

12 years agoFix mdoc style nits. Start new sentences on new lines.
jkim [Fri, 24 Feb 2012 17:53:24 +0000 (17:53 +0000)]
Fix mdoc style nits.  Start new sentences on new lines.

Reported by: brueffer

12 years agoOnly look for a usable MAC address for the bridge ID from ports within our
thompsa [Fri, 24 Feb 2012 17:50:36 +0000 (17:50 +0000)]
Only look for a usable MAC address for the bridge ID from ports within our
bridge, this allows us to have more than one independent bridge in the same
STP domain.

PR: kern/164369
Submitted by: Nikos Vassiliadis (earlier version)
MFC after: 2 weeks

12 years agoAdjust the nfs_skip_wcc_data_onerr setting so that it does not block
jhb [Fri, 24 Feb 2012 17:26:06 +0000 (17:26 +0000)]
Adjust the nfs_skip_wcc_data_onerr setting so that it does not block
post-op attributes for ENOENT errors now that the name caching logic
depends on working post-op attributes.

MFC after: 2 weeks

12 years agoUpdate scripts to work around two sh(1) bugs found in stable/8:
bz [Fri, 24 Feb 2012 14:13:06 +0000 (14:13 +0000)]
Update scripts to work around two sh(1) bugs found in stable/8:
1) _x=$((_x + 1)) does not work while x=$((x + 1)) does.
2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted.

Correct typos and improve some details forwarding.sh already
had in initiator, esp. related to ipfw accepting if the default
is deny.

Add an extra stat call to the "delay" function in addition to the
touch which together is still a lot faster than sleep 1 but seems
to help a lot more to mitigate the unrelated kernel race seen.

Sponsored by:   Cisco Systems, Inc.

12 years agoxargs: If a utility exits with 255 or a signal, write an error message.
jilles [Fri, 24 Feb 2012 12:35:17 +0000 (12:35 +0000)]
xargs: If a utility exits with 255 or a signal, write an error message.

If a utility called by xargs exits with status 255 or because of a signal,
POSIX requires writing an error message.

PR: 165155
Submitted by: Matthew Story matthewstory gmail com

12 years agoAdd underscore symbol to the end of definition strings
osa [Fri, 24 Feb 2012 11:40:20 +0000 (11:40 +0000)]
Add underscore symbol to the end of definition strings
to keep all calendar files are consistency.

Approved by: edwin
MFC after: 1 week

12 years agoRestore the return statement erronously removed in the r232048.
kib [Fri, 24 Feb 2012 11:02:35 +0000 (11:02 +0000)]
Restore the return statement erronously removed in the r232048.

Submitted by: cognet
Pointy hat to: kib (reuse the one I already got today)
MFC after: 13 days

12 years agoPlace the if() at the right location, to activate the v_writecount
kib [Fri, 24 Feb 2012 10:41:58 +0000 (10:41 +0000)]
Place the if() at the right location, to activate the v_writecount
accounting for shared writeable mappings for all filesystems, not only
for the bypass layers.

Submitted by: alc
Pointy hat to: kib
MFC after: 20 days

12 years agoExit with proper status when wake() fails.
jh [Fri, 24 Feb 2012 07:54:08 +0000 (07:54 +0000)]
Exit with proper status when wake() fails.

PR: bin/153527
Submitted by: Douglas Steinwand
MFC after: 2 weeks

12 years agostyle(9).
jh [Fri, 24 Feb 2012 07:49:55 +0000 (07:49 +0000)]
style(9).

MFC after: 2 weeks

12 years agoRemove an unused structure and unnecessary cast
kevlo [Fri, 24 Feb 2012 07:30:44 +0000 (07:30 +0000)]
Remove an unused structure and unnecessary cast

12 years agoCheck if the user has necessary permissions on the device
kevlo [Fri, 24 Feb 2012 07:29:06 +0000 (07:29 +0000)]
Check if the user has necessary permissions on the device

12 years agoHold IF_LOCK when manipulating the interface flags.
adrian [Fri, 24 Feb 2012 05:40:36 +0000 (05:40 +0000)]
Hold IF_LOCK when manipulating the interface flags.

It doesn't _really_ help all that much, I'll commit something to
sys/net/if.c at some point explaining why, but the lock should be held
when checking/manipulating/branching because of said lock.

12 years agoAlthough it's documented that the vap newstate call can drop the
adrian [Fri, 24 Feb 2012 05:39:00 +0000 (05:39 +0000)]
Although it's documented that the vap newstate call can drop the
comlock, I'd like to find and analyse these cases to see if they
really are valid.

So, throw in a lock here and wait for the (hopefully!) inevitable
complaints.

12 years agoAdd a radiotap vendor header definition.
adrian [Fri, 24 Feb 2012 05:33:11 +0000 (05:33 +0000)]
Add a radiotap vendor header definition.

12 years agoForced commit to denote that the commit message of r231621 should have read:
marius [Fri, 24 Feb 2012 00:42:50 +0000 (00:42 +0000)]
Forced commit to denote that the commit message of r231621 should have read:

- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed
  through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here.
  Note that besides currently there not being a quirk type that disables
  MSI-X only and there's no evidence that MSI doesn't work with the VMware
  pass-through, it's really questionable whether MSI generally works in
  that setup as VMware only mention three know working devices [1, p. 4].
  Also not that this quirk entry currently doesn't affect the devices
  emulated by VMware in any way as these don't claim support MSI/MSI-X to
  begin with. [2]
  While at it, make the PCI quirk table const and static.
- Remove some duplicated empty lines.
- Use DEVMETHOD_END.

PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2]
Reviewed by: jhb
MFC after: 3 days

[1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf

12 years ago- Add support for Family 12h, 14h and 15h processors.
jkim [Fri, 24 Feb 2012 00:02:46 +0000 (00:02 +0000)]
- Add support for Family 12h, 14h and 15h processors.
- Remove all attempts to guess physical temperature using DiodeOffset.
There are too many reports that it varies wildly depending on motherboard.
Instead, if it is known to scale well and its offset is known from other
temperature sensors on board, the user may set "dev.amdtemp.0.sensor_offset"
tunable to compensate the difference.  Document the caveats in amdtemp(4).
- Add a quirk for Socket AM2 Revision G processors.  These processors are
known to have a different offset according to Linux k8temp driver.
- Warn about Family 10h Erratum 319.  These processors have broken sensors.
- Report temperature in more logical orders under dev.amdtemp node.  For
example, "dev.amdtemp.0.sensor0.core0" is now "dev.amdtemp.0.core0.sensor0".
- Replace K8, K10 and K11 with official processor names in amdtemp(4).

12 years agoBreak the last part to its own sentence rather than a run-on.
thompsa [Thu, 23 Feb 2012 23:37:29 +0000 (23:37 +0000)]
Break the last part to its own sentence rather than a run-on.

Suggested by: dougb

12 years agoAdd a sysctl/tunable default value for the use_flowid sysctl in r232008.
thompsa [Thu, 23 Feb 2012 21:56:53 +0000 (21:56 +0000)]
Add a sysctl/tunable default value for the use_flowid sysctl in r232008.

12 years agoUse a better way to silence unneeded internal declaration warnings in
dim [Thu, 23 Feb 2012 21:34:14 +0000 (21:34 +0000)]
Use a better way to silence unneeded internal declaration warnings in
several sys/cam/ctl files.

Suggested by: ed
Reviewed by: ken
MFC after: 1 week

12 years agoRevert r231978, so I can apply a more proper fix to silence unneeded
dim [Thu, 23 Feb 2012 21:32:32 +0000 (21:32 +0000)]
Revert r231978, so I can apply a more proper fix to silence unneeded
internal declaration warnings in several sys/cam/ctl files.

MFC after: 1 week

12 years agoPretty-print the advice constants passed to posix_fadvise(2).
jhb [Thu, 23 Feb 2012 21:08:21 +0000 (21:08 +0000)]
Pretty-print the advice constants passed to posix_fadvise(2).

MFC after: 2 weeks

12 years agoAccount the writeable shared mappings backed by file in the vnode
kib [Thu, 23 Feb 2012 21:07:16 +0000 (21:07 +0000)]
Account the writeable shared mappings backed by file in the vnode
v_writecount.  Keep the amount of the virtual address space used by
the mappings in the new vm_object un_pager.vnp.writemappings
counter. The vnode v_writecount is incremented when writemappings gets
non-zero value, and decremented when writemappings is returned to
zero.

Writeable shared vnode-backed mappings are accounted for in vm_mmap(),
and vm_map_insert() is instructed to set MAP_ENTRY_VN_WRITECNT flag on
the created map entry.  During deferred map entry deallocation,
vm_map_process_deferred() checks for MAP_ENTRY_VN_WRITECOUNT and
decrements writemappings for the vm object.

Now, the writeable mount cannot be demoted to read-only while
writeable shared mappings of the vnodes from the mount point
exist. Also, execve(2) fails for such files with ETXTBUSY, as it
should be.

Noted by: tegge
Reviewed by: tegge (long time ago, early version), alc
Tested by: pho
MFC after: 3 weeks

12 years agoIndicate this function decrements the timer as well as testing for expiry.
thompsa [Thu, 23 Feb 2012 20:58:52 +0000 (20:58 +0000)]
Indicate this function decrements the timer as well as testing for expiry.

12 years agoIf the VBE implementation does not support save/restore function, defer to
jkim [Thu, 23 Feb 2012 20:54:22 +0000 (20:54 +0000)]
If the VBE implementation does not support save/restore function, defer to
VGA methods.  Unconditionally reset the VESA adapter before restoring state.

12 years agoUpdate my copyright date.
jkim [Thu, 23 Feb 2012 19:16:05 +0000 (19:16 +0000)]
Update my copyright date.

12 years agoImport illumos changeset 13608 [1]:
mm [Thu, 23 Feb 2012 19:13:19 +0000 (19:13 +0000)]
Import illumos changeset 13608 [1]:

add support for "-t <datatype>" argument to zfs get

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

Update zfs(8) manpage in respect of [1].
Fix typo in zfs(8) manpage.

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

12 years agoProbe supported states for save/restore function. Some VBE implementation
jkim [Thu, 23 Feb 2012 19:05:57 +0000 (19:05 +0000)]
Probe supported states for save/restore function.  Some VBE implementation
refuses to save/restore states if an unsupported bit is set.

12 years agoFix a typo introduced in r231843.
jkim [Thu, 23 Feb 2012 18:59:32 +0000 (18:59 +0000)]
Fix a typo introduced in r231843.

12 years agoAdd isci(4) to the hardware notes.
brueffer [Thu, 23 Feb 2012 18:54:33 +0000 (18:54 +0000)]
Add isci(4) to the hardware notes.

MFC after: 3 days

12 years agoTo improve control over the use of mount(8) inside a jail(8), introduce
mm [Thu, 23 Feb 2012 18:51:24 +0000 (18:51 +0000)]
To improve control over the use of mount(8) inside a jail(8), introduce
a new jail parameter node with the following parameters:

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

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

Both parameters are disabled by default (equals the behavior before
devfs and nullfs in jails). Administrators have to explicitly allow
mounting devfs and nullfs for each jail. The value "-1" of the
devfs_ruleset parameter is removed in favor of the new allow setting.

Reviewed by: jamie
Suggested by: pjd
MFC after: 2 weeks

12 years agoRename DESCRIPTION section to HARDWARE, so this manpage can be used for
brueffer [Thu, 23 Feb 2012 18:48:02 +0000 (18:48 +0000)]
Rename DESCRIPTION section to HARDWARE, so this manpage can be used for
automatic hardware notes generation.

MFC after: 3 days