]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoFix use after free bug.
Simon J. Gerraty [Tue, 18 Jun 2013 19:35:51 +0000 (19:35 +0000)]
Fix use after free bug.
Parse_SetInput:
curFile->fname was using the buffer passed to it - which ReadMakefile frees.
This change makes the comment in ParseEOF about leaking curFile->fname true.

11 years agoMerge 1.8.0
Peter Wemm [Tue, 18 Jun 2013 16:36:21 +0000 (16:36 +0000)]
Merge 1.8.0

11 years agoImport svn-1.8.0 final
Peter Wemm [Tue, 18 Jun 2013 16:33:03 +0000 (16:33 +0000)]
Import svn-1.8.0 final

11 years agoTweak generated config to make it more likely to work on 32 bit systems.
Peter Wemm [Tue, 18 Jun 2013 16:05:33 +0000 (16:05 +0000)]
Tweak generated config to make it more likely to work on 32 bit systems.

Pointed out by: Trond.Endrestol@fagskolen.gjovik.no

11 years agoMore ext2fs header cleanups:
Pedro F. Giffuni [Tue, 18 Jun 2013 15:49:30 +0000 (15:49 +0000)]
More ext2fs header cleanups:

- Set MAXMNTLEN nearer to where it is used.
- Move EXT2_LINK_MAX to ext2_dir.h .

MFC after: 3 days

11 years agoPass proper memory type to free() in ata_ali_chipinit().
Alexander Motin [Tue, 18 Jun 2013 15:04:17 +0000 (15:04 +0000)]
Pass proper memory type to free() in ata_ali_chipinit().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week

11 years agoFix bug in destructor for checker manager in DTC that caused segfaults on
David Chisnall [Tue, 18 Jun 2013 10:26:22 +0000 (10:26 +0000)]
Fix bug in destructor for checker manager in DTC that caused segfaults on
exit.

11 years agoComments and whitespace.
Devin Teske [Tue, 18 Jun 2013 09:54:09 +0000 (09:54 +0000)]
Comments and whitespace.

11 years agoComments.
Devin Teske [Tue, 18 Jun 2013 09:45:10 +0000 (09:45 +0000)]
Comments.

11 years agoPerform some code consolidation and add some additional error
Devin Teske [Tue, 18 Jun 2013 09:43:10 +0000 (09:43 +0000)]
Perform some code consolidation and add some additional error
checking/reporting. (similar to SVN revision 251919)

11 years agoWhitespace and comments.
Devin Teske [Tue, 18 Jun 2013 09:41:34 +0000 (09:41 +0000)]
Whitespace and comments.

11 years agoPerform some code consolidation and add some additional error
Devin Teske [Tue, 18 Jun 2013 09:28:49 +0000 (09:28 +0000)]
Perform some code consolidation and add some additional error
checking/reporting. (similar to SVN revisions 251905 and 251915)

11 years agoRemove unnecessary loops, perform some code consolidation, and add some
Devin Teske [Tue, 18 Jun 2013 09:19:59 +0000 (09:19 +0000)]
Remove unnecessary loops, perform some code consolidation, and add some
additional error checking/reporting. (same thing going on here as SVN
r251905 -- just this time for the mouse module instead of console)

11 years agoWhitespace.
Devin Teske [Tue, 18 Jun 2013 09:05:08 +0000 (09:05 +0000)]
Whitespace.

11 years agoUse newly enhanced f_dialog_msgbox() from SVN r251912.
Devin Teske [Tue, 18 Jun 2013 08:59:47 +0000 (08:59 +0000)]
Use newly enhanced f_dialog_msgbox() from SVN r251912.

11 years agoChange the f_dialog_msgbox() arguments in `dialog.subr' to accomodate an
Devin Teske [Tue, 18 Jun 2013 08:54:02 +0000 (08:54 +0000)]
Change the f_dialog_msgbox() arguments in `dialog.subr' to accomodate an
$hline argument for setting the --hline parameter value. This change does
not effect any current modules as it turns out that not one single usage of
f_dialog_msgbox() relied on accepting more than a first argument (read: all
occurrences quoted the first parameter; so $* was never depended upon).

This will allow some custom invocations of --msgbox to roll over to this
function (for example, in `mouse/disable').

11 years agoComments.
Devin Teske [Tue, 18 Jun 2013 08:40:16 +0000 (08:40 +0000)]
Comments.

11 years agoComments.
Devin Teske [Tue, 18 Jun 2013 08:35:44 +0000 (08:35 +0000)]
Comments.

11 years agoFix a typo in a comment.
Devin Teske [Tue, 18 Jun 2013 08:30:31 +0000 (08:30 +0000)]
Fix a typo in a comment.

11 years agoSwitch bsdconfig `Disk Management' from sade(8) to `bsdinstall partedit'.
Devin Teske [Tue, 18 Jun 2013 08:28:03 +0000 (08:28 +0000)]
Switch bsdconfig `Disk Management' from sade(8) to `bsdinstall partedit'.

11 years agoOops, in SVN r251905 I forgot that f_die takes the return code as the first
Devin Teske [Tue, 18 Jun 2013 08:22:51 +0000 (08:22 +0000)]
Oops, in SVN r251905 I forgot that f_die takes the return code as the first
argument (not the format).

11 years agoImprove the INDEX format. Whitespace improvements, format improvements, typo
Devin Teske [Tue, 18 Jun 2013 08:15:56 +0000 (08:15 +0000)]
Improve the INDEX format. Whitespace improvements, format improvements, typo
and grammatical fixes.

11 years agoRemove unnecessary loops, perform some code consolidation, and add some
Devin Teske [Tue, 18 Jun 2013 07:36:09 +0000 (07:36 +0000)]
Remove unnecessary loops, perform some code consolidation, and add some
additional error checking/reporting.

11 years agoWhitespace improvements.
Devin Teske [Tue, 18 Jun 2013 07:33:45 +0000 (07:33 +0000)]
Whitespace improvements.

11 years agoFix a bug that allowed a tracing process (e.g. gdb) to write
Dag-Erling Smørgrav [Tue, 18 Jun 2013 07:02:35 +0000 (07:02 +0000)]
Fix a bug that allowed a tracing process (e.g. gdb) to write
to a memory-mapped file in the traced process's address space
even if neither the traced process nor the tracing process had
write access to that file.

Security: CVE-2013-2171
Security: FreeBSD-SA-13:06.mmap
Approved by: so

11 years agoFix a KTR_BUSDMA format string.
Rui Paulo [Tue, 18 Jun 2013 06:55:58 +0000 (06:55 +0000)]
Fix a KTR_BUSDMA format string.

11 years agoMerge the commit template patch.
Peter Wemm [Tue, 18 Jun 2013 04:57:36 +0000 (04:57 +0000)]
Merge the commit template patch.

11 years agoMerge the 3-way merge marker tweak.
Peter Wemm [Tue, 18 Jun 2013 04:56:11 +0000 (04:56 +0000)]
Merge the 3-way merge marker tweak.

11 years agoRefine UMA bucket allocation to reduce space consumption and improve
Jeff Roberson [Tue, 18 Jun 2013 04:50:20 +0000 (04:50 +0000)]
Refine UMA bucket allocation to reduce space consumption and improve
performance.

 - Always free to the alloc bucket if there is space.  This gives LIFO
   allocation order to improve hot-cache performance.  This also allows
   for zones with a single bucket per-cpu rather than a pair if the entire
   working set fits in one bucket.
 - Enable per-cpu caches of buckets.  To prevent recursive bucket
   allocation one bucket zone still has per-cpu caches disabled.
 - Pick the initial bucket size based on a table driven maximum size
   per-bucket rather than the number of items per-page.  This gives
   more sane initial sizes.
 - Only grow the bucket size when we face contention on the zone lock, this
   causes bucket sizes to grow more slowly.
 - Adjust the number of items per-bucket to account for the header space.
   This packs the buckets more efficiently per-page while making them
   not quite powers of two.
 - Eliminate the per-zone free bucket list.  Always return buckets back
   to the bucket zone.  This ensures that as zones grow into larger
   bucket sizes they eventually discard the smaller sizes.  It persists
   fewer buckets in the system.  The locking is slightly trickier.
 - Only switch buckets in zalloc, not zfree, this eliminates pathological
   cases where we ping-pong between two buckets.
 - Ensure that the thread that fills a new bucket gets to allocate from
   it to give a better upper bound on allocation time.

Sponsored by: EMC / Isilon Storage Division

11 years agoAdd new FOREACH_FROM variants of the queue(3) FOREACH macros which can
Lawrence Stewart [Tue, 18 Jun 2013 02:57:56 +0000 (02:57 +0000)]
Add new FOREACH_FROM variants of the queue(3) FOREACH macros which can
optionally start the traversal from a previously found element by passing the
element in as "var". Passing a NULL "var" retains the same semantics as the
regular FOREACH macros.

Kudos to phk for suggesting the "FROM" suffix instead of my original proposal.

Reviewed by: jhb (previous version), rpaulo
MFC after: 1 week

11 years agoIntroduce svnlite so that we can check out our source code again.
Peter Wemm [Tue, 18 Jun 2013 02:53:45 +0000 (02:53 +0000)]
Introduce svnlite so that we can check out our source code again.

This is actually a fully functional build except:
* All internal shared libraries are static linked to make sure there
  is no interference with ports (and to reduce build time).
* It does not have the python/perl/etc plugin or API support.
* By default, it installs as "svnlite" rather than "svn".
* If WITH_SVN added in make.conf, you get "svn".
* If WITHOUT_SVNLITE is in make.conf, this is completely disabled.

To be absolutely clear, this is not intended for any use other than
checking out freebsd source and committing, like we once did with cvs.

It should be usable for small scale local repositories that don't
need the python/perl plugin architecture.

11 years agoAllow $ntpdate_config to be NULL. Due to a lack of surrounding quotes, when
Devin Teske [Tue, 18 Jun 2013 02:37:15 +0000 (02:37 +0000)]
Allow $ntpdate_config to be NULL. Due to a lack of surrounding quotes, when
ntpdate_config was set to NULL the conditional would (counter to prevailing
logic) succeed -- leading to awk attempting to redirect from a NULL pathname
standard-in. While we're here, make the script consistant with itself by
removing the {curlies} around ntpdate_config (they are unnecessary).

11 years agoImport sqlite-3071700
Peter Wemm [Tue, 18 Jun 2013 02:19:57 +0000 (02:19 +0000)]
Import sqlite-3071700

11 years agoImport trimmed svn-1.8.0-rc3
Peter Wemm [Tue, 18 Jun 2013 02:07:41 +0000 (02:07 +0000)]
Import trimmed svn-1.8.0-rc3

11 years agoImport serf-1.2.1
Peter Wemm [Tue, 18 Jun 2013 02:00:50 +0000 (02:00 +0000)]
Import serf-1.2.1

11 years agoImport apache apr-util 1.4.1
Peter Wemm [Tue, 18 Jun 2013 01:59:55 +0000 (01:59 +0000)]
Import apache apr-util 1.4.1

11 years agoImport apache apr-1.4.6
Peter Wemm [Tue, 18 Jun 2013 01:59:18 +0000 (01:59 +0000)]
Import apache apr-1.4.6

11 years agoBe sure to actually decrement the "count" parameter for each processed
Mark Johnston [Mon, 17 Jun 2013 22:59:47 +0000 (22:59 +0000)]
Be sure to actually decrement the "count" parameter for each processed
descriptor so that we return when the threshold has been reached.

Reviewed by: yongari
MFC after: 1 week

11 years agoAdd missing dependency to linux${SFX}_genassym.c
Eitan Adler [Mon, 17 Jun 2013 21:30:46 +0000 (21:30 +0000)]
Add missing dependency to linux${SFX}_genassym.c

Submitted by: nox
MFC After: 3 days

11 years agoRestore "all rights reserved" (spelled correctly). This was actually part of the...
Eitan Adler [Mon, 17 Jun 2013 20:27:20 +0000 (20:27 +0000)]
Restore "all rights reserved" (spelled correctly).  This was actually part of the standard text of the license which I did not realize prior.

Approved by: bushman

11 years agoFix header guards.
Eitan Adler [Mon, 17 Jun 2013 20:15:39 +0000 (20:15 +0000)]
Fix header guards.

This was ready about the same time as r251862 so just make one final cleanup

Submitted by: dt71@gmx.com

11 years agoClean up -Wheader-guard warnings.
Sergey Kandaurov [Mon, 17 Jun 2013 20:11:04 +0000 (20:11 +0000)]
Clean up -Wheader-guard warnings.

Submitted by: <dt71@gmx.com>
MFC after: 3 days
X-MFC with: r251848

11 years agoReturn ENETDOWN instead of ENOENT when all lagg(4) links are
Xin LI [Mon, 17 Jun 2013 19:31:03 +0000 (19:31 +0000)]
Return ENETDOWN instead of ENOENT when all lagg(4) links are
inactive when upper layer tries to transmit packet.  This
gives better feedback and meaningful errors for applications.

MFC after: 2 weeks
Reviewed by: thompsa

11 years agoFold in frame-unwind patch
Ed Maste [Mon, 17 Jun 2013 18:34:34 +0000 (18:34 +0000)]
Fold in frame-unwind patch

After moving to svn there's no need to avoid pulling files off a vendor
branch.

11 years agoAdd a checker to dtc, based on a feature request from rwatson / brooks.
David Chisnall [Mon, 17 Jun 2013 15:34:22 +0000 (15:34 +0000)]
Add a checker to dtc, based on a feature request from rwatson / brooks.
This checks that every node that has children specifies their register sizes.
This is not enabled by default, as the default sizes are sometimes required
(including by some DTS in the tree), but can help when writing new device
trees so that you can check that you actually meant the defaults.

11 years agoRename a parameter in sys/time.h so that you don't get warnings for things
David Chisnall [Mon, 17 Jun 2013 15:30:47 +0000 (15:30 +0000)]
Rename a parameter in sys/time.h so that you don't get warnings for things
like libdialog that include both this header and math.h.

11 years agoFix bindings of keys when in the partition editor. By adding the usual input binding...
Baptiste Daroussin [Mon, 17 Jun 2013 15:16:14 +0000 (15:16 +0000)]
Fix bindings of keys when in the partition editor. By adding the usual input binding to the "partlist" sub window.
This is a workaround, as for unknown yet reason the keys binded on the Partition Edition window are the one from partlist instead of the one from standard "formfield"

Reported by: alfred, nwhitehorn

11 years agoImport change e4ac6417c7504e1c55ec556ce908974c04e29e3c from upstream wpa:
Sergey Kandaurov [Mon, 17 Jun 2013 14:46:54 +0000 (14:46 +0000)]
Import change e4ac6417c7504e1c55ec556ce908974c04e29e3c from upstream wpa:

  From: Guy Eilam <guy@wizery.com>
  Date: Mon, 21 Feb 2011 20:44:46 +0000 (+0200)
  Subject: utils: Corrected a typo in header's name definition

  utils: Corrected a typo in header's name definition

  Corrected a typo in the BASE64_H definition that
  might cause the header file to be included more than once.

Signed-off-by: Guy Eilam <guy@wizery.com>
Submitted by: <dt71@gmx.com>
MFC after: 3 days

11 years agolower the WARNS to 1 again until I have more time to figure out the problems with...
Baptiste Daroussin [Mon, 17 Jun 2013 13:02:39 +0000 (13:02 +0000)]
lower the WARNS to 1 again until I have more time to figure out the problems with WARNS=4

Reported by: gavin

11 years agoInclude die tag in error message
Ed Maste [Mon, 17 Jun 2013 12:49:26 +0000 (12:49 +0000)]
Include die tag in error message

11 years agoUpdate dialog to 1.2-20130523
Baptiste Daroussin [Mon, 17 Jun 2013 10:28:55 +0000 (10:28 +0000)]
Update dialog to 1.2-20130523
Level up WARNS

11 years agoThis is an addendum to r251837.
Scott Long [Mon, 17 Jun 2013 10:21:38 +0000 (10:21 +0000)]
This is an addendum to r251837.
Missed adding the new references to cam_compat.c to the various makefiles.

Obtained from: Netflix

11 years agoUpdate dialog to 1.2-20130523
Baptiste Daroussin [Mon, 17 Jun 2013 10:00:48 +0000 (10:00 +0000)]
Update dialog to 1.2-20130523

11 years agoThe fix committed in r250951 replaced the reported panic with a deadlock... gold
Lawrence Stewart [Mon, 17 Jun 2013 09:49:07 +0000 (09:49 +0000)]
The fix committed in r250951 replaced the reported panic with a deadlock... gold
star for me. EVENTHANDLER_DEREGISTER() attempts to acquire the lock which is
held by the event handler framework while executing event handler functions,
leading to deadlock.

Move EVENTHANDLER_DEREGISTER() to alq_load_handler() and thus deregister the ALQ
shutdown_pre_sync handler at module unload time, which takes care of the
originally reported panic and fixes the deadlock introduced in r250951.

Reported by: Luiz Otavio O Souza
MFC after: 3 days
X-MFC with: 250951

11 years agoAdd infrastructure for doing compatibility shims, as has been sorely
Scott Long [Mon, 17 Jun 2013 08:57:09 +0000 (08:57 +0000)]
Add infrastructure for doing compatibility shims, as has been sorely
needed for the last 10 years.  Far too much of the internal API is
exposed, and every small adjustment causes applications to stop working.
To kick this off, bump the API version to 0x17 as should have been done
with r246713, but add shims to compensate.  Thanks to the shims, there
should be no visible change in application behavior.

I have plans to do a significant overhaul of the API to harnen it for
the future, but until then, I welcome others to add shims for older
versions of the API.

Obtained from: Netflix

11 years ago- add myself
Ruslan Makhmatkhanov [Mon, 17 Jun 2013 04:00:46 +0000 (04:00 +0000)]
- add myself

11 years ago- add my mentor -> mentee relation with koobs
Ruslan Makhmatkhanov [Mon, 17 Jun 2013 03:56:31 +0000 (03:56 +0000)]
- add my mentor -> mentee relation with koobs

11 years ago - Add a new UMA API: uma_zcache_create(). This makes a zone without any
Jeff Roberson [Mon, 17 Jun 2013 03:43:47 +0000 (03:43 +0000)]
 - Add a new UMA API: uma_zcache_create().  This makes a zone without any
   backing memory that is only a container for per-cpu caches of arbitrary
   pointer items.  These zones have no kegs.
 - Convert the regular keg based allocator to use the new import/release
   functions.
 - Move some stats to be atomics since they would require excessive zone
   locking/unlocking with the new import/release paradigm.  Make
   zone_free_item simpler now that callers can manage more stats.
 - Check for these cache-only zones in the public APIs and debugging
   code by checking zone_first_keg() against NULL.

Sponsored by: EMC / Isilong Storage Division

11 years agoRemove vfs_mount(9), it have been died since 2004.
Xin LI [Mon, 17 Jun 2013 03:32:27 +0000 (03:32 +0000)]
Remove vfs_mount(9), it have been died since 2004.

Noticed by: git via alfred
MFC after: 2 weeks

11 years agoAdjust i386 Xen PV support for updated Xen interface files.
Justin T. Gibbs [Mon, 17 Jun 2013 01:43:07 +0000 (01:43 +0000)]
Adjust i386 Xen PV support for updated Xen interface files.

sys/i386/include/xen/xenvar.h:
sys/i386/xen/xen_machdep.c:
sys/xen/interface/foreign/structs.py:
sys/xen/evtchn/evtchn.c:
MAX_VIRT_CPUS => XEN_LEGACY_MAX_VCPUS

Submitted by: Roger Pau Monné
Reviewed by: gibbs

11 years agoRename remaining DIAGNOSTIC to INVARIANTS.
Pedro F. Giffuni [Mon, 17 Jun 2013 00:39:23 +0000 (00:39 +0000)]
Rename remaining DIAGNOSTIC to INVARIANTS.

MFC after: 3 days

11 years agoAdded my another mentors: osa and eadler
Veniamin Gvozdikov [Sun, 16 Jun 2013 21:49:37 +0000 (21:49 +0000)]
Added my another mentors: osa and eadler

Approved by: rm (mentor)

11 years agoAdd myself as ports committer.
Veniamin Gvozdikov [Sun, 16 Jun 2013 21:45:04 +0000 (21:45 +0000)]
Add myself as ports committer.

Approved by: rm (mentor)

11 years agoFix some missing symbols in the libsupc++ Version.map
David Chisnall [Sun, 16 Jun 2013 21:15:35 +0000 (21:15 +0000)]
Fix some missing symbols in the libsupc++ Version.map

MFC after: 1 week

11 years agoFix the libc++ option.
Niclas Zeising [Sun, 16 Jun 2013 20:51:44 +0000 (20:51 +0000)]
Fix the libc++ option.
This somehow got reverted when this was updated after the CVS removal.

11 years agoRemove lines declaring "All rights reserved" or similar comments: they
Eitan Adler [Sun, 16 Jun 2013 19:35:01 +0000 (19:35 +0000)]
Remove lines declaring "All rights reserved" or similar comments: they
are not true as the files are actually under the BSD-2 license

Approved by: bushman

11 years agoOne more obsolete file.
Antoine Brodin [Sun, 16 Jun 2013 19:07:06 +0000 (19:07 +0000)]
One more obsolete file.

11 years agoAdd more obsolete files.
Antoine Brodin [Sun, 16 Jun 2013 18:32:59 +0000 (18:32 +0000)]
Add more obsolete files.

11 years agoFix OSVERSION variable within PBUILD_FLAGS.
Glen Barber [Sun, 16 Jun 2013 17:54:56 +0000 (17:54 +0000)]
Fix OSVERSION variable within PBUILD_FLAGS.

Submitted by: Garrett Cooper (in part)
Approved by: kib (mentor)
MFC After: 1 week
X-MFC-With: r251652
X-MFC-To: stable/9 only

11 years agoFix install from read-only obj dir when SHLIB_LDSCRIPT is used.
Jeremie Le Hen [Sun, 16 Jun 2013 16:29:23 +0000 (16:29 +0000)]
Fix install from read-only obj dir when SHLIB_LDSCRIPT is used.

Reported by:    joeld
Tested by:      joeld

11 years agoRe-sort ext2fs headers to make things easier to find.
Pedro F. Giffuni [Sun, 16 Jun 2013 16:10:45 +0000 (16:10 +0000)]
Re-sort ext2fs headers to make things easier to find.

In the ext2fs driver we have a mixture of headers:

- The ext2_ prefixed headers have strong influence from NetBSD
and are carry specific ext2/3/4 information.
- The unprefixed headers are inspired on UFS and carry implementation
specific information.

Do some small adjustments so that the information is easier to
find coming from either UFS or the NetBSD implementation.

MFC after: 3 days

11 years agosys/dev/xen/blkfront/blkfront.c:
Justin T. Gibbs [Sun, 16 Jun 2013 16:01:24 +0000 (16:01 +0000)]
sys/dev/xen/blkfront/blkfront.c:
In xbd_thaw(), fix inverted logic to verify the queue is frozen
before attempting a thaw.

MFC after: 1 week

11 years agoMove _Atomic() into <sys/cdefs.h>.
Ed Schouten [Sun, 16 Jun 2013 10:48:47 +0000 (10:48 +0000)]
Move _Atomic() into <sys/cdefs.h>.

That way _Atomic() is defined next to all the other C11 keywords for
which we provide compatibility for pre-C11 compilers. While there, fix
the definition to place "volatile" at the end. Otherwise pointer types
will become "volatile T *" instead of "T * volatile".

11 years agoChange callout use counter to use C11 atomics.
Ed Schouten [Sun, 16 Jun 2013 09:30:35 +0000 (09:30 +0000)]
Change callout use counter to use C11 atomics.

In order to get some coverage of C11 atomics in kernelspace, switch at
least one piece of code in kernelspace to use C11 atomics instead of
<machine/atomic.h>.

While there, slightly improve the code by adding an assertion to prevent
the use count from going negative.

11 years agocvsweb -> svnweb
Joel Dahl [Sun, 16 Jun 2013 07:16:44 +0000 (07:16 +0000)]
cvsweb -> svnweb

11 years agoReturn ENETDOWN when the parent interface is down.
Hiroki Sato [Sun, 16 Jun 2013 04:40:02 +0000 (04:40 +0000)]
Return ENETDOWN when the parent interface is down.

MFC after: 1 week

11 years agosh: Add tests for 'local -' (save shell options).
Jilles Tjoelker [Sat, 15 Jun 2013 22:22:03 +0000 (22:22 +0000)]
sh: Add tests for 'local -' (save shell options).

11 years agoLet hastd use C11 atomics.
Ed Schouten [Sat, 15 Jun 2013 22:17:59 +0000 (22:17 +0000)]
Let hastd use C11 atomics.

C11 atomics now work on all the architectures. Have at least a single
piece of software in our base system that uses C11 atomics. This
somewhat makes it less likely that we break it because of LLVM imports,
etc.

11 years agoRegenerate after CVS removal (and it seems other missed changes)
Eitan Adler [Sat, 15 Jun 2013 21:29:47 +0000 (21:29 +0000)]
Regenerate after CVS removal (and it seems other missed changes)

11 years agoRemove CVS from the base system.
Eitan Adler [Sat, 15 Jun 2013 20:29:07 +0000 (20:29 +0000)]
Remove CVS from the base system.

Discussed with: many
Reviewed by: peter, zi
Approved by: core

11 years agoStyle/comments.
Devin Teske [Sat, 15 Jun 2013 13:38:21 +0000 (13:38 +0000)]
Style/comments.

11 years agoRestore use of polling mode for disk cache flush in case of kernel panic.
Alexander Motin [Sat, 15 Jun 2013 12:46:38 +0000 (12:46 +0000)]
Restore use of polling mode for disk cache flush in case of kernel panic.
While I am not sure that any extra hardware access is a good idea after
panic, that is an existing behaviour that should better work correctly.

11 years agoBuild __clear_cache on ARM with clang now it supports it.
Andrew Turner [Sat, 15 Jun 2013 12:16:27 +0000 (12:16 +0000)]
Build __clear_cache on ARM with clang now it supports it.

11 years agoPull in r183926 from LLVM trunk:
Andrew Turner [Sat, 15 Jun 2013 12:13:22 +0000 (12:13 +0000)]
Pull in r183926 from LLVM trunk:

  Allow clang to build __clear_cache on ARM.

  __clear_cache is special. It needs no signature, but is a real function in
  compiler_rt or libgcc.

  Patch by Andrew Turner.

This allows us to build the __clear_cache function in compiler-rt.

11 years agoNow that the necessary infrastructure is in place to ensure hhook points which
Lawrence Stewart [Sat, 15 Jun 2013 10:38:31 +0000 (10:38 +0000)]
Now that the necessary infrastructure is in place to ensure hhook points which
register after a khelp module will get hooked, move khelp module initialisation
to the earlier SI_SUB_KLD stage.

MFC after: 1 week

11 years agoMove hhook's per-vnet initialisation to an earlier SYSINIT SI_SUB stage to
Lawrence Stewart [Sat, 15 Jun 2013 10:08:34 +0000 (10:08 +0000)]
Move hhook's per-vnet initialisation to an earlier SYSINIT SI_SUB stage to
ensure all per-vnet related hhook initialisation is completed prior to any
virtualised hhook points attempting registration.

vnet_register_sysinit() requires that a stage later than SI_SUB_VNET be chosen.
There are no per-vnet initialisors in the source tree at this time which run
earlier than SI_SUB_INIT_IF. A quick audit of non-virtualised SYSINITs indicates
there are no subsystems pre SI_SUB_MBUF that would likely be interested in
registering a virtualised hhook point.

Settle on SI_SUB_MBUF as hhook's per-vnet initialisation stage as it's the first
overtly network-related initilisation stage to run after SI_SUB_VNET. If a
subsystem that initialises earlier than SI_SUB_MBUF ends up wanting to register
virtualised hhook points in future, hhook's use of SI_SUB_MBUF will need to be
revisited and would probably warrant creating a dedicated SI_SUB_HHOOK which
runs immediately after SI_SUB_VNET.

MFC after: 1 week

11 years agoPull in r184040 from upstream clang trunk:
Ed Schouten [Sat, 15 Jun 2013 09:42:43 +0000 (09:42 +0000)]
Pull in r184040 from upstream clang trunk:

  Emit native implementations of atomic operations on FreeBSD/armv6.

  Just like on Linux, FreeBSD/armv6 assumes the system supports
  ldrex/strex unconditionally. It is also used by the kernel. We can
  therefore enable support for it, like we do on Linux.

  While there, change one of the unit tests to explicitly test against
  armv5 instead of armv7, as it actually tests whether libcalls are
  emitted.

11 years agoLet ARM use the custom tailored atomic intrinsics.
Ed Schouten [Sat, 15 Jun 2013 09:04:10 +0000 (09:04 +0000)]
Let ARM use the custom tailored atomic intrinsics.

11 years agoRemove conflicting macros from SPARC64's atomic(9) header.
Ed Schouten [Sat, 15 Jun 2013 08:23:53 +0000 (08:23 +0000)]
Remove conflicting macros from SPARC64's atomic(9) header.

The atomic_load() and atomic_store() macros conflict with the equally
named macros from <stdatomic.h>. Remove them, as they are only used to
implement functions that are not present on any of the other
architectures.

11 years agoStick to using the documented atomic(9) API.
Ed Schouten [Sat, 15 Jun 2013 08:21:54 +0000 (08:21 +0000)]
Stick to using the documented atomic(9) API.

The atomic_store_ptr() function is not part of the atomic(9) API. We
only provide a version with a release barrier.

11 years agoMake support for atomics on ARM complete.
Ed Schouten [Sat, 15 Jun 2013 08:15:22 +0000 (08:15 +0000)]
Make support for atomics on ARM complete.

Provide both __sync_*-style and __atomic_*-style functions that perform
the atomic operations on ARMv5 by using Restartable Atomic Sequences.

While there, clean up some pieces of code where it's sufficient to use
regular uint32_t to store register contents and don't need full reg_t's.
Also sync this back to the MIPS code.

11 years agoCleanup and simplification in khelp_{register|deregister}_helper(). No
Lawrence Stewart [Sat, 15 Jun 2013 06:45:17 +0000 (06:45 +0000)]
Cleanup and simplification in khelp_{register|deregister}_helper(). No
functional changes.

MFC after: 1 week

11 years agoAdd a private KPI between hhook and khelp that allows khelp modules to insert
Lawrence Stewart [Sat, 15 Jun 2013 05:57:29 +0000 (05:57 +0000)]
Add a private KPI between hhook and khelp that allows khelp modules to insert
hook functions into hhook points which register after the modules were loaded -
potentially useful during boot or if hhook points are dynamically registered.

MFC after: 1 week

11 years agoProperly track the different reasons new I/O is temporarily disabled, and
Justin T. Gibbs [Sat, 15 Jun 2013 04:51:31 +0000 (04:51 +0000)]
Properly track the different reasons new I/O is temporarily disabled, and
only re-enable I/O when all reasons have cleared.

sys/dev/xen/blkfront/block.h:
In the block front driver softc, replace the boolean
XBDF_FROZEN flag with a count of commands and driver global
issues that freeze the I/O queue.  So long xbd_qfrozen_cnt
is non-zero, I/O is halted.

Add flags to xbd_flags for tracking grant table entry and
free command resource shortages.  Each of these classes can
increment xbd_qfrozen_cnt at most once.

Add a command flag (XBDCF_ASYNC_MAPPING) that is set whenever
the initial mapping attempt of a command fails with EINPROGRESS.

sys/dev/xen/blkfront/blkfront.c:
In xbd_queue_cb(), use new XBDCF_ASYNC_MAPPING flag to definitively
know if an async bus dmamap load has occurred.

Add xbd_freeze() and xbd_thaw() helper methods for managing
xbd_qfrozen_cnt and use them to implement all queue freezing logic.

Add missing "thaw" to restart I/O processing once grant references
become available.

Sponsored by: Spectra Logic Corporation

11 years agoInternalise handling of virtualised hook points inside
Lawrence Stewart [Sat, 15 Jun 2013 04:03:40 +0000 (04:03 +0000)]
Internalise handling of virtualised hook points inside
hhook_{add|remove}_hook_lookup() so that khelp (and other potential API
consumers) do not have to care when they attempt to (un)hook a particular hook
point identified by id and type.

Reviewed by: scottl
MFC after: 1 week

11 years agoMerge r250802 from bryanv/vtnetmq - Fix setting of the Rx filters
Bryan Venteicher [Sat, 15 Jun 2013 03:55:04 +0000 (03:55 +0000)]
Merge r250802 from bryanv/vtnetmq - Fix setting of the Rx filters

QEMU 1.4 made the descriptor requirement stricter - the size of buffer
descriptor must exactly match the number of MAC addresses provided.

PR: kern/178955
MFC after: 5 days

11 years agoUpgrade Xen interface headers to Xen 4.2.1.
Justin T. Gibbs [Fri, 14 Jun 2013 23:43:44 +0000 (23:43 +0000)]
Upgrade Xen interface headers to Xen 4.2.1.

Move FreeBSD from interface version 0x00030204 to 0x00030208.
Updates are required to our grant table implementation before we
can bump this further.

sys/xen/hvm.h:
Replace the implementation of hvm_get_parameter(), formerly located
in sys/xen/interface/hvm/params.h.  Linux has a similar file which
primarily stores this function.

sys/xen/xenstore/xenstore.c:
Include new xen/hvm.h header file to get hvm_get_parameter().

sys/amd64/include/xen/xen-os.h:
sys/i386/include/xen/xen-os.h:
Correctly protect function definition and variables from being
included into assembly files in xen-os.h

Xen memory barriers are now prefixed with "xen_" to avoid conflicts
with OS native primatives.  Define Xen memory barriers in terms of
the native FreeBSD primatives.

Sponsored by: Spectra Logic Corporation
Reviewed by: Roger Pau Monné
Tested by: Roger Pau Monné
Obtained from: Roger Pau Monné (bug fixes)

11 years agoFix typo (dbM -> dBm)
Eitan Adler [Fri, 14 Jun 2013 23:04:31 +0000 (23:04 +0000)]
Fix typo (dbM -> dBm)

Submitted by: Daan@vitsch.nl
Reviewed by: adrian

11 years agoSimplify the hierarchy target's logic. [0]
Brooks Davis [Fri, 14 Jun 2013 22:32:47 +0000 (22:32 +0000)]
Simplify the hierarchy target's logic. [0]

Run hierarchy with WORLDTMP in the path so it works when it is invoked
directly.  Such use is nearly alwasy wrong but appears to be common.[1]

PR: conf/178209 [0], conf/178547 [1]
Submitted by: Garrett Cooper <yaneurabeya@gmail.com> [0]
MFC after: 5 days

11 years agosh(1): A subshell environment has its own rlimits (ulimit).
Jilles Tjoelker [Fri, 14 Jun 2013 22:06:18 +0000 (22:06 +0000)]
sh(1): A subshell environment has its own rlimits (ulimit).

This has always been the case and is intended (just like cd).

This matches Austin group issue #706.