]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoAdd DT_VERS_1_13 to libdtrace to unbreak the build.
markj [Wed, 14 Feb 2018 14:29:11 +0000 (14:29 +0000)]
Add DT_VERS_1_13 to libdtrace to unbreak the build.

This is a direct commit to stable/11.

PR: 225889

6 years agoMFC r328971:
hselasky [Wed, 14 Feb 2018 09:53:23 +0000 (09:53 +0000)]
MFC r328971:
Fix implementation of ktime_add_ns() and ktime_sub_ns() in the LinuxKPI to
actually return the computed result instead of the input value.

This is a regression issue after r289572.

Found by: gcc6
Sponsored by: Mellanox Technologies

6 years agoMFC r328995:
markj [Wed, 14 Feb 2018 00:32:19 +0000 (00:32 +0000)]
MFC r328995:
Fix the WITH_SORT_THREADS build.

PR: 201664

6 years agoMFC r312667 (by pfg):
markj [Wed, 14 Feb 2018 00:31:37 +0000 (00:31 +0000)]
MFC r312667 (by pfg):
sort - Don't live-loop threads.

6 years agoMFC r327888, r327972, r327973:
markj [Tue, 13 Feb 2018 22:43:07 +0000 (22:43 +0000)]
MFC r327888, r327972, r327973:
Add "jid" and "jailname" variables to DTrace.

6 years agoMFC r328052: kldxref: handle modules with md_cval at end of allocated secs
emaste [Tue, 13 Feb 2018 22:40:33 +0000 (22:40 +0000)]
MFC r328052: kldxref: handle modules with md_cval at end of allocated secs

Attempting to retrieve an md_cval string from a kernel module with
kldxref would throw a offset error for modules created using lld, since
this value would be placed at the end of all allocated sections.

Add an ef_read_seg_string method to the ef interface, to allow reading
strings of varying size without attempting to read beyond the segment's
bounds.

PR: 224875
Submitted by: Mitchell Horne <mhorne063@gmail.com>
Sponsored by: The FreeBSD Foundation

6 years agoMFC r327503: kldxref: correct function names in warning messages
emaste [Tue, 13 Feb 2018 22:37:54 +0000 (22:37 +0000)]
MFC r327503: kldxref: correct function names in warning messages

Sponsored by: The FreeBSD Foundation

6 years agoMFC: r329022
jkim [Tue, 13 Feb 2018 21:14:27 +0000 (21:14 +0000)]
MFC: r329022

Remove an empty directory.

6 years agoMFC: r329024
jkim [Tue, 13 Feb 2018 21:11:27 +0000 (21:11 +0000)]
MFC: r329024

Remove c_rehash(1) to not confuse users.

6 years agoMFC 328917:
bryanv [Tue, 13 Feb 2018 15:55:31 +0000 (15:55 +0000)]
MFC 328917:

Correct structure name used in bus_map_resource(9) example

6 years agoMFC r325654:
hselasky [Tue, 13 Feb 2018 15:18:11 +0000 (15:18 +0000)]
MFC r325654:
Add API functions to modify the transport interface send object, TIS,
in mlx5 core.

Sponsored by: Mellanox Technologies

6 years agoMFC r325658:
hselasky [Tue, 13 Feb 2018 15:16:10 +0000 (15:16 +0000)]
MFC r325658:
Make physical address of init segment available in the priv of mlx5 core.
This change is needed by mlx5ib(4).

Sponsored by: Mellanox Technologies

6 years agoMFC r325652:
hselasky [Tue, 13 Feb 2018 15:14:32 +0000 (15:14 +0000)]
MFC r325652:
Prevent mlx5 core from accessing host memory after shutdown by disabling
PCI busmaster.

Sponsored by: Mellanox Technologies

6 years agoMFC r325651:
hselasky [Tue, 13 Feb 2018 15:13:15 +0000 (15:13 +0000)]
MFC r325651:
Set ATOMIC endian mode in mlx5 core.

The hardware is capable of 2 requestor endianness modes for standard 8
byte atomics: BE (0x0) and host endianness (0x1). Read the supported
modes from hca atomic capabilities and configure HW to host endianness
mode if supported.

Sponsored by: Mellanox Technologies

6 years agoMFC r325649:
hselasky [Tue, 13 Feb 2018 15:11:00 +0000 (15:11 +0000)]
MFC r325649:
Make local variable 64-bits to avoid masking away bits in mlx5 core.

Sponsored by: Mellanox Technologies

6 years agoMFC r325653:
hselasky [Tue, 13 Feb 2018 15:09:03 +0000 (15:09 +0000)]
MFC r325653:
Add API functions to set and query dropless port mode in mlx5 core.

Sponsored by: Mellanox Technologies

6 years agoMFC r325650:
hselasky [Tue, 13 Feb 2018 15:07:39 +0000 (15:07 +0000)]
MFC r325650:
Add const keyword to input-only argument in mlx5 core.

Sponsored by: Mellanox Technologies

6 years agoMFC r325648:
hselasky [Tue, 13 Feb 2018 15:05:23 +0000 (15:05 +0000)]
MFC r325648:
Implement support for decoding general port notification event in
the mlx5 core module.

Sponsored by: Mellanox Technologies

6 years agoMFC r325662:
hselasky [Tue, 13 Feb 2018 14:57:34 +0000 (14:57 +0000)]
MFC r325662:
Add more and update existing mlx5 core firmware structure definitions and bits.
This change is part of coming ibcore and mlx5ib updates.

Sponsored by: Mellanox Technologies

6 years agoMFC r325657:
hselasky [Tue, 13 Feb 2018 14:47:44 +0000 (14:47 +0000)]
MFC r325657:
Add API function to query port performance counters for infiniband and RoCE
traffic in mlx5 core.

Sponsored by: Mellanox Technologies

6 years agoMFC r325656:
hselasky [Tue, 13 Feb 2018 14:46:29 +0000 (14:46 +0000)]
MFC r325656:
Add API functions to query and modify local loopback of multicast and
unicast traffic in mlx5 core.

Sponsored by: Mellanox Technologies

6 years agoMFC r325655:
hselasky [Tue, 13 Feb 2018 14:45:05 +0000 (14:45 +0000)]
MFC r325655:
Add API function to query virtual port counters in mlx5 core.

Sponsored by: Mellanox Technologies

6 years agoMFC r325638 and r325976:
hselasky [Tue, 13 Feb 2018 14:37:21 +0000 (14:37 +0000)]
MFC r325638 and r325976:
Refactor the flowsteering APIs used by mlx5en(4). This change is needed by
the coming ibcore and mlx5ib updates in order to support traffic redirection
to so-called raw ethernet QPs.

Remove unused E-switch related routines and files while at it.

Sponsored by: Mellanox Technologies

6 years agoMFC r328913:
kib [Tue, 13 Feb 2018 12:54:03 +0000 (12:54 +0000)]
MFC r328913:
Move signal trampolines out of locore.s into separate source file.

6 years agostand: Clean up some unintentional inconsistencies
kevans [Tue, 13 Feb 2018 04:28:13 +0000 (04:28 +0000)]
stand: Clean up some unintentional inconsistencies

This is a direct commit to stable/11 to address the following final
unintended inconsistencies between stable/11 and head:

- Some unused LIBSTAND= cruft left in efi/loader/Makefie
- A comment that flew in with unrelated changes
- An #include that may go away now that stand is basically self-contained

6 years agoRevert MFC r328911 from r329183
kevans [Tue, 13 Feb 2018 04:10:10 +0000 (04:10 +0000)]
Revert MFC r328911 from r329183

jhb@ had specified an MFC timer of 1-month, and I clobbered his efforts by
MFC'ing it way prematurely. Back out that part of r329183 so it may be MFC'd
when jhb is ready.

6 years agoMFC r328937: Fix queue length reporting in mps(4) and mpr(4).
mav [Tue, 13 Feb 2018 02:11:39 +0000 (02:11 +0000)]
MFC r328937: Fix queue length reporting in mps(4) and mpr(4).

Both drivers were found to report CAM bigger queue depth then they really
can handle.  It made them later under high load with many disks return
some of submitted requests back with CAM_REQUEUE_REQ status for later
resubmission.

6 years agoMFC Loader Fixes Final: r327612,r327703,r327704,r327878,r327879,r327881,
kevans [Mon, 12 Feb 2018 20:51:28 +0000 (20:51 +0000)]
MFC Loader Fixes Final: r327612,r327703,r327704,r327878,r327879,r327881,
r328007,r328029,r328030,r328031,r328061,r328156,r328169,r328288,r328289,
r328290,r328291,r328292,r328411,r328536,r328603,r328614,r328642,r328769,
r328779,r328780,r328781,r328782,r328783,r328806,r328808,r328826,r328835,
r328911,r328986,r328987,r328990,r328999,r329000,r329019,r329050,r329054,
r329060

r327612: Invent new #defines for the biospci_{read,write}_config function

r327703: Define __dmadat after #include'ing ufsread.c.

r327704: Fix printf missing format variables warnings.

r327878: Add GUID for UEFI boot manager variables.

r327879: Report the boot order and where we are in that boot order.

r327881: Allow this file to be included

r328007: Fix booting on some arm64 systems after r327879 by fixing the call
to utf8_to_ucs2

r328029: When returning an error and freeing allocated memory from
ucs2_to_utf8, NULL the return pointer.

r328030: Check the return value from utf8_to_ucs2 instead of whether or not
uv is NULL.

r328031: Need to free uv after we're done using it.

r328061: utf8_to_ucs2() should check for malloc failure

r328156: stand: Move sections around to fix stand/ build with ld.lld on
armv7

r328169: Remove extra copy of bootinfo.c. It's a bit rotted copy of the one
in efi/loader.

r328288: Fix some resource leaks.

r328289: Don't leak memory when displaying help.

r328290: On malloc failure, be sure to close the include file that triggered
it.

r328291: getenv does not return tainted data in the boot loader. Attempt to
clue Coverity into that fact.

r328292: There's no tainted data here, tag it as such to avoid false
positives.

r328411: loader.efi: add missing EFI GUIDs

r328536: loader: support for mixed-endianness ELF/loader and POWER8

r328603: Add missing non-POWERPC case to give the scr value something
non-zero.

r328614: Move libstand.3 to libsa.3. Update libsa.3 to include functions

r328642: Break out the interpreters (simple and forth) w/o ifdefs.

r328769: Centralize several variables.

r328779: Retire pnp.4th and the code needed only for 4th words used here.

r328780: These 4th words were an attempt to allow integration into the boot
loader scripts. However, that path won't be taken after all it
seems.

r328781: Remove pcibios forth support.

r328782: Now that we no longer conditionally compile some files outside of
ficl

r328783: Invent new LDR_INTERP for the loader interpreter to use.

r328806: We need more heap space to properly load newer powerpc kernels.

r328808: Implement strcoll as strcmp.

r328826: Make cross-endian loader changes apply only to powerpc

r328835: Fix regression introduced in r328806, preventing boot on many
platforms.

r328911: Ignore relocation tables for non-memory-resident sections.

r328986: Fix relative location of USB sources after recent move.

r328987: A more definitions to kernel emulation shim in order to build
stand/usb.

r328990: Move the stand/usb test loader into its own directory.

r328999: Fix indentation to FreeBSD standard for interp files

r329000: Move simple interpreter 'perform' into interp.c and call it

r329019: Move to tabs for indentation and to 8-space notches, per style(9).

r329050: Fix build of userboot.so

r329054: Set script.lang in the environment to either 'forth' or 'simple' to
reflect what scripting language was compiled into the loader.

r329060: loader: fix endianness conversion

PR: 225323

6 years agoCorrect date in ObsoleteFiles
kevans [Mon, 12 Feb 2018 19:50:43 +0000 (19:50 +0000)]
Correct date in ObsoleteFiles

Getting a little ahead of myself here- correct the date to today.

6 years agoMFC: r328695,r328720,r328784,r328795 share/examples/bhyve/vmrun.sh additions
rgrimes [Mon, 12 Feb 2018 19:08:17 +0000 (19:08 +0000)]
MFC: r328695,r328720,r328784,r328795 share/examples/bhyve/vmrun.sh additions
and cleanups

r328695:
Add option '-n' network device emulation type which has a default
of virtio-net
PR: 225558
Submitted by: Johannes Lundberg <johalun0@gmail.com>

r328720:
Add -n <network device emulation type> to usage synopsis
forgotten in r328695.

Fix long lines in usage.
Consistently use "default:" rather than "default is"

r328784:
Clean up long lines.

r328795:
Fold constants and unify vnc variable names.

Approved by: grehan (mentor)

PR: 225558

6 years agoMFC: r316746 Add UEFI support to vmrun.sh
rgrimes [Mon, 12 Feb 2018 18:52:59 +0000 (18:52 +0000)]
MFC: r316746 Add UEFI support to vmrun.sh

Adds:
 -E: Use UEFI mode
 -f: path to UEFI firmware image (default: path to uefi-edk2-bhyve package)
 -F: UEFI framebuffer size (default: w=1024,h=768)
 -L: IP to listen for VNC connections on (default: 127.0.0.1)
 -P: Port to listen for VNC connections on (default: 5900)
 -T: Enable tablnet device (for VNC)
 -v: Wait for VNC client before booting VM

Submitted by: Shawn Webb <shawn.webb@hardenedbsd.org>
Approved by: grehan(mentor),allanjude(original committer)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D10378

6 years agoMFC r328799:
brooks [Mon, 12 Feb 2018 18:40:19 +0000 (18:40 +0000)]
MFC r328799:

Add kern.ipc.{msqids,semsegs,sema} sysctls for FreeBSD32.

Stop leaking kernel pointers though theses sysctls and make sure that the
padding in the structures is zeroed on allocation to avoid other leaks.

Reviewed by: gordon, kib
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D13459

6 years agoMFC r327705,r328447: Fix BERI bootloader build
kevans [Mon, 12 Feb 2018 18:30:20 +0000 (18:30 +0000)]
MFC r327705,r328447: Fix BERI bootloader build

r327705: Use <stand.h> instead of <inttypes.h> and <stdio.h> in boot code.
r328447: BERI isn't BTX, so we don't have to provide exit().

6 years agoMFC Loader Fixes 2017q4p7: r324844,r326089,r326926,r326440,r326484,r326494,
kevans [Mon, 12 Feb 2018 17:44:35 +0000 (17:44 +0000)]
MFC Loader Fixes 2017q4p7: r324844,r326089,r326926,r326440,r326484,r326494,
r326588,r326708,r326784,r326914,r327390,r328446,r326090,r326143,r326144,
r326182,r326384,r326421,r326440,r326441,r326442,r326443,r326444,r326445,
r326446,r326447,r326448,r326484,r326485,r326486,r326487,r326488,r326490,
r326491,r326492,r326493,r326494,r326495,r326504,r326507,r326509,r326584,
r326585,r326586,r326587,r326588,r326589,r326590,r326591,r326592,r326593,
r326594,r326600,r326616,r326671,r326707,r326708,r326709,r326710,r326711,
r326712,r326714,r326720,r326768,r326772,r326784,r326792,r326812,r326854,
r326855,r326856,r326858,r326886,r326887,r326914,r326926,r326927,r326960,
r326961,r326962,r326963,r327351,r327453,r327390,r327523,r327524,r326489,
r327880,r328437,r328438,r328439,r328441,r328446,r328448,r328449,r328612,
r328613,r328615

While here, undo our libfdt hack of not including <stdlib.h> if we're
compiling _STANDALONE.

r324844: When building standalone, don't define errno. Let the definition from
stand.h override. This is similar to what we do in the kernel.

r326089: loader.efi: efipart does not recognize partitionless disks

r326090: net_parse_rootpath() has no parameters

r326143: Fix theoretical integer overflow issues. If the product here is

r326144: Mark the func pointer as __dead2. It looks up loader_main, which

r326182: Modify all FreeBSD bootloaders on PowerPC AIM (Book-S) systems

r326384: Use const pointers to avoid casting away constness.

r326421: loader.efi: efipart should exclude iPXE stub block protocol

r326440: Remove stale dependency on ufsread.c

r326441: Minor flags cleanup

r326442: Cleanup CFALGS usage here

r326443: We don't need both _STAND and _STANDALONE, use the latter.

r326444: Move geli to common DO32 stuff

r326445: Fix random() and srandom() prototypes to match the standard.

r326446: Undefine _STANDALONE since this is test code.

r326447: Tweaks to the beri boot loader so that it builds w/o warnings.

r326448: Fix all warnings related to geli and ZFS support on x86.

r326484: Const poison the propname.

r326485: Delcare md_load in libofw.h. Make all prototypes match for ofw

r326486: Include machine/md_var to pick up __syncicache prototype.

r326487: Cast mdp (a vm_offset_t) to void * to match prototype.

r326488: e_entry can be smaller than a pointer. Cast it to an intptr_t

r326490: Declare our strange brand of main().

r326491: Disconnet ps3 from the build. There's too many warnings to fix.

r326492: Cast void * pointer to char * so the arg matches the %s format.

r326493: Provide a md_load64 prototype.

r326494: Mark two things as unused (since they are only sometimes used)

r326495: Now it's safe to bump WARNS to 1.

r326504: Switch to proper MK_LOADER_GELI tests.

r326507: increase maximum size of zfsboot

r326509: loader.efi: add note about iPXE into the efipart.c

r326584: When building standalone, include stand.h rather than the kernel

r326585: Include ficl.h before anything else

r326586: No need to include the userland md5.h, the kernel one is just fine.

r326587: Use the kernel relative paths, rather than the userland relative
paths

r326588: Need to include skein in the include path

r326589: Make sure we include the right path for skein.h

r326590: Prefer stdint.h to inttypes.h

r326591: This isn't NetBSD specific code. Include these for any kernel /

r326592: Don't inherit CFLAGS. This a specialized test program.

r326593: Stop building with the standard system headers.

r326594: Now that we offer a semi-sane standards-ish set of #include files,
stop hacking includes with sed.

r326600: Since this is contrib code, create an upstreamable version of my

r326616: dhcp_try_rfc1048() is not used any more

r326671: Avoid setting -Wno-tentative-definition-incomplete-type with gcc.

r326707: Add partial support signal.h functioanlity. Pull in
machine/signal.h

r326708: Remove _KERNEL hack now that errno.h does the right thing when
built standalone.

r326709: Provide implementations for iscntrl, ispunct and isgraph.

r326710: Put the files we're copying over into a few variables and clean
hings up.

r326711: Const poison a couple of interfaces.

r326712: Create interp class.

r326714: boot1.c needs EFI_ZFS_BOOT too, so add it globally.

r326720: This path belongs in ficl/Makefile, not the common defines for
users

r326768: Fix a comment to be more accurate

r326772: Fix regression with lua import

r326784: Revert part of 362772. It was causing problems for includes

r326792: Attempt to unbreak buildworld

r326812: Revert r326792, r326784, r326772, r326712

r326854: libefi: make efichar.h more usable in stand code

r326855: Cargo cut a fix for the regressions r326585 caused.

r326856: Fix comments after bump in size.

r326858: Revert r326855: Cargo cut a fix for the regressions r326585 caused.

r326886: Panic in sbrk if setheap hasn't been called yet. This is preferable
o a mysterious crash

r326887: Remove the 'mini libstand in libstand' that util.[ch] provided.

r326914: Move loader-only defines to loader.mk from defs.mk

r326926: Move loader help file definitions to being 100% inside of
loader.mk.

r326927: libficl is only ever used in a loader (never a boot) program. Move
it.

r326960: Simplify things a little. The RETURN macro isn't required.

r326961: Interact is always called with NULL. Simplify code a little

r326962: Hoist btx include stuff to i386/Makefile.inc

r326963: No need to use relative paths like this here.

r327351: Fix ubldr. uboot/lib uses defines for the loader.

r327453: Add a validbcd() routine that uses the bcd2bin_data[] array

r327390: Garbage-collect loader.ps3. It is currently disconnected from the
build and kboot replaces.

r327523: Don't clobber system LDFLAGS for beri boot loaders.

r327524: Use 'extern uint8_t' instead of 'extern void' for external symbols.

r326489: Allow this file to be used in libsa without warning...

r327880: Move getsecs() prototype to stand.h from net.h so it can be used

r328437: Split panic routine

r328438: Implement abort() as a call to panic.

r328439: Provide abs form stdlib.h.

r328441: abort() should be marked __dead2 since it won't return.

r328446: Now that exit is __dead2, we need to tag ub_exit() as __dead2.

r328448: Make exit() never return until host_exit can be written.

r328449: Tag unreachable places as such. I left the while (1); in place

r328612: Move strtold wrapper from strtol.c to its own strtold.c.

r328613: Kill copies of strtol and strtoul.

r328615: Update stand.h for changes for strto*l

PR: 223969

6 years agoMFC r325718: Fix typo in filename.
kevans [Mon, 12 Feb 2018 15:48:12 +0000 (15:48 +0000)]
MFC r325718: Fix typo in filename.

Noticed by: Shawn Webb (again)

6 years agoMFC r326666:
hselasky [Mon, 12 Feb 2018 13:59:04 +0000 (13:59 +0000)]
MFC r326666:
mlx4: Remove redundant declarations to fix GCC build

These were made redundant in r325841.

Reviewed by: hselasky
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D13401

6 years agoMFC r306486-r325841:
hselasky [Mon, 12 Feb 2018 13:56:57 +0000 (13:56 +0000)]
MFC r306486-r325841:
Update the mlx4, mlx4ib(4) and mlx4en(4) drivers to match FreeBSD-head
prior to the Linux 4.9 RoCE/infiniband upgrade.

Sponsored by: Mellanox Technologies

MFC r306486:
Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4
like other PCI network drivers. The sys/ofed directory is now mainly
reserved for generic infiniband code, with exception of the mthca driver.

- Add new manual page, mlx4en(4), describing how to configure and load
mlx4en.

- All relevant driver C-files are now prefixed mlx4, mlx4_en and
mlx4_ib respectivly to avoid object filename collisions when compiling
the kernel. This also fixes an issue with proper dependency file
generation for the C-files in question.

- Device mlxen is now device mlx4en and depends on device mlx4, see
mlx4en(4). Only the network device name remains unchanged.

- The mlx4 and mlx4en modules are now built by default on i386 and
amd64 targets. Only building the mlx4ib module depends on
WITH_OFED=YES .

Sponsored by: Mellanox Technologies

MFC r310425:
mlx: avoid use of __DATE__ to make build reproducible

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D8886

MFC r310488:
mlx(4): remove date from log message

Further to r310425, go one step further and just remove the date.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D8888

MFC r324200:
Implement SIOCGIFRSS{KEY,HASH} for the mlx4en(4) driver.

Differential Revision: https://reviews.freebsd.org/D12176
Sponsored by: Mellanox Technologies

MFC r324201:
Setup mbuf hash type properly when receiving IP packets in the mlx4en(4) driver.

Submitted by: sephe@
Differential Revision: https://reviews.freebsd.org/D12229
Sponsored by: Mellanox Technologies

MFC r324621:
mlx4: use enum constants instead of const vars for case exprs

Follow up from r324201 to fix compilation with gcc, which complains
about non-ICE case expressions.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D12675

MFC r325841:
Update the mlx4 core and mlx4en(4) modules towards Linux v4.9.

Background:
The coming ibcore update forces an update of mlx4ib(4) which in turn requires
an updated mlx4 core module. This also affects the mlx4en(4) module because
commonly used APIs are updated. This commit is a middle step updating the
mlx4 modules towards the new ibcore.

This change contains no major new features.

Changes in mlx4:
  a) Improved error handling when mlx4 PCI devices are
  detached inside VMs.
  b) Major update of codebase towards Linux 4.9.

Changes in mlx4ib(4):
  a) Minimal changes needed in order to compile using the
  updated mlx4 core APIs.

Changes in mlx4en(4):
  a) Update flow steering code in mlx4en to use new APIs for
  registering MAC addresses and IP addresses.
  b) Update all statistics counters to be 64-bit.
  c) Minimal changes needed in order to compile using the
  updated mlx4 core APIs.

Sponsored by: Mellanox Technologies

6 years agoMFC r328876:
ae [Mon, 12 Feb 2018 12:41:53 +0000 (12:41 +0000)]
MFC r328876:
  Modify ip6_get_prevhdr() to be able use it safely.

  Instead of returning pointer to the previous header, return its offset.
  In frag6_input() use m_copyback() and determined offset to store next
  header instead of accessing to it by pointer and assuming that the memory
  is contiguous.

  In rip6_input() use offset returned by ip6_get_prevhdr() instead of
  calculating it from pointers arithmetic, because IP header can belong
  to another mbuf in the chain.

  Reported by: Maxime Villard <max at m00nbsd dot net>

6 years agoMFC r328880:
kib [Mon, 12 Feb 2018 10:34:15 +0000 (10:34 +0000)]
MFC r328880:
On munlock(), unwire correct page.

6 years agoMFC r328505,r328659: stand/fdt improvements
kevans [Mon, 12 Feb 2018 05:55:44 +0000 (05:55 +0000)]
MFC r328505,r328659: stand/fdt improvements

r328505: stand/fdt: Check /compatible property on overlay if it exists

r328659: stand/fdt: Rip out FDT VA tracking

6 years agoMFC r326038,r326069,r326072: More stand simplification and fixes
kevans [Mon, 12 Feb 2018 01:17:06 +0000 (01:17 +0000)]
MFC r326038,r326069,r326072: More stand simplification and fixes

r326038: Move some more common stuff up to Makefile.inc.

r326069: Fix gptzfsboot for cases with GELI.

r326072: Unbreak riscv build in universe.

6 years agoMFC r325834,r325997,326502: Move sys/boot to stand/
kevans [Mon, 12 Feb 2018 01:08:44 +0000 (01:08 +0000)]
MFC r325834,r325997,326502: Move sys/boot to stand/

This is effectively a direct commit to stable/11, due to differences between
stable/11 and head. Changes to DTS in sys/boot/fdt/dts were often
accompanied by kernel changes. Many of these were also risc-v updates that
likely had many more dependencies to MFC.

Because of this, sys/boot/fdt/dts remains as-is while everything else in
sys/boot relocates to stand/.

r325834: Move sys/boot to stand. Fix all references to new location

r325997: Remove empty directories.

r326502: Document the sys/boot -> stand move in hier.7 and the top-level README.

6 years agoRe-sync loader.mk and ficl.mk to where they should be
kevans [Sun, 11 Feb 2018 22:38:16 +0000 (22:38 +0000)]
Re-sync loader.mk and ficl.mk to where they should be

This is a direct commit to stable/11 due to changes lost during an MFC of a
move.

6 years agoCorrect check: BOOT_FORTH is MK_FORTH in makefiles.
kevans [Sun, 11 Feb 2018 22:16:24 +0000 (22:16 +0000)]
Correct check: BOOT_FORTH is MK_FORTH in makefiles.

This is a direct commit to stable/11.

6 years agoMFC Loader Fixes 2017q4p6: r324649,r324650,r324651,r324652,r324653,r324654,
kevans [Sun, 11 Feb 2018 20:58:00 +0000 (20:58 +0000)]
MFC Loader Fixes 2017q4p6: r324649,r324650,r324651,r324652,r324653,r324654,
r324700,r324702,r324709,r324717,r324719,r324841,r324842,r324843,r324845,
r324850,r324876,r324877,r324878,r324879,r324880,r324881,r324883,r324980,
r324981,r324982,r324995,r325014,r325093,r325094,r325114,r325170,r325171,
r325172,r325173,r325174,r325175,r325176,r325248,r325286,r325310,r325332,
r325338,r325339,r325376,r325377,r325379,r325380,r325382,r325478,r325479,
r325480,r325482,r325483,r325484,r325485,r325556,r325641,r325681,r325685,
r325686,r325687,r325688,r325689,r325690,r325691,r325692,r325693,r325694,
r325743,r325744,r325748,r325775,r325779,r325780

r324649: Move common/Makefile.inc to sys/boot/loader.mk.

r324650: tweak style

r324651: create defs.mk for common definitions

r324652: Move all the ficl common code into ficl.mk

r324653: LOADER_foo_SUPPORTED

r324654: Explicitly inlcude SYSDIR in the include path

r324700: loader: initialize dv_cleanup in md.c to eliminate clang warning

r324702: We need to include disk.o in libuboot.a when we're building with
support for disk access.

r324709: Revert "Unify boot1 with loader" change r324646

r324717: libsa/ip.c: misplaced comment, ip_v is half char, not ip_p

r324719: libsa/ip: stop read loop on bad fragments

r324841: Use BOOTDIR more consistently in defs.mk rather than repeat
sys/boot.

r324842: Introduce BOOTOBJ: The top level object directory for the boot tree

r324843: Stopgap fix to the mistmatch between LOADER_GELI_SUPPORT and
LOADER_NO_GELI_SUPPORT.

r324845: Use BOOTOBJ and BOOTDIR to find geli includes and libraries.

r324850: Define LIBSA32 to LIBSA on i386 to fix build.

r324876: Move fdt and uboot defines into common uboot.mk.

r324877: End source directories with SRC rather than a hodgepodge of names

r324878: Make at91 boot loader compile again.

r324879: Prefer SRCTOP paths for bits we're grabbing from libc.

r324880: Use BOOTSRC here.

r324881: Use SYSDIR instead of ${.CURDIR}/../..<etc>/sys.

r324883: Use preferred defined paths, rather than relative paths in fdt.

r324980: Use BOOTDIR consistently.

r324981: Move BINDIR definition to defs.mk, and override where it isn't
/boot

r324982: Remove sys/boot/arm/at91 and ixp425

r324995: loader.efi: Make framebuffer commands available for arm64

r325014: Add a 'place holder' arm struct efi_fb until a real one comes

r325093: Define new EFI variables

r325094: Cleanup non-arch Makefiles

r325114: Use defs.mk defins in most MD code

r325170: Use defs.mk values for userboot

r325171: Use defs.mk name and prefer bsd.init.mk

r325172: Remove the -nostdlib stuff I added. Instead, fix LDFLAGS to be
honored correctly with the new Makefile.inc include order.

r325173: We don't need to build a special ficl for userboot.

r325174: Minor cleanup

r325175: For amd64, compile both zfs and zfs32 libraries.

r325176: Actually add zfs32/Makefile

r325248: loader ptblread() is broken with >512B sectors

r325286: efipart_strategy is using wrong offset with >512B sectors

r325310: zfs.c:vdev_read() needs to be careful about large sectors

r325332: loader: re-enable gzip support for x86

r325338: loader: fix BOOTSRC -> BOOTOBJ in a library path

r325339: This used to have bzip2 support too.

r325376: WIP: centralize machine links

r325377: mostly libsa

r325379: Revert "mostly libsa"

r325380: Revert "WIP: centralize machine links"

r325382: Cleanup stray libstand names to be libsa names.

r325478: Powerpc is a 32-bit boot loader.

r325479: Define LIBFICL32 to be libficl.a on i386 and libficl32.a on amd64.

r325480: Use DO32 for all the places that we need to flag we're building a
32-bit version of a library.

r325482: Move machine and other link creation to defs.mk

r325483: MACHINE can never be powerpc64, so cleanup code that thinks it can.

r325484: Prefer bsd.init.mk to src.opts.mk

r325485: Centralize all 32-bit builds on 64-bit platform stuff.

r325556: loader: set options before including bsd.init.mk

r325641: loader.efi: efi_devpath_is_prefix should return bool

r325681: boot1: avoid using NULL device path

r325685: libsa32 isn't needed for i386. It's already a 32-bit platform.

r325686: Simplify this if to a direct assignment.

r325687: Remove all the empty help files from the powerpc build.

r325688: FDT support doesn't make sense for ps3, remove it.

r325689: Remove LOADER_FDT_SUPPORT as a Makefile variable.

r325690: Remove LOADER_ZFS_SUPPORT as a Makefile variable

r325691: Remove useless PNP define here.

r325692: Replace LOADER_FIREWIRE_SUPPORT variable

r325693: Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELI

r325694: Install the 4th files in sys/boot/forth instead of each loader

r325743: Make sure the proper loader.rc gets installed.

r325744: boot1: also check for NULL device

r325748: Use proper include file.

r325775: Add loader.conf to the list of files that are MD.

r325779: Add /boot/dts to the list of default modules.

r325780: Don't add /boot/dt*s* but /boot/dt*b*. Stupid think-o.

6 years agoFix paths after r329132
kevans [Sun, 11 Feb 2018 20:35:14 +0000 (20:35 +0000)]
Fix paths after r329132

This is a direct commit to stable/11 due to svn's handling of merging this
move being less than ideal.

6 years agoMFC r324648: Rename top level Makefile.ficl to ficl.mk.
kevans [Sun, 11 Feb 2018 20:06:36 +0000 (20:06 +0000)]
MFC r324648: Rename top level Makefile.ficl to ficl.mk.

6 years agoMFC Loader Fixes 2017q4p5: r324557,r324558,r324559,r324646,r324647
kevans [Sun, 11 Feb 2018 20:04:34 +0000 (20:04 +0000)]
MFC Loader Fixes 2017q4p5: r324557,r324558,r324559,r324646,r324647

r324557: Rename exit to efi_exit to avoid clashing with libsa exit
    definition

r324558: Define prototype for exit and ensure references

r324559: Move panic back into libsa. It's documented in libstand(3) to
belong there.

r324646: Unify boot1 with loader.

r324647: Move orphaned man pages into new man directory from common.

6 years agoMFC Loader Fixes 2017q4p4: r324552,r324553,r324554,r324555,r324556
kevans [Sun, 11 Feb 2018 20:00:26 +0000 (20:00 +0000)]
MFC Loader Fixes 2017q4p4: r324552,r324553,r324554,r324555,r324556

r324552: Kill the userboot copy of libstand.

r324553: Rename libstand.a to libsa.a and libstand32.a to libsa32.a

r324554: Move crc32.c, util.c and gpt.c over to libsa.

r324555: Honor CFLAGS modifications in Makefile.inc by using += here.

r324556: Move ufsread.c

6 years agoMFC r324551: Move lib/libstand to sys/boot/libsa
kevans [Sun, 11 Feb 2018 19:51:29 +0000 (19:51 +0000)]
MFC r324551: Move lib/libstand to sys/boot/libsa

6 years agoMFC Loader Fixes 2017q4p3: r324460,r324471
kevans [Sun, 11 Feb 2018 19:35:42 +0000 (19:35 +0000)]
MFC Loader Fixes 2017q4p3: r324460,r324471

r324460: Rather than laying whack-a-mole with including the path to stand.h,
always include it.

r324471: Fix typos: `stand alon{e,g}` should be spelled like `standalone`

6 years agoMFC Loader Fixes 2017q4p2: r324453, r324454
kevans [Sun, 11 Feb 2018 19:33:24 +0000 (19:33 +0000)]
MFC Loader Fixes 2017q4p2: r324453, r324454

r324453: Create sys/boot/libsa and build libstand.a there

r324454: Disconnect libstand from the build.

6 years agoMFC Loader Fixes 2017q4p1: r324321,r324359,r324360,r324388,r324449,r324450,
kevans [Sun, 11 Feb 2018 19:29:58 +0000 (19:29 +0000)]
MFC Loader Fixes 2017q4p1: r324321,r324359,r324360,r324388,r324449,r324450,
r324451,r324452

r324321: This README file was quite relevant for FreeBSD 3 or 4. No more.

r324359: Add efi_devpath_is_prefix

r324360: Encapsulate  ZFS preferences into efi_zfs_is_preferred

r324388: Unbreak building efiboot with MK_ZFS == no

r324449: Prefer ${LIBSTAND} to -lstand

r324450: Define SASRC and use it

r324451: Add missing -I${SASRC} in a couple of places so that stand.h
doesn't accidentally come in via host pollution.

r324452: Define LIBSA* and use them instead of overloaded LIBSTAND

6 years agoFix regression issue after r328973:
hselasky [Sun, 11 Feb 2018 10:23:32 +0000 (10:23 +0000)]
Fix regression issue after r328973:

The lint target does no longer exist in FreeBSD head
and the __alloc_size2() support for lint was missing
when r328973 was MFCed. Add support for __alloc_size2() to
the lint target.

This is a direct commit.

Found by: antoine@
Pointy hat: hselasky@
Sponsored by: Mellanox Technologies

6 years agoMFC r308926:
eadler [Sun, 11 Feb 2018 07:04:48 +0000 (07:04 +0000)]
MFC r308926:

Add Intel Atom Cherryview SOC HSUART support

PR: 207910
Submitted by: johannes@brilliantservice.co.jp

6 years agoMFC r304007:
eadler [Sun, 11 Feb 2018 07:00:40 +0000 (07:00 +0000)]
MFC r304007:

Correct the history of where ps first appeared.

PR: 211741
Submitted by: Sevan Janiyan <venture37@geeklan.co.uk>

6 years agoBack out MFC r324558: Define prototype for exit and ensure references
kevans [Sun, 11 Feb 2018 03:21:06 +0000 (03:21 +0000)]
Back out MFC r324558: Define prototype for exit and ensure references

This went terribly wrong

6 years agoMFC r326615: De-const to match changes in userboot.h
kevans [Sun, 11 Feb 2018 03:10:27 +0000 (03:10 +0000)]
MFC r326615: De-const to match changes in userboot.h

6 years agoBack out exit() change in r329114; stable/11 was not ready for this one yet
kevans [Sun, 11 Feb 2018 03:09:08 +0000 (03:09 +0000)]
Back out exit() change in r329114; stable/11 was not ready for this one yet

This is a direct commit to stable/11.

6 years agoMFC Loader Fixes 2017q3: r320547,r320553,r321621,r321844,r321969,r321991,
kevans [Sun, 11 Feb 2018 02:27:50 +0000 (02:27 +0000)]
MFC Loader Fixes 2017q3: r320547,r320553,r321621,r321844,r321969,r321991,
r322037,r322038,r322039,r322040,r322056,r322074,r322542,r322592,r322593,
r322896,r322923,r323671,r322930,r322931,r322932,r322933,r322934,r322935,
r322936,r322937,r322938,r322939,r322941,r323062,r323063,r323064,r323065,
r323100,r323131,r323174,r323258,r323261,r323272,r323367,r323379,r323389,
r323407,r323428,r323436,r323494,r323496,r323497,r323541,r323554,r323589,
r323707,r323867,r323885,r323886,r323895,r323896,r323897,r323905,r323906,
r323907,r323908,r323909,r323952,r323991,r324099,r324558,r326445,r326609,
r326610

This batch includes a special kludge to fix powerpc loader build; <stdlib.h>
was included after <stand.h> there, causing problems with DEBUG_MALLOC bits.
Include <stdlib.h> a little bit earlier to fix the build with the intention
of removing this when eventually libsa silently replaces stdlib.h with
stand.h.

r320547: Link EFI/uboot loaders with -znotext

r320553: Integer underflow in efipart_realstrategy when I/O starts after end
of disk

r321621: Always set the receive mask in loader.efi.

r321844: Clean up style in print_state(..) and pager_printf(..)

r321969: Fix the return types for printf and putchar to match their libc

r321991: Revert r321969

r322037: Add stpcpy and stpncpy to libstand

r322038: Add definitions and utilities for EFI drivers

r322039: Move EFI ZFS functions to libefi

r322040: Add EFI utility functions to libefi

r322056: Move EFI fmtdev functionality to libefi

r322074: libefi/time.c cstyle cleanup

r322542: loader.efi: repace XXX with real comments in trap.c

r322592: Remove unused defines.

r322593: Define proposed GUID for FreeBSD boot loader variables.

r322896: Make spinconsole platform independent and hook it up into EFI
loader

r322923: Hide length of geli passphrase during boot.

r323671: Fix language used in the r322923.

r322930: Move efi_main into efi/loader

r322931: Cleanup efi_main return type

r322932: Use the loader.efi conventions for the various EFI tables.

r322933: No need for MK_ZFS around these: they are by their nature only
active when MK_ZFS is true.

r322934: _STAND is sometimes defined on the command line. Make the define
here match.

r322935: Fix warnings due to type mismatch.

r322936: Remove useless 'static' for an enum definition.

r322937: Forward declare struct dsk to avoid warnings when building libi386.

r322938: Link in libefi for boot1

r322939: Use efi_devpath_str for debug path info.

r322941: Eliminate redunant device path matching.

r323062: Make efichar.c routines available to libefi.

r323063: boot1.efi: print more info about where boot1.efi is loaded from

r323064: Exit rather than panic for most errors.

r323065: Save where we're booted from

r323100: libstand: nfs_readlink() should return proper return code

r323131: Revert r322941: Eliminate redundant device matching functions

r323174: Fix loader bug causing too many pages allocation when bootloader
is U-Boot

r323258: ucs2len

r323261: Fix armv6 build

r323272: Be consistent and do return (1);

r323367: Mark init_chroot and init_script variables as deprecated.

r323379: It's been pointed out that init_script at least is useful w/o

r323389: loader.efi: chain loader should provide proper device handle

r323407: boot1 generate-fat: generate all templates at once

r323428: r323389 breaks the kernel build when WITHOUT_ZFS is defined in
src.conf

r323436: boot1: remove BOOT1_MAXSIZE default value

r323494: loader should support large_dnode

r323496: libstand: tftp_open() can leak pkt on error

r323497: libefi: efipart_open should check the status from disk_open

r323541: libefi: efipart_realstrategy rsize pointer may be NULL

r323554: Increase EFI boot file size frok 128k to 384k

r323589: loader: biosmem.c cstyle cleanup

r323707: loader: biosmem allocate heap just below 4GB

r323867: libefi: devicename.c cleanups

r323885: libefi: efi_devpath_match() should return bool

r323886: libefi: efipart.c should use calloc()

r323895: libefi: efi_devpath_match local len should be unsigned

r323896: r323885 did miss efilib.h update

r323897: efilib.h: typo in structure member description

r323905: libefi: pdinfo_t pd_unit and pd_open should be unsigned

r323906: libefi: efipart_strategy() should return ENXIO when there is no
media

r323907: libefi: efipart.c cstyle fix for efipart_print_common()

r323908: libefi: efipart_hdinfo_add_filepath should check strtol result

r323909: libefi: define EISA PNP constants

r323952: After the r317886 support for TFTP and NFS can be enable
simultaneously.

r323991: libefi: efipart_floppy() will should not pass acpi pointer if the
HID test fails

r324099: Compile loader as Little-Endian on PPC64/POWER8

r324558: Define prototype for exit and ensure references

r326445: Fix random() and srandom() prototypes to match the standard.

r326609: Make putenv and getenv match the userland definition

r326610: Fix random() prototype to match the system.

PR: 219000 221001 222215
Relnotes: yes ("The length of the geli passphrase is hidden during boot")

6 years agoMFC r328895: Correct Russia spelling in regdomain.xml
emaste [Sat, 10 Feb 2018 22:34:47 +0000 (22:34 +0000)]
MFC r328895: Correct Russia spelling in regdomain.xml

PR: 225658

6 years agoMFC r303725 (oshogbo): Fix misleading description of the -b option in the
kevans [Sat, 10 Feb 2018 15:23:30 +0000 (15:23 +0000)]
MFC r303725 (oshogbo): Fix misleading description of the -b option in the
geli init command.

6 years agoMFC Loader Fixes 2017q2: r316437,r316577,r316578,r316585,r316590,r316612,
kevans [Sat, 10 Feb 2018 04:56:07 +0000 (04:56 +0000)]
MFC Loader Fixes 2017q2: r316437,r316577,r316578,r316585,r316590,r316612,
r316625,r316628,r316654,r316682,r316704,r316771,r317092,r317097,r317099,
r317652,r317785,r317886,r317887,r318142,r318320,r318356,r318678,r318754,
r318982,r318986,r318987,r318988,r318989,r318990,r318991,r318992,r318993,
r318994,r318999,r319083,r319084,r319085,r320011,r320234,r320288,r320304,
r320467,r320482

r316437: Small cleanup to make i386/loader match efi/loader boot environment
code

r316577: loader: part.c cstyle cleanup

r316578: loader: want mechanism to avoid RA with bcache

r316585: loader: zfs reader should check all labels

r316590: libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory

r316612: In r298230 the value of HEAP_MIN was changed from 3MB to 64MB.
Correct a comment.

r316625: Do not use -msoft-float with intention of disabling FP on aarch64

r316628: Silence GCC warning by initializing the local variable.

r316654: loader: r316585 did miss userboot update

r316682: loader: r316585 did miss sparc/ofw

r316704: loader.efi: only fetch zfs pool guid for the actual boot device

r316771: loader: Avoid possible overflow via environment variable

r317092: loader: zfs reader vdev_probe should check for minimum device size

r317097: loader: F_READ/F_WRITE should be checked against masked flag

r317099: loader: uboot disk ioctl should call disk_ioctl

r317652: loader.efi: ResetSystem does not use data with EFI_SUCCESS

r317785: zfsboot: drvsize() may be unusable on some systems

r317886: distinguish NFS versus TFTP boot by rootpath

r317887: loader: network read rework

r318142: libstand: NULL pointer dereference in rarp

r318320: loader: add ip layer code into libstand

r318356: libstand: increase nfs max read size to 16k

r318678: Replacing iterating over rootpath by strsep(3).

r318754: Pass -N directly to ld via -Wl rather than passing it to the
compiler driver.

r318982: Pass a "FREEBSD" user-class in PXE dhcp request

r318986: add a comment on vendor index 19 and 20 to avoid confusion

r318987: Support URI scheme for root-path in netbooting

r318988: Always build tftpfs support along with nfs for pxeboot

r318989: Always issue the pxe request

r318990: Partially revert r314948

r318991: Document recent changes on pxeboot

r318992: Capitalize DHCP

r318993: Use the usual FreeBSD spelling for the DHCP user class

r318994: Catch with the change in the user class

r318999: Update the comments concerning net_parse_rootpath to reflect what
it is now

r319083: Followup on the user-class changes

r319084: Small cleanup in dev_net.c

r319085: use the same option list for dhcp discovery and request

r320011: Add chain loader support for loader

r320234: Make structure padding explicit in EFI_MEMORY_DESCRIPTOR

r320288: Allow Clang's integrated assembler to assemble boot0

r320304: loader.efi: Disable smbios for arm

r320467: loader: chain load relocate data declaration is bad

r320482: As with arm64 mark the EFI PE header as allocated on arm.

PR: 218473

6 years agoMFC Loader Fixes 2017q1: r311458,r312237,r312314,r312374,r312947,r313042,
kevans [Sat, 10 Feb 2018 04:37:44 +0000 (04:37 +0000)]
MFC Loader Fixes 2017q1: r311458,r312237,r312314,r312374,r312947,r313042,
r313047,r313166,r313328,r313332,r313333,r313337,r313348,r313349,r313389,
r313442,r313451,r313575,r313645,r313710,r314114,r314213,r314275,r314945,
r314948,r315008,r315408,r315427,r315645,r315646,r315648,r315653,r315850,
r316064,r316078,r316079,r316100,r316104,r316111,r316112,r316171,r316279,
r316280,r316287,r316311,r316343,r316424,r316436

r311458: Use compiler driver to link BERI boot loaders

r312237: loader.efi: find_currdev() can leak memory

r312314: loader: move device path definitions to include/efidevp.h

r312374: loader: efi devpath api usage should be more aware of NULL pointers

r312947: Remove "-Xassembler -G0" from CFLAGS.

r313042: loader.efi environment related cleanups

r313047: loader: disk/part api needs to use uint64_t offsets

r313166: loader: libefi/env.c warnings in arm build

r313328: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and
DIOCGMEDIASIZE.

r313332: loader: bcache read ahead block count should take account the large
sectors

r313333: loader: Replace EFI part devices.

r313337: loader: 313329 missed ZFS guard in loader/main.c

r313348: loader: biosdisk fix for 2+TB disks

r313349: loader: disk io should not use alloca()

r313389: efipart is also using the '%S' printf format, add -Wno-format for
it.

r313442: loader: possible NULL pointer dereference in efipart.c

r313451: loader: possible NULL pointer dereference in bcache.c

r313575: makefs: make the buffer functions look exactly like the kernel ones

r313645: loader: implement MEDIA_FILEPATH_DP support in efipart

r313710: loader: cstyle fixes and DIOCGMEDIASIZE should use uint64_t

r314114: Use LDFLAGS with CC instead of _LDFLAGS.

r314213: Remove control+r handling from geliboot's pwgets()

r314275: Remove unused macro from common/drv.c.

r314945: Some style(9) fixes. No functional changes.

r314948: Try to extract the RFC1048 data from PXE.

r315008: r314948 seems to be missing a variable or two that will break

r315408: loader: remove open_disk cache

r315427: loader: biosdisk should report IO error from INT13

r315645: loader: disk_cleanup was left in userboot_disk.c

r315646: loader: pxe.h constants have wrong values

r315648: libstand: verify value provided by nfs.read_size

r315653: loader: verify the value from dhcp.interface-mtu and use snprintf
o set mtu

r315850: The original author abused Nd (one-line description, used by
makewhatis)

r316064: Fix build with path names with 'align' or 'nop' in them.

r316078: gpt*boot: Save a bit more memory when LOADER_NO_GELI_SUPPORT is
specified

r316079: Simply retire the sedification of the boot2.s file.

r316100: Remove -fno-guess-branch-probability and -fno-unit-at-a-time.

r316104: Use `NO_WCAST_ALIGN` instead of spelling it out as -Wno-cast-align
in CFLAGS

r316111: loader: move bios getsecs into time.c

r316112: loader: ls command should display file types properly

r316171: xfsread inlined uses more space, so remove the inline tag.

r316279: loader: efipart should check disk size from partition table

r316280: loader: simplify efi_zfs_probe and avoid double probing for zfs.

r316287: Remove OLD_NFSV2 from loader and libstand

r316311: Add explicit_bzero() to libstand, and switch GELIBoot to using it

r316343: Implement boot-time encryption key passing (keybuf)

r316424: Fix sparc64 build broken by r316343 and r316076

r316436: Restore EFI boot environment functionality broken in r313333

PR: 216940 217298 217935

6 years agoMFC libstand catch-up: r305116,306534,306538,306552,306638
kevans [Sat, 10 Feb 2018 01:52:58 +0000 (01:52 +0000)]
MFC libstand catch-up: r305116,306534,306538,306552,306638

r305116: recvtftp() is broken for large files, report file size
r306534: cd9660_open should check for padding
r306538: cstyle fix of cd9660_open in libstand
r306552: Fix remaining cstyle issues in libstand/cd9660.c
r306638: Fix remaining bugs in libstand/cd9660.c reported by Bruce Evans.

PR: 200500

6 years agoMFC r325795 (by imp):
mav [Sat, 10 Feb 2018 00:39:34 +0000 (00:39 +0000)]
MFC r325795 (by imp):
Belatedly add opt_nvme.h to fix building nvme.ko outside of a kernel
build.

6 years agoMFC r327606: Handle misconfigured/nonexistent pcidev for comconsole instead
kevans [Fri, 9 Feb 2018 17:25:34 +0000 (17:25 +0000)]
MFC r327606: Handle misconfigured/nonexistent pcidev for comconsole instead
of BTX panic.

[This is effectively a direct commit to stable/11 due to path restructuring
in head. Diffs have simply been applied to previous location]

PR: 203319

6 years agoMFC r306325, r306329-r306330, r306333, r306620-r306622, r307544, r307550, r318137...
manu [Fri, 9 Feb 2018 09:15:43 +0000 (09:15 +0000)]
MFC r306325, r306329-r306330, r306333, r306620-r306622, r307544, r307550, r318137, r319125, r319295

r306325 by marcel:
Replace the use of linker sets with constructors for both the
formats and schemes.  Formats and schemes are registered at
runtime now, rather than collected at link time.

r306329 by marcel:
Eliminate the use of EDOOFUS.  The error code was used to signal
programming errors, but is really a poor substitute for assert.
And less portable as well.

r306330 by marcel:
Avoid depending on the <sys/endian.h> header for le*enc and be*enc.
Not only is the header unportable, the encoding/decoding functions
are as well.  Instead, duplicate the handful of small inlines we
need into a private header called endian.h.

Aside: an alternative approach is to move the encoding/decoding
functions to a separate system header.  While the header is still
nonportable, such an approach would make it possible to re-use the
definitions by playing games with include paths. This may be the
preferred approach if more (build) utilities need this.  This
change does not preclude that.  In fact, it makes it easier.

r306333 by marcel:
Portability changes:
1.  macOS nor Linux have MAP_NOCORE nor MAP_NOSYNC. Define as 0.
2.  macOS doesn't have SEEK_DATA nor SEEK_HOLE. Define as -1
    so that lseek will return -1 (with errno set to EINVAL).
3.  gcc correctly warns that error is assigned but not used in
    image_copyout_region().  Fix by returning on the first error.

r306620 by marcel:
Replace STAILQ with TAILQ. TAILQs are portable enough that they can
be used on both macOS and Linux. STAILQs are not. In particular,
STAILQ_LAST does not next on Linux. Since neither STAILQ_FOREACH_SAFE
nor TAILQ_FOREACH_SAFE exist on Linux, replace its use with a regular
TAILQ_FOREACH. The _SAFE variant was only used for having the next
pointer in a local variable.

r306621 by marcel:
Prefer <stdint.h> over <sys/types.h>. While here remove redundant
inclusion of <sys/queue.h>.

Move the inclusion of the disk partitioning headers out of order
and inbetween standard headers and local header. They will change
in a subsequent commit.

r306622 by marcel:
Replace OFF_MAX with INT64_MAX. The former is defined on Linux.

r307544 by marcel:
 o  Provide a private definition for UUIDs (mkimg_uuid_t) because
    UUIDs are not portable.
 o  Move mkimg_uuid() to a new file and merge both gpt_uuid_enc()
    and vhd_uuid_enc() into a single mkimg_uuid_enc() that lives
    in the same file.
 o  Move the OS-specific implementation of generating a UUID to
    osdep_uuidgen() and provide the implementations for FreeBSD,
    macOS and Linux.
 o  Expect the partitioning scheme headers to be found by having
    a search to the directory in which the headers live. This
    avoids conflicts on non-FreeBSD machines.

r307550 by imp:
Add a new flag to mkimg (-a num) to specify the active partition for
those partitioning schemes that have this concept. Implement it as an
override for mbr's setting 0x80 in the flags for the first partition
when we have boot code.

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

r318137:
mkimg: Add -C argument to specify maximum capacity

Add a -C option to specify a maximum capacity for the final image file.
It is useful to control the size of the generated image for sdcard or
when we will add dynamic size partition.

Add --capacity which is a shorthand to define min and max capacity at
the same time.

Reviewed by: bapt, marcel, wblock (manpages)
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D10509

r319125:
mkimg: Correct an off by one error in the PMBR size

The PMBR last sector should be number of sector - 1 (As stated in UEFI Spec
2.6 page 118 table 17).
This fixes warning printed by linux tools like parted or fdisk.

Sponsored by: Gandi.net

r319295 by ngie:
Update the usr.bin/mkimg golden test output files after ^/head@r319125

^/head@r319125 changed the location of the backup pmbr, requiring the
output files to be regenerated, since they're binary disk dumps.

The output files were regenerated with "make rebase"--fixed in
^/head@r319294.

MFC with: r319125, r319294
PR: 219673
Sponsored by: Dell EMC Isilon

6 years agoMFC r328611: Try to preallocate receive memory early.
mav [Fri, 9 Feb 2018 03:07:12 +0000 (03:07 +0000)]
MFC r328611: Try to preallocate receive memory early.

We may not have enough contiguous memory later, when NTB connection get
established.  It is quite likely that NTB windows are symmetric and this
allocation remain, but even if not, we will just reallocate it later.

6 years agoMFC r328450: Use bus_dmamem_alloc(9) KPI instead of contigmalloc(9).
mav [Fri, 9 Feb 2018 03:06:45 +0000 (03:06 +0000)]
MFC r328450: Use bus_dmamem_alloc(9) KPI instead of contigmalloc(9).

I suppose it should make this code NUMA-aware with recent NUMA drop-in,
trying to allocate shared memory buffers from domain closer to NT-bridge.

6 years agoMFC r309062: Release laundered vnode pages to the head of the inactive
kevans [Thu, 8 Feb 2018 17:14:56 +0000 (17:14 +0000)]
MFC r309062: Release laundered vnode pages to the head of the inactive
queue.

The swap pager enqueues laundered pages near the head of the inactive queue
to avoid another trip through LRU before reclamation. This change adds
support for this behaviour to the vnode pager and makes use of it in UFS and
ext2fs. Some ioflag handling is consolidated into a common subroutine so
that this support can be easily extended to other filesystems which make use
of the buffer cache. No changes are needed for ZFS since its putpages
routine always undirties the pages before returning, and the laundry
thread requeues the pages appropriately in this case.

6 years agoiw_cxgbe: Manually backport changes related to QP flush. This fixes a
np [Thu, 8 Feb 2018 14:39:07 +0000 (14:39 +0000)]
iw_cxgbe: Manually backport changes related to QP flush.  This fixes a
panic where poll_cq sees an empty RQ while processing an incoming SEND
for a QP that is being taken down.

This is a direct commit to stable/11.

Sponsored by: Chelsio Communications

6 years agoMFC r307322,r307323,r307324,r307326,r307327,r307338,r307879,r307908,r307911,
kevans [Thu, 8 Feb 2018 02:50:47 +0000 (02:50 +0000)]
MFC r307322,r307323,r307324,r307326,r307327,r307338,r307879,r307908,r307911,
r307942,r307950,r307951,r307954,r307955,r308125,r308195,r308476,r308534,
r308535,r308776,r308843,r310236,r310726: Loader fixes, 2016q4

r307322: Remove /boot/boot.conf, deprecated for 16 years

r307323: Remove fetching of pInterp.

r307324: Create a new linker set, Xficl_compile_set which contains a list of
functions to call to register new forth words.

r307326: In UEFI mode expose the SMBIOS anchor base address via kenv

r307327: Update i386 build of loader.efi (but leave it disabled) so that we
at least build it now.

r307338: Create a pcibios-version environment FORTH word.

r307879: Preliminary support for EFI in boot loader.

r307908: Fix the build on both arm64 and when WITHOUT_FORTH is defined.

r307911: Add better comment...

r307942: Really make WITHOUT_FORTH (MK_FORTH==no) work.

r307950: Add it (Makefile.ficl) to the right place

r307951: Fix two backwards tests.

r307954: Back out the move to the loader script from -N.

r307955: LIBSTAND goes last, so put it last here too.

r308125: In loader.efi, instead of exiting directly, try to fallback.

r308195: efinet_dev_print should honor verbose option.

r308476: boot/forth spelling issue in forth word

r308534: The file_loadraw function grew an argument, update install function

r308535: Add support for LOADER_RC setting in the pkgfs manifes

r308776: loader: zfs toplevel vdev must have spa set.

r308843: loader: smbios version check is not correct

r310236: Renumber license clauses to avoid skipping #3

r310726: cdboot: add explict suffix to ambiguous or instruction

PR: 214375

6 years agoMFC r303555,r303556,r303936,r303962,r304317,r304532,r305026,r305107,r305132,
kevans [Thu, 8 Feb 2018 02:44:21 +0000 (02:44 +0000)]
MFC r303555,r303556,r303936,r303962,r304317,r304532,r305026,r305107,r305132,
r305178,r305353,r305814,r306159,r306380,r306504: Loader fixes, 2016q3

r303555: bcache should support reads shorter than sector size

r303556: Improve boot loader quote parsing

r303936: Add kernel environment variables under smbios.system

r303962: Add the missing space between .asciz directive and opening quote
for some lines with #ifdef BTXLDR_VERBOSE/#endif

r304317: boot1.efi Free() should check for NULL to provide consistent
behavior

r304532: Replace sprintf -> snprintf for command_errbuf provisioned from
dynamic content.

r305026: Emulate efi_cons_poll when WaitForKey is not available

r305107: Create a hook 'post-initialize' for people that want to define
something to read in .conf files after all other .conf files for the purpose
of overriding.

r305132: Remove accidentally committed stray comment.

r305178: bd_int13probe() should check extended info if sector info is bad

r305353: Don't use -N to set the OMAGIC with data and text writeable and
data not page aligned.

r305814: ufsread: Do not cast struct direct from void *

r306159: Consistently declare getsecs(void) with proper return type and void
when no arguments are present.

r306380: loader command interpreter should reset command_errmsg

r306504: Fix a cluster of bugs in list EFI environment variables

PR:             204602, 211958, 211958
Relnotes:       yes ("Improve boot loader quote parsing")

6 years agoMFC 319454: Honor the requested crid when running a test.
jhb [Thu, 8 Feb 2018 00:59:56 +0000 (00:59 +0000)]
MFC 319454: Honor the requested crid when running a test.

Otherwise, the kernel is free to choose an aribtrary crypto device
rather than the requested device subverting tests that force the use
of a specific device.

6 years agoMFC r328412: vt: add Ctrl+/ key mapping
emaste [Thu, 8 Feb 2018 00:40:56 +0000 (00:40 +0000)]
MFC r328412: vt: add Ctrl+/ key mapping

This matches Xorg's handling of Ctrl+/ and may be useful as a tmux
escape.

PR: 212197
Submitted by: martin at sugioarto.com
Relnotes: Yes

6 years agoFix rootgen.sh to reflect proper bootloader paths
kevans [Wed, 7 Feb 2018 19:49:07 +0000 (19:49 +0000)]
Fix rootgen.sh to reflect proper bootloader paths

This is a direct commit to stable/11 to use sys/boot instead of stand/. It
will be reverted once the move from sys/boot to stand/ gets an MFC.

6 years agoMFC r326873,r326874,r326875,r326883,r326884,r326885,r326954,r328865
kevans [Wed, 7 Feb 2018 19:45:23 +0000 (19:45 +0000)]
MFC r326873,r326874,r326875,r326883,r326884,r326885,r326954,r328865

r326873: Script that knows how to put boot blocks onto a device.

r326874: Script to generate minimal boot images for each of the 24 supported

r326875: Add missing of=/dev/${dev}s${s} when installing zfsboot.

r326883: For now, make the gpart commands verbose

r326884: Be a little verbose and list the loader files we're putting on

r326885: Use -h -D in preference to -D so that the serial port gets the
interactive console.

r326954: Support more images (but still no geli)

r328865: Flesh out the creation of sparc64 UFS images.

6 years agoMFC r328694:
hselasky [Wed, 7 Feb 2018 18:18:33 +0000 (18:18 +0000)]
MFC r328694:
Make sure the LinuxKPI's internal ERESTARTSYS error code gets translated
into ERESTART for mmap and page fault calls aswell.

Sponsored by: Mellanox Technologies

6 years agoMFC r328436 and r328731:
hselasky [Wed, 7 Feb 2018 18:17:10 +0000 (18:17 +0000)]
MFC r328436 and r328731:
Decouple Linux files from the belonging character device right after open
in the LinuxKPI. This is done by calling finit() just before returning a magic
value of ENXIO in the "linux_dev_fdopen" function.

The Linux file structure should mimic the BSD file structure as much as
possible. This patch decouples the Linux file structure from the belonging
character device right after the "linux_dev_fdopen" function has returned.
This fixes an issue which allows a Linux file handle to exist after a
character device has been destroyed and removed from the directory index
of /dev. Only when the reference count of the BSD file handle reaches zero,
the Linux file handle is destroyed. This fixes use-after-free issues related
to accessing the Linux file structure after the character device has been
destroyed.

While at it add a missing NULL check for non-present file operation.
Calling a NULL pointer will result in a segmentation fault.

Fix some recent regressions after r328436 in the LinuxKPI:

1) The OPW() function macro should have the same return type like the
function it executes.
2) The DEVFS I/O-limit should be enforced for all character device reads
and writes.
3) The character device file handle should be passable, same as for
DEVFS based file handles.

Reviewed by: kib @
Reported by: jbeich @
Sponsored by: Mellanox Technologies

6 years agoRevert r328974, r307387 was not supposed to be part of it.
manu [Wed, 7 Feb 2018 16:45:38 +0000 (16:45 +0000)]
Revert r328974, r307387 was not supposed to be part of it.

6 years agoMFC r306325, r306329-r306330, r306333, r306620-r306622, r307387, r307544, r307550...
manu [Wed, 7 Feb 2018 15:32:31 +0000 (15:32 +0000)]
MFC r306325, r306329-r306330, r306333, r306620-r306622, r307387, r307544, r307550, r318137, r319125, r319295

r306325 by marcel:
Replace the use of linker sets with constructors for both the
formats and schemes.  Formats and schemes are registered at
runtime now, rather than collected at link time.

r306329 by marcel:
Eliminate the use of EDOOFUS.  The error code was used to signal
programming errors, but is really a poor substitute for assert.
And less portable as well.

r306330 by marcel:
Avoid depending on the <sys/endian.h> header for le*enc and be*enc.
Not only is the header unportable, the encoding/decoding functions
are as well.  Instead, duplicate the handful of small inlines we
need into a private header called endian.h.

Aside: an alternative approach is to move the encoding/decoding
functions to a separate system header.  While the header is still
nonportable, such an approach would make it possible to re-use the
definitions by playing games with include paths. This may be the
preferred approach if more (build) utilities need this.  This
change does not preclude that.  In fact, it makes it easier.

r306333 by marcel:
Portability changes:
1.  macOS nor Linux have MAP_NOCORE nor MAP_NOSYNC. Define as 0.
2.  macOS doesn't have SEEK_DATA nor SEEK_HOLE. Define as -1
    so that lseek will return -1 (with errno set to EINVAL).
3.  gcc correctly warns that error is assigned but not used in
    image_copyout_region().  Fix by returning on the first error.

r306620 by marcel:
Replace STAILQ with TAILQ. TAILQs are portable enough that they can
be used on both macOS and Linux. STAILQs are not. In particular,
STAILQ_LAST does not next on Linux. Since neither STAILQ_FOREACH_SAFE
nor TAILQ_FOREACH_SAFE exist on Linux, replace its use with a regular
TAILQ_FOREACH. The _SAFE variant was only used for having the next
pointer in a local variable.

r306621 by marcel:
Prefer <stdint.h> over <sys/types.h>. While here remove redundant
inclusion of <sys/queue.h>.

Move the inclusion of the disk partitioning headers out of order
and inbetween standard headers and local header. They will change
in a subsequent commit.

r306622 by marcel:
Replace OFF_MAX with INT64_MAX. The former is defined on Linux.

r307387 by marcel:
Switch to using the portable partition scheme headers.

r307544 by marcel:
 o  Provide a private definition for UUIDs (mkimg_uuid_t) because
    UUIDs are not portable.
 o  Move mkimg_uuid() to a new file and merge both gpt_uuid_enc()
    and vhd_uuid_enc() into a single mkimg_uuid_enc() that lives
    in the same file.
 o  Move the OS-specific implementation of generating a UUID to
    osdep_uuidgen() and provide the implementations for FreeBSD,
    macOS and Linux.
 o  Expect the partitioning scheme headers to be found by having
    a search to the directory in which the headers live. This
    avoids conflicts on non-FreeBSD machines.

r307550 by imp:
Add a new flag to mkimg (-a num) to specify the active partition for
those partitioning schemes that have this concept. Implement it as an
override for mbr's setting 0x80 in the flags for the first partition
when we have boot code.

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

r318137:
mkimg: Add -C argument to specify maximum capacity

Add a -C option to specify a maximum capacity for the final image file.
It is useful to control the size of the generated image for sdcard or
when we will add dynamic size partition.

Add --capacity which is a shorthand to define min and max capacity at
the same time.

Reviewed by: bapt, marcel, wblock (manpages)
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D10509

r319125:
mkimg: Correct an off by one error in the PMBR size

The PMBR last sector should be number of sector - 1 (As stated in UEFI Spec
2.6 page 118 table 17).
This fixes warning printed by linux tools like parted or fdisk.

Sponsored by: Gandi.net

r319295 by ngie:
Update the usr.bin/mkimg golden test output files after ^/head@r319125

^/head@r319125 changed the location of the backup pmbr, requiring the
output files to be regenerated, since they're binary disk dumps.

The output files were regenerated with "make rebase"--fixed in
^/head@r319294.

MFC with: r319125, r319294
PR: 219673
Sponsored by: Dell EMC Isilon

6 years agoMFC r328237:
hselasky [Wed, 7 Feb 2018 15:06:54 +0000 (15:06 +0000)]
MFC r328237:
Use the __alloc_size2 attribute where relevant.

This follows the documented use in GCC. It is basically only relevant for
calloc(3), reallocarray(3) and  mallocarray(9).

NOTE: Without this change clang 5.0.1 can produce incorrect optimisation
code for static processing of data using the allocated object. For example
this has been seen compiling the mlx4 core module, which allocates a
fixed size array which is then sorted by a fixed order loop. The
optimised result, -O2, is incorrect unless this patch is in place.

Suggested by: Mark Millard
Reference: https://docs.freebsd.org/cgi/mid.cgi?9DE674C6-EAA3-4E8A-906F-446E74D82FC4

6 years agoMFC r328326:
ae [Wed, 7 Feb 2018 09:28:23 +0000 (09:28 +0000)]
MFC r328326:
  When IPv6 packet is handled by O_REJECT opcode, convert ICMP code
  specified in the arg1 into ICMPv6 destination unreachable code according
  to RFC7915.

  Obtained from: Yandex LLC
  Sponsored by: Yandex LLC

6 years agoMFC r324821:
mmel [Wed, 7 Feb 2018 06:29:07 +0000 (06:29 +0000)]
MFC r324821:

  Fix spelling.

6 years agoMFC r325438:
mmel [Wed, 7 Feb 2018 06:27:29 +0000 (06:27 +0000)]
MFC r325438:

  All CP15 registers are bit fields or counters, don't use signed type when
  accessing them.

6 years agoMFC r325364,r326794:
mmel [Wed, 7 Feb 2018 06:24:34 +0000 (06:24 +0000)]
MFC r325364,r326794:

  r325364:
    Add alignment support to __libc_allocate_tls().
  r326794:
    Rework alignment handling in __libc_allocate_tls() for Variant I of TLS
    layout.

6 years agoAdjust MFC in r328944 to stable/11.
kib [Tue, 6 Feb 2018 23:50:02 +0000 (23:50 +0000)]
Adjust MFC in r328944 to stable/11.
This is a direct commit to the branch.

Sponsored by: The FreeBSD Foundation

6 years agoMFC of 328647.
mckusick [Tue, 6 Feb 2018 19:17:05 +0000 (19:17 +0000)]
MFC of 328647.

avoid segment fault in g_journal

6 years agoMFC of 328643.
mckusick [Tue, 6 Feb 2018 19:13:44 +0000 (19:13 +0000)]
MFC of 328643.

fix vn_printf listing of its union

6 years agoMFC of 328304 and 328382.
mckusick [Tue, 6 Feb 2018 19:09:03 +0000 (19:09 +0000)]
MFC of 328304 and 328382.

Do not dedup egid (group entry 0)

6 years agoMFC r308774: loader: beri_sdcard_disk_print() needs to return int.
kevans [Tue, 6 Feb 2018 18:01:41 +0000 (18:01 +0000)]
MFC r308774: loader: beri_sdcard_disk_print() needs to return int.

r308434 did change the return type for dv_print callbacks, but the return
type for beri_sdcard_disk_print() was left unchanged, causing compile errors.

6 years agoMFC r325116,r325515: Stop masking errors during buildenv
kevans [Tue, 6 Feb 2018 14:04:39 +0000 (14:04 +0000)]
MFC r325116,r325515: Stop masking errors during buildenv

MFC r325116(imp): Return proper status from buildenv.

make buildenv BUILDENV_SHELL=<some command> more useful. Remove '||
true' from the command line so that errors are properly
returned. There appears to be no reason for it, and it dates back to
the original commit by ru@.

MFC r325515 (imp): Note interactive shell errors for make buildenv and add a
warning for people tempted to add back the || true to get rid of them.

6 years agoMFC r328273 (kevlo): Document how to load nmdm(4) from a kernel module.
delphij [Tue, 6 Feb 2018 07:47:22 +0000 (07:47 +0000)]
MFC r328273 (kevlo): Document how to load nmdm(4) from a kernel module.

6 years agoMFC r342882,r324979,r325115: sys/boot test scripts
kevans [Mon, 5 Feb 2018 21:29:27 +0000 (21:29 +0000)]
MFC r342882,r324979,r325115: sys/boot test scripts

[Note: arm/armv7 has been removed in the interest of not having a failing
architecture from the start]

MFC r342882: Create a shell script to build sys/boot on all the
architectures.

MFC r324979: Do a chdir to SRCTOP/sys/boot before starting the run.

MFC r325115: Fix parallel build issues and add MK_ZFS=no case

6 years agoMFC r328552
vangyzen [Mon, 5 Feb 2018 18:56:34 +0000 (18:56 +0000)]
MFC r328552

ND6: Set the correct state for new neighbor cache entries

Restore state 6.  Many of the UNH tests end up exercising this
state, where we have a new neighbor cache entry and a new link-layer
entry is being created for it.  The link-layer address is currently
unknown so the initial state of the "llentry" should remain initialized
to ND6_LLINFO_NOSTATE so that the ND code will send a solicitation.
Setting this to ND6_LLINFO_STALE implies that the link-level entry
is valid and can be used (but needs to be refreshed via the Neighbor
Unreachability state machine).

https://forums.freebsd.org/threads/64287/

Submitted by: Farrell Woods <Farrell_Woods@Dell.com>
Reviewed by: mjoras, dab, ae
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D14059

6 years agoMFC r308434, 308827
kevans [Mon, 5 Feb 2018 17:01:18 +0000 (17:01 +0000)]
MFC r308434, 308827

MFC r308434: Loader paged/pageable data is not always paged.
MFC r308827: lsdev device name section headers should be printed by dv_print
callback.

6 years agoMerge r327951
n_hibma [Mon, 5 Feb 2018 16:28:03 +0000 (16:28 +0000)]
Merge r327951

Add IDs for Quectel EC25.

Submitted by: Samuel Crookes

6 years agoMFC r328567:
pfg [Mon, 5 Feb 2018 15:02:35 +0000 (15:02 +0000)]
MFC r328567:
libedit: sort the Makefile in line with NetBSD's version.

NetBSD's libedit has been been cleaned-up considerably so the
non-widecharacter version is no longer an option. Re-sorting the
Makefile should make it easier for some brave soul trying to update it.

No functional change intended.

6 years agoMFC r328773:
kib [Mon, 5 Feb 2018 10:29:57 +0000 (10:29 +0000)]
MFC r328773:
On pageout, in vnode generic pager, for partially dirty page, only
clear dirty bits for completely invalid blocks.

PR: 225586