]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agocontrib/libarchive: Import libarchive 3.5.1
Martin Matuska [Sun, 27 Dec 2020 23:34:06 +0000 (00:34 +0100)]
contrib/libarchive: Import libarchive 3.5.1

Merge commit '8be2bb3d35e232080b4e39244020e650bbe31562' into main

3 years agoUpdate vendor/libarchive/dist to 227a4b9719a7fbeba6ba46e377ff7d953f405cd5
Martin Matuska [Sun, 27 Dec 2020 23:06:27 +0000 (00:06 +0100)]
Update vendor/libarchive/dist to 227a4b9719a7fbeba6ba46e377ff7d953f405cd5

Libarchive 3.5.1

3 years agoMerge commit d8a09b3a0 from openzfs git (by Ryan Libby):
Ryan Libby [Sun, 27 Dec 2020 22:33:13 +0000 (14:33 -0800)]
Merge commit d8a09b3a0 from openzfs git (by Ryan Libby):

  lua: avoid gcc -Wreturn-local-addr bug

  Avoid a bug with gcc's -Wreturn-local-addr warning with some
  obfuscation.  In buggy versions of gcc, if a return value is an
  expression that involves the address of a local variable, and even if
  that address is legally converted to a non-pointer type, a warning may
  be emitted and the value of the address may be replaced with zero.
  Howerver, buggy versions don't emit the warning or replace the value
  when simply returning a local variable of non-pointer type.

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90737

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Libby <rlibby@FreeBSD.org>
  Closes #11337

3 years agoMerge commit 956f94010 from openzfs git (by Ryan Libby):
Ryan Libby [Sun, 27 Dec 2020 22:33:13 +0000 (14:33 -0800)]
Merge commit 956f94010 from openzfs git (by Ryan Libby):

  spa: avoid type narrowing warning

  Building the spa module for i386 caused gcc to emit
  -Wint-to-pointer-cast "cast to pointer from integer of different size"
  because spa.spa_did was uint64_t but pthread_join (via thread_join in
  spa_deactivate) takes a pointer (32-bit on i386).  Define spa_did to be
  pointer-size instead.  For now spa_did is in fact never non-zero and the
  thread_join could instead be ifdef'd out, but changing the size of
  spa_did may be more useful for the future.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Libby <rlibby@FreeBSD.org>
  Closes #11336

3 years agoMerge commit c7500ded3 from openzfs git (by Ryan Libby):
Ryan Libby [Sun, 27 Dec 2020 22:33:13 +0000 (14:33 -0800)]
Merge commit c7500ded3 from openzfs git (by Ryan Libby):

  FreeBSD libzfs: gcc requires __thread after static

  Building libzfs with gcc on FreeBSD failed because gcc is picky about
  the order of keywords in declarations with __thread, whereas clang is
  more relaxed.

  https://gcc.gnu.org/onlinedocs/gcc/Thread-Local.html

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ryan Libby <rlibby@FreeBSD.org>
  Closes #11331

3 years agoMerge commit 3fcd73747 from openzfs git (by Adrian Chadd):
Ryan Libby [Sun, 27 Dec 2020 22:33:13 +0000 (14:33 -0800)]
Merge commit 3fcd73747 from openzfs git (by Adrian Chadd):

  Fix compiling on FreeBSD + gcc - don't assume illmnos bits

  This looks like it was once from the illumnos compat code.
  FreeBSD doesn't have cmn_err as a compiler format attribute, so
  it definitely errors out.

  It doesn't show up on LLVM because it doesn't trigger at all.

  Add in the format flags but keep them behind #if 0 for now;
  there are too many format issues that trigger when one does
  format checking in the shared code.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: adrian chadd <adrian@freebsd.org>
  Closes #11068
  Closes #11069

3 years agoMerge commit 79a357c2a from openzfs git (by Adrian Chadd):
Ryan Libby [Sun, 27 Dec 2020 22:33:13 +0000 (14:33 -0800)]
Merge commit 79a357c2a from openzfs git (by Adrian Chadd):

  Fix pointer-is-uint64_t-sized assumption in the ioctl path

  This shows up when compiling freebsd-head on amd64 using gcc-6.4.
  The lib32 compat build ends up tripping over this assumption.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: adrian chadd <adrian@freebsd.org>
  Closes #11068
  Closes #11069

3 years agoopenzfs: fix gcc kernel module builds
Ryan Libby [Sun, 27 Dec 2020 22:33:13 +0000 (14:33 -0800)]
openzfs: fix gcc kernel module builds

 - Suppress -Wredundant-decls.  Ultimately this warning is harmless in
   any case, and it does not look like there is a simple way to avoid
   redundant declarations in this case without a lot of header pollution
   (e.g. having openzfs's shim param.h pulling in sys/kernel.h for hz).
 - Suppress -Wnested-externs, which is useless anyway.

Unfortunately it was not sufficient just to modify OPENZFS_CFLAGS,
because the warning suppressions need to appear on the command line
after they are explicitly enabled by CWARNFLAGS from sys/conf/kern.mk,
but OPENZFS_CFLAGS get added before due to use of -I for the shims.

Reviewed by: markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27685

3 years agomsdosfs: Fix a leak of dirent padding bytes
Mark Johnston [Sun, 27 Dec 2020 21:52:30 +0000 (16:52 -0500)]
msdosfs: Fix a leak of dirent padding bytes

This was missed in r340856 / commit
6d2e2df764199f0a15fd743e79599391959cc17d.  Three bytes from the kernel
stack may be leaked when reading directory entries.

Reported by: Syed Faraz Abrar <faraz@elttam.com>
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

3 years agovm: Fix some bugs in the page busying code
Mark Johnston [Sun, 27 Dec 2020 21:50:54 +0000 (16:50 -0500)]
vm: Fix some bugs in the page busying code

In vm_page_busy_acquire(), load the object pointer using
atomic_load_ptr() as we do elsewhere.  Per the comment, the object
identity must be consistent across sleeps.

In vm_page_grab_sleep(), pass the correct pindex to
_vm_page_busy_sleep().  The pindex is used to re-check the page's
identity before going to sleep.  In particular, vm_page_grab_sleep() is
used in unlocked grab, so the object lock is not necessarily held when
verifying the page's identity, and the pindex may change if the page is
moved, or freed and re-allocated.  I believe this can result in spurious
VM_PAGER_FAILs from vm_page_grab_valid_unlocked() or early termination
of vm_page_grab_pages_unlocked().

In vm_page_grab_pages(), pass the correct pindex to
vm_page_grab_sleep().  Otherwise I believe vm_page_grab_pages() will
effectively spin when attempting to busy a busy page after the first
index in the range.

Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27607

3 years agouma: Remove the MINBUCKET flag from the flag name list
Mark Johnston [Sun, 27 Dec 2020 21:50:24 +0000 (16:50 -0500)]
uma: Remove the MINBUCKET flag from the flag name list

This should have been done in r368399 / commit
f8b6c51538fab88a7a62a399fb0948806b06133c.

Reported by: rlibby
Sponsored by: The FreeBSD Foundation

3 years agomd: Set bio_completed properly in the face of errors
Mark Johnston [Sun, 27 Dec 2020 21:49:35 +0000 (16:49 -0500)]
md: Set bio_completed properly in the face of errors

Account for any residual bytes.  This is only relevant for vnode-backed
md(4) devices.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27738

3 years agoImport bc 3.2.4
Stefan Eßer [Sun, 27 Dec 2020 20:53:09 +0000 (21:53 +0100)]
Import bc 3.2.4

3 years agoReplace sscanf() by strtoul()
Stefan Eßer [Sat, 26 Dec 2020 21:21:49 +0000 (22:21 +0100)]
Replace sscanf() by strtoul()

This change has been motivated by a mail from bde sent in 2015 in
which he mentioned inappropriate use of sscanf() in 3 programs in
/bin.

This change removes the potential mismatch of the types of the return
values and the variable width specified in the scan pattern. While
there was no issue with the patterns and types used, the new code is
simpler and more efficient.

3 years agoSimplify LS_COLWIDTHS processing
Stefan Eßer [Sat, 26 Dec 2020 21:10:54 +0000 (22:10 +0100)]
Simplify LS_COLWIDTHS processing

The previous version normalized the width list (replaced empty fields
with "0") just to be able to use sscanf() on the string.

It is much simpler to just parse the string as-is.

The clearing of f_notabs is preserved for the case that less than 9
width values have been defined, but I do not understand the rationale
for this particular condition. E.g., LS_COLWIDTHS="::::::::" will be
counted as 9 defined fields (may clear f_notabs) but is no different
fron LS_COLWIDTHS="" with regard to the field width (and that does not
clear f_notabs, since there are less than 9 fields).

3 years agoAdjust to display more than 999 sleeping threads
Stefan Eßer [Fri, 25 Dec 2020 11:38:53 +0000 (12:38 +0100)]
Adjust to display more than 999 sleeping threads

3 years agoStatistics are for threads, not processes
Stefan Eßer [Fri, 25 Dec 2020 11:38:17 +0000 (12:38 +0100)]
Statistics are for threads, not processes

3 years agolibsa: xdrproc_t should return bool
Toomas Soome [Sun, 27 Dec 2020 21:19:41 +0000 (23:19 +0200)]
libsa: xdrproc_t should return bool

Since our xdr translation function are returning bool, so should
xdrproc_t.

Issue reported by gcc 10 build.

3 years agocache: modification and last entry filling support in lockless lookup v2
Mateusz Guzik [Sun, 27 Dec 2020 19:19:43 +0000 (19:19 +0000)]
cache: modification and last entry filling support in lockless lookup v2

The previous patch failed to set the ISDOTDOT flag when appropriate,
which in turn fail to properly handle degenerate lookups.

While here sprinkle some extra assertions.

Tested by: pho (previous version)

3 years agocache: assert internal flags are not passed by namei
Mateusz Guzik [Sun, 27 Dec 2020 19:42:16 +0000 (19:42 +0000)]
cache: assert internal flags are not passed by namei

3 years agoRevert "cache: modification and last entry filling support in lockless lookup"
Mateusz Guzik [Sun, 27 Dec 2020 19:02:29 +0000 (19:02 +0000)]
Revert "cache: modification and last entry filling support in lockless lookup"

This reverts commit 6dbb07ed6872ae7988b9b705e322c94658eba6d1.

Some ports unreliably fail to build with rmdir getting ENOTEMPTY.

3 years agoPerform kernel linker ifunc test only for builds
Ed Maste [Sun, 27 Dec 2020 00:34:24 +0000 (19:34 -0500)]
Perform kernel linker ifunc test only for builds

dvl reported that "make installkernel" failed with "amd64/arm64/i386
kernel requires linker ifunc support."  This test should apply to builds
only; the linker is not used at install time.

I think the same (ifunc-supporting) linker used to build the kernel
should be detected at install time in usual cases (and so not trigger
this error).  However, there is no reason to disallow the install, if
for some reason the expected linker isn't the one tested at install
time.

PR: 251580
Reported by: dvl
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

3 years agocache: modification and last entry filling support in lockless lookup
Mateusz Guzik [Sun, 27 Dec 2020 15:28:14 +0000 (15:28 +0000)]
cache: modification and last entry filling support in lockless lookup

Tested by: pho (previous version)

3 years agoEXTRES: Ignore index modifier flags for table based clock dividers.
Michal Meloun [Thu, 4 Jan 2018 12:12:39 +0000 (13:12 +0100)]
EXTRES: Ignore index modifier flags for table based clock dividers.

The divider table already contains the correct HW divider value, it should
not be modified by other flags such as 'CLK_DIV_ZERO_BASED'.

MFC after: 4 weeks

3 years agoamd64 nmi handler: fix comment about %ebx
Konstantin Belousov [Sun, 27 Dec 2020 10:47:36 +0000 (12:47 +0200)]
amd64 nmi handler: fix comment about %ebx

Reported by: markj
MFC after: 3 days

3 years agoamd64: preserve %cr2 in NMI/MCE/DBG handlers.
Konstantin Belousov [Fri, 25 Dec 2020 21:58:43 +0000 (23:58 +0200)]
amd64: preserve %cr2 in NMI/MCE/DBG handlers.

These handlers could interrupt code which has interrupts disabled,
and if a spurious page fault occurs during exception handler run,
we get clobbered %cr2 in higher level stack.

This is mostly a speculation, but it is based on hints from good sources.

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

3 years agoRegen.
Konstantin Belousov [Sun, 27 Dec 2020 10:55:50 +0000 (12:55 +0200)]
Regen.

3 years agoDecode and report native eventfd descriptors from libprocstat and procstat.
Konstantin Belousov [Wed, 23 Dec 2020 14:17:44 +0000 (16:17 +0200)]
Decode and report native eventfd descriptors from libprocstat and procstat.

Submitted by:   greg@unrelenting.technology
Reviewed by:    markj (previous version)
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D26668

3 years agoDocument eventfd().
Konstantin Belousov [Wed, 23 Dec 2020 14:17:09 +0000 (16:17 +0200)]
Document eventfd().

Submitted by:   greg@unrelenting.technology
Reviewed by:    bcr, markj (previous version)
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D26668

3 years agokqueue(2): Use .Fo instead .Ft
Konstantin Belousov [Wed, 23 Dec 2020 15:22:09 +0000 (17:22 +0200)]
kqueue(2): Use .Fo instead .Ft

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

3 years agoAdd eventfd(3) wrappers to libc.
Konstantin Belousov [Wed, 23 Dec 2020 14:16:35 +0000 (16:16 +0200)]
Add eventfd(3) wrappers to libc.

eventfd_read/write one-liners are from musl libc.

Submitted by:   greg@unrelenting.technology
Reviewed by:    markj (previous version)
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D26668

3 years agoExpose eventfd in the native API/ABI using a new __specialfd syscall
Konstantin Belousov [Wed, 23 Dec 2020 14:14:04 +0000 (16:14 +0200)]
Expose eventfd in the native API/ABI using a new __specialfd syscall

eventfd is a Linux system call that produces special file descriptors
for event notification. When porting Linux software, it is currently
usually emulated by epoll-shim on top of kqueues.  Unfortunately, kqueues
are not passable between processes.  And, as noted by the author of
epoll-shim, even if they were, the library state would also have to be
passed somehow.  This came up when debugging strange HW video decode
failures in Firefox.  A native implementation would avoid these problems
and help with porting Linux software.

Since we now already have an eventfd implementation in the kernel (for
the Linuxulator), it's pretty easy to expose it natively, which is what
this patch does.

Submitted by:   greg@unrelenting.technology
Reviewed by:    markj (previous version)
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D26668

3 years agoRemove useless ARGUSED annotations.
Konstantin Belousov [Wed, 23 Dec 2020 13:25:02 +0000 (15:25 +0200)]
Remove useless ARGUSED annotations.

Submitted by: greg@unrelenting.technology

3 years agoAdd SPDX tag.
Konstantin Belousov [Wed, 23 Dec 2020 13:18:57 +0000 (15:18 +0200)]
Add SPDX tag.

Submitted by: greg@unrelenting.technology

3 years agojail: add a missing lock around an osd_jail_call().
Jamie Gritton [Sun, 27 Dec 2020 04:49:30 +0000 (20:49 -0800)]
jail: add a missing lock around an osd_jail_call().

allprison_lock should be at least held shared when jail OSD methods
are called.  Add a shared lock around one such call where that wasn't
the case.

In another such call, change an exclusive lock grab to be shared in
what is likely the more common case.

3 years agojail: Consistently handle the pr_allow bitmask
Jamie Gritton [Sun, 27 Dec 2020 04:25:02 +0000 (20:25 -0800)]
jail: Consistently handle the pr_allow bitmask

Return a boolean (i.e. 0 or 1) from prison_allow, instead of the flag
value itself, which is what sysctl expects.

Add prison_set_allow(), which can set or clear a permission bit, and
propagates cleared bits down to child jails.

Use prison_allow() and prison_set_allow() in the various jail.allow.*
sysctls, and others that depend on thoe permissions.

Add locking around checking both pr_allow and pr_enforce_statfs in
prison_priv_check().

3 years agojail: Make comments on struct prison locking more precise
Jamie Gritton [Sun, 27 Dec 2020 01:01:16 +0000 (17:01 -0800)]
jail: Make comments on struct prison locking more precise

3 years agoFix daily_backup_gpart_exclude in periodic daily 221.backup-gpart
Ed Maste [Sun, 27 Dec 2020 00:24:18 +0000 (19:24 -0500)]
Fix daily_backup_gpart_exclude in periodic daily 221.backup-gpart

Since gpart_devs was not quoted (losing embedded newlines), if
daily_backup_gpart_exclude matched something, gpart_devs was empty.

PR: 251961
Submitted by: Kan Sasaki
MFC after: 1 week

3 years agoFix default route handling in radix4_lockless algo.
Alexander V. Chernikov [Sat, 26 Dec 2020 22:46:43 +0000 (22:46 +0000)]
Fix default route handling in radix4_lockless algo.
Improve nexthop debugging.

Reported by: Florian Smeets <flo at smeets.xyz>

3 years agosym.4: Remove remainder of SYM_SETUP_LP_PROBE_MAP documentation
Marius Strobl [Sat, 26 Dec 2020 21:38:59 +0000 (22:38 +0100)]
sym.4: Remove remainder of SYM_SETUP_LP_PROBE_MAP documentation

This option has been removed in 221ac8f4cd823a2b047c2807e2cf744c7176dd1f
and r339575 respectively.

3 years agosendfile: Ensure that sfio->npages is initialized
Mark Johnston [Sat, 26 Dec 2020 21:07:40 +0000 (16:07 -0500)]
sendfile: Ensure that sfio->npages is initialized

We initialize sfio->npages only when some I/O is required to satisfy the
request.  However, sendfile_iodone() contains an INVARIANTS-only check
that references sfio->npages, and this check is executed even if no I/O
is performed, so the check may use an uninitialized value.

Fix the problem by initializing sfio->npages earlier.  Note that
sendfile_swapin() always initializes the page array.  In some rare cases
we need to trim the page array so ensure that sfio->npages gets updated
accordingly.

Reported by: syzkaller (with KASAN)
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27726

3 years agojail: Fix lock-free access to dynamic pr.allow flags
Jamie Gritton [Sat, 26 Dec 2020 20:53:28 +0000 (12:53 -0800)]
jail: Fix lock-free access to dynamic pr.allow flags

Use atomic access and a memory barrier to ensure that the flag parameter
in pr_flag_allow is indeed set after the rest of the structure is valid.

Simplify adding flag bits with pr_allow_all, a dynamic version of
PR_ALLOW_ALL_STATIC.

3 years agoUse the base address for early arm64 page tables
Andrew Turner [Wed, 23 Dec 2020 18:56:09 +0000 (18:56 +0000)]
Use the base address for early arm64 page tables

Use the kernel physical base rather than the ttbr0 base when building
the kernel identity map. The latter is correct with current assumptions
but may not always be the case.

Sponsored by: Innovate UK

3 years agonsphy(4): Remove obsolete support for pcn(4)
Marius Strobl [Sat, 26 Dec 2020 18:20:03 +0000 (19:20 +0100)]
nsphy(4): Remove obsolete support for pcn(4)

This should have gone in 607790d10fdb97d25cdc0bbe9ed6eaae67383ae1 and
r347915 respectively along with pcn(4).

3 years agomlphy(4)/tlphy(4): Remove obsolete drivers
Marius Strobl [Sat, 26 Dec 2020 18:07:50 +0000 (19:07 +0100)]
mlphy(4)/tlphy(4): Remove obsolete drivers

These drivers should have been removed along with tl(4) as part of
7c897ca91fe1cdb785531d2f5aa0d441c1d73142 and r347918 respectively
as these fromer made sure to only ever attach to the latter, e. g.:
<...>
static int
tlphy_probe(device_t dev)
{

if (!mii_dev_mac_match(dev, "tl"))
return (ENXIO);
<...>

3 years agojail: Fix an O(n^2) loop when adding jails
Jamie Gritton [Sat, 26 Dec 2020 18:39:34 +0000 (10:39 -0800)]
jail: Fix an O(n^2) loop when adding jails

When a jail is added using the default (system-chosen) JID, and
non-default-JID jails already exist, a loop through the allprison
list could restart and result in unnecessary O(n^2) behaviour.
There should never be more than two list passes required.

Also clean up inefficient (though still O(n)) allprison list traversal
when finding jails by ID, or when adding jails in the common case of
all default JIDs.

3 years agoARM: Enhance common Nvidia Tegra drivers by support for Tegra210 SoC.
Michal Meloun [Thu, 4 Jan 2018 11:50:12 +0000 (12:50 +0100)]
ARM: Enhance common Nvidia Tegra drivers by support for Tegra210 SoC.

MFC after: 4 weeks

3 years agogprof: Retire a.out support
Ed Maste [Sat, 26 Dec 2020 16:43:44 +0000 (11:43 -0500)]
gprof: Retire a.out support

FreeBSD has used ELF binaries/libraries for decades, but still has some
support for legacy a.out binaries.  Portions of this have been retired
over time, but support remained in ldd, ldconfig, and gprof.

Retire gprof support; if anyone needs to do development on a.out
binaries still they will be best served by installing a full FreeBSD 2.x
or other obsolete version in a jail.

Kernel support for executing a.out binaries is unchnaged.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27480

3 years agoFix newvers.sh to no longer print an outdated SVN rev
Ulrich Spörlein [Wed, 23 Dec 2020 21:29:34 +0000 (22:29 +0100)]
Fix newvers.sh to no longer print an outdated SVN rev

We have stopped using SVN, so the notes containing the old SVN revisions
are no longer populated, so fall back to purely counting the number of
commits (currently at about 255337).

Also turn the format more into what git-describe produces, with a name
first, then the number of commits and the hash last. Note that as we
don't tag anything on `main`, git describe will never produce something
useful there and finds the newest vendor tag that was merged in instead.

Sample output:
FreeBSD 13.0-CURRENT #6 main-c255126-gb81783dc98e6-dirty
FreeBSD 12.2-STABLE #0 stable/12-c243035-gd16dac42b641-dirty

MFC after: 3 weeks
Reviewed by: imp, glebius
Differential Revision: https://reviews.freebsd.org/D27751

3 years agopci_info: update to 2020-12-26
Baptiste Daroussin [Sat, 26 Dec 2020 15:30:07 +0000 (16:30 +0100)]
pci_info: update to 2020-12-26

3 years agoman4: remove references to gone eeprom(8) and obsolete devices
Marius Strobl [Sat, 26 Dec 2020 15:18:35 +0000 (16:18 +0100)]
man4: remove references to gone eeprom(8) and obsolete devices

The former was missed in 702547720ca01437081fb1b6f9eb281c9541021b and
r357794 respectively.
Additionally for dc.4 and gem.4, remove on-board and SBus devices whose
support was removed as part of 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agoesp.4: Remove references to Sun devices
Marius Strobl [Sat, 26 Dec 2020 13:51:03 +0000 (14:51 +0100)]
esp.4: Remove references to Sun devices

Support has been removed in 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agopcm.4: remove reference to snd_audiocs(4)
Marius Strobl [Sat, 26 Dec 2020 13:44:27 +0000 (14:44 +0100)]
pcm.4: remove reference to snd_audiocs(4)

The latter has been removed in 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agoman4: remove references to drivers deorbited as part of FCP-101
Marius Strobl [Sat, 26 Dec 2020 13:41:10 +0000 (14:41 +0100)]
man4: remove references to drivers deorbited as part of FCP-101

As for pcn(4), point to le(4) now.

3 years agosh: Explain duplicate tcsetpgrp() calls
Jilles Tjoelker [Sat, 26 Dec 2020 14:27:33 +0000 (15:27 +0100)]
sh: Explain duplicate tcsetpgrp() calls

This is a comment change only.

3 years agoscc(4)/uart(4): Remove obsolete support for Siemens SAB 82532
Marius Strobl [Sat, 26 Dec 2020 12:44:00 +0000 (13:44 +0100)]
scc(4)/uart(4): Remove obsolete support for Siemens SAB 82532

It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agoscc.4: Add Freescale/NXP QUICC to the list of supported controllers
Marius Strobl [Fri, 25 Dec 2020 21:35:34 +0000 (22:35 +0100)]
scc.4: Add Freescale/NXP QUICC to the list of supported controllers

Support was added in e1ef781113fba635a7fa4a979607261385971992 and
r176772 respectively.

3 years agoUse light-weight versions of routing lookup functions in ng_netflow.
Alexander V. Chernikov [Sat, 26 Dec 2020 11:07:30 +0000 (11:07 +0000)]
Use light-weight versions of routing lookup functions in ng_netflow.

Use recently-added combination of `fib[46]_lookup_rt()` which
 returns rtentry & raw nexthop with `rt_get_inet[6]_plen()` which
 returns address/prefix length of prefix inside `rt`.

Add `nhop_select_func()` wrapper around inlined `nhop_select()` to
 allow callers external to the routing subsystem select the proper
 nexthop from the multipath group without including internal headers.

New calls does not require reference counting objects and reduce
 the amount of copied/processed rtentry data.

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

3 years agoshare/zoneinfo: update import documentation for Git
Philip Paeps [Sat, 26 Dec 2020 02:55:57 +0000 (10:55 +0800)]
share/zoneinfo: update import documentation for Git

Document the steps needed to import and MFC new versions of tzdata now
that FreeBSD has moved from Subversion to Git.

3 years agosbin/init: Reduce code duplication by using %m for error message
Xin LI [Sat, 26 Dec 2020 01:49:33 +0000 (17:49 -0800)]
sbin/init: Reduce code duplication by using %m for error message
instead of passing %s with return value from strerror().

MFC after: 2 weeks

3 years agosbin/routed: Remove unused code for sgi and NetBSD.
Xin LI [Sat, 26 Dec 2020 01:42:11 +0000 (17:42 -0800)]
sbin/routed: Remove unused code for sgi and NetBSD.

MFC after: 2 weeks

3 years agofwohci.4: Bump .Dd
Marius Strobl [Fri, 25 Dec 2020 21:21:49 +0000 (22:21 +0100)]
fwohci.4: Bump .Dd

Missed in 50d823d5b8b61b96b17dff6f1658774bd438f067

3 years agoohci.4: Bump .Dd
Marius Strobl [Fri, 25 Dec 2020 21:20:22 +0000 (22:20 +0100)]
ohci.4: Bump .Dd

Missed in 5db1ed2f332fd784b7c8bf3a0c2182d86cd00d57

3 years agognu: remove gnugrep and libgnuregex
Kyle Evans [Tue, 22 Dec 2020 21:38:09 +0000 (15:38 -0600)]
gnu: remove gnugrep and libgnuregex

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

3 years agogrep: tests: stop testing for a nonexistent version of grep
Kyle Evans [Tue, 22 Dec 2020 21:39:12 +0000 (15:39 -0600)]
grep: tests: stop testing for a nonexistent version of grep

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

3 years agosrc.conf: regenerate after GREP option removal
Kyle Evans [Tue, 22 Dec 2020 22:12:49 +0000 (16:12 -0600)]
src.conf: regenerate after GREP option removal

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

3 years agobuild: remove the option to build gnugrep
Kyle Evans [Tue, 22 Dec 2020 21:36:40 +0000 (15:36 -0600)]
build: remove the option to build gnugrep

Unconditionally install bsdgrep as grep, bootstrap or not. Remove all
build glue and stop installing both gnugrep and libgnuregex now that
all consumers of the latter are gone.

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D27732

3 years agoada(4): remove remainder of MD geometry translation support
Marius Strobl [Fri, 25 Dec 2020 19:20:54 +0000 (20:20 +0100)]
ada(4): remove remainder of MD geometry translation support

This was missed in 9cf738228dc8563732f7cb332737a6d2b732e2e3 and
r359718 respectively.

3 years agobge(4): remove obsolete support for on-board Fujitsu and Sun MACs
Marius Strobl [Thu, 24 Dec 2020 21:32:39 +0000 (22:32 +0100)]
bge(4): remove obsolete support for on-board Fujitsu and Sun MACs

It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agortld-elf(1): remove obsolete pre_init() hook
Marius Strobl [Thu, 24 Dec 2020 20:18:44 +0000 (21:18 +0100)]
rtld-elf(1): remove obsolete pre_init() hook

It's no longer used since 600ee699ed2805894f5972c6ac2c3d17dca7f6ce
and r358358 respectively.

3 years agofwohci(4): remove support for Sun PCIO-2 FireWire controllers
Marius Strobl [Thu, 24 Dec 2020 19:42:41 +0000 (20:42 +0100)]
fwohci(4): remove support for Sun PCIO-2 FireWire controllers

It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agoohci(4): remove support for Sun PCIO-2 USB controllers
Marius Strobl [Thu, 24 Dec 2020 19:38:46 +0000 (20:38 +0100)]
ohci(4): remove support for Sun PCIO-2 USB controllers

It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agogallant12x22(4): remove obsolete font
Marius Strobl [Thu, 24 Dec 2020 19:29:22 +0000 (20:29 +0100)]
gallant12x22(4): remove obsolete font

It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agomk48txx(4): remove obsolete driver
Marius Strobl [Thu, 24 Dec 2020 19:27:20 +0000 (20:27 +0100)]
mk48txx(4): remove obsolete driver

It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agomc146818(4): remove obsolete driver
Marius Strobl [Thu, 24 Dec 2020 19:06:53 +0000 (20:06 +0100)]
mc146818(4): remove obsolete driver

It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5
and r357455 respectively.

3 years agomips: fix build w/ TICK_USE_MALTA_RTC defined
Marius Strobl [Fri, 25 Dec 2020 14:44:39 +0000 (15:44 +0100)]
mips: fix build w/ TICK_USE_MALTA_RTC defined

This was mainly broken by 7e82012aff9888d64a85d19aaed51def9ebbff22 and
r178192 respectively.
Also, remove unused #include.

3 years agoAdd tcgetwinsize(3) and tcsetwinsize(3) to termios
Konstantin Belousov [Thu, 24 Dec 2020 23:05:31 +0000 (01:05 +0200)]
Add tcgetwinsize(3) and tcsetwinsize(3) to termios

These functions get/set tty winsize respectively, and are trivial wrappers
around corresponding termio ioctls.

The functions are expected to be a part of POSIX.1 issue 8:
https://www.austingroupbugs.net/view.php?id=1151#c3856.
They are currently available in NetBSD and in musl libc.

PR: 251868
Submitted by: Soumendra Ganguly <soumendraganguly@gmail.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27650

3 years agosys/contrib/zstd: Import zstd 1.4.8
Conrad Meyer [Fri, 25 Dec 2020 15:42:41 +0000 (07:42 -0800)]
sys/contrib/zstd: Import zstd 1.4.8

Merge commit 'f6ae97673c28bdb9ae795bd235ab6f26f2536a2d' into main

Changes from 1.4.5:
  * https://github.com/facebook/zstd/releases/tag/v1.4.8
  * https://github.com/facebook/zstd/releases/tag/v1.4.7
  (and there was no public v1.4.6)

Conflicts:
sys/contrib/zstd/lib/common/zstd_internal.h (new ZSTD_NO_INTRINSICS)

3 years agocontrib/tzdata: import tzdata 2020e
Philip Paeps [Fri, 25 Dec 2020 15:16:38 +0000 (23:16 +0800)]
contrib/tzdata: import tzdata 2020e

Changes: https://github.com/eggert/tz/blob/2020e/NEWS

MFC after:    insta-MFC

3 years agoPMC: remove now orphaned PMC for INTEL XScale processors.
Michal Meloun [Fri, 25 Dec 2020 10:41:34 +0000 (11:41 +0100)]
PMC: remove now orphaned PMC for INTEL XScale processors.
Support for XScale architecture has been deleted in FreeBSD 13.

3 years agoAdd modular fib lookup framework.
Alexander V. Chernikov [Fri, 25 Dec 2020 10:39:52 +0000 (10:39 +0000)]
Add modular fib lookup framework.

This change introduces framework that allows to dynamically
 attach or detach longest prefix match (lpm) lookup algorithms
 to speed up datapath route tables lookups.

Framework takes care of handling initial synchronisation,
 route subscription, nhop/nhop groups reference and indexing,
 dataplane attachments and fib instance algorithm setup/teardown.
Framework features automatic algorithm selection, allowing for
 picking the best matching algorithm on-the-fly based on the
 amount of routes in the routing table.

Currently framework code is guarded under FIB_ALGO config option.
An idea is to enable it by default in the next couple of weeks.

The following algorithms are provided by default:
IPv4:
* bsearch4 (lockless binary search in a special IP array), tailored for
  small-fib (<16 routes)
* radix4_lockless (lockless immutable radix, re-created on every rtable change),
  tailored for small-fib (<1000 routes)
* radix4 (base system radix backend)
* dpdk_lpm4 (DPDK DIR24-8-based lookups), lockless datastrucure, optimized
  for large-fib (D27412)
IPv6:
* radix6_lockless (lockless immutable radix, re-created on every rtable change),
  tailed for small-fib (<1000 routes)
* radix6 (base system radix backend)
* dpdk_lpm6 (DPDK DIR24-8-based lookups), lockless datastrucure, optimized
  for large-fib (D27412)

Performance changes:
Micro benchmarks (I7-7660U, single-core lookups, 2048k dst, code in D27604):
IPv4:
8 routes:
  radix4: ~20mpps
  radix4_lockless: ~24.8mpps
  bsearch4: ~69mpps
  dpdk_lpm4: ~67 mpps
700k routes:
  radix4_lockless: 3.3mpps
  dpdk_lpm4: 46mpps

IPv6:
8 routes:
  radix6_lockless: ~20mpps
  dpdk_lpm6: ~70mpps
100k routes:
  radix6_lockless: 13.9mpps
  dpdk_lpm6: 57mpps

Forwarding benchmarks:
+ 10-15% IPv4 forwarding performance (small-fib, bsearch4)
+ 25% IPv4 forwarding performance (full-view, dpdk_lpm4)
+ 20% IPv6 forwarding performance (full-view, dpdk_lpm6)

Control:
Framwork adds the following runtime sysctls:

List algos
* net.route.algo.inet.algo_list: bsearch4, radix4_lockless, radix4
* net.route.algo.inet6.algo_list: radix6_lockless, radix6, dpdk_lpm6
Debug level (7=LOG_DEBUG, per-route)
net.route.algo.debug_level: 5
Algo selection (currently only for fib 0):
net.route.algo.inet.algo: bsearch4
net.route.algo.inet6.algo: radix6_lockless

Support for manually changing algos in non-default fib will be added
soon. Some sysctl names will be changed in the near future.

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

3 years agoDon't set more_data which is never used.
Xin LI [Fri, 25 Dec 2020 02:49:12 +0000 (18:49 -0800)]
Don't set more_data which is never used.

MFC after: 2 weeks

3 years agoImport zstd 1.4.8
Conrad Meyer [Fri, 25 Dec 2020 00:21:42 +0000 (16:21 -0800)]
Import zstd 1.4.8

3 years agomount_nfs(8): add a description for the new "tlscertname" option
Rick Macklem [Thu, 24 Dec 2020 22:20:06 +0000 (14:20 -0800)]
mount_nfs(8): add a description for the new "tlscertname" option

commit 665b1365fe8e added a new NFS mount option that is used to set a
non-default X.509 certificate, that can be used for nfs-over-tls NFS
mounts.
This patch adds a description for it to the man page.

Reviewed by: 0mp
Differential Revision: https://reviews.freebsd.org/D27733

3 years agoFix amd64 GENERIC-MMCCAM kernel build
Kristof Provost [Thu, 24 Dec 2020 21:30:52 +0000 (22:30 +0100)]
Fix amd64 GENERIC-MMCCAM kernel build

c4df8cbfde53c376d93f439eac3f45a7b4fc705e removed bvmconsole and
bvmdebug, but missed the bvmconsole entry in GENERIC-MMCCAM.

3 years agowmt: quiet gcc -Wparentheses
Ryan Libby [Thu, 24 Dec 2020 20:49:27 +0000 (12:49 -0800)]
wmt: quiet gcc -Wparentheses

Reviewed by: wulf
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27767

3 years agortsock: quiet -Wunused-variable in LINT-NOIP kernels
Ryan Libby [Thu, 24 Dec 2020 20:34:18 +0000 (12:34 -0800)]
rtsock: quiet -Wunused-variable in LINT-NOIP kernels

Fixup after r368769 / d68fb8d978bbd3cf1b5db35f309aaeab30636d43.

Reported by: mjg
Reviewed by: melifaro
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27730

3 years agoopenzfs: fix gcc in-kernel builds
Ryan Libby [Thu, 24 Dec 2020 20:34:18 +0000 (12:34 -0800)]
openzfs: fix gcc in-kernel builds

Fix gcc builds of in-kernel modules using CDDL_CFLAGS (e.g. options
ZFS).

 - Remove nonexistent include dirs for -Wmissing-include-dirs
 - Suppress -Wnested-externs, a useless warning
 - Sort and uniq warning flags while here

Reviewed by: markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27684

3 years agoukbd(4): Push LED events in ioctl handler rather than in xfer callback
Vladimir Kondratyev [Thu, 24 Dec 2020 19:08:04 +0000 (22:08 +0300)]
ukbd(4): Push LED events in ioctl handler rather than in xfer callback

If LED state is set through evdev interface, than asynchronous nature
of USB transfer callback can lead to change of order of events echoed
back to userland as it causes LED events to be echoed with some lag.

Fix that with echoing of LED events synchronously in ioctl handler.

Reviewed by: hselasky
Obtained from: sysutils/iichid
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D27750

3 years agoukbd(4): Do not serialize evdev key events
Vladimir Kondratyev [Thu, 24 Dec 2020 18:56:33 +0000 (21:56 +0300)]
ukbd(4): Do not serialize evdev key events

Unlike AT keyboards, HID devices are able to send all pc105 key
states within a single report. Let evdev to transmit all key state
changes within a single report too.

Reviewed by: hselasky
Obtained from: sysutils/iichid
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D27749

3 years agommap(2): Update .Dd missed in the last commit
Guangyuan Yang [Thu, 24 Dec 2020 14:14:56 +0000 (14:14 +0000)]
mmap(2): Update .Dd missed in the last commit

PR: 252097
MFC after: 1 week

3 years agommap(2): Fix a typo
Guangyuan Yang [Thu, 24 Dec 2020 14:08:34 +0000 (14:08 +0000)]
mmap(2): Fix a typo

PR:             252097
MFC after:      1 week
Reported by:    Nick Frampton <nick.frampton@akips.com>

3 years agoAdd support for USB-C and TB3 Gen2 to if_ure(4).
Hans Petter Selasky [Thu, 24 Dec 2020 11:59:19 +0000 (12:59 +0100)]
Add support for USB-C and TB3 Gen2 to if_ure(4).

Add support for LAN found on Thinkpad USB-C and Thunderbolt Gen 2
docking stations.

Submitted by: ali.abdallah@suse.com
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking

3 years agoImport tzdata 2020e
Philip Paeps [Thu, 24 Dec 2020 03:19:15 +0000 (11:19 +0800)]
Import tzdata 2020e

3 years agoSync ippool.8 man page synopsis with reality and the rest of the
Cy Schubert [Thu, 24 Dec 2020 01:02:14 +0000 (17:02 -0800)]
Sync ippool.8 man page synopsis with reality and the rest of the
man page..

MFC after: 3 days

3 years agoversion bump for commit 665b1365fe8e24d618d63b0d57b0b4ad39e97824
Rick Macklem [Wed, 23 Dec 2020 22:41:47 +0000 (14:41 -0800)]
version bump for commit 665b1365fe8e24d618d63b0d57b0b4ad39e97824

The commit changed the internal API between the NFS and kernel RPC
modules.  Bump the version so that all modules get rebuilt from
sources.

3 years agowmt(4): Use sys/param.h macroses to work with bit fields
Vladimir Kondratyev [Wed, 23 Dec 2020 22:18:18 +0000 (01:18 +0300)]
wmt(4): Use sys/param.h macroses to work with bit fields

Obtained from: sysutils/iichid

3 years agowmt(4): Refactor 'Contact Count Maximum' parsing
Vladimir Kondratyev [Wed, 23 Dec 2020 22:18:18 +0000 (01:18 +0300)]
wmt(4): Refactor 'Contact Count Maximum' parsing

That is done mainly to reduce diff with upstream.

Obtained from: sysutils/iichid

3 years agowmt(4): Add support for hardware timestamp reporting
Vladimir Kondratyev [Wed, 23 Dec 2020 22:18:18 +0000 (01:18 +0300)]
wmt(4): Add support for hardware timestamp reporting

Hardware timestamp reporting is disabled by default as it produces many
extra events which are not handled by consumers like libinput.
Add hw.usb.wmt.timestamps=1 tunable to loader.conf to enable it.

Obtained from: sysutils/iichid

3 years agowmt(4): Add support for touchpads
Vladimir Kondratyev [Wed, 23 Dec 2020 22:18:18 +0000 (01:18 +0300)]
wmt(4): Add support for touchpads

Obtained from: sysutils/iichid