]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoRemove dead code.
des [Tue, 12 Jun 2012 15:32:14 +0000 (15:32 +0000)]
Remove dead code.

12 years agoAdd experimental support for amdfam10/barcelona from the GCC 4.3 branch.
pfg [Tue, 12 Jun 2012 15:04:18 +0000 (15:04 +0000)]
Add experimental support for amdfam10/barcelona from the GCC 4.3 branch.

Initial support for the AMD barcelona chipsets has been available in the
gcc43 branch under GPLv2 but was not included when the Core 2 support
was brought to the system gcc.

AMD and some linux distributions (OpenSUSE) did a backport of the amdfam10
support and made them available. Unfortunately this is still experimental
and while it can improve performance, enabling the CPUTYPE may break some
C++ ports (like clang).

Special care was taken to make sure that the patches predate the GPLv3
switch upstream.

Tested by: Vladimir Kushnir
Reviewed by: mm
Approved by: jhb (mentor)
MFC after: 2 weeks

12 years agoAdd a cmsg of type IP_TOS for UDP/IPv4 sockets to specify the TOS byte.
tuexen [Tue, 12 Jun 2012 14:56:08 +0000 (14:56 +0000)]
Add a cmsg of type IP_TOS for UDP/IPv4 sockets to specify the TOS byte.

MFC after: 3 days

12 years agoDocument the -v flag for zpool list.
mm [Tue, 12 Jun 2012 14:40:19 +0000 (14:40 +0000)]
Document the -v flag for zpool list.

PR: 168970
Suggested by: Marcelo Araujo <araujo@FreeBSD.org>
MFC after: 3 days

12 years agoAdd a IP_RECVTOS socket option to receive for received UDP/IPv4
tuexen [Tue, 12 Jun 2012 14:02:38 +0000 (14:02 +0000)]
Add a IP_RECVTOS socket option to receive for received UDP/IPv4
packets a cmsg of type IP_RECVTOS which contains the TOS byte.
Much like IP_RECVTTL does for TTL. This allows to implement a
protocol on top of UDP and implementing ECN.

MFC after: 3 days

12 years agoDeliver IPV6_TCLASS, IPV6_HOPLIMIT and IPV6_PKTINFO cmsgs (if
tuexen [Tue, 12 Jun 2012 13:57:56 +0000 (13:57 +0000)]
Deliver IPV6_TCLASS, IPV6_HOPLIMIT and IPV6_PKTINFO cmsgs (if
requested) on IPV6 sockets, which have been marked to be not IPV6_V6ONLY,
for each received IPV4 packet.

MFC after: 3 days

12 years agoFix comment to better reflect how we are
rrs [Tue, 12 Jun 2012 13:31:32 +0000 (13:31 +0000)]
Fix comment to better reflect how we are
cheating and using the csum_data. Also fix
style issues with the comments.

12 years agoUnify the sending of ABORT, SHUTDOWN-COMPLETE and ERROR chunks.
tuexen [Tue, 12 Jun 2012 13:15:27 +0000 (13:15 +0000)]
Unify the sending of ABORT, SHUTDOWN-COMPLETE and ERROR chunks.
While there: Fix also some minor bugs and prepare for SCTP/DTLS.

MFC after: 3 days

12 years agoNote to self. Have morning coffee *before* committing things.
rrs [Tue, 12 Jun 2012 12:44:17 +0000 (12:44 +0000)]
Note to self. Have morning coffee *before* committing things.
There is no mac_addr in the mbuf for BSD.. cheat like
we are supposed to and use the csum field since our friend
the gif tunnel itself will never use offload.

12 years agoOpps forgot to commit the flag.
rrs [Tue, 12 Jun 2012 12:40:15 +0000 (12:40 +0000)]
Opps forgot to commit the flag.

12 years agoFix a problem where zero-length RDATA fields can cause named(8) to crash.
bz [Tue, 12 Jun 2012 12:10:10 +0000 (12:10 +0000)]
Fix a problem where zero-length RDATA fields can cause named(8) to crash.
[12:03]

Correct a privilege escalation when returning from kernel if
running FreeBSD/amd64 on non-AMD processors. [12:04]

Fix reference count errors in IPv6 code. [EN-12:02]

Security: CVE-2012-1667
Security: FreeBSD-SA-12:03.bind
Security: CVE-2012-0217
Security: FreeBSD-SA-12:04.sysret
Security: FreeBSD-EN-12:02.ipv6refcount
Approved by: so (simon, bz)

12 years ago - Limit r214102 workaround to only x86. On arm it causes more problems
mav [Tue, 12 Jun 2012 11:08:51 +0000 (11:08 +0000)]
 - Limit r214102 workaround to only x86. On arm it causes more problems
then solves because of cache coherency issues. This fixes periodic error
messages on console and command timeouts.
 - Patch SATA PHY configuration for 65nm SoCs to improve SNR same as
Linux does.

MFC after: 2 weeks

12 years agoAllow a gif tunnel to be used with ALTq.
rrs [Tue, 12 Jun 2012 10:44:09 +0000 (10:44 +0000)]
Allow a gif tunnel to be used with ALTq.

Reviewed by: gnn

12 years agoRevert part of the r236935 for now, until I figure out why it doesn't
pjd [Tue, 12 Jun 2012 10:25:11 +0000 (10:25 +0000)]
Revert part of the r236935 for now, until I figure out why it doesn't
work properly.

Reported by: davidxu

12 years agoSmall cleanup.
tuexen [Tue, 12 Jun 2012 09:18:28 +0000 (09:18 +0000)]
Small cleanup.

MFC after: 3 days

12 years agoLibUSB v1.0 API compiliance and bugfixes.
hselasky [Tue, 12 Jun 2012 07:28:25 +0000 (07:28 +0000)]
LibUSB v1.0 API compiliance and bugfixes.

- Use CLOCK_MONOTONIC instead of CLOCK_REALTIME, because CLOCK_MONOTONIC
does not wrap into negative in near future. This fixes any potential
problems using "pthread_cond_timedwait()".

- Fix a bug where the "libusb_wait_for_event()" function computes an
absolute timeout instead of a relative timeout. USB transfers do
not depend on this timeout value.

- Add dependency towards LibPthread to Makefile, because LibUSB v1.0
needs this library to function correctly.

MFC after: 1 week

12 years agoShare IPI init and startup code of mp_machdep.c with acpi_wakeup.c
iwasaki [Tue, 12 Jun 2012 00:14:54 +0000 (00:14 +0000)]
Share IPI init and startup code of mp_machdep.c with acpi_wakeup.c
as ipi_startup().

12 years agoIn softdep_setup_inomapdep() we may have to allocate both inodedep
mckusick [Mon, 11 Jun 2012 23:07:21 +0000 (23:07 +0000)]
In softdep_setup_inomapdep() we may have to allocate both inodedep
and bmsafemap dependency structures in inodedep_lookup() and
bmsafemap_lookup() respectively. The setup of these structures must
be done while holding the soft-dependency mutex. If the inodedep is
allocated first, it may be freed in the I/O completion callback when
the mutex is released to allocate the bmsafemap. If the bmsafemap is
allocated first, it may be freed in the I/O completion callback when
the mutex is released to allocate the inodedep.

To resolve this problem, bmsafemap_lookup has had a parameter added
that allows a pre-malloc'ed bmsafemap to be passed in so that it does
not need to release the mutex to create a new bmsafemap. The
softdep_setup_inomapdep() routine pre-malloc's a bmsafemap dependency
before acquiring the mutex and starting to build the inodedep with a
call to inodedep_lookup(). The subsequent call to bmsafemap_lookup()
is passed this pre-allocated bmsafemap entry so that it need not
release the mutex if it needs to create a new one.

Reported by: Peter Holm
Tested by:   Peter Holm
MFC after:   1 week

12 years agoSwitch from 4-clause to 2-clause BSD license. (OpenBSD r1.22)
delphij [Mon, 11 Jun 2012 22:25:20 +0000 (22:25 +0000)]
Switch from 4-clause to 2-clause BSD license. (OpenBSD r1.22)
No functional change.

Obtained from: NetBSD via OpenBSD

12 years agofdgrowtable() no longer drops the filedesc lock so it is enough to
pjd [Mon, 11 Jun 2012 22:05:26 +0000 (22:05 +0000)]
fdgrowtable() no longer drops the filedesc lock so it is enough to
retry finding free file descriptor only once after fdgrowtable().

Spotted by: pluknet
MFC after: 1 month

12 years agoAvoid unnecessary atomic operations for clearing PGA_WRITEABLE in
alc [Mon, 11 Jun 2012 21:41:16 +0000 (21:41 +0000)]
Avoid unnecessary atomic operations for clearing PGA_WRITEABLE in
pmap_remove_pages().  This reduces pmap_remove_pages()'s running time by
4 to 11% in my tests.

MFC after: 1 week

12 years agoRevert: r236909
hselasky [Mon, 11 Jun 2012 20:27:52 +0000 (20:27 +0000)]
Revert: r236909

Pointyhat: me

12 years agoUse consistent way of checking if descriptor number is valid.
pjd [Mon, 11 Jun 2012 20:19:24 +0000 (20:19 +0000)]
Use consistent way of checking if descriptor number is valid.

MFC after: 1 month

12 years agoUse consistent way of checking if descriptor number is valid.
pjd [Mon, 11 Jun 2012 20:17:20 +0000 (20:17 +0000)]
Use consistent way of checking if descriptor number is valid.

MFC after: 1 month

12 years agoFix a panic I introduced in r234487, the bridge softc pointer is set to null
thompsa [Mon, 11 Jun 2012 20:12:13 +0000 (20:12 +0000)]
Fix a panic I introduced in r234487, the bridge softc pointer is set to null
early in the detach so rearrange things not to explode.

Reported by: David Roffiaen, Gustau Perez Querol
Tested by: David Roffiaen
MFC after: 3 days

12 years agoBe consistent with white spaces.
pjd [Mon, 11 Jun 2012 20:01:50 +0000 (20:01 +0000)]
Be consistent with white spaces.

MFC after: 1 month

12 years agoRemove code duplicated in kern_close() and do_dup() and use closefp() function
pjd [Mon, 11 Jun 2012 20:00:44 +0000 (20:00 +0000)]
Remove code duplicated in kern_close() and do_dup() and use closefp() function
introduced a minute ago.

This code duplication was responsible for the bug fixed in r236853.

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoIntroduce closefp() function that we will be able to use to eliminate
pjd [Mon, 11 Jun 2012 19:57:31 +0000 (19:57 +0000)]
Introduce closefp() function that we will be able to use to eliminate
code duplication in kern_close() and do_dup().

This is committed separately from the actual removal of the duplicated
code, as the combined diff was very hard to read.

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoMerge two ifs into one to make the code almost identical to the code in
pjd [Mon, 11 Jun 2012 19:53:41 +0000 (19:53 +0000)]
Merge two ifs into one to make the code almost identical to the code in
kern_close().

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoMove the code around a bit to move two parts of code duplicated from
pjd [Mon, 11 Jun 2012 19:51:27 +0000 (19:51 +0000)]
Move the code around a bit to move two parts of code duplicated from
kern_close() close together.

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoNow that fdgrowtable() doesn't drop the filedesc lock we don't need to
pjd [Mon, 11 Jun 2012 19:48:55 +0000 (19:48 +0000)]
Now that fdgrowtable() doesn't drop the filedesc lock we don't need to
check if descriptor changed from under us. Replace the check with an
assert.

Discussed with: kib
Tested by: pho
MFC after: 1 month

12 years agoUse the correct clock source when computing timeouts.
hselasky [Mon, 11 Jun 2012 19:20:59 +0000 (19:20 +0000)]
Use the correct clock source when computing timeouts.

MFC after: 1 week

12 years agoAnother fixe for r236772.
iwasaki [Mon, 11 Jun 2012 18:47:26 +0000 (18:47 +0000)]
Another fixe for r236772.

- Adjust correct cpuset (stopped_cpus/suspended_cpus) for
  cpu_spinwait() in generic_stop_cpus().

12 years agoFix unloading of libiconv module.
mjg [Mon, 11 Jun 2012 17:42:39 +0000 (17:42 +0000)]
Fix unloading of libiconv module.

Previously it would either loop infinitely or exit with error leaking a lock.

Reported by: Will DeVries
Approved by: trasz (mentor)
MFC after: 1 week

12 years agoNone of these programs actually use auth.conf.
des [Mon, 11 Jun 2012 16:18:39 +0000 (16:18 +0000)]
None of these programs actually use auth.conf.

MFC after: 1 week

12 years agoStyle fixes and simplifications.
pjd [Mon, 11 Jun 2012 16:08:03 +0000 (16:08 +0000)]
Style fixes and simplifications.

MFC after: 1 month

12 years agoClean up some symbol versions for libsupc++ / libcxxrt.
theraven [Mon, 11 Jun 2012 15:40:57 +0000 (15:40 +0000)]
Clean up some symbol versions for libsupc++ / libcxxrt.

MFC after: 1 week
Reviewed by: kan

12 years agoFix a leak when setting the global character locale to "C" from something else.
theraven [Mon, 11 Jun 2012 14:02:02 +0000 (14:02 +0000)]
Fix a leak when setting the global character locale to "C" from something else.

Reported by: mm

12 years agoFix uninitialised reference.
adrian [Mon, 11 Jun 2012 12:26:23 +0000 (12:26 +0000)]
Fix uninitialised reference.

Noticed by: John Hay <jhay@meraka.org.za>

12 years agoIntroduce "feature flags" for ZFS pools (bump SPA version to 5000).
mm [Mon, 11 Jun 2012 11:35:22 +0000 (11:35 +0000)]
Introduce "feature flags" for ZFS pools (bump SPA version to 5000).
Add first feature "com.delphix:async_destroy" (asynchronous destroy
of ZFS datasets).
Implement features support in ZFS boot code.

Illumos revisions merged:
13700:2889e2596bd6
13701:1949b688d5fb
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags

References:
https://www.illumos.org/issues/2619
https://www.illumos.org/issues/2747

Obtained from: illumos (issue #2619, #2747)
MFC after: 1 month

12 years agoWrap the whole (software) TX path from ifnet dequeue to software queue
adrian [Mon, 11 Jun 2012 07:44:16 +0000 (07:44 +0000)]
Wrap the whole (software) TX path from ifnet dequeue to software queue
(or direct dispatch) behind the TXQ lock (which, remember, is doubling
as the TID lock too for now.)

This ensures that:

 (a) the sequence number and the CCMP PN allocation is done together;
 (b) overlapping transmit paths don't interleave frames, so we don't
     end up with the original issue that triggered kern/166190.

     Ie, that we don't end up with seqno A, B in thread 1, C, D in
     thread 2, and they being queued to the software queue as "A C D B"
     or similar, leading to the BAW stalls.

This has been tested:

* both STA and AP modes with INVARIANTS and WITNESS;
* TCP and UDP TX;
* both STA->AP and AP->STA.

STA is a Routerstation Pro (single CPU MIPS) and the AP is a dual-core
Centrino.

PR: kern/166190

12 years agoAdd another TID lock.
adrian [Mon, 11 Jun 2012 07:35:24 +0000 (07:35 +0000)]
Add another TID lock.

12 years agoMake sure the frames are queued to the head of the list, not the tail.
adrian [Mon, 11 Jun 2012 07:31:50 +0000 (07:31 +0000)]
Make sure the frames are queued to the head of the list, not the tail.
See previous commit.

PR: kern/166190

12 years agoWhen scheduling frames in an aggregate session, the frames should be
adrian [Mon, 11 Jun 2012 07:29:25 +0000 (07:29 +0000)]
When scheduling frames in an aggregate session, the frames should be
scheduled from the head of the software queue rather than trying to
queue the newly given frame.

This leads to some rather unfortunate out of order (but still valid
as it's inside the BAW) frame TX.

This now:

* Always queues the frame at the end of the software queue;
* Tries to direct dispatch the frame at the head of the software queue,
  to try and fill up the hardware queue.

TODO:

* I should likely try to queue as many frames to the hardware as I can
  at this point, rather than doing one at a time;
* ath_tx_xmit_aggr() may fail and this code assumes that it'll schedule
  the TID.  Otherwise TX may stall.

PR: kern/166190

12 years agoRetried frames need to be inserted in the head of the list, not the tail.
adrian [Mon, 11 Jun 2012 07:15:48 +0000 (07:15 +0000)]
Retried frames need to be inserted in the head of the list, not the tail.

This is an unfortunate byproduct of how the routine is used - it's called
with the head frame on the queue, but if the frame is failed, it's inserted
into the tail of the queue.

Because of this, the sequence numbers would get all shuffled around and
the BAW would be bumped past this sequence number, that's now at the
end of the software queue.  Then, whenever it's time for that frame
to be transmitted, it'll be immediately outside of the BAW and TX will
stall until the BAW catches up.

It can also result in all kinds of weird duplicate BAW frames, leading
to hilarious panics.

PR: kern/166190

12 years agoFinish undoing the previous commit - this part of the code is no longer
adrian [Mon, 11 Jun 2012 07:08:40 +0000 (07:08 +0000)]
Finish undoing the previous commit - this part of the code is no longer
required.

PR: kern/166190

12 years agoIntroduce a new lock debug which is specifically for making sure the
adrian [Mon, 11 Jun 2012 07:06:49 +0000 (07:06 +0000)]
Introduce a new lock debug which is specifically for making sure the
_TID_ lock is held.

For now the TID lock is also the TXQ lock. This is just to make sure
that the right TXQ lock is held for the given TID.

12 years agoRevert r233227 and followup commits as it breaks CCMP PN replay detection.
adrian [Mon, 11 Jun 2012 06:59:28 +0000 (06:59 +0000)]
Revert r233227 and followup commits as it breaks CCMP PN replay detection.

This showed up when doing heavy UDP throughput on SMP machines.

The problem with this is because the 802.11 sequence number is being
allocated separately to the CCMP PN replay number (which is assigned
during ieee80211_crypto_encap()).

Under significant throughput (200+ MBps) the TX path would be stressed
enough that frame TX/retry would force sequence number and PN allocation
to be out of order.  So once the frames were reordered via 802.11 seqnos,
the CCMP PN would be far out of order, causing most frames to be discarded
by the receiver.

I've fixed this in some local work by being forced to:

  (a) deal with the issues that lead to the parallel TX causing out of
      order sequence numbers in the first place;
  (b) fix all the packet queuing issues which lead to strange (but mostly
      valid) TX.

I'll begin fixing these in a subsequent commit or five.

PR: kern/166190

12 years agoFix typo
kevlo [Mon, 11 Jun 2012 03:10:15 +0000 (03:10 +0000)]
Fix typo

12 years ago- Consistenly mention columns and fields
kevlo [Mon, 11 Jun 2012 03:02:40 +0000 (03:02 +0000)]
- Consistenly mention columns and fields
- Add -b to short error messages

Obtained from: NetBSD

12 years agoAdd more description and clarification about the -depth and -d options in
issyl0 [Sun, 10 Jun 2012 22:14:52 +0000 (22:14 +0000)]
Add more description and clarification about the -depth and -d options in
both places where they are mentioned in find(1).

Discussed with: dougb
PR: docs/168885
Reported by: Ronald F. Guilmette (rfg at tristatelogic dot com)
Approved by: gabor (mentor)
MFC after: 3 days

12 years agoRemove redundant include.
pjd [Sun, 10 Jun 2012 20:24:01 +0000 (20:24 +0000)]
Remove redundant include.

MFC after: 1 month

12 years agoStyle: move opt_*.h includes in the proper place.
pjd [Sun, 10 Jun 2012 20:22:10 +0000 (20:22 +0000)]
Style: move opt_*.h includes in the proper place.

MFC after: 1 month

12 years ago"on the their types." -> "on their types."
trhodes [Sun, 10 Jun 2012 15:56:49 +0000 (15:56 +0000)]
"on the their types." -> "on their types."

12 years agoWhen we are closing capability during dup2(), we want to call mq_fdclose()
pjd [Sun, 10 Jun 2012 14:57:18 +0000 (14:57 +0000)]
When we are closing capability during dup2(), we want to call mq_fdclose()
on the underlying object and not on the capability itself.

Discussed with: rwatson
Sponsored by: FreeBSD Foundation
MFC after: 1 month

12 years agotouch: Add the -d option from POSIX.1-2008.
jilles [Sun, 10 Jun 2012 14:26:51 +0000 (14:26 +0000)]
touch: Add the -d option from POSIX.1-2008.

This is much like -t but with a different format which is ISO8601-like and
allows fractions of a second.

The precision is limited to microseconds because of utimes() and friends,
even though stat() returns nanoseconds.

MFC after: 10 days

12 years agoMerge two ifs into one. Other minor style fixes.
pjd [Sun, 10 Jun 2012 13:10:21 +0000 (13:10 +0000)]
Merge two ifs into one. Other minor style fixes.

MFC after: 1 month

12 years agoUse the previous stack entry protection and max protection to correctly
kib [Sun, 10 Jun 2012 11:31:50 +0000 (11:31 +0000)]
Use the previous stack entry protection and max protection to correctly
propagate the stack execution permissions when stack is grown down.

First, curproc->p_sysent->sv_stackprot specifies maximum allowed stack
protection for current ABI, so the new stack entry was typically marked
executable always. Second, for non-main stack MAP_STACK mapping,
the PROT_ flags should be used which were specified at the mmap(2) call
time, and not sv_stackprot.

MFC after: 1 week

12 years agoPartially revert r236666:
mav [Sun, 10 Jun 2012 11:17:14 +0000 (11:17 +0000)]
Partially revert r236666:
Return PROTO_ATA protocol in response to XPT_PATH_INQ.

smartmontools uses it to identify ATA devices and I don't know any other
place now where it is important. It could probably use XPT_GDEV_TYPE
instead for more accurate protocol information, but let it live for now.

Reported by: matthew
MFC after: 3 days

12 years agoRemove an unneeded increment from initarm. The variable is uninitialised,
andrew [Sun, 10 Jun 2012 10:40:22 +0000 (10:40 +0000)]
Remove an unneeded increment from initarm. The variable is uninitialised,
is not used in this part of the function and correctly initialised later
when it is used.

12 years agoThe GUMSTIX-QEMU config file is almost identical to the GUMSTIX config,
andrew [Sun, 10 Jun 2012 10:37:21 +0000 (10:37 +0000)]
The GUMSTIX-QEMU config file is almost identical to the GUMSTIX config,
include the latter file from the former rather than duplicating it.

12 years agoAdd athaggrstats to the ath(4) tools build.
adrian [Sun, 10 Jun 2012 06:44:19 +0000 (06:44 +0000)]
Add athaggrstats to the ath(4) tools build.

12 years agoFlesh out 'athaggrstats', a utility which will display the aggregation
adrian [Sun, 10 Jun 2012 06:44:04 +0000 (06:44 +0000)]
Flesh out 'athaggrstats', a utility which will display the aggregation
specific statistics for ath(4).

12 years agoAdd a new ioctl for ath(4) which returns the aggregate statistics.
adrian [Sun, 10 Jun 2012 06:42:18 +0000 (06:42 +0000)]
Add a new ioctl for ath(4) which returns the aggregate statistics.

12 years agoSimplify fdtofp().
pjd [Sun, 10 Jun 2012 06:31:54 +0000 (06:31 +0000)]
Simplify fdtofp().

MFC after: 1 month

12 years agoSome fixes for r236772.
iwasaki [Sun, 10 Jun 2012 02:38:51 +0000 (02:38 +0000)]
Some fixes for r236772.

- Remove cpuset stopped_cpus which is no longer used.
- Add a short comment for cpuset suspended_cpus clearing.
- Fix the un-ordered x86/acpica/acpi_wakeup.c in conf/files.amd64 and i386.

Pointed-out by: attilio@

12 years agoBring a couple of libstdc++ patches from Apple's llvm-gcc project.
pfg [Sun, 10 Jun 2012 02:04:11 +0000 (02:04 +0000)]
Bring a couple of libstdc++ patches from Apple's llvm-gcc project.

Modified Fri Jul 10 07:44:34 2009 CDT by rafael
backport part of
http://gcc.gnu.org/ml/gcc-cvs/2007-10/msg00118.html

The patch is for libstdc++ and it was GPL2 at the time.

Modified Tue Apr 29 01:20:19 2008 CDT by asl
Backport from mainline (pre-GPLv3).
Fix for sizeof(const void*) > sizeof(unsigned long).

Approved by: jhb (mentor)
MFC after: 2 weeks

12 years agoPull out the common code to initialise proc0 & thread0 from initarm to a
andrew [Sun, 10 Jun 2012 01:13:04 +0000 (01:13 +0000)]
Pull out the common code to initialise proc0 & thread0 from initarm to a
common function.

Reviewed by: imp

12 years agoWhen synchronously syncing a device (MNT_WAIT), wait for buffers
mckusick [Sat, 9 Jun 2012 22:26:53 +0000 (22:26 +0000)]
When synchronously syncing a device (MNT_WAIT), wait for buffers
to become available. Otherwise we may excessively spin and fail
with ``fsync: giving up on dirty''.

Reviewed by: kib
Tested by:   Peter Holm
MFC after:   1 week

12 years agoUpdate maximum number of tables available in ipfw to reflect
melifaro [Sat, 9 Jun 2012 20:47:58 +0000 (20:47 +0000)]
Update maximum number of tables available in ipfw to reflect
changes done in r233478.

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

12 years agods_guid of 0 is special, as it is used by snapshot receive code to
pjd [Sat, 9 Jun 2012 20:16:19 +0000 (20:16 +0000)]
ds_guid of 0 is special, as it is used by snapshot receive code to
differentiate between an incremental and full stream.
Be sure not to generate guid equal to 0.

Reported by: someone who saw 0 being generated as 64bit random guid
MFC after: 3 days

12 years agoThere is no need to drop the FILEDESC lock around malloc(M_WAITOK) anymore, as
pjd [Sat, 9 Jun 2012 18:50:32 +0000 (18:50 +0000)]
There is no need to drop the FILEDESC lock around malloc(M_WAITOK) anymore, as
we now use sx lock for filedesc structure protection.

Reviewed by: kib
MFC after: 1 month

12 years agoRemove now unused variable.
pjd [Sat, 9 Jun 2012 18:48:06 +0000 (18:48 +0000)]
Remove now unused variable.

MFC after: 1 month
MFC with: r236820

12 years agoMake some of the loops more readable.
pjd [Sat, 9 Jun 2012 18:03:23 +0000 (18:03 +0000)]
Make some of the loops more readable.

Reviewed by: tegge
MFC after: 1 month

12 years agoValidate IPv4 network mask being passed to ipfw kernel interface.
melifaro [Sat, 9 Jun 2012 17:39:05 +0000 (17:39 +0000)]
Validate IPv4 network mask being passed to ipfw kernel interface.
Incorrect mask can possibly be one of the reasons for kern/127209 existance.

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

12 years ago__flt_rounds was omitted from the exported symbols here.
kientzle [Sat, 9 Jun 2012 16:09:53 +0000 (16:09 +0000)]
__flt_rounds was omitted from the exported symbols here.

Submitted by: Jan Sieka
Reviewed by: arm@
MFC after: 1 week

12 years agoOne more major cam_periph_error() rewrite to improve error handling and
mav [Sat, 9 Jun 2012 13:07:44 +0000 (13:07 +0000)]
One more major cam_periph_error() rewrite to improve error handling and
reporting. It includes:
 - removing of error messages controlled by bootverbose, replacing them
with more universal and informative debugging on CAM_DEBUG_INFO level,
that is now built into the kernel by default;
 - more close following to the arguments submitted by caller, such as
SF_PRINT_ALWAYS, SF_QUIET_IR and SF_NO_PRINT; consumer knows better which
errors are usual/expected at this point and which are really informative;
 - adding two new flags SF_NO_RECOVERY and SF_NO_RETRY to allow caller
specify how much assistance it needs at this point; previously consumers
controlled that by not calling cam_periph_error() at all, but that made
behavior inconsistent and debugging complicated;
 - tuning debug messages and taken actions order to make debugging output
more readable and cause-effect relationships visible;
 - making camperiphdone() (common device recovery completion handler) to
also use cam_periph_error() in most cases, instead of own dumb code;
 - removing manual sense fetching code from cam_periph_error(); I was told
by number of people that it is SIM obligation to fetch sense data, so this
code is useless and only significantly complicates recovery logic;
 - making ada, da and pass driver to use cam_periph_error() with new limited
recovery options to handle error recovery and debugging in common way;
as one of results, CAM_REQUEUE_REQ and other retrying statuses are now
working fine with pass driver, that caused many problems before.
 - reverting r186891 by raj@ to avoid burning few seconds in tight DELAY()
loops on device probe, while device simply loads media; I think that problem
may already be fixed in other way, and even if it is not, solution must be
different.

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

12 years agoCorrect panic message.
pjd [Sat, 9 Jun 2012 12:27:30 +0000 (12:27 +0000)]
Correct panic message.

MFC after: 1 month
MFC with: r236731

12 years agoAmend r227797 by also passing ${STATIC_CXXFLAGS} for the other supported
dim [Sat, 9 Jun 2012 11:41:29 +0000 (11:41 +0000)]
Amend r227797 by also passing ${STATIC_CXXFLAGS} for the other supported
C++ file extensions.

MFC after: 3 days

12 years agomdoc: fix a few badly nested blocks.
joel [Sat, 9 Jun 2012 10:43:33 +0000 (10:43 +0000)]
mdoc: fix a few badly nested blocks.

12 years agoAdd "human" option to print IPv4/IPv6 flows in human-readable format.
melifaro [Sat, 9 Jun 2012 10:10:12 +0000 (10:10 +0000)]
Add "human" option to print IPv4/IPv6 flows in human-readable format.
Show IPv4/IPv6 header IFF there are some flows following.
Wrap some long lines.

Sponsored by Yandex LLC

Reviewed by:     glebius (previous version)
Approved by:     ae(mentor)
MFC after:       1 week

12 years agoFix typo introduced in r236559.
melifaro [Sat, 9 Jun 2012 10:04:40 +0000 (10:04 +0000)]
Fix typo introduced in r236559.

Pointed by:   bcr
Approved by:  kib(mentor)

12 years agomdoc: fix mandoc "Oc breaks Op" warning.
joel [Sat, 9 Jun 2012 09:54:07 +0000 (09:54 +0000)]
mdoc: fix mandoc "Oc breaks Op" warning.

12 years agomdoc: minor improvements to a few lists with tags.
joel [Sat, 9 Jun 2012 07:18:53 +0000 (07:18 +0000)]
mdoc: minor improvements to a few lists with tags.

12 years agoClean up trailing whitespace.
gjb [Sat, 9 Jun 2012 03:34:34 +0000 (03:34 +0000)]
Clean up trailing whitespace.

MFC after: 3 days
X-MFC-With: r236776

12 years agoFix a typo: s/deafult/default
gjb [Sat, 9 Jun 2012 03:33:06 +0000 (03:33 +0000)]
Fix a typo: s/deafult/default

MFC after: 3 days

12 years agoAdd x86/acpica/acpi_wakeup.c for amd64 and i386. Difference of
iwasaki [Sat, 9 Jun 2012 00:37:26 +0000 (00:37 +0000)]
Add x86/acpica/acpi_wakeup.c for amd64 and i386.  Difference of
suspend/resume procedures are minimized among them.

common:
- Add global cpuset suspended_cpus to indicate APs are suspended/resumed.
- Remove acpi_waketag and acpi_wakemap from acpivar.h (no longer used).
- Add some variables in acpi_wakecode.S in order to minimize the difference
  among amd64 and i386.
- Disable load_cr3() because now CR3 is restored in resumectx().

amd64:
- Add suspend/resume related members (such as MSR) in PCB.
- Modify savectx() for above new PCB members.
- Merge acpi_switch.S into cpu_switch.S as resumectx().

i386:
- Merge(and remove) suspendctx() into savectx() in order to match with
  amd64 code.

Reviewed by: attilio@, acpi@

12 years agosh: Do not assume that SIGPIPE will only kill a subshell in builtins/wait3.0
jilles [Fri, 8 Jun 2012 22:54:25 +0000 (22:54 +0000)]
sh: Do not assume that SIGPIPE will only kill a subshell in builtins/wait3.0
test.

POSIX says that SIGPIPE affects a process and therefore a SIGPIPE caused and
received by a subshell environment may or may not affect the parent shell
environment.

The change assumes that ${SH} is executed in a new process. This must be the
case if it contains a slash and everyone appears to do so anyway even though
POSIX might permit otherwise.

This change makes builtins/wait3.0 work in ksh93.

12 years agoSeveral updates:
jhb [Fri, 8 Jun 2012 21:30:35 +0000 (21:30 +0000)]
Several updates:
- Consistently refer to rmlocks as "read-mostly locks".
- Relate rmlocks to rwlocks rather than sx locks since they are closer to
  rwlocks.
- Add a separate paragraph on sleepable read-mostly locks contrasting them
  with "normal" read-mostly locks.
- The flag passed to rm_init_flags() to enable recursion for readers is
  RM_RECURSE, not LO_RECURSABLE.
- Fix the description for RM_RECURSE (it allows readers to recurse, not
  writers).
- Explicitly note that rm_try_rlock() honors RM_RECURSE.
- Fix some minor grammar nits.

12 years ago- Remove the UNUSED_ARG macro and use __unused in argument lists
gabor [Fri, 8 Jun 2012 19:21:49 +0000 (19:21 +0000)]
- Remove the UNUSED_ARG macro and use __unused in argument lists

Reviewed by: dim
MFC after: 3 days

12 years agoSplit the second half of vn_open_cred() (after a vnode has been found via
jhb [Fri, 8 Jun 2012 18:32:09 +0000 (18:32 +0000)]
Split the second half of vn_open_cred() (after a vnode has been found via
a lookup or created via VOP_CREATE()) into a new vn_open_vnode() function
and use this function in fhopen() instead of duplicating code from
vn_open_cred() directly.

Tested by: pho
Reviewed by: kib
MFC after: 2 weeks

12 years agoIn usr.bin/sort, use another method of silencing warnings about unused
dim [Fri, 8 Jun 2012 17:08:27 +0000 (17:08 +0000)]
In usr.bin/sort, use another method of silencing warnings about unused
arguments, which does not trigger self-assignment warnings in certain
circumstances (for example, using clang with ccache).

MFC after: 3 days

12 years agoDocument that we also support sha256 and sha512.
des [Fri, 8 Jun 2012 12:36:08 +0000 (12:36 +0000)]
Document that we also support sha256 and sha512.

MFC after: 1 week

12 years agomdoc: add missing -width argument to Bl -tag.
joel [Fri, 8 Jun 2012 12:09:00 +0000 (12:09 +0000)]
mdoc: add missing -width argument to Bl -tag.

12 years agoPlug socket refcount leak on error in sys_sctp_peeloff.
mjg [Fri, 8 Jun 2012 08:04:51 +0000 (08:04 +0000)]
Plug socket refcount leak on error in sys_sctp_peeloff.

Reviewed by: tuexen
Approved by: trasz (mentor)
MFC after: 3 days

12 years agoAdd IDs for Marvell 88SE9220/9230/9235 PCIe 2.0 x2 6Gbps SATA controllers.
mav [Fri, 8 Jun 2012 07:44:42 +0000 (07:44 +0000)]
Add IDs for Marvell 88SE9220/9230/9235 PCIe 2.0 x2 6Gbps SATA controllers.
Marvell 88SE9230 was confirmed to work, the rest two are just guessed.

MFC after: 1 week

12 years agoAdd support for the Sunix SER5437A dual serial PCI Express card.
jhay [Fri, 8 Jun 2012 06:07:23 +0000 (06:07 +0000)]
Add support for the Sunix SER5437A dual serial PCI Express card.

12 years agoAdd myself to the calendar.
ashish [Fri, 8 Jun 2012 01:51:49 +0000 (01:51 +0000)]
Add myself to the calendar.

12 years agoIn fdalloc() f_ofileflags for the newly allocated descriptor has to be 0.
pjd [Thu, 7 Jun 2012 23:33:10 +0000 (23:33 +0000)]
In fdalloc() f_ofileflags for the newly allocated descriptor has to be 0.
Assert that instead of setting it to 0.

Sponsored by: FreeBSD Foundation
MFC after: 1 month

12 years agoEliminate redundant variable.
pjd [Thu, 7 Jun 2012 23:08:18 +0000 (23:08 +0000)]
Eliminate redundant variable.

Sponsored by: FreeBSD Foundation
MFC after: 1 week