]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r292877:
pfg [Wed, 6 Jan 2016 16:32:39 +0000 (16:32 +0000)]
MFC r292877:
pax: prevent possible buffer overflow

Or at least quiet down some static analyzers about it.

CID: 978835
Obtained from: OpenBSD

git-svn-id: svn://svn.freebsd.org/base/stable/10@293238 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292872:
pfg [Wed, 6 Jan 2016 16:25:00 +0000 (16:25 +0000)]
MFC r292872:

ext2: recognize ext4 INCOMPAT_RECOVER flag

This is a flag specific for journalling in ext4.
Add it to the list of ext4 features we ignore for
read-only purposes.

PR: 205668

git-svn-id: svn://svn.freebsd.org/base/stable/10@293236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292961:
kib [Wed, 6 Jan 2016 16:02:22 +0000 (16:02 +0000)]
MFC r292961:
Force nullfs vnode reclaim after unlinking, to potentially unlink
lower vnode.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r292266 & r292947
smh [Wed, 6 Jan 2016 09:56:06 +0000 (09:56 +0000)]
MFC: r292266 & r292947

Add flag to disable inital reboot(8) userland sync

Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/stable/10@293232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC 292366: Flag the first port on a Sheevaplug ftdi serial device as jtag.
ian [Tue, 5 Jan 2016 17:12:33 +0000 (17:12 +0000)]
MFC 292366: Flag the first port on a Sheevaplug ftdi serial device as jtag.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293209 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287920:
rstone [Tue, 5 Jan 2016 16:58:07 +0000 (16:58 +0000)]
MFC r287920:

  Fix /sbin/route to never look up (invalid) interface names through DNS

  /sbin/route has a bug where if it is passed an interface name that does
  not exist, it falls through and winds up interpreting it as a hostname.
  It fails out eventually, but on a system where DNS lookup is broken you
  can end up waiting for up to 60 seconds waiting for the DNS lookup to
  timeout.  I'm not quite sure what happens if the DNS lookup somehow
  succeeds but I doubt that can end well.

  Reviewed by:  markj, cem
  MFC after:    2 weeks
  Sponsored by: EMC/Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@293208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292890:
kib [Tue, 5 Jan 2016 13:05:38 +0000 (13:05 +0000)]
MFC r292890:
Add standard extended feature bit 6 from the Intel SDM rev. 57.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293195 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoAdd `..` after sys/kern/pipe entry accidentally missed in r291183
ngie [Tue, 5 Jan 2016 08:10:06 +0000 (08:10 +0000)]
Add `..` after sys/kern/pipe entry accidentally missed in r291183

This is a direct commit to stable/10

Pointyhat to: ngie
Reported by: rodrigc
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@293191 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMerge from head r287357-287358,287400:
glebius [Tue, 5 Jan 2016 03:22:10 +0000 (03:22 +0000)]
Merge from head r287357-287358,287400:
  Not only build with buildworld, but also install with installworld all
  alternative kernels.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293189 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agobmake 20151220
sjg [Mon, 4 Jan 2016 20:05:40 +0000 (20:05 +0000)]
bmake 20151220

git-svn-id: svn://svn.freebsd.org/base/stable/10@293174 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFH: r292522
brueffer [Mon, 4 Jan 2016 16:51:56 +0000 (16:51 +0000)]
MFH: r292522

Merge from contrib/openbsm to bring the kernel audit bits up to date with OpenBSM 1.2 alpha 4:

- remove $P4$
- fix a comment

git-svn-id: svn://svn.freebsd.org/base/stable/10@293163 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r280351: Stop calling x86_efi_copyin and x86_efi_getdev directly
emaste [Mon, 4 Jan 2016 16:33:54 +0000 (16:33 +0000)]
MFC r280351: Stop calling x86_efi_copyin and x86_efi_getdev directly

In HEAD this is to help port loader.efi to both 32 and 64-bit ARM where
we can use this file with minimal changes. Merged to stable/10 to
simplify MFCs of later EFI commits.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293162 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFH: 292432,r292433,r292434
brueffer [Mon, 4 Jan 2016 16:32:21 +0000 (16:32 +0000)]
MFH: 292432,r292433,r292434

- Merge OpenBSM 1.2 alpha 4.
- Regenerate config.h for OpenBSM 1.2 alpha 4.
- Add au_notify.2 and MLINKs (added in OpenBSM 1.2 alpha 4).

Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@293161 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292949:
hselasky [Mon, 4 Jan 2016 09:58:16 +0000 (09:58 +0000)]
MFC r292949:
Add support for modifying coalescing parameters runtime.

Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@293158 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292948:
hselasky [Mon, 4 Jan 2016 09:56:57 +0000 (09:56 +0000)]
MFC r292948:
Allow I2C to read address 0x51 as well as address 0x50.

Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@293157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292946:
hselasky [Mon, 4 Jan 2016 09:55:21 +0000 (09:55 +0000)]
MFC r292946:
10G ER/LR should present itself as LR.

MFC after: 1 week
Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@293156 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292838:
hselasky [Mon, 4 Jan 2016 09:52:40 +0000 (09:52 +0000)]
MFC r292838:
Add support for CQE zipping. CQE zipping reduces PCI overhead by
coalescing and zipping multiple CQEs into a single merged CQE. The
feature is enabled by default and can be disabled by a sysctl.

Implementing this feature mlx5_cqwq_pop() has been separated from
mlx5e_get_cqe().

Submitted by: Mark Bloch <markb@mellanox.com>
Differential Revision: https://reviews.freebsd.org/D4598
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@293155 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292837:
hselasky [Mon, 4 Jan 2016 09:49:53 +0000 (09:49 +0000)]
MFC r292837:
Add support for sysctl tunables to 10-stable and older. Pushed through
head first to simplify driver maintenance.

MFC after: 1 week
Submitted by: Drew Gallatin <gallatin@freebsd.org>
Differential Revision: https://reviews.freebsd.org/D4552
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@293154 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292835:
hselasky [Mon, 4 Jan 2016 09:47:20 +0000 (09:47 +0000)]
MFC r292835:
Make the eeprom dump function more readable and rename variables for
better clarity.

Submitted by: Daria Genzel <dariaz@mellanox.com>
Differential Revision: https://reviews.freebsd.org/D4551
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@293153 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoAdd missed mergeinfo.
hselasky [Mon, 4 Jan 2016 09:38:33 +0000 (09:38 +0000)]
Add missed mergeinfo.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293152 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289563,r291481,r292537,r292538,r292542,r292543,r292544 and r292834:
hselasky [Mon, 4 Jan 2016 09:37:05 +0000 (09:37 +0000)]
MFC r289563,r291481,r292537,r292538,r292542,r292543,r292544 and r292834:

Update the LinuxKPI:
- Add more functions and types.
- Implement ACCESS_ONCE(), WRITE_ONCE() and READ_ONCE().
- Implement sleepable RCU mechanism using shared exclusive locks.
- Minor workqueue cleanup:
  - Make some functions global instead of inline to ease debugging.
  - Fix some minor style issues.
- In the zero delay case in queue_delayed_work() use the return value
  from taskqueue_enqueue() instead of reading "ta_pending" unlocked and
  also ensure the callout is stopped before proceeding.
- Implement drain_workqueue() function.
- Reduce memory consumption when allocating kobject strings in the
  LinuxKPI. Compute string length before allocating memory instead of
  using fixed size allocations. Make kobject_set_name_vargs() global
  instead of inline to save some bytes when compiling.

Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@293151 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r291199:
hselasky [Mon, 4 Jan 2016 07:27:58 +0000 (07:27 +0000)]
MFC r291199:
Fix compile warning about shifting signed negative constant.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293146 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292814:
ngie [Mon, 4 Jan 2016 07:11:15 +0000 (07:11 +0000)]
MFC r292814:

- Explicitly initialize ch to 0
- Delete some spurious whitespace
- Use calloc instead of malloc in the last test to ensure that
  sendspace is properly zero'ed out

Submitted by: markj

git-svn-id: svn://svn.freebsd.org/base/stable/10@293145 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292822:
ngie [Mon, 4 Jan 2016 07:09:29 +0000 (07:09 +0000)]
MFC r292822:

Remove retval to fix a -Wunused-but-set-variable warning from gcc 4.9

git-svn-id: svn://svn.freebsd.org/base/stable/10@293144 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292820:
ngie [Mon, 4 Jan 2016 07:06:46 +0000 (07:06 +0000)]
MFC r292820:

Clean trailing whitespace

git-svn-id: svn://svn.freebsd.org/base/stable/10@293143 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292815:
ngie [Mon, 4 Jan 2016 07:03:58 +0000 (07:03 +0000)]
MFC r292815:

Staticize several variables that are used exclusively in bsnmpd/main.c and
bsnmpd/trap.c

This fixes several -Wmissing-variable-declaration warnings noted by clang

git-svn-id: svn://svn.freebsd.org/base/stable/10@293141 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292816,r292818,r292819:
ngie [Mon, 4 Jan 2016 07:02:48 +0000 (07:02 +0000)]
MFC r292816,r292818,r292819:

r292816:

Place cancel and error under #ifdef DEBUG to mute
-Wunused-but-set-variable warnings reported by gcc 4.9

Remove some trailing whitespace as well

Tested with and without -DDEBUG

r292818:

Fix style(9) a bit and ensure that error from initializing kqueue(2) is
sane

- Push the kqueue(2) initialization down so the errno will correspond with
  the failure instead of potentially being stomped on by functions called
  by `PLAIN_REQUIRE_KERNEL_MODULE`
- Delete trailing whitespace
- Add spaces between braces for conditional and control blocks (for/if)
- Use err/errx instead of perror+printf+exit/printf+exit.
- Remove braces for single-line conditionals

Tested with and without -DDEBUG

r292819:

- Fix an improperly sized buffer for `pathname` [1]
- Fix a -Wunused-but-set-variable warning [2]

git-svn-id: svn://svn.freebsd.org/base/stable/10@293140 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292531,r292532,r292533,r292545:
ngie [Mon, 4 Jan 2016 06:57:06 +0000 (06:57 +0000)]
MFC r292531,r292532,r292533,r292545:

r292531:

Make test_matches.sh into a series of TAP testcases

Use temporary filesystems / memory disks instead of a hardcoded path
which doesn't exist on test systems

r292532:

Mark `subject matching jailid` testcase as an unexpected failure with
TODO to ensure that the testcase isn't marked as a failure

PR: 205481

r292533:

Skip the testcases if mac_bsdextended(4) isn't detected on the
system

r292545:

Redo the TAP integration so it works with Kyua

Kyua needs numbers in the TAP results :/, but prove doesn't

git-svn-id: svn://svn.freebsd.org/base/stable/10@293138 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292605, r292606, r292607, r292608:
pfg [Mon, 4 Jan 2016 03:20:41 +0000 (03:20 +0000)]
MFC r292605, r292606, r292607, r292608:

cron: bring some fixes for Coverity reports and other issues.

crontab: replace malloc + bzero with calloc
crontab: properly free an entry
cron: Check the return value of pipe(2)

CID: 271773, 1009830,

git-svn-id: svn://svn.freebsd.org/base/stable/10@293132 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r279437,r284107:
ngie [Sun, 3 Jan 2016 22:50:19 +0000 (22:50 +0000)]
MFC r279437,r284107:

r279437 (by rstone):

Allow Illumos code to co-exist with nv(9)

r284107 (by avg):

compat nvpair.h: make sure that the names are mangled only for kernel

Currently there is no good reason to mangle the userland API.
The change was introduced in eac1d566b46edef765754203bef22c75c1699966,
r279437.  Also see https://reviews.freebsd.org/D1881.

I am still convinced that nv should not have introduced intentionally
conflicting API.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293121 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r293015:
dim [Sun, 3 Jan 2016 17:23:16 +0000 (17:23 +0000)]
MFC r293015:

Merge r293013 from clang380-import branch:

Fix a clang 3.8.0 warning in pflogd.c:

contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
       if (!if_exists(interface) == -1) {
   ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from: OpenBSD's pflogd.c 1.49

git-svn-id: svn://svn.freebsd.org/base/stable/10@293110 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r293014:
dim [Sun, 3 Jan 2016 17:19:17 +0000 (17:19 +0000)]
MFC r293014:

Merge r293006 from clang380-import branch:

For determining the compiler version, quote the string to be echo'd,
otherwise the command might fail.  This is because clang -v now results
in the following:

FreeBSD clang version 3.8.0 (trunk 256633) (based on LLVM 3.8.0svn)

The second "3.8.8svn)" string tripped up the shell command.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293109 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292884:
ngie [Fri, 1 Jan 2016 00:36:59 +0000 (00:36 +0000)]
MFC r292884:

Fix getopt(3) argument after r290180; I forgot to change -r to -R
by accident

Pointyhat to: ngie

git-svn-id: svn://svn.freebsd.org/base/stable/10@293025 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292719:
ume [Fri, 1 Jan 2016 00:35:06 +0000 (00:35 +0000)]
MFC r292719:
  Remove _gethostbynisname() and _gethostbynisaddr().  These functions
  used to be called from getipnodebyname().

git-svn-id: svn://svn.freebsd.org/base/stable/10@293023 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292640,r292641:
ngie [Thu, 31 Dec 2015 20:25:26 +0000 (20:25 +0000)]
MFC r292640,r292641:

r292640:

Clean up trailing whitespace; no functional change

Sponsored by: EMC / Isilon Storage Division

r292641:

Fix r292640

vim overzealously removed some trailing `+' and I didn't check the
diff

Pointyhat to: ngie
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@293003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292710:
ngie [Thu, 31 Dec 2015 19:32:46 +0000 (19:32 +0000)]
MFC r292710:

Remove unused function `act_getkernstring`

This fixes a clang -Wunused warning

Differential Revision: https://reviews.freebsd.org/D4697
Reported by: Jenkins
Reviewed by: araujo, bapt
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292998 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292983:
bz [Thu, 31 Dec 2015 11:23:39 +0000 (11:23 +0000)]
MFC r292983:

 Bump copyright year.

 Happy New Year 2016!

git-svn-id: svn://svn.freebsd.org/base/stable/10@292984 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292813.
cy [Thu, 31 Dec 2015 06:01:07 +0000 (06:01 +0000)]
MFC r292813.

Correct __FreeBSD__ check.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292979 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r278860:
ngie [Thu, 31 Dec 2015 03:55:02 +0000 (03:55 +0000)]
MFC r278860:
r278860 (by jmg):

remove NULL check as M_WAITOK will not return NULL

Reviewed by: jhb
Sponsored by: FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@292975 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC nv(3) and part of nv(9) to stable/10
ngie [Thu, 31 Dec 2015 03:28:14 +0000 (03:28 +0000)]
MFC nv(3) and part of nv(9) to stable/10

This includes the following revisions from head:

r258065,r258594,r259430,r260222,r261407,r261408,r263479,r264021,r266351,
r269603,r271026,r271027,r271028,r271241,r271578,r271579,r271847,r272102,
r272843,r273752,r277920,r277921,r277925,r277926,r277927,r279421,r279422,
r279423,r279424,r279425,r279426,r279427,r279428,r279429,r279430,r279431,
r279432,r279434,r279435,r279436,r279438,r279439,r279440,r279760,r282122,
r282254,r282257,r282304,r282312,r285339,r288340

This change reverts stable/10@r282122 and stable/10@r288340, and re-MFCs the
series again (r282122, r285339, and r288340).

More changes are pending to nv(9)/pci(4) after further review/work. Please see
the Phabricator review for more details (both https://reviews.freebsd.org/D4232
and https://reviews.freebsd.org/D4249 ).

- Tested with:
-- Booting VMware Fusion 8.1.0 running on a Haswell Apple Macbook Pro
-- Booting a Haswell machine with zfs and running some stress workloads with
   VirtualBox guests
-- make tinderbox
-- kyua test -k /usr/tests/lib/libnv

Differential Revision: https://reviews.freebsd.org/D4249 (part of a larger diff)
Relnotes: yes
Reviewed by: oshogbo (implicit), sbruno (implicit)
Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292973 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287220:
jamie [Thu, 31 Dec 2015 01:26:43 +0000 (01:26 +0000)]
MFC r287220:

  Fix a conversion error in rc.d/jail

git-svn-id: svn://svn.freebsd.org/base/stable/10@292968 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292759:
jamie [Thu, 31 Dec 2015 01:24:16 +0000 (01:24 +0000)]
MFC r292759:

  Let old-style (shell-based) jail configuration handle jail names that
  contain characters not allowed in a shell variable (such as "-").
  These will be replaced by an underscore in jail config variables,
  e.g. for jail "foo-bar" you would set "jail_foo_bar_hostname".

  This is separate from the current code that changes the jail names
  if they contain "." or "/".  It also doesn't apply to jails defined
  in a jail.conf file.

PR: 191181

git-svn-id: svn://svn.freebsd.org/base/stable/10@292967 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r292846, r292847, r292849
bapt [Wed, 30 Dec 2015 23:25:45 +0000 (23:25 +0000)]
MFC: r292846, r292847, r292849

Restore dryrun support for pw groupmod
Remove useless assignement of linelen
Simplify code for parsing extra groups

git-svn-id: svn://svn.freebsd.org/base/stable/10@292965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r278449, r278926:
gjb [Wed, 30 Dec 2015 13:12:54 +0000 (13:12 +0000)]
MFC r278449, r278926:

 r278449:
  Enable multi-threaded xz(1) compression for release install
  media.

 r278926 (rpaulo):
  Use xz(1) via pipe when compressing the release distribution
  tarballs.

Tested on: stable/10@r292855
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@292940 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292765: Allocate separate scratch space for scanner purposes.
mav [Wed, 30 Dec 2015 11:55:19 +0000 (11:55 +0000)]
MFC r292765: Allocate separate scratch space for scanner purposes.

This space does not require DMA syncing. It reduces lock scope of the DMA
scratch space.  It allows whole DMA scratch space to be used to I/O, so now
we can fetch up to ~1000 ports from SNS.

Due to the last fact, increase maximal number of ports from 256 to 1024.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292931 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292764: Split DMA buffers for request, response and ATIO queues.
mav [Wed, 30 Dec 2015 11:54:37 +0000 (11:54 +0000)]
MFC r292764: Split DMA buffers for request, response and ATIO queues.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292929 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292745: Use single DMA tag for scratch areas of all virtual ports.
mav [Wed, 30 Dec 2015 11:53:21 +0000 (11:53 +0000)]
MFC r292745: Use single DMA tag for scratch areas of all virtual ports.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292927 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292741: Make port logins asynchronous, following r292739 logic.
mav [Wed, 30 Dec 2015 11:51:35 +0000 (11:51 +0000)]
MFC r292741: Make port logins asynchronous, following r292739 logic.

This is even more important since it involves more network operations and
more prone to delays and timeouts.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292739: Make virtual ports control asynchronous.
mav [Wed, 30 Dec 2015 11:50:52 +0000 (11:50 +0000)]
MFC r292739: Make virtual ports control asynchronous.

Before this change virtual ports control IOCBs were executed synchronously
via Execute IOCB mailbox command.  It required exclusive use of scratch
space of driver and mailbox registers of the hardware.  Because of that
shared resources use this code could not really sleep, having to spin for
completion, blocking any other operation.

This change introduces new asynchronous design, sending the IOCBs directly
on request queue and gracefully waiting for their return on response queue.
Returned IOCBs are identified with unified handle space from r292725.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292922 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292725: Unify handles allocation for initiator and target IOCBs.
mav [Wed, 30 Dec 2015 11:49:48 +0000 (11:49 +0000)]
MFC r292725: Unify handles allocation for initiator and target IOCBs.

I am not sure why this was split long ago, but I see no reason for it.
At this point this unification just slightly reduces memory usage, but
as next step I plan to reuse shared handle space for other IOCB types.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292921 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292715: Clear virtual port's port database when disabling it.
mav [Wed, 30 Dec 2015 11:49:04 +0000 (11:49 +0000)]
MFC r292715: Clear virtual port's port database when disabling it.

Previously it was done only on full chip reinit, that caused old ports
resurrect in case of virtual port reenabling.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292919 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292690: Some polishing for command timeouts handling.
mav [Wed, 30 Dec 2015 11:48:17 +0000 (11:48 +0000)]
MFC r292690: Some polishing for command timeouts handling.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292918 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292610: Fix speed setting by NVRAM for 24xx and above chips.
mav [Wed, 30 Dec 2015 11:47:33 +0000 (11:47 +0000)]
MFC r292610: Fix speed setting by NVRAM for 24xx and above chips.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292916 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoBump __FreeBSD_version per pci(4) changes made in r292907
ngie [Wed, 30 Dec 2015 08:53:12 +0000 (08:53 +0000)]
Bump __FreeBSD_version per pci(4) changes made in r292907

Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292908 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r270212,r270332:
ngie [Wed, 30 Dec 2015 08:52:03 +0000 (08:52 +0000)]
MFC r270212,r270332:

This helps reduce the diff in pci(4) between head and stable/10 to help pave
the way for bringing in IOV/nv(9) more cleanly

Differential Revision: https://reviews.freebsd.org/D4728
Relnotes: yes
Reviewed by: hselasky (ofed piece), royger (overall change)
Sponsored by: EMC / Isilon Storage Division

r270212 (by royger):

pci: make MSI(-X) enable and disable methods of the PCI bus

Make the functions pci_disable_msi, pci_enable_msi and pci_enable_msix
methods of the newbus PCI bus. This code should not include any
functional change.

Sponsored by: Citrix Systems R&D
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D354

dev/pci/pci.c:
 - Convert the mentioned functions to newbus methods.
 - Fix the callers of the converted functions.

sys/dev/pci/pci_private.h:
dev/pci/pci_if.m:
 - Declare the new methods.

dev/pci/pcivar.h:
 - Add helpers to call the newbus methods.

ofed/include/linux/pci.h:
 - Add define to prevent the ofed version of pci_enable_msix from
   clashing with the FreeBSD native version.

r270332 (by royger):

pci: add a new pci_child_added newbus method.

This is needed so when running under Xen the calls to pci_child_added
can be intercepted and a custom Xen method can be used to register
those devices with Xen. This should not include any functional
change, since the Xen implementation will be added in a following
patch and the native implementation is a noop.

Sponsored by: Citrix Systems R&D
Reviewed by: jhb

dev/pci/pci.c:
dev/pci/pci_if.m:
dev/pci/pci_private.h:
dev/pci/pcivar.h:
 - Add the pci_child_added newbus method.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292907 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r267858:
royger [Wed, 30 Dec 2015 08:15:43 +0000 (08:15 +0000)]
MFC r267858:

xen/virtio: fix balloon drivers to not mark pages as WIRED

In the Xen case make sure pages are zeroed before giving them back to the
hypervisor, or else we might be leaking data. Also remove the
balloon_{append/retrieve} and link pages directly into the ballooned_pages
queue using the plinks.q field in the page struct.

Sponsored by: Citrix Systems R&D
Requested by: bapt

git-svn-id: svn://svn.freebsd.org/base/stable/10@292906 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292658: Install ld also as ld.bfd, for use with cc -fuse-ld=bfd
emaste [Wed, 30 Dec 2015 01:02:22 +0000 (01:02 +0000)]
MFC r292658: Install ld also as ld.bfd, for use with cc -fuse-ld=bfd

git-svn-id: svn://svn.freebsd.org/base/stable/10@292898 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC of 291244, 291380, 291459, 291460, 291671, and 291743:
mckusick [Wed, 30 Dec 2015 00:04:33 +0000 (00:04 +0000)]
MFC of 291244, 291380, 291459, 291460, 291671, and 291743:

  This MFC includes changes to better manage the vnode freelist
  and to streamline the allocation and freeing of vnodes.

  Note that to maintain the KPI the VI_AGE flag is left defined
  in sys/vnode.h though its use is dropped as described in 291380.
  To maintain KBI the vfs.vlru_alloc_cache_src sysctl variable
  remains though it no longer has any effect as described in 291244.

MFC of 291244:
  Move the comment about resident pages preventing vnode from leaving
  active list, into the header comment for vdrop(), which is the
  function that decides whether to leave the vnode on the list.  Note
  that dirty page write-out in vinactive() is asynchronous.

  Discussed with: alc
  Sponsored by:   The FreeBSD Foundation

  MFC of 291380:
  Remove VI_AGE vnode iflag, it is unused.

  Noted by:       bde
  Sponsored by:   The FreeBSD Foundation

MFC of 291459:
  For performance reasons, it is useful to have a single string used as
  the name of a filesystem when setting it as the first parameter to the
  getnewvnode() function. Most filesystems call getnewvnode from just one
  place so can use a literal string as the first parameter. However, NFS
  calls getnewvnode from two places, so we create a global constant string
  that can be used by the two instances. This change also collapses two
  instances of getnewvnode() in the UFS filesystem to a single call.

  Reviewed by: kib
  Tested by:   Peter Holm

MFC of 291460:
  As the kernel allocates and frees vnodes, it fully initializes them
  on every allocation and fully releases them on every free.  These
  are not trivial costs: it starts by zeroing a large structure then
  initializes a mutex, a lock manager lock, an rw lock, four lists,
  and six pointers. And looking at vfs.vnodes_created, these operations
  are being done millions of times an hour on a busy machine.

  As a performance optimization, this code update uses the uma_init
  and uma_fini routines to do these initializations and cleanups only
  as the vnodes enter and leave the vnode_zone. With this change the
  initializations are only done kern.maxvnodes times at system startup
  and then only rarely again. The frees are done only if the vnode_zone
  shrinks which never happens in practice. For those curious about the
  avoided work, look at the vnode_init() and vnode_fini() functions in
  kern/vfs_subr.c to see the code that has been removed from the main
  vnode allocation/free path.

  Reviewed by: kib
  Tested by:   Peter Holm

MFC of 291671:
  We need to zero out the union of pointers in a freed vnode structure.

  Fix from:  Mateusz Guzik
  Tested by: Jason Unovitch

MFC of 291743:
  We need to zero out the clustering variables in a freed vnode structure.
  For completeness add a VNASSERT that there are no threads waiting on a
  range lock (this was previously checked on every vnode free).

  Reported by; Rick Macklem
  Fix from:    Mateusz Guzik

git-svn-id: svn://svn.freebsd.org/base/stable/10@292895 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agocrunchide: Restore IA-64 support accidentally lost in r292421 mismerge
emaste [Tue, 29 Dec 2015 20:36:11 +0000 (20:36 +0000)]
crunchide: Restore IA-64 support accidentally lost in r292421 mismerge

Reported by: ngie

git-svn-id: svn://svn.freebsd.org/base/stable/10@292885 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r265842,r266120,r266121,r266959,r267148,r269985,r281789,r282261,r285064:
ngie [Tue, 29 Dec 2015 18:22:06 +0000 (18:22 +0000)]
MFC r265842,r266120,r266121,r266959,r267148,r269985,r281789,r282261,r285064:

r265842 (by eadler):

arcconfig: add one

Add a .arcconfig to allow arc to work in its usual way.

r266120 (by bapt):

Add project name to the arc config it is still required when arcanist is used with SVN

r266121 (by bapt):

Add the missing coma

r266959 (by eadler):

arc: add linting for python files

r267148 (by bapt):

Prevent arc commands from overwriting history

r269985 (by gjb):

Update the URL to the phabricator instance.

Sponsored by: The FreeBSD Foundation

r281789 (by eadler):

phabricator related changes:
- don't lint either contrib or crypto: these are both externally written
  directories
- add additional linters for spelling (check common typos like teh ->
  the)
- chmod linter checks for executible bit on bad files
- merge-conflict checks for merge conflict tokens then may have been
  resolved incorrectly
- filename checks for back characters in filenames
- json for json syntax correctness

- remove history.immutable: it is meaningless on subversion, and causes
  workflow problems when trying to use git.  It it set to 'true' by
  default with hg

r282261 (by eadler):

Phabricator: enable "history.immutable":
With certain arc workflows leaving history.immutable as false
results in using the upstream template instead of our usual
commit template.  Since the git workflow issues alluded to in my
prior commit message can be worked around, set history.immutable
once again.

r285064 (by mat):

Add repository.callsign, to help arcanist figure out what repo it's
doing things on when not using Subversion.

With hat: phabric-admin@
Sponsored by: Absolight

git-svn-id: svn://svn.freebsd.org/base/stable/10@292879 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292621:
kib [Tue, 29 Dec 2015 16:11:43 +0000 (16:11 +0000)]
MFC r292621:
Keep devfs mount locked for the whole duration of the devfs_setattr(),
and ensure that our dirent is instantiated.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292875 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292620:
kib [Tue, 29 Dec 2015 16:09:15 +0000 (16:09 +0000)]
MFC r292620:
Show the actual error code when interpreter cannot be loaded.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292585:
ngie [Tue, 29 Dec 2015 01:08:58 +0000 (01:08 +0000)]
MFC r292585:

Prevent use-after-free with ctx->ns in set_nameservers(..), which could occur
if the memory wasn't allocated again later on

Reported by: Coverity
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292855 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292582:
ngie [Tue, 29 Dec 2015 01:08:07 +0000 (01:08 +0000)]
MFC r292582:

Dump out the output from flock_helper on failure so failures with the
test app can be debugged

Obtained from: Isilon OneFS (^/onefs/head@r511419)
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292854 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292581:
ngie [Tue, 29 Dec 2015 01:07:00 +0000 (01:07 +0000)]
MFC r292581:

Use stable output to a test file instead of depending on the OS name being
grep'able in /bin/sh

This fixes the situation where the OS has been rebranded to something other
than `FreeBSD`

Obtained from: Isilon OneFS (^/onefs/head@r511419)
Reviewed by: cem, Daniel O'Connor <darius@dons.net.au>
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292853 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292578:
ngie [Tue, 29 Dec 2015 01:05:48 +0000 (01:05 +0000)]
MFC r292578:

Don't dump core files with lib/libc/ssp/ssp_test and lib/libc/gen/assert_test

The default `sysctl kern.corefile` value is compatible with `kyua test` (FreeBSD
will dump to the current directory). If it's set to an absolute path however,
`kyua test` will not be able to clean up the corefiles after the fact

The corefiles have little value when testing the behavior of feature behavior,
so just disable corefile generation

Obtained from: Isilon OneFS (^/onefs/head@r511419)
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292852 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292550, r292595:
ume [Tue, 29 Dec 2015 00:42:35 +0000 (00:42 +0000)]
MFC r292550, r292595:
  Simplify _map_v4v6_address().
  We don't need to use a temporary buffer, here.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292569:
ngie [Mon, 28 Dec 2015 23:32:27 +0000 (23:32 +0000)]
MFC r292569:

Make the mac_portacl testcases work / more robust

- A trap(1) call has been added to the test scripts to better
  ensure that the tests do a better job at trying to restore the
  test host state at the end of the tests (if the test was
  interrupted before it would leave the system in an odd state,
  potentially making the test results for subsequent runs
  non-deterministic).
- Add root user checks
- Fix nc(1) usage:
  -- -o is deprecated
  -- Using `-w 10` will make the call timeout after 10 seconds so it
     doesn't block indefinitely
- Use local variables
- Be more terse in the error messages
- Parameterize out "127.0.0.1"

Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292845 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292317,r292318,r292323,r292324,r292665:
ngie [Mon, 28 Dec 2015 23:05:13 +0000 (23:05 +0000)]
MFC r292317,r292318,r292323,r292324,r292665:

r292317:

Integrate tools/regression/lib/libc/resolv into the FreeBSD test suite as
lib/libc/tests/resolv

Convert the testcases to ATF

Sponsored by: EMC / Isilon Storage Division

r292318:

Add Makefile accidentally missed in r292317

Sponsored by: EMC / Isilon Storage Division

r292323:

Integrate tools/regression/lib/libc/nss into the FreeBSD test suite as
lib/libc/tests/nss

- Convert the testcases to ATF
- Do some style(9) cleanups:
-- Sort headers
-- Apply indentation fixes
-- Remove superfluous parentheses
- Explicitly print out debug printfs for use with `kyua {debug,report}`; for
  items that were overly noisy, they've been put behind #ifdef DEBUG
  conditionals
- Fix some format strings

Sponsored by: EMC / Isilon Storage Division

r292324:

Iterate down lib/libc/tests/nss...

Sponsored by: EMC / Isilon Storage Division

r292665:

Increase the timeout for resolv_test from the default (300 seconds) to
450 seconds

This is required on slower network connections, and on older releases
(stable/10 seems to be slower as far as name resolution goes.. not sure
why yet).

Remove an outdated comment in the Makefile from when I was working on
this code over a year ago on github

Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292844 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r290515: periodic: Fix backwards compatibility for
jilles [Mon, 28 Dec 2015 21:35:06 +0000 (21:35 +0000)]
MFC r290515: periodic: Fix backwards compatibility for
daily_status_security_* vars.

Most daily_status_security_* variables in periodic.conf were changed to
security_status_* in SVN r254974. The compatibility code for the old names
did not work.

PR: 204331
Submitted by: martin at lispworks.com

git-svn-id: svn://svn.freebsd.org/base/stable/10@292841 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r290337: Add sysrc(8) support for "rc.conf.d"
dteske [Mon, 28 Dec 2015 17:50:31 +0000 (17:50 +0000)]
MFC r290337: Add sysrc(8) support for "rc.conf.d"

Differential Revision: https://reviews.freebsd.org/D3551
Reviewed by: allanjude
Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@292833 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292541:
kib [Mon, 28 Dec 2015 09:03:29 +0000 (09:03 +0000)]
MFC r292541:
Recheck curthread->td_su after the VFS_SYNC() call.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292830 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292445, r292554:
ume [Mon, 28 Dec 2015 03:37:13 +0000 (03:37 +0000)]
MFC r292445, r292554:
  Use _map_v4v6_address().

git-svn-id: svn://svn.freebsd.org/base/stable/10@292826 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292539:
ume [Mon, 28 Dec 2015 03:26:16 +0000 (03:26 +0000)]
MFC r292539:
  If we end up following a CNAME chain that does not find
  any data return that instead of internal error.

PR: 156684

git-svn-id: svn://svn.freebsd.org/base/stable/10@292824 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292706:
pkelsey [Mon, 28 Dec 2015 02:43:12 +0000 (02:43 +0000)]
MFC r292706:

Implementation of server-side TCP Fast Open (TFO) [RFC7413].

TFO is disabled by default in the kernel build.  See the top comment
in sys/netinet/tcp_fastopen.c for implementation particulars.

Differential Revision: https://reviews.freebsd.org/D4350
Sponsored by: Verisign, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292823 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292507,r292508:
ngie [Mon, 28 Dec 2015 00:05:31 +0000 (00:05 +0000)]
MFC r292507,r292508:

r292507:

- Use LOCALBASE instead of KYUA_PREFIX for the --prefix to kyua(1)
- Use LOCALBASE instead of hardcoding /usr/local for perl

Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff)
Reviewed by: emaste, Evan Cramer <eccramer@gmail.com>
Sponsored by: EMC / Isilon Storage Division

r292508:

Document LOCALBASE in the bsd.test.mk section

Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff)
Reviewed by: emaste, Evan Cramer <eccramer@gmail.com>
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292812 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292518.
cy [Sun, 27 Dec 2015 23:25:21 +0000 (23:25 +0000)]
MFC r292518.

Don't assume checksums will be calculated later when fastfoward is
enabled (by default in r290383).

PR: 72210

git-svn-id: svn://svn.freebsd.org/base/stable/10@292811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292489:
ngie [Sun, 27 Dec 2015 21:17:30 +0000 (21:17 +0000)]
MFC r292489:

Disable test-ctrig.t testcases which fail assertions on i386

Tested on: stable/10 (amd64/i386), head (amd64/i386)
PR: 205446
X-MFC to: stable/10
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292801 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292492,r292495,r292647:
ngie [Sun, 27 Dec 2015 21:08:46 +0000 (21:08 +0000)]
MFC r292492,r292495,r292647:

r292492:

- Use nitems instead of handrolling the macro
- Use a separate variable for tracking the testcase count instead
  of hardcoding the offset for the testcases

Sponsored by: EMC / Isilon Storage Division

r292495:

Initialize j so it doesn't print out a garbage index

Use it consistently instead of i in the first loop

Sponsored by: EMC / Isilon Storage Division

r292647:

Use j instead of a hardcoded index (9) and increment it after
running the NaNs testcases

Pointyhat to: ngie
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292799 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r285684 (partial)
marius [Sun, 27 Dec 2015 21:08:09 +0000 (21:08 +0000)]
MFC: r285684 (partial)

Record dependencies of gdb/gdbtui/kgdb on binutils/lib{bfd,iberty,opcodes},
fixing parallel builds.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292798 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292661:
ngie [Sun, 27 Dec 2015 21:03:39 +0000 (21:03 +0000)]
MFC r292661:

Remove redundant vmbus_select_outgoing_channel declaration already handled
in include/hyperv.h

This unbreaks the gcc 4.2.1 kernel build of hyperv

Differential Revision: https://reviews.freebsd.org/D4684
Reviewed by: royger
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292797 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r284969:
ngie [Sun, 27 Dec 2015 21:02:56 +0000 (21:02 +0000)]
MFC r284969:
r284969 (by lwhsu):

- Fix `make depend` in sys/modules

Differential Revision: https://reviews.freebsd.org/D2951
Approved by: delphij

git-svn-id: svn://svn.freebsd.org/base/stable/10@292796 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292491,r292493,r292496:
ngie [Sun, 27 Dec 2015 20:54:48 +0000 (20:54 +0000)]
MFC r292491,r292493,r292496:

r292491:

Disable test-ctrig.t testcases which fail assertions on i386 [*]

Also, don't compile the exp2l(3) testcases on platforms that don't support the
libcall (technically only x86 right now). This makes this test buildable on
arm*/mips*/powerpc*

Tested on: stable/10 (amd64/i386), head (amd64/i386)
PR: 205446 [*]
X-MFC to: stable/10
Sponsored by: EMC / Isilon Storage Division

r292493:

Don't run test-fma on i386

It completely fails all assertions on i386 on both stable/9 and stable/10

PR: 205448
X-MFC to: stable/10
Sponsored by: EMC / Isilon Storage Division

r292496:

Skip the testcases on i386 (all the assertions fail) [*]

Also, don't compile the ldexpl(3) testcases on platforms that don't support
the libcall (technically only x86 right now). This makes this test buildable on
arm*/mips*/powerpc*

PR: 205449 [*]
Tested on: stable/10 (amd64/i386), head (amd64/i386)
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292795 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r285840
marius [Sun, 27 Dec 2015 20:52:32 +0000 (20:52 +0000)]
MFC: r285840

- In mpt_send_handshake_cmd(), use bus_space_write_stream_4(9) for writing
  raw data to the doorbell offset in order to clarify the intent and for
  avoiding unnecessarily converting the endianess back and forth.
  Unfortunately, the same can't be done in mpt_recv_handshake_reply() as
  16-bit data needs to be read using 32-bit bus accessors.
- In mpt_recv_handshake_reply(), get rid of a redundant variable.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292794 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r285909, r285913 (partial)
marius [Sun, 27 Dec 2015 20:49:32 +0000 (20:49 +0000)]
MFC: r285909, r285913 (partial)

- Probe UICLASS_CDC/UISUBCLASS_ABSTRACT_CONTROL_MODEL/0xff again. This
  variant of Microsoft RNDIS, i. e. their unofficial version of CDC ACM,
  has been disabled in r261544 (r262363 in stable/10) for resolving a
  conflict with umodem(4). Eventually, in r275790 (r276243 in stable/10)
  that problem was dealt with in the right way. However, r275790 failed
  to put probing of RNDIS devices in question back.
- Initialize the device prior to querying it, as required by the RNDIS
  specification. Otherwise already determining the MAC address may fail
  rightfully.
- On detach, halt the device again.
- Use UCDC_SEND_ENCAPSULATED_{COMMAND,RESPONSE}. While these macros are
  resolving to the same values as UR_{CLEAR_FEATURE,GET_STATUS}, the
  former set is way more appropriate in this context.
- Report unknown - rather: unimplemented - events unconditionally and
  not just in debug mode. This ensures that we'll get some hint of what
  is going wrong instead of the driver silently failing.
- Deal with the Microsoft ActiveSync requirement of using an input buffer
  the size of the expected reply or larger - except for variably sized
  replies - when querying a device.
- Fix some pointless NULL checks, style bugs etc.

This changes allow urndis(4) to communicate with a Microsoft-certified
USB RNDIS test token.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292792 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r285912
marius [Sun, 27 Dec 2015 19:47:56 +0000 (19:47 +0000)]
MFC: r285912

- Use __FBSDID().
- Const'ify cons_to_vga_colors.
- Fix line wrapping.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292790 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r287726
marius [Sun, 27 Dec 2015 19:37:47 +0000 (19:37 +0000)]
MFC: r287726

- Factor out the common and generic parts of the sparc64 host-PCI-bridge
  drivers into the revived sys/sparc64/pci/ofw_pci.c, previously already
  serving a similar purpose. This has been done with sun4v in mind, which
  explains a) the otherwise not that obvious scheme employed and b) why
  reusing sys/powerpc/ofw/ofw_pci.c was even lesser an option.
- Add a workaround for QEMU once again not emulating real machines, in
  this case by not providing the OFW_PCI_CS_MEM64 range. [1]

Submitted by: jhb [1]

git-svn-id: svn://svn.freebsd.org/base/stable/10@292789 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r287728
marius [Sun, 27 Dec 2015 17:58:58 +0000 (17:58 +0000)]
MFC: r287728

Merge r286374 from x86:

Formally pair store_rel(&smp_started) with load_acq(&smp_started).
Similarly to x86, this change is mostly a NOP due to the kernel
being run in total store order.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292787 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292517: sh/mknodes: Close files and check for errors when writing.
jilles [Sun, 27 Dec 2015 17:53:39 +0000 (17:53 +0000)]
MFC r292517: sh/mknodes: Close files and check for errors when writing.

This is a build tool only and does not affect run time.

PR: 204951

git-svn-id: svn://svn.freebsd.org/base/stable/10@292786 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r287767
marius [Sun, 27 Dec 2015 17:51:10 +0000 (17:51 +0000)]
MFC: r287767

- Sanity check that the parent ranges given in the "ranges" property
  of PCI-EBus-bridges actually match the BARs as specified in and
  required by [1, p. 113 f.]. Doing so earlier would have simplified
  diagnosing a bug in QEMU/OpenBIOS getting the mapping of child
  addresses wrong, which still needs to be fixed there.
  In theory, we could try to change the BARs accordingly if we hit
  this problem. However, at least with real machines changing the
  decoding likely won't work, especially if the PCI-EBus-bridge is
  beneath an APB one. So implementing such functionality generally
  is rather pointless.
- Actually change the allocation type of EBus resources if they
  change from SYS_RES_MEMORY to SYS_RES_IOPORT when mapping them
  to PCI ranges in ebus_alloc_resource() and passing them up to
  bus_activate_resource(9). This may happen with the QEMU/OpenBIOS
  PCI-EBus-bridge but not real ones. Still, this is only cleans up
  the code and the result of resource allocation and activation is
  unchanged.
- Change the remainder of printf(9) to device_printf(9) calls and
  canonicalize their wording.

Peripheral Component Interconnect Input Output Controller,
Part No.: 802-7837-01, Sun Microelectronics, March 1997 [1]

git-svn-id: svn://svn.freebsd.org/base/stable/10@292785 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r287768, r290566, r290946
marius [Sun, 27 Dec 2015 17:34:18 +0000 (17:34 +0000)]
MFC: r287768, r290566, r290946

- Although it doesn't make a whole lot of sense to enable RX and TX
  before their initial configuration is done, it turns out that r281337
  (MFCed to stable/10 in r285177) has the inverse effect on some older
  chips. Moreover, as with newer chips before, two chips seemingly
  identical according to their MAC revisions may behave differently in
  this regard, with most working but a few not, making changes extremely
  hard to test.
  Closer inspection of the corresponding Linux code suggests that RX
  and TX should only be enabled after their initial configuration with
  RTL8168G and later chips, i. e. RTL8106E{,US}, RTL8107E, as well as
  RTL8168{EP,G,GU,H}, so limit the new code path to these. [1]
- Distinguish between RTL8168H and RTL8107E, with the latter being the
  10/100-Mbit/s-only variant of the former.
- For MAC variants that can only do Fast Ethernet at a maximum, ensure
  that we don't advertise Gigabit Ethernet speed.
- In re_stop(), do the inverse of re_init_locked() and enable RXDV gate
  on RTL8168G and later chips again, matching what Linux does.
- With the latter in place, it turns out that WOL previously only worked
  by accident with RTL8168G and later chips when the interface actually
  was brought up. This is due to the fact that with these MAC variants,
  RXDV gate needs be disabled for WOL to work. So in re_setwol() do just
  that when IFCAP_WOL is requested.
- Add preliminary support for RTL8168H and RTL8107E, with the latter
  being the 10/100-Mbit/s-only variant of the former.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292783 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r271864
marius [Sun, 27 Dec 2015 17:12:54 +0000 (17:12 +0000)]
MFC: r271864

Move rl(4) to dev/rl.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292780 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292513: clock_gettime(2),gettimeofday(2): Remove [EFAULT] error.
jilles [Sun, 27 Dec 2015 15:30:13 +0000 (15:30 +0000)]
MFC r292513: clock_gettime(2),gettimeofday(2): Remove [EFAULT] error.

Depending on system configuration and parameters, clock_gettime() and
gettimeofday() may not be system calls. If so, passing an invalid pointer
will cause a signal and not an [EFAULT] error.

From a standards perspective, this is OK since passing an invalid pointer is
undefined behaviour.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292776 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r286785, r291088, r291120
marius [Sun, 27 Dec 2015 15:18:01 +0000 (15:18 +0000)]
MFC: r286785, r291088, r291120
- Reformat x86 bounce buffer synchronization code to reduce indentation.
  No functional change.
- Avoid a NULL pointer dereference in bounce_bus_dmamap_sync() when the
  map has been created via bounce_bus_dmamem_alloc(). Even for coherent
  DMA - which bus_dmamem_alloc(9) typically is used for -, calling of
  bus_dmamap_sync(9) isn't optional. [1]
- Avoid a NULL pointer dereference in bounce_bus_dmamap_unload() when
  the map has been created via bounce_bus_dmamem_alloc(). In that case
  bus_dmamap_unload(9) typically isn't called during normal operation
  but still should be during detach, cleanup from failed attach etc. [2]

PR: 188899 (non-original problem) [1]
Submitted by: yongari [2]

git-svn-id: svn://svn.freebsd.org/base/stable/10@292775 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r291121
marius [Sun, 27 Dec 2015 14:39:47 +0000 (14:39 +0000)]
MFC: r291121

Merge from r290547:
Since r289279 bufinit() uses mp_ncpus so adapt to what x86 does and
set this variable already in cpu_mp_setmaxid().
While at it, rename cpu_cpuid_prop() to cpu_portid_prop() as well as
the MD cpuid variable to portid to avoid confusion with the MI use
of "cpuid" and make some variable static/global in order to reduce
stack usage.

PR: 204685

git-svn-id: svn://svn.freebsd.org/base/stable/10@292771 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFH: r278640
julian [Sun, 27 Dec 2015 13:37:14 +0000 (13:37 +0000)]
MFH: r278640

Revise default limit for maximum of netgraph data items.
With modern internet speeds the limit can be reached even
on a single L2TP link.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292770 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292493:
ngie [Sun, 27 Dec 2015 11:12:09 +0000 (11:12 +0000)]
MFC r292493:

Don't run test-fma on i386

It completely fails all assertions on i386 on both stable/9 and stable/10

PR: 205448
X-MFC to: stable/10
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292769 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292500,r292501,r292504,r292509:
ngie [Sun, 27 Dec 2015 11:04:11 +0000 (11:04 +0000)]
MFC r292500,r292501,r292504,r292509:

r292500:

Simplify Kyuafile generation logic with KYUAFILE == auto and
related complexity with variables

Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff)
Reviewed by: emaste, Evan Cramer <eccramer@gmail.com>
Sponsored by: EMC / Isilon Storage Division

r292501:

Fix typo in r292500 by adding missing conditional statement

Pointyhat to: ngie
Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff)
Sponsored by: EMC / Isilon Storage Division

r292504:

Deal with another hardcoded reference to Kyuafile in the KYUAFILE == auto
case

Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff)
Reviewed by: emaste, Evan Cramer <eccramer@gmail.com>
Sponsored by: EMC / Isilon Storage Division

r292509:

Clean up Kyuafile.tmp, not Kyuafile.auto.tmp

Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff)
Reviewed by: emaste, Evan Cramer <eccramer@gmail.com>
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@292768 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292510:
kib [Sun, 27 Dec 2015 00:42:13 +0000 (00:42 +0000)]
MFC r292510:
Fix lockf(3) cancellation behaviour.

git-svn-id: svn://svn.freebsd.org/base/stable/10@292762 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r292514:
ume [Sun, 27 Dec 2015 00:37:04 +0000 (00:37 +0000)]
MFC r292514:
  addrinfo.ai_family is an address family, not a protocol family.

PR: 162434

git-svn-id: svn://svn.freebsd.org/base/stable/10@292760 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f