SVNews

NOTE: This service is experimental and subject to change! Use at your own risk!

Year:   Month: - or - Filter committers: - or -
Filter paths:
Include diffs if smaller than lines.

2017 - 08 - 16   (today)
13:44:46 - r322578
(1 hour 28 minutes ago)
by br
Affects:  /head/sys/amd64/sgx/sgx.c
Rename macro DEBUG to SGX_DEBUG.

This fixes LINT kernel build.

Reported by: lwhsu
Sponsored by: DARPA, AFRL
13:06:26 - r322577
(2 hours 6 minutes ago)
by kevans
Affects: 
(2 files)
/stable/11/usr.bin/grep/util.c
MFC r303444 (ed): Call basename() in a portable way.

Pull a copy of the filename string before calling basename(). Change the
loop to not return on its own, so we can put a free() statement at the
bottom.

Approved by: emaste (mentor, blanket MFC)
12:01:22 - r322576
(3 hours 11 minutes ago)
by ae
Affects: 
(2 files)
/stable/11/sys/netipsec/key.c
MFC r322328:
  Make user supplied data checks a bit stricter.

  key_msg2sp() is used for parsing data from setsockopt(IP[V6]_IPSEC_POLICY)
  call. This socket option is usually used to configure IPsec bypass for
  socket. Only privileged user can set this socket option.
  The message syntax is described here
  http://www.kame.net/newsletter/20021210/

  and our libipsec is usually used to create the correct request.
  Add additional checks:
  * that sadb_x_ipsecrequest_len is not out of bounds of user supplied buffer
  * that src/dst's sa_len is the same
  * that 2*sa_len is not out of bounds of user supplied buffer
  * that 2*sa_len fits into bounds of sadb_x_ipsecrequest

  Reported by: Ilja van Sprundel
10:59:37 - r322575
(4 hours 13 minutes ago)
by bde
Affects:  /head/sys/dev/syscons/syscons.c
/head/sys/sys/consio.h
Undeprecate the CONS_CURSORTYPE ioctl. It was "deprecated" in 2001,
but it was actually extended then and it is still used (just once) in
/usr/src by its primary user (vidcontrol), while its replacement is
still not used in /usr/src.

yokota became inactive soon after deprecating CONS_CURSORTYPE (this
was part of a large change to make cursor attributes per-vty).

vidcontrol has incomplete support even for the old ioctl. I will
update it soon. Then there are many broken escape sequences to fix.
This is just to prepare for setting cursor colors using vidcontrol.
10:38:06 - r322574
(4 hours 34 minutes ago)
by br
Affects: 
(13 files)
/head/sys/amd64/*
/head/sys/modules/*
Add support for Intel Software Guard Extensions (Intel SGX).

Intel SGX allows to manage isolated compartments "Enclaves" in user VA
space. Enclaves memory is part of processor reserved memory (PRM) and
always encrypted. This allows to protect user application code and data
from upper privilege levels including OS kernel.

This includes SGX driver and optional linux ioctl compatibility layer.
Intel SGX SDK for FreeBSD is also available.

Note this requires support from hardware (available since late Intel
Skylake CPUs).

Many thanks to Robert Watson for support and Konstantin Belousov
for code review.

Project wiki: https://wiki.freebsd.org/Intel_SGX.

Reviewed by: kib
Relnotes: yes
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11113
10:30:23 - r322573
(4 hours 42 minutes ago)
by mav
Affects: 
(5 files)
/stable/11/sys/dev/ahci/ahci_pci.c
/stable/11/sys/dev/ata/*
/stable/11/sys/dev/sound/pci/hda/hdac.c
MFC r322309, r322316:
Use "Ibex Peak" codename for "5 Series/3400 Series" chipsets.

This is shorter and unifies naming with later chipsets.
10:28:34 - r322572
(4 hours 44 minutes ago)
by mav
Affects: 
(5 files)
/stable/11/sys/dev/ahci/ahci_pci.c
/stable/11/sys/dev/sound/pci/hda/*
/stable/11/sys/dev/usb/controller/xhci_pci.c
MFC r322308: Add new Intel Lewisburg and Union Point chipset PCI IDs.

While there, polish some old AHCI ones, since they are still reused.
08:49:11 - r322571
(6 hours 23 minutes ago)
by br
Affects:  /head/sys/vm/vm_object.c
/head/sys/vm/vm_object.h
Add OBJ_PG_DTOR flag to VM object.

Setting this flag allows us to skip pages removal from VM object queue
during object termination and to leave that for cdev_pg_dtor function.

Move pages removal code to separate function vm_object_terminate_pages()
as comments does not survive indentation.

This will be required for Intel SGX support where we will have to remove
pages from VM object manually.

Reviewed by: kib, alc
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11688
08:19:44 - r322570
(6 hours 53 minutes ago)
by cy
Affects: 
(6 files)
/projects/krb5/sys/compat/linuxkpi/common/include/linux/device.h
/projects/krb5/sys/modules/i2c/*
MFH five files missed in 322568.
07:59:57 - r322569
(7 hours 12 minutes ago)
by truckman
Affects: 
(5 files)
/stable/11/sys/amd64/amd64/*
/stable/11/sys/amd64/include/md_var.h
/stable/11/sys/amd64/linux/linux_sysvec.c
MFC r321899

Lower the amd64 shared page, which contains the signal trampoline,
from the top of user memory to one page lower on machines with the
Ryzen (AMD Family 17h) CPU. This pushes ps_strings and the stack
down by one page as well. On Ryzen there is some sort of interaction
between code running at the top of user memory address space and
interrupts that can cause FreeBSD to either hang or silently reset.
This sounds similar to the problem found with DragonFly BSD that
was fixed with this commit:

https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b48dd28447fc8ef62fbc963accd301557fd9ac20
but our signal trampoline location was already lower than the address
that DragonFly moved their signal trampoline to. It also does not
appear to be related to SMT as described here:

https://www.phoronix.com/forums/forum/hardware/processors-memory/955368-some-ryzen-linux-users-are-facing-issues-with-heavy-compilation-loads?p=955498#post955498

  "Hi, Matt Dillon here. Yes, I did find what I believe to be a
  hardware issue with Ryzen related to concurrent operations. In a
  nutshell, for any given hyperthread pair, if one hyperthread is
  in a cpu-bound loop of any kind (can be in user mode), and the
  other hyperthread is returning from an interrupt via IRETQ, the
  hyperthread issuing the IRETQ can stall indefinitely until the
  other hyperthread with the cpu-bound loop pauses (aka HLT until
  next interrupt). After this situation occurs, the system appears
  to destabilize. The situation does not occur if the cpu-bound
  loop is on a different core than the core doing the IRETQ. The
  %rip the IRETQ returns to (e.g. userland %rip address) matters a
  *LOT*. The problem occurs more often with high %rip addresses
  such as near the top of the user stack, which is where DragonFly's
  signal trampoline traditionally resides. So a user program taking
  a signal on one thread while another thread is cpu-bound can cause
  this behavior. Changing the location of the signal trampoline
  makes it more difficult to reproduce the problem. I have not
  been because the able to completely mitigate it. When a cpu-thread
  stalls in this manner it appears to stall INSIDE the microcode
  for IRETQ. It doesn't make it to the return pc, and the cpu thread
  cannot take any IPIs or other hardware interrupts while in this
  state."
since the system instability has been observed on FreeBSD with SMT
disabled. Interrupts to appear to play a factor since running a
signal-intensive process on the first CPU core, which handles most
of the interrupts on my machine, is far more likely to trigger the
problem than running such a process on any other core.

Also lower sv_maxuser to prevent a malicious user from using mmap()
to load and execute code in the top page of user memory that was made
available when the shared page was moved down.

Make the same changes to the 64-bit Linux emulator.

PR: 219399
Reported by: nbe@renzel.net
Reviewed by: kib
Reviewed by: dchagin (previous version)
Tested by: nbe@renzel.net (earlier version)
Differential Revision: https://reviews.freebsd.org/D11780
06:43:50 - r322568
(8 hours 29 minutes ago)
by cy
Affects: 
(715 files)
/projects/krb5/*
MFH r320793-r322566 inclusive, bringing in the latest llvm updates.
06:33:48 - r322567
(8 hours 39 minutes ago)
by markj
Affects:  /head/sys/compat/linuxkpi/common/include/linux/device.h
Add device resource management fields to struct device.

MFC after: 1 week
05:51:05 - r322566
(9 hours 21 minutes ago)
by mckusick
Affects:  /stable/10/sys/geom/journal/g_journal.c
Correct compile error triggered in nanobsd i386 by 322513 (MFC of 322178)

Reported by: Li-Wen Hsu
Fix by: kib
Approved by: re (delphij)
05:02:31 - r322565
(10 hours 10 minutes ago)
by bdrewery
Affects:  /head/share/mk/bsd.lib.mk
Use -S for library installations except for -DNO_ROOT builds.

Also disable this if NO_SAFE_LIBINSTALL is defined.

There is little harm in always using -S and it fixes several issues:
- A race during 'make libraries' where, for example, libgcc_s is being
  installed while another library is trying to link against it. This is
  possible because libgcc_s is connected in both _prereq_libs and
  _startup_libs. The first build (_prereq_libs) sets MK_PROFILE=no
  while the 2nd pass (_startup_libs) enables MK_PROFILE. Thus the
  libgcc_s library *is* present in WORLDTMP for other libraries to
  link to, so serializing further items in _startup_libs is not
  required. Just ensuring that libgcc_s is installed atomically (via
  rename(2)) is enough. [1]
- Installation to a running system where some library that cannot be
  detected, copied and used from the temporary INSTALLTMP with LD_LIBRARY_PATH
  that the build itself uses for installation. Such an example is having the
  install an NSS module for user lookups that install(1) uses while
  concurrently installing the module in another process. This is not
  a problem for the FreeBSD base build but can be for downstream
  vendors. While this is a very specific case, installation to a
  running system with non-atomic library installation is prone to many
  problems. A further step still is to install in proper dependency
  ordering.

Reported by: dhw many times [1]
Sponsored by: Dell EMC Isilon
MFC after: 2 weeks
01:45:53 - r322564
(13 hours 27 minutes ago)
by kevans
Affects: 
(5 files)
/stable/11/usr.bin/grep/grep.c
/stable/11/usr.bin/grep/tests/*
/stable/11/usr.bin/grep/util.c
bsdgrep: Use implied working directory for -r if no directories are passed

MFC r317050: bsdgrep: for -r, use the working directory if none specified

This is more sensible than the previous behaviour of grepping stdin,
and matches newer GNU grep behaviour.

MFC r317300 (ngie): Only expect :grep_r_implied to pass with bsdgrep(1)

The test fails with gnu grep from base and ports.

MFC r319002 (ngie): :rgrep : use atf-check to check the exit code/save the
output of grep -r instead of calling grep -r without it, and saving the
output to a file

This ensures that any errors thrown via grep -r are caught, not lost, and
uses existing atf-sh idioms for saving files.

PR: 216307
Approved by: emaste (mentor, blanket MFC)
Relnotes: yes
01:27:48 - r322563
(13 hours 45 minutes ago)
by ngie
Affects:  /projects/runtime-coverage/Makefile.libcompat
Disable MK_COVERAGE with LIB32, LIBSOFT, etc

Baking coverage into binaries won't work because the architecture is
baked into the tool chain. Plus enabling it here doesn't really make
a whole lot of sense.
01:03:04 - r322562
(14 hours 9 minutes ago)
by kevans
Affects: 
(2 files)
/stable/11/usr.bin/grep/util.c
MFC r317051: bsdgrep: remove output separators between overlapping segments

Make bsdgrep more sensitive to context overlaps. If it's printing
context that either overlaps or is immediately adjacent to another bit
of context, don't print a separator.

- Non-overlapping segments no longer have two separators between them

- Overlapping segments no longer have separators between them with
  overlapping sections repeated

Approved by: emaste (mentor, blanket MFC)
00:55:56 - r322561
(14 hours 16 minutes ago)
by kevans
Affects: 
(2 files)
/stable/11/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
bsdgrep: Revise tests based on recent fixes and future changes

MFC r317297: Remove the expected failures for :context and :context2 with
bsdgrep(1)

They're no longer needed after recent fixes made to bsdgrep(1).

MFC r317299: Add more sanity tests for grep, egrep, and fgrep

The test suite currently lacks basic sanity checks to ensure that egrep,
fgrep, and grep are actually matching the right expression types, i.e.
passing the right flags to regcomp(3). Amend the test suite to make sure
that not only are the individual versions doing the right thing, but also
that we don't have some kind of frankenregex situation happening where egrep
is accepting a BRE or grep an ERE.

I've chosen to not expand the 'basic' test but to add the 'grep_sanity'
checks to their own test case since this is testing for more than just
'grep matches things', but actual expression types.

MFC r317694: bsdgrep: revise test case which will soon become a failure

Work in progress (D10315) is going to make egrep_empty_invalid an
actually invalid regex, to be consistent with the equivalent BRE "{"
behavior, when using regex(3).

Any non-0 exit value is acceptable, depending on how the installed grep
interprets the expression. GNU grep interprets it as non-matching, and
in the future BSD grep will interpret it is an error.

Approved by: emaste (mentor, blanket MFC)
00:47:53 - r322560
(14 hours 25 minutes ago)
by kevans
Affects: 
(17 files)
/stable/11/usr.bin/grep/*
bsdgrep: add -z/--null-data support and update NLS catalogs accordingly

MFC r317049: bsdgrep: add -z/--null-data support

-z treats input and output data as sequences of lines terminated by a
zero byte instead of a newline. This brings it more in line with GNU grep
and brings us closer to passing the current tests with BSD grep.

MFC r317679: bsdgrep: correct nls usage data after r317049

r317049 added -z/--null-data to BSD grep but missed the update to nls
catalogs.

Approved by: emaste (mentor, blanket MFC)
Relnotes: yes
00:42:51 - r322559
(14 hours 30 minutes ago)
by kevans
Affects: 
(2 files)
/stable/11/usr.bin/grep/grep.c
MFC r316542: bsdgrep: Handle special case of single-byte NUL pattern

PR: 202022
Approved by: emaste (mentor, blanket MFC)
00:40:13 - r322558
(14 hours 32 minutes ago)
by kevans
Affects: 
(2 files)
/stable/11/usr.bin/grep/regex/tre-fastmatch.c
MFC r316495: bsdgrep(1): Fix errors with invalid expressions

Invalid expressions with an ultimate compiled pattern length of 0 (e.g.,
"grep -E {") were not taken into account and caused a segfault while trying
to fill in the good suffix table.

Approved by: emaste (mentor, blanket MFC)
00:23:59 - r322557
(14 hours 48 minutes ago)
by kevans
Affects: 
(7 files)
/stable/11/usr.bin/grep/Makefile
/stable/11/usr.bin/grep/regex/*
MFC r316492: bsdgrep(1): Rip out "xmalloc" bits

xmalloc was a debug malloc implementation, but the x{malloc,calloc,free}
functions default to calling the malloc(3) equivalents.

Instead of relying on this malloc shim, we can devise better ways to debug
malloc issues that aren't misleading upon initial inspection. (I.e., using
jemalloc's various built-in debugging capabilities.)

Approved by: emaste (mentor, blanket MFC)
00:19:59 - r322556
(14 hours 52 minutes ago)
by kevans
Affects: 
(2 files)
/stable/11/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
MFC r316750 (ngie): Fix expectations for testcases per bsdgrep vs gnu grep

The following failures occur with various versions of grep:

BSD grep:
- :context
- :context2

GNU grep (base):
- :color
- :oflag_zerolen

GNU grep (ports):
- :recurse_symlink

Approved by: emaste (mentor, blanket MFC)
00:12:22 - r322555
(15 hours ago)
by kevans
Affects: 
(20 files)
/stable/11/contrib/netbsd-tests/usr.bin/grep/*
/stable/11/usr.bin/grep/tests/Makefile
/stable/11/usr.bin/grep/util.c
bsdgrep: Fix matching behavior and add regression tests

MFC r316477: bsdgrep: fix matching behaviour

- Set REG_NOTBOL if we've already matched beginning of line and we're
  examining later parts

- For each pattern we examine, apply it to the remaining bits of the
  line rather than (potentially) smaller subsets

- Check for REG_NOSUB after we've looked at all patterns initially
  matching the line

- Keep track of the last match we made to later determine if we're
  simply not matching any longer or if we need to proceed another byte
  because we hit a zero-length match

- Match the earliest and longest bit of each line before moving the
  beginning of what we match to further in the line, past the end of the
  longest match; this generally matches how gnugrep(1) seems to behave,
  and seems like pretty good behavior to me

- Finally, bail out of printing any matches if we were set to print all
  (empty pattern) but -o (output matches) was set

MFC r316489: bsdgrep: Initialize vars to avoid a false positive GCC warning

MFC r316491: bsdgrep: revert color changes from r316477

r316477 changed the color output to match exactly the in-tree GNU grep,
but introduces unnecessary escape sequences.

MFC r316536: bsdgrep: create additional tests for coverage on recent fixes

Create additional tests to cover regressions that were discovered by
PRs linked to reviews D10098, D10102, and D10104.

It is worth noting that neither bsdgrep(1) nor gnugrep(1) in the base
system currently pass all of these tests, and gnugrep(1) not quite being
up to snuff was also noted in at least one of the PRs.

MFC r317052: bsdgrep: fix zero-length matches without the -o flag

r316477 broke zero-length matches when not using the -o flag, by
skipping over them entirely.

Add a regression test so that it doesn't break again in the future.

PR: 175314, 180990, 181263, 195763, 197531, 197555, 202022, 209116
Approved by: emaste (mentor, blanket MFC)
Relnotes: yes
00:04:57 - r322554
(15 hours 7 minutes ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfs/nfs_commonport.c
/projects/pnfs-planb-server/sys/fs/nfs/nfsport.h
/projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
Add support for DS writes to mirrors. Also, modify the code that handles
DS file creation/removal for mirrors so that it only malloc()s data structures
when there are mirrors. This was done since these large number of malloc()s
were resulting in significant unnecessary overhead for the non-mirror case.
2017 - 08 - 15   (yesterday)
23:59:56 - r322553
(15 hours 12 minutes ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonport.c
/projects/pnfs-planb-server-stable11/sys/fs/nfs/nfsport.h
/projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c
Add support for DS writes to mirrors. Also, modify the code that handles
DS file creation/removal for mirrors so that it only malloc()s data structures
when there are mirrors. This was done since these large number of malloc()s
were resulting in significant unnecessary overhead for the non-mirror case.
22:16:15 - r322552
(16 hours 56 minutes ago)
by jhb
Affects:  /head/etc/periodic/daily/Makefile
/head/etc/rc.d/Makefile
Unconditionally install rwhod support scripts.

r322277 moved rwho* and ruptime out of the MK_RCMDS conditional including
updating the obsolete files entries to not remove these scripts due to
WITHOUT_RCMDS=yes. However, the initial installation was still conditional
on MK_RCMDS, so new installs did not include these scripts and upgrades via
mergemaster or etcupdate removed them.

PR: 220953
MFC after: 1 month
20:27:07 - r322551
(18 hours 45 minutes ago)
by ngie
Affects: 
(17 files)
/projects/runtime-coverage/sys/boot/*
Disable MK_COVERAGE in sys/boot/...

None of this should be compiled with MK_COVERAGE enabled, and it
fails to compile with it enabled due to unresolved symbols.
19:29:10 - r322550
(19 hours 43 minutes ago)
by kib
Affects:  /head/sbin/route/route.8
Typo, the '-6' option selects inet6.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
19:21:27 - r322549
(19 hours 51 minutes ago)
by np
Affects:  /head/sys/dev/cxgbe/tom/t4_listen.c
cxgbe/t4_tom: Use correct name for the ISS-valid bit in options2.

MFC after: 3 days
Sponsored by: Chelsio Communications
17:52:37 - r322548
(21 hours 20 minutes ago)
by mjoras
Affects:  /head/sys/net/if_vlan.c
Rework vlan(4) locking.

Previously the locking of vlan(4) interfaces was not very comprehensive.
Particularly there was very little protection against the destruction of
active vlan(4) interfaces or concurrent modification of a vlan(4)
interface. The former readily produced several different panics.

The changes can be summarized as using two global vlan locks (an
rmlock(9) and an sx(9)) to protect accesses to the if_vlantrunk field of
struct ifnet, in addition to other places where global exclusive access
is required. vlan(4) should now be much more resilient to the destruction
of active interfaces and concurrent calls into the configuration path.

PR: 220980
Reviewed by: ae, markj, mav, rstone
Approved by: rstone (mentor)
MFC after: 4 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11370
16:39:49 - r322547
(22 hours 33 minutes ago)
by markj
Affects:  /head/sys/vm/vm_kern.c
/head/sys/vm/vm_page.c
/head/sys/vm/vm_page.h
Add vm_page_alloc_after().

This is a variant of vm_page_alloc() which accepts an additional parameter:
the page in the object with largest index that is smaller than the requested
index. vm_page_alloc() finds this page using a lookup in the object's radix
tree, but in some cases its identity is already known, allowing the lookup
to be elided.

Modify kmem_back() and vm_page_grab_pages() to use vm_page_alloc_after().
vm_page_alloc() is converted into a trivial wrapper of
vm_page_alloc_after().

Suggested by: alc
Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11984
15:20:04 - r322546
(23 hours 52 minutes ago)
by asomers
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Fix some ZFS debugging messages

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
  Be more careful about the use of provider names vs vdev names in
  ZFS_LOG statements.

MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
15:13:33 - r322545
(23 hours 59 minutes ago)
by gjb
Affects:  /head/Makefile.inc1
/head/release/packages/kernel.ucl
/head/release/packages/runtime.ucl
Revert r322327, r322352, r322358:

Disconnect the dependency on the kernel package from the runtime
package. There are a number of problems here:

 1) The runtime package installed into a chroot or a jail would
  include the kernel package, changing the behavior of how jails
  work now [1];

 2) As result of (1), it is possible a binary may incorrectly
  resolve kernel symbols [2]; in addition, it is possible there
  will be unexpected fallout with 32-bit jails on a 64-bit host
  kernel [2].

Noticed by: brd [1]
Discussed with: kib [2]
MFC after: 3 days
MFC note: record-only to wipe from the merge tracker
Sponsored by: The FreeBSD Foundation
15:08:19 - r322544
(1 day ago)
by gjb
Affects:  /head/release/release.sh
Always expand the full path to the configuration file specified
with the '-c' flag.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
14:21:44 - r322543
(1 day ago)
by kib
Affects: 
(2 files)
/stable/10/sys/dev/hwpmc/hwpmc_piv.c
MFC r322256:
Fix logic error in the the assert, causing the condition to be always true.

PR: 217741
Approved by: re (gjb)
14:03:26 - r322542
(1 day 1 hour ago)
by tsoome
Affects:  /head/sys/boot/efi/loader/arch/amd64/trap.c
loader.efi: repace XXX with real comments in trap.c

There are two missing comments marked as XXX in trap.c, fix this.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D12035
14:02:57 - r322541
(1 day 1 hour ago)
by gjb
Affects:  /stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r322244, pci_vendors version 2017.07.27.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
13:37:04 - r322540
(1 day 1 hour ago)
by hselasky
Affects: 
(2 files)
/stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
MFC r322250:
Count drop events due to lack of PCI bandwidth as queue drops and not as
input errors in the mlx5en(4) driver. This improves the sysadmin view of
physical port errors.

Approved by: re (kib)
Submitted by: gallatin@
Sponsored by: Mellanox Technologies
12:56:42 - r322539
(1 day 2 hours ago)
by hselasky
Affects: 
(2 files)
/stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
MFC r322250:
Count drop events due to lack of PCI bandwidth as queue drops and not as
input errors in the mlx5en(4) driver. This improves the sysadmin view of
physical port errors.

Submitted by: gallatin@
Sponsored by: Mellanox Technologies
12:54:19 - r322538
(1 day 2 hours ago)
by hselasky
Affects: 
(2 files)
/stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
MFC r322251:
Make sure the received IP header gets 32-bit aligned for short packets
in the mlx5en(4) driver.

Approved by: re (kib)
Sponsored by: Mellanox Technologies
12:30:11 - r322537
(1 day 2 hours ago)
by hselasky
Affects: 
(2 files)
/stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
MFC r322251:
Make sure the received IP header gets 32-bit aligned for short packets
in the mlx5en(4) driver.

Sponsored by: Mellanox Technologies
12:28:16 - r322536
(1 day 2 hours ago)
by hselasky
Affects: 
(6 files)
/stable/9/sys/ofed/drivers/net/mlx4/*
MFC r322248:
Fix for mlx4en(4) to properly call m_defrag().

The m_defrag() function can only defrag mbuf chains which have a valid
mbuf packet header. In r291699 when the mlx4en(4) driver was converted
into using BUSDMA(9), the call to m_defrag() was moved after the part
of the transmit routine which strips the header from the mbuf chain.
This effectivly disabled the mbuf defrag mechanism and such packets
simply got dropped.

This patch removes the stripping of mbufs from a chain and loads all
mbufs using busdma. If busdma finds there are no segments, unload
the DMA map and free the mbuf right away, because that means all
data in the mbuf has been inlined in the TX ring. Else proceed
as usual.

Add a per-ring rounter for the number of defrag attempts and
make sure the oversized_packets counter gets zeroed while at it.

The counters are per-ring to avoid excessive cache misses in the
TX path.

Submitted by: mjoras@
Differential Revision: https://reviews.freebsd.org/D11683
Sponsored by: Mellanox Technologies
12:26:43 - r322535
(1 day 2 hours ago)
by cy
Affects: 
(2 files)
/stable/10/kerberos5/libexec/ipropd-master/Makefile
MFC r322113:

Remove dead target introduced in r178828.

Approved by: re (marius)
09:44:18 - r322534
(1 day 5 hours ago)
by kib
Affects: 
(2 files)
/stable/11/lib/libc/x86/sys/__vdso_gettc.c
MFC r322456:
On i386 with CPUID but without SSE2, set lfence_works to LMB_NONE
instead of looping.
09:40:57 - r322533
(1 day 5 hours ago)
by kib
Affects: 
(2 files)
/stable/11/lib/libc/string/memset_s.c
MFC r322426:
Fix indent.
09:36:00 - r322532
(1 day 5 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/dev/hwpmc/hwpmc_piv.c
MFC r322256:
Fix logic error in the the assert, causing the condition to be always true.

PR: 217741
09:21:46 - r322531
(1 day 5 hours ago)
by hselasky
Affects: 
(6 files)
/stable/10/sys/ofed/drivers/net/mlx4/*
MFC r322248:
Fix for mlx4en(4) to properly call m_defrag().

The m_defrag() function can only defrag mbuf chains which have a valid
mbuf packet header. In r291699 when the mlx4en(4) driver was converted
into using BUSDMA(9), the call to m_defrag() was moved after the part
of the transmit routine which strips the header from the mbuf chain.
This effectivly disabled the mbuf defrag mechanism and such packets
simply got dropped.

This patch removes the stripping of mbufs from a chain and loads all
mbufs using busdma. If busdma finds there are no segments, unload
the DMA map and free the mbuf right away, because that means all
data in the mbuf has been inlined in the TX ring. Else proceed
as usual.

Add a per-ring rounter for the number of defrag attempts and
make sure the oversized_packets counter gets zeroed while at it.

The counters are per-ring to avoid excessive cache misses in the
TX path.

Approved by: re (kib)
Submitted by: mjoras@
Differential Revision: https://reviews.freebsd.org/D11683
Sponsored by: Mellanox Technologies
08:44:36 - r322530
(1 day 6 hours ago)
by hselasky
Affects:  /head/sys/dev/usb/quirk/usb_quirk.c
Add new USB quirk.

Submitted by: devel@stasyan.com
PR: 221328
MFC after: 1 week
Sponsored by: Mellanox Technologies
08:29:03 - r322529
(1 day 6 hours ago)
by hselasky
Affects: 
(6 files)
/stable/11/sys/ofed/drivers/net/mlx4/*
MFC r322248:
Fix for mlx4en(4) to properly call m_defrag().

The m_defrag() function can only defrag mbuf chains which have a valid
mbuf packet header. In r291699 when the mlx4en(4) driver was converted
into using BUSDMA(9), the call to m_defrag() was moved after the part
of the transmit routine which strips the header from the mbuf chain.
This effectivly disabled the mbuf defrag mechanism and such packets
simply got dropped.

This patch removes the stripping of mbufs from a chain and loads all
mbufs using busdma. If busdma finds there are no segments, unload
the DMA map and free the mbuf right away, because that means all
data in the mbuf has been inlined in the TX ring. Else proceed
as usual.

Add a per-ring rounter for the number of defrag attempts and
make sure the oversized_packets counter gets zeroed while at it.

The counters are per-ring to avoid excessive cache misses in the
TX path.

Submitted by: mjoras@
Differential Revision: https://reviews.freebsd.org/D11683
Sponsored by: Mellanox Technologies
07:21:47 - r322528
(1 day 7 hours ago)
by pho
Affects:  /user/pho/stress2/misc/md3.sh
Fix hard coded unit number.

Sponsored by: Dell EMC Isilon
06:01:36 - r322527
(1 day 9 hours ago)
by delphij
Affects:  /head/sys/mips/atheros/if_arge.c
Plug memory leak in arge_encap().

Reported by: Ilja Van Sprundel <ivansprundel ioactive.com>
Submitted by: Domagoj Stolfa <domagoj.stolfa gmail.com>
Reviewed by: adrian
MFC after: 3 days
02:21:02 - r322526
(1 day 12 hours ago)
by cem
Affects:  /head/sys/kern/kern_ktr.c
/head/sys/kern/subr_smp.c
Fix a couple of comment typos

No functional change.

Submitted by: Anton Rang <anton.rang AT isilon.com>
Sponsored by: Dell EMC Isilon
01:22:39 - r322525
(1 day 13 hours ago)
by kevans
Affects: 
(4 files)
/stable/11/usr.bin/grep/Makefile
/stable/11/usr.bin/grep/grep.1
/stable/11/usr.bin/grep/grep.c
bsdgrep: treat rgrep as grep -r and install rgrep symlink

MFC r316473: bsdgrep: treat rgrep as grep -r

MFC r316484: bsdgrep(1): create rgrep link

Create a convenience rgrep link for bsdgrep(1) that observes 'grep -r'
behavior.

A follow-up to r316473.

Approved by: emaste (mentor)
00:54:16 - r322524
(1 day 14 hours ago)
by pfg
Affects: 
(3 files)
/stable/11/lib/libc/gen/fnmatch.c
/stable/11/lib/libc/tests/gen/fnmatch_testcases.h
MFC r322368, r322371:
fnmatch(3): improve POSIX conformance.

In a recent interpretation[1], "\\" shall return a non-zero value
(indicating either no match or an error).

The fix involves a change over r254091 and now the behavior matches the
Sun/IBM/HP closed source implementations and also likely musl libc.

Submitted by: Joerg Schilling <joerg at schily.net>

[1] http://austingroupbugs.net/view.php?id=806
2017 - 08 - 14   (2 days ago)
23:46:10 - r322523
(1 day 15 hours ago)
by jkim
Affects: 
(4 files)
/stable/10/sys/amd64/amd64/machdep.c
/stable/10/sys/amd64/include/md_var.h
/stable/10/sys/x86/x86/identcpu.c
MFC: r322323

Split identify_cpu() into two functions for amd64 as we do for i386. This
fixes a regression introduced in r322205.

Approved by: re (marius)
22:38:54 - r322522
(1 day 16 hours ago)
by imp
Affects:  /head/lib/libcompiler_rt/Makefile.inc
There is no MACHINE_CPUARCH == armv6, remove redunant check.
22:25:20 - r322521
(1 day 16 hours ago)
by imp
Affects: 
(5 files)
/head/gnu/usr.bin/binutils/*
/head/gnu/usr.bin/cc/*
Convert all the arm big endian tests into a regexp rather than a list.

Suggested by: emaste@
21:48:50 - r322520
(1 day 17 hours ago)
by kevans
Affects: 
(2 files)
/stable/11/usr.bin/grep/file.c
MFC r313948: bsdgrep: fix EOF handling with --mmap

Rework part of the loop in grep_fgetln to return the rest of the line
and ensure that we still advance the buffer by the length of the rest
of the line.

PR: 165471
Approved by: emaste (mentor)
20:53:01 - r322519
(1 day 18 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfs/nfs_commonport.c
/projects/pnfs-planb-server/sys/fs/nfs/nfsport.h
/projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
Modify nfsrv_pnfsremovesetup() and nfsrv_pnfsremove(), factoring out the part
that does the Lookup and Remove RPCs
against the DS server to remove the DS data file, so that it can be done
by a separate kernel process.
Put all the arguments to this factored out function (nfsrv_dsremove()) in
a structure, so that it can be passed through kproc_create().
This allows removal of the data file on mirrors to be done concurrently.
In future, it might be better to avoid the kproc_create() call for every
file remove and have a set of these kernel processes waiting to do the RPCs.
20:47:14 - r322518
(1 day 18 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonport.c
/projects/pnfs-planb-server-stable11/sys/fs/nfs/nfsport.h
/projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c
Modify nfsrv_pnfsremovesetup() and nfsrv_pnfsremove(), factoring out the part
that does the Lookup and Remove RPCs
against the DS server to remove the DS data file, so that it can be done
by a separate kernel process.
Put all the arguments to this factored out function (nfsrv_dsremove()) in
a structure, so that it can be passed through kproc_create().
This allows removal of the data file on mirrors to be done concurrently.
In future, it might be better to avoid the kproc_create() call for every
file remove and have a set of these kernel processes waiting to do the RPCs.
19:28:49 - r322517
(1 day 19 hours ago)
by ngie
Affects: 
(183 files)
/projects/runtime-coverage/*
MFhead@r322515
19:23:31 - r322516
(1 day 19 hours ago)
by ngie
Affects:  /projects/make-check-sandbox
Prune project branch "merged" into ^/head as r322511 and r322515
19:21:37 - r322515
(1 day 19 hours ago)
by ngie
Affects: 
(113 files)
/head/*
Add supporting changes for `Add limited sandbox capability to "make check"`

Non-tests/... changes:
- Add HAS_TESTS= to Makefiles with libraries and programs to enable iteration
  and propagate the appropriate environment down to *.test.mk.

tests/... changes:
- Add appropriate support Makefile.inc's to set HAS_TESTS in a minimal manner,
  since tests/... is a special subdirectory tree compared to the others.

MFC after: 2 months
MFC with: r322511
Reviewed by: arch (silence), testing (silence)
Differential Revision: D12014
19:18:50 - r322514
(1 day 19 hours ago)
by ngie
Affects:  /head/UPDATING
Add an UPDATING entry for r322511.

MFC after: 2 months
19:12:51 - r322513
(1 day 20 hours ago)
by mckusick
Affects: 
(2 files)
/stable/10/sys/geom/journal/g_journal.c
MFC of 322178:

Bug 198500 reports bad sysctl values for gjournal cache limit.

PR: 198500
Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
Reported by: Eugene Grosbein
Discussed with: kib
Approved by: re (marius)
19:03:55 - r322512
(1 day 20 hours ago)
by ngie
Affects:  /head/share/man/man5/src.conf.5
Regenerate src.conf(5) after change made in r322511 to "make check" behavior
19:03:05 - r322511
(1 day 20 hours ago)
by ngie
Affects: 
(7 files)
/head/share/mk/*
/head/tools/build/options/WITHOUT_MAKE_CHECK_USE_SANDBOX
Add limited sandbox capability to "make check"

== Rationale ==

r295380 introduced "make check" and consolidated means for running
test code in an attempt to simplify running tests. One could either
install files/libraries/programs and run "make check", or run "make check"
with an explicit CHECKDIR, e.g., `make check CHECKDIR=$(make -V.OBJDIR)``.

One criticism that was received is that "make check" should be run with
the intent of making dev->test->commit easier, which means that the target
audience's workflow should be developers. One developer pattern available
in other opensource projects is to run test code from a developer sandbox,
instead of installing to a system.

== Method ==

This approach is slightly different from the standard approach, in the sense
that it builds and installs into a deterministic directory under .OBJDIR (as I
call it,
the "sandbox"), then runs "make check" against that. In the event the test
run is successful, the deterministic directory is removed to save space.

== Approach ==

bsd.lib.mk, bsd.prog.mk:

To support this functionality, a new variable `HAS_TESTS` is being added.

HAS_TESTS enables appropriate behavior with bsd.lib.mk and bsd.prog.mk, as
follows:
- Add "make check" as an available target from the directory.
- Pass down appropriate variables via ${TESTS_ENV}, i.e.,
  ${TESTS_LD_LIBRARY_PATH} and ${TESTS_PATH}.

One should add "HAS_TESTS" to directories containing tests in them, e.g. from
bin/sh/Makefile,

  HAS_TESTS=
  SUBDIR.${MK_TESTS}+= tests

HAS_TESTS doesn't automatically add the tests subdirectory for flexibility
reasons.

bsd.opts.mk, src.opts.mk:
- The knob ${MK_MAKE_CHECK_USE_SANDBOX} has been added, both to explicitly
  direct (internally) when to set a deterministic ${DESTDIR} and to also allow
  users to disable this behavior globally, i.e., via src.conf.
- MK_TESTS has been promoted from src.opts.mk to bsd.opts.mk to leverage
  syntactic sugar for having MK_TESTS be a dependency for
  MK_MAKE_CHECK_USE_SANDBOX, but to also ensure that src.opts.mk isn't required
  to use suite.test.mk (which is a dependency of bsd.test.mk).

suite.test.mk:
- beforecheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
  from a no-op to:
-- Build.
-- Run "make hierarchy" on the sandbox dir.
-- Install the tests/files to the sandbox dir.
- aftercheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
  from a no-op to:
-- Remove the sandbox dir.

Again, because the dependency order set in bsd.test.mk is
beforecheck -> check -> aftercheck, "make check" will not be run unless
"beforecheck" completes successfully, and "aftercheck" will not be run unless
"beforecheck" and "check" complete successfully.

== Caveats ==

- This target must either be run with MK_INSTALL_AS_USER or as root. Otherwise
  it will fail when running "make install" as the default user/group for many
  makefiles when calling INSTALL is root/wheel.
- This target must be run from a suitable top-level directory. For example,
  running tests from `tests/sys/fs/tmpfs` won't work, but `tests/sys/fs` will,
  because `tests/sys/fs/tmpfs` relies on files installed by `tests/sys/fs`.
- Running MK_INSTALL_AS_USER may introduce determinism issues. However, using
  it could identify deficiences in tests in terms of needing to be run as
  root, which are not properly articulated in the test requirements.
- The doesn't negate the need for running "make installworld" and
  "make checkworld", etc. Again, this just is intended to simplify the
  dev->test->commit workflow.

== Cleanup done ==
- CHECKDIR is removed; one can use "MK_MAKE_CHECK_USE_SANDBOX=no" to enable
  "legacy" (r295380) behavior.

MFC after: 2 months
Relnotes: yes (CHECKDIR removed; "make check" behavior changed)
Requested by: jhb
Reviewed by: arch (silence), testing (silence)
Differential Revision: D11905
18:49:46 - r322510
(1 day 20 hours ago)
by ngie
Affects:  /head/share/man/man5/src.conf.5
Regenerate src.conf(5) per LLDB default change made in r322415
15:08:49 - r322509
(2 days ago)
by gahr
Affects: 
(5 files)
/stable/11/contrib/top/*
/stable/11/usr.bin/top/machine.c
MFC r322139

Enhance top(1) to filter on multiple usernames

Reviewed by: cognet, bapt
Approved by: cognet
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D11840
14:16:56 - r322508
(2 days ago)
by br
Affects: 
(4 files)
/head/contrib/gcc/config/riscv/riscv.h
/head/contrib/gcc/config/riscv/riscv64.h
/head/contrib/gcc/config/riscv64
Rename RISC-V GCC config directory: riscv64 -> riscv
(to match official RISC-V target for GCC 7.1).

This is only a minimal config required to build c start up (csu).

This fixes build after r322429 ("Make _TO_CPUARCH macro for
ARCH to CPUARCH conversions")

Reported by: lwhsu
Sponsored by: DARPA, AFRL
13:42:36 - r322507
(2 days 1 hour ago)
by hselasky
Affects: 
(2 files)
/stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c
MFC r322306:
Print maximum MTU when trying to set invalid MTU in the mlx4en(4) driver.
Useful for debugging.

Approved by: re (marius, gjb)
Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
13:37:46 - r322506
(2 days 1 hour ago)
by hselasky
Affects: 
(2 files)
/stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c
MFC r322306:
Print maximum MTU when trying to set invalid MTU in the mlx4en(4) driver.
Useful for debugging.

Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
13:32:21 - r322505
(2 days 1 hour ago)
by hselasky
Affects: 
(2 files)
/stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c
MFC r322306:
Print maximum MTU when trying to set invalid MTU in the mlx4en(4) driver.
Useful for debugging.

Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
13:28:40 - r322504
(2 days 1 hour ago)
by hselasky
Affects: 
(2 files)
/stable/10/sys/ofed/drivers/net/mlx4/en_port.c
MFC r322304:
Add support for RX and TX statistics when the mlx4en(4) PCI device
is in VF or SRIOV mode typically in a virtual machine environment.

Approved by: re (kib)
Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
13:27:08 - r322503
(2 days 1 hour ago)
by hselasky
Affects: 
(2 files)
/stable/9/sys/ofed/drivers/net/mlx4/en_port.c
MFC r322304:
Add support for RX and TX statistics when the mlx4en(4) PCI device
is in VF or SRIOV mode typically in a virtual machine environment.

Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
13:25:35 - r322502
(2 days 1 hour ago)
by hselasky
Affects:  /stable/9/sys/ofed/include/linux/compiler.h
/stable/9/sys/ofed/include/linux/types.h
MFC r289577:
Merge LinuxKPI changes from DragonflyBSD:
- Map more Linux compiler related defines to FreeBSD ones.

Sponsored by: Mellanox Technologies
13:15:13 - r322501
(2 days 1 hour ago)
by hselasky
Affects: 
(2 files)
/stable/9/sys/ofed/include/linux/compiler.h
MFC r292537 and r314878:
Implement ACCESS_ONCE(), WRITE_ONCE() and READ_ONCE().

Sponsored by: Mellanox Technologies
12:59:14 - r322500
(2 days 2 hours ago)
by hselasky
Affects: 
(2 files)
/stable/10/sys/ofed/include/linux/compiler.h
MFC r314878:
Add support for constant pointer constructs to READ_ONCE() in the
LinuxKPI. When the type of the argument is constant the temporary
variable cannot be assigned after the barrier. Instead assign the
temporary variable by initialization.

Approved by: re (kib)
Sponsored by: Mellanox Technologies
12:47:16 - r322499
(2 days 2 hours ago)
by hselasky
Affects: 
(2 files)
/stable/11/sys/ofed/drivers/net/mlx4/en_port.c
MFC r322304:
Add support for RX and TX statistics when the mlx4en(4) PCI device
is in VF or SRIOV mode typically in a virtual machine environment.

Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
12:45:55 - r322498
(2 days 2 hours ago)
by hselasky
Affects: 
(2 files)
/stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h
MFC r314878:
Add support for constant pointer constructs to READ_ONCE() in the
LinuxKPI. When the type of the argument is constant the temporary
variable cannot be assigned after the barrier. Instead assign the
temporary variable by initialization.

Sponsored by: Mellanox Technologies
12:36:58 - r322497
(2 days 2 hours ago)
by hselasky
Affects: 
(2 files)
/stable/11/sys/ofed/drivers/net/mlx4/en_tx.c
MFC r322305:
Increment queue drops in the network statistics when transmitted packets
are dropped by the mlx4en(4) driver.

Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
11:23:07 - r322496
(2 days 3 hours ago)
by kib
Affects:  /head/sys/amd64/amd64/trap.c
Print whole machine state on double fault.

It is quite useful when double fault is not caused by a stack overflow.

Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
11:20:54 - r322495
(2 days 3 hours ago)
by kib
Affects:  /head/sys/amd64/include/cpufunc.h
Add {rd,wr}{fs,gs}base C wrappers for instructions.

Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
11:20:10 - r322494
(2 days 3 hours ago)
by kib
Affects:  /head/sys/amd64/amd64/trap.c
Style.

Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
11:19:31 - r322493
(2 days 3 hours ago)
by kib
Affects:  /head/usr.sbin/cpucontrol/cpucontrol.8
Remove confusion in the line explaining syntax of the msr read.
Specify words order in the display.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
11:06:09 - r322492
(2 days 4 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/amd64/amd64/pmap.c
MFC r322175:
Avoid DI recursion when reclaim_pv_chunk() is called from
pmap_advise() or pmap_remove().
11:04:06 - r322491
(2 days 4 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/amd64/amd64/pmap.c
MFC r322171:
Explain why delayed invalidation is not required in pmap_protect() and
pmap_remove_pages().
06:46:15 - r322490
(2 days 8 hours ago)
by sephe
Affects: 
(5 files)
/stable/11/sys/amd64/amd64/machdep.c
/stable/11/sys/i386/include/md_var.h
/stable/11/sys/x86/*
MFC 322323 by jkim

  Split identify_cpu() into two functions for amd64 as we do for i386. This
  reduces diff between amd64 and i386. Also, it fixes a regression introduced
  in r322076, i.e., identify_hypervisor() failed to identify some hypervisors.
  This function assumes cpu_feature2 is already initialized.

  Reported by: dexuan
  Tested by: dexuan
06:29:24 - r322489
(2 days 8 hours ago)
by sephe
Affects: 
(4 files)
/stable/11/sys/dev/hyperv/netvsc/if_hn.c
/stable/11/sys/dev/hyperv/netvsc/if_hnreg.h
/stable/11/sys/dev/hyperv/netvsc/if_hnvar.h
MFC 322299

  hyperv/hn: Implement transparent mode network VF.

  How network VF works with hn(4) on Hyper-V in transparent mode:

  - Each network VF has a cooresponding hn(4).
  - The network VF and the it's cooresponding hn(4) have the same hardware
  address.
  - Once the network VF is attached, the cooresponding hn(4) waits several
  seconds to make sure that the network VF attach routing completes, then:
  o Set the intersection of the network VF's if_capabilities and the
  cooresponding hn(4)'s if_capabilities to the cooresponding hn(4)'s
  if_capabilities. And adjust the cooresponding hn(4) if_capable and
  if_hwassist accordingly. (*)
  o Make sure that the cooresponding hn(4)'s TSO parameters meet the
  constraints posed by both the network VF and the cooresponding hn(4).
  (*)
  o The network VF's if_input is overridden. The overriding if_input
  changes the input packet's rcvif to the cooreponding hn(4). The
  network layers are tricked into thinking that all packets are
  neceived by the cooresponding hn(4).
  o If the cooresponding hn(4) was brought up, bring up the network VF.
  The transmission dispatched to the cooresponding hn(4) are
  redispatched to the network VF.
  o Bringing down the cooresponding hn(4) also brings down the network
  VF.
  o All IOCTLs issued to the cooresponding hn(4) are pass-through'ed to
  the network VF; the cooresponding hn(4) changes its internal state
  if necessary.
  o The media status of the cooresponding hn(4) solely relies on the
  network VF.
  o If there are multicast filters on the cooresponding hn(4), allmulti
  will be enabled on the network VF. (**)
  - Once the network VF is detached. Undo all damages did to the
  cooresponding hn(4) in the above item.

  NOTE:
  No operation should be issued directly to the network VF, if the
  network VF transparent mode is enabled. The network VF transparent mode
  can be enabled by setting tunable hw.hn.vf_transparent to 1. The network
  VF transparent mode is _not_ enabled by default, as of this commit.

  The benefit of the network VF transparent mode is that the network VF
  attachment and detachment are transparent to all network layers; e.g. live
  migration detaches and reattaches the network VF.

  The major drawbacks of the network VF transparent mode:
  - The netmap(4) support is lost, even if the VF supports it.
  - ALTQ does not work, since if_start method cannot be properly supported.

  (*)
  These decisions were made so that things will not be messed up too much
  during the transition period.

  (**)
  This does _not_ need to go through the fancy multicast filter management
  stuffs like what vlan(4) has, at least currently:
  - As of this write, multicast does not work in Azure.
  - As of this write, multicast packets go through the cooresponding hn(4).

  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D11803
06:00:51 - r322488
(2 days 9 hours ago)
by sephe
Affects: 
(17 files)
/head/sys/dev/hyperv/*
hyperv: Update copyright for the files changed in 2017

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11982
05:55:16 - r322487
(2 days 9 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Re-set datapath after synthetic parts reattached.

Do this even for non-transparent mode VF. Better safe than sorry.

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11981
05:46:50 - r322486
(2 days 9 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Minor cleanup

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11979
05:40:52 - r322485
(2 days 9 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
/head/sys/dev/hyperv/netvsc/if_hnvar.h
hyperv/hn: Fix/enhance receiving path when VF is activated.

- Update hn(4)'s stats properly for non-transparent mode VF.
- Allow BPF tapping to hn(4) for non-transparent mode VF.
- Don't setup mbuf hash, if 'options RSS' is set.
  In Azure, when VF is activated, TCP SYN and SYN|ACK go through hn(4)
  while the rest of segments and ACKs belonging to the same TCP 4-tuple
  go through the VF. So don't setup mbuf hash, if a VF is activated
  and 'options RSS' is not enabled. hn(4) and the VF may use neither
  the same RSS hash key nor the same RSS hash function, so the hash
  value for packets belonging to the same flow could be different!
- Disable LRO.
  hn(4) will only receive broadcast packets, multicast packets, TCP
  SYN and SYN|ACK (in Azure), LRO is useless for these packet types.
  For non-transparent, we definitely _cannot_ enable LRO at all, since
  the LRO flush will use hn(4) as the receiving interface; i.e.
  hn_ifp->if_input(hn_ifp, m).

While I'm here, remove unapplied comment and minor style change.

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11978
05:31:51 - r322484
(2 days 9 hours ago)
by bhughes
Affects:  /head/usr.bin/calendar/calendars/calendar.freebsd
Add myself

Reported by: mckusick
05:30:02 - r322483
(2 days 9 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Update VF's ibytes properly under transparent VF mode.

While, I'm here add comment about why updating VF's imcast stat is
not necessary.

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11948
04:48:35 - r322482
(2 days 10 hours ago)
by delphij
Affects:  /svnadmin/conf/access
/svnadmin/conf/mentors
Restore gordon’s src commit bit. Welcome back!

Gordon will be mentored by emaste and myself for a brief period.

Approved by: core
04:46:59 - r322481
(2 days 10 hours ago)
by delphij
Affects:  /svnadmin/conf/access
Order alphabetically.

Approved by: core (implicit)
02:49:31 - r322480
(2 days 12 hours ago)
by mckusick
Affects: 
(2 files)
/stable/11/sys/geom/journal/g_journal.c
MFC r322178
Bug 198500 reports bad sysctl values for gjournal cache limit.

PR: 198500
Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
Reported by: Eugene Grosbein
Discussed with: kib
02:23:10 - r322479
(2 days 12 hours ago)
by ian
Affects:  /head/sys/dev/iicbus/nxprtc.c
Add hinted attachment for non-FDT systems. Also, print a message if
setting up the timer fails, because on some types of chips that's the
first attempt to access the device. If the chip is missing/non-responsive
then you'd get a driver that attached and didn't register the rtc, with
no clue about why. On other chip types there are inits that come before
timer setup, and they already print messages about errors.
00:12:14 - r322478
(2 days 15 hours ago)
by ian
Affects:  /head/sys/arm/conf/GENERIC
Add back the drivers for Dallas/Maxim ds13xx and Seiko S35390x now that
they've been rewritten/fixed to not cause panics by doing i2c transfers
before interrupts are available.

PR: 221227
00:00:24 - r322477
(2 days 15 hours ago)
by ian
Affects: 
(4 files)
/head/sys/dev/iicbus/s35390a.c
/head/sys/modules/i2c/Makefile
/head/sys/modules/i2c/s35390a/Makefile
Minor fixes and enhancements for the s35390a i2c RTC driver...

- Add FDT probe code.
- Do i2c transfers with exclusive bus ownership.
- Use config_intrhook_oneshot() to defer chip setup because some i2c
  busses can't do transfers without interrupts.
- Add a detach() routine.
- Add to module build.
2017 - 08 - 13   (3 days ago)
22:07:42 - r322476
(2 days 17 hours ago)
by ian
Affects: 
(9 files)
/head/sys/conf/*
/head/sys/dev/iicbus/ds1374.c
/head/sys/mips/*
Remove the old ds1374 driver and use the ds13rtc driver instead. Adjust
several mips config files accordingly.
21:45:46 - r322475
(2 days 17 hours ago)
by ian
Affects:  /head/sys/dev/iicbus/ds13rtc.c
Change "chiptype" to "compatible". Making the hint name the same as the FDT
property name should make it easier to document the list of names accepted
by both configuration mechanisms.
21:11:48 - r322474
(2 days 18 hours ago)
by emaste
Affects:  /head/contrib/llvm/tools/lld/ELF/Driver.cpp
lld: Add `-z muldefs` option.

Obtained from: LLVM r310757
21:02:40 - r322473
(2 days 18 hours ago)
by ian
Affects: 
(7 files)
/head/sys/conf/*
/head/sys/dev/iicbus/*
/head/sys/modules/i2c/*
Add a new driver, ds13rtc, that handles all DS13xx series i2c RTC chips.

This driver supports only basic timekeeping functionality. It completely
replaces the ds133x driver. It can also replace the ds1374 driver, but that
will take a few other changes in MIPS code and config, and will be committed
separately. It does NOT replace the existing ds1307 driver, which provides
access to some of the extended features on the 1307 chip, such as controlling
the square wave output signal. If both ds1307 and ds13rtc drivers are
present, the ds1307 driver will outbid and win control of the device.

This driver can be configured with FDT data, or by using hints on non-FDT
systems. In addition to the standard hints for i2c devices, it requires
a "chiptype" string of the form "dallas,ds13xx" where 'xx' is the chip id
(i.e., the same format as FDT compat strings).
19:35:48 - r322472
(2 days 19 hours ago)
by cy
Affects: 
(2 files)
/stable/11/kerberos5/libexec/ipropd-master/Makefile
MFC r322113:

Remove dead target introduced in r178828.
18:59:19 - r322471
(2 days 20 hours ago)
by ohauer
Affects:  /head/usr.bin/calendar/calendars/calendar.freebsd
- Add myswlf

Reported by: mckusick
18:54:51 - r322470
(2 days 20 hours ago)
by andrew
Affects:  /head/sys/arm64/arm64/gic_v3.c
/head/sys/arm64/arm64/gic_v3_fdt.c
/head/sys/arm64/arm64/gicv3_its.c
Add support for multiple GICv3 ITS devices. For this we add sc_irq_base
and sc_irq_length to the softc to handle the base number of IRQs available,
make gicv3_get_nirqs return the number of available interrupt IDs, and
limit which CPUs we send interrupts to based on the numa domain.

The last point is only strictly needed on a dual socket ThunderX where we
are unable to send MSI/MSI-X interrupts between sockets.

Sponsored by: DARPA, AFRL
18:41:37 - r322469
(2 days 20 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfs/nfs_commonport.c
/projects/pnfs-planb-server/sys/fs/nfs/nfsport.h
/projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
Modify nfsrv_pnfscreate(), factoring out the part that does the Open RPC
against the DS server to create the DS data file, so that it can be done
by a separate kernel process.
Put all the arguments to this factored out function (nfsrv_dscreate()) in
a structure, so that it can be passed through kproc_create().
This allows creation of the data file on mirrors to be done concurrently.
In future, it might be better to avoid the kproc_create() call for every
file create and have a set of these kernel processes waiting to do the RPCs.
18:34:44 - r322468
(2 days 20 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonport.c
/projects/pnfs-planb-server-stable11/sys/fs/nfs/nfsport.h
/projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c
Modify nfsrv_pnfscreate(), factoring out the part that does the Open RPC
against the DS server to create the DS data file, so that it can be done
by a separate kernel process.
Put all the arguments to this factored out function (nfsrv_dscreate()) in
a structure, so that it can be passed through kproc_create().
This allows creation of the data file on mirrors to be done concurrently.
In future, it might be better to avoid the kproc_create() call for every
file create and have a set of these kernel processes waiting to do the RPCs.
18:14:24 - r322467
(2 days 20 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/usr.sbin/acpi/acpidump/acpi.c
MFC r320736: acpidump: warn and exit loop on invalid subtable length

Submitted by: Guangyuan Yang <yzgyyang@outlook.com>
Sponsored by: The FreeBSD Foundation
18:12:56 - r322466
(2 days 20 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/usr.sbin/acpi/acpidump/acpi.c
MFC r304000 (maxim): acpidump: move variable initialization out of assert(3)

This fixes acpidump(8) compiled with "WITHOUT_ASSERT_DEBUG=yes" that
removes assert(3)'s from the code.

Submitted by: Alexander Nedotsukov
18:10:24 - r322465
(2 days 21 hours ago)
by ian
Affects: 
(4 files)
/head/share/man/man9/*
/head/sys/kern/subr_autoconf.c
/head/sys/sys/kernel.h
Add config_intrhook_oneshot(): schedule an intrhook function and unregister
it automatically after it runs.

The config_intrhook mechanism allows a driver to stall the boot process
until device(s) required for booting are available, by not allowing system
inits to proceed until all intrhook functions have been unregistered.
Virtually all existing code simply unregisters from within the hook function
when it gets called.

This new function makes that common usage more convenient. Instead of
allocating and filling in a struct, passing it to a function that might (in
theory) fail, and checking the return code, now a driver can simply call
this cannot-fail routine, passing just the intrhook function and its arg.

Differential Revision: https://reviews.freebsd.org/D11963
18:09:22 - r322464
(2 days 21 hours ago)
by mckusick
Affects:  /head/sys/geom/journal/g_journal.c
When read requests are sent from a filesystem running above g_journal,
the g_journal level needs to check whether it is holding a newer
copy of the block than that which exists on the disk. If so, it
needs to return its copy. If not, it should pass the request down
to the disk to fulfill. It currently considers six queues:

0) delayed queue,
1) unsent (current queue),
2) in-flight to the journal (flush queue),
3) active journal (active queue),
4) inactive journal (inactive queue), and
5) inflight to the disk (copy queue).

Checking on two of these queues is unnecessary:

0) The delayed requests should not be used for reads because they
  have not yet been entered into the journal, so their value should
  reflect the disk contents, not the future contents that are not
  yet committed.

2) Because all the bio's in the flush queue are also found on the
  active queue, there is no need to inspect the flush queue for
  reads since they will be found when searching the active queue.

Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
Discussed with: kib
MFC after: 1 week
18:06:38 - r322463
(2 days 21 hours ago)
by mckusick
Affects:  /head/sys/geom/journal/g_journal.c
Eliminate a variable that is only ever set.

Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
Discussed with: kib
MFC after: 1 week
17:30:03 - r322462
(2 days 21 hours ago)
by avos
Affects: 
(2 files)
/stable/10/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8
MFC r322124:
rfcomm_pppd.8: fix a typo (SPD -> SDP).

Approved by: re (marius)
16:44:55 - r322461
(2 days 22 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/usr.sbin/acpi/acpidump/acpi.c
MFC r321298: acpidump: add ACPI NFIT (NVDIMM Firmware Interface Table)

Also MFC r322351 by mav, add two NFIT fields missed in initial commit.
16:40:29 - r322460
(2 days 22 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/dev/uart/uart_bus_pci.c
MFC r215837: uart: add AX99100 chipset support

PR: 215837
16:39:49 - r322459
(2 days 22 hours ago)
by alc
Affects:  /head/sys/kern/subr_blist.c
/head/sys/sys/blist.h
The *_meta_* functions include a radix parameter, a blk parameter, and
another parameter that identifies a starting point in the memory address
block. Radix is a power of two, blk is a multiple of radix, and the
starting point is in the range [blk, blk+radix), so that blk can always be
computed from the other two. This change drops the blk parameter from the
meta functions and computes it instead. (On amd64, for example, this
change reduces subr_blist.o's text size by 7%.)

It also makes the radix parameters unsigned to address concerns that the
calculation of '-radix' might overflow without the -fwrapv option. (See
https://reviews.freebsd.org/D11819.)

Submitted by: Doug Moore <dougm@rice.edu>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11964
15:15:40 - r322458
(2 days 23 hours ago)
by tuexen
Affects:  /head/lib/libc/sys/getsockopt.2
Fix minor formatting issue.
14:50:38 - r322457
(3 days ago)
by royger
Affects:  /head/sys/x86/acpica/srat.c
srat: use pmap_unmapbios

To match the pmap_mapbios.

Reported by: jhb
MFC with: r322403
14:42:23 - r322456
(3 days ago)
by kib
Affects:  /head/lib/libc/x86/sys/__vdso_gettc.c
Fix a regression in r321608.

On i386 with CPUID but without SSE2, set lfence_works to LMB_NONE
instead of looping.

Reported and tested by: Andre Albsmeier <andre@fbsd.e4m.org>
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
14:36:10 - r322455
(3 days ago)
by jilles
Affects:  /head/bin/sh/tests/invocation/Makefile
/head/bin/sh/tests/invocation/sh-c-missing1.0
sh: Add test for sh -c with missing command string.

This already works correctly.
07:40:05 - r322454
(3 days 7 hours ago)
by tuexen
Affects: 
(2 files)
/stable/10/sys/netinet/tcp_syncache.c
MFC r317244:

Represent "a syncache overflow hasn't happend yet" by using
-(SYNCOOKIE_LIFETIME + 1) instead of INT64_MIN, since it is
good enough and works when time_t is int32 or int64.

Approved by: re (kib)
04:10:47 - r322453
(3 days 11 hours ago)
by imp
Affects:  /head/share/mk/bsd.cpu.mk
We don't use ARM_ARCH_6 in the tree, and haven't for a long long
time. Remove it from here. As far as I could tell, nothing in ports
use it (either __ARM_ARCH or __ARM_ARCH_6__ is used in all the
apatches). We do have a define for _ARM_ARCH_6, but it's mostly unused
(and will remain, since it isn't in this file).
01:23:13 - r322452
(3 days 13 hours ago)
by ngie
Affects: 
(668 files)
/projects/runtime-coverage/*
MFhead@r322451
01:08:37 - r322451
(3 days 14 hours ago)
by ngie
Affects:  /head/lib/libcasper/services/tests/Makefile
/head/lib/libcasper/tests/Makefile
TESTSDIR isn't required; remove it

MFC after: 1 week
MFC with: r322450
01:04:44 - r322450
(3 days 14 hours ago)
by ngie
Affects: 
(6 files)
/head/lib/libcasper/Makefile
/head/lib/libcasper/services/*
/head/lib/libcasper/tests/Makefile
Integrate the tests moved in r305626 in to the FreeBSD test suite

The reachover Kyuafiles were never added, and thus the tests were installed
as standalone tests, and not integrated into the full suite.

MFC after: 1 week
MFC with: r305626, 305629, r307863, r322447, r322448, r322449
00:56:43 - r322449
(3 days 14 hours ago)
by ngie
Affects:  /head/lib/libcasper/services/cap_dns/tests/dns_test.c
Use hardcoded IPv4/IPv6 addresses for google-public-dns-a.google.com instead
of freefall.freebsd.org to unbreak the DNS tests

The address allocations for freefall.freebsd.org have changed in the past 4
years.
Use a more stable set of hardcoded addresses for now to make the tests succeed
reliably.

The hostname should be resolved dynamically instead of hardcoding the addresses
in
the future. This is just a bandaid.

MFC after: 1 week
00:14:08 - r322448
(3 days 14 hours ago)
by ngie
Affects:  /head/lib/libcasper/services/cap_sysctl/tests/Makefile
Make root-privileges a requirement for the test

Some of the testcases try to manipulate sysctls that require root privileges,
e.g., "kern.sync_on_panic". Make root-privileges a hard requirement so the
tests don't raise false positives due to privilege issues when calling
sysctlbyname(3) on writable sysctls.

MFC after: 1 week
00:04:50 - r322447
(3 days 15 hours ago)
by ngie
Affects: 
(4 files)
/head/lib/libcasper/services/*
Fix result printing

- Flushing stdout prevents the buffer from being printed twice, fixing
  issues with stdout printing out the testplan, etc, twice.
- Don't print out raw source/line numbers; hide them behind comments.

MFC after: 1 week
2017 - 08 - 12   (4 days ago)
23:40:01 - r322446
(3 days 15 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/lib/libxo/tests/Makefile
MFC r322023:

Remove special-case logic for running tests on host machines

I'm not sure what process sjg@ was using, but using CHECKDIR=${.OBJDIR} with
"make check" on ^/head is the correct thing to do. This unbreaks "make check"
for me (unsandboxed, not using CHECKDIR=${.OBJDIR}).

While here, fix a whitespace nit with LIBADD.
22:20:08 - r322445
(3 days 16 hours ago)
by ngie
Affects:  /head/lib/ncurses/ncurses/termcap.c
Hide `sccsid` under #if 0, per example in style(9)

This fixes a -Wunused warning with gcc 6.3.0/7.0.0.

MFC after: 1 week
22:14:09 - r322444
(3 days 16 hours ago)
by peter
Affects: 
(11 files)
/stable/11/contrib/sqlite3/*
MFC: r322386 Update private sqlite3-3.14.1 to sqlite3-3.20.0.
22:13:06 - r322443
(3 days 16 hours ago)
by nwhitehorn
Affects:  /head/sys/dev/nvme/nvme.c
Move NVME controller shutdown from being called as part of module unloading
to being called through the newbus DEVICE_SHUTDOWN() path. This ensures that
the NVME controller gets shut down before the device and bus disappear
and prevents data corruption on shutdown on at least Samsung EVO 960 SSDs.

PR: kern/211852
Reviewed by: imp
MFC after: 2 weeks
22:12:09 - r322442
(3 days 17 hours ago)
by peter
Affects: 
(25 files)
/stable/11/contrib/subversion/*
MFC: r322380 Update subversion 1.9.5 -> 1.9.7
21:26:46 - r322441
(3 days 17 hours ago)
by ngie
Affects:  /head/share/mk/bsd.cpu.mk
Delete trailing whitespace

MFC after: 1 month
21:23:33 - r322440
(3 days 17 hours ago)
by wulf
Affects: 
(4 files)
/head/usr.sbin/bluetooth/bthidd/*
bthidd(8): Add support for Apple's magic mouse

Note: Mouse's bthidd.conf record should contain vendor and device IDs
to make proper device detection. If it does not contain IDs,
regenerate record with "Query" command of recent bthidcontrol(8).

Submitted by: Dirk Engling <erdgeist@erdgeist.org>
Reviewed by: emax
Approved by: bapt (mentor), gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D3702
21:20:51 - r322439
(3 days 17 hours ago)
by wulf
Affects: 
(5 files)
/head/usr.sbin/bluetooth/bthidcontrol/sdp.c
/head/usr.sbin/bluetooth/bthidd/*
bthidd(8): Add support for vendor_id, product_id and version.

Extend bthidd.conf format to store vendor and product IDs of remote
Bluetooth HID devices to make possible implementation of device
specific quirks inside bthidd(8).
Add support for querying of this information from device's SDP records
with bthidcontrol(8) "Query" command.

Submitted by: Dirk Engling <erdgeist@erdgeist.org>
Reviewed by: emax
Approved by: bapt (mentor), gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D3702
19:17:48 - r322438
(3 days 19 hours ago)
by jilles
Affects: 
(8 files)
/head/bin/sh/tests/Makefile
/head/bin/sh/tests/invocation/*
/head/etc/mtree/BSD.tests.dist
sh: Add tests for sh -c that already pass.

PR: 220587
Submitted by: Ryan Moeller
18:42:54 - r322437
(3 days 20 hours ago)
by jhb
Affects: 
(4 files)
/head/sys/arm64/arm64/*
/head/sys/arm64/include/machdep.h
Reliably enable debug exceptions on all CPUs.

Previously, debug exceptions were only enabled on the boot CPU if
DDB was enabled in the dbg_monitor_init() function. APs also called
this function, but since mp_machdep.c doesn't include opt_ddb.h, the
APs ended up calling an empty stub defined in <machine/debug_monitor.h>
instead of the real function. Also, if DDB was not enabled in the kernel,
the boot CPU would not enable debug exceptions.

Fix this by adding a new dbg_init() function that always clears the OS
lock to enable debug exceptions which the boot CPU and the APs call.
This function also calls dbg_monitor_init() to enable hardware breakpoints
from DDB on all CPUs if DDB is enabled. Eventually base support for
hardware breakpoints/watchpoints will need to move out of the DDB-only
debug_monitor.c for use by userland debuggers.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D12001
18:38:18 - r322436
(3 days 20 hours ago)
by jhb
Affects:  /head/sys/arm64/arm64/machdep.c
Don't panic for PT_GETFPREGS.

Only fetch the VFP state from the CPU if the thread whose registers are
being requested is the current thread. If a stopped thread's registers
are being fetched by a debugger, the saved state in the PCB is already
valid.

Reviewed by: andrew
MFC after: 1 week
18:28:02 - r322435
(3 days 20 hours ago)
by rlibby
Affects:  /head/lib/msun/src/catrigl.c
/head/lib/msun/src/math_private.h
/head/lib/msun/src/s_csqrtl.c
Revert r322418, LDBL_MAX_EXP unsuitable for macro pasting on some arches

Either need a different way to spell HALF_LDBL_MAX, or a different way
to spell LDBL_MAX_EXP, or a different approach.

Reported by: ian
18:11:41 - r322434
(3 days 21 hours ago)
by lwhsu
Affects:  /head/share/mk/bsd.links.mk
Re-remove excess / for installing SYMLINKS

This excess / was introduced in r280129, and fixed in r295230, but got
re-introduced while merging another branch in r298107.

Approved by: gjb
Differential Revision: https://reviews.freebsd.org/D11995
17:50:22 - r322433
(3 days 21 hours ago)
by dim
Affects: 
(3 files)
/stable/11/Makefile.inc1
/stable/11/Makefile.libcompat
MFC r321684:

Don't use libc++ when cross-building for gcc arches

Since we imported clang 5.0.0, the version check in Makefile.inc1 which
checks whether to use libc++ fires even when the compiler for the target
architecture is gcc 4.2.1. This is because only X_COMPILER_VERSION is
checked. Also check X_COMPILER_TYPE, so it will only use libc++ when an
external gcc toolchain is used.

Reviewed by: emaste, rpokala
Differential Revision: https://reviews.freebsd.org/D11776

MFC r322170:

Follow-up to r321684 (Don't use libc++ when cross-building for gcc
arches), and handle two more cases where libc++ includes could be
incorrectly enabled, in case the host compiler is clang 5.0.0, and the
target (cross) compiler is gcc 4.2.1.

Noted by: bdrewery
17:46:50 - r322432
(3 days 21 hours ago)
by sevan
Affects:  /head/lib/libc/sys/shmget.2
Add missing header.
S_IRUSR is defined in sys/stat.h

PR: 209229
Submitted by: <mt AT markoturk DOT info>
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D12007
17:39:32 - r322431
(3 days 21 hours ago)
by ian
Affects:  /head/sys/dev/iicbus/nxprtc.c
Bid for the device with BUS_PROBE_GENERIC, because this is very much a
generic driver with minimal feature support for a large number of chips.
More featureful per-chip drivers might exist (especially out-of-tree) and
those should win the bidding even if they use BUS_PROBE_DEFAULT.
17:07:32 - r322430
(3 days 22 hours ago)
by imp
Affects:  /head/share/mk/sys.mk
arm*hf is no longer a thing, remove it from the conversion now that it's easy.

Submitted by: andyt@
17:07:27 - r322429
(3 days 22 hours ago)
by imp
Affects: 
(6 files)
/head/Makefile
/head/gnu/usr.bin/*
/head/share/mk/sys.mk
Make _TO_CPUARCH macro for ARCH to CPUARCH conversions

Consolidate all the regular expressions to convert from MACHINE_ARCH
to MACHINE_CPUARCH into a variable and use that variable in preference
to the almost identical copies in the tree (which should have been
identical).

Differential Revision: https://reviews.freebsd.org/D11986
15:51:46 - r322428
(3 days 23 hours ago)
by sevan
Affects:  /head/usr.bin/mkesdb/yacc.y
Set usage() to show -d flag
mkesdb supports the -d flag for enabling debug mode, as documented in the
manual.

PR: 209865
Submitted by: Maya Rashish <coypu AT sdf DOT org>
Reviewed by: imp
Approved by: bcr (mentor)
Obtained from: NetBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D11987
15:18:17 - r322427
(3 days 23 hours ago)
by kib
Affects:  /head/lib/libc/stdlib/set_constraint_handler_s.c
/head/lib/libc/string/memset_s.c
/head/lib/libc/tests/string/memset_s_test.c
Improve standard compliance for memset_s() and abort_handler_s().

abort_handler_s() currently simply calls abort(), though the standard
specifies more: "Writes an implementation-defined message to stderr
which must include the string pointed to by msg and calls abort()."

memset_s() is missing error condition "n > smax", and does not invoke
the constraint handler after filling the buffer: "following errors are
detected at runtime and call the currently installed constraint
handler function after storing ch in every location of the destination
range [dest, dest+destsz) if dest and destsz are themselves valid",
one of the errors is "n > smax" itself.

Submitted by: Yuri Pankov <yuripv@gmx.com>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D11991
14:58:09 - r322426
(4 days ago)
by kib
Affects:  /head/lib/libc/string/memset_s.c
Fix indent.

Submitted by: Yuri Pankov <yuripv@gmx.com>
MFC after: 3 days
14:02:19 - r322425
(4 days 1 hour ago)
by np
Affects:  /head/sys/dev/cxgbe/adapter.h
/head/sys/dev/cxgbe/common/t4_hw.c
/head/sys/dev/cxgbe/t4_main.c
cxgbe(4): Save the last reported link parameters and compare them with
the current state to determine whether to generate a link-state change
notification. This fixes a bug introduced in r321063 that caused the
driver to sometimes skip these notifications.

Reported by: Jason Eggleston @ LLNW
MFC after: 3 days
Sponsored by: Chelsio Communications
12:17:38 - r322424
(4 days 2 hours ago)
by sevan
Affects:  /head/usr.bin/units/units.1
Correct the -H longopt equivillant

PR: 209876
Submitted by: <kdrakehp AT zoho DOT com>
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D11988
10:22:18 - r322423
(4 days 4 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cam/ctl/scsi_ctl.c
MFC r322302: Do not loose CCB flags after r320493.

There is at least CAM_UNLOCKED that should be kept.
08:51:19 - r322422
(4 days 6 hours ago)
by kib
Affects: 
(2 files)
/stable/11/share/man/man3/makedev.3
MFC r322077:
Provide more detailed specification for major(), minor() and makedev().
2017 - 08 - 11   (5 days ago)
23:12:28 - r322421
(4 days 16 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
/projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c
Fix nfsrv_dsgetsockmnt() so that it handles the mirrors. Also, change
nfsrv_dsgetdevandfh() so that it allocates the maximum size for mirrors
and not just the maximum mirrors for this running case.
23:07:56 - r322420
(4 days 16 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c
/projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdstate.c
Fix nfsrv_dsgetsockmnt() so that it handles the mirrors. Also, change
nfsrv_dsgetdevandfh() so that it allocates the maximum size for mirrors
and not just the maximum mirrors for this running case.
22:47:32 - r322419
(4 days 16 hours ago)
by jhb
Affects:  /head/sys/arm64/arm64/vfp.c
Fix a typo.
22:41:24 - r322418
(4 days 16 hours ago)
by rlibby
Affects:  /head/lib/msun/src/catrigl.c
/head/lib/msun/src/math_private.h
/head/lib/msun/src/s_csqrtl.c
lib/msun: avoid referring to broken LDBL_MAX

LDBL_MAX is broken on i386:
https://lists.freebsd.org/pipermail/freebsd-numerics/2012-September/000288.html

Gcc has produced +Infinity for LDBL_MAX on i386 and amd64 with -m32
for some time, and newer versions of gcc are now warning that the
"floating constant exceeds range of 'long double'". Avoid this by
referring to half the value of LDBL_MAX instead.

Reviewed by: bde
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
22:39:38 - r322417
(4 days 16 hours ago)
by markj
Affects: 
(892 files)
/projects/numa2/*
MFH at r322416.
20:44:17 - r322416
(4 days 18 hours ago)
by bhd
Affects:  /head/usr.bin/calendar/calendars/calendar.freebsd
add myself to calendar.freebsd

Requested by: mckusick
20:11:43 - r322415
(4 days 19 hours ago)
by emaste
Affects:  /head/share/mk/src.opts.mk
lldb: enable on i386

It is functional on FreeBSD/i386 as of r322326.

Sponsored by: The FreeBSD Foundation
19:49:29 - r322414
(4 days 19 hours ago)
by emaste
Affects:  /head/sys/arm/conf/NOTES
arm: enable ARM_MANY_BOARD in NOTES for LINT build

Added in r238189, ARM_MANY_BOARD adds support for multiple ARM boards in
a single kernel. Include it for LINT builds to avoid duplicate symbol
errors when linking with lld.

Sponsored by: The FreeBSD Foundation
19:24:08 - r322413
(4 days 19 hours ago)
by markj
Affects:  /head/sys/sys/kerneldump.h
Bump KERNELDUMP_BUFFER_SIZE to 4096.

The encrypted kernel dump code writes data in blocks of this size. A buffer
size of 4096 allows encrypted dumps to work with 4Kn drives.

Reviewed by: cem
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11870
19:21:40 - r322412
(4 days 19 hours ago)
by gjb
Affects: 
(4 files)
/head/Makefile.inc1
/head/release/packages/*
/head/share/mk/bsd.own.mk
Add SVNVERSION_CMD to bsd.own.mk, adding the capability to include
svnversion metadata to the runtime and kernel packages.

Instead of traversing src/sys, as is done by newvers.sh for uname(1),
a full tree walk is done to prevent userland and/or modifications
from not being reflected in a modified tree (M).

MFC after: 5 days
Sponsored by: The FreeBSD Foundation
19:02:11 - r322411
(4 days 20 hours ago)
by ian
Affects:  /head/sys/dev/xen/timer/timer.c
/head/sys/isa/rtc.h
/head/sys/x86/isa/atrtc.c
Stop calling atrtc_set() from the xen timer clock_settime() method. That
removes the only reference to atrtc_set() from outside of atrtc.c, so make
it static.

The xen timer driver registers as a realtime clock with 1us resolution. In
the past that resulted in only the xen timer's clock_settime() getting
called, so it would call atrtc_set() to set the hardware clock as well. As
of r32090, the clock_settime() method of all registered realtime clocks gets
called, so the xen driver no longer needs to chain-call the lower-resolution
driver.

Thanks to royger@ for talking me through the xen stuff, and for testing.
18:43:52 - r322410
(4 days 20 hours ago)
by ken
Affects:  /head/usr.bin/mt/mt.1
Add historical notes on QIC tape drives and fix a couple of issues in mt(1).

 o Density code 0x5 is also known as QIC-11, and should have a footnote
  reference.
 o Add notes on QIC tape drives from the bug report. These may help anyone
  trying to use a QIC drive.
 o Take out a "more more" instance found by igor.
 o Bump the man page date.

The PR is 14 years old, so it's past time to retire it.

PR: doc/53596
Submitted by: tedm@toybox.placo.com
Reviewed by: bcr
Sponsored by: Spectra Logic
18:09:26 - r322409
(4 days 21 hours ago)
by emaste
Affects:  /head/sys/arm/at91/at91_pmc.c
Rename at91_pmc's M_PMC malloc type to avoid duplicate definition

M_PMC is defined in sys/dev/hwpmc/hwpmc_mod.c, and the LINT kernel build
fails when linking with lld due to a duplicate symbol error.

Sponsored by: The FreeBSD Foundation
17:43:25 - r322408
(4 days 21 hours ago)
by davidcs
Affects: 
(4 files)
/head/sys/dev/qlnx/qlnxe/*
/head/sys/modules/qlnx/qlnxe/Makefile
Performance enhancements to reduce CPU utililization for large number of
TCP connections (order of tens of thousands), with predominantly Transmits.

Choice to perform receive operations either in IThread or Taskqueue Thread.

Submitted by:Vaishali.Kulkarni@cavium.com
MFC after:5 days
17:05:31 - r322407
(4 days 22 hours ago)
by rlibby
Affects:  /head/sys/libkern/x86/crc32_sse42.c
x86/crc32_sse42.c: quiet unused function warning

Reviewed by: cem
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11980
16:32:24 - r322406
(4 days 22 hours ago)
by markj
Affects:  /head/sys/kern/kern_sendfile.c
Have sendfile_swapin() use vm_page_grab_pages().

Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11942
16:29:22 - r322405
(4 days 22 hours ago)
by markj
Affects: 
(5 files)
/head/sys/kern/vfs_bio.c
/head/sys/sparc64/sparc64/pmap.c
/head/sys/vm/*
Modify vm_page_grab_pages() to handle VM_ALLOC_NOWAIT.

This will allow its use in sendfile_swapin().

Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11942
16:27:54 - r322404
(4 days 22 hours ago)
by alc
Affects:  /head/sys/kern/kern_sendfile.c
An invalid page can't be dirty.

Reviewed by: kib
MFC after: 1 week
14:19:55 - r322403
(5 days ago)
by royger
Affects:  /head/sys/x86/acpica/srat.c
acpi/srat: fix build without DMAP

Use pmap_mapbios to map memory used to store the cpus array.

Reported by: lwhsu
X-MFC-with: r322348
14:19:31 - r322402
(5 days ago)
by gjb
Affects:  /head/Makefile.inc1
Fix indentation from r322401.

MFC after: 3 days
MFC with: r322401
Sponsored by: The FreeBSD Foundation
14:18:11 - r322401
(5 days ago)
by gjb
Affects:  /head/Makefile.inc1
Avoid creating kernel-dbg.txz distribution sets and kernel-debug
packages when MK_DEBUG_FILES is 'no'.

MFC after: 5 days
Sponsored by: The FreeBSD Foundation
12:45:58 - r322400
(5 days 2 hours ago)
by andrew
Affects:  /head/sys/kern/subr_intr.c
Only return the current cpu if it's in the cpumask. When we restrict the
cpumask it probably means we are unable to sent interrupts to CPUs outside
the map. As such only return the current CPU when it's within the mask
otherwise return the first valid CPU.

This is needed on ThunderX as, in a dual socket configuration, we are
unable to send MSI/MSI-X interrupts between sockets.

Reviewed by: mmel
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11957
11:38:04 - r322399
(5 days 3 hours ago)
by kib
Affects: 
(2 files)
/stable/10/usr.sbin/pmcstat/pmcpl_gprof.c
MFC r322059:
Fix off by one in calculation of the number of buckets for the pc
addresses.

Approved by: re (marius)
10:59:34 - r322398
(5 days 4 hours ago)
by hselasky
Affects: 
(1295 files)
/projects/bsd_rdma_4_9/*
Merge ^/head r321383 through r322397.
10:44:40 - r322397
(5 days 4 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/page.h
/head/sys/compat/linuxkpi/common/src/linux_compat.c
Make sure the "vm_flags" and "vm_page_prot" fields get set correctly
in the VM area structure in the LinuxKPI when doing mmap() and that
unsupported bits are masked away.

While at it fix some redundant use of parenthesing inside some related
macros.

Found by: KrishnamRaju ErapaRaju <Krishna2@chelsio.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
10:08:18 - r322396
(5 days 5 hours ago)
by kib
Affects: 
(2 files)
/stable/11/usr.sbin/pmcstat/pmcpl_gprof.c
MFC r322059:
Fix off by one in calculation of the number of buckets for the pc
addresses.
10:05:41 - r322395
(5 days 5 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/sys/_termios.h
MFC r322050:
Relax visibility for some termios symbols.
07:29:50 - r322394
(5 days 7 hours ago)
by ed
Affects: 
(2 files)
/stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c
MFC r321924:

  Keep top page on CloudABI to work around AMD Ryzen stability issues.

  Similar to r321899, reduce sv_maxuser by one page inside of CloudABI.
  This ensures that the stack, the vDSO and any allocations cannot touch
  the top page of user virtual memory.

  Considering that CloudABI userspace is completely oblivious to virtual
  memory layout, don't bother making this conditional based on the CPU of
  the running system.
07:27:55 - r322393
(5 days 7 hours ago)
by avos
Affects: 
(2 files)
/stable/11/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8
MFC r322124:
rfcomm_pppd.8: fix a typo (SPD -> SDP).
03:59:48 - r322392
(5 days 11 hours ago)
by markj
Affects:  /head/sys/compat/linuxkpi/common/include/linux/pci.h
/head/sys/compat/linuxkpi/common/src/linux_pci.c
Add a specialized function for DRM drivers to register themselves.

Such drivers attach to a vgapci bus rather than directly to a pci bus. For
the rest of the LinuxKPI to work correctly in this case, we override the
vgapci bus' ivars with those of the grandparent.

Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11932
03:09:11 - r322391
(5 days 12 hours ago)
by markj
Affects:  /head/sys/vm/vm_kern.c
Micro-optimize kmem_unback().

We can remove some unnecessary object radix tree lookups by using the
object memq to iterate over pages in the specified range. This does not,
however, eliminate the lookup needed in vm_page_free_toq() to remove each
tree entry.

Reviewed by: alc, kib (previous revision)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11945
00:43:50 - r322390
(5 days 14 hours ago)
by marius
Affects:  /svnadmin/conf/approvers
Require explicit re@ approval for commits to stable/10,
as the code freeze for 10.4-RELEASE is now in effect.

Approved by: re (implicit)
00:41:43 - r322389
(5 days 14 hours ago)
by marius
Affects: 
(6 files)
/stable/10/sys/dev/mmc/*
MFC: r322209

- If available, use TRIM instead of ERASE for implementing BIO_DELETE.
  This also involves adding a quirk table as TRIM is broken for some
  Kingston eMMC devices, though. Compared to ERASE (declared "legacy"
  in the eMMC specification v5.1), TRIM has the advantage of operating
  on write sectors rather than on erase sectors, which typically are
  of a much larger size. Thus, employing TRIM, we don't need to fiddle
  with coalescing BIO_DELETE requests that are also of (write) sector
  units into erase sectors, which might not even add up in all cases.
- For some SanDisk iNAND devices, the CMD38 argument, e. g. ERASE,
  TRIM etc., has to be specified via EXT_CSD[113], which now is also
  handled via a quirk.
- My initial understanding was that for eMMC partitions, the granularity
  should be used as erase sector size, e. g. 128 KB for boot partitions.
  However, rereading the relevant parts of the eMMC specification v5.1,
  this isn't actually correct. So drop the code which used partition
  granularities for delmaxsize and stripesize. For the most part, this
  change is a NOP, though, because a) for ERASE, mmcsd_delete() used
  the erase sector size unconditionally for all partitions anyway and
  b) g_disk_limit() doesn't actually take the stripesize into account.
- Take some more advantage of mmcsd_errmsg() in mmcsd(4) for making
  error codes human readable.
00:41:19 - r322388
(5 days 14 hours ago)
by marius
Affects: 
(6 files)
/stable/11/sys/dev/mmc/*
MFC: r322209

- If available, use TRIM instead of ERASE for implementing BIO_DELETE.
  This also involves adding a quirk table as TRIM is broken for some
  Kingston eMMC devices, though. Compared to ERASE (declared "legacy"
  in the eMMC specification v5.1), TRIM has the advantage of operating
  on write sectors rather than on erase sectors, which typically are
  of a much larger size. Thus, employing TRIM, we don't need to fiddle
  with coalescing BIO_DELETE requests that are also of (write) sector
  units into erase sectors, which might not even add up in all cases.
- For some SanDisk iNAND devices, the CMD38 argument, e. g. ERASE,
  TRIM etc., has to be specified via EXT_CSD[113], which now is also
  handled via a quirk.
- My initial understanding was that for eMMC partitions, the granularity
  should be used as erase sector size, e. g. 128 KB for boot partitions.
  However, rereading the relevant parts of the eMMC specification v5.1,
  this isn't actually correct. So drop the code which used partition
  granularities for delmaxsize and stripesize. For the most part, this
  change is a NOP, though, because a) for ERASE, mmcsd_delete() used
  the erase sector size unconditionally for all partitions anyway and
  b) g_disk_limit() doesn't actually take the stripesize into account.
- Take some more advantage of mmcsd_errmsg() in mmcsd(4) for making
  error codes human readable.
00:01:22 - r322387
(5 days 15 hours ago)
by peter
Affects:  /vendor/sqlite3/sqlite-3200000
Tag import of sqlite-3.20.0
00:00:01 - r322386
(5 days 15 hours ago)
by peter
Affects: 
(11 files)
/head/contrib/sqlite3/*
Update from sqlite3-3.14.1 to sqlite3-3.20.0. This is a private lib.
This fixes a possible client-side crash when parsing corrupt databases.
2017 - 08 - 10   (6 days ago)
23:45:32 - r322385
(5 days 15 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
Fix the arguments for nfsrv_dsgetsockmnt() to handle mirrors.
23:39:20 - r322384
(5 days 15 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c
Fix up the arguments for nfsrv_dsgetsockmnt() to handle mirrors.
22:43:38 - r322383
(5 days 16 hours ago)
by markj
Affects:  /head/sys/vm/vm_page.c
Make vm_page_sunbusy() assert that the page is unlocked.

Reviewed by: kib
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11946
22:15:42 - r322382
(5 days 16 hours ago)
by peter
Affects: 
(10 files)
/vendor/sqlite3/dist/*
Import sqlite3-3.20.0
22:04:54 - r322381
(5 days 17 hours ago)
by peter
Affects:  /vendor/subversion/subversion-1.9.7
Tag subversion-1.9.7 import.
22:03:26 - r322380
(5 days 17 hours ago)
by peter
Affects: 
(25 files)
/head/contrib/subversion/*
Update subversion 1.9.5 -> 1.9.7

This includes a client-side fix for CVE-2017-9800.
22:00:08 - r322379
(5 days 17 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c
Add some handling of mirror limits.
21:57:59 - r322378
(5 days 17 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdstate.c
Add some handling of mirror limits.
21:48:34 - r322377
(5 days 17 hours ago)
by peter
Affects: 
(24 files)
/vendor/subversion/dist/*
Import subversion-1.9.7
21:39:22 - r322376
(5 days 17 hours ago)
by marius
Affects: 
(2 files)
/stable/10/usr.sbin/tzsetup/tzsetup.c
MFC: r322097, r322203

- Since r301131 (MFCed to stable/10 in r321895), /etc/localtime is also
  installed when selecting UTC in interactive configurations. Thus, the
  code added in r220172 which treats a NULL zone file name as UTC and
  removes /etc/localtime in that case can go again.
- Consistently refer to "could not delete" (as chosen by the oldest such
  code in here) when unlink(2) fails instead of a to mixture of "delete"
  and "unlink" in error messages.
21:39:10 - r322375
(5 days 17 hours ago)
by marius
Affects: 
(2 files)
/stable/11/usr.sbin/tzsetup/tzsetup.c
MFC: r322097, r322203

- Since r301131, /etc/localtime is also installed when selecting UTC in
  interactive configurations. Thus, the code added in r220172 which treats
  a NULL zone file name as UTC and removes /etc/localtime in that case can
  go again.
- Consistently refer to "could not delete" (as chosen by the oldest such
  code in here) when unlink(2) fails instead of a to mixture of "delete"
  and "unlink" in error messages.
20:26:07 - r322374
(5 days 18 hours ago)
by emaste
Affects:  /head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
bsdinstall: record DHCP config after obtaining lease

Previously we added an ifconfig_$INTERFACE line to rc.conf for each
unsuccessful DCHP attempt.

PR: 219515
Reviewed by: allanjude
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11967
19:42:30 - r322373
(5 days 19 hours ago)
by ian
Affects:  /head/sys/arm/ti/am335x/am335x_prcm.c
Ensure the clocks driver is attached before any drivers that need to enable
clocks in their attach().
17:46:57 - r322372
(5 days 21 hours ago)
by royger
Affects:  /head/sys/x86/acpica/madt.c
/head/sys/x86/x86/mptable.c
mptable: fix i386 build failure

Reported by: emaste
X-MFC-with: r322347
17:03:46 - r322371
(5 days 22 hours ago)
by pfg
Affects:  /head/lib/libc/tests/gen/fnmatch_testcases.h
fnmatch(3): Update testcase for r322368.
16:50:13 - r322370
(5 days 22 hours ago)
by oshogbo
Affects:  /head/lib/libutil/pidfile.c
Limit descriptors stored in the pidfh structure.

Reviewed by: markj, cem
Differential Revision: https://reviews.freebsd.org/D11741
16:45:05 - r322369
(5 days 22 hours ago)
by oshogbo
Affects:  /head/lib/libutil/pidfile.c
Store directory descriptor in the pidfh structure and use unlinkat(2)
function instead of unlink(2).

Now when pidfile_remove() uses unlinkat(2) to remove the pidfile
it is safe to use this function in capability mode.

Style fix: sort headers.

PR: 220524
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D11692
15:42:25 - r322368
(5 days 23 hours ago)
by pfg
Affects:  /head/lib/libc/gen/fnmatch.c
fnmatch(3): improve POSIX conformance.

In a recent interpretation[1], "\\" shall return a non-zero value
(indicating either no match or an error).

The fix involves a change over r254091 and now the behavior matches the
Sun/IBM/HP closed source implementations and also likely musl libc.

Submitted by: Joerg Schilling <joerg at schily.net>
MFC after: 1 week

[1] http://austingroupbugs.net/view.php?id=806
15:34:50 - r322367
(5 days 23 hours ago)
by ken
Affects: 
(3 files)
/stable/10/lib/libmt/mtlib.c
/stable/10/usr.bin/mt/mt.1
MFC r320991, r322016:

  ------------------------------------------------------------------------
  r320991 | ken | 2017-07-14 10:45:46 -0600 (Fri, 14 Jul 2017) | 17 lines

  Add IBM TS1155 density codes to libmt and the mt(1) man page.

  These are taken directly from the density report from a TS1155
  tape drive. (Using mt getdensity)

  lib/libmt/mtlib.c:
  Add 3592B5 encrypted/unencrypted density codes, and bpmm/bpi
  values. The bpmm/bpi values are the same as TS1150, but
  there are 50% more tracks.

  usr.bin/mt/mt.1:
  Add 3592B5 encrypted/unencrypted density codes, bpmm/bpi
  values and number of tracks. Bump the man page date.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r322016 | ken | 2017-08-03 09:04:54 -0600 (Thu, 03 Aug 2017) | 6 lines

  Oracle T10000 tape drives use PRML encoding.

  Source: Oracle T10000 SCSI reference guide.
  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
15:34:49 - r322366
(5 days 23 hours ago)
by ken
Affects: 
(3 files)
/stable/11/lib/libmt/mtlib.c
/stable/11/usr.bin/mt/mt.1
MFC r320991, r322016:

  ------------------------------------------------------------------------
  r320991 | ken | 2017-07-14 10:45:46 -0600 (Fri, 14 Jul 2017) | 17 lines

  Add IBM TS1155 density codes to libmt and the mt(1) man page.

  These are taken directly from the density report from a TS1155
  tape drive. (Using mt getdensity)

  lib/libmt/mtlib.c:
  Add 3592B5 encrypted/unencrypted density codes, and bpmm/bpi
  values. The bpmm/bpi values are the same as TS1150, but
  there are 50% more tracks.

  usr.bin/mt/mt.1:
  Add 3592B5 encrypted/unencrypted density codes, bpmm/bpi
  values and number of tracks. Bump the man page date.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r322016 | ken | 2017-08-03 09:04:54 -0600 (Thu, 03 Aug 2017) | 6 lines

  Oracle T10000 tape drives use PRML encoding.

  Source: Oracle T10000 SCSI reference guide.
  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
15:31:45 - r322365
(5 days 23 hours ago)
by rcyu
Affects:  /head/usr.bin/calendar/calendars/calendar.freebsd
 Add myself.

Reported by: mckusick
14:59:17 - r322364
(6 days ago)
by ken
Affects: 
(12 files)
/head/sys/dev/mpr/*
/head/sys/dev/mps/*
Changes to make mps(4) and mpr(4) handle reinit with reallocation.

When the mps(4) and mpr(4) drivers need to reinitialize the
firmware, they sometimes need to reallocate all of the memory
allocated by the driver. The reallocation happens whenever the IOC
Facts change. That should only happen after a firmware upgrade.

If the reinitialization happens as a result of a timed out command
sent to the card, the command that timed out and triggered the
reinit may have been freed if iocfacts_allocate() reallocated all
memory. If the caller attempts to access the command after that,
the kernel will panic because the caller will be dereferencing
freed memory.

The solution is to set a flag in the softc when we reallocate,
and avoid dereferencing the command strucure if we've reallocated.

The changes are largely the same in both drivers, since mpr(4) is a
derivative of mps(4).

 o In iocfacts_allocate(), if the IOC Facts have changed and we
  need to reallocate, set the REALLOCATED flag in the softc.

 o Change wait_command() to take a struct mps_command ** instead of
  a struct mps_command *. This allows us to NULL out the caller's
  command pointer if we have to reinit the controller and the data
  structures get reallocated. (The REALLOCATED flag will be set
  in the softc if that has happened.)

 o In every place that calls wait_command(), make sure we handle
  the case where the command is NULL after the call.

 o The mpr(4) driver has mpr_request_polled() which can also
  reinitialize the card. Also check for reallocation there.

Reviewed by: scottl, slm
MFC after: 1 week
Sponsored by: Spectra Logic
14:54:36 - r322363
(6 days ago)
by sbruno
Affects:  /head/sys/dev/e1000/if_em.h
Purge deprecated locking macros.

Submitted by: Matt Macy <matt@mattmacy.io>
Sponsored by: Limelight Networks
14:18:58 - r322362
(6 days ago)
by gjb
Affects:  /head/Makefile.inc1
Indent nested conditionals for readability.

Sponsored by: The FreeBSD Foundation
14:18:09 - r322361
(6 days ago)
by br
Affects: 
(32 files)
/head/*
Support for v1.10 (latest) of RISC-V privilege specification.

New version is not compatible on supervisor mode with v1.9.1
(previous version).

Highlights:
  o BBL (Berkeley Boot Loader) provides no initial page tables
  anymore allowing us to choose VM, to build page tables manually
  and enable MMU in S-mode.
  o SBI interface changed.
  o GENERIC kernel.
  FDT is now chosen standard for RISC-V hardware description.
  DTB is now provided by Spike (golden model simulator). This
  allows us to introduce GENERIC kernel. However, description
  for console and timer devices is not provided in DTB, so move
  these devices temporary to nexus bus.
  o Supervisor can't access userspace by default. Solution is to
  set SUM (permit Supervisor User Memory access) bit in sstatus
  register.
  o Compressed extension is now turned on by default.
  o External GCC 7.1 compiler used.
  o _gp renamed to __global_pointer$
  o Compiler -march= string is now in use allowing us to choose
  required extensions (compressed, FPU, atomic, etc).

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11800
13:51:04 - r322360
(6 days 1 hour ago)
by emaste
Affects: 
(4 files)
/head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/*
lldb: Report inferior signals as signals, not exceptions, on FreeBSD

This is the FreeBSD equivalent of LLVM r238549.

This serves 2 purposes:

* LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/
  SIGFPE the way it is suppose to be handled. Prior to this fix these
  signals will neither create a coredump, nor exit from the debugger
  or work for signal handling scenario.
* eInvalidCrashReason need not report "unknown crash reason" if we have
  a valid si_signo

llvm.org/pr23699

Patch by Karnajit Wangkhem

Differential Revision: https://reviews.llvm.org/D35223

Submitted by: Karnajit Wangkhem
Obtained from: LLVM r310591
13:45:56 - r322359
(6 days 1 hour ago)
by mw
Affects:  /head/sys/dev/ofw/ofw_fdt.c
Enable OF_setprop API function to add property in FDT

This patch modifies function ofw_fdt_setprop (called by OF_setprop),
so that it can add property, when replacing is not possible.
Adding property is needed to fixup FDT's that have missing
properties.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: nwhitehorn, cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11879
13:32:04 - r322358
(6 days 1 hour ago)
by gjb
Affects:  /head/release/packages/kernel.ucl
Further revise r322327 and r322352 in release/packages/kernel.ucl.

Use PPID and PID to kill off the pre-install and parent pkg(8)
processes unless 'Y' or 'y' are entered at the prompt if the user
wants to proceed with upgrading the kernel and userland at the same
time.

This restores some of the logic and intent of r322327, with the
caveat of printing "child process terminated unexpectedly."

MFC after: 5 days
MFC with: r322327, r322352
Sponsored by: The FreeBSD Foundation
13:05:40 - r322357
(6 days 2 hours ago)
by hselasky
Affects: 
(4 files)
/head/sys/compat/linuxkpi/common/include/linux/*
/head/sys/compat/linuxkpi/common/src/linux_compat.c
Use integer type to pass around jiffies and/or ticks values in the
LinuxKPI because in FreeBSD ticks are 32-bit.

MFC after: 1 week
Sponsored by: Mellanox Technologies
13:01:19 - r322356
(6 days 2 hours ago)
by emaste
Affects:  /head/share/mk/src.opts.mk
Mark PROFILE option as broken when targetting mips64

The assembly in sys/mips/include/profile.h will only work for o32 ABI.

Submitted by: Alexander Richardson
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11950
13:00:10 - r322355
(6 days 2 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/wait.h
Fixes for wait event in the LinuxKPI. These are regression issues
after r319757.

1) Correct the return value from __wait_event_common() from 1 to 0 in
case the timeout is specified as MAX_SCHEDULE_TIMEOUT. In the other
case __ret is zero and will be substituted in the last part of the
macro with the appropriate value before return.

2) Make sure the "timeout" argument is casted to "int" before
evaluating negativity. Else the signedness of a "long" might be
checked instead of the signedness of an integer.

3) The wait_event() function should not have a return value.

Found by: KrishnamRaju ErapaRaju <Krishna2@chelsio.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
12:51:04 - r322354
(6 days 2 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/src/linux_schedule.c
Make sure the linux_wait_event_common() function in the LinuxKPI properly
handles a timeout value of MAX_SCHEDULE_TIMEOUT which basically means there
is no timeout. This is a regression issue after r319757.

While at it change the type of returned variable from "long" to "int" to
match the actual return type.

MFC after: 1 week
Sponsored by: Mellanox Technologies
12:31:55 - r322353
(6 days 2 hours ago)
by oleg
Affects:  /head/usr.bin/calendar/calendars/calendar.freebsd
Add myself.

Reported by: mckusick
12:30:34 - r322352
(6 days 2 hours ago)
by gjb
Affects:  /head/release/packages/kernel.ucl
Revise part of r322327 in release/packages/kernel.ucl.

It appears I misunderstand process forking and signal handling in
how the pre-/post-install scripts are executed internally by pkg(8).
In some cases (not all), ^C when prompted to cancel the kernel
package update will stop the pre-install script from executing, but
allow pkg(8) to continue extracting the package when it is not the
intent.

In order to keep somewhat of an anti-footshooting measure in place,
print the recommendation to install the kernel package first if
ASSUME_ALWAYS_YES is false and TERM is set, then sleep for 5 seconds
to allow the user to see the message.

MFC after: 5 days
MFC with: r322327
X-MFC-Note: Maybe not until I am happy with this..
Sponsored by: The FreeBSD Foundation
10:59:05 - r322351
(6 days 4 hours ago)
by mav
Affects:  /head/usr.sbin/acpi/acpidump/acpi.c
Add two NFIT fields missed in r321298.

MFC after: 2 weeks
09:17:16 - r322350
(6 days 5 hours ago)
by royger
Affects:  /head/usr.bin/calendar/calendars/calendar.freebsd
calendars: add myself to the FreeBSD calendar

Reported by: mckusick
09:16:40 - r322349
(6 days 5 hours ago)
by royger
Affects: 
(4 files)
/head/sys/x86/acpica/madt.c
/head/sys/x86/include/apicvar.h
/head/sys/x86/x86/*
x86: bump MAX_APIC_ID to 512

Introduce a new define to take int account the xAPIC ID limit, for
systems where x2APIC is not available/reliable.

Also change some of the usages of the APIC ID to use an unsigned int
(which is the correct storage type to deal with x2APIC IDs as found in
x2APIC MADT entries).

This allows booting FreeBSD on a box with 256 CPUs and APIC IDs up to
295:

FreeBSD/SMP: Multiprocessor System Detected: 256 CPUs
FreeBSD/SMP: 1 package(s) x 64 core(s) x 4 hardware threads
Package HW ID = 0
  Core HW ID = 0
  CPU0 (BSP): APIC ID: 0
  CPU1 (AP/HT): APIC ID: 1
  CPU2 (AP/HT): APIC ID: 2
  CPU3 (AP/HT): APIC ID: 3
[...]
  Core HW ID = 73
  CPU252 (AP): APIC ID: 292
  CPU253 (AP/HT): APIC ID: 293
  CPU254 (AP/HT): APIC ID: 294
  CPU255 (AP/HT): APIC ID: 295

Submitted by: kib (previous version)
Relnotes: yes
MFC after: 1 month
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D11913
09:16:03 - r322348
(6 days 5 hours ago)
by royger
Affects: 
(6 files)
/head/sys/x86/acpica/*
/head/sys/x86/include/*
/head/sys/x86/x86/*
x86: make the arrays that depend on MAX_APIC_ID dynamic

So that MAX_APIC_ID can be bumped without wasting memory.

Note that the usage of MAX_APIC_ID in the SRAT parsing forces the
parser to allocate memory directly from the phys_avail physical memory
array, which is not the best approach probably, but I haven't found
any other way to allocate memory so early in boot. This memory is not
returned to the system afterwards, but at least it's sized according
to the maximum APIC ID found in the MADT table.

Sponsored by: Citrix Systems R&D
MFC after: 1 month
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D11912
09:15:18 - r322347
(6 days 5 hours ago)
by royger
Affects: 
(7 files)
/head/sys/x86/*
apic_enumerator: only set mp_ncpus and mp_maxid at probe cpus phase

Populate the lapics arrays and call cpu_add/lapic_create in the setup
phase instead. Also store the max APIC ID found in the newly
introduced max_apic_id global variable.

This is a requirement in order to make the static arrays currently
using MAX_LAPIC_ID dynamic.

Sponsored by: Citrix Systems R&D
MFC after: 1 month
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D11911
09:02:44 - r322346
(6 days 6 hours ago)
by kib
Affects: 
(2 files)
/stable/11/libexec/rtld-elf/rtld.c
MFC r321607:
Allow to specify targets by absolute paths in libmap.conf.

PR: 221032
09:00:15 - r322345
(6 days 6 hours ago)
by kib
Affects: 
(2 files)
/stable/11/lib/libc/x86/sys/__vdso_gettc.c
MFC r321608:
Use MFENCE to serialize RDTSC on non-Intel CPUs.
06:59:43 - r322344
(6 days 8 hours ago)
by delphij
Affects:  /releng/10.3/UPDATING
/releng/10.3/crypto/openssh/auth-passwd.c
/releng/10.3/sys/conf/newvers.sh
Fix OpenSSH Denial of Service vulnerability. [SA-17:06]

Approved by: so
06:59:26 - r322343
(6 days 8 hours ago)
by delphij
Affects: 
(4 files)
/releng/11.0/UPDATING
/releng/11.0/crypto/openssh/auth-passwd.c
/releng/11.0/sys/*
Fix OpenSSH Denial of Service vulnerability. [SA-17:06]

Fix VNET kernel panic with asynchronous I/O. [EN-17:07]

Approved by: so
06:59:07 - r322342
(6 days 8 hours ago)
by delphij
Affects: 
(5 files)
/releng/11.1/UPDATING
/releng/11.1/crypto/openssh/auth-passwd.c
/releng/11.1/sys/*
Fix OpenSSH Denial of Service vulnerability. [SA-17:06]

Fix VNET kernel panic with asynchronous I/O. [EN-17:07]

Fix pf(4) housekeeping thread causes kernel panic. [EN-17:08]

Approved by: so
06:36:37 - r322341
(6 days 8 hours ago)
by delphij
Affects:  /stable/10/crypto/openssh/auth-passwd.c
/stable/11/crypto/openssh/auth-passwd.c
Apply upstream fix:

Skip passwords longer than 1k in length so clients can't
easily DoS sshd by sending very long passwords, causing it to spend CPU
hashing them. feedback djm@, ok markus@.

Brought to our attention by tomas.kuthan at oracle.com, shilei-c at
360.cn and coredump at autistici.org

Security: CVE-2016-6515
Security: FreeBSD-SA-17:06.openssh
05:38:31 - r322340
(6 days 9 hours ago)
by dchagin
Affects: 
(8 files)
/stable/11/share/man/*
/stable/11/sys/*
MFC r321839:

Implement proper Linux /dev/fd and /proc/self/fd behavior by adding
Linux specific things to the native fdescfs file system.

Unlike FreeBSD, the Linux fdescfs is a directory containing a symbolic
links to the actual files, which the process has open.
A readlink(2) call on this file returns a full path in case of regular file
or a string in a special format (type:[inode], anon_inode:<file-type>, etc..).
As well as in a FreeBSD, opening the file in the Linux fdescfs directory is
equivalent to duplicating the corresponding file descriptor.

Here we have mutually exclusive requirements:
- in case of readlink(2) call fdescfs lookup() method should return VLNK
vnode otherwise our kern_readlink() fail with EINVAL error;
- in the other calls fdescfs lookup() method should return non VLNK vnode.

For what new vnode v_flag VV_READLINK was added, which is set if fdescfs has
beed
mounted with linrdlnk option an modified kern_readlinkat() to properly handle
it.

For now For Linux ABI compatibility mount fdescfs volume with linrdlnk option:

  mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D11452
05:35:45 - r322339
(6 days 9 hours ago)
by dchagin
Affects: 
(2 files)
/stable/11/sys/fs/fdescfs/fdesc.h
MFC r321460:

Replace unnecessary _KERNEL by double-include protection.
03:43:23 - r322338
(6 days 11 hours ago)
by sbruno
Affects:  /head/sys/net/iflib.c
Don't leak mbufs if clusers exceeds the number of segments. This would
leak mbufs over time causing crashes.

PR: 221202
Submitted by: Matt Macy <matt@mattmacy.io>
Reported by: gergely.czuczy@harmless.hu
Sponsored by: Limelight Networks
03:11:05 - r322337
(6 days 12 hours ago)
by sbruno
Affects:  /head/sys/net/iflib.c
Export IFCAP_HWSTATS so that we don't experience double stats counting
on iflib enabled devices.

PR: 220198
Submitted by: Matt Macy <matt@mattmacy.io>
Reported by: Ben Woods <woodsb02@freebsd.org>
Sponsored by: Limelight Networks
02:55:22 - r322336
(6 days 12 hours ago)
by sbruno
Affects:  /head/usr.bin/calendar/calendars/calendar.freebsd
Add sbruno@ birthday information.

Reported by: mckusick
02:15:40 - r322335
(6 days 12 hours ago)
by rlibby
Affects:  /head/usr.bin/calendar/calendars/calendar.freebsd
Add myself (rlibby) to calendar.freebsd

Reported by: mckusick
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D11947
00:39:02 - r322334
(6 days 14 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfs/nfs.h
/projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
Add support for mirrors to nfsrv_pnfscreate(), which creates the data storage
file(s) on the DS(s).
It also defines NFSDEV_MAXMIRRORS, which limits the number of mirror DSs
that can be configured for each DS.
00:33:33 - r322333
(6 days 14 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs.h
/projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c
Add support for mirrors to nfsrv_pnfscreate(), which creates the data storage
file(s) on the DS(s).
It also defines NFSDEV_MAXMIRRORS, which limits the number of mirror DSs
that can be configured for each DS.

 


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 28 ms, 246 revisions printed. Current time is 2017-08-16 15:12:54. All times are in UTC/GMT.