]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoKill ARM_VFP_SUPPORT, it's been removed some time ago.
cognet [Thu, 21 Nov 2013 20:39:53 +0000 (20:39 +0000)]
Kill ARM_VFP_SUPPORT, it's been removed some time ago.

10 years agocxgbe(4): update the internal list of device features.
np [Thu, 21 Nov 2013 20:07:58 +0000 (20:07 +0000)]
cxgbe(4): update the internal list of device features.

MFC after: 3 days

10 years agomdoc: remove EOL whitespace.
joel [Thu, 21 Nov 2013 19:44:48 +0000 (19:44 +0000)]
mdoc: remove EOL whitespace.

10 years agof_die() (see `bsdconfig includes -dF die') uses a dialog box (and has been
dteske [Thu, 21 Nov 2013 19:43:45 +0000 (19:43 +0000)]
f_die() (see `bsdconfig includes -dF die') uses a dialog box (and has been
documented as such; I just forgot). These utilities are command-line only
and as such should stick to either using f_die without arguments or printf)

10 years agoFix reference to ioctl(2).
pluknet [Thu, 21 Nov 2013 19:31:57 +0000 (19:31 +0000)]
Fix reference to ioctl(2).

10 years agoSync with NetBSD. The funtional change is to make the output when
brooks [Thu, 21 Nov 2013 19:29:41 +0000 (19:29 +0000)]
Sync with NetBSD.  The funtional change is to make the output when
comparing a directory to an mtree file more compatible with fmtree when
FreeBSD 9 compatiblity mode is on.  This output is clearly intended for
humans not computers, but some tools such as mergemaster's -U option rely
on it.

MFC after: 3 days

10 years agoRefactor amd64 startup SMAP parsing
emaste [Thu, 21 Nov 2013 19:20:08 +0000 (19:20 +0000)]
Refactor amd64 startup SMAP parsing

Extracted from the projects/uefi branch, this change is a reasonable
cleanup and will reduce the diffs to review when bringing in the
UEFI work.

Reviewed by: kib@
Sponsored by: The FreeBSD Foundation

10 years agoUpdate text related to Intel CPU support and Apple hardware support.
rodrigc [Thu, 21 Nov 2013 19:04:59 +0000 (19:04 +0000)]
Update text related to Intel CPU support and Apple hardware support.

Submitted by: skreuzer

10 years agoUpdate copyrights
rodrigc [Thu, 21 Nov 2013 19:00:21 +0000 (19:00 +0000)]
Update copyrights

Submitted by: skreuzer

10 years agoDisable amd64 boot time memory test by default
emaste [Thu, 21 Nov 2013 18:37:11 +0000 (18:37 +0000)]
Disable amd64 boot time memory test by default

The page presence memory test takes a long time on large memory systems
and has little value on contemporary amd64 hardware.

Sponsored by: The FreeBSD Foundation

10 years agoRemove unused line -- cruft left over from SVN r258360.
dteske [Thu, 21 Nov 2013 17:49:56 +0000 (17:49 +0000)]
Remove unused line -- cruft left over from SVN r258360.

10 years agolibstdc++: merge non-abi changes from Apple's developer tools
pfg [Thu, 21 Nov 2013 16:44:36 +0000 (16:44 +0000)]
libstdc++: merge non-abi changes from Apple's developer tools

Take some changes from Apple's Developer Tools 4.0 [1]:

block.patch
emergency-buffer-reduction.patch
test_cleanup.patch

vector_copy_no_alloc.patch
problem/6473222 copy-constructing a std::vector from an
empty std::vector calls malloc

2008-10-27  Howard Hinnant
stl_tree_system_header.patch
Added #pragma GCC system_header to stl_tree.h.
copy_doc.patch
Corrected documentation concerning copy in stl_algobase.h.
string_compare.patch
Fixed basic_string.h, basic_string.tcc, incorrect 64bit to
32bit narrowing.

Reference:

[1] http://opensource.apple.com/source/libstdcxx/libstdcxx-39/patches-4.2.1/

Obtained from: Apple
MFC after: 1 month

10 years agogcc: another round of merges from the gcc pre-43 branch.
pfg [Thu, 21 Nov 2013 16:38:57 +0000 (16:38 +0000)]
gcc: another round of merges from the gcc pre-43 branch.

Bring The following revisions from the gcc43 branch[1]:

118360, 118361, 118363, 118576, 119820,
123906, 125246, and 125721.

They all have in common that the were merged long ago
into Apple's gcc and should help improve the general
quality of the compiler and make it easier to bring
new features from Apple's gcc42.

For details please review the additions to the files:
gcc/ChangeLog.gcc43
gcc/cp/ChangeLog.gcc43 (new, adds previous revisions)

Reference:
[1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700

Obtained from: gcc pre4.3 (GPLv2) branch
MFC after: 3 weeks

10 years agoFor PCI<->PCI bridges, #address-cells may be 3. Allow this when parsing the
nwhitehorn [Thu, 21 Nov 2013 15:41:52 +0000 (15:41 +0000)]
For PCI<->PCI bridges, #address-cells may be 3. Allow this when parsing the
ibm,dma-window properties. This is especially a concern when
#ibm,dma-address-cells is not specified and we have to use the regular
#address-cells property.

MFC after: 1 week

10 years agolibexecinfo: Include terminating null in byte count
emaste [Thu, 21 Nov 2013 14:12:36 +0000 (14:12 +0000)]
libexecinfo: Include terminating null in byte count

Otherwise, a formatted string with a strlen equal to the remaining
buffer space would have the last character omitted (because vsnprintf
always null-terminates), and later the assert in backtrace_symbols_fmt
would fail.

MFC after: 3 days
Sponsored by: DARPA, AFRL

10 years agoUnbreak compilation with GCC.
gber [Thu, 21 Nov 2013 09:19:14 +0000 (09:19 +0000)]
Unbreak compilation with GCC.

10 years agoRemove stale comment. The PID provider is handled elsewhere already.
jhibbits [Thu, 21 Nov 2013 06:54:28 +0000 (06:54 +0000)]
Remove stale comment.  The PID provider is handled elsewhere already.

10 years agoQuote the interface name for good measure.
dteske [Thu, 21 Nov 2013 03:22:13 +0000 (03:22 +0000)]
Quote the interface name for good measure.

10 years agoCall cpu_setup() from the initarm() routine on platforms that don't use
ian [Thu, 21 Nov 2013 01:08:10 +0000 (01:08 +0000)]
Call cpu_setup() from the initarm() routine on platforms that don't use
the common FDT-aware initarm() in arm/machdep.c.

Pointed out by:      cognet
Pointy hat to:      ian

10 years agoRevert SVN r257830 -- that feature was annoying and was removed long ago.
dteske [Thu, 21 Nov 2013 00:54:26 +0000 (00:54 +0000)]
Revert SVN r257830 -- that feature was annoying and was removed long ago.
Was a momentary memory lapse induced by old code that was lying in my ~/bin

10 years agoIn pmap_unmapdev(), remember the size, and use that as an argument to
cognet [Wed, 20 Nov 2013 23:06:54 +0000 (23:06 +0000)]
In pmap_unmapdev(), remember the size, and use that as an argument to
kva_free(), or we'd end up always passing it a size of 0, and for some
strange reason it doesn't seem to like it.

10 years agoUpdate function description for API tool:
dteske [Wed, 20 Nov 2013 22:12:21 +0000 (22:12 +0000)]
Update function description for API tool:
bsdconfig includes -dF f_validate_hostname

10 years agoMake `-d' implicitly enable `-f' for simplification.
dteske [Wed, 20 Nov 2013 22:11:42 +0000 (22:11 +0000)]
Make `-d' implicitly enable `-f' for simplification.

10 years agofix white space...
jmg [Wed, 20 Nov 2013 21:21:29 +0000 (21:21 +0000)]
fix white space...

MFC after: 1 week

10 years agofix a use after free, jsegdep_merge will free wk, avoid the next check...
jmg [Wed, 20 Nov 2013 21:16:53 +0000 (21:16 +0000)]
fix a use after free, jsegdep_merge will free wk, avoid the next check...

CID: 1006098
Sponsored by: Imaginary Forces
Reviewed by: mckusick
MFC after: 1 week

10 years agoAdd a `-d' flag for printing the description of each function.
dteske [Wed, 20 Nov 2013 21:05:33 +0000 (21:05 +0000)]
Add a `-d' flag for printing the description of each function.

10 years agoAdd new `includes' module for exploring the bsdconfig(8) API.
dteske [Wed, 20 Nov 2013 20:37:21 +0000 (20:37 +0000)]
Add new `includes' module for exploring the bsdconfig(8) API.

10 years agoflag that the aesni driver is sync... This means we don't waste a
jmg [Wed, 20 Nov 2013 20:25:27 +0000 (20:25 +0000)]
flag that the aesni driver is sync...  This means we don't waste a
context switch just to call the done callback...  On my machine, this
improves geli/gzero decrypt performance by ~27% from 550MB/sec to
~700MB/sec...

MFC after: 3 days

10 years agoRedo r258088 to avoid relying on signed arithmetic overflow, since
kib [Wed, 20 Nov 2013 19:41:00 +0000 (19:41 +0000)]
Redo r258088 to avoid relying on signed arithmetic overflow, since
compiler interprets this as an undefined behaviour.  Instead, ensure
that the sum of uio_offset and uio_resid is below OFF_MAX using the
operation which cannot overflow.

Reported and tested by: pho
Discussed with: bde
Approved by: des (pseudofs maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoChange introduction history.
peter [Wed, 20 Nov 2013 17:48:38 +0000 (17:48 +0000)]
Change introduction history.

10 years agoAdd USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes.
ian [Wed, 20 Nov 2013 16:42:01 +0000 (16:42 +0000)]
Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes.

10 years agoCall cpu_setup() immediately after the page tables are installed. This
ian [Wed, 20 Nov 2013 15:53:50 +0000 (15:53 +0000)]
Call cpu_setup() immediately after the page tables are installed.  This
enables data cache and other chip-specific features.  It was previously
done via an early SYSINIT, but it was being done after pmap and vm setup,
and those setups need to use mutexes.  On some modern ARM platforms,
the ldrex/strex instructions that implement mutexes require the data cache
to be enabled.

A nice side effect of enabling caching earlier is that it eliminates the
multi-second pause that used to happen early in boot while physical memory
and pmap and vm were being set up.  On boards with 1 GB or more of ram
this pause was very noticible, sometimes 5-6 seconds.

PR: arm/183740

10 years agoFix comment after r250551.
glebius [Wed, 20 Nov 2013 13:22:22 +0000 (13:22 +0000)]
Fix comment after r250551.

10 years agoPrint some more flags.
mav [Wed, 20 Nov 2013 12:32:34 +0000 (12:32 +0000)]
Print some more flags.

10 years agoMFV r258378: 4089 NULL pointer dereference in arc_read()
avg [Wed, 20 Nov 2013 11:52:32 +0000 (11:52 +0000)]
MFV r258378: 4089 NULL pointer dereference in arc_read()

illumos/illumos-gate@57815f6b95a743697e148327725b7f568e75e6ea

Tested by: adrian
MFC after: 4 days

10 years agoMFV r258377: 4088 use after free in arc_release()
avg [Wed, 20 Nov 2013 11:47:50 +0000 (11:47 +0000)]
MFV r258377: 4088 use after free in arc_release()

illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772

MFC after: 5 days

10 years agoSplit raw reading/programming into smaller chunks to avoid allocating too
gber [Wed, 20 Nov 2013 11:10:23 +0000 (11:10 +0000)]
Split raw reading/programming into smaller chunks to avoid allocating too
big chunk of kernel memory. Validate size of data. Add error handling to
avoid calling copyout() when data has not been read correctly.

Reviewed by:    zbb
Reported by:    x90c <geinblues@gmail.com>
MFC after:      2 days

10 years agoVm map code performs clipping when map entry covers region which is
kib [Wed, 20 Nov 2013 09:03:48 +0000 (09:03 +0000)]
Vm map code performs clipping when map entry covers region which is
larger than the operational region.  If the op region size is zero,
clipping would create a zero-sized map entry.  The result is that vm
map splay starts behaving inconsistently, sometimes returning
zero-sized entry, sometimes the next (or previous) entry.

One step further, it could result in e.g. vm_map_wire() setting
MAP_ENTRY_IN_TRANSITION on the zero-sized entry, but failing to clear
it in the done part.  The vm_map_delete() than hangs forever waiting
for the flag removal.

Verify for zero-length requests and act as if it is always successfull
without performing any action on the address space.

Diagnosed by: pho
Tested by: pho (previous version)
Reviewed by: alc (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAdd assertions to cover all places in the wiring and unwiring code
kib [Wed, 20 Nov 2013 08:47:54 +0000 (08:47 +0000)]
Add assertions to cover all places in the wiring and unwiring code
where MAP_ENTRY_IN_TRANSITION is set or cleared.

Tested by: pho
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoRevert back to use int for the page counts. In vn_io_fault(), the i/o
kib [Wed, 20 Nov 2013 08:45:26 +0000 (08:45 +0000)]
Revert back to use int for the page counts.  In vn_io_fault(), the i/o
is chunked to pieces limited by integer io_hold_cnt tunable, while
vm_fault_quick_hold_pages() takes integer max_count as the upper bound.

Rearrange the checks to correctly handle overflowing address arithmetic.

Submitted by: bde
Tested by: pho
Discussed with: alc
MFC after: 1 week

10 years agoRegenerate after r258363 (alternate ID for Novatel MiFi 2200) and
truckman [Wed, 20 Nov 2013 02:20:27 +0000 (02:20 +0000)]
Regenerate after r258363 (alternate ID for Novatel MiFi 2200) and
r258333 (bus_autoconf.sh tweak).

10 years agoAdd alternate ID for Novatel MiFi 2200 CDMA, which is used by my
truckman [Wed, 20 Nov 2013 02:16:47 +0000 (02:16 +0000)]
Add alternate ID for Novatel MiFi 2200 CDMA, which is used by my
Virgin Mobile branded device.  It needs the U3GINIT_SCSIEJECT quirk.

Reviewed by: hselasky
MFC after: 1 month

10 years agoUse 'int' to store the return value of getopt(), rather than char.
jhibbits [Wed, 20 Nov 2013 01:42:29 +0000 (01:42 +0000)]
Use 'int' to store the return value of getopt(), rather than char.

On some architectures (powerpc), char is unsigned by default, which means
comparisons against -1 always fail, so the programs get stuck in an
infinite loop.

MFC after: 1 week

10 years agoFix the function search space.
jhibbits [Wed, 20 Nov 2013 01:33:13 +0000 (01:33 +0000)]
Fix the function search space.

Submitted by: Howard Su

10 years agoWhitespace, style, sub-shells, and standardize variable name
dteske [Wed, 20 Nov 2013 00:17:57 +0000 (00:17 +0000)]
Whitespace, style, sub-shells, and standardize variable name
(s/interfaces/menu_list/).

10 years agoApply access flags for managed and unmanaged pages properly on ARMv6/v7
zbb [Tue, 19 Nov 2013 23:37:50 +0000 (23:37 +0000)]
Apply access flags for managed and unmanaged pages properly on ARMv6/v7

When entering a mapping via pmap_enter() unmanaged pages ought to be
naturally excluded from the "modified" and "referenced" emulation.
RW permission should be granted implicitly when requested,
otherwise unmanaged page will not recover from the permission fault
since there will be no PV entry to indicate that the page can be written.

In addition, only managed pages that participate in "modified"
emulation need to be marked as "dirty" and "writeable" when entered
with RW permissions. Likewise with "referenced" flag for managed pages.
Unmanaged ones however should not be marked as such.

Reviewed by: cognet, gber

10 years agoAvoid clearing EXEC permission bit when setting the page RW on ARMv6/v7
zbb [Tue, 19 Nov 2013 23:31:39 +0000 (23:31 +0000)]
Avoid clearing EXEC permission bit when setting the page RW on ARMv6/v7

When emulating modified bit the executable attribute was cleared by
mistake when calling pmap_set_prot(). This was not a problem before
changes to ref/mod emulation since all the pages were created RW basing
on the "prot" argument in pmap_enter(). Now however not all pages are RW
and the RW permission can be cleared in the process.

Added proper KTRs accordingly.

Spotted by: cognet
Reviewed by: gber

10 years agoAdd "resize" verb to gmirror(8) and such functionality to geom_mirror(4).
ae [Tue, 19 Nov 2013 22:55:17 +0000 (22:55 +0000)]
Add "resize" verb to gmirror(8) and such functionality to geom_mirror(4).
Now it is easy to expand the size of the mirror when all its components
are replaced. Also add g_resize method to geom_mirror class. It will write
updated metadata to new last sector, when parent provider is resized.

Silence from: geom@
MFC after: 1 month

10 years agoBugfixes... the host capabilties from FDT data are stored in host.caps, not
ian [Tue, 19 Nov 2013 22:14:35 +0000 (22:14 +0000)]
Bugfixes... the host capabilties from FDT data are stored in host.caps, not
host.host_ocr, examine the correct field when setting up the hardware.  Also,
the offset for the capabilties register should be 0x140, not 0x240.

Submitted by: Ilya Bakulin <ilya@bakulin.de>
Pointy hat to: me

10 years ago"Tim trailing" -> "Trim trailing"
trhodes [Tue, 19 Nov 2013 19:55:41 +0000 (19:55 +0000)]
"Tim trailing" -> "Trim trailing"

10 years agotaskqueue_cancel: garbage collect a write-only variable
avg [Tue, 19 Nov 2013 18:45:29 +0000 (18:45 +0000)]
taskqueue_cancel: garbage collect a write-only variable

MFC after: 3 days

10 years agozfs page_busy: fix the boundaries of the cleared range
avg [Tue, 19 Nov 2013 18:43:47 +0000 (18:43 +0000)]
zfs page_busy: fix the boundaries of the cleared range

This is a fix for a regression introduced in r246293.

vm_page_clear_dirty expects the range to have DEV_BSIZE aligned boundaries,
otherwise it extends them.  Thus it can happen that the whole page is
marked clean while actually having some small dirty region(s).
This commit makes the range properly aligned and ensures that only
the clean data is marked as such.

It would interesting to evaluate how much benefit clearing with DEV_BSIZE
granularity produces.  Perhaps instead we should clear the whole page
when it is completely overwritten and don't bother clearing any bits
if only a portion a page is written.

Reported by: George Hartzell <hartzell@alerce.com>,
Richard Todd <rmtodd@servalan.servalan.com>
Tested by: George Hartzell <hartzell@alerce.com>,
Reviewed by: kib
MFC after: 5 days

10 years agofsx: add an option to randomly call msync(MS_INVALIDATE)
avg [Tue, 19 Nov 2013 18:35:38 +0000 (18:35 +0000)]
fsx: add an option to randomly call msync(MS_INVALIDATE)

This call should be a sufficiently close approximation of what happens
when a filesystem is unmounted and remounted.  To be more specific, it
should test that the data that was in the page cache is the same data
that ends up on a stable storage or in a filesystem's internal cache,
if any.
This will catch the cases where a page with modified data is marked as
a clean page for whatever reason.

While there, make logging of the special events (open+close before
plus invalidation now) more generic and slightly better than the previous
hack.

MFC after: 10 days

10 years agofsx: new option to disable msync(MS_SYNC) after each write via mmaped region
avg [Tue, 19 Nov 2013 18:35:01 +0000 (18:35 +0000)]
fsx: new option to disable msync(MS_SYNC) after each write via mmaped region

This option should be useful for testing if a filesystem uses the
unified buffer / page cache.
Or, if filesystem's emulation of the unified cache works as expected.
This should be the case for e.g. ZFS.

MFC after: 1 week

10 years agoPull in r191896 from upstream llvm trunk:
dim [Tue, 19 Nov 2013 17:53:19 +0000 (17:53 +0000)]
Pull in r191896 from upstream llvm trunk:

  CaptureTracking: Plug a loophole in the "too many uses" heuristic.

  The heuristic was added to avoid spending too much compile time in a
  specially crafted test case (PR17461, PR16474) with many uses on a
  select or bitcast instruction can still trigger the slow case. Add a
  check for that case.

  This only affects compile time, don't have a good way to test it.

This fixes the excessive compile time spent on a specific file of the
graphics/rawtherapee port.

Reported by: mandree
MFC after: 3 days

10 years agoFix build with GCC
bdrewery [Tue, 19 Nov 2013 16:11:03 +0000 (16:11 +0000)]
Fix build with GCC

SSL_set_tlsext_host_name(3) internally does not modify the host buffer
pased to it. So it is safe to DECONST the struct url* here.

Reported by: gjb
Approved by: bapt (implicit)
MFC after: 1 week
X-MFC-With: r258347

10 years agoFollow-up to r258227 and document 'enabled' as a boolean instead of
bdrewery [Tue, 19 Nov 2013 15:43:27 +0000 (15:43 +0000)]
Follow-up to r258227 and document 'enabled' as a boolean instead of
a string.

Approved by: bapt
MFC after: 2 days
X-MFC-With: r258227

10 years agoSupport SNI in libfetch
bdrewery [Tue, 19 Nov 2013 15:35:26 +0000 (15:35 +0000)]
Support SNI in libfetch

SNI is Server Name Indentification which is a protocol for TLS that
indicates the host that is being connected to at the start of the
handshake. It allows to use Virtual Hosts on HTTPS.

Submitted by: sbz
Submitted by: Michael Gmelin <freebsd@grem.de> [1]
PR: kern/183583 [1]
Reviewed by: des
Approved by: bapt
MFC after: 1 week

10 years agoOne more BIND remnant: /etc/mtree/BIND.chroot.dist
tijl [Tue, 19 Nov 2013 13:32:24 +0000 (13:32 +0000)]
One more BIND remnant: /etc/mtree/BIND.chroot.dist

Discussed with: des

10 years agoReenable vfs.zfs.zio.use_uma for amd64, disabled at r209261.
mav [Tue, 19 Nov 2013 11:19:07 +0000 (11:19 +0000)]
Reenable vfs.zfs.zio.use_uma for amd64, disabled at r209261.

On machines with seveal CPUs and enough RAM this can easily twice improve
ZFS performance or twice reduce CPU usage.  It was disabled three years
ago due to memory and KVA exhaustion reports, but our VM subsystem got
improved a lot since that time, hopefully enough to make another try.

10 years agoImplement mechanism to safely but slowly purge UMA per-CPU caches.
mav [Tue, 19 Nov 2013 10:51:46 +0000 (10:51 +0000)]
Implement mechanism to safely but slowly purge UMA per-CPU caches.

This is a last resort for very low memory condition in case other measures
to free memory were ineffective.  Sequentially cycle through all CPUs and
extract per-CPU cache buckets into zone cache from where they can be freed.

10 years agoGrow UMA zone bucket size also on lock congestion during item free.
mav [Tue, 19 Nov 2013 10:17:10 +0000 (10:17 +0000)]
Grow UMA zone bucket size also on lock congestion during item free.

Lock congestion is the same, whether it happens on alloc or free, so
handle it equally.  Now that we have back pressure, there is no problem
to grow buckets a bit faster.  Any way growth is much slower then in 9.x.

10 years agoAdd two new UMA bucket zones to store 3 and 9 items per bucket.
mav [Tue, 19 Nov 2013 10:10:44 +0000 (10:10 +0000)]
Add two new UMA bucket zones to store 3 and 9 items per bucket.

These new buckets make bucket size self-tuning more soft and precise.
Without them there are buckets for 1, 5, 13, 29, ... items.  While at
bigger sizes difference about 2x is fine, at smallest ones it is 5x and
2.6x respectively.  New buckets make that line look like 1, 3, 5, 9, 13,
29, reducing jumps between steps, making algorithm work softer, allocating
and freeing memory in better fitting chunks.  Otherwise there is quite a
big gap between allocating 128K and 5x128K of RAM at once.

10 years agoImplement soft pressure on UMA cache bucket sizes.
mav [Tue, 19 Nov 2013 10:05:53 +0000 (10:05 +0000)]
Implement soft pressure on UMA cache bucket sizes.

Every time system detects low memory condition decrease bucket sizes for
each zone by one item.  As result, higher memory pressure will push to
smaller bucket sizes and so smaller per-CPU caches and so more efficient
memory use.

Before this change there was no force to oppose buckets growth as result
of practically inevitable zone lock conflicts, and after some run time
per-CPU caches could consume enough RAM to kill the system.

10 years agoProvide the correct path to bus_autoconf.sh.
markj [Tue, 19 Nov 2013 00:43:53 +0000 (00:43 +0000)]
Provide the correct path to bus_autoconf.sh.

10 years agoRegenerate usb.conf after r258331.
markj [Tue, 19 Nov 2013 00:40:38 +0000 (00:40 +0000)]
Regenerate usb.conf after r258331.

10 years agoImport the axge(4) driver for the ASIX AX88178A and AX88179 USB Ethernet
markj [Tue, 19 Nov 2013 00:37:53 +0000 (00:37 +0000)]
Import the axge(4) driver for the ASIX AX88178A and AX88179 USB Ethernet
adapters. Both devices support Gigabit Ethernet and USB 2.0, and the AX88179
supports USB 3.0. The driver was written by kevlo@ and lwhsu@, with a few
bug fixes from me.

MFC after: 2 months

10 years agoNeed to also test for defined(${v}_${PROG})
sjg [Tue, 19 Nov 2013 00:34:59 +0000 (00:34 +0000)]
Need to also test for defined(${v}_${PROG})

10 years agoBump .Dd for recent change
eadler [Mon, 18 Nov 2013 23:11:42 +0000 (23:11 +0000)]
Bump .Dd for recent change

10 years agoAllow ethernet drivers to pass in packets connected via the nextpkt pointer.
gnn [Mon, 18 Nov 2013 22:58:14 +0000 (22:58 +0000)]
Allow ethernet drivers to pass in packets connected via the nextpkt pointer.
Handling packets in this way allows drivers to amortize work during packet reception.

Submitted by: Vijay Singh
Sponsored by: NetApp

10 years agoIndicate which options are extensions to POSIX.
eadler [Mon, 18 Nov 2013 22:53:24 +0000 (22:53 +0000)]
Indicate which options are extensions to POSIX.

Inspired by: DragonFlyBSD

10 years agogcc: Record some previous commits in the gcc43 ChangeLog.
pfg [Mon, 18 Nov 2013 20:21:44 +0000 (20:21 +0000)]
gcc: Record some previous commits in the gcc43 ChangeLog.

It is useful to update the ChangeLog with upstream references
related to our local r189824 and r255095.

MFC after: 3 weeks

10 years agoSimplify PKG_ABI for pkg-stage.sh.
gjb [Mon, 18 Nov 2013 20:01:52 +0000 (20:01 +0000)]
Simplify PKG_ABI for pkg-stage.sh.

Submitted by: hrs
MFC after: 3 days
X-MFC-With: r258310
Sponsored by: The FreeBSD Foundation

10 years agoRemove WITHOUT_PROFILE=1 for the dvd1.iso medium.
gjb [Mon, 18 Nov 2013 19:57:11 +0000 (19:57 +0000)]
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.

Requested by: hrs
MFC after: 3 days
X-MFC-With: r258310
Sponsored by: The FreeBSD Foundation

10 years agoAlso delete lib32 libiconv.
tijl [Mon, 18 Nov 2013 19:13:38 +0000 (19:13 +0000)]
Also delete lib32 libiconv.

Reported by: Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
MFC after: 3 days

10 years agoDocument the 'dvdrom' target.
gjb [Mon, 18 Nov 2013 18:45:27 +0000 (18:45 +0000)]
Document the 'dvdrom' target.

MFC after: 3 days
X-MFC-With: r258310
Sponsored by: The FreeBSD Foundation

10 years agoBug fixes in iconv(3) UTF-7 support.
tijl [Mon, 18 Nov 2013 18:14:23 +0000 (18:14 +0000)]
Bug fixes in iconv(3) UTF-7 support.

- Add ' to the list of directly encoded characters and * to the list of
  optionally directly encoded characters as per RFC 2152.

- In _citrus_UTF7_mbtoutf16 on end of input when the next output character
  has only been partially decoded, save a copy of the buffer of input
  characters (not just its length).  On the next call with more input
  characters this buffer is reprocessed together with the new input to
  form a fully decoded output character.

- At the end of a base64 encoded sequence fully discard '-' (BASE64_OUT)
  by decrementing psenc->chlen and i.  This is needed to make room in
  psenc->ch (input buffer) in case the next input character starts a new
  base64 encoded sequence.  And also, if this is the end of input and no
  output character can be returned, this brings the encoder in the initial
  state as indicated by _citrus_UTF7_stdenc_get_state_desc_generic which
  is used by the caller to distinguish between no output and partial
  output.

- In _citrus_UTF7_mbrtowc_priv pass the s parameter (input pointer)
  directly to _citrus_UTF7_mbtoutf16 instead of a copy (s0).  This way s
  is updated correctly in case of errors.

- In _citrus_UTF7_mbrtowc_priv when called with psenc->surrogate set
  (previous call did not have enough input), retrieve the previously
  decoded UTF-16 character from (psenc->cache >> psenc->bits) instead of
  (psenc->cache >> 2).

MFC after: 5 days

10 years agoFix how ABI is evaluated so it matches more than a dot-zero
gjb [Mon, 18 Nov 2013 17:52:18 +0000 (17:52 +0000)]
Fix how ABI is evaluated so it matches more than a dot-zero
case.

MFC after: 3 days
X-MFC-With: r258310
Sponsored by: The FreeBSD Foundation

10 years agoopensolaris/uts/common/dtrace/fasttrap.c
asomers [Mon, 18 Nov 2013 16:51:56 +0000 (16:51 +0000)]
opensolaris/uts/common/dtrace/fasttrap.c
Fix several problems that can cause panics on kldload and kldunload.

* kproc_create(fasttrap_pid_cleanup_cb, ...) gets called before
  fasttrap_provs.fth_table gets allocated.  This can lead to a panic
  on module load, because fasttrap_pid_cleanup_cb references
  fasttrap_provs.fth_table.  Move kproc_create down after the point
  that fasttrap_provs.fth_table gets allocated, and modify the error
  handling accordingly.

* dtrace_fasttrap_{fork,exec,exit} weren't getting NULLed until
  after fasttrap_provs.fth_table got freed.  That caused panics on
  module unload because fasttrap_exec_exit calls
  fasttrap_provider_retire, which references
  fasttrap_provs.fth_table.  NULL those function pointers earlier.

* There wasn't any code to destroy the
  fasttrap_{tpoints,provs,procs}.fth_table mutexes on module unload,
  leading to a resource leak when WITNESS is enabled.  Destroy those
  mutexes during fasttrap_unload().

Reviewed by: markj
Approved by: ken (mentor)
Sponsored by: Spectra Logic
MFC after: 4 weeks

10 years agoAdd the 'dvd1.iso' target. This mimics the 'release.iso' target,
gjb [Mon, 18 Nov 2013 16:25:56 +0000 (16:25 +0000)]
Add the 'dvd1.iso' target.  This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.

The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).

Allow dvd1.iso to be skipped if NODVD=1.

MFC after: 3 days
X-MFC-With: r258305, r258307, r258308, r258309
Sponsored by: The FreeBSD Foundation

10 years agoSet the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
gjb [Mon, 18 Nov 2013 16:11:19 +0000 (16:11 +0000)]
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.

MFC after: 3 days
X-MFC-With: r258305, r258307, r258308
Sponsored by: The FreeBSD Foundation

10 years agoUnconditionally copy the build host /etc/resolv.conf into
gjb [Mon, 18 Nov 2013 16:04:04 +0000 (16:04 +0000)]
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.

MFC after: 3 days
X-MFC-With: r258305, r258307
Sponsored by: The FreeBSD Foundation

10 years agoAdd a script and configuration files to fetch pre-built packages
gjb [Mon, 18 Nov 2013 15:22:55 +0000 (15:22 +0000)]
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).

The script sources ${.CURDIR}/${TARGET}/pkg-stage.conf, which sets
several environment variables, such as the pkg(8) ABI, PACKAGESITE,
PKG_DBDIR, and PKG_CACHEDIR.  PKG_CACHEDIR is set to the directory
on the release medium used by bsdconfig(8) (/packages/${ABI}).  ABI
is determined by output of 'make -C /usr/src/release -V REVISION'.
See pkg.conf(5) for descripton on other variables set here.

The list of packages to include are set within the configuration
file.

The script and configuration files are intended to be run by the
'make dvd' target within the release directory, and assume the
release is built within a chroot environment (such as by using
release.sh).

Relevant updates to release/Makefile will follow.

Sponsored by: The FreeBSD Foundation

10 years agoUse the IMAGES variable to determine which image files to remove
gjb [Mon, 18 Nov 2013 15:11:13 +0000 (15:11 +0000)]
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoAdd some sample test programs.
jmmv [Mon, 18 Nov 2013 12:57:46 +0000 (12:57 +0000)]
Add some sample test programs.

This change adds some sample test cases to share/examples/tests/
demonstrating the basic usage of the atf and plain interfaces.

These test programs are fully-functional and are installed as part
of the test suite, which guarantees that the sample code remains
correct.  However, they currently mostly serve as a placeholder for
additional examples and may be incomplete (depending on how you
look at them).  I will see what else can be useful while working on
documentation.

As a bonus, the addition of these tests exercise the *.test.mk files,
one of which (plain.test.mk) was not yet in use, and also demonstrates
that it's possible to mix different kinds of test programs into the
same test suite.

Approved by: rpaulo (mentor)

10 years agoFix the build of plain test programs.
jmmv [Mon, 18 Nov 2013 12:47:35 +0000 (12:47 +0000)]
Fix the build of plain test programs.

SRCS.<prog> must be explicitly defined when using the PROGS* functionality
for each program to be built.

As there are no plain test programs in the system yet, this was not
detected.

Approved by: rpaulo (mentor)

10 years agoRemove registration of C++ test programs into PROGS.
jmmv [Mon, 18 Nov 2013 12:44:05 +0000 (12:44 +0000)]
Remove registration of C++ test programs into PROGS.

C++ programs need to be added to PROGS_CXX, not PROGS, and the code was
actually doing both.  Just keep the registration into PROGS_CXX to
prevent possible obscure build problems.

Approved by: rpaulo (mentor)

10 years agoFix ZFS deadlock when sending a snapshot which is mounted.
smh [Mon, 18 Nov 2013 11:28:19 +0000 (11:28 +0000)]
Fix ZFS deadlock when sending a snapshot which is mounted.

MFC after: 1 week
Sponsored by: Multiplay

10 years agoThe fasttrap ioctl used to create probes takes a variable-sized argument.
markj [Mon, 18 Nov 2013 03:24:50 +0000 (03:24 +0000)]
The fasttrap ioctl used to create probes takes a variable-sized argument.
It was not being correctly copied into the kernel on FreeBSD, and as a
result, probes with multiple probe sites were not being created properly.
To fix this, change the ioctl definition so that the fasttrap ioctl handler
is responsible for copying in userland data.

Submitted by: Prashanth Kumar <pra_udupi@yahoo.co.in>
MFC after: 1 month

10 years agoDrop all ATF tools code.
jmmv [Mon, 18 Nov 2013 01:28:29 +0000 (01:28 +0000)]
Drop all ATF tools code.

We stopped building the tools in r256365 so there is no need to ship
their code any longer.

Approved by: rpaulo (mentor)

10 years agoMFV: Import atf-0.18.
jmmv [Sun, 17 Nov 2013 23:51:19 +0000 (23:51 +0000)]
MFV: Import atf-0.18.

Approved by: rpaulo (mentor)

10 years agoImplement pmap_align_superpage().
alc [Sun, 17 Nov 2013 23:28:10 +0000 (23:28 +0000)]
Implement pmap_align_superpage().

MFC after: 6 weeks

10 years agoUpdate notes for imports of atf.
jmmv [Sun, 17 Nov 2013 23:19:06 +0000 (23:19 +0000)]
Update notes for imports of atf.

This is because the atf vendor branch now includes a verbatim copy of
the distfile sources.  As a result, the list of files to-be-removed from
the contrib/ directory is now more aggressive (and different) and the
upgrade notes now only describe stuff that is specific to the atf import
and is not documented in the Subversion Primer.

Approved by: rpaulo (mentor)

10 years agoFix the build of some ATF tests.
jmmv [Sun, 17 Nov 2013 23:12:55 +0000 (23:12 +0000)]
Fix the build of some ATF tests.

When building various programs from a single Makefile, program-specific
variables are of the form <VAR>.<PROG>, not <VAR>_<PROG>.  Fix this
obvious typo to fix the build when WITH_TESTS=yes.

I am not sure how this ever worked before given that manual inspection
of bsd.progs.mk clearly shows that the expected character between the
two components is a dot and not an underscore... but I suspect the
changes in r258095 exposed this oddity.

Approved by: rpaulo (mentor)

10 years agoBump __FreeBSD_version for iconv changes
peter [Sun, 17 Nov 2013 22:59:06 +0000 (22:59 +0000)]
Bump __FreeBSD_version for iconv changes

10 years agoAttempt to move the POSIX iconv* symbols out of runtime linker space.
peter [Sun, 17 Nov 2013 22:52:17 +0000 (22:52 +0000)]
Attempt to move the POSIX iconv* symbols out of runtime linker space.
FreeBSD systems usually implemented this as a third party module and
our implementation hasn't played as nicely with the old way as it could
have.

To that end:
* Rename the iconv* symbols in libc.so.7 to have a __bsd_ prefix.
* Provide .symver compatability with existing 10.x+ binaries that
  referenced the iconv symbols. All existing binaries should work.
* Like on Linux/glibc systems, add a libc_nonshared.a to the ldscript
  at /usr/lib/libc.so.
* Move the "iconv*" wrapper symbols to libc_nonshared.a

This should solve the runtime ambiguity about which symbols resolve
to where.  If you compile against the iconv in libc, your runtime
dependencies will be unambiguous.

Old 9.x libraries and binaries will always resolve against their
libiconv.so.3 like they did on 9.x.  They won't resolve against libc.

Old 10.x binaries will be satisified by the .symver helpers.

This should allow ports to selectively compile against the libiconv
port if needed and it should behave without ambiguity now.

Discussed with:  kib

10 years agoFix siginfo_t.si_status for wait6/waitid/SIGCHLD.
jilles [Sun, 17 Nov 2013 22:31:23 +0000 (22:31 +0000)]
Fix siginfo_t.si_status for wait6/waitid/SIGCHLD.

Per POSIX, si_status should contain the value passed to exit() for
si_code==CLD_EXITED and the signal number for other si_code. This was
incorrect for CLD_EXITED and CLD_DUMPED.

This is still not fully POSIX-compliant (Austin group issue #594 says that
the full value passed to exit() shall be returned via si_status, not just
the low 8 bits) but is sufficient for a si_status-related test in libnih
(upstart, Debian/kFreeBSD).

PR: kern/184002
Reported by: Dmitrijs Ledkovs
Tested by: Dmitrijs Ledkovs

10 years agoFix creating a vlan over lagg over mlxen crash.
alfred [Sun, 17 Nov 2013 20:58:31 +0000 (20:58 +0000)]
Fix creating a vlan over lagg over mlxen crash.

PR: 181931
Submitted by: Shahar Klein (shahark mellanox.com)

10 years agoAdd a sysctl to allow disabling resetting the OF syscons.
jhibbits [Sun, 17 Nov 2013 20:29:33 +0000 (20:29 +0000)]
Add a sysctl to allow disabling resetting the OF syscons.

On some machines (G5 with lots of RAM), entering OF sometimes causes the
machine to hang.  Once the machine is booted, currently the only entry point
into OF is through resetting the framebuffer on mode switch on these machines.
Disabling this allows the machine to stay up at the expense of less usable
consoles after X is started.

MFC after: Never, this is only a hack

10 years ago#interrupt-cells belongs to the iparent, not the device parent.
nwhitehorn [Sun, 17 Nov 2013 19:50:50 +0000 (19:50 +0000)]
#interrupt-cells belongs to the iparent, not the device parent.