]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoPartially revert 278642
Baptiste Daroussin [Fri, 13 Feb 2015 07:51:26 +0000 (07:51 +0000)]
Partially revert 278642

On reinstall (overwrite) install(1) does not handle chflags

Reported by: ian

9 years agoTeach libproc how to find debugging symbols in /usr/lib/debug.
Rui Paulo [Fri, 13 Feb 2015 03:18:29 +0000 (03:18 +0000)]
Teach libproc how to find debugging symbols in /usr/lib/debug.

MFC after: 1 week

9 years agoFix build without INVARIANTS/INVARIANT_SUPPORT:
Oleksandr Tymoshenko [Fri, 13 Feb 2015 02:10:09 +0000 (02:10 +0000)]
Fix build without INVARIANTS/INVARIANT_SUPPORT:
- Replace "emulation" of return in lmutex_lock_interruptible macros by
    proper static/inline function.

Submitted by: Guy Yur

9 years agoAdd support for decoding multibyte NOPs.
Mark Johnston [Fri, 13 Feb 2015 01:35:53 +0000 (01:35 +0000)]
Add support for decoding multibyte NOPs.

Differential Revision: https://reviews.freebsd.org/D1830
Reviewed by: jhb, kib
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison

9 years agoadd support for specifying an initial buffer size when fetching a
John-Mark Gurney [Fri, 13 Feb 2015 01:20:37 +0000 (01:20 +0000)]
add support for specifying an initial buffer size when fetching a
sysctl... This is useful for kern.arandom which (without -B) will
happily return 0 bytes, which isn't too useful or random...

fix spelling (thanks igor!) of settable while I'm here...

9 years agoCall wait to ensure that background processes have died
Enji Cooper [Fri, 13 Feb 2015 01:07:12 +0000 (01:07 +0000)]
Call wait to ensure that background processes have died

This is being done to establish parity with pgrep-j_test

9 years agoRevert 278634: This broke the build due to the compiler being too clever.
Pedro F. Giffuni [Fri, 13 Feb 2015 00:21:54 +0000 (00:21 +0000)]
Revert 278634: This broke the build due to the compiler being too clever.

Will be back, with proper compiler workarounds.

9 years agoUse PRECIOUSPROG instead of custom code to handle schg
Baptiste Daroussin [Thu, 12 Feb 2015 23:08:27 +0000 (23:08 +0000)]
Use PRECIOUSPROG instead of custom code to handle schg

This allows to preserve schg when installed with -DNO_ROOT

MFC after: 1 week

9 years agoSilence a warning.
George V. Neville-Neil [Thu, 12 Feb 2015 23:00:31 +0000 (23:00 +0000)]
Silence a warning.

9 years agoRevise default limit for maximum of netgraph data items.
Gleb Smirnoff [Thu, 12 Feb 2015 22:20:34 +0000 (22:20 +0000)]
Revise default limit for maximum of netgraph data items.
With modern internet speeds the limit can be reached even
on a single L2TP link.

9 years agoParameterize out the amount of sleep done in each test
Enji Cooper [Thu, 12 Feb 2015 21:10:32 +0000 (21:10 +0000)]
Parameterize out the amount of sleep done in each test

Set the value in each test to a different amount to avoid potential
side-effects with other instances of the test (or lingering processes) still
being present on the system

9 years agoulimit(3): Fix broken check.
Pedro F. Giffuni [Thu, 12 Feb 2015 21:07:42 +0000 (21:07 +0000)]
ulimit(3): Fix broken check.

The existing implementation had a broken comparison that could overflow.
Replace this with a check that avoids the overflow before it happens.

Consistently return a maximum value also on the case of negative
arguments since negative is considered an overflow and means
infinity for our current setrlimit().

Discussed with: bde (rather extensively)

CID: 1199295
MFC after: 1 week

9 years agoRefactor the tests
Enji Cooper [Thu, 12 Feb 2015 20:57:57 +0000 (20:57 +0000)]
Refactor the tests

1. `id -u` -> 0 is now only checked once; the entire test script is now skipped
   if this assertion is violated
2. De-dent whitespace, based on 1.
3. Only setup the symlink for $sleep once at the top of the script, and tear it
   down once at the bottom of the script

9 years agoUpdate libthr(3) man page to reflect the work done to support dlopen.
Konstantin Belousov [Thu, 12 Feb 2015 17:16:54 +0000 (17:16 +0000)]
Update libthr(3) man page to reflect the work done to support dlopen.

Noted and reviewed by: bdrewery
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoMake XCOPY and WUT commands respect physical block size/offset.
Alexander Motin [Thu, 12 Feb 2015 15:46:44 +0000 (15:46 +0000)]
Make XCOPY and WUT commands respect physical block size/offset.

This change by 2-3 times improves performance of misaligned XCOPY and WUT
commands by avoiding unneeded read-modify-write cycles inside ZFS.

MFC after: 1 week

9 years agoThis fixes a bug I in-advertantly inserted when I updated the callout
Randall Stewart [Thu, 12 Feb 2015 13:31:08 +0000 (13:31 +0000)]
This fixes a bug I in-advertantly inserted when I updated the callout
code in my last commit. The cc_exec_next is used to track the next
when a direct call is being made from callout. It is *never* used
in the in-direct method. When macro-izing I made it so that it
would separate out direct/vs/non-direct. This is incorrect and can
cause panics as Peter Holm has found for me (Thanks so much Peter for
all your help in this). What this change does is restore that behavior
but also get rid of the cc_next from the array and instead make it
be part of the base callout structure. This way no one else will get
confused since we will never use it for non-direct.

Reviewed by: Peter Holm and more importantly tested by him ;-)
MFC after: 3 days.
Sponsored by: Netflix Inc.

9 years agoRemove unused code.
Edward Tomasz Napierala [Thu, 12 Feb 2015 11:57:31 +0000 (11:57 +0000)]
Remove unused code.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoFix man page to match real option names.
Alexander Motin [Thu, 12 Feb 2015 11:27:54 +0000 (11:27 +0000)]
Fix man page to match real option names.

MFC after: 3 days

9 years agoMake WRITE SAME commands respect physical block size.
Alexander Motin [Thu, 12 Feb 2015 10:28:45 +0000 (10:28 +0000)]
Make WRITE SAME commands respect physical block size.

This change by 2-3 times improves performance of misaligned WRITE SAME
commands by avoiding unneeded read-modify-write cycles inside ZFS.

MFC after: 1 week

9 years agoAdd debugging output to help track down the recent Jenkins failures
Enji Cooper [Thu, 12 Feb 2015 07:22:46 +0000 (07:22 +0000)]
Add debugging output to help track down the recent Jenkins failures

9 years agoStep 1 of eliminating the "games" distribution: Move binaries to /usr/bin;
Colin Percival [Thu, 12 Feb 2015 05:35:00 +0000 (05:35 +0000)]
Step 1 of eliminating the "games" distribution: Move binaries to /usr/bin;
update paths; and include everything in the "base" distribution.

The "games" distribution being optional made sense when there were more
games and we had small disks; but the "games-like" games were moved into
the ports tree a dozen years ago and the remaining "utility-like" games
occupy less than 0.001% of my laptop's small hard drive.  Meanwhile every
new user is confronted by the question "do you want games installed" when
they they try to install FreeBSD.

The next steps will be:

2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and
caesar cipher (caesar, rot13) utilities.  I intend to keep fortune, factor,
morse, number, primes, and random, since there is evidence that those are
still being used.

3. Merging src/games into src/usr.bin.

This change will not be MFCed.

Reviewed by: jmg
Discussed at: EuroBSDCon
Approved by: gjb (release-affecting changes)

9 years ago- Perform bus_dmamap_sync on pagelist structure
Oleksandr Tymoshenko [Thu, 12 Feb 2015 04:31:17 +0000 (04:31 +0000)]
- Perform bus_dmamap_sync on pagelist structure
- Wire pages of bulk transfer buffer when preparing pagelist

9 years agolibdwarf: Handle .rel relocations
Ed Maste [Thu, 12 Feb 2015 02:08:44 +0000 (02:08 +0000)]
libdwarf: Handle .rel relocations

Some architectures use .rel relocations (for debug data), so they must
be handled.

This was discovered from ctfconvert on ARM object files.  The lack of
relocation handling caused all string lookups to return the string at
offset 0 in .debug_str, typically "FreeBSD clang version ..."

Reviewed by: gnn, imp, rpaulo (earlier version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1819

9 years agoReduce number of lines to set ORGANIZATION_NAME in
Glen Barber [Thu, 12 Feb 2015 00:17:14 +0000 (00:17 +0000)]
Reduce number of lines to set ORGANIZATION_NAME in
freebsd-organization.h.

Patched by: ian
PR: 197540
MFC after: 3 days
X-MFC-with: r278603
Sponsored by: The FreeBSD Foundation

9 years agoRegisters definitions for the new capabilities from the version 2.4 of
Konstantin Belousov [Wed, 11 Feb 2015 23:30:46 +0000 (23:30 +0000)]
Registers definitions for the new capabilities from the version 2.4 of
VT-d specification.  Also add definitions for the interrupt remapping
table and IEC.

Print new capabilities on boot. although there is no hardware which
support it.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agovm_page_lookup() accepts read-locked object.
Konstantin Belousov [Wed, 11 Feb 2015 23:28:28 +0000 (23:28 +0000)]
vm_page_lookup() accepts read-locked object.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoEnsure ORGANIZATION_NAME is quoted when ORGANIZATION
Glen Barber [Wed, 11 Feb 2015 22:59:24 +0000 (22:59 +0000)]
Ensure ORGANIZATION_NAME is quoted when ORGANIZATION
could contain strings of two or more words.

Reviewed by: peter
Reported by: karl@denninger.net
PR: 197540
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoCorrect and clarify comment for __SMBF.
Bryan Drewery [Wed, 11 Feb 2015 22:39:13 +0000 (22:39 +0000)]
Correct and clarify comment for __SMBF.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoDo not dereference NULL clearing UA that was not set in r277917.
Alexander Motin [Wed, 11 Feb 2015 22:03:23 +0000 (22:03 +0000)]
Do not dereference NULL clearing UA that was not set in r277917.

MFC after: 3 days

9 years agoAdd missing asprintf() status checks.
Alexander Motin [Wed, 11 Feb 2015 19:57:38 +0000 (19:57 +0000)]
Add missing asprintf() status checks.

MFC after: 2 weeks

9 years agolibdwarf: Add symbol value when processing .rela relocations
Ed Maste [Wed, 11 Feb 2015 19:53:44 +0000 (19:53 +0000)]
libdwarf: Add symbol value when processing .rela relocations

Reviewed by: kib, rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1826

9 years agoRemove check against NULL after M_WAITOK.
Rui Paulo [Wed, 11 Feb 2015 19:07:05 +0000 (19:07 +0000)]
Remove check against NULL after M_WAITOK.

Submitted by: Oliver Pinter

9 years agoClose the file list before opening the container that holds the
Marcel Moolenaar [Wed, 11 Feb 2015 17:56:24 +0000 (17:56 +0000)]
Close the file list before opening the container that holds the
totals, otherwise we end up emitting invalid JSON -- provided
libxo does not prevent us from doing that.

PR: 197499
Submitted by: allanjude@

9 years agoflowctl: Replace alloca() with an array.
Pedro F. Giffuni [Wed, 11 Feb 2015 17:46:35 +0000 (17:46 +0000)]
flowctl: Replace alloca() with an array.

Reviewed by: glebius

9 years agoClean up machine dependent code for DTrace on ARM.
George V. Neville-Neil [Wed, 11 Feb 2015 17:27:37 +0000 (17:27 +0000)]
Clean up machine dependent code for DTrace on ARM.

Submitted by: markj

9 years agoFix ldscripts such that ld(1) collects the .fini_array section in the same
Tijl Coosemans [Wed, 11 Feb 2015 17:25:23 +0000 (17:25 +0000)]
Fix ldscripts such that ld(1) collects the .fini_array section in the same
order as the .init_array section.  Finalisation routines need to be called
in the opposite order as their corresponding initialisation routines but
rtld(1) handles that by calling the function pointers in .fini_array in
reverse order.

Reviewed by: kib
MFC after: 2 weeks

9 years agoFix formatting.
Edward Tomasz Napierala [Wed, 11 Feb 2015 17:00:32 +0000 (17:00 +0000)]
Fix formatting.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd support for General Statistics and Performance log page.
Alexander Motin [Wed, 11 Feb 2015 16:10:31 +0000 (16:10 +0000)]
Add support for General Statistics and Performance log page.

CTL already collects most of statistics reported there, so why not.

MFC after: 2 weeks

9 years agoMFi386:
John Baldwin [Wed, 11 Feb 2015 15:49:14 +0000 (15:49 +0000)]
MFi386:
When building some of the boot loaders with clang, and DEBUG_FLAGS or
CFLAGS having '-g' in it, clang outputs several assembly directives that
are too new for our version of binutils.

Therefore, assemble the resulting .s files with clang instead.  A more
general solution can be implemented when a GNU as-compatible driver for
clang's integrated assembler appears.

Tested by: gjb

9 years agolibdwarf: Add aarch64 relocation support
Ed Maste [Wed, 11 Feb 2015 14:59:35 +0000 (14:59 +0000)]
libdwarf: Add aarch64 relocation support

Reviewed by: andrew, rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1817

9 years agoSummary: Update CPU identification call to recent version.
George V. Neville-Neil [Wed, 11 Feb 2015 12:08:40 +0000 (12:08 +0000)]
Summary: Update CPU identification call to recent version.

9 years agoRemove the non-EABI code from the DDB stack unwinder, we only support the
Andrew Turner [Wed, 11 Feb 2015 10:40:49 +0000 (10:40 +0000)]
Remove the non-EABI code from the DDB stack unwinder, we only support the
ARM EABI now.

9 years agoThe cpu_id macro was renamed in r278529, catch up with this new name.
Andrew Turner [Wed, 11 Feb 2015 10:37:55 +0000 (10:37 +0000)]
The cpu_id macro was renamed in r278529, catch up with this new name.

9 years agoRemove remnant from texinfo
Baptiste Daroussin [Wed, 11 Feb 2015 08:26:36 +0000 (08:26 +0000)]
Remove remnant from texinfo

9 years agoDocument caveat with specifying WITHOUT_VI at build/install time when building
Enji Cooper [Wed, 11 Feb 2015 07:49:00 +0000 (07:49 +0000)]
Document caveat with specifying WITHOUT_VI at build/install time when building
older releases of FreeBSD

9 years agoadd an assert in case the sizeof int ever becomes bigger.. Then we will
John-Mark Gurney [Wed, 11 Feb 2015 07:44:53 +0000 (07:44 +0000)]
add an assert in case the sizeof int ever becomes bigger.. Then we will
have issues, at least we'll know where one of them are..

Submitted by: Erich Dollansky

9 years agoAdd preliminary support for the Ralink RT5390 and RT5392 chipsets.
Kevin Lo [Wed, 11 Feb 2015 05:25:23 +0000 (05:25 +0000)]
Add preliminary support for the Ralink RT5390 and RT5392 chipsets.
Committed over the D-Link DWA-525 rev A2 on amd64 with WPA.

9 years agoRestore the data array in coredump(), but use a different style to
Rui Paulo [Wed, 11 Feb 2015 00:58:15 +0000 (00:58 +0000)]
Restore the data array in coredump(), but use a different style to
calculate the length.

Requested by: kib

9 years agofetch has supported https for a while..
John-Mark Gurney [Tue, 10 Feb 2015 23:18:36 +0000 (23:18 +0000)]
fetch has supported https for a while..

I would convert the url to https, but we still don't install a CA set
by default...  we even don't install the CA that authenticates
www.FreeBSD.org..

9 years agoAdd xo_finish() to w.c in case it's invoked as uptime
Michael Gmelin [Tue, 10 Feb 2015 22:23:52 +0000 (22:23 +0000)]
Add xo_finish() to w.c in case it's invoked as uptime

Reviewed by: marcel
Approved by: marcel
Differential Revision: https://reviews.freebsd.org/D1821

9 years agoFix compilation with GCC in the PAE case.
Marius Strobl [Tue, 10 Feb 2015 21:33:32 +0000 (21:33 +0000)]
Fix compilation with GCC in the PAE case.

MFC after: 3 days

9 years agoWhen catopen(3) returns an error, it caches the result of that error
Bryan Drewery [Tue, 10 Feb 2015 20:45:40 +0000 (20:45 +0000)]
When catopen(3) returns an error, it caches the result of that error
from r202992. The refcount on the cache entry is not initialized, so
any attempt to clean the cache will skip over this item since it likely
has a >0 value.

This change is currently a NOP. There is work in progress to support
freeing the cache which requires this change to avoid a memory leak.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoInitial version of DTrace on ARM32.
George V. Neville-Neil [Tue, 10 Feb 2015 19:41:30 +0000 (19:41 +0000)]
Initial version of DTrace on ARM32.

Submitted by: Howard Su based on work by Oleksandr Tymoshenko
Reviewed by: ian, andrew, rpaulo, markj

9 years agoFix a rendering issue in the nullfs(5) manual page.
Glen Barber [Tue, 10 Feb 2015 18:49:13 +0000 (18:49 +0000)]
Fix a rendering issue in the nullfs(5) manual page.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoRemove a printf and an strlen() from the coredump code.
Rui Paulo [Tue, 10 Feb 2015 18:35:46 +0000 (18:35 +0000)]
Remove a printf and an strlen() from the coredump code.

9 years agoUpdate UPDATING after changing autofs(4) ABI.
Edward Tomasz Napierala [Tue, 10 Feb 2015 18:05:58 +0000 (18:05 +0000)]
Update UPDATING after changing autofs(4) ABI.

Suggested by: bdrewery@
Sponsored by: The FreeBSD Foundation

9 years agoMountd iterating over the mount points may race with the parallel
Konstantin Belousov [Tue, 10 Feb 2015 18:00:32 +0000 (18:00 +0000)]
Mountd iterating over the mount points may race with the parallel
unmount, which causes error from nmount(2) call when performing
MNT_DELEXPORT over the directory which ceased to be a mount point.

The race is legitimate and innocent, but results in the chatty mountd.
Silence it by providing an distinguished error code for the situation,
and ignoring the error in mountd loop.

Based on the patch by: Andreas Longwitz <longwitz@incore.de>
Prodded and tested by: bdrewery
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoRestore ABI compatibility, broken in r273127. Note that while this fixes
Edward Tomasz Napierala [Tue, 10 Feb 2015 16:17:16 +0000 (16:17 +0000)]
Restore ABI compatibility, broken in r273127.  Note that while this fixes
ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8)
is neccessary.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoProperly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they
Warner Losh [Tue, 10 Feb 2015 15:15:08 +0000 (15:15 +0000)]
Properly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they
are passed down properly when there's more than one.

9 years agoResolve cache line size from CP15
Zbigniew Bodek [Tue, 10 Feb 2015 14:11:23 +0000 (14:11 +0000)]
Resolve cache line size from CP15

Switch the cache line size during invalidations/flushes
to be read from CP15 cache type register.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   ian, imp
Obtained from: Semihalf

9 years agorc.d: load the network config file for netif
Roger Pau Monné [Tue, 10 Feb 2015 13:07:08 +0000 (13:07 +0000)]
rc.d: load the network config file for netif

r272959 broke compatibility with mfsBSD that stores the default network
config file in /etc/rc.conf.d/network. In order to fix that load the network
config file from netif also.

9 years agoBump copyright, forgotten in r278502.
Glen Barber [Tue, 10 Feb 2015 12:38:39 +0000 (12:38 +0000)]
Bump copyright, forgotten in r278502.

MFC after: 1 week
X-MFC-with: r277458, r277536, r277606, r277609,
r277836, r278118, r278119, r278206,
r278502
Sponsored by: The FreeBSD Foundation

9 years agoRevert r274918 and make a better solution. Poll the synchronisation
Hans Petter Selasky [Tue, 10 Feb 2015 12:08:52 +0000 (12:08 +0000)]
Revert r274918 and make a better solution. Poll the synchronisation
endpoint less frequently to make the sample rate adjustment more
accurate. This should resolve problems with the DN32-USB module for
Midas audio systems and possibly other similar products from Klark
Teknik.

MFC after: 3 days

9 years agoIn scripts/mk-vmimage.sh, prevent incorrect usage() by
Glen Barber [Tue, 10 Feb 2015 12:04:38 +0000 (12:04 +0000)]
In scripts/mk-vmimage.sh, prevent incorrect usage() by
defaulting VMCONFIG to /dev/null, and additionally
ensuring VMCONFIG is not a character device before it
is sourced.

While here, be sure to exit if usage() is called.

This should effectively be no-op, but the usage() output
was discovered while investigating a larger issue.

MFC after: 1 week
X-MFC-with: r277458, r277536, r277606, r277609,
r277836, r278118, r278119, r278206
Sponsored by: The FreeBSD Foundation

9 years agoDo not abort already aborted tasks.
Alexander Motin [Tue, 10 Feb 2015 11:37:32 +0000 (11:37 +0000)]
Do not abort already aborted tasks.

This fixes abort of new tasks with the same tags as previously aborted,
but still remaining on the queue.

MFC after: 1 week

9 years agoRemove FreeBSD/wii.
Rui Paulo [Tue, 10 Feb 2015 06:35:16 +0000 (06:35 +0000)]
Remove FreeBSD/wii.

This port failed to gain traction and probably only a couple Wii consoles
ran FreeBSD all the way to single user mode with an md(4). IPC
support was never implemented, so it was impossible to use any peripheral

Any further development, if any, will happen at https://github.com/rpaulo/wii.

Discussed with: nathanw (a long time ago), jhibbits

9 years agoSanitise the coredump file names sent to devd.
Rui Paulo [Tue, 10 Feb 2015 04:34:39 +0000 (04:34 +0000)]
Sanitise the coredump file names sent to devd.

While there, add a sysctl to turn this feature off as requested by
kib@.

9 years agoUpdate copyrights.
Devin Teske [Tue, 10 Feb 2015 03:34:42 +0000 (03:34 +0000)]
Update copyrights.

9 years agoAdd "vt_"* aliases to bsdconfig console entries.
Devin Teske [Tue, 10 Feb 2015 03:17:51 +0000 (03:17 +0000)]
Add "vt_"* aliases to bsdconfig console entries.
NB: "syscons_"* kept for backward compatibility

9 years agoAdd bsdconfig api function f_dialog_menutag2help()
Devin Teske [Tue, 10 Feb 2015 03:15:54 +0000 (03:15 +0000)]
Add bsdconfig api function f_dialog_menutag2help()

9 years agoAdd bsdconfig api functions f_dialog_pause()/f_dialog_pause_no_cancel()
Devin Teske [Tue, 10 Feb 2015 03:12:11 +0000 (03:12 +0000)]
Add bsdconfig api functions f_dialog_pause()/f_dialog_pause_no_cancel()

9 years agoEliminate sub-shells where possible for performance.
Devin Teske [Tue, 10 Feb 2015 02:55:10 +0000 (02:55 +0000)]
Eliminate sub-shells where possible for performance.

MFC after: 7 days

9 years agoWhitespace.
Devin Teske [Tue, 10 Feb 2015 02:53:26 +0000 (02:53 +0000)]
Whitespace.

MFC after: 3 days

9 years agoExclude 'tests' from DEBUG_DISTRIBUTIONS.
Glen Barber [Tue, 10 Feb 2015 01:35:26 +0000 (01:35 +0000)]
Exclude 'tests' from DEBUG_DISTRIBUTIONS.

Sponsored by: The FreeBSD Foundation

9 years agocxgbe(4): allow the SET_FILTER_MODE ioctl to change the mode when it's
Navdeep Parhar [Tue, 10 Feb 2015 01:16:43 +0000 (01:16 +0000)]
cxgbe(4): allow the SET_FILTER_MODE ioctl to change the mode when it's
safe to do so.

MFC after: 1 month

9 years agoComments.
Devin Teske [Tue, 10 Feb 2015 01:02:02 +0000 (01:02 +0000)]
Comments.

MFC after: 3 days

9 years agoAdd error reporting to interrupt CPU binding.
Nathan Whitehorn [Tue, 10 Feb 2015 00:57:26 +0000 (00:57 +0000)]
Add error reporting to interrupt CPU binding.

9 years agoSet thread priorities on multithreaded CPUs so that threads holding a
Nathan Whitehorn [Tue, 10 Feb 2015 00:55:42 +0000 (00:55 +0000)]
Set thread priorities on multithreaded CPUs so that threads holding a
spinlock are high-priority and threads waiting for a spinlock are set to
low priority.

9 years agoUn-revert the r278323 again - whatever Jenkins/kyua is up it, it has
Jamie Gritton [Tue, 10 Feb 2015 00:48:51 +0000 (00:48 +0000)]
Un-revert the r278323 again - whatever Jenkins/kyua is up it, it has
nothing to do with this.

9 years agoNotify devd(8) when a process crashed.
Rui Paulo [Mon, 9 Feb 2015 23:13:50 +0000 (23:13 +0000)]
Notify devd(8) when a process crashed.

This change implements a notification (via devctl) to userland when
the kernel produces coredumps after a process has crashed.
devd can then run a specific command to produce a human readable crash
report.  The command is most usually a helper that runs gdb/lldb
commands on the file/coredump pair.  It's possible to use this
functionality for implementing automatic generation of crash reports.

devd(8) will be notified of the full path of the binary that crashed and
the full path of the coredump file.

9 years agoAdd the ability to print a vendor copyright in dmesg.
Rui Paulo [Mon, 9 Feb 2015 23:04:30 +0000 (23:04 +0000)]
Add the ability to print a vendor copyright in dmesg.

9 years agoFix DMA address casts. Regression issue after r278279.
Hans Petter Selasky [Mon, 9 Feb 2015 21:47:12 +0000 (21:47 +0000)]
Fix DMA address casts. Regression issue after r278279.

MFC after: 3 days

9 years agoUse __builtin_popcountl() instead of __builtin_popcount().
John Baldwin [Mon, 9 Feb 2015 21:39:18 +0000 (21:39 +0000)]
Use __builtin_popcountl() instead of __builtin_popcount().

Submitted by: jkim

9 years agoAdd tests for `pw usernext'.
Brad Davis [Mon, 9 Feb 2015 21:15:52 +0000 (21:15 +0000)]
Add tests for `pw usernext'.

PR: 197120
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Approved by: will

9 years agoUse __builtin_popcnt() to implement a BIT_COUNT() operation for bitsets and
John Baldwin [Mon, 9 Feb 2015 21:03:23 +0000 (21:03 +0000)]
Use __builtin_popcnt() to implement a BIT_COUNT() operation for bitsets and
use this to implement CPU_COUNT() to count the number of CPUs in a cpuset.

MFC after: 2 weeks

9 years agoAdd x2APIC support. Enable it by default if CPU is capable. The
Konstantin Belousov [Mon, 9 Feb 2015 21:00:56 +0000 (21:00 +0000)]
Add x2APIC support.  Enable it by default if CPU is capable.  The
hw.x2apic_enable tunable allows disabling it from the loader prompt.

To closely repeat effects of the uncached memory ops when accessing
registers in the xAPIC mode, the x2APIC writes to MSRs are preceeded
by mfence, except for the EOI notifications.  This is probably too
strict, only ICR writes to send IPI require serialization to ensure
that other CPUs see the previous actions when IPI is delivered.  This
may be changed later.

In vmm justreturn IPI handler, call doreti_iret instead of doing iretd
inline, to handle corner conditions.

Note that the patch only switches LAPICs into x2APIC mode. It does not
enables FreeBSD to support > 255 CPUs, which requires parsing x2APIC
MADT entries and doing interrupts remapping, but is the required step
on the way.

Reviewed by: neel
Tested by: pho (real hardware), neel (on bhyve)
Discussed with: jhb, grehan
Sponsored by: The FreeBSD Foundation
MFC after: 2 months

9 years agoThis fixes a bug in the way that the LLE timers for nd6
Randall Stewart [Mon, 9 Feb 2015 19:28:11 +0000 (19:28 +0000)]
This fixes a bug in the way that the LLE timers for nd6
and arp were being used. They basically would pass in the
mutex to the callout_init. Because they used this method
to the callout system, it was possible to "stop" the callout.
When flushing the table and you stopped the running callout, the
callout_stop code would return 1 indicating that it was going
to stop the callout (that was about to run on the callout_wheel blocked
by the function calling the stop). Now when 1 was returned, it would
lower the reference count one extra time for the stopped timer, then
a few lines later delete the memory. Of course the callout_wheel was
stuck in the lock code and would then crash since it was accessing
freed memory. By using callout_init(c, 1) we always get a 0 back
and the reference counting bug does not rear its head. We do have
to make a few adjustments to the callouts themselves though to make
sure it does the proper thing if rescheduled as well as gets the lock.

Commented upon by hiren and sbruno
See Phabricator D1777 for more details.

Commented upon by hiren and sbruno
Reviewed by: adrian, jhb and bz
Sponsored by: Netflix Inc.

9 years agoDistribute interrupts across multiple CPUs in SMP configurations instead of sending...
Nathan Whitehorn [Mon, 9 Feb 2015 19:21:54 +0000 (19:21 +0000)]
Distribute interrupts across multiple CPUs in SMP configurations instead of sending them
all to CPU 0.

9 years agoAdd new alias "bsdconfig api" (same as "bsdconfig includes")
Devin Teske [Mon, 9 Feb 2015 19:20:59 +0000 (19:20 +0000)]
Add new alias "bsdconfig api" (same as "bsdconfig includes")
NB: My fingers like typing "api" a lot more than "includes"

MFC after: 3 days

9 years agoThis fixes two conditions that can incur when migration
Randall Stewart [Mon, 9 Feb 2015 19:19:44 +0000 (19:19 +0000)]
This fixes two conditions that can incur when migration
is being done in the callout code and harmonizes the macro
use.:
1) The callout_active() will lie. Basically if a migration
   is occuring and the callout is about to expire and the
   migration has been deferred, the callout_active will no
   longer return true until after the migration. This confuses
   and breaks callers that are doing callout_init(&c, 1); such
   as TCP.
2) The migration code had a bug in it where when migrating, if
   a two calls to callout_reset came in and they both collided with
   the callout on the wheel about to run, then the second call to
   callout_reset would corrupt the list the callout wheel uses
   putting the callout thread into a endless loop.
3) Per imp, I have fixed all the macro occurance in the code that
   were for the most part being ignored.

Phabricator D1711 and looked at by lstewart and jhb and sbruno.
Reviewed by: kostikbel, imp, adrian, hselasky
MFC after: 3 days
Sponsored by: Netflix Inc.

9 years agoAdd a few more instructions to xz/FREEBSD-upgrade.
Rui Paulo [Mon, 9 Feb 2015 19:19:13 +0000 (19:19 +0000)]
Add a few more instructions to xz/FREEBSD-upgrade.

9 years agoReplace the only instance of sed(1) in bsdconfig(8) with awk(1).
Devin Teske [Mon, 9 Feb 2015 19:16:19 +0000 (19:16 +0000)]
Replace the only instance of sed(1) in bsdconfig(8) with awk(1).

MFC after: 3 days

9 years agoRemove explicit routing/sendmail rc.d inclusion in FILES
Enji Cooper [Mon, 9 Feb 2015 17:53:16 +0000 (17:53 +0000)]
Remove explicit routing/sendmail rc.d inclusion in FILES

Reported by: Guy Yur <guyyur@gmail.com>
MFC after: 14 days
X-MFC with: r278249
Sponsored by: EMC / Isilon Storage Division

9 years agoRevert SVN r278464 -- fingers were in perforce mode (premature
Devin Teske [Mon, 9 Feb 2015 17:22:54 +0000 (17:22 +0000)]
Revert SVN r278464 -- fingers were in perforce mode (premature
commit of future stuffs not yet ready).

9 years agoReplace the only instance of sed(1) in bsdconfig(8) with awk(1).
Devin Teske [Mon, 9 Feb 2015 17:18:10 +0000 (17:18 +0000)]
Replace the only instance of sed(1) in bsdconfig(8) with awk(1).

MFC after: 3 days

9 years agoPrefer install over mkdir to create the directory. Add test to ensure
Warner Losh [Mon, 9 Feb 2015 16:29:44 +0000 (16:29 +0000)]
Prefer install over mkdir to create the directory. Add test to ensure
the directory doesn't exist before creating it. This makes the NO_ROOT
case actually work.

Suggested by: brooks@

9 years agoMove these definitions to bsd.own.mk along side the kernel directory /
Warner Losh [Mon, 9 Feb 2015 16:21:49 +0000 (16:21 +0000)]
Move these definitions to bsd.own.mk along side the kernel directory /
user defines. Make this work with WITH_INSTALL_AS_USER as well.

Noticed by: ian@

9 years agoFix typo.
Warner Losh [Mon, 9 Feb 2015 16:10:30 +0000 (16:10 +0000)]
Fix typo.

Submitted by: jhb@

9 years agoWe need to create /boot/dtb since some use cases don't create a full
Warner Losh [Mon, 9 Feb 2015 16:04:08 +0000 (16:04 +0000)]
We need to create /boot/dtb since some use cases don't create a full
root with BSD.root.mtree, so it often times will not exist. Rather
than force the latter for an installkernel, just create the directory
with a comment about why.

Submitted by: Guy Yur

9 years agoMake sure that we define DTB{OWN,GRP,MODE} so install works.
Warner Losh [Mon, 9 Feb 2015 16:04:01 +0000 (16:04 +0000)]
Make sure that we define DTB{OWN,GRP,MODE} so install works.

Submitted by: Guy Yur