]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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.

5 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

5 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

5 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.

5 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

5 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>

5 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

5 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

5 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

5 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.

6 years agoMFC r333127: Fix use-after-free in nvme_qpair_destroy().
mav [Thu, 14 Jun 2018 17:02:58 +0000 (17:02 +0000)]
MFC r333127: Fix use-after-free in nvme_qpair_destroy().

dma_tag_payload should not be destroyed before payload_dma_map, and seems
it should be used there instead of dma_tag to match creation.

6 years agoMFC r332897 (by imp), r333123:
mav [Thu, 14 Jun 2018 16:58:03 +0000 (16:58 +0000)]
MFC r332897 (by imp), r333123:
Migrate to make_dev_s interface to populate /dev/nvmeX entries

6 years agoMFC r331046 (by imp): Try polling the qpairs on timeout.
mav [Thu, 14 Jun 2018 16:51:39 +0000 (16:51 +0000)]
MFC r331046 (by imp): Try polling the qpairs on timeout.

On some systems, we're getting timeouts when we use multiple queues on
drives that work perfectly well on other systems. On a hunch, Jim
Harris suggested I poll the completion queue when we get a timeout.
This patch polls the completion queue if no fatal status was
indicated. If it had pending I/O, we complete that request and
return. Otherwise, if aborts are enabled and no fatal status, we abort
the command and return. Otherwise we reset the card.

This may clear up the problem, or we may see it result in lots of
timeouts and a performance problem. Either way, we'll know the next
step. We may also need to pay attention to the fatal status bit
of the controller.

6 years agoMFC r330954, r330955 (by imp):
mav [Thu, 14 Jun 2018 16:19:05 +0000 (16:19 +0000)]
MFC r330954, r330955 (by imp):
When tearing down a queue pair, also delete the queue entries.

The NVME standard has required in section 7.2.6, since at least 1.1,
that a clean shutdown is signalled by deleting the subission and the
completion queues before setting the shutdown bit in CC. The 1.0
standard, apparently, did not and many of the early Intel cards didn't
care. Some newer cards care, at least one whose beta firmware can
scramble the card on an unclean shutdown. Linux has done this for some
time. To make it possible to move forward with an evaluation of this
pre-release card with wonky firmware, delete the queues on the card
when we delete the qpair structures.

6 years agoMFC r330953 (by imp): Don't make the namespace devices eternal.
mav [Thu, 14 Jun 2018 15:02:27 +0000 (15:02 +0000)]
MFC r330953 (by imp): Don't make the namespace devices eternal.

We'll need to delete namespaces soon, so go ahead and stop making
these devices eternal. It doesn't help much, and will be getting in
the way soon.

6 years agoMFC r328089 (by imp):
mav [Thu, 14 Jun 2018 14:58:51 +0000 (14:58 +0000)]
MFC r328089 (by imp):
Move setting of CAM_SIM_QUEUED to before we actually submit it to the
hardware. Setting it after is racy, and we can lose the race on a
heavily loaded system.

6 years agoMFC r313954 (by imp): Remove obsolete comment after prior rev.
mav [Thu, 14 Jun 2018 14:50:30 +0000 (14:50 +0000)]
MFC r313954 (by imp): Remove obsolete comment after prior rev.

6 years agoMFC r311351 (by rpokala):
mav [Thu, 14 Jun 2018 14:46:20 +0000 (14:46 +0000)]
MFC r311351 (by rpokala):
In the same vein as r311350, fix whitespace in handling of XPT_PATH_INQ in
several more drivers.

6 years agoMFC r311350 (by rpokala):
mav [Thu, 14 Jun 2018 14:45:08 +0000 (14:45 +0000)]
MFC r311350 (by rpokala):
Fix whitespace in handling of XPT_PATH_INQ in adw(4).

Came across this while doing some other minor CAM cleanup. Whitespace-only
change, so not bothering w/ a review.

6 years agoMFC r335072:
kib [Wed, 13 Jun 2018 21:10:33 +0000 (21:10 +0000)]
MFC r335072:
Enable eager FPU context switch by default on amd64.

Security: CVE-2018-3665

6 years agoMFC r334886:
dim [Wed, 13 Jun 2018 20:35:56 +0000 (20:35 +0000)]
MFC r334886:

Add missed libc++ entries to (Optional)ObsoleteFiles.inc

Some of these were removed during the libc++ 5.0.0 import, others were
added in the libc++ 6.0.0 import.

6 years agoFix build of si with base gcc on i386
dim [Wed, 13 Jun 2018 20:33:52 +0000 (20:33 +0000)]
Fix build of si 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
intermediate casts to uintptr_t to suppress these.

Direct commit to stable/11, since si(4) has been removed from head.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D15752

6 years agoMFC r309925, r309931, r309933, r310035, r310278, r310310, r310311,
ed [Wed, 13 Jun 2018 13:41:23 +0000 (13:41 +0000)]
MFC r309925, r309931, r309933, r310035, r310278, r310310, r310311,
    r310323, r310349, r310350, r310351, r310352, r310383, r310384,
    r310385, r310386, r310393, r310453, r310456, r310494, r310504,
    r310528, r310890, r310893, r310974, r311918, r312921, r313357,
    r314563, r314585, r314642, r315322, r315618, r315620, r315622,
    r315643, r316951, r316973, r326338, r326339, r326573, r331270,
    r332099, r332110, r332111, r332118, r332165, r332510 and r332511.

This commit brings syslogd(8) in sync with the copy in HEAD. The key
improvement of this change is that it adds support for RFC 5424 log
ingestion and exposition (enabled by passing in -O rfc5424). This allows
for saner logging in environments with multiple time zones.

The list of changes to merge back were obtained by running:

    svn mergeinfo --show-revs eligible \
        ^/head/usr.sbin/syslogd ^/stable/11/usr.sbin/syslogd

Of the commits listed, r314436, r325188 and r326025 were excluded, as
they affect a significant number of unrelated files (SPDX and 4-clause
license renumbering). Due to the large number of directly committed
changes on this branch, I had no choice but to perform the merge as
follows:

    svn merge --accept=theirs-full -c <list of revisions> ^/head .

This would, however, cause some unrelated changes, such as undoing the
r333356 (MFC of r332877) and still adding the SPDX tag to syslogd.c.
These have been reverted manually.

Requested by: Dave Cottlehuber
Thanks to: dim@ for sharing his insight on hackers@

6 years agoMFC r334726:
kp [Wed, 13 Jun 2018 13:15:04 +0000 (13:15 +0000)]
MFC r334726:

pf: Return non-zero from 'status' if pf is not enabled

In the pf rc.d script the output of `/etc/rc.d/pf status` or `/etc/rc.d/pf
onestatus` always provided an exit status of zero. This made it fiddly to
programmatically determine if pf was running or not.

Return a non-zero status if the pf module is not loaded, extend pfctl to have
an option to return an error status if pf is not enabled.

PR: 228632
Submitted by: James Park-Watt <jimmypw AT gmail.com>

6 years agoMFC r334875:
ae [Wed, 13 Jun 2018 07:17:10 +0000 (07:17 +0000)]
MFC r334875:
  Explicitly change the link state when we assingn an address.

  Since we are setting IFF_UP flag on SIOCSIFADDR, it is possible, that
  after this link state information still not initialized properly.
  This leads to problems with routing, since now interface has
  IFCAP_LINKSTATE capability and a route is considered as working only
  when interface's link state is in LINK_STATE_UP (see RT_LINK_IS_UP()
  macro).

6 years agoMFC r334707:
ae [Wed, 13 Jun 2018 07:16:01 +0000 (07:16 +0000)]
MFC r334707:
  Use m_copyback() function to write delayed checksum when it isn't located
  in the first mbuf of the chain.

6 years agoMFC r334324:
ae [Wed, 13 Jun 2018 07:14:34 +0000 (07:14 +0000)]
MFC r334324:
  Remove empty encap_init() function.

6 years agoMFC r333374:
gjb [Mon, 11 Jun 2018 17:22:27 +0000 (17:22 +0000)]
MFC r333374:
 Use vYYYYMMDD in the timestamp suffix for Google Compute Engine
 snapshot images for consistency with other OSes.

Sponsored by: The FreeBSD Foundation

6 years agoMFC r334505:
markj [Mon, 11 Jun 2018 15:44:53 +0000 (15:44 +0000)]
MFC r334505:
Don't export _end on arm64 and riscv.

6 years agoMFC r334504:
markj [Mon, 11 Jun 2018 15:44:02 +0000 (15:44 +0000)]
MFC r334504:
Remove an inaccuracy from mincore.2.

6 years agoMFC r334101:
markj [Mon, 11 Jun 2018 15:43:28 +0000 (15:43 +0000)]
MFC r334101:
Add GET_STACK_USAGE() for arm64.

6 years agoMFC r334656, r334665, r334695
ian [Sun, 10 Jun 2018 22:26:15 +0000 (22:26 +0000)]
MFC r334656, r334665, r334695

r334656:
Add vsnprintf() to libsa.  Alpha-sort the printf prototypes in stand.h.

r334665:
Make the v*printf() functions in libsa return int instead of void.
This makes them compatible with the C standard signatures, avoiding
spurious mismatch errors in the places where the oddball requirements
of standalone code end up putting two declarations of the same function
in play.

r334695:
Remove comments and assertions that are no longer valid after r330809.

r330809 replaced duplication of devdesc struct fields with an embedded copy
of the devdesc struct, to avoid fragility.  That means all the scattered
comments indicating that structs must match are no longer valid.  Likewise
asserts that attempted to mitigate some of the old fragility.

Reviewed by: imp@

6 years agoIssue:
ram [Sat, 9 Jun 2018 04:05:18 +0000 (04:05 +0000)]
Issue:
     Utility hangs when  OCS_IOCTL_CMD_MGMT_GET_ALL called in parallel on port 0 and port 1.

  Fix: Using static structure for results is corrupting the second ioctl request. Removed static for results structure.

Approved by: ken

6 years agoMFC r334091:
eadler [Sat, 9 Jun 2018 03:01:38 +0000 (03:01 +0000)]
MFC r334091:

md5: perform compare case-insenstive

md5 generates a md5 hash lowercase, but it might be provided in
uppercase. Allow this.

PR:           205598
Reported by:  ohauer
MFC After:    2 weeks

6 years agoMFC r333403:
ae [Fri, 8 Jun 2018 10:09:30 +0000 (10:09 +0000)]
MFC r333403:
  Bring in some last changes in NAT64 implementation:

  o Modify ipfw(8) to be able set any prefix6 not just Well-Known,
    and also show configured prefix6;
  o relocate some definitions and macros into proper place;
  o convert nat64_debug and nat64_allow_private variables to be
    VNET-compatible;
  o add struct nat64_config that keeps generic configuration needed
    to NAT64 code;
  o add nat64_check_prefix6() function to check validness of specified
    by user IPv6 prefix according to RFC6052;
  o use nat64_check_private_ip4() and nat64_embed_ip4() functions
    instead of nat64_get_ip4() and nat64_set_ip4() macros. This allows
    to use any configured IPv6 prefixes that are allowed by RFC6052;
  o introduce NAT64_WKPFX flag, that is set when IPv6 prefix is
    Well-Known IPv6 prefix. It is used to reduce overhead to check this;
  o modify nat64lsn_cfg and nat64stl_cfg structures to use nat64_config
    structure. And respectivelly modify the rest of code;
  o remove now unused ro argument from nat64_output() function;
  o remove __FreeBSD_version ifdef, NAT64 was not merged to older versions;
  o add commented -DIPFIREWALL_NAT64_DIRECT_OUTPUT flag to module's Makefile
    as example.

MFC r333406:
  Update NAT64 documentation, now we support any IPv6 prefixes.

6 years agoMFC r333400:
ae [Fri, 8 Jun 2018 09:52:49 +0000 (09:52 +0000)]
MFC r333400:
  Add IFCAP_LINKSTATE support to if_loop(4).

6 years agoMFC r334725:
tuexen [Thu, 7 Jun 2018 17:43:31 +0000 (17:43 +0000)]
MFC r334725:

Improve compliance with RFC 4895 and RFC 6458.

Silently dicard SCTP chunks which have been requested to be
authenticated but are received unauthenticated no matter if support
for SCTP authentication has been negotiated. This improves compliance
with RFC 4895.

When the application uses the SCTP_AUTH_CHUNK socket option to
request a chunk to be received in an authenticated way, enable
the SCTP authentication extension for the end-point. This improves
compliance with RFC 6458.

Discussed with: Peter Lei
Approved by: re (gjb, early MFC)

6 years agoMFC: r334443 (by cem@)
marius [Thu, 7 Jun 2018 15:03:47 +0000 (15:03 +0000)]
MFC: r334443 (by cem@)

dhclient(8): allow to supersede interface-mtu option

In some cases broken DHCP servers might send invalid MTU value, so allow to
use 'supersede' in dhclient.conf to override this. When superseded value is
0, MTU value is not updated at all.

PR: 206721
Submitted by: novel@
Reported by: <jimp AT pfsense.org>
Relnotes: yes (potentially surprising behavior change w/ broken dhcpd mtu)
Differential Revision: https://reviews.freebsd.org/D15484

6 years agoMFC r334594: dwatch(1): Update manual to reference actual release
dteske [Thu, 7 Jun 2018 13:06:56 +0000 (13:06 +0000)]
MFC r334594: dwatch(1): Update manual to reference actual release

Sponsored by: Smule, Inc.

6 years agoMFC r334445:
dim [Thu, 7 Jun 2018 09:03:42 +0000 (09:03 +0000)]
MFC r334445:

Resolve conflicts between macros in fenv.h and ieeefp.h

This is a follow-up to r321483, which disabled -Wmacro-redefined for
some lib/msun tests.

If an application included both fenv.h and ieeefp.h, several macros such
as __fldcw(), __fldenv() were defined in both headers, with slightly
different arguments, leading to conflicts.

Fix this by putting all the common macros in the machine-specific
versions of ieeefp.h.  Where needed, update the arguments in places
where the macros are invoked.

This also slightly reduces the differences between the amd64 and i386
versions of ieeefp.h.

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

6 years agoMFC r334429:
hselasky [Thu, 7 Jun 2018 07:49:18 +0000 (07:49 +0000)]
MFC r334429:
Implement support for the PCI_BUS_NUM() function macro in the LinuxKPI.

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

6 years agoMFC r334428:
hselasky [Thu, 7 Jun 2018 07:48:26 +0000 (07:48 +0000)]
MFC r334428:
Implement support for the kvmalloc_array() function in the LinuxKPI.

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

6 years agoMFC r334427:
hselasky [Thu, 7 Jun 2018 07:47:32 +0000 (07:47 +0000)]
MFC r334427:
Correct macroname in the LinuxKPI.

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

6 years agoMFC r334426:
hselasky [Thu, 7 Jun 2018 07:46:39 +0000 (07:46 +0000)]
MFC r334426:
Define __initconst in the LinuxKPI.

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

6 years agoMFC r334425:
hselasky [Thu, 7 Jun 2018 07:45:49 +0000 (07:45 +0000)]
MFC r334425:
Implement bitmap_complement() in the LinuxKPI.

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

6 years agoMFC r334423:
hselasky [Thu, 7 Jun 2018 07:44:54 +0000 (07:44 +0000)]
MFC r334423:
Implement idr_is_empty() in the LinuxKPI and make idr_remove() API compatible
with upstream Linux by returning the pointer to the removed element.

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

6 years agoMFC r334422:
hselasky [Thu, 7 Jun 2018 07:43:58 +0000 (07:43 +0000)]
MFC r334422:
Correct argument for evdev_push_rel().

This is a regression issue after r319162.

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

6 years agoMFC r334320 and r334328:
hselasky [Thu, 7 Jun 2018 07:42:48 +0000 (07:42 +0000)]
MFC r334320 and r334328:

Implement atomic_add_64() and atomic_subtract_64() for the i386 target.

While at it add missing _acq_ and _rel_ variants for 64-bit atomic
operations under i386.

Reviewed by: kib @
Sponsored by: Mellanox Technologies