]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoThe number of commands added when ddb(4) is enabled is 3, not 2
ngie [Tue, 24 Mar 2015 22:39:49 +0000 (22:39 +0000)]
The number of commands added when ddb(4) is enabled is 3, not 2

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove some #if 0'ed code that apparently confuses cscope.
ken [Tue, 24 Mar 2015 21:42:28 +0000 (21:42 +0000)]
Remove some #if 0'ed code that apparently confuses cscope.

Requested by: Peter Xu <xzpeter@gmail.com>
MFC after: 3 days

9 years agoFix two bugs which resulted in a screwed up end point list:
tuexen [Tue, 24 Mar 2015 21:12:45 +0000 (21:12 +0000)]
Fix two bugs which resulted in a screwed up end point list:
* Use a save way to walk throught a list while manipulting it.
* Have to appropiate locks in place.
Joint work with rrs@

MFC after: 3 days

9 years agoIntroduce nonnull attributes in the signal and pthread headers.
pfg [Tue, 24 Mar 2015 20:33:24 +0000 (20:33 +0000)]
Introduce nonnull attributes in the signal and pthread headers.

The `nonnull' attribute specifies that some function parameters should be
non-null pointers.  This is very useful as it helps the compiler generate
warnings on suspicious code and can also enable some small optimizations.
In clang this is also useful for the static analyzer.

While we could go on defining this all over the tree, it only
makes sense to annotate a subset of critical functions.

Hinted by: Android's bionic libc
Differential Revision: https://reviews.freebsd.org/D2101

9 years agoUse TUNABLE_INT_FETCH for boot_pages.
rpaulo [Tue, 24 Mar 2015 20:09:55 +0000 (20:09 +0000)]
Use TUNABLE_INT_FETCH for boot_pages.

vm.boot_pages is marked as a CTLFLAG_RDTUN, but it's used by the VM
before the sysctl subsystem is initialsed.  We manually fetch the
variable from the environment to work around this problem.

Tested by: Keith White kwhite at uottawa.ca
MFC after: 1 week

9 years agoRemove whitespace.
rpaulo [Tue, 24 Mar 2015 20:07:27 +0000 (20:07 +0000)]
Remove whitespace.

9 years agoMove including std.bcm2835 to the RPI-B kernel config. The std.rpi file
andrew [Tue, 24 Mar 2015 19:01:42 +0000 (19:01 +0000)]
Move including std.bcm2835 to the RPI-B kernel config. The std.rpi file
will be shared between the existing Raspberry Pi config, and the new
Raspberry Pi 2 config.

MFC after: 1 week

9 years agoAdd the SOC_BCM2835 and SOC_BCM2836 options for the arm kernel and add the
andrew [Tue, 24 Mar 2015 18:46:01 +0000 (18:46 +0000)]
Add the SOC_BCM2835 and SOC_BCM2836 options for the arm kernel and add the
former to std.bcm2835. These will be used to enable support for the
Raspberry Pi 2.

MFC after: 1 week

9 years agoRemove from legacy ata(4) driver support for hardware, supported by newer
mav [Tue, 24 Mar 2015 18:09:07 +0000 (18:09 +0000)]
Remove from legacy ata(4) driver support for hardware, supported by newer
and more functional drivers ahci(4), siis(4) and mvs(4).

This removes about 3400 lines of code, unused since FreeBSD 9.0 release.

9 years agoMake sure tunable sysctls are only fetched once. The existing code can
hselasky [Tue, 24 Mar 2015 17:42:53 +0000 (17:42 +0000)]
Make sure tunable sysctls are only fetched once. The existing code can
re-register sysctls when destroying sysctl contexts or when moving
sysctls from one tree to another.

9 years agoWhen fetching an instruction in non-64bit mode, consider the value of the
tychon [Tue, 24 Mar 2015 17:12:36 +0000 (17:12 +0000)]
When fetching an instruction in non-64bit mode, consider the value of the
code segment base address.

Also if an instruction doesn't support a mod R/M (modRM) byte, don't
be concerned if the CPU is in real mode.

Reviewed by: neel

9 years agoDo not include if_var.h and in6_var.h into kern_jail.c. It is now possible
glebius [Tue, 24 Mar 2015 16:46:40 +0000 (16:46 +0000)]
Do not include if_var.h and in6_var.h into kern_jail.c. It is now possible
after r280444.

Sponsored by: Nginx, Inc.

9 years agoMove ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple
glebius [Tue, 24 Mar 2015 16:45:50 +0000 (16:45 +0000)]
Move ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple
function that works with in6_addr and it is not related to the INET6
stack implementation.

Sponsored by: Nginx, Inc.

9 years agoCorrect string pointer offset for error printout.
hselasky [Tue, 24 Mar 2015 16:37:19 +0000 (16:37 +0000)]
Correct string pointer offset for error printout.

9 years agoMake all PCM core sysctls tunable and remove redundant TUNABLE()
hselasky [Tue, 24 Mar 2015 16:31:22 +0000 (16:31 +0000)]
Make all PCM core sysctls tunable and remove redundant TUNABLE()
statements. This allows for setting all PCM core parameters in the
kernel environment through loader.conf(5) or kenv(1) which is useful
for pluggable PCM devices like USB audio devices which might be
plugged after that sysctl.conf(5) is executed.

9 years agoThe addition of flowid and flowtype in r280233 and r280237 respectively forgot
lstewart [Tue, 24 Mar 2015 15:08:43 +0000 (15:08 +0000)]
The addition of flowid and flowtype in r280233 and r280237 respectively forgot
to extend the IPv6 packet node format string, which causes a build failure when
SIFTR is compiled with IPv6 support.

Reported by: Lars Eggert

9 years agoFix the bug in the handling of fragmented abandoned SCTP user messages reported in
tuexen [Tue, 24 Mar 2015 15:05:36 +0000 (15:05 +0000)]
Fix the bug in the handling of fragmented abandoned SCTP user messages reported in
https://code.google.com/p/sctp-refimpl/issues/detail?id=11
Thanks to Lally Singh for reporting it.
MFC after: 3 days

9 years agoFix an accounting bug related to the per stream chunk counter.
tuexen [Tue, 24 Mar 2015 14:51:46 +0000 (14:51 +0000)]
Fix an accounting bug related to the per stream chunk counter.
While there, don't refer to a net articifically.

MFC after: 3 days

9 years agoAdda minimal gcc config. This is just enough to build the bits of csu we
andrew [Tue, 24 Mar 2015 14:22:58 +0000 (14:22 +0000)]
Adda minimal gcc config. This is just enough to build the bits of csu we
get from gcc, and libgcc_eh.

Sponsored by: The FreeBSD Foundation

9 years agoAdd the openssl header for arm64. As it is based on MACHINE_CPUARCH it
andrew [Tue, 24 Mar 2015 14:16:14 +0000 (14:16 +0000)]
Add the openssl header for arm64. As it is based on MACHINE_CPUARCH it
is named opensslconf-aarch64.h.

Sponsored by: The FreeBSD Foundation

9 years agoWhen mapping an allocated entry, use the entry size, instead of the
kib [Tue, 24 Mar 2015 12:48:51 +0000 (12:48 +0000)]
When mapping an allocated entry, use the entry size, instead of the
requested size.  If tag restrictions caused split entry, its size is
less then requsted.

Hardware provided by: Michael Fuckner <michael@fuckner.net>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAssert that the mapping loop makes progress.
kib [Tue, 24 Mar 2015 12:46:21 +0000 (12:46 +0000)]
Assert that the mapping loop makes progress.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agosfxge: cleanup: fix index variable type to match upper boundary type
arybchik [Tue, 24 Mar 2015 11:33:34 +0000 (11:33 +0000)]
sfxge: cleanup: fix index variable type to match upper boundary type

Sponsored by:   Solarflare Communications, Inc.

9 years agosfxge: cleanup: add a blank line before each #if to improve readability
arybchik [Tue, 24 Mar 2015 11:25:19 +0000 (11:25 +0000)]
sfxge: cleanup: add a blank line before each #if to improve readability

Sponsored by:   Solarflare Communications, Inc.

9 years agosfxge: cleanup: remove trailing whitespaces
arybchik [Tue, 24 Mar 2015 11:22:12 +0000 (11:22 +0000)]
sfxge: cleanup: remove trailing whitespaces

Sponsored by:   Solarflare Communications, Inc.

9 years agoMake ix_crcstrip a public symbol for the moment; it probably is not
bz [Tue, 24 Mar 2015 09:46:47 +0000 (09:46 +0000)]
Make ix_crcstrip a public symbol for the moment;  it probably is not
the right solution but I will leave it to experts to untangle this
problem to properly stop the build failures.

At the moment only if_ix.c includes dev/netmap/ixgbe_netmap.h which is
good as ixgbe_netmap.h defines a couple of (file) static variables--thus
local to if_ix.c.
static int ix_crcstrip however now also got checked from ix_txrx.c
(as an extern) and should not be visible there.  In fact we do see
powerpc and powerpc64 build failures because of this.  It is unclear
to me why on other (clang built?) architectures this does not lead
to a reference of an undefined symbol and similar build breakage.

9 years agoUse the feedback value from the synchronization endpoint as fallback
hselasky [Tue, 24 Mar 2015 09:21:53 +0000 (09:21 +0000)]
Use the feedback value from the synchronization endpoint as fallback
when there is no recording channel.

MFC after: 3 days
PR:  198444

9 years agoMFV of 280411,tzdata{2015b}
edwin [Tue, 24 Mar 2015 05:52:28 +0000 (05:52 +0000)]
MFV of 280411,tzdata{2015b}

Release 2015b - 2015-03-19 23:28:11 -0700

  Changes affecting future time stamps

    Mongolia will start observing DST again this year, from the last
    Saturday in March at 02:00 to the last Saturday in September at 00:00.
    (Thanks to Ganbold Tsagaankhuu.)

    Palestine will start DST on March 28, not March 27.  Also,
    correct the fall 2014 transition from September 26 to October 24.
    Adjust future predictions accordingly.  (Thanks to Steffen Thorsen.)

  Changes affecting past time stamps

    The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
    regression.  (Thanks to Stuart Bishop for reporting the problem.)

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: America/Antigua, America/Cayman,
    Pacific/Midway, and Pacific/Saipan.

  Changes affecting time zone abbreviations

    Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
    (Thanks to Hank W.)

9 years agoDisable coredump_devctl because it could lead to leaking paths to
rpaulo [Tue, 24 Mar 2015 02:17:17 +0000 (02:17 +0000)]
Disable coredump_devctl because it could lead to leaking paths to
jails.

9 years agofiledesc: microoptimize fget_unlocked by getting rid of fd < 0 branch
mjg [Tue, 24 Mar 2015 00:10:11 +0000 (00:10 +0000)]
filedesc: microoptimize fget_unlocked by getting rid of fd < 0 branch

Casting fd to an unsigned type simplifies fd range coparison to mere checking
if the result is bigger than the table.

9 years agoWhen an ICMP message is received and the MTU shrinks, only
tuexen [Mon, 23 Mar 2015 23:34:21 +0000 (23:34 +0000)]
When an ICMP message is received and the MTU shrinks, only
mark outstanding chunks for retransmissions.

MFC after: 3 days

9 years agocxgbe(4): Do not call sbuf_trim on an sbuf with a drain function.
np [Mon, 23 Mar 2015 23:06:32 +0000 (23:06 +0000)]
cxgbe(4): Do not call sbuf_trim on an sbuf with a drain function.

MFC after: 1 week

9 years agoDo not save/restore the TLS pointer on context switch for armv6. The
ian [Mon, 23 Mar 2015 22:42:42 +0000 (22:42 +0000)]
Do not save/restore the TLS pointer on context switch for armv6.  The
pointer cannot be changed directly by userland code on armv6 (it can be on
armv4), so there's no need to save/restore.

Submitted by: Michal Meloun

9 years agoAdd llvm patch corresponding to r280400.
dim [Mon, 23 Mar 2015 21:15:07 +0000 (21:15 +0000)]
Add llvm patch corresponding to r280400.

9 years agoPull in r230348 from upstream llvm trunk (by Tim Northover):
dim [Mon, 23 Mar 2015 21:13:29 +0000 (21:13 +0000)]
Pull in r230348 from upstream llvm trunk (by Tim Northover):

  ARM: treat [N x i32] and [N x i64] as AAPCS composite types

  The logic is almost there already, with our special homogeneous
  aggregate handling. Tweaking it like this allows front-ends to emit
  AAPCS compliant code without ever having to count registers or add
  discarded padding arguments.

  Only arrays of i32 and i64 are needed to model AAPCS rules, but I
  decided to apply the logic to all integer arrays for more consistency.

This fixes a possible "Unexpected member type for HA" error when
compiling lib/msun/bsdsrc/b_tgamma.c for armv6.

Reported by: Jakub Palider <jpa@semihalf.com>

9 years agoReduce priority of ATA/SATA drivers.
mav [Mon, 23 Mar 2015 19:47:52 +0000 (19:47 +0000)]
Reduce priority of ATA/SATA drivers.

Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY;  more functional ahci(4), siis(4),
mvs(4) -> BUS_PROBE_DEFAULT;  BUS_PROBE_VENDOR leave for vendor drivers.

MFC after: 2 weeks

9 years agoBe consistent with M_ZERO when allocating ccbs.
benno [Mon, 23 Mar 2015 18:45:37 +0000 (18:45 +0000)]
Be consistent with M_ZERO when allocating ccbs.

There are four places, all in cam_xpt.c, where ccbs are malloc'ed. Two of
these use M_ZERO, two don't. The two that don't meant that allocated ccbs
had trash in them making it hard to debug errors where they showed up. Due
to this, use M_ZERO all the time when allocating ccbs.

Submitted by: Scott Ferris <scott.ferris@isilon.com>
Sponsored by: EMC/Isilon Storage Division
Reviewed by: scottl, imp
Differential: https://reviews.freebsd.org/D2120

9 years agoxlint: update.
pfg [Mon, 23 Mar 2015 18:45:29 +0000 (18:45 +0000)]
xlint: update.

Bring some important updates from NetBSD up to about 2008/04/25.
The main feature is initial support for C99.

This is a very basic update to make it easier to merge new
compiler attirbutes but more updates are likely to follow.

Obtained from: NetBSD
MFC after: 2 weeks

9 years agocp,mv: Use futimens() instead of utimensat() if possible.
jilles [Mon, 23 Mar 2015 17:35:05 +0000 (17:35 +0000)]
cp,mv: Use futimens() instead of utimensat() if possible.

9 years agoAdd missing variables password/bootlock_password.
dteske [Mon, 23 Mar 2015 17:31:22 +0000 (17:31 +0000)]
Add missing variables password/bootlock_password.
NB: Using NULL for default values in-case someone
or something uncomments it and reboots. See
check-password.4th(8) for additional details.

MFC after: 3 days
X-MFC-to: stable/10 stable/9

9 years agoIncrease max input for password/bootlock_password from 16 to 255.
dteske [Mon, 23 Mar 2015 16:43:46 +0000 (16:43 +0000)]
Increase max input for password/bootlock_password from 16 to 255.
When taking user input, don't show asterisks as the user types
but instead spin a twiddle. Implement Ctrl-U to clear user input.
If the buffer is empty, either because the user has yet to type
anything, presses Ctrl-U at any time, or presses backspace enough
to end in an empty buffer, the twiddle is erased to provide feed-
back to the user.

MFC after: 3 days
X-MFC-to: stable/10 stable/9

9 years agoPrevent password/bootlock_password features of loader.conf(5) from
dteske [Mon, 23 Mar 2015 16:31:27 +0000 (16:31 +0000)]
Prevent password/bootlock_password features of loader.conf(5) from
locking out everyone in the case of setting a password longer than
the maximum (currently 16 characters). Now the required password is
truncated to the maximum input that can be read from the user.

PR: kern/198760
MFC after: 3 days
MFH: stable/10 stable/9

9 years agoFix sgetkey indentation to be consistent with the rest of the file.
dteske [Mon, 23 Mar 2015 16:22:56 +0000 (16:22 +0000)]
Fix sgetkey indentation to be consistent with the rest of the file.
Remove some blank lines, adjust some comments and update copyright.

MFC after: 3 days
X-MFC-to: stable/10 stable/9

9 years agoRenumber clauses to avoid missing 3
emaste [Mon, 23 Mar 2015 16:04:04 +0000 (16:04 +0000)]
Renumber clauses to avoid missing 3

9 years agosfxge: remove unnecessary and wrong prediction
arybchik [Mon, 23 Mar 2015 15:53:26 +0000 (15:53 +0000)]
sfxge: remove unnecessary and wrong prediction

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2085

9 years agosfxge: do not check MCDI status word
arybchik [Mon, 23 Mar 2015 15:52:57 +0000 (15:52 +0000)]
sfxge: do not check MCDI status word

This is a temporary workaround until we determine a reliable sequence
of operations for detecting MC reboots.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2084

9 years agosfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64
arybchik [Mon, 23 Mar 2015 15:52:05 +0000 (15:52 +0000)]
sfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64

bus_space_*_8() are not always macros, so it is not correct to use
#ifndef.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2083

9 years agosfxge: add statistics for each Tx queue
arybchik [Mon, 23 Mar 2015 15:49:11 +0000 (15:49 +0000)]
sfxge: add statistics for each Tx queue

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2082

9 years agosfxge: remove obsolete Tx non-multi queue support
arybchik [Mon, 23 Mar 2015 15:47:37 +0000 (15:47 +0000)]
sfxge: remove obsolete Tx non-multi queue support

Tx multi queue is added in FreeBSD 8.0. So, the changeset drops earlier
versions support.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2081

9 years agosfxge: add barriers to BAR write macros
arybchik [Mon, 23 Mar 2015 15:45:39 +0000 (15:45 +0000)]
sfxge: add barriers to BAR write macros

In theory the barriers are required to cope with write combining and
reordering. Two barriers are added (sometimes merged to one):
 1. Before the first write to guarantee that previous writes to the region
    have been done
 2. Before the last write to guarantee that write to the last dword/qword is
    done after previous writes
Barriers are inserted before in the assumption that it is better to
postpone barriers as much as it is possible (more chances that the
operation has already been already done and barrier does not stall CPU).

On x86 and amd64 bus space write barriers are just compiler memory barriers
which are definitely required.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2077

9 years agosfxge: assert either kernel or internal copy of interface flags
arybchik [Mon, 23 Mar 2015 15:44:17 +0000 (15:44 +0000)]
sfxge: assert either kernel or internal copy of interface flags

ioctl to put interface down sets ifp->if_flags which holds the intended
administratively defined state and calls driver callback to apply it.
When everything is done, driver updates internal copy of
interface flags sc->if_flags which holds the operational state.
So, transmit from Rx path is possible when interface is intended to be
administratively down in accordance with ifp->if_flags, but not applied
yet and the operational state is up in accordance with sc->if_flags.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2075

9 years agoRemove a useless assignment.
tuexen [Mon, 23 Mar 2015 15:12:02 +0000 (15:12 +0000)]
Remove a useless assignment.

MFC after: 1 week

9 years agoAdd the start of the arm64 machine headers. This is the subset needed to
andrew [Mon, 23 Mar 2015 11:54:56 +0000 (11:54 +0000)]
Add the start of the arm64 machine headers. This is the subset needed to
start getting userland libraries building.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

9 years agoBump mask to be 64 bits - this fixes seeing MCS rates > 19.
adrian [Mon, 23 Mar 2015 03:43:59 +0000 (03:43 +0000)]
Bump mask to be 64 bits - this fixes seeing MCS rates > 19.

Tested:

* AR9380, STA mode, associated to a 3x3 AP (also FreeBSD)

9 years agoDocument "none" for VersionAddendum.
bdrewery [Mon, 23 Mar 2015 02:45:12 +0000 (02:45 +0000)]
Document "none" for VersionAddendum.

PR: 193127
MFC after: 2 weeks

9 years agoSmall style(9) cleanup.
pfg [Sun, 22 Mar 2015 23:42:21 +0000 (23:42 +0000)]
Small style(9) cleanup.

Fix yet more issues, but certainly not all.

Pointed out by: bde

9 years agoBuild expr with -fwrapv, since it relies on signed integer wrapping
dim [Sun, 22 Mar 2015 22:40:32 +0000 (22:40 +0000)]
Build expr with -fwrapv, since it relies on signed integer wrapping
having defined behavior.

Reported by: rodrigc
MFC after: 3 days

9 years agoThe sysctls that return process argv and envv return binary data, so clear
ian [Sun, 22 Mar 2015 21:18:44 +0000 (21:18 +0000)]
The sysctls that return process argv and envv return binary data, so clear
the SBUF_INCLUDENUL flag.

Pointed out by:     tijl@

9 years agoFix typo in jail(8) man page
allanjude [Sun, 22 Mar 2015 20:38:28 +0000 (20:38 +0000)]
Fix typo in jail(8) man page

PR: 198790
Differential Revision: https://reviews.freebsd.org/D2111
Submitted by: Jimmy Olgeni
Approved by: wblock (mentor)
Sponsored by: ScaleEngine Inc.

9 years agoStop calling x86_efi_copyin and x86_efi_getdev directly. This is to help
andrew [Sun, 22 Mar 2015 18:17:55 +0000 (18:17 +0000)]
Stop calling x86_efi_copyin and x86_efi_getdev directly. This is to help
port loader.efi to both 32 and 64-bit ARM where we can use this file with
minimal changes.

Differential Revision: https://reviews.freebsd.org/D2031
Reviewed by: imp

9 years agoAdd FREEBSD-Xlist files for llvm, clang and lldb.
dim [Sun, 22 Mar 2015 17:56:49 +0000 (17:56 +0000)]
Add FREEBSD-Xlist files for llvm, clang and lldb.

These are generated, and not "optimized" in any way, since I am not
entirely sure of the syntax or format of this type of file.  Feel free
to suggest ways of shortening these lists.

The general idea is the same for all three files, though:
* Get rid of upstream build infrastructure (CMakeLists, Makefiles, etc)
* Delete tests, tools and utilities we don't want or use (including
  samples)
* Remove various bits of upstream metadata files that we don't want or
  use (.arcconfig, .gitignore, etc)

9 years agoInitialise the pps / packet tracking timestamp so 11n aggregation works again.
adrian [Sun, 22 Mar 2015 17:54:00 +0000 (17:54 +0000)]
Initialise the pps / packet tracking timestamp so 11n aggregation works again.

There's a bug in the ticks handling where when initialised at '0', once
the ticks counter wrapped the comparison math would never trigger.
The pps calculation would never happen, and thus aggregation was never
enabled.

It manifests itself as "oh you only get 11n transmit aggregation for the
first 10 minutes of uptime."

I'm sure there are other ticks related issues lurking in net80211.

Tested:

* ath / iwn, both with 'wlandebug +11n' and a little bit of iperf to
  kick off the transmit A-MPDU negotiation once the pps gets high enough.

9 years agoConvert savecore to libxo. The 'verbose' paths still use printf since they're
scottl [Sun, 22 Mar 2015 17:29:14 +0000 (17:29 +0000)]
Convert savecore to libxo.  The 'verbose' paths still use printf since they're
meant for interactivity on the command line and contain a lot of redundant
information.

Obtained from: Netflix, Inc.

9 years agoRemove MAXBSIZE use from drivers where it has nothing to do.
mav [Sun, 22 Mar 2015 16:10:28 +0000 (16:10 +0000)]
Remove MAXBSIZE use from drivers where it has nothing to do.

In some cases limits are just not needed, in others -- DFLTPHYS is the
right constant to use instead.

MFC after: 1 month

9 years agoSmall style(9) cleanup.
pfg [Sun, 22 Mar 2015 15:37:05 +0000 (15:37 +0000)]
Small style(9) cleanup.

#define should always be followed by a tab not space.

9 years agoFix for out of order device destruction notifications when using the
hselasky [Sun, 22 Mar 2015 13:11:56 +0000 (13:11 +0000)]
Fix for out of order device destruction notifications when using the
delist_dev() function. In addition to this change:
- add a proper description of this function
- add a proper witness assert inside this function
- switch a nearby line to use the "cdp" pointer instead of cdev2priv()

MFC after: 3 days

9 years agomsdosfs: mark unused compat-mount fields
kib [Sun, 22 Mar 2015 09:09:26 +0000 (09:09 +0000)]
msdosfs: mark unused compat-mount fields

The magic number MSDOSFS_ARGSMAGIC, which used to distinguish
"old" vs "new" msdosfs mount arguments, has not been used since
2005; it should just go away now.

Likewise, the local-to-Unicode table that changed at the same
time is unused.

Leave the space reserved in the old style mount arguments, though,
since we still support the old mount call (via the cmount entry
point).

Submitted by: Chris Torek <chris.torek@gmail.com>
MFC after: 2 weeks

9 years agoAdd initial D-Link DIR-655 (A1) support.
adrian [Sun, 22 Mar 2015 02:15:09 +0000 (02:15 +0000)]
Add initial D-Link DIR-655 (A1) support.

This is based on the AP135 design - QCA9558 SoC, 3x3 2GHz wifi, but no
5GHz (11n or 11ac) chip is available.

It however still has 128MiB of RAM, 16MiB of NOR flash and the AR8327N
gigabit switch - so it's quite a beefy router device.

Tested:

* Well, a unit, naturally

Obtained from: Completely messing up an amazon.com order and getting this instead, and asking "hey, wonder if I could.."

9 years agoDescribe the behavior when both -f and a message are given. Pointed out by
wblock [Sun, 22 Mar 2015 01:25:57 +0000 (01:25 +0000)]
Describe the behavior when both -f and a message are given.  Pointed out by
Raphael Abreu <raphael.lorenzeto@gmail.com> on freebsd-doc.

MFC after: 1 week

9 years agore-enable building modules for the AR933x
adrian [Sat, 21 Mar 2015 23:39:34 +0000 (23:39 +0000)]
re-enable building modules for the AR933x

* add ipfw
* delete ath / ath_ahb for now, until I can have Warner beat me
  with the clue stick about putting in conditional build things into
  the ath Makefile so the module builds can just have the HAL bits
  that are relevant for a particular target.

9 years agoQuieten some of the log spam from AR9300 sysctl tree walk and chip setup/reset
adrian [Sat, 21 Mar 2015 23:12:46 +0000 (23:12 +0000)]
Quieten some of the log spam from AR9300 sysctl tree walk and chip setup/reset
path.

* For now there's no exposed control over classic / LNA antenna diversity,
  so just stub them out.  Adding this will take quite a bit of time.

* Add a function to fetch the CTS timeout.

PR: kern/198558

9 years agoPull in r231972 from upstream compiler-rt trunk (by Jörg Sonnenberger):
dim [Sat, 21 Mar 2015 21:49:25 +0000 (21:49 +0000)]
Pull in r231972 from upstream compiler-rt trunk (by Jörg Sonnenberger):

  Always include stddef.h to make sure size_t exists.

  From Alexander Esilevich.

Requested by: andrew

9 years agoproc: use MTX_NEW flag in proc_init
mjg [Sat, 21 Mar 2015 20:25:34 +0000 (20:25 +0000)]
proc: use MTX_NEW flag in proc_init

This allows us to get rid of bzero which was added specifically to make
mtx_init on p_mtx reliable.

This also fixes a potential problem where mtx_init on other mutexes
could trip over on unitialized memory and fire an assertion.

Reviewed by: kib

9 years agocred: add proc_set_cred_init helper
mjg [Sat, 21 Mar 2015 20:24:54 +0000 (20:24 +0000)]
cred: add proc_set_cred_init helper

proc_set_cred_init can be used to set first credentials of a new
process.

Update proc_set_cred assertions so that it only expects already used
processes.

This fixes panics where p_ucred of a new process happens to be non-NULL.

Reviewed by: kib

9 years agofork: assign refed credentials earlier
mjg [Sat, 21 Mar 2015 20:24:03 +0000 (20:24 +0000)]
fork: assign refed credentials earlier

Prior to this change the kernel would take p1's credentials and assign
them tempororarily to p2. But p1 could change credentials at that time
and in effect give us a use-after-free.

No objections from: kib

9 years agoCorrectly pass the -mllvm -enable-gvn=false flag in CLANG_OPT_SMALL
dim [Sat, 21 Mar 2015 19:13:13 +0000 (19:13 +0000)]
Correctly pass the -mllvm -enable-gvn=false flag in CLANG_OPT_SMALL
(this has to be passed as a combination of two flags).  Should fix the
case where the clang version is before 3.5.0.

Submitted by: Pedro Arthur <bygrandao@gmail.com>
X-MFC-With: r279018, r279378

9 years agoIntroduce vm_object_color() and use it in mmap(2) to set the color of
alc [Sat, 21 Mar 2015 17:56:55 +0000 (17:56 +0000)]
Introduce vm_object_color() and use it in mmap(2) to set the color of
named objects to zero before the virtual address is selected.  Previously,
the color setting was delayed until after the virtual address was
selected.  In rtld, this delay effectively prevented the mapping of a
shared library's code section using superpages.  Now, for example, we see
the first 1 MB of libc's code on armv6 mapped by a superpage after we've
gotten through the initial cold misses that bring the first 1 MB of code
into memory.  (With the page clustering that we perform on read faults,
this happens quickly.)

Differential Revision: https://reviews.freebsd.org/D2013
Reviewed by: jhb, kib
Tested by: Svatopluk Kraus (armv6)
MFC after: 6 weeks

9 years agoMake TARGET_ARCH=powerpc64 work without TARGET=powerpc.
imp [Sat, 21 Mar 2015 16:54:01 +0000 (16:54 +0000)]
Make TARGET_ARCH=powerpc64 work without TARGET=powerpc.

9 years agoerror is only used if MAC is defined, so make its declaration conditional
cognet [Sat, 21 Mar 2015 16:16:17 +0000 (16:16 +0000)]
error is only used if MAC is defined, so make its declaration conditional
as well.

9 years agoWhen waiting on PTE allocation, another thread could free the l2_dtable while
cognet [Sat, 21 Mar 2015 15:32:59 +0000 (15:32 +0000)]
When waiting on PTE allocation, another thread could free the l2_dtable while
we're not looking at it.
Fix this by increasing l2->l2_occupancy before we try to alloc (and decrease
it if the allocation failed, or if another thread did a similar allocation).

Submitted by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
MFC after: 1 week

9 years agoSomewhat modernize the SysV shm code:
kib [Sat, 21 Mar 2015 15:01:19 +0000 (15:01 +0000)]
Somewhat modernize the SysV shm code:
- Use real locking, replace Giant with global sx protecting the
  subsystem.  Since the subsystem' lock is no longer dropped during
  the sleepsk, remove not needed SHMSEG_WANTED segment flag, and
  revert r278963.
- To do proper code simplification possible after the change of the
  lock, restructure several functions into _locked body and
  originally-named wrapper which calls into _locked variant.  This
  allows to eliminate the 'goto done2' spread over the code.
- Merge shm_find_segment_by_shmid() and shm_find_segment_by_shmidx().
- Consistently change all function prototypes to ANSI C.

Reviewed by: mjg (who has earlier version of the similar patch to
 introduce real locking)
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoThe synchronisation value returned by the so-called feedback endpoint
hselasky [Sat, 21 Mar 2015 09:45:45 +0000 (09:45 +0000)]
The synchronisation value returned by the so-called feedback endpoint
appears to be too inaccurate that it can be used to synchronize the
playback data stream. If there is a recording endpoint associated with
the playback endpoint, use that instead. That means if the isochronous
OUT endpoint is asynchronus the USB audio driver will automatically
start recording, if possible, to get exact information about the
needed sample rate adjustments. In no recording endpoint is present,
no rate adaption will be done.

While at it fix an issue where the hardware buffer pointers don't get
reset at the first device PCM trigger.

Make some variables 32-bit to avoid problems with multithreading.

MFC after: 3 days
PR:  198444

9 years agoMake the autofs LDAP script cope with server returning entries with
trasz [Sat, 21 Mar 2015 09:42:37 +0000 (09:42 +0000)]
Make the autofs LDAP script cope with server returning entries with
ENTRY_ATTRIBUTE (eg cn) after the VALUE_ATTRIBUTE (eg automountInformation),
instead of before.

PR: 198557
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoFix the LED configuration so the switch PHY LEDs work fine.
adrian [Sat, 21 Mar 2015 06:44:41 +0000 (06:44 +0000)]
Fix the LED configuration so the switch PHY LEDs work fine.

Tested:

* TP-Link TL-WDR3600; yes, by testing all five ethernet ports.

Obtained from: Linux OpenWRT

9 years agoMigrate these configs to use the geom map search function.
adrian [Sat, 21 Mar 2015 06:18:25 +0000 (06:18 +0000)]
Migrate these configs to use the geom map search function.

Now that the search function reliably works, this allows for
smaller images.

9 years agoAdd support for the TP-Link TL-WDR4300 and TL-WDR3600.
adrian [Sat, 21 Mar 2015 06:16:23 +0000 (06:16 +0000)]
Add support for the TP-Link TL-WDR4300 and TL-WDR3600.

These are actually almost the same units; except one is 3x3 5GHz, and
one is 2x2 5GHz.

Tested:

* TP-Link TL-WDR3600

TODO:

* The ath0/ath1 MAC addresses are ye garbage (00:02:03:04:05:06); fixing
  that will take a little more time.  It works fine with the ath0/ath1
  MAC addresses set manually.

* Go through and yank the AR9344 on-board switch config (arswitch1);
  it's not required here for this AP.

9 years agoRe-enable the modules for now; I'm using them in some other test builds.
adrian [Sat, 21 Mar 2015 06:13:30 +0000 (06:13 +0000)]
Re-enable the modules for now; I'm using them in some other test builds.

9 years agoNow that the switch PHY fully works, don't limit arge0 to only being up
adrian [Sat, 21 Mar 2015 06:12:46 +0000 (06:12 +0000)]
Now that the switch PHY fully works, don't limit arge0 to only being up
if the WAN port is up.

This way I can use it for arbitrary ports/vlans.

9 years agoAdd GPIO function mux configuration for AR934x SoCs.
adrian [Sat, 21 Mar 2015 06:08:35 +0000 (06:08 +0000)]
Add GPIO function mux configuration for AR934x SoCs.

The AR934x (and maybe others in this family) have a more complicated
GPIO mux.  The AR71xx just has a single function register for a handful
of "GPIO or X" options, however the AR934x allows for one of roughly
100 behaviours for each GPIO pin.

So, this adds a quick hints based mechanism to configure the output
functions, which is required for some of the more interesting board
configurations.  Specifically, some use external LNAs to improve
RX, and without the MUX/output configured right, the 2GHz RX side
will be plain terrible.

It doesn't yet configure the "input" side yet; I'll add that if
it's required.

Tested:

* TP-Link TL-WDR3600, testing 2GHz STA/AP modes, checking some
  basic RX sensitivity things (ie, "can I see the AP on the other
  side of the apartment that intentionally has poor signal reception
  from where I am right now.")

Whilst here, fix a silly bug in the maxpin routine; I was missing
a break.

9 years agoadd QCA955x PCIe configuration registers.
adrian [Sat, 21 Mar 2015 06:00:46 +0000 (06:00 +0000)]
add QCA955x PCIe configuration registers.

These are /not/ absolute addresses, as the QCA955x SoC has 2 PCIe RC's
(and 1 PCIe EP.)

9 years agoNote that the AR724x PCIe registers are actually from the PCI_CTRL
adrian [Sat, 21 Mar 2015 05:59:45 +0000 (05:59 +0000)]
Note that the AR724x PCIe registers are actually from the PCI_CTRL
register range.

9 years agocoredump: protect corefilename access with a lock
mjg [Sat, 21 Mar 2015 04:39:33 +0000 (04:39 +0000)]
coredump: protect corefilename access with a lock

Previously format string traversal could happen while the string itself was
being modified.

Use allproc_lock as coredumping is a rare operation and as such we don't
have to create a dedicated lock.

Submitted by: Tiwei Bie <btw mail.ustc.edu.cn>
Reviewed by: kib
X-Additional: JuniorJobs project

9 years agoUpdate copyright(s)
dteske [Sat, 21 Mar 2015 03:54:11 +0000 (03:54 +0000)]
Update copyright(s)

MFC after: 3 days
X-MFC-to: stable/10

9 years agoWhitespace cleanup(s).
dteske [Sat, 21 Mar 2015 03:52:43 +0000 (03:52 +0000)]
Whitespace cleanup(s).

MFC after: 3 days
X-MFC-to: stable/10

9 years agoDisable timestamping on devfs read/write operations by default.
delphij [Sat, 21 Mar 2015 01:14:11 +0000 (01:14 +0000)]
Disable timestamping on devfs read/write operations by default.

Currently we update timestamps unconditionally when doing read or
write operations.  This may slow things down on hardware where
reading timestamps is expensive (e.g. HPET, because of the default
vfs.timestamp_precision setting is nanosecond now) with limited
benefit.

A new sysctl variable, vfs.devfs.dotimes is added, which can be
set to non-zero value when the old behavior is desirable.

Differential Revision: https://reviews.freebsd.org/D2104
Reported by: Mike Tancsa <mike sentex net>
Reviewed by: kib
Relnotes: yes
Sponsored by: iXsystems, Inc.
MFC after: 2 weeks

9 years agobsdgrep: fix regression in the -f option since r268799
pfg [Sat, 21 Mar 2015 00:21:30 +0000 (00:21 +0000)]
bsdgrep: fix regression in the -f option since r268799

Caused by an incomplete merge from NetBSD.

PR: 198725
MFC after: 3 days

9 years agoDisable insecure SSLv2 support from the base OpenSSL.
jkim [Fri, 20 Mar 2015 23:48:11 +0000 (23:48 +0000)]
Disable insecure SSLv2 support from the base OpenSSL.

Differential Revision: https://reviews.freebsd.org/D1304

9 years agoMake vlan_config() the signle point of validity checks.
glebius [Fri, 20 Mar 2015 21:09:03 +0000 (21:09 +0000)]
Make vlan_config() the signle point of validity checks.

Sponsored by: Nginx, Inc.

9 years agoIn vlan_clone_match_ethervid():
glebius [Fri, 20 Mar 2015 20:42:58 +0000 (20:42 +0000)]
In vlan_clone_match_ethervid():
- Use ifunit() instead of going through the interface list ourselves.
- Remove unused parameter.
- Move the most important comment above the function.

Sponsored by: Nginx, Inc.

9 years agoFix grammar in epair(4) man page
allanjude [Fri, 20 Mar 2015 20:08:36 +0000 (20:08 +0000)]
Fix grammar in epair(4) man page

PR: 196839
Differential Revision: https://reviews.freebsd.org/D2090
Submitted by: Jason Unovitch (original)
Approved by: wblock (mentor)
Sponsored by: ScaleEngine Inc.