]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoDocument an issue with emulators/virtualbox-ose reported in
gjb [Tue, 26 Jun 2018 13:29:49 +0000 (13:29 +0000)]
Document an issue with emulators/virtualbox-ose reported in
Bugzilla 228535.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r334340: add support for console resuming, implement it for uart, use on x86
avg [Tue, 26 Jun 2018 09:04:24 +0000 (09:04 +0000)]
MFC r334340: add support for console resuming, implement it for uart, use on x86

5 years agoMFC r333268: for bus suspend, detach and shutdown iterate children in reverse order
avg [Tue, 26 Jun 2018 08:56:34 +0000 (08:56 +0000)]
MFC r333268: for bus suspend, detach and shutdown iterate children in reverse order

5 years agoMFC r334204,r334338: re-synchronize TSC-s on SMP systems after resume
avg [Tue, 26 Jun 2018 08:35:58 +0000 (08:35 +0000)]
MFC r334204,r334338: re-synchronize TSC-s on SMP systems after resume

5 years agoMFC r333994: stop and restart kernel event timers in the suspend / resume cycle
avg [Tue, 26 Jun 2018 08:31:08 +0000 (08:31 +0000)]
MFC r333994: stop and restart kernel event timers in the suspend / resume cycle

5 years agoMFC r321427,r321445:
bdrewery [Mon, 25 Jun 2018 18:53:06 +0000 (18:53 +0000)]
MFC r321427,r321445:

  r321427:
    PROGS: Fix ESTALE errors on NFS while cleaning in directories with PROGS.
  r321445:
    cleandir: Fix ESTALE errors from parallel removals.

5 years agoMFC r334277, r334376, r334378 and r334418:
hselasky [Mon, 25 Jun 2018 15:09:55 +0000 (15:09 +0000)]
MFC r334277, r334376, r334378 and r334418:

MFV r333789: libpcap 1.9.0 (pre-release)

- Update local copy of dlt.h with new DLT types.

Sponsored by: Mellanox Technologies

5 years agoMFC r334881:
markj [Mon, 25 Jun 2018 10:37:21 +0000 (10:37 +0000)]
MFC r334881:
Add DW_LANG_* definitions from DWARF 4 and 5.

5 years agoMFC r333638: calibrate lapic timer in native_lapic_setup
avg [Mon, 25 Jun 2018 09:19:50 +0000 (09:19 +0000)]
MFC r333638: calibrate lapic timer in native_lapic_setup

5 years agoMFC r334002: uchcom: extend hardware support to version 0x30
avg [Mon, 25 Jun 2018 08:56:30 +0000 (08:56 +0000)]
MFC r334002: uchcom: extend hardware support to version 0x30

5 years agoMFC r334001: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1
avg [Mon, 25 Jun 2018 08:54:46 +0000 (08:54 +0000)]
MFC r334001: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1

5 years agoMFC r334000: uchcom: reject parity and double stop bits as unsupported
avg [Mon, 25 Jun 2018 08:52:48 +0000 (08:52 +0000)]
MFC r334000: uchcom: reject parity and double stop bits as unsupported

5 years agoMFC r333999: uchcom: add a hardware configuration tweak seen in Linux code
avg [Mon, 25 Jun 2018 08:50:06 +0000 (08:50 +0000)]
MFC r333999: uchcom: add a hardware configuration tweak seen in Linux code

5 years agoMFC r333998: uchcom: add DPRINTF-s to aid debugging of the driver
avg [Mon, 25 Jun 2018 08:48:39 +0000 (08:48 +0000)]
MFC r333998: uchcom: add DPRINTF-s to aid debugging of the driver

5 years agoMFC r333997: uchcom: report detected product based on USB product ID
avg [Mon, 25 Jun 2018 08:47:07 +0000 (08:47 +0000)]
MFC r333997: uchcom: report detected product based on USB product ID

5 years agoMFC r335282:
slavash [Mon, 25 Jun 2018 07:25:41 +0000 (07:25 +0000)]
MFC r335282:
Fix false positive on failure

When running mckey, errors may happen in the init/connect stage.
When leaving multicast groups, we override this value.

Fix that by saving the return value from rdma_leave_multicast to different
parameter, and only in case of failure in rdma_leave_multicast override it.

Approved by:    hselasky (mentor), kib (mentor)
Sponsored by:   Mellanox Technologies

5 years agoMFC r334928:
kib [Sun, 24 Jun 2018 13:26:31 +0000 (13:26 +0000)]
MFC r334928:
libc qsort(3): stop aliasing.

PR: 228780

5 years agoMFC r335258:
kib [Sat, 23 Jun 2018 00:38:44 +0000 (00:38 +0000)]
MFC r335258:
Remove unused file.

5 years agoMFC r333059 (by tychon):
kib [Fri, 22 Jun 2018 23:52:20 +0000 (23:52 +0000)]
MFC r333059 (by tychon):
Expand the checks for UCR3 == PMAP_NO_CR3 to enable processes to be
excluded from PTI.

5 years agocxgbe(4): Determine early in the ioctl whether it is allowed to sleep or
np [Fri, 22 Jun 2018 20:19:33 +0000 (20:19 +0000)]
cxgbe(4): Determine early in the ioctl whether it is allowed to sleep or
not, instead of always starting a non-sleepable operation and
re-adjusting later.  This ensures that an operation that is allowed to
sleep (ifconfig up/down) never fails with EBUSY on the initial attempt
to start a synchronized operation.

This is a direct commit to stable/11.  The driver ioctl is always
allowed to sleep in head.

Sponsored by: Chelsio Communications

5 years agoMFC r333667: followup to r332730/r332752: set kdb_why to "trap" for fatal traps
avg [Fri, 22 Jun 2018 10:49:21 +0000 (10:49 +0000)]
MFC r333667: followup to r332730/r332752: set kdb_why to "trap" for fatal traps

This change updates arm, arm64 and mips achitectures.  Additionally, it
removes redundant checks for kdb_active where it already results in
kdb_reenter() and adds kdb_reenter() calls where they were missing.

Some architectures check the return value of kdb_trap(), but some don't.
I haven't changed any of that.

Some trap handling routines have a return code.  I am not sure if I
provided correct ones for returns after kdb_reenter().  kdb_reenter
should never return unless kdb_jmpbufp is NULL for some reason.

5 years agoMFC r333321,r333707: x86 cpususpend_handler: call wbinvd after setting suspend state...
avg [Fri, 22 Jun 2018 10:44:33 +0000 (10:44 +0000)]
MFC r333321,r333707: x86 cpususpend_handler: call wbinvd after setting suspend state bits

Without a subsequent wbinvd the changes to suspended_cpus (and
resuming_cpus) can be lost at least on AMD systems that use MOESI cache
coherency protocol.  That can happen because one of APs ends up as an
Owner of the corresponding cache line(s) and the changes may never reach
the main memory before the AP is reset.

This change fixed suspend to RAM a previously broken AMD-based system.

5 years agoMFC r332918, r333222: go deeper for ACPI suspend bounce test
avg [Fri, 22 Jun 2018 10:39:22 +0000 (10:39 +0000)]
MFC r332918, r333222: go deeper for ACPI suspend bounce test

debug.acpi.suspend_bounce sysctl now allows a deeper dive into the sleep
abyss.  The system will execute the suspend sequence up to the call to
AcpiEnterSleepState().  That includes saving processor contexts and
parking APs.  Then, instead of actually entering the sleep state, the
BSP will call resumectx() to emulate the wakeup.  The APs should get
restarted by the sequence of Init and Startup IPIs that BSP sends to
them.

AcpiOsEnterSleep() is used to implement this feature.

Joint work with jkim.

5 years agoMFC r335199:
kib [Fri, 22 Jun 2018 10:07:21 +0000 (10:07 +0000)]
MFC r335199:
linprocfs: add TracerPid to /proc/pid/status.

5 years agoMFC r333630: Fix 'zpool create -t <tempname>'
avg [Fri, 22 Jun 2018 09:37:26 +0000 (09:37 +0000)]
MFC r333630: Fix 'zpool create -t <tempname>'

Creating a pool with a temporary name fails when we also specify custom
dataset properties: this is because we mistakenly call
zfs_set_prop_nvlist() on the "real" pool name which, as expected,
cannot be found because the SPA is present in the namespace with the
temporary name.

5 years agoMFC r334785: expand descriptions of x86 panic_on_nmi and kdb_on_nmi sysctls
avg [Fri, 22 Jun 2018 09:29:34 +0000 (09:29 +0000)]
MFC r334785: expand descriptions of x86 panic_on_nmi and kdb_on_nmi sysctls

5 years agoMFC r333269: amdsbwd: fix reboot status reporting
avg [Fri, 22 Jun 2018 09:25:24 +0000 (09:25 +0000)]
MFC r333269: amdsbwd: fix reboot status reporting

5 years agoMFC r333243: opensolaris system_taskq does not need to run at maximum priority
avg [Fri, 22 Jun 2018 09:22:30 +0000 (09:22 +0000)]
MFC r333243: opensolaris system_taskq does not need to run at maximum priority

5 years agoMFC r333212: amdsbwd: add suspend and resume methods
avg [Fri, 22 Jun 2018 09:20:00 +0000 (09:20 +0000)]
MFC r333212: amdsbwd: add suspend and resume methods

5 years agoMFC r332816: call racct_proc_ucred_changed() under the proc lock
avg [Fri, 22 Jun 2018 09:18:38 +0000 (09:18 +0000)]
MFC r332816: call racct_proc_ucred_changed() under the proc lock

5 years agoMFC r333209: hpet: use macros instead of magic values for the timer mode
avg [Fri, 22 Jun 2018 09:08:38 +0000 (09:08 +0000)]
MFC r333209: hpet: use macros instead of magic values for the timer mode

5 years agoMFC r334472:
eadler [Fri, 22 Jun 2018 04:54:51 +0000 (04:54 +0000)]
MFC r334472:

service(1): Improve manual page

* Sort options..
* Fix some typos.
* Use one Bd macro for code blocks instead of a bunch of Dl
* macros.
* Improve formatting.
* Clarify 'jail' argument

PR: 228552

5 years agoMFC r335213: ldd: reference readelf instead of objdump in warning message
emaste [Fri, 22 Jun 2018 00:30:24 +0000 (00:30 +0000)]
MFC r335213: ldd: reference readelf instead of objdump in warning message

We have an obsolete GNU objdump 2.17.50 in the base system, which will
be removed in the future.  Suggest readelf(1) for examining ELF files
instead; for most use cases it is the preferred tool anyhow.

PR: 229046
Sponsored by: The FreeBSD Foundation

5 years agoMFC r335209: elf.5: add readelf cross-reference
emaste [Fri, 22 Jun 2018 00:29:29 +0000 (00:29 +0000)]
MFC r335209: elf.5: add readelf cross-reference

objdump is sometimes used in cases where readelf is more appropriate,
but the obsolete GNU objdump we have in the base system will be removed
in the future.

.Xr readelf from elf.5 to improve the odds the more appropriate tool
will be found.

PR: 229046
Sponsored by: The FreeBSD Foundation

5 years agoMFC r335214: Correct kern.pre.mk comment: objcopy copies objects.
emaste [Fri, 22 Jun 2018 00:28:28 +0000 (00:28 +0000)]
MFC r335214: Correct kern.pre.mk comment: objcopy copies objects.

(Not objdump.)

PR: 229046
Sponsored by: The FreeBSD Foundation

5 years agoMFC r335221: Add deprecation notice in asf.8
emaste [Fri, 22 Jun 2018 00:27:31 +0000 (00:27 +0000)]
MFC r335221: Add deprecation notice in asf.8

PR: 229046
Sponsored by: The FreeBSD Foundation

5 years agoSet stable/11 from -PRERELEASE back to -STABLE.
gjb [Thu, 21 Jun 2018 23:29:17 +0000 (23:29 +0000)]
Set stable/11 from -PRERELEASE back to -STABLE.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoPrune SAs and ENs from 11.1-RELEASE in preparation for creating the
gjb [Thu, 21 Jun 2018 23:13:34 +0000 (23:13 +0000)]
Prune SAs and ENs from 11.1-RELEASE in preparation for creating the
11.2-RELEASE errata page.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoSynchronize the stable/11 errata page with releng/11.2 in preparation
gjb [Thu, 21 Jun 2018 23:10:58 +0000 (23:10 +0000)]
Synchronize the stable/11 errata page with releng/11.2 in preparation
for creating the 11.2-RELEASE errata.html page.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoUpdate version entities in release.ent.
gjb [Thu, 21 Jun 2018 23:09:40 +0000 (23:09 +0000)]
Update version entities in release.ent.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoMFC r335171:
kib [Thu, 21 Jun 2018 21:21:16 +0000 (21:21 +0000)]
MFC r335171:
Handle the race between fork/vm_object_split() and faults.

5 years agoMFC r335135:
kib [Thu, 21 Jun 2018 21:19:48 +0000 (21:19 +0000)]
MFC r335135:
linuxolator/amd64: Don't mangle %r10 on return from syscall for EJUSTRETURN.

5 years agoAdd xml:id attributes for future diff reduction.
gjb [Thu, 21 Jun 2018 17:05:31 +0000 (17:05 +0000)]
Add xml:id attributes for future diff reduction.

Sponsored by: The FreeBSD Foundation

5 years agoDocument EN-18:07, SA-18:07.
gjb [Thu, 21 Jun 2018 16:53:48 +0000 (16:53 +0000)]
Document EN-18:07, SA-18:07.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r335314:
ed [Thu, 21 Jun 2018 16:12:30 +0000 (16:12 +0000)]
MFC r335314:

  Fix bad logic in iovlist_truncate().

  To conform to RFC 5426, this function is intended to truncate messages
  if they exceed the message size limits. Unfortunately, the amount of
  space was computed the wrong way around, causing messages to be
  truncated entirely.

Reported by:  Michael Grimm on stable@

5 years agoMFC r335306: bsdconfig: Make examples optional
dteske [Thu, 21 Jun 2018 15:11:14 +0000 (15:11 +0000)]
MFC r335306: bsdconfig: Make examples optional

PR: bin/228485
Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru>
Reported by: Dmitry Wagin <dmitry.wagin@ya.ru>
Sponsored by: Smule, Inc.

5 years agoMFC r335308: bsdconfig: Fix a bug when editing users
dteske [Thu, 21 Jun 2018 14:55:26 +0000 (14:55 +0000)]
MFC r335308: bsdconfig: Fix a bug when editing users

The usermgmt API was stomping on a global ($user_gid to be specific)
so things would appear to work fine until you tried to make a second
pass into the API with the now-tainted variable contents.

Fixed by localizing menu-specific contents as to not leak outside API.

PR: bin/208774
Reported by: Martin Waschbuesch <martin@waschbuesch.de>
Sponsored by: Smule, Inc.

5 years agoMFC r335280-r335281, r335302: sysrc.subr updates
dteske [Thu, 21 Jun 2018 14:41:58 +0000 (14:41 +0000)]
MFC r335280-r335281, r335302: sysrc.subr updates

r335280: Fix handling of files with missing newline at EOF
r335302: Fix a comment for accuracy

PR: bin/203435
Reported by: Andreas Sommer <andreas.sommer87@googlemail.com>

r335281: Fix display when value is "-n"

PR: bin/226406
Reported by: Marius Halden <marius.halden@modirum.com>

Sponsored by: Smule, Inc.

5 years agoMFC r330886: Install files added in SVN's r295373, r295457, r295542
dteske [Thu, 21 Jun 2018 14:21:11 +0000 (14:21 +0000)]
MFC r330886: Install files added in SVN's r295373, r295457, r295542

Reported by: woodsb02
Sponsored by: Smule, Inc.

5 years agoMFC r335133:
ae [Thu, 21 Jun 2018 10:51:25 +0000 (10:51 +0000)]
MFC r335133:
  In m_megapullup() use m_getjcl() to allocate 9k or 16k mbuf when requested.

  It is better to try allocate a big mbuf, than just silently drop a big
  packet. A better solution could be reworking of libalias modules to be
  able use m_copydata()/m_copyback() instead of requiring the single
  contiguous buffer.

  PR: 229006

5 years agoMFC r335297:
dim [Thu, 21 Jun 2018 09:45:03 +0000 (09:45 +0000)]
MFC r335297:

Fix build of ndis with base gcc on i386

Casting from rman_res_t to a pointer results in "cast to pointer from
integer of different size" warnings with base gcc on i386, so use an
intermediate cast to uintptr_t to suppress it.  In this case, the I/O
port range is effectively limited to the range of 0..65535.

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

5 years agoMFC r335296:
dim [Thu, 21 Jun 2018 09:41:44 +0000 (09:41 +0000)]
MFC r335296:

Fix build of aibs with base gcc on i386

Add a few intermediate casts to intptr_t to suppress "cast to pointer
from integer of different size" warnings from gcc.  In this case, the
'arg2' part of SYSCTL_HANDLER_ARGS is used to pass in a pointer, via an
intermediate intmax_t, so no information is lost.

Reviewed by: avg
Differential Revision: https://reviews.freebsd.org/D15725

5 years agoMFC r332994 (by tychon):
kib [Wed, 20 Jun 2018 17:37:55 +0000 (17:37 +0000)]
MFC r332994 (by tychon):
Handle potential alignment adjustment of the exception frame by hardware.

5 years agoBump the __FreeBSD_version after recent LinuxKPI updates to force
hselasky [Wed, 20 Jun 2018 07:02:19 +0000 (07:02 +0000)]
Bump the __FreeBSD_version after recent LinuxKPI updates to force
recompilation of external kernel modules.

This is a direct commit.

Sponsored by:   Mellanox Technologies

5 years agoMFC r334775:
hselasky [Wed, 20 Jun 2018 06:59:39 +0000 (06:59 +0000)]
MFC r334775:
Move the EXPORT_SYMBOL_XXX() function macros into own header file.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334662:
hselasky [Wed, 20 Jun 2018 06:58:51 +0000 (06:58 +0000)]
MFC r334662:
Define the __kernel_size_t type in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334958:
hselasky [Wed, 20 Jun 2018 06:57:59 +0000 (06:57 +0000)]
MFC r334958:
Implement the kstrtobool() and kstrtobool_from_user() functions
in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334953:
hselasky [Wed, 20 Jun 2018 06:57:14 +0000 (06:57 +0000)]
MFC r334953:
Implement the user_access_begin(), user_access_end(), usafe_get_user() and
unsafe_put_user() function macros in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334778:
hselasky [Wed, 20 Jun 2018 06:56:18 +0000 (06:56 +0000)]
MFC r334778:
Define ARCH_KMALLOC_MINALIGN in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334777:
hselasky [Wed, 20 Jun 2018 06:52:32 +0000 (06:52 +0000)]
MFC r334777:
Wrap timespec64 into timespec in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334774:
hselasky [Wed, 20 Jun 2018 06:51:41 +0000 (06:51 +0000)]
MFC r334774:
Implement the dev_pm_set_driver_flags() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334720:
hselasky [Wed, 20 Jun 2018 06:50:56 +0000 (06:50 +0000)]
MFC r334720:
Make some list functions RCU safe in the LinuxKPI.
While at it rename hlist_add_after() into hlist_add_behind().

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334717:
hselasky [Wed, 20 Jun 2018 06:50:11 +0000 (06:50 +0000)]
MFC r334717:
Implement the __add_wait_queue_entry_tail() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334715:
hselasky [Wed, 20 Jun 2018 06:49:26 +0000 (06:49 +0000)]
MFC r334715:
Implement the might_sleep_if() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334714:
hselasky [Wed, 20 Jun 2018 06:48:41 +0000 (06:48 +0000)]
MFC r334714:
Rename two structure field members while keeping backwards compatibility in
the LinuxKPI. Add a comment saying in which Linux version this change was made.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334713:
hselasky [Wed, 20 Jun 2018 06:47:49 +0000 (06:47 +0000)]
MFC r334713:
Implement the init_wait_entry() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334712 and r334718:
hselasky [Wed, 20 Jun 2018 06:46:54 +0000 (06:46 +0000)]
MFC r334712 and r334718:
Implement the atomic_dec_if_positive() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334711:
hselasky [Wed, 20 Jun 2018 06:43:41 +0000 (06:43 +0000)]
MFC r334711:
Implement the ktime_compare() and ktime_after() functions in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334710:
hselasky [Wed, 20 Jun 2018 06:42:51 +0000 (06:42 +0000)]
MFC r334710:
Implement the rdmsrl_safe() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334664:
hselasky [Wed, 20 Jun 2018 06:42:04 +0000 (06:42 +0000)]
MFC r334664:
Declare and set the global "system_highpri_wq" workqueue structure pointer
in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334663:
hselasky [Wed, 20 Jun 2018 06:41:15 +0000 (06:41 +0000)]
MFC r334663:
Implement the INIT_DELAYED_WORK_ONSTACK() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334661:
hselasky [Wed, 20 Jun 2018 06:40:19 +0000 (06:40 +0000)]
MFC r334661:
Implement the task_pid_vnr() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334660:
hselasky [Wed, 20 Jun 2018 06:39:32 +0000 (06:39 +0000)]
MFC r334660:
Add "access" function pointer to the "vm_operations_struct" structure
in the LinuxKPI. While at it document when to use the "virtual_address" or
the "address" field in the "vm_fault" structure.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334659:
hselasky [Wed, 20 Jun 2018 06:38:46 +0000 (06:38 +0000)]
MFC r334659:
Implement mul_u32_u32() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334658:
hselasky [Wed, 20 Jun 2018 06:38:03 +0000 (06:38 +0000)]
MFC r334658:
Implement timer_setup() and from_timer() function macros in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334484:
hselasky [Wed, 20 Jun 2018 06:37:15 +0000 (06:37 +0000)]
MFC r334484:
Implement the __sg_alloc_table_from_pages() function based on the existing
sg_alloc_table_from_pages() function in the LinuxKPI.

This basically allow segments to have a limit, max_segment.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334483:
hselasky [Wed, 20 Jun 2018 06:36:25 +0000 (06:36 +0000)]
MFC r334483:
Implement radix_tree_iter_delete() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334482:
hselasky [Wed, 20 Jun 2018 06:35:37 +0000 (06:35 +0000)]
MFC r334482:
Improve high resolution timer support in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334481:
hselasky [Wed, 20 Jun 2018 06:34:31 +0000 (06:34 +0000)]
MFC r334481:
Add more GFP macro definitions in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

5 years agoMFC r334303: sysrc(8): Test variable names for invalid characters
dteske [Wed, 20 Jun 2018 06:24:03 +0000 (06:24 +0000)]
MFC r334303: sysrc(8): Test variable names for invalid characters

PR: bin/187461
Reported by: ebay@looksharp.net
Sponsored by: Smule, Inc.

5 years agoMFC r330878-r330879, r330939, r330948: Man-page updates
dteske [Wed, 20 Jun 2018 06:11:51 +0000 (06:11 +0000)]
MFC r330878-r330879, r330939, r330948: Man-page updates

r330878: Fix typo and lint/igor warnings
r330879: Fix lint/igor warnings
r330939: Use full month in dpv(3), figpar(3), and bsdconfig(8) manuals
r330948: Bump copyright following recent changes

Sponsored by: Smule, Inc.

5 years agodpv(3): MFC r330943, r335264
dteske [Wed, 20 Jun 2018 05:45:41 +0000 (05:45 +0000)]
dpv(3): MFC r330943, r335264

r330943:
Fix bad error messages from dpv(3)

Before = dpv: <__func__>: posix_spawnp(3): No such file or directory
 After = dpv: <path/cmd>: No such file or directory

Most notably, show the 2nd argument being passed to posix_spawnp(3)
so we know what path/cmd failed.

Also, we don't need to have "posix_spawnp(3)" in the error message
nor the function because that can [a] change and [b] traversed using
a debugger if necessary.

r335264:
Fix comparison between pointer and char literal

PR: misc/204252
Reported by: David Binderman <dcb314@hotmail.com>
Sponsored by: Smule, Inc.

5 years agoMFC r335277:
dteske [Wed, 20 Jun 2018 05:10:30 +0000 (05:10 +0000)]
MFC r335277:

sysrc(8): Exit with failure on API error

Fix exit status when f_sysrc_set() fails. Errors in the underlying API
provided by bsdconfig(8) -- /usr/share/bsdconfig/sysrc.subr -- were not
being communicated back to the command-line. This was affecting ansible
modules using sysrc as they were not able to accurately test for error.

PR: bin/211448
Reported by: Christian Schwarz <me@cschwarz.com>
Sponsored by: Smule, Inc.

6 years agoMFC r334363: elfdump: chase ABI tag note name change from r232832
emaste [Tue, 19 Jun 2018 17:11:53 +0000 (17:11 +0000)]
MFC r334363: elfdump: chase ABI tag note name change from r232832

r232832 changed the ABI tag note name from .note.ABI-tag to .note.tag.
Follow suit in elfdump.

Elfdump's note parsing is very basic and should be significantly
reworked, but for now just restore the broken functionality.

PR: 228290
Submitted by: martin at lispworks.com

6 years agoMFC r334993:
hselasky [Tue, 19 Jun 2018 11:06:36 +0000 (11:06 +0000)]
MFC r334993:
Implement the ip_eth_mc_map() function in the LinuxKPI.

Sponsored by: Mellanox Technologies

6 years agoMFC r333895, r334022
cy [Mon, 18 Jun 2018 19:35:17 +0000 (19:35 +0000)]
MFC r333895, r334022

r333895:
Drop obsolete Buenos Aires Convention.

Prompted by: Recent discussion

r334022:
Drop obsolete Buenos Aires Convention.

6 years agoMFC r335034:
dim [Sun, 17 Jun 2018 17:38:24 +0000 (17:38 +0000)]
MFC r335034:

Fix build of liquidio with base gcc on i386

Some casts from pointers to uint64_t and back in lio_main.c cause base
gcc on i386 to warn "cast from pointer to integer of different size",
and vice versa.  Add additional casts to uintptr_t to suppress these.

Reviewed by: sbruno
Differential Revision: https://reviews.freebsd.org/D15754

6 years agoMFC r334947:
dim [Sun, 17 Jun 2018 17:35:30 +0000 (17:35 +0000)]
MFC r334947:

Disable building aesni with base gcc

Because base gcc does not support the required intrinsics, do not
attempt to compile the aesni module with it.

Noticed by: Dan Allen <danallen46@gmail.com>

6 years agoMFC r334945:
dim [Sun, 17 Jun 2018 17:32:32 +0000 (17:32 +0000)]
MFC r334945:

Fix build of ocs_fs with base gcc on i386

Add a few intermediate casts to uintptr_t to suppress "cast to pointer
from integer of different size" warnings from gcc.  Also remove a few
incorrect casts.

Reviewed by: ram
Differential Revision: https://reviews.freebsd.org/D15747

6 years agoMFC r334948:
dim [Sun, 17 Jun 2018 17:28:27 +0000 (17:28 +0000)]
MFC r334948:

Fix build of bxe with base gcc on i386

Casting from rman_res_t to a pointer results in "cast to pointer from
integer of different size" warnings with base gcc on i386, so print
these without casting.  The kva field of struct bxe_bar is of type
vm_offset_t, which can be 32 or 64 bit, so cast it to uintmax_t before
printing.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D15733

6 years agoMFC r334946:
dim [Sun, 17 Jun 2018 17:24:57 +0000 (17:24 +0000)]
MFC r334946:

Fix build of i915kms with base gcc

Base gcc fails to compile sys/dev/drm2/i915/intel_display.c for i386,
with the following -Werror warnings:

cc1: warnings being treated as errors
/usr/src/sys/dev/drm2/i915/intel_display.c:8884: warning:
initialization from incompatible pointer type

This is due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36432, which
incorrectly interprets the [] as a flexible array member.

Because base gcc does not have a -W flag to suppress this particular
warning, it requires a rather ugly cast.  To not influence any other
compiler, put it in a #if/#endif block.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D15744

6 years agoMFC r334876:
kp [Sat, 16 Jun 2018 09:32:05 +0000 (09:32 +0000)]
MFC r334876:

pf: Fix deadlock with route-to

If a locally generated packet is routed (with route-to/reply-to/dup-to) out of
a different interface it's passed through the firewall again. This meant we
lost the inp pointer and if we required the pointer (e.g. for user ID matching)
we'd deadlock trying to acquire an inp lock we've already got.

Pass the inp pointer along with pf_route()/pf_route6().

PR: 228782

6 years agoMFC r325560:
bdrewery [Fri, 15 Jun 2018 15:10:21 +0000 (15:10 +0000)]
MFC r325560:

  META_MODE: Bmake 20171028 in r325340 simplifies the meta filename.

6 years agoMFC r334791,r334811:
bdrewery [Fri, 15 Jun 2018 15:05:00 +0000 (15:05 +0000)]
MFC r334791,r334811:

  r334791:
    Stop using head(1) which is not available in installworld.
  r334811:
    Use simpler sed invocation.

6 years agoMFC r330702:
bdrewery [Fri, 15 Jun 2018 15:01:59 +0000 (15:01 +0000)]
MFC r330702:

  LIB32: Avoid linking in unneeded (and invalid lib32) libz for libmagic build
  tool.

6 years agoMFC r334506:
markj [Fri, 15 Jun 2018 08:59:24 +0000 (08:59 +0000)]
MFC r334506:
Avoid completing I/O when dumping core after a panic.

6 years agoMFC r335089:
kib [Thu, 14 Jun 2018 18:50:49 +0000 (18:50 +0000)]
MFC r335089:
Enable eager FPU context switch on i386.
CVE: CVE-2018-3665

MFC r335131
Remove printf() in #NM handler.

MFC r335132:
Reorganize code flow in fpudna()/npxdna().

Early MFC approved by: re (gjb)

6 years agoMFC r325794, r325838 (by imp):
mav [Thu, 14 Jun 2018 18:18:55 +0000 (18:18 +0000)]
MFC r325794, r325838 (by imp):
Provide link speed data in XPT_GET_TRAN_SETTINGS. Provide full version
information for that and XPT_PATH_INQ. Provide macros to encode/decode
major/minor versions.  Read the link speed and lane count to compute
the base_transfer_speed for XPT_PATH_INQ.

6 years agoMFC r333180: Fix LOR between controller and queue locks.
mav [Thu, 14 Jun 2018 17:09:33 +0000 (17:09 +0000)]
MFC r333180: Fix LOR between controller and queue locks.

Admin pass-through requests took controller lock before the queue lock,
but in case of request submission to a failed controller controller lock
was taken after the queue lock.  Fix that by reducing the lock scopes and
switching to mtx_pool locks to track pass-through request completion.

6 years agoMFC r333130: Improve nvme(4) attach/detach sequences.
mav [Thu, 14 Jun 2018 17:06:19 +0000 (17:06 +0000)]
MFC r333130: Improve nvme(4) attach/detach sequences.

This change allows clean device detach on attach failures and driver unload,
while previous code tried to talk to already shut down controller, or even
accessed resources failed to allocate.