]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agopf tests: synproxy to localhost test
Kristof Provost [Wed, 30 Jun 2021 12:22:27 +0000 (14:22 +0200)]
pf tests: synproxy to localhost test

Test syn-proxying a connection to the local host.

Sponsored by: Modirum MDPay
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31854

2 years agopf: fix synproxy to local
Kristof Provost [Wed, 1 Sep 2021 07:54:55 +0000 (09:54 +0200)]
pf: fix synproxy to local

When we're synproxy-ing a connection that's going to us (as opposed to a
forwarded one) we wound up trying to send out the pf-generated tcp
packets through pf_intr(), which called ip(6)_output(). That doesn't
work all that well for packets that are destined for us, so in that case
we must call ip(6)_input() instead.

MFC after: 1 week
Sponsored by:   Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D31853

2 years agoipsec: Validate the protocol identifier in ipsec4_ctlinput()
Mark Johnston [Fri, 10 Sep 2021 13:07:59 +0000 (09:07 -0400)]
ipsec: Validate the protocol identifier in ipsec4_ctlinput()

key_allocsa() expects to handle only IPSec protocols and has an
assertion to this effect.  However, ipsec4_ctlinput() has to handle
messages from ICMP unreachable packets and was not validating the
protocol number.  In practice such a packet would simply fail to match
any SADB entries and would thus be ignored.

Reported by: syzbot+6a9ef6fcfadb9f3877fe@syzkaller.appspotmail.com
Reviewed by: ae
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31890

2 years agonet: Enter a net epoch around protocol if_up/down notifications
Mark Johnston [Fri, 10 Sep 2021 13:07:40 +0000 (09:07 -0400)]
net: Enter a net epoch around protocol if_up/down notifications

When traversing a list of interface addresses, we need to be in a net
epoch section, and protocol ctlinput routines need a stable reference to
the address.

Reported by: syzbot+3219af764ead146a3a4e@syzkaller.appspotmail.com
Reviewed by: kp, melifaro
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31889

2 years agoAdd support for jail.conf.d
Antranig Vartanian [Wed, 8 Sep 2021 07:07:49 +0000 (02:07 -0500)]
Add support for jail.conf.d

Using /etc/jail.{jailname}.conf is nice, however it makes /etc/ very
messy if you have many jails.  This patch allows one to move these
config files out of the way into /etc/jail.conf.d/{jailname}.conf.

Note that the same caveat as /etc/jail.*.conf applies: the jail service
will not autodiscover all of these for starting 'all' jails.  This is
considered future work, since the behavior matches.

Reviewed by: kevans
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D24570

2 years agokern: drop remaining references to removed makesyscalls.sh
Kyle Evans [Thu, 13 May 2021 18:46:17 +0000 (13:46 -0500)]
kern: drop remaining references to removed makesyscalls.sh

This was accidentally omitted from the recent removal of makeyscalls.sh.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D30250

2 years agolibc: Fix build on case-insensitive file systems
Jessica Clarke [Fri, 10 Sep 2021 00:19:38 +0000 (01:19 +0100)]
libc: Fix build on case-insensitive file systems

On case-insensitive file systems (most likely to be seen on macOS, where
it is the default), _Fork.o for the new POSIX _Fork function conflicts
with _fork.o for the PSEUDO file. This results in non-determinsitic
behaviour in terms of which ends up being present; if _Fork.o wins then
the build fails to link libc.so due to missing __sys_fork, and if
_fork.o wins then libc silently fails to include the implementation of
_Fork. A similar issue occurred in the past for C99's _Exit conflicting
with exit(2) and was fixed in cb1cb6a2a83f, so this adds a fix based on
that.

As a longer-term solution it might be better to instead make the
generated files use a different prefix that's less likely to conflict
with other things (such as __sys_foo.o given they always contain that)
but that's a rather more invasive change.

Fixes: 49ad342cc10c ("Add _Fork()")
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31895

2 years agoopenssh: regen config.h
Ed Maste [Thu, 9 Sep 2021 23:04:10 +0000 (19:04 -0400)]
openssh: regen config.h

Fixes: 19261079b743 ("openssh: update to OpenSSH v8.7p1")
Reported by: O. Hartmann
Sponsored by: The FreeBSD Foundation

2 years agox86/tsc.c: Add TSLOG to test_tsc
Colin Percival [Fri, 10 Sep 2021 00:01:00 +0000 (17:01 -0700)]
x86/tsc.c: Add TSLOG to test_tsc

On my benchmark system this takes ~ 14 ms; enough to be worth
recording in the boot time profile.

2 years agotabs: a hacky version of tabs appeared in 1st edition Unix
Warner Losh [Thu, 9 Sep 2021 23:11:18 +0000 (17:11 -0600)]
tabs: a hacky version of tabs appeared in 1st edition Unix

First edition Unix had an /etc/tabs file. It contained the escape
sequences to set tabs to every 8 stops on an old Teletype Model 37 and
compatible terminals. One would 'cat /etc/tabs' to reset them.  Unix at
the time effectively mandated this because the delays in the tty driver
assumed this and tabs didn't work when they were too different from '8'.
Document this historical niggle in HISTORY after it was brought to my
attention on a Hacker News thread.

Sponsored by: Netflix

2 years agoopenssh: Add new source files to libssl
Guido Falsi [Thu, 9 Sep 2021 22:56:24 +0000 (00:56 +0200)]
openssh: Add new source files to libssl

Add some new OpenSSH v8.7p1 source files to the ones being used to
build libssl to avoid missing symbols.

PR:             258384
Fixes: 19261079b743 ("openssh: update to OpenSSH v8.7p1")
Approved by:    kevans (src)

2 years agohkbd(4): Fix build on 32bit platforms
Vladimir Kondratyev [Thu, 9 Sep 2021 22:49:26 +0000 (01:49 +0300)]
hkbd(4): Fix build on 32bit platforms

MFC after: 2 weeks

3 years agohkbd(4): Fix key repeats on multireport keyboards
Vladimir Kondratyev [Thu, 9 Sep 2021 21:40:13 +0000 (00:40 +0300)]
hkbd(4): Fix key repeats on multireport keyboards

Currently hkbd counts all key states to be "Up" at the start of
interrupt callback. That results in generation of "Key Up" event for
each key that has been downed before but is not listed in current
report while is still downed.

Fix that with clearing of temporary key data storage bits only for
keys contained in processed report.

Reported by: Greg V
Obtained from: sysutils/iichid
MFC after: 2 weeks

3 years agohkbd(4): Use bitstring(3) KPI for key bitmaps processing.
Vladimir Kondratyev [Thu, 9 Sep 2021 21:39:46 +0000 (00:39 +0300)]
hkbd(4): Use bitstring(3) KPI for key bitmaps processing.

No functional changes intended.

MFC after: 2 weeks

3 years agohkbd(4): Reduce diff with ukbd(4)
Vladimir Kondratyev [Thu, 9 Sep 2021 21:39:05 +0000 (00:39 +0300)]
hkbd(4): Reduce diff with ukbd(4)

MFC after: 2 weeks

3 years agopsm(4): Disable KVM switch "jitter" clamping for absolute touchpads.
Vladimir Kondratyev [Thu, 9 Sep 2021 21:37:40 +0000 (00:37 +0300)]
psm(4): Disable KVM switch "jitter" clamping for absolute touchpads.

r123442 introduced solution for clamping of PS/2 mice jitter when using
a KVM. Solution is to buffer mouse packets for 0.050ms if mouse activity
has not been seen for more than 0.5 seconds. Then flush that data to driver
if no validation errors found or drop the entire queue otherwise.

While it works well with relative devices it has issues with absolute ones
Depending on history buffering may results in delaying of the touch front
edge for 0.050ms that affects gesture processing (tap detection).

As absolute touchpads usually are built-in devices we can safely disable
bufferization and KVM jitter clamping to avoid such a delays.

MFC after: 2 weeks

3 years agortsx: Call taskqueue sooner, adjust DELAY(9) calls, add an inversion heuristic
Henri Hennebert [Thu, 9 Sep 2021 17:33:51 +0000 (13:33 -0400)]
rtsx: Call taskqueue sooner, adjust DELAY(9) calls, add an inversion heuristic

- Some configurations, e.g. HP EliteBook 840 G3, come with a dummy card
in the card slot which is detected as a valid SD card.  This added long
timeout at boot time.  To alleviate the problem, the default timeout is
reduced to one second during the setup phase. [1]

- Some configurations crash at boot if rtsx(4) is defined in the kernel
config.  At boot time, without a card inserted, the driver found that
a card is present and just after that a "spontaneous" interrupt is
generated showing that no card is present.  To solve this problem,
DELAY(9) is set to one quarter of a second before checking card presence
during driver attach.

- As advised by adrian, taskqueue and DMA are set up sooner during
the driver attach.  A heuristic to try to detect configuration needing
inversion was added.

PR: 255130 [1]
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30499

3 years agosctp: add explicit cast, no functional change intended
Michael Tuexen [Thu, 9 Sep 2021 17:13:47 +0000 (19:13 +0200)]
sctp: add explicit cast, no functional change intended

MFC after: 3 days

3 years agosctp: use appropriate argument when freeing association
Michael Tuexen [Thu, 9 Sep 2021 16:01:35 +0000 (18:01 +0200)]
sctp: use appropriate argument when freeing association

Reported by: syzbot+7fe26e26911344e7211d@syzkaller.appspotmail.com
MFC after: 3 days

3 years agofetch: do not confuse capacity and length
Baptiste Daroussin [Thu, 9 Sep 2021 14:48:21 +0000 (16:48 +0200)]
fetch: do not confuse capacity and length

The patch converting fetch to getline
(ee3ca711a898cf41330c320826ea1e0e6e451f1d),
did confuse the capacity of the line buffer with the actual len of the read
line confusing fetch -v.

3 years agoosd: Fix racy assertions
Mark Johnston [Thu, 9 Sep 2021 13:50:27 +0000 (09:50 -0400)]
osd: Fix racy assertions

osd_register(9) may reallocate and expand the destructor array for a
given object type if no space is available for a new key.  This happens
with the object lock held.  Thus, when verifying that a given slot in
the array is occupied, we need to hold the object lock to avoid racing
with a reallocation.

Reported by: syzbot+69ce54c7d7d813315dd3@syzkaller.appspotmail.com
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agoopenssh: remove update notes about upstreamed changes
Ed Maste [Thu, 9 Sep 2021 13:57:22 +0000 (09:57 -0400)]
openssh: remove update notes about upstreamed changes

Two local changes were committed upstream and are present in OpenSSH
8.7p1.  Remove references from FREEBSD-upgrade now that we have updated
to that version.

3 years agosctp: Clear assoc socket references when freeing a PCB
Mark Johnston [Thu, 9 Sep 2021 12:33:26 +0000 (08:33 -0400)]
sctp: Clear assoc socket references when freeing a PCB

This restores behaviour present in the first import of SCTP.  Commit
ceaad40ae729dea2c5d8ffcfdd45bb96fb8969d2 commented this out and commit
62fb761ff28bb184a2543e539dd689fefd5d3246 removed it.  However, once
sctp_inpcb_free() returns, the socket reference is gone no matter what,
so we need to clear it.

Reported by: syzbot+30dd69297fcbc5f0e10a@syzkaller.appspotmail.com
Reported by: syzbot+7b2f9d4bcac1c9569291@syzkaller.appspotmail.com
Reported by: syzbot+ed3e651f7d040af480a6@syzkaller.appspotmail.com
Reviewed by: tuexen
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31886

3 years agoExport _mmap and __sys_mmap from libc.so
Alex Richardson [Thu, 9 Sep 2021 10:46:53 +0000 (11:46 +0100)]
Export _mmap and __sys_mmap from libc.so

Unlike the other syscalls these two symbols were missing from the
version script. I noticed this while looking into the compiler-rt
runtime libraries for CHERI.

Reviewed by: brooks
Obtained from: https://github.com/CTSRD-CHERI/cheribsd/pull/1063
MFC after: 3 days

3 years agostress2: Add a syzkaller reproducer
Peter Holm [Thu, 9 Sep 2021 07:30:47 +0000 (07:30 +0000)]
stress2: Add a syzkaller reproducer

3 years agolualoader: use more concise verbiage for autoboot
Kyle Evans [Wed, 8 Sep 2021 21:34:33 +0000 (16:34 -0500)]
lualoader: use more concise verbiage for autoboot

The behavior remains the same, but lualoader now uses the more concise
verbiage that forthloader used.  This is particularly important because
the previous line would exceed the right boundary of the menu and run
straight into space that would typically be allowed for the logo.

This makes it slightly easier to port logos from forthloader to
lualoader.

3 years agolualoader: allow brands to specify a shift
Kyle Evans [Wed, 8 Sep 2021 21:33:28 +0000 (16:33 -0500)]
lualoader: allow brands to specify a shift

Some brands will want to specify a shift to make sure they're properly
centered; let it happen.

3 years agolualoader: remove shadowed local from graphics:drawitem()
Kyle Evans [Wed, 8 Sep 2021 21:32:53 +0000 (16:32 -0500)]
lualoader: remove shadowed local from graphics:drawitem()

for loop vars are local already and distinct from this earlier
declaration; remove it.

3 years agopkgbase: Move back mlxcontrol in the default package
Emmanuel Vadot [Thu, 9 Sep 2021 06:14:53 +0000 (08:14 +0200)]
pkgbase: Move back mlxcontrol in the default package

mlxcontrol(8) is a tool for mlx(4) raid card and isn't related to
Mellanox card.

Reported by: jhb

3 years agocxgbe/t4_tom: Use stale L2T entry and avoid busy-waiting for resolution.
Navdeep Parhar [Thu, 9 Sep 2021 03:46:42 +0000 (20:46 -0700)]
cxgbe/t4_tom: Use stale L2T entry and avoid busy-waiting for resolution.
MFC after: 1 week
Sponsored by: Chelsio Communications

3 years agonfsd: Fix build after commit 103b207536f9 for 32bit arches
Rick Macklem [Thu, 9 Sep 2021 01:55:06 +0000 (18:55 -0700)]
nfsd: Fix build after commit 103b207536f9 for 32bit arches

MFC after: 2 weeks

3 years agowpa: Address CTRL-EVENT-SCAN-FAILED
Cy Schubert [Thu, 9 Sep 2021 00:20:52 +0000 (17:20 -0700)]
wpa: Address CTRL-EVENT-SCAN-FAILED

5fcdc19a8111 didn't fully resolve the issue. There remains a report
that an ifconfig wlan0 up by itself is insufficient. Ifconfig down
must precede it.

Reported by: Filipe da Silva Santos <contact _ shiori_com_br>
Fixes: 5fcdc19a8111
MFC after: 3 days

3 years agosctp: cleanup timewait handling for vtags
Michael Tuexen [Wed, 8 Sep 2021 23:18:58 +0000 (01:18 +0200)]
sctp: cleanup timewait handling for vtags

MFC after: 1 week

3 years agonfsd: Use the COPY_FILE_RANGE_TIMEO1SEC flag
Rick Macklem [Wed, 8 Sep 2021 21:29:20 +0000 (14:29 -0700)]
nfsd: Use the COPY_FILE_RANGE_TIMEO1SEC flag

Although it is not specified in the RFCs, the concept that
the NFSv4 server should reply to an RPC request within a
reasonable time is accepted practice within the NFSv4 community.

Without this patch, the NFSv4.2 server attempts to reply to
a Copy operation within 1 second by limiting the copy to
vfs.nfs.maxcopyrange bytes (default 10Mbytes). This is crude at
best, given the large variation in I/O subsystem performance.

This patch uses the COPY_FILE_RANGE_TIMEO1SEC flag added by
commit c5128c48df3c to limit the reply time for a Copy
operation to approximately 1 second.

MFC after: 2 weeks

3 years agopath_test: Fix test sorting
Mark Johnston [Wed, 8 Sep 2021 14:59:42 +0000 (10:59 -0400)]
path_test: Fix test sorting

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agopath_test: Fix the unix socket test
Mark Johnston [Wed, 8 Sep 2021 14:57:04 +0000 (10:57 -0400)]
path_test: Fix the unix socket test

The intent was to specify O_PATH to open(2).

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agosctp: Fix a lock order reversal in sctp_swap_inpcb_for_listen()
Mark Johnston [Wed, 8 Sep 2021 03:20:21 +0000 (23:20 -0400)]
sctp: Fix a lock order reversal in sctp_swap_inpcb_for_listen()

When port reuse is enabled in a one-to-one-style socket, sctp_listen()
may call sctp_swap_inpcb_for_listen() to move the PCB out of the "TCP
pool".  In so doing it will drop the PCB lock, yielding an LOR since we
now hold several socket locks.  Reorder sctp_listen() so that it
performs this operation before beginning the conversion to a listening
socket.  Also modify sctp_swap_inpcb_for_listen() to return with PCB
write-locked, since that's what sctp_listen() expects now.

Reviewed by: tuexen
Fixes: bd4a39cc93d9 ("socket: Properly interlock when transitioning to a listening socket")
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31879

3 years agosctp: Fix lock recursion in sctp_swap_inpcb_for_listen()
Mark Johnston [Wed, 8 Sep 2021 03:02:15 +0000 (23:02 -0400)]
sctp: Fix lock recursion in sctp_swap_inpcb_for_listen()

After commit bd4a39cc93d9 we now hold the global inp info lock across
the call to sctp_swap_inpcb_for_listen(), which attempts to acquire it
again.  Since sctp_swap_inpcb_for_listen()'s sole caller is
sctp_listen(), we can simply change it to not try to acquire the lock.

Reported by: syzbot+a76b19ea2f8e1190c451@syzkaller.appspotmail.com
Reported by: syzbot+a1b6cef257ad145b7187@syzkaller.appspotmail.com
Reviewed by: tuexen
Fixes: bd4a39cc93d9 ("socket: Properly interlock when transitioning to a listening socket")
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31878

3 years agodummynet: remove unused definitions
Kristof Provost [Wed, 16 Jun 2021 14:52:25 +0000 (16:52 +0200)]
dummynet: remove unused definitions

No functional change.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31806

3 years agonetpfil tests: IPv6 dummynet queue test
Kristof Provost [Thu, 2 Sep 2021 13:40:51 +0000 (15:40 +0200)]
netpfil tests: IPv6 dummynet queue test

Same as the v4 test, but with IPv6.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31789

3 years agonetpfil tests: dummynet queue test
Kristof Provost [Thu, 2 Sep 2021 13:38:04 +0000 (15:38 +0200)]
netpfil tests: dummynet queue test

Test prioritisation and dummynet queues.
We need to give the pipe sufficient bandwidth for dummynet to work.
Given that we can't rely on the TCP connection failing alltogether, but
we can measure the effect of dummynet by imposing a time limit on a
larger data transfer.

If TCP is prioritised it'll get most of the pipe bandwidth and easily
manage to transfer the data in 3 seconds or less. When not prioritised
this will not succeed.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31788

3 years agodummynet tests: pipe test for IPv6
Kristof Provost [Mon, 14 Jun 2021 19:24:59 +0000 (21:24 +0200)]
dummynet tests: pipe test for IPv6

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31787

3 years agoipfw: Introduce dnctl
Kristof Provost [Tue, 25 May 2021 14:54:32 +0000 (16:54 +0200)]
ipfw: Introduce dnctl

Introduce a link to the ipfw command, dnctl, for dummynet configuration.
dnctl only handles dummynet configuration, and is part of the effort to
support dummynet in pf.

/sbin/ipfw continues to accept pipe, queue and sched commands, but these can
now also be issued via the new dnctl command.

Reviewed by: donner
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30465

3 years agosctp: minor cleanups, no functional change intended
Michael Tuexen [Wed, 8 Sep 2021 13:13:05 +0000 (15:13 +0200)]
sctp: minor cleanups, no functional change intended

3 years agoloader: implement mount/unmount rootfs
Toomas Soome [Thu, 12 Aug 2021 05:45:52 +0000 (08:45 +0300)]
loader: implement mount/unmount rootfs

We want to keep our root file system open to preserve bcache segment
between file accesses, thus reducing physical disk IO.

Reviewed by: imp, allanjude, kevans (previous version)
Differential Revision: https://reviews.freebsd.org/D30848
MFC after: 1 month

3 years agoi386 loaders: avoid lld 13 garbage collecting linker sets
Dimitry Andric [Wed, 8 Sep 2021 12:04:13 +0000 (14:04 +0200)]
i386 loaders: avoid lld 13 garbage collecting linker sets

Because lld 13 and higher default to garbage collecting start/stop
symbols when using --gc-sections, the linker sets used in the i386 boot
loaders will disappear. This leads to the loaders not recognizing any
commands, and failure to boot.

Until we have a good set of linker scripts for the loaders, work around
it by disabling the start-stop-gc feature.

MFC after: 1 week

3 years agopowerpc64: fix radix on pseries TLB invalidation
Leandro Lupori [Wed, 8 Sep 2021 11:37:11 +0000 (08:37 -0300)]
powerpc64: fix radix on pseries TLB invalidation

When running in a virtualized environment, TLB invalidations can only
be performed on process scope, as only the hypervisor is allowed to
invalidate a global scope, or else a Program Interrupt is triggered.

Since we are here, also make sure that the register process table
hypercall returns success.

Reviewed by: jhibbits
MFC after: 2 weeks
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D31775

3 years agotop(1): indicate how to reset grep string
John Grafton [Tue, 7 Sep 2021 17:39:59 +0000 (13:39 -0400)]
top(1): indicate how to reset grep string

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/536/files

3 years agoopenssh: remove unnecessary $FreeBSD$ tags
Ed Maste [Wed, 8 Sep 2021 01:48:15 +0000 (21:48 -0400)]
openssh: remove unnecessary $FreeBSD$ tags

Diff reduction against upstream: remove $FreeBSD$ tags from files where
the tag itself is the only difference from upstream.

3 years agoDisable acpi_timer_test by default
Colin Percival [Tue, 7 Sep 2021 23:59:45 +0000 (16:59 -0700)]
Disable acpi_timer_test by default

This disables testing the ACPI timer by default, forcing the use of
ACPI-fast rather than ACPI-safe.  The broken-ACPI-timers workaround
can be re-enabled by setting the hw.acpi.timer_test_enabled=1 tunable.

This speeds up the FreeBSD boot process by 140 ms on an EC2 c5.xlarge
instance.

This change will not be MFCed.

Assuming no problems are reported, acpi_timer_test, the associated
tunable, and the ACPI-safe timecounter should be removed in FreeBSD 15.

Relnotes: The ACPI-safe timer is disabled in favour of ACPI-fast;
if timekeeping issues are observed, please test with
hw.acpi.timer_test_enabled=1 in loader.conf and report
if that fixes the problem.

3 years agoHide acpi_timer_test behind a tunable
Colin Percival [Tue, 7 Sep 2021 23:58:18 +0000 (16:58 -0700)]
Hide acpi_timer_test behind a tunable

When hw.acpi.timer_test_enabled is set to 0, this makes acpi_timer_test
return 1 without actually testing the ACPI timer; this results in the
ACPI-fast timecounter always being used rather than potentially using
ACPI-safe.

The ACPI timer testing was introduced in 2002 as a workaround for
errata in Pentium II and Pentium III chipsets, and is unlikely to be
needed in 2021.

While I'm here, add TSENTER/TSEXIT to make it easier to see the time
spent on the test (if it is enabled).

Reviewed by: allanjude, imp
MFC After: 1 week

3 years agoopenssh: update to OpenSSH v8.7p1
Ed Maste [Wed, 8 Sep 2021 01:05:51 +0000 (21:05 -0400)]
openssh: update to OpenSSH v8.7p1

Some notable changes, from upstream's release notes:

- sshd(8): Remove support for obsolete "host/port" syntax.
- ssh(1): When prompting whether to record a new host key, accept the key
  fingerprint as a synonym for "yes".
- ssh-keygen(1): when acting as a CA and signing certificates with an RSA
  key, default to using the rsa-sha2-512 signature algorithm.
- ssh(1), sshd(8), ssh-keygen(1): this release removes the "ssh-rsa"
  (RSA/SHA1) algorithm from those accepted for certificate signatures.
- ssh-sk-helper(8): this is a new binary. It is used by the FIDO/U2F
  support to provide address-space isolation for token middleware
  libraries (including the internal one).
- ssh(1): this release enables UpdateHostkeys by default subject to some
  conservative preconditions.
- scp(1): this release changes the behaviour of remote to remote copies
  (e.g. "scp host-a:/path host-b:") to transfer through the local host
  by default.
- scp(1): experimental support for transfers using the SFTP protocol as
  a replacement for the venerable SCP/RCP protocol that it has
  traditionally used.

Additional integration work is needed to support FIDO/U2F in the base
system.

Deprecation Notice
------------------

OpenSSH will disable the ssh-rsa signature scheme by default in the
next release.

Reviewed by: imp
MFC after: 1 month
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29985

3 years agoVOP_COPY_FILE_RANGE: Add a COPY_FILE_RANGE_TIMEO1SEC flag
Rick Macklem [Wed, 8 Sep 2021 00:35:26 +0000 (17:35 -0700)]
VOP_COPY_FILE_RANGE: Add a COPY_FILE_RANGE_TIMEO1SEC flag

Although it is not specified in the RFCs, the concept that
the NFSv4 server should reply to an RPC request within a
reasonable time is accepted practice within the NFSv4 community.

Without this patch, the NFSv4.2 server attempts to reply to
a Copy operation within 1second by limiting the copy to
vfs.nfs.maxcopyrange bytes (default 10Mbytes). This is crude at
best, given the large variation in I/O subsystem performance.

This patch adds a kernel only flag COPY_FILE_RANGE_TIMEO1SEC
that the NFSv4.2 can specify, which tells VOP_COPY_FILE_RANGE()
to return after approximately 1 second with a partial result and
implements this in vn_generic_copy_file_range(), used by
vop_stdcopyfilerange().

Modifying the NFSv4.2 server to set this flag will be done in
a separate patch.  Also under consideration is exposing the
COPY_FILE_RANGE_TIMEO1SEC to userland for use on the FreeBSD
copy_file_range(2) syscall.

MFC after: 2 weeks
Reviewed by: khng
Differential Revision: https://reviews.freebsd.org/D31829

3 years agocxgbe(4): Fix the decode and display of the DBVFIFO region in meminfo.
Navdeep Parhar [Tue, 7 Sep 2021 23:28:11 +0000 (16:28 -0700)]
cxgbe(4): Fix the decode and display of the DBVFIFO region in meminfo.

MFC after: 1 week
Sponsored by: Chelsio Communications

3 years agocxgbe(4): Display HMA information in meminfo.
Navdeep Parhar [Tue, 7 Sep 2021 20:39:44 +0000 (13:39 -0700)]
cxgbe(4): Display HMA information in meminfo.

This should have been added with initial T6 support many years ago.

MFC after: 1 week
Sponsored by: Chelsio Communications

3 years agorouting: fix source address selection rules for IPv4 over IPv6.
Alexander V. Chernikov [Mon, 6 Sep 2021 22:08:15 +0000 (22:08 +0000)]
routing: fix source address selection rules for IPv4 over IPv6.

Current logic always selects an IFA of the same family from the
 outgoing interfaces. In IPv4 over IPv6 setup there can be just
 single non-127.0.0.1 ifa, attached to the loopback interface.

Create a separate rt_getifa_family() to handle entire ifa selection
 for the IPv4 over IPv6.

Differential Revision: https://reviews.freebsd.org/D31868
MFC after: 1 week

3 years agoBump __FreeBSD_version for the recent socket KPI changes
Mark Johnston [Tue, 7 Sep 2021 21:14:36 +0000 (17:14 -0400)]
Bump __FreeBSD_version for the recent socket KPI changes

Sponsored by: The FreeBSD Foundation

3 years agosocket: Avoid clearing SS_ISCONNECTING if soconnect() fails
Mark Johnston [Tue, 7 Sep 2021 18:51:54 +0000 (14:51 -0400)]
socket: Avoid clearing SS_ISCONNECTING if soconnect() fails

This behaviour appears to date from the 4.4 BSD import.  It has two
problems:

1. The update to so_state is not protected by the socket lock, so
   concurrent updates to so_state may be lost.
2. Suppose two threads race to call connect(2) on a socket, and one
   succeeds while the other fails.  Then the failing thread may
   incorrectly clear SS_ISCONNECTING, confusing the state machine.

Simply remove the update.  It does not appear to be necessary:
pru_connect implementations which call soisconnecting() only do so after
all failure modes have been handled.  For instance, tcp_connect() and
tcp6_connect() will never return an error after calling soisconnected().
However, we cannot correctly assert that SS_ISCONNECTED is not set after
an error from soconnect() since the socket lock is not held across the
pru_connect call, so a concurrent connect(2) may have set the flag.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31699

3 years agosctp: Remove special handling for a listen(2) backlog of 0
Mark Johnston [Tue, 7 Sep 2021 18:51:19 +0000 (14:51 -0400)]
sctp: Remove special handling for a listen(2) backlog of 0

... when applied to one-to-one-style sockets.  sctp_listen() cannot be
used to toggle the listening state of such a socket.  See RFC 6458's
description of expected listen(2) semantics for one-to-one- and
one-to-many-style sockets.

Reviewed by: tuexen
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31774

3 years agosocket: Remove unneeded SOLISTENING checks
Mark Johnston [Tue, 7 Sep 2021 18:50:02 +0000 (14:50 -0400)]
socket: Remove unneeded SOLISTENING checks

Now that SOCK_IO_*_LOCK() checks for listening sockets, we can eliminate
some racy SOLISTENING() checks.  No functional change intended.

Reviewed by: tuexen
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31660

3 years agosocket: Properly interlock when transitioning to a listening socket
Mark Johnston [Tue, 7 Sep 2021 18:49:53 +0000 (14:49 -0400)]
socket: Properly interlock when transitioning to a listening socket

Currently, most protocols implement pru_listen with something like the
following:

SOCK_LOCK(so);
error = solisten_proto_check(so);
if (error) {
SOCK_UNLOCK(so);
return (error);
}
solisten_proto(so);
SOCK_UNLOCK(so);

solisten_proto_check() fails if the socket is connected or connecting.
However, the socket lock is not used during I/O, so this pattern is
racy.

The change modifies solisten_proto_check() to additionally acquire
socket buffer locks, and the calling thread holds them until
solisten_proto() or solisten_proto_abort() is called.  Now that the
socket buffer locks are preserved across a listen(2), this change allows
socket I/O paths to properly interlock with listen(2).

This fixes a large number of syzbot reports, only one is listed below
and the rest will be dup'ed to it.

Reported by: syzbot+9fece8a63c0e27273821@syzkaller.appspotmail.com
Reviewed by: tuexen, gallatin
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31659

3 years agosocket: Move sockbuf mutexes into the owning socket
Mark Johnston [Tue, 7 Sep 2021 18:49:40 +0000 (14:49 -0400)]
socket: Move sockbuf mutexes into the owning socket

This is necessary to provide proper interlocking with listen(2), which
destroys the socket buffers.  Otherwise, code must lock the socket
itself and check SOLISTENING(so), but most I/O paths do not otherwise
need to acquire the socket lock, so the extra overhead needed to check a
rare error case is undesirable.

listen(2) calls are relatively rare.  Thus, the strategy is to have it
acquire all socket buffer locks when transitioning to a listening
socket.  To do this safely, these locks must be stable, and not
destroyed during listen(2) as they are today.  So, move them out of the
sockbuf and into the owning socket.  For the sockbuf mutexes, keep a
pointer to the mutex in the sockbuf itself, for now.  This can be
removed by replacing SOCKBUF_LOCK() etc. with macros which operate on
the socket itself, as was done for the sockbuf I/O locks.

Reviewed by: tuexen, gallatin
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31658

3 years agosocket: Rename sb(un)lock() and interlock with listen(2)
Mark Johnston [Tue, 7 Sep 2021 18:49:31 +0000 (14:49 -0400)]
socket: Rename sb(un)lock() and interlock with listen(2)

In preparation for moving sockbuf locks into the containing socket,
provide alternative macros for the sockbuf I/O locks:
SOCK_IO_SEND_(UN)LOCK() and SOCK_IO_RECV_(UN)LOCK().  These operate on a
socket rather than a socket buffer.  Note that these locks are used only
to prevent concurrent readers and writters from interleaving I/O.

When locking for I/O, return an error if the socket is a listening
socket.  Currently the check is racy since the sockbuf sx locks are
destroyed during the transition to a listening socket, but that will no
longer be true after some follow-up changes.

Modify a few places to check for errors from
sblock()/SOCK_IO_(SEND|RECV)_LOCK() where they were not before.  In
particular, add checks to sendfile() and sorflush().

Reviewed by: tuexen, gallatin
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31657

3 years agosocket: Reorder socket and sockbuf fields to eliminate some padding
Mark Johnston [Tue, 7 Sep 2021 18:45:22 +0000 (14:45 -0400)]
socket: Reorder socket and sockbuf fields to eliminate some padding

This is in preparation for moving sockbuf locks into the owning socket,
in order to provide proper interlocking for listen(2).  In particular,
listening sockets do not use the socket buffers and repurpose that space
in struct socket for their own purposes.  Moving the locks out of the
socket buffers and into the socket proper makes it possible to safely
lock socket buffers and test for a listening socket before deciding how
to proceed.

Reordering these fields saves some space and helps ensure that UMA will
provide the same space efficiency for sockets as before.  No functional
change intended.

Reviewed by: tuexen, gallatin
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31656

3 years agoswap_pager: Handle large swap_pager_reserve() requests
Mark Johnston [Tue, 7 Sep 2021 18:03:52 +0000 (14:03 -0400)]
swap_pager: Handle large swap_pager_reserve() requests

This interface is used solely by md(4) when the MD_RESERVE flag is
specified, as in `mdconfig -a -t swap -s 1G -o reserve`.  It
pre-allocates swap blocks for the entire object.

The number of blocks to be reserved is specified as a vm_size_t, but
swp_pager_getswapspace() can allocate at most INT_MAX blocks.  vm_size_t
also seems like the incorrect type to use here it refers only to the
size of the VM object, not the size of a mapping.  So:
- change the type of "size" in swap_pager_reserve() to vm_pindex_t, and
- clamp the requested number of blocks for a single
  swp_pager_getswapspace() call to INT_MAX.

Reported by: syzkaller
Reviewed by: dougm, alc, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31875

3 years agodtrace.1: Document a couple of preprocessor-related options
Mark Johnston [Tue, 7 Sep 2021 18:03:23 +0000 (14:03 -0400)]
dtrace.1: Document a couple of preprocessor-related options

Suggested by: swills
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agomprotect.2: Improve the description of prot
Brooks Davis [Tue, 7 Sep 2021 16:28:50 +0000 (17:28 +0100)]
mprotect.2: Improve the description of prot

The new wording for standard flags is losely based on the POSIX
description.

Make it clearer that PROT_MAX() is a local extension.

Reviewed by: alc, mckusick, imp, kib, markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D31777

3 years agogenoffset.sh: Use 10 X's instead of 5 for pick mkdtemp implementations
Warner Losh [Tue, 7 Sep 2021 16:08:51 +0000 (10:08 -0600)]
genoffset.sh: Use 10 X's instead of 5 for pick mkdtemp implementations

Linux fails to build now because the mkdtemp in the bootstrapped
environment wants 6 or more X's. Use 10 out of an abundance of caution.

Sponsored by: Netflix
Reviewed by: arichards
Differential Revision: https://reviews.freebsd.org/D31863

3 years agocdefs.h: Remove redundant #ifdefs
Warner Losh [Tue, 7 Sep 2021 15:34:02 +0000 (09:34 -0600)]
cdefs.h: Remove redundant #ifdefs

Remove redunant #ifdef __GNUC__ inside an #if defined(__GNUC__)
block. They are nops.

Sponsored by: Netflix

3 years agodtrace.1: Document -x ldpath
Mark Johnston [Tue, 7 Sep 2021 15:18:28 +0000 (11:18 -0400)]
dtrace.1: Document -x ldpath

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agokqueue.2: Document the fact that EVFILT_READ can be used on kqueues
Mark Johnston [Tue, 7 Sep 2021 15:17:33 +0000 (11:17 -0400)]
kqueue.2: Document the fact that EVFILT_READ can be used on kqueues

Reviewed by: bcr, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31864

3 years agoip6mrouter: Make the expiration callout MPSAFE
Mark Johnston [Tue, 7 Sep 2021 15:15:49 +0000 (11:15 -0400)]
ip6mrouter: Make the expiration callout MPSAFE

- Protect the `expire_upcalls` callout with the MFC6 mutex.  The callout
  handler needs this mutex anyway.
- Convert the MROUTER6 mutex to a sleepable sx lock.  It is only used
  when configuring the global v6 multicast routing socket, so is only
  used in system call paths where sleeping is safe.  This lets us drain
  the callout without having to drop the lock.
- For all locking macros in the file, convert to using a _LOCKPTR macro.

Reported by: mav
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31836

3 years agoefirt: Mark buffers filled out by EFI firmware as initialized
Mark Johnston [Tue, 7 Sep 2021 14:07:04 +0000 (10:07 -0400)]
efirt: Mark buffers filled out by EFI firmware as initialized

Otherwise KMSAN may report false positives.

Sponsored by: The FreeBSD Foundation

3 years agond6: Make the DAD callout MPSAFE
Mark Johnston [Tue, 7 Sep 2021 13:49:47 +0000 (09:49 -0400)]
nd6: Make the DAD callout MPSAFE

Interface addresses with pending duplicate address detection (DAD) live
in a global queue.  In this case, a callout is associated with each
entry.  The callout transmits neighbour solicitations until the system
decides the address is no longer tentative, or until a duplicate address
is discovered.  At this point the entry is dequeued and freed.  DAD may
be manually stopped as well.

The callout currently runs (and potentially transmits packets) with
Giant held.  Reorganize DAD queue locking to interlock properly with the
callout:

- Configure the callout to acquire the DAD queue lock before running.
  The lock is dropped before transmitting any packets.  Stop protecting
  the callout with Giant.
- When looking up DAD queue entries for an incoming NS or NA, don't
  bother fiddling with the DAD queue entry reference count.
- Split nd6_dad_starttimer() so that the caller is responsible to
  transmitting a NS if it so desires.
- Remove the DAD entry from the queue before stopping the timer.  Use a
  temporary reference to make sure that the entry doesn't get freed by
  the callout while we're draining.

Reported by: mav
Reviewed by: bz, hrs
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31826

3 years agog_label: Handle small sector sizes when tasting
Mark Johnston [Tue, 7 Sep 2021 13:46:58 +0000 (09:46 -0400)]
g_label: Handle small sector sizes when tasting

Make sure that the provider sector size is large enough to contain a
valid label before trying to read it.  We performed this check already
for most label types, but not for several filesystem labels.

Reported by: syzbot+f52918174cdf193ae29c@syzkaller.appspotmail.com
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agosctp: Fix iterator synchronization in sctp_sendall()
Mark Johnston [Tue, 7 Sep 2021 13:44:57 +0000 (09:44 -0400)]
sctp: Fix iterator synchronization in sctp_sendall()

- The SCTP_PCB_FLAGS_SND_ITERATOR_UP check was racy, since two threads
  could observe that the flag is not set and then both set it.  I'm not
  sure if this is actually a problem in practice, i.e., maybe there's no
  problem having multiple sends for a single PCB in the iterator list?
- sctp_sendall() was modifying sctp_flags without the inp lock held.

The change simply acquires the PCB write lock before toggling the flag,
fixing both problems.

Reviewed by: tuexen
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31813

3 years agosctp: Remove an unused sctp_inpcb field
Mark Johnston [Tue, 7 Sep 2021 13:44:48 +0000 (09:44 -0400)]
sctp: Remove an unused sctp_inpcb field

This appears to be unused in usrsctp as well.  No functional change
intended.

Reviewed by: tuexen
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31812

3 years agosctp: Fix races around sctp_inpcb_free()
Mark Johnston [Tue, 7 Sep 2021 13:44:12 +0000 (09:44 -0400)]
sctp: Fix races around sctp_inpcb_free()

sctp_close() and sctp_abort() disassociate the PCB from its socket.
As a part of this, they attempt to free the PCB, which may end up
lingering.  Fix some bugs in this area:

- For some reason, sctp_close() and sctp_abort() set
  SCTP_PCB_FLAGS_SOCKET_GONE using an atomic compare-and-set without the
  PCB lock held.  This is racy since sctp_flags is normally updated
  without atomics, using the PCB lock to synchronize.  So, the update
  can be lost, which can cause all sort of races with other SCTP
  components which look for the _GONE flag.  Fix the problem simply by
  acquiring the PCB lock in order to set the flag.  Note that we have to
  drop and re-acquire the lock again in sctp_inpcb_free(), but I don't
  see a good way around that for now.  If it's a real problem, the _GONE
  flag could be split out of sctp_flags and into a dedicated sctp_inpcb
  field.
- In sctp_inpcb_free(), load sctp_socket after acquiring the PCB lock,
  to avoid possible races with parallel sctp_inpcb_free() calls.
- Add an assertion sctp_inpcb_free() to verify that _ALLGONE is not set.

Reviewed by: tuexen
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31811

3 years agopf: remove unused function prototype
Kristof Provost [Tue, 7 Sep 2021 12:33:59 +0000 (14:33 +0200)]
pf: remove unused function prototype

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

3 years agowpa: Address CTRL-EVENT-SCAN-FAILED
Cy Schubert [Tue, 7 Sep 2021 01:48:39 +0000 (18:48 -0700)]
wpa: Address CTRL-EVENT-SCAN-FAILED

Some installations may experience CTRL-EVENT-SCAN-FAILED when
associating to an AP. Installations that specify
ifconfig_wlan0="WPA ... up" in rc.conf do not experience
the problem whereas those which specify ifconfig_wlan0="WPA" without
the "up" will experience CTRL-EVENT-SCAN_FAILED.

However those that specify "up" in ifconfig_wlan0 will be able to
reproduce this problem by service netif stop wlan0;
service netif start wlan0. Interestingly The service netif stop/start
problem is reproducible on the older wpa 2.9 as well.

Reported by: dhw
Reported by: "Oleg V. Nauman" <oleg _ theweb_org_ua>
Reported by: Filipe da Silva Santos <contact _ shiori_com_br>
Reported by: Jakob Alvermark <jakob _ alvermark_net>
MFC after: 3 days

3 years agoFix cross-builds after 4e5d32a445f90d37966cd6de571978551654e3f3
Jose Luis Duran [Mon, 30 Aug 2021 19:29:17 +0000 (16:29 -0300)]
Fix cross-builds after 4e5d32a445f90d37966cd6de571978551654e3f3

Add alignment macros to cross-build's sys/cdefs.h

Pull Request: https://github.com/freebsd/freebsd-src/pull/531
MFC after: immediately (build fix)

3 years agopkgbase: Create a FreeBSD-ftp package
Emmanuel Vadot [Thu, 2 Sep 2021 15:14:20 +0000 (17:14 +0200)]
pkgbase: Create a FreeBSD-ftp package

ftp tools aren't that useful nowadays but some might want them.
Create a FreeBSD-ftp package so users have a choice to have
them or not.

Differential Revision: https://reviews.freebsd.org/D31794

3 years agopkgbase: Create a FreeBSD-hyperv package
Emmanuel Vadot [Thu, 2 Sep 2021 15:13:45 +0000 (17:13 +0200)]
pkgbase: Create a FreeBSD-hyperv package

Put all hyperv utilities in it.

Differential Revision:  https://reviews.freebsd.org/D31805

3 years agopkgbase: Remove libefivar package and add a efi-tools one
Emmanuel Vadot [Thu, 2 Sep 2021 15:12:51 +0000 (17:12 +0200)]
pkgbase: Remove libefivar package and add a efi-tools one

Put all the efi related tools into FreeBSD-efi-tools.

Differential Revision: https://reviews.freebsd.org/D31803

3 years agopkgbase: Remove FreeBSD-libregex package
Emmanuel Vadot [Thu, 2 Sep 2021 06:14:56 +0000 (08:14 +0200)]
pkgbase: Remove FreeBSD-libregex package

The only user of libregex is grep (and its variation), no need for a
dedicated package.
This moves libregex to the default package (FreeBSD-utilities).

Differential Revision: https://reviews.freebsd.org/D31802

3 years agopkgbase: Create a FreeBSD-kerberos package
Emmanuel Vadot [Thu, 2 Sep 2021 04:09:15 +0000 (06:09 +0200)]
pkgbase: Create a FreeBSD-kerberos package

This allows users to install or not kerberos related utilities
and libs.

Differential Revision: https://reviews.freebsd.org/D31801

3 years agopkgbase: Put libbsdxml in FreeBSD-runtime
Emmanuel Vadot [Wed, 1 Sep 2021 18:25:50 +0000 (20:25 +0200)]
pkgbase: Put libbsdxml in FreeBSD-runtime

libbsdxml is used by a lot of programs so just put it in FreeBSD-runtime.

Differential Revision: https://reviews.freebsd.org/D31800
Reviewed by: emaste

3 years agopkgbase: Create a FreeBSD-rdma package
Emmanuel Vadot [Wed, 1 Sep 2021 18:23:56 +0000 (20:23 +0200)]
pkgbase: Create a FreeBSD-rdma package

Put all the rdma related tools into this package.

Differential Revision:  https://reviews.freebsd.org/D31799

3 years agopkgbase: Create a syscons-data package
Emmanuel Vadot [Wed, 1 Sep 2021 17:58:27 +0000 (19:58 +0200)]
pkgbase: Create a syscons-data package

syscons is mostly deprecated and all it's files aren't needed for most
users so create a separate package for them.

Differential Revision:    https://reviews.freebsd.org/D31798
Reviewed by: emaste

3 years agopkgbase: Create a vt-data package
Emmanuel Vadot [Wed, 1 Sep 2021 17:56:55 +0000 (19:56 +0200)]
pkgbase: Create a vt-data package

vt files for either keyboards and fonts are totally optional
so create a separate package for them.

Differential Revision:      https://reviews.freebsd.org/D31797

3 years agopkgbase: Create a FreeBSD-dwatch package
Emmanuel Vadot [Wed, 1 Sep 2021 17:38:40 +0000 (19:38 +0200)]
pkgbase: Create a FreeBSD-dwatch package

While dwatch is useful some users might not want it by default.
Create a package for it.

Differential Revision: https://reviews.freebsd.org/D31796

3 years agopkgbase: Create a mlx-tools package
Emmanuel Vadot [Wed, 1 Sep 2021 17:12:09 +0000 (19:12 +0200)]
pkgbase: Create a mlx-tools package

mlx* are only useful for users who have a Mellanox card.
Create a package for it so users that don't have this card can
avoid having this program.

Differential Revision: https://reviews.freebsd.org/D31795

3 years agopkgbase: Create a cxgbe-tools package
Emmanuel Vadot [Wed, 1 Sep 2021 17:08:49 +0000 (19:08 +0200)]
pkgbase: Create a cxgbe-tools package

cxgbetool is only useful for users who have a Chelsio card.
Create a package for it so users that don't have this card can
avoid having this program.

Differential Revision: https://reviews.freebsd.org/D31793

3 years agopkgbase: Move spppcontrol to FreeBSD-ppp
Emmanuel Vadot [Wed, 1 Sep 2021 17:03:38 +0000 (19:03 +0200)]
pkgbase: Move spppcontrol to FreeBSD-ppp

This program belong with the other ppp-related programs.

Differential Revision:  https://reviews.freebsd.org/D31792
Reviewed by: emaste

3 years agopkgbase: Create a FreeBSD-telnet package
Emmanuel Vadot [Wed, 1 Sep 2021 17:02:00 +0000 (19:02 +0200)]
pkgbase: Create a FreeBSD-telnet package

both telnet and telnetd aren't that useful nowadays but some
might want them.
Create a FreeBSD-telnet package so users have a choice to have
them or not.

Differential Revision: https://reviews.freebsd.org/D31791
Reviewed by: emaste

3 years agopkgbase: Create a FreeBSD-ggate package
Emmanuel Vadot [Wed, 1 Sep 2021 15:16:07 +0000 (17:16 +0200)]
pkgbase: Create a FreeBSD-ggate package

Move ggate* to it.

Differential Revision: https://reviews.freebsd.org/D31790

3 years agoixgbe: increase the timeout
Qiming Yang [Wed, 10 Jan 2018 16:04:33 +0000 (00:04 +0800)]
ixgbe: increase the timeout

Increase SECRX_RDY polling frequency and semaphore timeout which
fixes the FWSW.PT check in ixgbe_mng_present().

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Approved by: imp
Obtained from: DPDK (6175260d12cc22852cecf2fb7ecd95cdb07611b5)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31621

3 years agoixgbe: cleanup spelling mistakes in comments
Guinan Sun [Thu, 9 Jul 2020 08:00:33 +0000 (08:00 +0000)]
ixgbe: cleanup spelling mistakes in comments

Several functions in the driver code have a weird function comment
formatting which uses two spaces instead of only one space for the main
function body.

This formatting will be mechanically fixed by sed in a future patch, but
doing so leads to some spelling warnings on that patch. Cleanup the
spelling mistakes that will be detected first. This way, it is easier to
verify the mechanical transformation done by sed in the following patch.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Approved by: imp
Obtained from: DPDK (fc75eee32037c1379e77e57031c1c353badd2272)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31621

3 years agoixgbe: remove unnecessary return value check
Guinan Sun [Thu, 9 Jul 2020 08:00:38 +0000 (08:00 +0000)]
ixgbe: remove unnecessary return value check

Remove unnecessary return value check.

Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Approved by: imp
Obtained from: DPDK (4b0ee6529b7897c2a08dd56669f07ac1f46a8474)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31621

3 years agoixgbe: create function to restart autoneg
Guinan Sun [Thu, 9 Jul 2020 08:00:36 +0000 (08:00 +0000)]
ixgbe: create function to restart autoneg

This patch is for restarting auto negotiation on PHY.

Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Approved by: imp
Obtained from: DPDK (664ea2614eafbec8eda5c86764ff047475a1e5c6)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31621