]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRegenerate config.h for OpenBSM 1.2 alpha 4.
Christian Brueffer [Fri, 18 Dec 2015 09:49:11 +0000 (09:49 +0000)]
Regenerate config.h for OpenBSM 1.2 alpha 4.

MFC after: 2 weeks

8 years agoMerge OpenBSM 1.2 alpha 4.
Christian Brueffer [Fri, 18 Dec 2015 09:48:01 +0000 (09:48 +0000)]
Merge OpenBSM 1.2 alpha 4.

MFC after: 2 weeks
Relnotes: yes

8 years agoAdd a generic firmware dependent handle to pass from the loader to the
Warner Losh [Fri, 18 Dec 2015 06:13:18 +0000 (06:13 +0000)]
Add a generic firmware dependent handle to pass from the loader to the
kernel. This will be used for passing in things like the system table
from EFI or other similar metadata that can be used by the kernel to
communicate with the firmware.

8 years agoNo need to test command values this way. There can be only one, even
Warner Losh [Fri, 18 Dec 2015 05:55:24 +0000 (05:55 +0000)]
No need to test command values this way. There can be only one, even
though the encoding is bit-wise today...

8 years agoUse variable names that aren't as prone to dyslexic confusion.
Warner Losh [Fri, 18 Dec 2015 05:45:49 +0000 (05:45 +0000)]
Use variable names that aren't as prone to dyslexic confusion.

Suggested by: jmallet@

8 years ago[intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c.
Adrian Chadd [Fri, 18 Dec 2015 05:43:59 +0000 (05:43 +0000)]
[intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c.

The ci20 port (by kan@) is going to reuse almost all of the intrng code
since the SoC in question looks suspiciously like someone took an ARM
SoC design and replaced the ARM core with a MIPS core.

* migrate out the code;
* rename ARM_ -> INTR_;
* rename arm_ -> intr_;
* move the interrupt flush routine from intr.c / intrng.c into
  arm/machdep_intr.c - removing the code duplication and removing
  the ARM specific bits from here.

Thanks to the Star Wars: The Force Awakens premiere line for allowing
me a couple hours of quiet time to finish the universe builds.

Tested:

* make universe

TODO:

* The structure definitions in subr_intr.c still includes machine/intr.h
  which requires one duplicates all of the intrng definitions in
  the platform code (which kan has done, and I think we don't have to.)

  Instead I should break out the generic things (function declarations,
  common intr structures, etc) into a separate header.

* Kan has requested I make the PIC based IPI stuff optional.

8 years agoScheduling module to introduce a fixed delay into the I/O path.
Warner Losh [Fri, 18 Dec 2015 05:39:25 +0000 (05:39 +0000)]
Scheduling module to introduce a fixed delay into the I/O path.

8 years agoCreate a simplebus PNP info wrapper.
Warner Losh [Fri, 18 Dec 2015 05:29:22 +0000 (05:29 +0000)]
Create a simplebus PNP info wrapper.

Differential Review: https://reviews.freebsd.org/D4517

8 years agoFlag sysctl hw.mmc.debug as a tunable, since often you want to debug the
Ian Lepore [Fri, 18 Dec 2015 01:32:43 +0000 (01:32 +0000)]
Flag sysctl hw.mmc.debug as a tunable, since often you want to debug the
bus probing during system startup.

8 years agoFix the clock divisor calc for imx6 sdcard bus speed.
Ian Lepore [Fri, 18 Dec 2015 01:25:30 +0000 (01:25 +0000)]
Fix the clock divisor calc for imx6 sdcard bus speed.

I don't know what alternate universe I was inhabiting when I wrote it
originally, but apparently the basic workings of mathematics were different
than in this universe.  I also can't explain how it ever worked, except "by
accident", because completely bogus values were being written into the
divisor register.

8 years agoioat(4): Add an API to get HW revision
Conrad Meyer [Thu, 17 Dec 2015 23:21:37 +0000 (23:21 +0000)]
ioat(4): Add an API to get HW revision

Different revisions support different operations.  Refer to Intel
External Design Specifications to figure out what your hardware
supports.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix regression in if_ndis in r280347.
Gleb Smirnoff [Thu, 17 Dec 2015 21:01:19 +0000 (21:01 +0000)]
Fix regression in if_ndis in r280347.

Submitted by: avos
Reported by: Ev Bogdanov <evbogdanov yahoo.com>
Tested by: Ivan Kormachev <ikormachev depit.ru>
MFC after: 3 days

8 years agoExit cleanly if malloc() fails to allocate a buffer for a copy of the
John Baldwin [Thu, 17 Dec 2015 20:42:05 +0000 (20:42 +0000)]
Exit cleanly if malloc() fails to allocate a buffer for a copy of the
current MBR.

PR: 205322
Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com>
MFC after: 1 week

8 years agot seems certain Intel GPUs use GPIO bitbanging over a child device
John Baldwin [Thu, 17 Dec 2015 20:33:20 +0000 (20:33 +0000)]
t seems certain Intel GPUs use GPIO bitbanging over a child device
instead of GMBUS access for I2C transfers.  The GMBUS driver falls back
to this mode when a transfer times out.  However, the first transfer to
timeout was sending the request back to itself resulting in an panic due
to recursing on a lock.  Fix it to forward the request on to the proper
device.  This appears to have been accidentally changed in r277487.

Reported by: Joe Maloney <jmaloney@pcbsd.org>
Reviewed by: adrian, dumbbell, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D4599

8 years agoIncorrect length in calloc() call, already fixed upstream.
Dag-Erling Smørgrav [Thu, 17 Dec 2015 19:36:25 +0000 (19:36 +0000)]
Incorrect length in calloc() call, already fixed upstream.

PR: 204769
Submitted by: David Binderman <dcb314@hotmail.com>
MFC after: 1 week

8 years agoImport RISC-V machine headers. This is a minimal set required to compile
Ruslan Bukin [Thu, 17 Dec 2015 18:44:30 +0000 (18:44 +0000)]
Import RISC-V machine headers. This is a minimal set required to compile
kernel and userland.

Reviewed by: andrew, imp, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D4554

8 years agovm_page_replace: add wrapper to KASSERT about old page
Conrad Meyer [Thu, 17 Dec 2015 17:48:57 +0000 (17:48 +0000)]
vm_page_replace: add wrapper to KASSERT about old page

It turns out the callers of vm_page_replace know exactly which page they are
replacing and would like to assert about it.  Change those from hard panics to
KASSERTs, and provide them with a wrapper so they don't have to deal with
warnings from an INVARIANTS-dependent dead store of the return value of
vm_page_replace.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: alc, kib (earlier version)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4497

8 years agoSupport the variant of the interrupt-map property where the parent bus has
Andrew Turner [Thu, 17 Dec 2015 17:00:04 +0000 (17:00 +0000)]
Support the variant of the interrupt-map property where the parent bus has
the #address-cells property set. For this we need to read more data before
the parent interrupt description.

this is only enabled on arm64 for now as it's not quite compliant with the
ePAPR spec. We should use a default of 2 where the #address-cells property
is missing, however this will need further testing across architectures.

Obtained from: ABT Systems Ltd
Sponsored by: SoftIron Inc
Differential Revision: https://reviews.freebsd.org/D4518

8 years agoRevert r292275 & r292379
Steven Hartland [Thu, 17 Dec 2015 14:41:30 +0000 (14:41 +0000)]
Revert r292275 & r292379

glebius has concerns about these changes so reverting those can be discussed
and addressed.

Sponsored by: Multiplay

8 years agoRIP Juergen Lock (nox@FreeBSD.org), you and your contributions won't be forgotten.
Christian Brueffer [Thu, 17 Dec 2015 10:37:11 +0000 (10:37 +0000)]
RIP Juergen Lock (nox@FreeBSD.org), you and your contributions won't be forgotten.

8 years agoSwitch the IPsec related statistics to using the built in sysctl
George V. Neville-Neil [Thu, 17 Dec 2015 02:02:09 +0000 (02:02 +0000)]
Switch the IPsec related statistics to using the built in sysctl
variable set rather than reading from kernel memory.
This also makes the -z (zero) flag work correctly

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D4591

8 years agoConsistently use ${AWK} instead of hard-coding the program name.
Mark Johnston [Thu, 17 Dec 2015 00:02:53 +0000 (00:02 +0000)]
Consistently use ${AWK} instead of hard-coding the program name.

MFC after: 3 days

8 years agoSupport an arbitrary number of arguments to DTrace syscall probes.
Mark Johnston [Thu, 17 Dec 2015 00:00:27 +0000 (00:00 +0000)]
Support an arbitrary number of arguments to DTrace syscall probes.

Rather than pushing all eight possible arguments into dtrace_probe()'s
stack frame, make the syscall_args struct for the current syscall available
via the current thread. Using a custom getargval method for the systrace
provider, this allows any syscall argument to be fetched, even in kernels
that have modified the maximum number of system call arguments.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix breakage caused by r292373 in ZFS/FUSE/NFS/SMBFS.
Gleb Smirnoff [Wed, 16 Dec 2015 23:48:50 +0000 (23:48 +0000)]
Fix breakage caused by r292373 in ZFS/FUSE/NFS/SMBFS.

With the new VOP_GETPAGES() KPI the "count" argument counts pages already,
and doesn't need to be translated from bytes to pages.

While here make it consistent that *rbehind and *rahead are updated only
if we doesn't return error.

Pointy hat to: glebius

8 years agoRemove the unused systrace device file and fix style bugs.
Mark Johnston [Wed, 16 Dec 2015 23:46:27 +0000 (23:46 +0000)]
Remove the unused systrace device file and fix style bugs.

MFC after: 1 week

8 years agoFix style issues around existing SDT probes.
Mark Johnston [Wed, 16 Dec 2015 23:39:27 +0000 (23:39 +0000)]
Fix style issues around existing SDT probes.

- Use SDT_PROBE<N>() instead of SDT_PROBE(). This has no functional effect
  at the moment, but will be needed for some future changes.
- Don't hardcode the module component of the probe identifier. This is
  set automatically by the SDT framework.

MFC after: 1 week

8 years agovm_page.h: page busy macro fixups
Conrad Meyer [Wed, 16 Dec 2015 23:23:12 +0000 (23:23 +0000)]
vm_page.h: page busy macro fixups

Minor changes to:
  - delete extraneous trailing semicolons from macro definitions, and
  - correct spelling of "busying" in panic messages

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: alc, kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4577

8 years agoFix issues introduced by r292275
Steven Hartland [Wed, 16 Dec 2015 22:26:28 +0000 (22:26 +0000)]
Fix issues introduced by r292275

* Fix panic for etherswitches which don't have a LLADDR.
* Disabled DELAY in unsolicited NDA, which needs further work.
* Fixed missing DELAY in carp_send_na.
* style(9) fix.

Reported by: kp & melifaro
X-MFC-With: r292275
MFC after: 1 month
Sponsored by: Multiplay

8 years agoA change to KPI of vm_pager_get_pages() and underlying VOP_GETPAGES().
Gleb Smirnoff [Wed, 16 Dec 2015 21:30:45 +0000 (21:30 +0000)]
A change to KPI of vm_pager_get_pages() and underlying VOP_GETPAGES().

o With new KPI consumers can request contiguous ranges of pages, and
  unlike before, all pages will be kept busied on return, like it was
  done before with the 'reqpage' only. Now the reqpage goes away. With
  new interface it is easier to implement code protected from race
  conditions.

  Such arrayed requests for now should be preceeded by a call to
  vm_pager_haspage() to make sure that request is possible. This
  could be improved later, making vm_pager_haspage() obsolete.

  Strenghtening the promises on the business of the array of pages
  allows us to remove such hacks as swp_pager_free_nrpage() and
  vm_pager_free_nonreq().

o New KPI accepts two integer pointers that may optionally point at
  values for read ahead and read behind, that a pager may do, if it
  can. These pages are completely owned by pager, and not controlled
  by the caller.

  This shifts the UFS-specific readahead logic from vm_fault.c, which
  should be file system agnostic, into vnode_pager.c. It also removes
  one VOP_BMAP() request per hard fault.

Discussed with: kib, alc, jeff, scottl
Sponsored by: Nginx, Inc.
Sponsored by: Netflix

8 years agoFlag the first port on a Sheevaplug ftdi serial device as jtag.
Ian Lepore [Wed, 16 Dec 2015 20:54:28 +0000 (20:54 +0000)]
Flag the first port on a Sheevaplug ftdi serial device as jtag.

8 years agosh: Fix use-after-free when attempting to modify a read-only variable.
Jilles Tjoelker [Wed, 16 Dec 2015 20:33:47 +0000 (20:33 +0000)]
sh: Fix use-after-free when attempting to modify a read-only variable.

Reported by: bapt
MFC after: 1 week

8 years agoRemove lldb(1) files if WITHOUT_LLDB is set
Ed Maste [Wed, 16 Dec 2015 19:48:03 +0000 (19:48 +0000)]
Remove lldb(1) files if WITHOUT_LLDB is set

Sponsored by: The FreeBSD Foundation

8 years agoEnable LLDB by default on amd64 and arm64
Ed Maste [Wed, 16 Dec 2015 19:23:10 +0000 (19:23 +0000)]
Enable LLDB by default on amd64 and arm64

LLDB is usable for userland core file and live debugging on amd64, and
for userland core file debugging on arm64. In general it works at least
as well on FreeBSD as our in-tree gdb version, so enable it by default
to allow for broader use and testing.

An LLDB tutorial is available at http://lldb.llvm.org/tutorial.html, and
a table mapping GDB commands to LLDB commands can be found at
http://lldb.llvm.org/lldb-gdb.html .

LLDB also has some level of support for FreeBSD on arm, mips, i386,
and powerpc, but is not yet ready to have them enabled by default.

Reviewed by: gnn
Relnotes: Yes

8 years agoUse human readable representation of ip for the pxeboot.ip kenv
Baptiste Daroussin [Wed, 16 Dec 2015 17:45:03 +0000 (17:45 +0000)]
Use human readable representation of ip for the pxeboot.ip kenv
While here use colon as a separator for pxeboot.hwaddr kenv

Sponsored by: Gandi.net

8 years agopxeboot: make the tftp loader use the option root-path directive
Baptiste Daroussin [Wed, 16 Dec 2015 17:13:09 +0000 (17:13 +0000)]
pxeboot: make the tftp loader use the option root-path directive

pxeboot in tftp loader mode (when built with LOADER_TFTP_SUPPORT) now
prefix all the path to open with the path obtained via the option 'root-path'
directive.

This allows to be able to use the traditional content /boot out of box. Meaning
it now works pretty much like all other loaders. It simplifies hosting hosting
multiple version of FreeBSD on a tftp server.

As a consequence, pxeboot does not look anymore for a pxeboot.4th (which was
never provided)

Note: that pxeboot in tftp loader mode is not built by default.

Reviewed by: rpokala
Relnotes: yes
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D4590

8 years agoUEFI: combine GetMemoryMap and ExitBootServices and retry on error
Ed Maste [Wed, 16 Dec 2015 16:19:18 +0000 (16:19 +0000)]
UEFI: combine GetMemoryMap and ExitBootServices and retry on error

The EFI memory map may change before or during the first
ExitBootServices call. In that case ExitBootServices returns an error,
and GetMemoryMap and ExitBootServices must be retried.

Glue together calls to GetMemoryMap(), ExitBootServices() and storage of
(now up-to-date) MODINFOMD_EFI_MAP metadata within a single function.

That new function - bi_add_efi_data_and_exit() - uses space previously
allocated in bi_load_efi_data() to store the memory map (it will fail if
that space is too short). It handles re-calling GetMemoryMap() once to
update the map key if necessary. Finally, if ExitBootServices() is
successful, it stores the memory map and its header as MODINFOMD_EFI_MAP
metadata.

ExitBootServices() calls are now done earlier, from within arch-
independent bi_load() code.

PR: 202455
Submitted by: Ganael LAPLANCHE
Reviewed by: kib
MFC after: 2 weeks
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D4296

8 years agoBuild mount_smbfs for arm. Also sort the subdirs.
Ian Lepore [Wed, 16 Dec 2015 15:26:31 +0000 (15:26 +0000)]
Build mount_smbfs for arm.  Also sort the subdirs.

8 years agoRemove redundant extern's that make the ppc compile fail.
Randall Stewart [Wed, 16 Dec 2015 15:16:44 +0000 (15:16 +0000)]
Remove redundant extern's that make the ppc compile fail.
Thanks Ed Maste for the heads up.

8 years agoAdopt assert from amd64 in pmap_remove_pages().
Svatopluk Kraus [Wed, 16 Dec 2015 10:55:19 +0000 (10:55 +0000)]
Adopt assert from amd64 in pmap_remove_pages().

Suggested by: kib
Approved by: kib (mentor)

8 years agoProvide additional lle data in IPv6 lltable dump used by ndp(8).
Alexander V. Chernikov [Wed, 16 Dec 2015 10:14:16 +0000 (10:14 +0000)]
Provide additional lle data in IPv6 lltable dump used by ndp(8).

Before the change, things like lle state were queried via
  SIOCGNBRINFO_IN6 by ndp(8) for _each_ lle entry in dump.
This ioctl was added in 1999, probably to avoid touching rtsock code.

This change maps SIOCGNBRINFO_IN6 data to standard rtsock dump the
 following way:
  expire (already) maps to rtm_rmx.rmx_expire
  isrouter -> rtm_flags & RTF_GATEWAY
  asked -> rtm_rmx.rmx_pksent
  state -> rtm_rmx.rmx_state (maps to rmx_weight via define)

Reviewed by: ae

8 years agoAs a followup to r292330, standardize on size_t and add a few comments.
Dag-Erling Smørgrav [Wed, 16 Dec 2015 09:20:45 +0000 (09:20 +0000)]
As a followup to r292330, standardize on size_t and add a few comments.

8 years agoConvert if_stf(4) to new routing api.
Alexander V. Chernikov [Wed, 16 Dec 2015 09:18:20 +0000 (09:18 +0000)]
Convert if_stf(4) to new routing api.

8 years agoReset bufpos to 0 immediately after refilling the buffer. Otherwise, we
Dag-Erling Smørgrav [Wed, 16 Dec 2015 09:17:07 +0000 (09:17 +0000)]
Reset bufpos to 0 immediately after refilling the buffer.  Otherwise, we
risk leaving the connection in an indeterminate state if the server fails
to send a chunk delimiter.  Depending on the application and on the sizes
of the preceding chunks, the result can be anything from missing data to a
segfault.  With this patch, it will be reported as a protocol error.

PR: 204771
MFC after: 1 week

8 years agoFix ARP reply handling changed in r286955.
Alexander V. Chernikov [Wed, 16 Dec 2015 09:16:06 +0000 (09:16 +0000)]
Fix ARP reply handling changed in r286955.

If source of ARP request didn't pass the routing check
(e.g. not in directly connected network), be polite and
still answer the request instead of dropping frame.

Reported by: quadro at irc@rusnet

8 years agoIntegrate a number of testcases from tools/regression/lib/msun
Enji Cooper [Wed, 16 Dec 2015 09:11:11 +0000 (09:11 +0000)]
Integrate a number of testcases from tools/regression/lib/msun
into the FreeBSD test suite

There's no functional change with these testcases; they're purposely
being left in TAP format for the time being

Other testcases which crash on amd64/i386 as-is have not been
integrated yet (they need to be retested on a later version of
CURRENT, as I haven't used i386 in some time)

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

8 years agoUse fabsl instead of fabs to mute -Wabsolute-value warnings from clang
Enji Cooper [Wed, 16 Dec 2015 08:53:24 +0000 (08:53 +0000)]
Use fabsl instead of fabs to mute -Wabsolute-value warnings from clang
because `nums[]` is an array of long doubles

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoOptimize vop_stdadvise(POSIX_FADV_DONTNEED). Instead of looking up a
Konstantin Belousov [Wed, 16 Dec 2015 08:48:37 +0000 (08:48 +0000)]
Optimize vop_stdadvise(POSIX_FADV_DONTNEED).  Instead of looking up a
buffer for each block number in the range with gbincore(), look up the
next instantiated buffer with the logical block number which is
greater or equal to the next lblkno.  This significantly speeds up the
iteration for sparce-populated range.

Move the iteration into new helper bnoreuselist(), which is structured
similarly to flushbuflist().

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation

8 years agoSimplify the loop step in the flushbuflist() and make it independed on
Konstantin Belousov [Wed, 16 Dec 2015 08:39:51 +0000 (08:39 +0000)]
Simplify the loop step in the flushbuflist() and make it independed on
the type stability of the buffers memory.  Instead of memoizing
pointer to the next buffer and validating it, remember the next
logical block number in the bo list and re-lookup.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation

8 years agoIterate down lib/libc/tests/nss...
Enji Cooper [Wed, 16 Dec 2015 08:25:12 +0000 (08:25 +0000)]
Iterate down lib/libc/tests/nss...

MFC after: 1 week
X-MFC with: r292323
Sponsored by: EMC / Isilon Storage Division

8 years agoIntegrate tools/regression/lib/libc/nss into the FreeBSD test suite as
Enji Cooper [Wed, 16 Dec 2015 08:09:03 +0000 (08:09 +0000)]
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

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros for
Enji Cooper [Wed, 16 Dec 2015 05:44:53 +0000 (05:44 +0000)]
Add ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros for
testing for kernel features via the feature_present(3) libcall

The semantics are similar to the other macros in the header (skip
testcase with ATF macro; exit with appropriate exit code with the
PLAIN macro)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd Makefile accidentally missed in r292317
Enji Cooper [Wed, 16 Dec 2015 05:19:07 +0000 (05:19 +0000)]
Add Makefile accidentally missed in r292317

MFC after: 1 week
X-MFC with: r292317
Sponsored by: EMC / Isilon Storage Division

8 years agoIntegrate tools/regression/lib/libc/resolv into the FreeBSD test suite as
Enji Cooper [Wed, 16 Dec 2015 05:11:57 +0000 (05:11 +0000)]
Integrate tools/regression/lib/libc/resolv into the FreeBSD test suite as
lib/libc/tests/resolv

Convert the testcases to ATF

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove hosts that don't resolve properly with the nss and resolv tests
Enji Cooper [Wed, 16 Dec 2015 04:59:30 +0000 (04:59 +0000)]
Remove hosts that don't resolve properly with the nss and resolv tests

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoSkip unavailable pools when running zfs pool scrubs
Kurt Lidl [Wed, 16 Dec 2015 04:32:33 +0000 (04:32 +0000)]
Skip unavailable pools when running zfs pool scrubs

Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D4588

8 years agolldb(1): Document core file option -c / -core
Ed Maste [Wed, 16 Dec 2015 03:59:54 +0000 (03:59 +0000)]
lldb(1): Document core file option -c / -core

8 years agoKeep maintainance of GELI and make it clear which directories I'm interested in.
Pawel Jakub Dawidek [Wed, 16 Dec 2015 01:05:50 +0000 (01:05 +0000)]
Keep maintainance of GELI and make it clear which directories I'm interested in.

8 years agoFirst cut of the modularization of our TCP stack. Still
Randall Stewart [Wed, 16 Dec 2015 00:56:45 +0000 (00:56 +0000)]
First cut of the modularization of our TCP stack. Still
to do is to clean up the timer handling using the async-drain.
Other optimizations may be coming to go with this. Whats here
will allow differnet tcp implementations (one included).
Reviewed by: jtl, hiren, transports
Sponsored by: Netflix Inc.
Differential Revision: D4055

8 years agoErr on the side of caution, and assume *env(3) should require
Glen Barber [Wed, 16 Dec 2015 00:21:21 +0000 (00:21 +0000)]
Err on the side of caution, and assume *env(3) should require
secteam@ review for changes.  so@ can remove this entry, if
necessary.

Submitted by: jhb (via secteam@)
Sponsored by: The FreeBSD Foundation

8 years agoDon't call wakeup if we're just returning reserved space; just
Adrian Chadd [Wed, 16 Dec 2015 00:13:16 +0000 (00:13 +0000)]
Don't call wakeup if we're just returning reserved space; just
return the reservation and wait for more space to appear.

Submitted by: jeff
Reviewed by: kib

8 years agoKeep the entries for NFS and the PCI bus code.
John Baldwin [Tue, 15 Dec 2015 23:06:15 +0000 (23:06 +0000)]
Keep the entries for NFS and the PCI bus code.

8 years agoSet DS flag, required for LPB log page by spec.
Alexander Motin [Tue, 15 Dec 2015 21:19:32 +0000 (21:19 +0000)]
Set DS flag, required for LPB log page by spec.

MFC after: 1 week

8 years agoPrevent g_access calls to bad multipath members
Steven Hartland [Tue, 15 Dec 2015 21:11:41 +0000 (21:11 +0000)]
Prevent g_access calls to bad multipath members

When a multipath member is orphaned its access members are zeroed before its
removed if marked for wither, so prevent any future calls to g_access on
such members.

This prevents a panic on debug kernels which validates the resultant values
aren't negative.

Reviewed by: mav
MFC after: 2 weeks
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4416

8 years agoBuild engines in parallel.
Bryan Drewery [Tue, 15 Dec 2015 19:57:56 +0000 (19:57 +0000)]
Build engines in parallel.

Sponsored by: EMC / Isilon Storage Division

8 years agoRegenerate after r292283.
Bryan Drewery [Tue, 15 Dec 2015 18:44:28 +0000 (18:44 +0000)]
Regenerate after r292283.

8 years agoCorrect comment about MAKEOBJDIRPREFIX in src-env.conf.
Bryan Drewery [Tue, 15 Dec 2015 18:42:30 +0000 (18:42 +0000)]
Correct comment about MAKEOBJDIRPREFIX in src-env.conf.

It may only be used with WITH_AUTO_OBJ, which the WITH_DIRDEPS_BUILD does.  We
could support this in the normal build as well if we forced creating the directory
and setting .OBJDIR.

Sponsored by: EMC / Isilon Storage Division

8 years agourtwn: fix off-by-one error.
Andriy Voskoboinyk [Tue, 15 Dec 2015 17:59:13 +0000 (17:59 +0000)]
urtwn: fix off-by-one error.

Reported by: adrian

8 years agoFix jail name checking that disallowed anything that starts with '0'.
Jamie Gritton [Tue, 15 Dec 2015 17:25:00 +0000 (17:25 +0000)]
Fix jail name checking that disallowed anything that starts with '0'.
The intention was to just limit leading zeroes on numeric names.  That
check is now improved to also catch the leading spaces and '+' that
strtoul can pass through.

PR: 204897
MFC after: 3 days

8 years agoLocal TLB flush is sufficient in pmap_remove_pages().
Svatopluk Kraus [Tue, 15 Dec 2015 16:04:45 +0000 (16:04 +0000)]
Local TLB flush is sufficient in pmap_remove_pages().

(1) The pmap argument passed to the function must be current pmap only.
(2) The process must be single threaded as the function is called either
when a process is exiting or from exec_new_vmspace().

Remove pmap_tlb_flush_ng() which is not used anywhere now.

Approved by: kib (mentor)

8 years agoFix lagg failover due to missing notifications
Steven Hartland [Tue, 15 Dec 2015 16:02:11 +0000 (16:02 +0000)]
Fix lagg failover due to missing notifications

When using lagg failover mode neither Gratuitous ARP (IPv4) or Unsolicited
Neighbour Advertisements (IPv6) are sent to notify other nodes that the
address may have moved.

This results is slow failover, dropped packets and network outages for the
lagg interface when the primary link goes down.

We now use the new if_link_state_change_cond with the force param set to
allow lagg to force through link state changes and hence fire a
ifnet_link_event which are now monitored by rip and nd6.

Upon receiving these events each protocol trigger the relevant
notifications:
* inet4 => Gratuitous ARP
* inet6 => Unsolicited Neighbour Announce

This also fixes the carp IPv6 NA's that stopped working after r251584 which
added the ipv6_route__llma route.

The new behavour can be controlled using the sysctls:
* net.link.ether.inet.arp_on_link
* net.inet6.icmp6.nd6_on_link

Also removed unused param from lagg_port_state and added descriptions for the
sysctls while here.

PR: 156226
MFC after: 1 month
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4111

8 years agoRemove a garbage printf used for debug.
Marcelo Araujo [Tue, 15 Dec 2015 15:46:14 +0000 (15:46 +0000)]
Remove a garbage printf used for debug.

Approved by: bapt (mentor implicit)

8 years agoRemove the null checker before free.
Marcelo Araujo [Tue, 15 Dec 2015 15:42:42 +0000 (15:42 +0000)]
Remove the null checker before free.

Approved by: bapt (mentor)
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D4549

8 years agoRemove wrong header and the NULL check before free().
Marcelo Araujo [Tue, 15 Dec 2015 15:41:09 +0000 (15:41 +0000)]
Remove wrong header and the NULL check before free().

Approved by: bapt (mentor)
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D4548

8 years agoEAGAIN handling for imsg_read.
Marcelo Araujo [Tue, 15 Dec 2015 15:37:58 +0000 (15:37 +0000)]
EAGAIN handling for imsg_read.

Approved by: bapt (mentor)
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D4547

8 years agoReplace all postponed TLB flushes by immediate ones except the one
Svatopluk Kraus [Tue, 15 Dec 2015 15:22:33 +0000 (15:22 +0000)]
Replace all postponed TLB flushes by immediate ones except the one
in pmap_remove_pages().

Some points were considered:
(1) There is no range TLB flush cp15 function.
(2) There is no target selection for hardware TLB flush broadcasting.
(3) Some memory ranges could be mapped sparsely.
(4) Some memory ranges could be quite large.

Tested by buildworld on RPi2 and Jetson TK1, i.e. 4 core platforms.
It turned out that the buildworld time is faster. On the other hand,
when the postponed TLB flush was also removed from pmap_remove_pages(),
the result was worse. But pmap_remove_pages() is called for removing
all user mapping from a process, thus it's quite expected.

Note that the postponed TLB flushes came here from i386 pmap where
hardware TLB flush broadcasting is not available.

Approved by: kib (mentor)

8 years agoRemove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.
Kevin Lo [Tue, 15 Dec 2015 15:19:06 +0000 (15:19 +0000)]
Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.

8 years agoRemove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.
Kevin Lo [Tue, 15 Dec 2015 15:08:29 +0000 (15:08 +0000)]
Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.

Reviewed by: bde

8 years agoAdd flag to disable inital reboot(8) userland sync
Steven Hartland [Tue, 15 Dec 2015 14:17:07 +0000 (14:17 +0000)]
Add flag to disable inital reboot(8) userland sync

Add -N flag to reboot(8) which bypasses the userland sync(2) during
reboot(8) while still allow the kernel sync during the reboot(2) syscall
to occur.

An example use of this is when rebooting with disconnected iSCSI sessions
which would otherwise cause the reboot to hang on BIOs that will never
complete.

Reviewed by: bjk
MFC after: 2 weeks
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4449

8 years agoFix example code rendering, \n needs escaping to show up.
Christian Brueffer [Tue, 15 Dec 2015 13:29:05 +0000 (13:29 +0000)]
Fix example code rendering, \n needs escaping to show up.

PR: 203536
Submitted by: Fabian Keil

8 years agoFlush intermediate TLB cache when L2 page table is unlinked.
Svatopluk Kraus [Tue, 15 Dec 2015 13:17:40 +0000 (13:17 +0000)]
Flush intermediate TLB cache when L2 page table is unlinked.

This fixes an issue observed on Cortex A7 (RPi2) and on Cortex A15
(Jetson TK1) causing various memory corruptions. It turned out that
even L2 page table with no valid mapping might be a subject of such
caching.

Note that not all platforms have intermediate TLB caching implemented.
An open question is if this fix is sufficient for all platforms with
this feature.

Approved by: kib (mentor)

8 years agoAssorted grammar, spelling and punctuation fixes.
Christian Brueffer [Tue, 15 Dec 2015 13:04:44 +0000 (13:04 +0000)]
Assorted grammar, spelling and punctuation fixes.

PR: 203336, 203339
Submitted by: espeyb@rpi.edu, themesta@gmail.com
MFC after: 1 week

8 years agoShow the enclosure name and id in sesutil map
Baptiste Daroussin [Tue, 15 Dec 2015 13:01:14 +0000 (13:01 +0000)]
Show the enclosure name and id in sesutil map

Sponsored by: Gandi.net

8 years agoARM: Remove outdated katelib.h.
Michal Meloun [Tue, 15 Dec 2015 12:52:45 +0000 (12:52 +0000)]
ARM: Remove outdated katelib.h.

Approved by: kib (mentor)

8 years agoARM: option PPC_PROBE_CHIPSET is applicable only for x86. Don't enable it
Michal Meloun [Tue, 15 Dec 2015 12:51:58 +0000 (12:51 +0000)]
ARM: option PPC_PROBE_CHIPSET is applicable only for x86. Don't enable it
for ARM LINT config.

Approved by: kib (mentor)

8 years agohyperv/kvp: wake up the daemon if it's sleeping due to poll()
Roger Pau Monné [Tue, 15 Dec 2015 11:20:20 +0000 (11:20 +0000)]
hyperv/kvp: wake up the daemon if it's sleeping due to poll()

Without the patch, there is a race condition: when poll() is invoked(),
if kvp_globals.daemon_busy is false, the daemon won't be timely
woke up, because hv_kvp_send_msg_to_daemon() can't wake up the daemon
in this case.

Submitted by:           Dexuan Cui <decui@microsoft.com>
Sponsored by: Microsoft OSTC
Reviewed by: delphij, royger
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D4258

8 years agoAdd entry for lib80211; fix a typo in libsysdecode.
Christian Brueffer [Tue, 15 Dec 2015 10:26:47 +0000 (10:26 +0000)]
Add entry for lib80211; fix a typo in libsysdecode.

8 years agoMinor spelling, mdoc and style cleanup.
Christian Brueffer [Tue, 15 Dec 2015 10:24:48 +0000 (10:24 +0000)]
Minor spelling, mdoc and style cleanup.

8 years agox86/bounce: try to always completely fill bounce pages
Roger Pau Monné [Tue, 15 Dec 2015 10:07:03 +0000 (10:07 +0000)]
x86/bounce: try to always completely fill bounce pages

Current code doesn't try to make use of the full page when bouncing because
the size is only expanded to be a multiple of the alignment. Instead try to
always create segments of PAGE_SIZE when using bounce pages.

This allows us to remove the specific casing done for
BUS_DMA_KEEP_PG_OFFSET, since the requirement is to make sure the offsets
into contiguous segments are aligned, and now this is done by default.

Sponsored by: Citrix Systems R&D
Reviewed by: hps, kib
Differential revision: https://reviews.freebsd.org/D4119

8 years agoProperly drain callouts in the IPFW subsystem to avoid use after free
Hans Petter Selasky [Tue, 15 Dec 2015 09:02:05 +0000 (09:02 +0000)]
Properly drain callouts in the IPFW subsystem to avoid use after free
panics when unloading the dummynet and IPFW modules:

- The callout drain function can sleep and should not be called having
a non-sleepable lock locked. Remove locks around "ipfw_dyn_uninit(0)".

- Add a new "dn_gone" variable to prevent asynchronous restart of
dummynet callouts when unloading the dummynet kernel module.

- Call "dn_reschedule()" locked so that "dn_gone" can be set and
checked atomically with regard to starting a new callout.

Reviewed by: hiren
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3855

8 years agoFix a typo (opencrypto -> crypto) and remove useless comment.
Kevin Lo [Tue, 15 Dec 2015 06:01:02 +0000 (06:01 +0000)]
Fix a typo (opencrypto -> crypto) and remove useless comment.

8 years agoAllow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with
Enji Cooper [Tue, 15 Dec 2015 05:37:09 +0000 (05:37 +0000)]
Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with
lib/libc/resolv by conditionalizing its definition

MFC after: 3 days
Reviewed by: ume, vangyzen
Differential Revision: https://reviews.freebsd.org/D4519

8 years agoAdd MSI-X support for 26XX cards.
Alexander Motin [Tue, 15 Dec 2015 04:51:50 +0000 (04:51 +0000)]
Add MSI-X support for 26XX cards.

Unlike previous, this generation does not support regular MSIs any more.

8 years ago[arswitch] bump the number of ports on the ar934x internal switch.
Adrian Chadd [Tue, 15 Dec 2015 04:46:48 +0000 (04:46 +0000)]
[arswitch] bump the number of ports on the ar934x internal switch.

It indeed has more ports by default.

8 years ago[qca953x] remove unneeded initialisation.
Adrian Chadd [Tue, 15 Dec 2015 04:45:00 +0000 (04:45 +0000)]
[qca953x] remove unneeded initialisation.

This was copied from another chip file and it's not required on Honeybee.

Tested:

* AP143, QCA9531 SoC.

Obtained from: OpenWRT

8 years ago[ar71xx] always count interrupts, spurious or otherwise.
Adrian Chadd [Tue, 15 Dec 2015 04:44:06 +0000 (04:44 +0000)]
[ar71xx] always count interrupts, spurious or otherwise.

This aids in debugging.

8 years ago[arge] add a comment about needing mdio busses in order to use the interface.
Adrian Chadd [Tue, 15 Dec 2015 04:43:28 +0000 (04:43 +0000)]
[arge] add a comment about needing mdio busses in order to use the interface.

This is a holdover from how reset is handled in the ARGE_MDIO world.
You need to define the mdio bus device if you want to use the ethernet
device or the arge setup path doesn't bring the MAC out of reset.

8 years agoFlip this over to ncurses.
Adrian Chadd [Tue, 15 Dec 2015 04:28:31 +0000 (04:28 +0000)]
Flip this over to ncurses.

8 years agoDIRDEPS_BUILD: Support bootstrapping from PROGS.(DPADD|LIBADD).
Bryan Drewery [Tue, 15 Dec 2015 02:51:05 +0000 (02:51 +0000)]
DIRDEPS_BUILD: Support bootstrapping from PROGS.(DPADD|LIBADD).

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Fix incorrectly adding in RELDIR for DIRDEPS in bootstrapping.
Bryan Drewery [Tue, 15 Dec 2015 02:46:14 +0000 (02:46 +0000)]
DIRDEPS_BUILD: Fix incorrectly adding in RELDIR for DIRDEPS in bootstrapping.

This is not wrong, but was unexpected.  Using <empty>:H results in '.' which
then using the rest of the conversion was added in RELDIR.  This was also
causing an empty _DP_DIRDEPS to resolve to SRCTOP for DIRDEPS.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Avoid duplicates in DIRDEPS for bootstrapping.
Bryan Drewery [Tue, 15 Dec 2015 02:27:31 +0000 (02:27 +0000)]
DIRDEPS_BUILD: Avoid duplicates in DIRDEPS for bootstrapping.

This logic is potentially included multiple times, so overwrite the temporary
variable rather than append to it.

Sponsored by: EMC / Isilon Storage Division