]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoMFC r356170:
Edward Tomasz Napierala [Sun, 23 Aug 2020 22:47:08 +0000 (22:47 +0000)]
MFC r356170:

Implement Linux BLKGETSIZE64 ioctl.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r360671:
Michael Tuexen [Sun, 23 Aug 2020 22:40:38 +0000 (22:40 +0000)]
MFC r360671:
Avoid underflowing a variable, which would result in taking more
data from the stream queues then needed.

Thanks to Timo Voelker for finding this bug and providing a fix.

3 years agoMFC r360662:
Michael Tuexen [Sun, 23 Aug 2020 22:39:06 +0000 (22:39 +0000)]
MFC r360662:
Fix the computation of the numbers of entries of the mapping array to
look at when generating a SACK. This was wrong in case of sequence
numbers wrap arounds.

Thanks to Gwenael FOURRE for reporting the issue for the userland stack:
https://github.com/sctplab/usrsctp/issues/462

3 years agoMFC r360209:
Michael Tuexen [Sun, 23 Aug 2020 22:35:52 +0000 (22:35 +0000)]
MFC r360209:
Improve input validation when processing AUTH chunks.

Thanks to Natalie Silvanovich from Google for finding and reporting the
issue found by her in the SCTP userland stack.

3 years agoMFC r360193:
Michael Tuexen [Sun, 23 Aug 2020 22:34:15 +0000 (22:34 +0000)]
MFC r360193:
Improve input validation when processing AUTH chunks.

Thanks to Natalie Silvanovich from Google for finding and reporting the
issue found by her in the SCTP userland stack.

3 years agoMFC r359657:
Michael Tuexen [Sun, 23 Aug 2020 22:30:52 +0000 (22:30 +0000)]
MFC r359657:
Do more argument validation under INVARIANTS when starting/stopping
an SCTP timer.

3 years agoMFC r359410:
Michael Tuexen [Sun, 23 Aug 2020 22:28:19 +0000 (22:28 +0000)]
MFC r359410:
Small cleanup by using a variable just assigned.

3 years agoMFC r359405:
Michael Tuexen [Sun, 23 Aug 2020 22:26:38 +0000 (22:26 +0000)]
MFC r359405:
Handle integer overflows correctly when converting msecs and secs to
ticks and vice versa.
These issues were caught by recently added panic() calls on INVARIANTS
systems.

3 years agoMFC r359379:
Michael Tuexen [Sun, 23 Aug 2020 22:24:46 +0000 (22:24 +0000)]
MFC r359379:
Some more uint32_t cleanups, no functional change.

3 years agoMFC r363093:
Edward Tomasz Napierala [Sun, 23 Aug 2020 22:23:19 +0000 (22:23 +0000)]
MFC r363093:

Make linux stat(2) return the same st_dev for every devfs instance.
The reason for this is to work around an idiosyncrasy of glibc
getttynam(3) implementation: it checks whether st_dev returned for
fd 0 is the same as st_dev returned for the target of /proc/self/fd/0
symlink, and with linux chroots having their own devfs instance,
the check will fail if you chrooted into it.

PR: kern/240767
Sponsored by: The FreeBSD Foundation

3 years agoMFC r356172:
Edward Tomasz Napierala [Sun, 23 Aug 2020 22:21:36 +0000 (22:21 +0000)]
MFC r356172:

Make Linux stat(2) et al distinguish between block and character
devices.  It's required for LTP, among other things.  It's not
complete, but good enough for now.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r359306:
Michael Tuexen [Sun, 23 Aug 2020 22:19:39 +0000 (22:19 +0000)]
MFC r359306:
Remove an optimization, which was incorrect a couple of times and
therefore doesn't seem worth to be there.
In this case COOKIE where not retransmitted anymore, when the
socket was already closed.

3 years agoMFC r359305:
Michael Tuexen [Sun, 23 Aug 2020 22:17:29 +0000 (22:17 +0000)]
MFC r359305:
Improve consistency in debug output.

3 years agoMFC r359301:
Michael Tuexen [Sun, 23 Aug 2020 22:16:03 +0000 (22:16 +0000)]
MFC r359301:
Use consistent debug output.

3 years agoMFC r359300:
Michael Tuexen [Sun, 23 Aug 2020 22:13:57 +0000 (22:13 +0000)]
MFC r359300:
Don't restore the vnet too early in error cases.

3 years agoMFC r362052:
Edward Tomasz Napierala [Sun, 23 Aug 2020 22:12:55 +0000 (22:12 +0000)]
MFC r362052:

Improve the warnings.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r359288:
Michael Tuexen [Sun, 23 Aug 2020 22:09:20 +0000 (22:09 +0000)]
MFC r359288:
Only call panic when building with INVARIANTS.

3 years agoMFC r359287:
Michael Tuexen [Sun, 23 Aug 2020 22:07:49 +0000 (22:07 +0000)]
MFC r359287:
Another cleanup of the timer code. Also be more pedantic about the
parameters of the timer start and stop routines. Several inconsistencies
have been fixed in earlier commits. Now they will be catched when running
an INVARIANTS system.

3 years agoMFC r359234:
Michael Tuexen [Sun, 23 Aug 2020 22:05:57 +0000 (22:05 +0000)]
MFC r359234:
Cleanup the file and add two ASSERT variants for locks, which will be
used shortly.

3 years agoMFC r359195:
Michael Tuexen [Sun, 23 Aug 2020 22:04:02 +0000 (22:04 +0000)]
MFC r359195:
More timer cleanups, no functional change.

3 years agoMFC r359162:
Michael Tuexen [Sun, 23 Aug 2020 22:02:19 +0000 (22:02 +0000)]
MFC r359162:
Remove a set, but unused variable.

3 years agoMFC r359152:
Michael Tuexen [Sun, 23 Aug 2020 21:59:23 +0000 (21:59 +0000)]
MFC r359152:
Consistently provide arguments for timer start and stop routines.
This is another step in cleaning up timer handling.

3 years agoMFC r359151::
Michael Tuexen [Sun, 23 Aug 2020 21:57:24 +0000 (21:57 +0000)]
MFC r359151::
Cleanup the stream reset and asconf timer.

3 years agoMFC r359131:
Michael Tuexen [Sun, 23 Aug 2020 21:55:34 +0000 (21:55 +0000)]
MFC r359131:
The MTU candidates MUST be a multiple of 4, so make them so.

3 years agoMFC r359048:
Michael Tuexen [Sun, 23 Aug 2020 21:52:54 +0000 (21:52 +0000)]
MFC r359048:
Handle the timers in a consistent sequence according to the definition
of the timer type.
Just a cleanup, no functional change intended.

3 years agoMFC r353725 by yuripv:
Edward Tomasz Napierala [Sun, 23 Aug 2020 21:48:57 +0000 (21:48 +0000)]
MFC r353725 by yuripv:

linux: futex_mtx should follow futex_list

Move futex_mtx to linux_common.ko for amd64 and aarch64 along
with respective list/mutex init/destroy.

PR: 240989
Reported by: Alex S <iwtcex@gmail.com>

3 years agoMFC r353724 by yuripv:
Edward Tomasz Napierala [Sun, 23 Aug 2020 21:46:48 +0000 (21:46 +0000)]
MFC r353724 by yuripv:

linux: provide just one instance of futex_list

Move futex_list definition to linux.c which is included once
in linux.ko (i386) and in linux_common.ko (amd64 and aarch64)
allowing 32/64 bit linux programs to access the same futexes
in the latter case.

PR: 240989

3 years agoMFC r352914 by kaktus:
Edward Tomasz Napierala [Sun, 23 Aug 2020 21:44:05 +0000 (21:44 +0000)]
MFC r352914 by kaktus:

linux_renameat2: don't add extra \n on error.

linux_msg() already adds \n at the end of all messages.

3 years agoMFC r350451 by emaste:
Edward Tomasz Napierala [Sun, 23 Aug 2020 21:38:48 +0000 (21:38 +0000)]
MFC r350451 by emaste:

linuxulator: rename linux_locore.s to .asm

It is assembled using "${CC} -x assembler-with-cpp", which by convention
(bsd.suffixes.mk) uses the .asm extension.

This is a portion of the review referenced below (D18344).  That review
also renamed linux_support.s to .S, but that is a functional change
(using the compiler's integrated assembler instead of as) and will be
revisited separately.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r358965:
Michael Tuexen [Sun, 23 Aug 2020 21:35:23 +0000 (21:35 +0000)]
MFC r358965:
sendfile() does currently not support SCTP sockets.
Therefore, fail the call.
Manually fix a compile issue.

3 years agoMFC r358169:
Michael Tuexen [Sun, 23 Aug 2020 21:27:54 +0000 (21:27 +0000)]
MFC r358169:
Remove an unused timer type.

3 years agoMFC r358080:
Michael Tuexen [Sun, 23 Aug 2020 21:23:45 +0000 (21:23 +0000)]
MFC r358080:
Remove unused function.

3 years agoMFC r358028:
Michael Tuexen [Sun, 23 Aug 2020 21:22:13 +0000 (21:22 +0000)]
MFC r358028:

Fix the non-default stream schedulers such that do not interleave
user messages when it is now allowed.

Thanks to Christian Wright for reporting the issue for the userland
stack and providing a fix for the priority scheduler.

3 years agoMFC r357830:
Michael Tuexen [Sun, 23 Aug 2020 21:19:17 +0000 (21:19 +0000)]
MFC r357830:
Don't panic under INVARIANTS when we can't allocate memory for storing
a vtag in time wait.
This issue was found by running syzkaller.

3 years agoMFC r357768:
Michael Tuexen [Sun, 23 Aug 2020 21:12:37 +0000 (21:12 +0000)]
MFC r357768:
Don't start an SCTP timer using a net, which has been removed.

3 years agoMFC r357708:
Michael Tuexen [Sun, 23 Aug 2020 21:10:24 +0000 (21:10 +0000)]
MFC r357708:
Stop the PMTU and HB timer when removing a net, not when freeing it.

3 years agoMFC r357705:
Michael Tuexen [Sun, 23 Aug 2020 21:07:39 +0000 (21:07 +0000)]
MFC r357705:
Cleanup timer handling.

3 years agoMFC r357501:
Michael Tuexen [Sun, 23 Aug 2020 21:05:54 +0000 (21:05 +0000)]
MFC r357501:
Remove unused timer.

3 years agoMFC r357500:
Michael Tuexen [Sun, 23 Aug 2020 21:04:22 +0000 (21:04 +0000)]
MFC r357500:
Improve numbering of debug information.

3 years agoMFC r357197:
Michael Tuexen [Sun, 23 Aug 2020 21:01:56 +0000 (21:01 +0000)]
MFC r357197:
Fix build issues for the userland stack on 32-bit platforms.

3 years agoMFC r355818:
Edward Tomasz Napierala [Sun, 23 Aug 2020 20:25:10 +0000 (20:25 +0000)]
MFC r355818:

Add compat.linux.emul_path, so it can be set to something other
than "/compat/linux".  Useful when you have several compat directories
with different Linux versions and you don't want to clash with files
installed by linux-c7 packages.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r354691:
Edward Tomasz Napierala [Sun, 23 Aug 2020 20:20:13 +0000 (20:20 +0000)]
MFC r354691:

Improve Linuxulator man pages to better reflect the current state,
and add some missing Xrs.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r357503:
Edward Tomasz Napierala [Sun, 23 Aug 2020 20:14:57 +0000 (20:14 +0000)]
MFC r357503:

Add missing linux(4) syscall entries.  This fixes missing debug
messages for some of the unimplemented syscalls, in particular
the AIO-related ones.

MFC r357504:

Regen after r357503.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r356241:
Edward Tomasz Napierala [Sun, 23 Aug 2020 20:12:07 +0000 (20:12 +0000)]
MFC r356241:

Add basic getcpu(2) support to linuxulator.  The purpose of this
syscall is to query the CPU number and the NUMA domain the calling
thread is currently running on.  The third argument is ignored.
It doesn't do anything regarding scheduling - it's literally
just a way to query the current state, without any guarantees
you won't get rescheduled an opcode later.

This unbreaks Java from CentOS 8
(java-11-openjdk-11.0.5.10-0.el8_0.x86_64).

Sponsored by: The FreeBSD Foundation

3 years agoMFC r356231:
Edward Tomasz Napierala [Sun, 23 Aug 2020 20:10:10 +0000 (20:10 +0000)]
MFC r356231:

Regen after r356229.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r356229:
Edward Tomasz Napierala [Sun, 23 Aug 2020 20:08:49 +0000 (20:08 +0000)]
MFC r356229:

Fix definitions for Linux getcpu(2).

Sponsored by: The FreeBSD Foundation

3 years agoMFC r356177:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:59:38 +0000 (19:59 +0000)]
MFC r356177:

Implement Linux syslog(2) syscall; just enough to make Linux dmesg(8)
utility work.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r352224 by emaste:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:54:03 +0000 (19:54 +0000)]
MFC r352224 by emaste:

Update comments and ordering in linux*_dummy.c

- sort alphabetically
- getcpu arrived in Linux 2.6.19
- fanotify_* arrived in 2.6.36

Sponsored by: The FreeBSD Foundation

3 years agoMFC r352222 by emaste:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:47:10 +0000 (19:47 +0000)]
MFC r352222 by emaste:

linuxulator: memfd_create first appeared in Linux 3.17

Sponsored by: The FreeBSD Foundation

3 years agoMFC r352221 by emaste:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:45:56 +0000 (19:45 +0000)]
MFC r352221 by emaste:

linuxulator: seccomp syscall first appeared in Linux 3.17

Sponsored by: The FreeBSD Foundation

3 years agoMFC r352210 by emaste:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:44:29 +0000 (19:44 +0000)]
MFC r352210 by emaste:

linux: add trivial renameat2 implementation

Just return EINVAL if flags != 0.  The Linux man page documents one
case of EINVAL as "The filesystem does not support one of the flags in
flags."

After r351723 userland binaries will try using new system calls.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r352209 by emaste:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:42:48 +0000 (19:42 +0000)]
MFC r352209 by emaste:

regen linuxulator sysent after r352208

Sponsored by: The FreeBSD Foundation

3 years agoMFC r352208 by emaste:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:41:16 +0000 (19:41 +0000)]
MFC r352208 by emaste:

make linux_renameat2 args consistent with linux_renameat

Use 'dfd' consistently for a directory fd.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r351821:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:30:12 +0000 (19:30 +0000)]
MFC r351821:

Improve debugging output.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r349748:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:28:09 +0000 (19:28 +0000)]
MFC r349748:

Add support for PTRACE_O_TRACEEXIT to linuxulator ptrace(2).
This fixes strace 4.25 from Ubuntu 19.04.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r349747:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:26:46 +0000 (19:26 +0000)]
MFC r349747:

Implement PTRACE_GETSIGINFO.  This makes Linux strace(1) quieter
in some cases (strace -f man id > /dev/null).

Sponsored by: The FreeBSD Foundation

3 years agoMFC r348049:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:25:19 +0000 (19:25 +0000)]
MFC r348049:

Make linux_ptrace() use linux_msg() instead of printf().

Sponsored by: The FreeBSD Foundation

3 years agoMFC r347971:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:22:42 +0000 (19:22 +0000)]
MFC r347971:

Implement PTRACE_O_TRACESYSGOOD.  This makes Linux strace(1) work.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r347580:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:20:38 +0000 (19:20 +0000)]
MFC r347580:

Fix handling of r10 in Linux ptrace(2).  This fixes decoding
of the 'flags' argument to mmap(2) with Linux strace(1).

Sponsored by: The FreeBSD Foundation

3 years agoMFC r347231:
Edward Tomasz Napierala [Sun, 23 Aug 2020 19:19:00 +0000 (19:19 +0000)]
MFC r347231:

Support PTRACE_GETREGSET w/ NT_PRSTATUS in Linux ptrace(2).

While Linux strace(1) doesn't strictly require it - it has a fallback
to PTRACE_GETREGS - it's a newer interface, so we better support it
before the old one is deprecated.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r363381:
Craig Leres [Sun, 23 Aug 2020 17:46:10 +0000 (17:46 +0000)]
MFC r363381:
Fix some regressions with the zgrep(1) wrapper.

PR: 247126

3 years agoMFC r364411:
Mark Johnston [Sun, 23 Aug 2020 17:34:21 +0000 (17:34 +0000)]
MFC r364411:
Use pmap_mapbios() to map ACPI tables on amd64 and i386.

PR: 248746

3 years agoMFC r364407: Unify AcpiGetTable() KPI use in identify, probe and attach.
Alexander Motin [Sat, 22 Aug 2020 00:42:33 +0000 (00:42 +0000)]
MFC r364407: Unify AcpiGetTable() KPI use in identify, probe and attach.

While there, change probe order to not call AcpiGetTable() for every
probed ACPI device.

PR: 248746

3 years agoMFC r364321: ipfw: line up `ipfw -t list` with and without timestamp
Ed Maste [Fri, 21 Aug 2020 19:28:26 +0000 (19:28 +0000)]
MFC r364321: ipfw: line up `ipfw -t list` with and without timestamp

From the PR:
    When I run `ipfw -t list` on release/12 or current, I get misaligned
    output between lines that do and do not have a last match timestamp,
    like so:

    00100 Tue Aug 11 03:03:26 2020 allow ip from any to any via lo0
    00200                         deny ip from any to 127.0.0.0/8

    (specifically, the "allow" and "deny" strings do not line up)

PR: 248608
Submitted by: Taylor Stearns

3 years agoMFC r355744:
Kristof Provost [Fri, 21 Aug 2020 13:11:33 +0000 (13:11 +0000)]
MFC r355744:

pf: Make request_maxcount runtime adjustable

There's no reason for this to be a tunable. It's perfectly safe to
change this at runtime.

3 years agoMFC r363997
Vincenzo Maffione [Fri, 21 Aug 2020 07:54:16 +0000 (07:54 +0000)]
MFC r363997

iflib: netmap: drop redundant check

The validity of head is already checked by nm_rxsync_prologue().

3 years agoMFC r363996
Vincenzo Maffione [Fri, 21 Aug 2020 07:52:56 +0000 (07:52 +0000)]
MFC r363996

iflib: netmap: don't increment ifl_cidx on the wrong free list

Netmap only uses free list 0 to keep it consistent with its
one-to-one mapping between each netmap ring and a device RX
(or TX) queue.
However, the current iflib_netmap_rxsync() routine was
mistakenly updating the ifl_cidx field of both free lists.

PR:           248494

3 years agoMFC r363398 (asomers): document close_range(2) as async-signal-safe
Kyle Evans [Fri, 21 Aug 2020 03:50:25 +0000 (03:50 +0000)]
MFC r363398 (asomers): document close_range(2) as async-signal-safe

3 years agoMFC r364235:
Mark Johnston [Fri, 21 Aug 2020 00:59:15 +0000 (00:59 +0000)]
MFC r364235:
Rename the pipe_map field of struct pipe.

3 years agoMFC: 359521 ufm removal
Warner Losh [Thu, 20 Aug 2020 17:35:09 +0000 (17:35 +0000)]
MFC: 359521 ufm removal

ufm will be removed from 13, note it here.

Relnotes: Yes (maybe, very obscure)

3 years agoMFC r361397, r361683: certctl(8) unprivileged mode
Kyle Evans [Thu, 20 Aug 2020 14:07:29 +0000 (14:07 +0000)]
MFC r361397, r361683: certctl(8) unprivileged mode

r361397:
Add an unprivileged mode where calls to install are passed appropriate
flags.  For ease of integration, use the same flags as install:

 -U unprivileged mode
 -D <destdir> Specify DESTDIR (overrides the environment)
 -M <metalog> Full path to METALOG file

r361683:
certctl: fix test syntax

test doesn't understand &&, but it does understand -a.

3 years agoMFC r364185: Fill device serial_num and device_id in NVMe XPT.
Alexander Motin [Thu, 20 Aug 2020 02:54:44 +0000 (02:54 +0000)]
MFC r364185: Fill device serial_num and device_id in NVMe XPT.

It allows to report GEOM::lunid for nda(4) same as for nvd(4).  Since
NVMe now allows multiple LUs (namespaces) with multiple paths unique
LU identification is important.  The serial_num field is filled same
as before with the controller serial number, while device_id is based
on namespace GUID and/or EUI64 fields as recommended by "NVM Express:
SCSI Translation Reference" and matching nvd(4) at the end.

3 years agoMFC r364178: Report proper stripesize for nda(4).
Alexander Motin [Thu, 20 Aug 2020 02:51:18 +0000 (02:51 +0000)]
MFC r364178: Report proper stripesize for nda(4).

Same as for nvd(4) report NPWG if present, otherise NOIOB.

3 years agoMFC r364168:
Mark Johnston [Wed, 19 Aug 2020 13:44:08 +0000 (13:44 +0000)]
MFC r364168:
linprocfs: Fix some inaccuracies in meminfo.

PR: 248463

3 years agoMFC r364109:
Hans Petter Selasky [Wed, 19 Aug 2020 13:32:55 +0000 (13:32 +0000)]
MFC r364109:
Need to clone the task struct fields related to RCU aswell in the
LinuxKPI after r359727. This fixes a minor regression issue. Else the
priority tracking won't work properly when both sleepable and
non-sleepable RCU is in use on the same thread.

Bump the __FreeBSD_version to force recompilation of external kernel
modules.

PR: 242272
Sponsored by: Mellanox Technologies

3 years agoFix for INVARIANTS build.
Hans Petter Selasky [Wed, 19 Aug 2020 13:28:50 +0000 (13:28 +0000)]
Fix for INVARIANTS build.

The "name" argument is not present in the EPOCH(9) APIs in 12-stable as
merged in r364381 .

This is a direct commit.

Sponsored by: Mellanox Technologies

3 years agoMFC r364072, r364073 and r364102:
Hans Petter Selasky [Wed, 19 Aug 2020 13:23:52 +0000 (13:23 +0000)]
MFC r364072, r364073 and r364102:
Use proper prototype for SYSINIT() functions.
Mark the unused argument using the __unused macro.

Make sure the multicast release tasks are properly drained when
destroying a VNET or a network interface.

Else the inm release tasks, both IPv4 and IPv6 may cause a panic
accessing a freed VNET or network interface.

Use a static initializer for the multicast free tasks.
This makes the SYSINIT() function updated in r364072 superfluous.

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

3 years agoMFC r359438 and r359477:
Hans Petter Selasky [Wed, 19 Aug 2020 13:07:04 +0000 (13:07 +0000)]
MFC r359438 and r359477:
Remove the "config" taskqgroup and its KPIs.

Equivalent functionality is already provided by taskqueue(9), just use
that instead.

Interfaces may be detached from a taskqueue_thread task, for example by
prison_complete(), so after r359438, when draining the queue we may end
up deadlocking.

3 years agoMFC 364294, 364295:
Mateusz Piotrowski [Wed, 19 Aug 2020 12:47:05 +0000 (12:47 +0000)]
MFC 364294, 364295:

- Remove an unnecessary macro
- Comment out TODO notes from bectl(8) manual page

3 years agoMFC r364028:
Hans Petter Selasky [Wed, 19 Aug 2020 12:25:34 +0000 (12:25 +0000)]
MFC r364028:
Implement radix_tree_store() in the LinuxKPI for use with the coming
extensible arrays implementation.

While at it add some more comments explaining the current
radix_tree_insert() function and make sure to clean the root node when
the radix tree reaches the maximum height. This can happen if the
index passed is too big when the tree is empty.

The radix_tree_store() function is basically a copy of the
radix_tree_insert() function with some added functionality.

The radix_tree_store() function is local to FreeBSD and does not yet
exist in Linux.

Reviewed by: kib
Sponsored by: Mellanox Technologies

3 years agoMFC r364019:
Hans Petter Selasky [Wed, 19 Aug 2020 12:23:05 +0000 (12:23 +0000)]
MFC r364019:
Add full support support for dynamic allocation and freeing of epoch's.

Make sure to reclaim epoch structures when they are freed to support
dynamic allocation and freeing of epoch structures.

While at it, move the 64 supported epoch control structures to the
static memory domain. This overall simplifies the management and
debugging of system epoch's.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D25960
Sponsored by: Mellanox Technologies

3 years agoMFC r363950:
Hans Petter Selasky [Wed, 19 Aug 2020 12:16:11 +0000 (12:16 +0000)]
MFC r363950:
Add new USB ID.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
Sponsored by: Mellanox Technologies

3 years agoMFC r363397: Fix style and comment around concave/convex regions in TCP cubic.
Richard Scheffenegger [Wed, 19 Aug 2020 10:40:02 +0000 (10:40 +0000)]
MFC r363397: Fix style and comment around concave/convex regions in TCP cubic.

In cubic, the concave region is when snd_cwnd starts growing slower
towards max_cwnd (cwnd at the time of the congestion event), and
the convex region is when snd_cwnd starts to grow faster and
eventually appearing like slow-start like growth.

PR: 238478
Reviewed by: tuexen (mentor), rgrimes (mentor)
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D24657

3 years agoMFC r363380: Add MODULE_VERSION to TCP loadable congestion control modules.
Richard Scheffenegger [Wed, 19 Aug 2020 10:36:16 +0000 (10:36 +0000)]
MFC r363380: Add MODULE_VERSION to TCP loadable congestion control modules.

Without versioning information, using preexisting loader /
linker code is not easily possible when another module may
have dependencies on pre-loaded modules, and also doesn't
allow the automatic loading of dependent modules.

No functional change of the actual modules.

Reviewed by: tuexen (mentor), rgrimes (mentor)
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D25744

3 years agoMFC r362988: Fix KASSERT during tcp_newtcpcb when low on memory
Richard Scheffenegger [Wed, 19 Aug 2020 10:32:26 +0000 (10:32 +0000)]
MFC r362988: Fix KASSERT during tcp_newtcpcb when low on memory

While testing with system default cc set to cubic, and
running a memory exhaustion validation, FreeBSD panics for a
missing inpcb reference / lock.

Reviewed by: rgrimes (mentor), tuexen (mentor)
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D25583

3 years agoMFC r364133:
Cy Schubert [Tue, 18 Aug 2020 20:41:03 +0000 (20:41 +0000)]
MFC r364133:

When booting a system with WITHOUT_IPFILTER the following errors
are encountered at boot time:

rcorder: requirement `ipfs' in file `/etc/rc.d/netif' has no providers.
rcorder: requirement `ipfilter' in file `/etc/rc.d/netif' has no
providers.
rcorder: requirement `ipfilter' in file `/etc/rc.d/netwait' has no
providers.
rcorder: requirement `ipfilter' in file `/etc/rc.d/net_watchdog' has no
providers.
rcorder: requirement `ipfilter' in file `/etc/rc.d/securelevel' has no
providers.

Listing its own requrements in BEFORE rather than use REQUIRE of
non-optional scripts resolves this issue.

The issue was discovered and patched by glebius at Netflix.

Submitted by: glebius
Reported by: glebius

3 years agoMFC r364131: tput(1): Several enhancements for the manual page
Gordon Bergling [Tue, 18 Aug 2020 06:55:12 +0000 (06:55 +0000)]
MFC r364131: tput(1): Several enhancements for the manual page

- a couple of descriptions are incomplete
- synopsis doesn't show that all arguments are optional
- missing an ENVIRONMENT section with TERM mentioned

PR: 84670
Submitted by: Gary W. Swearingen <garys at opusnet dot com>
Reviewed by: bcr
Approved by: bcr
Differential Revision: https://reviews.freebsd.org/D26009

3 years agoMFC 363596, 363719, 363733
Peter Grehan [Tue, 18 Aug 2020 03:40:09 +0000 (03:40 +0000)]
MFC 363596, 363719, 363733

 363596  Support the setting of additional AHCI controller parameters.
 363719  Definition for the 'removable media flag' from word 0 in the Identify page.
 363733  Replace magic numbers in Identify page register 0 with ATA definitions.

Relnotes: yes

3 years agoInsta-MFC r364322:
Konstantin Belousov [Mon, 17 Aug 2020 19:17:54 +0000 (19:17 +0000)]
Insta-MFC r364322:
Remove unused declaration for qsort_b().

This should fix the build on gcc arches.  It seems that gcc 4.2 port of
the blocks support defines the guard symbol unconditionally.

3 years agoMFC r360509: geli tests require OpenSSL - exclude them under WITHOUT_OPENSSL
Ed Maste [Mon, 17 Aug 2020 17:48:28 +0000 (17:48 +0000)]
MFC r360509: geli tests require OpenSSL - exclude them under WITHOUT_OPENSSL

PR: 245931
Submitted by: The FreeBSD Foundation

3 years agoMFC r360501: src.opts.mk: add WITHOUT_OPENSSL dependencies
Ed Maste [Mon, 17 Aug 2020 17:47:04 +0000 (17:47 +0000)]
MFC r360501: src.opts.mk: add WITHOUT_OPENSSL dependencies

A number of components require OpenSSL and fail to build if it is not
enabled.  As a first phase force these off under WITHOUT_OPENSSL.  A
second phase should make these more fine-grained, allowing the component
to build but without OpenSSL.

PR: 245931
Sponsored by: The FreeBSD Foundation

3 years agoMFC r364091:
Konstantin Belousov [Mon, 17 Aug 2020 16:27:02 +0000 (16:27 +0000)]
MFC r364091:
Export scandir_b from libc.

PR: 248572

3 years agoMFC r364083:
Mark Johnston [Mon, 17 Aug 2020 12:38:35 +0000 (12:38 +0000)]
MFC r364083:
fortune, strfile: Improve validation of command-line arguments.

PR: 246050

3 years agoMFC r364186: ifconfig(8): plug memory leak
Eugene Grosbein [Sun, 16 Aug 2020 02:04:35 +0000 (02:04 +0000)]
MFC r364186: ifconfig(8): plug memory leak

3 years agoMFC r354139:
Edward Tomasz Napierala [Sat, 15 Aug 2020 17:18:36 +0000 (17:18 +0000)]
MFC r354139:

Document the fact that Linux binaries depend on pty(4).

Sponsored by: The FreeBSD Foundation

3 years agoMFC r351783:
Edward Tomasz Napierala [Sat, 15 Aug 2020 17:02:23 +0000 (17:02 +0000)]
MFC r351783:

Unbreak Linux binaries linked against new glibc, such as the ones
from recent Ubuntu versions.  Without it they segfault on startup.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r364029: tmpnam(3): Also mention tmpfile in the ENVIRONMENT section
Gordon Bergling [Fri, 14 Aug 2020 06:48:29 +0000 (06:48 +0000)]
MFC r364029: tmpnam(3): Also mention tmpfile in the ENVIRONMENT section

PR: 181785
Submitted by: Kevin P. Neal <kpneal at pobox dot com>

3 years agoMFC r364032: setlocale(3): Add an EXAMPLES section and add LANG category
Gordon Bergling [Fri, 14 Aug 2020 06:46:40 +0000 (06:46 +0000)]
MFC r364032: setlocale(3): Add an EXAMPLES section and add LANG category

PR: 41824
Submitted by: Slaven Rezic <eserte at vran dot herceg dot de>
Obtained from: NetBSD

3 years agoMFC r364031: mbsrtowcs(3): Clarify the RETURN VALUES section
Gordon Bergling [Fri, 14 Aug 2020 06:44:34 +0000 (06:44 +0000)]
MFC r364031: mbsrtowcs(3): Clarify the RETURN VALUES section

PR: 215848
Submitted by: Andrew Stevenson <andrew at ugh dot net dot au>

3 years agoMFC r364005: telnet(1): Document -P option
Gordon Bergling [Fri, 14 Aug 2020 06:41:59 +0000 (06:41 +0000)]
MFC r364005: telnet(1): Document -P option

PR: 248157
Submitted by: Juraj Lutter <juraj at lutter dot sk>
Reviewed by: bcr
Approved by: bcr
Obtained from: NetBSD
Differential Revision: https://reviews.freebsd.org/D25794