]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoUpdate to bmake-20200710
Simon J. Gerraty [Mon, 20 Jul 2020 00:17:08 +0000 (00:17 +0000)]
Update to bmake-20200710

Key changes include reduced noise at end of failed build log
and avoid evaluation of unnecessary terms in conditionals.
In META MODE; a target flagged .META is out-of-date if meta file
is missing

MFC of r361986, r363117

3 years agoMFC r362759 bhyve: implement NVMe SMART data I/O statistics
Chuck Tuffli [Sun, 19 Jul 2020 23:45:49 +0000 (23:45 +0000)]
MFC r362759 bhyve: implement NVMe SMART data I/O statistics

3 years agoMFC r362758 bhyve: validate NVMe deallocate range values
Chuck Tuffli [Sun, 19 Jul 2020 23:42:46 +0000 (23:42 +0000)]
MFC r362758 bhyve: validate NVMe deallocate range values

3 years agoMFC r362757 bhyve: base pci_nvme_ioreq size on advertised MDTS
Chuck Tuffli [Sun, 19 Jul 2020 23:40:34 +0000 (23:40 +0000)]
MFC r362757 bhyve: base pci_nvme_ioreq size on advertised MDTS

3 years agoMFC r362756 bhyve: refactor NVMe I/O read/write
Chuck Tuffli [Sun, 19 Jul 2020 23:37:19 +0000 (23:37 +0000)]
MFC r362756 bhyve: refactor NVMe I/O read/write

3 years agoMFC r362755 bhyve: implement NVMe Format NVM command
Chuck Tuffli [Sun, 19 Jul 2020 23:34:01 +0000 (23:34 +0000)]
MFC r362755 bhyve: implement NVMe Format NVM command

3 years agoMFC r362754 bhyve: make unsupported NVMe commands a debug message
Chuck Tuffli [Sun, 19 Jul 2020 23:29:34 +0000 (23:29 +0000)]
MFC r362754 bhyve: make unsupported NVMe commands a debug message

3 years agoMFC r362753 bhyve: add more compliant NVMe Get/Set Features
Chuck Tuffli [Sun, 19 Jul 2020 23:27:11 +0000 (23:27 +0000)]
MFC r362753 bhyve: add more compliant NVMe Get/Set Features

3 years agoMFC r362752 bhyve: fix NVMe queue creation and deletion
Chuck Tuffli [Sun, 19 Jul 2020 23:24:06 +0000 (23:24 +0000)]
MFC r362752 bhyve: fix NVMe queue creation and deletion

3 years agoMFC r362751 bhyve: fix NVMe Get Log Page command
Chuck Tuffli [Sun, 19 Jul 2020 23:20:57 +0000 (23:20 +0000)]
MFC r362751 bhyve: fix NVMe Get Log Page command

3 years agoMFC r362750 bhyve: implement NVMe Namespace Identification Descriptor
Chuck Tuffli [Sun, 19 Jul 2020 23:17:43 +0000 (23:17 +0000)]
MFC r362750 bhyve: implement NVMe Namespace Identification Descriptor

3 years agoMFC r362749 bhyve: Consolidate NVMe CQ update
Chuck Tuffli [Sun, 19 Jul 2020 22:58:11 +0000 (22:58 +0000)]
MFC r362749 bhyve: Consolidate NVMe CQ update

3 years agoMFC r362748 bhyve: add locks around NVMe queue accesses
Chuck Tuffli [Sun, 19 Jul 2020 22:55:52 +0000 (22:55 +0000)]
MFC r362748 bhyve: add locks around NVMe queue accesses

3 years agoMFC r362747 bhyve: add a comment explaining NVME dsm option
Chuck Tuffli [Sun, 19 Jul 2020 22:52:42 +0000 (22:52 +0000)]
MFC r362747 bhyve: add a comment explaining NVME dsm option

3 years agoMFC r362746 bhyve: implement NVMe Flush command
Chuck Tuffli [Sun, 19 Jul 2020 22:40:02 +0000 (22:40 +0000)]
MFC r362746 bhyve: implement NVMe Flush command

3 years agoMFC r362745 bhyve: refactor NVMe IO command handling
Chuck Tuffli [Sun, 19 Jul 2020 22:37:47 +0000 (22:37 +0000)]
MFC r362745 bhyve: refactor NVMe IO command handling

3 years agoMFC 362744 bhyve: convert NVMe logging statements
Chuck Tuffli [Sun, 19 Jul 2020 22:27:15 +0000 (22:27 +0000)]
MFC 362744 bhyve: convert NVMe logging statements

3 years agoMFC r362027 pci: loosen PCIe hot-plug requirements
Chuck Tuffli [Sun, 19 Jul 2020 22:23:54 +0000 (22:23 +0000)]
MFC r362027 pci: loosen PCIe hot-plug requirements

3 years agoMFC r362947
Pawel Biernacki [Sun, 19 Jul 2020 15:16:57 +0000 (15:16 +0000)]
MFC r362947

truss: print more information about traced sysctls

3 years agoMFC r362937: Use KERN_MAXPHYS.
Xin LI [Sun, 19 Jul 2020 01:59:56 +0000 (01:59 +0000)]
MFC r362937: Use KERN_MAXPHYS.

3 years agoMFC r362936: Gather writes to larger chunks (MAXPHYS) instead of issuing
Xin LI [Sat, 18 Jul 2020 23:05:16 +0000 (23:05 +0000)]
MFC r362936: Gather writes to larger chunks (MAXPHYS) instead of issuing
them in sectors.

3 years agoFix mismerge of r363038.
Konstantin Belousov [Sat, 18 Jul 2020 20:17:40 +0000 (20:17 +0000)]
Fix mismerge of r363038.

The reset of p to NULL for non-curproc was missed, cauing ESRCH error not
returned as it should be.

Reported by: lampa@fit.vutbr.cz
PR: 248070

3 years agoMFC r362708
Joerg Wunsch [Fri, 17 Jul 2020 22:04:58 +0000 (22:04 +0000)]
MFC r362708

Explain how to learn about possible recognized locale names

3 years agoMFC r363062: shmfd: make shm_size a vm_ooffset_t
Kyle Evans [Fri, 17 Jul 2020 14:17:13 +0000 (14:17 +0000)]
MFC r363062: shmfd: make shm_size a vm_ooffset_t

On 32-bit platforms, this expands the shm_size to a 64-bit quantity and
resolves a mismatch between the shmfd size and underlying vm_object size.
The implementation did not account for this kind of mismatch.

For compatibility's sake, the old shm_size has been replaced with
shm_oldsize (still popualted) and the new member appended to the end.

3 years agoMFC r363088: fix tests for install(1): add support for STRIPBIN's -o option.
Eugene Grosbein [Fri, 17 Jul 2020 06:52:03 +0000 (06:52 +0000)]
MFC r363088: fix tests for install(1): add support for STRIPBIN's -o option.

3 years agoFix a mismerge in r363243.
Mark Johnston [Thu, 16 Jul 2020 13:50:21 +0000 (13:50 +0000)]
Fix a mismerge in r363243.

This is a direct commit to stable/12.

Reported by: Jenkins

3 years agoMFC r363051, r363055:
Mark Johnston [Thu, 16 Jul 2020 13:38:20 +0000 (13:38 +0000)]
MFC r363051, r363055:
Avoid copying out kernel pointers from msgctl/semctl(IPC_STAT).

3 years agoMFC r363158:
Mark Johnston [Thu, 16 Jul 2020 13:37:11 +0000 (13:37 +0000)]
MFC r363158:
Add vm_map_valid_range_KBI().

3 years agoMFC r362952
Peter Grehan [Thu, 16 Jul 2020 03:05:10 +0000 (03:05 +0000)]
MFC r362952

Silence ACPI RTC error/warning in Linux guests.

3 years agoMFC r362644
Peter Grehan [Thu, 16 Jul 2020 02:53:13 +0000 (02:53 +0000)]
MFC r362644

Prevent calling USB backends multiple times.

3 years agoMFC r362233: newsyslog(8): make configuration parser more robust.
Eugene Grosbein [Wed, 15 Jul 2020 22:41:58 +0000 (22:41 +0000)]
MFC r362233: newsyslog(8): make configuration parser more robust.

3 years agoMFC r362634:
David Bright [Wed, 15 Jul 2020 17:34:08 +0000 (17:34 +0000)]
MFC r362634:

Add CAP_EVENT to pidfiles.

CAP_EVENT was omitted on pidfiles (in
pidfile_open()). There seems no reason why a process that creates
and writes a pidfile cannot monitor events on that file. This mod adds
the capability.

Sponsored by: Dell EMC Isilon

3 years agoMFC r363140:
Oleksandr Tymoshenko [Tue, 14 Jul 2020 18:31:00 +0000 (18:31 +0000)]
MFC r363140:

Fix invalid VHDX generation for image larger than 4Gb

- Part of BAT payload location was lost due to invalid
    BAT entry encoding type (32 bits instead of 64 bits)
- The sequence of PB/SB entries in BAT was broken due to
    off-by-one index check. It worked for smaller than
    4Gb because there were no SB entries in BAT.

3 years agoMFC r362811: Decode APEI tables (BERT, EINJ, ERST, HEST).
Alexander Motin [Tue, 14 Jul 2020 17:23:25 +0000 (17:23 +0000)]
MFC r362811: Decode APEI tables (BERT, EINJ, ERST, HEST).

3 years agoMFC r362997:
Cy Schubert [Tue, 14 Jul 2020 13:21:09 +0000 (13:21 +0000)]
MFC r362997:

Update sqlite to 3.32.3 (3320300).

Release Announcement: https://www.sqlite.org/releaselog/3_32_3.html
See also: ports r541414

PR: 247819
Reported by: Pavel Volkov <pavelivolkov at gmail.com>

3 years agoMFC r362516:
Oleksandr Tymoshenko [Tue, 14 Jul 2020 05:24:07 +0000 (05:24 +0000)]
MFC r362516:

Fix crash in drill(1) when IP has two subsequent dots

Cherry-pick crash fix from the upstream repo

PR: 226575
Reported by: Goran Mekić <meka@tilda.center>
Obtained from: https://git.nlnetlabs.nl/ldns/commit/?id=98291475

3 years agoiovctl(8): Correct a typo in the manpage and correct the SYNOPSIS
Gordon Bergling [Mon, 13 Jul 2020 19:28:10 +0000 (19:28 +0000)]
iovctl(8): Correct a typo in the manpage and correct the SYNOPSIS

PR: 246831
Submitted by: Jose Luis Duran <jlduran at gmail dot com>
Reviewed by: bcr (mentor)
Approved by: bcr (mentor)

3 years agoMFC r358995 (by pkelsey): Fix iflib freelist state corruption
Alexander Motin [Mon, 13 Jul 2020 17:20:20 +0000 (17:20 +0000)]
MFC r358995 (by pkelsey): Fix iflib freelist state corruption

This fixes a bug in iflib freelist management that breaks the required
correspondence between freelist indexes and driver ring slots.

PR: 243126, 243392, 240628

3 years agoMFC r362970, r362971:
Mark Johnston [Mon, 13 Jul 2020 16:43:23 +0000 (16:43 +0000)]
MFC r362970, r362971:
Permit cpuset_(get|set)domain() in capability mode.

3 years agoMFC r362968:
Mark Johnston [Mon, 13 Jul 2020 16:42:30 +0000 (16:42 +0000)]
MFC r362968:
Allow accesses of the caller's CPU and domain sets in capability mode.

3 years agoMFC r362966:
Mark Johnston [Mon, 13 Jul 2020 16:41:58 +0000 (16:41 +0000)]
MFC r362966:
Lift cpuset Capsicum checks into a subroutine.

3 years agoMFC r362781 and r362794:
Hans Petter Selasky [Mon, 13 Jul 2020 15:40:55 +0000 (15:40 +0000)]
MFC r362781 and r362794:
Implement is_signed(), type_max() and type_min() function macros in the
LinuxKPI.

Sponsored by: Mellanox Technologies

3 years agoMFC r362829:
Hans Petter Selasky [Mon, 13 Jul 2020 15:36:57 +0000 (15:36 +0000)]
MFC r362829:
The "pid" field in the LinuxKPI task struct is typically set to the thread ID
and not the process ID. Make sure the linux_task_exiting() function uses tdfind()
to lookup the BSD procedure structure pointer by the "pid" field, and only
fallback to pfind() when no match is found! This makes linux_task_exiting()
in line with the rest of the code.

Differential Revision: https://reviews.freebsd.org/D25509
Submitted by: Greg V <greg@unrelenting.technology>
Sponsored by: Mellanox Technologies

3 years agoMFC r362953:
Hans Petter Selasky [Mon, 13 Jul 2020 15:33:06 +0000 (15:33 +0000)]
MFC r362953:
Infiniband clients must be attached and detached in a specific order in ibcore.

Currently the linking order of the infiniband, IB, modules decide in which
order the clients are attached and detached. For example one IB client may
use resources from another IB client. This can lead to a potential deadlock
at shutdown. For example if the ipoib is unregistered after the ib_multicast
client is detached, then if ipoib is using multicast addresses a deadlock may
happen, because ib_multicast will wait for all its resources to be freed before
returning from the remove method.

Fix this by using module_xxx_order() instead of module_xxx().

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

3 years agoMFC r362946:
Hans Petter Selasky [Mon, 13 Jul 2020 15:28:06 +0000 (15:28 +0000)]
MFC r362946:
Fix include file order in io.h in the LinuxKPI.
Make sure sys/types.h is included before machine/vm.h.

PR: 247775
Submitted by: pkubaj@
Sponsored by: Mellanox Technologies

3 years agoMFC 362491:
Mateusz Piotrowski [Sun, 12 Jul 2020 19:39:17 +0000 (19:39 +0000)]
MFC 362491:

Improve the rcorder manual page

- Fix formatting issues such as:
  - Use Ql instead of Dq Li as Li is deprecated
  - Address some mandoc warnings
- Add arguments missing from the list of options (i.e., document "-k keep"
  instead of just "-k").
- Document that -k and -s can be specified multiple times
- Use sshd instead of named for the example in the BUGS section, as named
  is not in the base system. Also, use Nm instead of Xr there as it is not
  the sshd binary that is required to be running, but the service.
- Use Sy instead of Cm for KEYWORDS. Cm is reserved for command-line
  modifiers of the CLI.
- Add an EXAMPLES section
- Cross-reference service(8).

3 years agoMFC r340655
Thomas Munro [Sun, 12 Jul 2020 10:07:01 +0000 (10:07 +0000)]
MFC r340655
  pom: Fix fencepost bugs.

PR: 231705
Submitted by:   Andrew Gierth <andrew@tao11.riddles.org.uk>
Approved by: allanjude (mentor)

3 years agoMFC r344656
Thomas Munro [Sun, 12 Jul 2020 09:49:53 +0000 (09:49 +0000)]
MFC r344656
  truss: Add support for fsync(2) and fdatasync(2).

Approved by:    mjg (mentor)
Differential Revision:  https://reviews.freebsd.org/D19295

3 years agoMFC r362942: shutdown.8: Fix typo
Niclas Zeising [Sun, 12 Jul 2020 07:25:02 +0000 (07:25 +0000)]
MFC r362942: shutdown.8: Fix typo

Fix a typo in shutdown.8, use ',' instead of '.' when listing items.

3 years agoMFC r350162:
Ganbold Tsagaankhuu [Sat, 11 Jul 2020 16:38:46 +0000 (16:38 +0000)]
MFC r350162:

Add emmc support for Rockchip RK3399 SoC.
Tested on NanoPC-T4 board.

3 years agoMFC r362396
Allan Jude [Sat, 11 Jul 2020 15:57:46 +0000 (15:57 +0000)]
MFC r362396
  ZFS: Allow setting checksum=skein on boot pools

PR: 245889
Reported by: delphij
Sponsored by: Klara Inc.
Event: July 2020 Bugathon

3 years agoMFC r346369
Allan Jude [Sat, 11 Jul 2020 14:55:11 +0000 (14:55 +0000)]
MFC r346369
  Close filedescriptors when done with them.

MFC r362412
  fix -c flag to work with input on stdin

PR: 247295
Sponsored by: Klara Inc.
Event: July 2020 Bugathon

3 years agoMFC r363013:
Dimitry Andric [Sat, 11 Jul 2020 09:43:16 +0000 (09:43 +0000)]
MFC r363013:

Merge commit 065fc1eafe7c from llvm git (by Richard Smith):

  PR45521: Preserve the value kind when performing a standard
  conversion sequence on a glvalue expression.

  If the sequence is supposed to perform an lvalue-to-rvalue
  conversion, then one will be specified as the first conversion in the
  sequence. Otherwise, one should not be invented.

This should fix clang crashing with "can't implicitly cast lvalue to
rvalue with this cast kind", followed by "UNREACHABLE executed at
/usr/src/contrib/llvm-project/clang/lib/Sema/Sema.cpp:538!", when
building recent versions of Ceph, and the CPAN module SYBER/Date-5.2.0.

Reported by: Willem Jan Withagen <wjw@digiware.nl>, eserte12@yahoo.de
PR: 245530, 247812

3 years agoMFC r362622
Vincenzo Maffione [Fri, 10 Jul 2020 18:30:53 +0000 (18:30 +0000)]
MFC r362622

iflib: netmap: add support for partial ring openings

Reviewed by:    gallatin
Differential Revision:  https://reviews.freebsd.org/D25254

3 years agoMFC r362633, r362633
Vincenzo Maffione [Fri, 10 Jul 2020 18:19:04 +0000 (18:19 +0000)]
MFC r362633, r362633

iflib: netmap: add per-tx-queue netmap support

Reviewed by:    gallatin
Differential Revision:  https://reviews.freebsd.org/D25253

3 years agoMFC r362612
Pawel Biernacki [Thu, 9 Jul 2020 20:54:16 +0000 (20:54 +0000)]
MFC r362612

bhyve: allow for automatic destruction on power-off

3 years agoMFC of 362560
Kirk McKusick [Thu, 9 Jul 2020 19:11:57 +0000 (19:11 +0000)]
MFC of 362560

Correctly describe libufs library sbget() and sbput() return values.

3 years agoMFC r362738: sh/tests: Re-enable bin.sh.execution.functional_test.bg12.0
Jilles Tjoelker [Thu, 9 Jul 2020 17:43:25 +0000 (17:43 +0000)]
MFC r362738: sh/tests: Re-enable bin.sh.execution.functional_test.bg12.0

PR: 247559

3 years agoMFC r362737: sh/tests: Fix flaky execution/bg12.0
Jilles Tjoelker [Thu, 9 Jul 2020 17:42:31 +0000 (17:42 +0000)]
MFC r362737: sh/tests: Fix flaky execution/bg12.0

When job control is not enabled, the shell ignores SIGINT while waiting for
a foreground process unless that process exits on SIGINT. In this case, the
foreground process is sleep and it does not exit on SIGINT because the
signal is only sent to the shell. Depending on order of events, this could
cause the SIGINT to be unexpectedly ignored.

On lightly loaded bare metal, the chance of this happening tends to be less
than 0.01% but with higher loads and/or virtualization it becomes more
likely.

Starting the sleep in background and using the wait builtin ensures SIGINT
will not be ignored.

PR: 247559
Reported by: lwhsu

3 years agoMFC r362112
Andrew Gallatin [Thu, 9 Jul 2020 17:10:18 +0000 (17:10 +0000)]
MFC r362112
x86: Bump default msi/msix vector limit to 2048

3 years agoMFC r362979:
Brooks Davis [Thu, 9 Jul 2020 16:58:53 +0000 (16:58 +0000)]
MFC r362979:

Fix a -Wvoid-pointer-to-enum-cast warning missed in r359978.

This pattern is used in callbacks with void * data arguments and seems
both relatively uncommon and relatively harmless.  Silence the warning
by casting through uintptr_t.

This warning is on by default in Clang 11.

Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24425

3 years agoMFC r362497:
Mark Johnston [Thu, 9 Jul 2020 14:42:41 +0000 (14:42 +0000)]
MFC r362497:
Move the definition of SCTP's system_base_info into sctp_crc32.c.

3 years agoMFC r362614, r362618:
Mark Johnston [Thu, 9 Jul 2020 14:18:14 +0000 (14:18 +0000)]
MFC r362614, r362618:
Add SCTP_SUPPORT handling to config.mk.

3 years agoMFC r362619:
Mark Johnston [Thu, 9 Jul 2020 14:17:04 +0000 (14:17 +0000)]
MFC r362619:
ipfw: Support the literal IPv6 address syntax in the fwd command.

3 years agoMFC r362887:
Konstantin Belousov [Thu, 9 Jul 2020 10:54:00 +0000 (10:54 +0000)]
MFC r362887:
mlx5_core: remove unneccessary LFENCE instruction.

3 years agoMFC r362886:
Konstantin Belousov [Thu, 9 Jul 2020 10:52:02 +0000 (10:52 +0000)]
MFC r362886:
linuxkpi: improvements for linux_pid_task() and linux_get_pid_task().

3 years agoMFC r362885:
Konstantin Belousov [Thu, 9 Jul 2020 10:50:06 +0000 (10:50 +0000)]
MFC r362885:
Use tdfind() in pget().

3 years agoMFC r362824:
Ryan Moeller [Thu, 9 Jul 2020 09:33:32 +0000 (09:33 +0000)]
MFC r362824:

libifconfig: Add function to get bridge status

The new function operates similarly to ifconfig_lagg_get_lagg_status and
likewise is accompanied by a function to free the bridge status data structure.

I have included in this patch the relocation of some strings describing STP
parameters and the PV2ID macro from ifconfig into net/if_bridgevar.h as they
are useful for consumers of libifconfig.

Reviewed by:    kp, melifaro, mmacy
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D25460

3 years agoMFC r361798, r361800: vfs: default disallow read(2) of a directory
Kyle Evans [Wed, 8 Jul 2020 18:29:06 +0000 (18:29 +0000)]
MFC r361798, r361800: vfs: default disallow read(2) of a directory

This MFC is in accordance with the original MFC plan outlined in the commit
message for r361798, appearing in full (with exception to metadata) below.

To summarize: this MFC only merges back the sysctl with a default disallow
policy, as in head, to ensure we hit any issues quickly but in a fashion
that end users can easily revert. Interested parties can flip the
security.bsd.allow_read_dir sysctl back to 1 to fully honor the previous
behavior of allowing read(2) of any dir, filesystem permitting.

r361798:
vfs: add restrictions to read(2) of a directory [1/2]

Historically, we've allowed read() of a directory and some filesystems will
accommodate (e.g. ufs/ffs, msdosfs). From the history department staffed by
Warner: <<EOF

pdp-7 unix seemed to allow reading directories, but they were weird, special
things there so I'm unsure (my pdp-7 assembler sucks).

1st Edition's sources are lost, mostly. The kernel allows it. The
reconstructed sources from 2nd or 3rd edition read it though.

V6 to V7 changed the filesystem format, and should have been a warning, but
reading directories weren't materially changed.

4.1b BSD introduced readdir because of UFS. UFS broke all directory reading
programs in 1983. ls, du, find, etc all had to be rewritten. readdir() and
friends were introduced here.

SysVr3 picked up readdir() in 1987 for the AT&T fork of Unix. SysVr4 updated
all the directory reading programs in 1988 because different filesystem
types were introduced.

In the 90s, these interfaces became completely ubiquitous as PDP-11s running
V7 faded from view and all the folks that initially started on V7 upgraded
to SysV. Linux never supported this (though I've not done the software
archeology to check) because it has always had a pathological diversity of
filesystems.
EOF

Disallowing read(2) on a directory has the side-effect of masking
application bugs from relying on other implementation's behavior
(e.g. Linux) of rejecting these with EISDIR across the board, but allowing
it has been a vector for at least one stack disclosure bug in the past[0].

By POSIX, this is implementation-defined whether read() handles directories
or not. Popular implementations have chosen to reject them, and this seems
sensible: the data you're reading from a directory is not structured in some
unified way across filesystem implementations like with readdir(2), so it is
impossible for applications to portably rely on this.

With this patch, we will reject most read(2) of a dirfd with EISDIR. Users
that know what they're doing can conscientiously set
bsd.security.allow_read_dir=1 to allow read(2) of directories, as it has
proven useful for debugging or recovery. A future commit will further limit
the sysctl to allow only the system root to read(2) directories, to make it
at least relatively safe to leave on for longer periods of time.

While we're adding logic pertaining to directory vnodes to vn_io_fault, an
additional assertion has also been added to ensure that we're not reaching
vn_io_fault with any write request on a directory vnode. Such request would
be a logical error in the kernel, and must be debugged rather than allowing
it to potentially silently error out.

Commented out shell aliases have been placed in root's chsrc/shrc to promote
awareness that grep may become noisy after this change, depending on your
usage.

A tentative MFC plan has been put together to try and make it as trivial as
possible to identify issues and collect reports; note that this will be
strongly re-evaluated. Tentatively, I will MFC this knob with the default as
it is in HEAD to improve our odds of actually getting reports. The future
priv(9) to further restrict the sysctl WILL NOT BE MERGED BACK, so the knob
will be a faithful reversion on stable/12. We will go into the merge
acknowledging that the sysctl default may be flipped back to restore
historical behavior at *any* point if it's warranted.

[0] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:10.ufs.asc

r361800:
RELNOTES and UPDATING: Document the new policy on read(2) of dirfd

These changes have been completely flushed as of r361799; note it.

PR: 246412
Relnotes: yes 100%

3 years agoMFC r346386, r347890, r347896, r349895:
Alexander Motin [Wed, 8 Jul 2020 17:59:00 +0000 (17:59 +0000)]
MFC r346386, r347890, r347896, r349895:
remove the 4GB boundary requirement on PCI DMA segments

3 years agoMFC r362948:
Konstantin Belousov [Wed, 8 Jul 2020 10:04:12 +0000 (10:04 +0000)]
MFC r362948:
Fix typo.

3 years agoMFC r362580: TCP: fix cubic RTO reaction.
Richard Scheffenegger [Wed, 8 Jul 2020 09:04:20 +0000 (09:04 +0000)]
MFC r362580: TCP: fix cubic RTO reaction.

Proper TCP Cubic operation requires the knowledge
of the maximum congestion window prior to the
last congestion event.

This restores and improves a bugfix previously added
by jtl@ but subsequently removed due to a revert.

Reported by: chengc_netapp.com
Reviewed by: chengc_netapp.com, tuexen (mentor)
Approved by: tuexen (mentor), rgrimes (mentor, blanket)
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D25133

3 years agoMFC r362577: TCP: make after-idle work for transactional sessions.
Richard Scheffenegger [Wed, 8 Jul 2020 09:00:05 +0000 (09:00 +0000)]
MFC r362577: TCP: make after-idle work for transactional sessions.

The use of t_rcvtime as proxy for the last transmission
fails for transactional IO, where the client requests
data before the server can respond with a bulk transfer.

Set aside a dedicated variable to actually track the last
locally sent segment going forward.

Reported by: rrs
Reviewed by: rrs, tuexen (mentor)
Approved by: tuexen (mentor), rgrimes (mentor, blanket)
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D25016

3 years agoMFC r362779: gre(4): Add a STANDARDS section
Gordon Bergling [Tue, 7 Jul 2020 18:37:06 +0000 (18:37 +0000)]
MFC r362779: gre(4): Add a STANDARDS section

Expand the mentioned RFC in the SEE ALSO section
and reference RFC1701 and RFC1702.

PR: 240250
Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D25504

3 years agoMFC r362539:
Li-Wen Hsu [Tue, 7 Jul 2020 06:04:21 +0000 (06:04 +0000)]
MFC r362539:

Mention CI system information in development(7)

Approved by: 0mp, bcr
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25340

3 years agoMFC r362788:
Mitchell Horne [Mon, 6 Jul 2020 15:00:28 +0000 (15:00 +0000)]
MFC r362788:

Fix printf(3) output of long doubles on RISC-V

PR: 242067

3 years agoMFC r362338:
Mark Johnston [Mon, 6 Jul 2020 14:00:20 +0000 (14:00 +0000)]
MFC r362338:
Add the SCTP_SUPPORT kernel option.

3 years agoMFC r362739:
Mark Johnston [Mon, 6 Jul 2020 13:54:44 +0000 (13:54 +0000)]
MFC r362739:
Remove some redundant assignments and computations.

3 years agoMFC r362496, r362592:
Mark Johnston [Mon, 6 Jul 2020 13:54:18 +0000 (13:54 +0000)]
MFC r362496, r362592:
acpi_ibm(4): Add support for putting fans in disengaged mode.

PR: 247306

3 years agoMFC 362676:
Mateusz Piotrowski [Mon, 6 Jul 2020 09:04:06 +0000 (09:04 +0000)]
MFC 362676:

Fix trailing-comma-related typos in the tree when the Xr macro is used

3 years agoMFC r362711:
Konstantin Belousov [Sun, 5 Jul 2020 06:50:22 +0000 (06:50 +0000)]
MFC r362711:
top: do not try to use sysctl machdep.smp_active.

3 years agoMFC r362502,r362503: network.subr, rc.conf: unobsolete gif_interfaces.
Eugene Grosbein [Sat, 4 Jul 2020 15:16:48 +0000 (15:16 +0000)]
MFC r362502,r362503: network.subr, rc.conf: unobsolete gif_interfaces.

There are cases when gif_interfaces cannot be replaced
with cloned_interfaces, such as tunnels with external IPv6 addresses
and internal IPv4 or vice versa. Such configuration requires
extra invocation of ifconfig(8) and supported with gif_interfaces only.

3 years agoMFC r362672:
Li-Wen Hsu [Sat, 4 Jul 2020 09:18:19 +0000 (09:18 +0000)]
MFC r362672:

rtwn: Add a USB ID for Buffalo WI-U2-433DHP

PR: 247573
Submitted by: HATANO Tomomi <hatanou@infolab.ne.jp>

3 years agoMFC r362706:
Konstantin Belousov [Sat, 4 Jul 2020 08:34:43 +0000 (08:34 +0000)]
MFC r362706:
amd64 pmap: explain ptepindex.

3 years agoMFC r362770:
Hiroki Sato [Sat, 4 Jul 2020 07:04:56 +0000 (07:04 +0000)]
MFC r362770:

Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS.

PR: 163168

3 years agoMFC r362705 and r362707:
Piotr Pawel Stefaniak [Sat, 4 Jul 2020 06:34:55 +0000 (06:34 +0000)]
MFC r362705 and r362707:
ps(1): reuse keyword "cpu" to show CPU number
ps(1): don't try to handle non-SMP systems

3 years agoBump __FreeBSD_version after making liblzma to use libmd implementation
Xin LI [Sat, 4 Jul 2020 03:27:51 +0000 (03:27 +0000)]
Bump __FreeBSD_version after making liblzma to use libmd implementation
of SHA256.

3 years agoMFC r362452, r362478: liblzma: Make liblzma use libmd implementation of SHA256.
Xin LI [Sat, 4 Jul 2020 03:26:17 +0000 (03:26 +0000)]
MFC r362452, r362478: liblzma: Make liblzma use libmd implementation of SHA256.

3 years agoMFC r362611
Pawel Biernacki [Fri, 3 Jul 2020 11:44:43 +0000 (11:44 +0000)]
MFC r362611

man page of select(2) should mention pselect(2)

Reviewed by: bcr (manpages), kib, trasz
Approved by: kib (mentor)
MFC after: 7 days
Sponsored by: Mysterious Code Ltd.

3 years agoMFC r362642: Don't log normal login_getpwclass(3) result.
Xin LI [Fri, 3 Jul 2020 07:22:34 +0000 (07:22 +0000)]
MFC r362642: Don't log normal login_getpwclass(3) result.

3 years agoMFC r362379:
Tom Jones [Thu, 2 Jul 2020 18:40:22 +0000 (18:40 +0000)]
MFC r362379:

Fix typo in apic.4

Reviewed by:    bcr (manpages)
Approved by:    jtl (co-mentor)
Differential Revision:  https://reviews.freebsd.org/D2535

3 years agoMFC 362324:
Mateusz Piotrowski [Thu, 2 Jul 2020 16:16:01 +0000 (16:16 +0000)]
MFC 362324:

Clean up and improve manual page for fuser(1)

- Mention option's arguments in the list of options (so that now we mention
  "-N system" instead of just "-N").
- Stylize signals and other constants like O_APPEND with Dv.
- Sort options.
- Change indentation width for readability.
- Fix a couple of typos.
- Sort symbols list.
- Use Sy instead of Cm for symbols. They are not command modifiers.
- Use Ex -std in the EXIT STATUS section for consistency with other manual
  pages.
- Use Ql instead of Dq Li for inline code examples as Li has recently been
  deprecated by mdoc.

Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D25332

3 years agoMFC 362325:
Mateusz Piotrowski [Thu, 2 Jul 2020 16:12:52 +0000 (16:12 +0000)]
MFC 362325:

Fix the --guid flag description

3 years agoMFC 362321:
Mateusz Piotrowski [Thu, 2 Jul 2020 16:10:34 +0000 (16:10 +0000)]
MFC 362321:

Improve periodic(8) manual page presentation

- Update synopsis to present all available arguments.
- Consistently call the argument specifying an arbitrary directory a
  "directory".
- Do not put macros into -width argument to Bl. They do not expand there.
- Stylize command modifiers like "daily" with Cm instead of Pa. While
  technically periodic(8) operates on directories with such names, it is
  confusing from the perspective of the manual page reader as Pa and Ar are
  stylized the same way. Also, I cannot recall a single manual page where
  Pa would be used to describe the syntax of command-line arguments.

3 years agoMFC r362630: Fix few panics on NVMe's timing out initialization requests.
Alexander Motin [Thu, 2 Jul 2020 01:02:40 +0000 (01:02 +0000)]
MFC r362630: Fix few panics on NVMe's timing out initialization requests.

3 years agoMFC r349893:
Michael Tuexen [Wed, 1 Jul 2020 23:47:51 +0000 (23:47 +0000)]
MFC r349893:

This commit updates rack to what is basically being used at NF as
well as sets in some of the groundwork for committing BBR. The
hpts system is updated as well as some other needed utilities
for the entrance of BBR. This is actually part 1 of 3 more
needed commits which will finally complete with BBRv1 being
added as a new tcp stack.

Merge conflics were manually resolved.

Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D20834

3 years agoMFC r356796:
Michael Tuexen [Wed, 1 Jul 2020 22:31:37 +0000 (22:31 +0000)]
MFC r356796:
Remove debug code not needed anymore.

Submitted by: rscheff
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D23208

3 years agoMFC r356663:
Michael Tuexen [Wed, 1 Jul 2020 22:22:26 +0000 (22:22 +0000)]
MFC r356663:

Fix race when accepting TCP connections.

When expanding a SYN-cache entry to a socket/inp a two step approach was
taken:
1) The local address was filled in, then the inp was added to the hash
   table.
2) The remote address was filled in and the inp was relocated in the
   hash table.
Before the epoch changes, a write lock was held when this happens and
the code looking up entries was holding a corresponding read lock.
Since the read lock is gone away after the introduction of the
epochs, the half populated inp was found during lookup.
This resulted in processing TCP segments in the context of the wrong
TCP connection.
This patch changes the above procedure in a way that the inp is fully
populated before inserted into the hash table.

Thanks to Paul <devgs@ukr.net> for reporting the issue on the net@
mailing list and for testing the patch!

Reviewed by: rrs@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D22971

3 years agoMFC r356660:
Michael Tuexen [Wed, 1 Jul 2020 22:00:35 +0000 (22:00 +0000)]
MFC r356660:
Fix division by zero issue.

Thanks to Stas Denisov for reporting the issue for the userland stack
and providing a fix.

3 years agoMFC r356378:
Michael Tuexen [Wed, 1 Jul 2020 21:59:18 +0000 (21:59 +0000)]
MFC r356378:
Don't mark the sendall iterator as being up if it could not be started.