]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agobsd.incs.mk: Add support to override tags for a specific include group
Emmanuel Vadot [Mon, 14 Dec 2020 17:53:34 +0000 (18:53 +0100)]
bsd.incs.mk: Add support to override tags for a specific include group

With this patch if a Makefile is using the INCSGROUPS mechanisms it can
override the default package for specific includes files using
GROUPPACKAGE=      mynewpackage

While here add a few comments after endif/endfor so it's easier to read.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D27611

3 years agopkgbase: Put the last rc files in the rc package
Emmanuel Vadot [Mon, 21 Dec 2020 23:17:17 +0000 (00:17 +0100)]
pkgbase: Put the last rc files in the rc package

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D27718

3 years agopkgbase: Install atf and kyua in the tests package
Emmanuel Vadot [Mon, 21 Dec 2020 22:36:31 +0000 (23:36 +0100)]
pkgbase: Install atf and kyua in the tests package

While here make sure that all tests dirs are taggued correctly.

Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D27714

3 years agopkgbase: Install libxo test files in the tests package
Emmanuel Vadot [Mon, 21 Dec 2020 22:35:53 +0000 (23:35 +0100)]
pkgbase: Install libxo test files in the tests package

Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D27713

3 years agomk: Set the DIR tags based on the files one
Emmanuel Vadot [Mon, 21 Dec 2020 22:20:28 +0000 (23:20 +0100)]
mk: Set the DIR tags based on the files one

Otherwise we loose the info as we use bsd.dirs.mk for creating directories.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D27712

3 years agopkgbase: Put ppp in it's own package
Emmanuel Vadot [Mon, 21 Dec 2020 17:35:12 +0000 (18:35 +0100)]
pkgbase: Put ppp in it's own package

ppp uses libalias modules which now belong in the natd package.
Avoid bringing a dependancy on natd for the utilities package.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D27711

3 years agopkgbase: Put libalias in the natd package
Emmanuel Vadot [Mon, 21 Dec 2020 17:34:36 +0000 (18:34 +0100)]
pkgbase: Put libalias in the natd package

natd is the main user of the libalias* modules, put them together.

Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D27710

3 years agopkgbase: Put zoneinfo file in their own package
Emmanuel Vadot [Mon, 21 Dec 2020 16:54:23 +0000 (17:54 +0100)]
pkgbase: Put zoneinfo file in their own package

Those files take some amount of diskspace and one might not want them
installed on some situation (mfsdisk, small embedded system etc ...)

Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D27709

3 years agopkgbase: Move bectl to the runtime package
Emmanuel Vadot [Mon, 21 Dec 2020 15:00:02 +0000 (16:00 +0100)]
pkgbase: Move bectl to the runtime package

runtime contain what is needed to boot in single user and repair a
system, bectl could be handy to have in this situation.

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

3 years agoRemove a space I missed in previous commit
Poul-Henning Kamp [Mon, 4 Jan 2021 14:53:35 +0000 (14:53 +0000)]
Remove a space I missed in previous commit

3 years agomvneta: Fix 64-bit MIB reads
Mark Johnston [Mon, 4 Jan 2021 13:22:21 +0000 (08:22 -0500)]
mvneta: Fix 64-bit MIB reads

It appears we must read MIB values as 2 4-byte words, lower address
first.  A single 8-byte MIB read returns the value with the lower 4
bytes copied into the upper 4 bytes, resulting in bogus byte counter
values.

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

3 years agomd: Fix a race in mdstart_swap()
Mark Johnston [Mon, 4 Jan 2021 13:21:57 +0000 (08:21 -0500)]
md: Fix a race in mdstart_swap()

Release a grabbed page's busy state only after marking it as referenced.
Otherwise there exists a narrow window where the page could be freed
before the update.  Before r356902 this was not a problem since the
object lock was held.

Discussed with: kib
Sponsored by: The FreeBSD Foundation

3 years agoUse the actual credentials to create the /dev/nmdm* devices.
Poul-Henning Kamp [Mon, 4 Jan 2021 13:18:47 +0000 (13:18 +0000)]
Use the actual credentials to create the /dev/nmdm* devices.

This lets plain users create nmdm pairs, which is useful amongst
other things for running retro-computing emulators etc.

3 years agoRemove -g option support which was removed from bhyve in
Poul-Henning Kamp [Mon, 4 Jan 2021 13:15:50 +0000 (13:15 +0000)]
Remove -g option support which was removed from bhyve in
c4df8cbfde53c376d93f439eac3f45a7b4fc705e

3 years agosbin/camcontrol: use calloc/strlcpy where appropriate.
Xin LI [Mon, 4 Jan 2021 06:52:28 +0000 (22:52 -0800)]
sbin/camcontrol: use calloc/strlcpy where appropriate.

MFC after: 2 weeks

3 years agorockchip: add audio-related clocks to the CRU driver
Oleksandr Tymoshenko [Wed, 30 Dec 2020 00:25:52 +0000 (16:25 -0800)]
rockchip: add audio-related clocks to the CRU driver

- Add I2S and CODEC clocks to CRU driver
- Add support for gate selection to frac clock
- Add setfreq support to mux clock

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D27831

3 years agosh/tests: Add a second kind of binary scripts without #!
Jilles Tjoelker [Sun, 3 Jan 2021 20:27:50 +0000 (21:27 +0100)]
sh/tests: Add a second kind of binary scripts without #!

One of the reasons for git commit
e0f5c1387df23c8c4811f5b24a7ef6ecac51a71a was to make "actually portable
executables" work. Add a test that is more like those.

MFC after: 1 week

3 years agofortune(6): Add EXIT STATUS and HISTORY sections
Gordon Bergling [Sun, 3 Jan 2021 22:50:18 +0000 (23:50 +0100)]
fortune(6): Add EXIT STATUS and HISTORY sections

Obtained from: OpenBSD
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27941

3 years agocache: drop the now spurious doomed check when crossing a mount point
Mateusz Guzik [Sun, 3 Jan 2021 07:35:22 +0000 (08:35 +0100)]
cache: drop the now spurious doomed check when crossing a mount point

3 years agovfs: keep seqc unchanged as long as the vnode is accessible via SMR
Mateusz Guzik [Sun, 3 Jan 2021 07:34:08 +0000 (08:34 +0100)]
vfs: keep seqc unchanged as long as the vnode is accessible via SMR

3 years agobitset.9: add missing MLINKS
Ryan Libby [Sun, 3 Jan 2021 20:52:21 +0000 (12:52 -0800)]
bitset.9: add missing MLINKS

Add MLINKS for new bitset(9) APIs in r364796 /
f8782001804f674dc3aff53053af5ebc3c199f02 and
ae4a8e52072a87bfd49d553b9b14450c626269f8.

Reported by: trasz
Reviewed by: cem
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27944

3 years agolibprivatezstd: Restrict symbol visibility similar to upstream
Conrad Meyer [Sun, 3 Jan 2021 19:26:01 +0000 (11:26 -0800)]
libprivatezstd: Restrict symbol visibility similar to upstream

We have to relax three symbols to dynamically link zstd(1), but the rest
are the same.

3 years agoloader: fix uboot build with gfx_fb
Toomas Soome [Sun, 3 Jan 2021 10:26:48 +0000 (12:26 +0200)]
loader: fix uboot build with gfx_fb

Need to add stub data and gfx functions to make linking happy.

3 years agoFix vnode locking bug in fuse_vnop_copy_file_range
Alan Somers [Fri, 1 Jan 2021 20:49:30 +0000 (13:49 -0700)]
Fix vnode locking bug in fuse_vnop_copy_file_range

MFC-With: 92bbfe1f0d1f1c4436d1f064a16e5aaf682526ba
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D27938

3 years agobhyve: fix build without casper/capsicum support
Mariusz Zaborski [Sun, 3 Jan 2021 17:17:04 +0000 (18:17 +0100)]
bhyve: fix build without casper/capsicum support

Fix typo introduced in 966026246e62769f3bcd8247a47fe0f4f0433aba.

Pointed out by: jbeich

3 years agosendfile: Clear page pointers when handling a pager error
Mark Johnston [Sun, 3 Jan 2021 16:35:42 +0000 (11:35 -0500)]
sendfile: Clear page pointers when handling a pager error

When INVARIANTS is configred, the sendfile_iodone() callback verifies
that pages attached to the sendfile header are wired, but we unwire all
such pages after a synchronous pager error, before calling
sendfile_iodone().

Reported by: pho
Tested by: pho
Sponsored by: The FreeBSD Foundation

3 years agocam: Remove Giant handling from cam_sim_alloc()
Mark Johnston [Sun, 3 Jan 2021 16:34:10 +0000 (11:34 -0500)]
cam: Remove Giant handling from cam_sim_alloc()

There are no non-MPSAFE SIM drivers left in the tree, verified with
coccinelle.

Reviewed by: scottl, imp
Differential Revision: https://reviews.freebsd.org/D27853

3 years agoEnsure that dirent's d_off field is initialized
Mark Johnston [Sun, 3 Jan 2021 16:32:30 +0000 (11:32 -0500)]
Ensure that dirent's d_off field is initialized

We have the d_off field in struct dirent for providing the seek offset
of the next directory entry.  Several filesystems were not initializing
the field, which ends up being copied out to userland.

Reported by: Syed Faraz Abrar <faraz@elttam.com>
Reviewed by: kib
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27792

3 years agouma: Avoid unmapping direct-mapped slabs
Mark Johnston [Sun, 3 Jan 2021 16:31:00 +0000 (11:31 -0500)]
uma: Avoid unmapping direct-mapped slabs

startup_alloc() uses pmap_map() to map slabs used for bootstrapping the
VM.  pmap_map() may ignore the hint address and simply return a range
from the direct map.  In this case we must not unmap the range in
startup_free().

UMA uses bootstart and bootmem to track the range of KVA into which
slabs are mapped if the direct map is not used.  Unmap a startup slab
only if it was mapped into that range.

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

3 years agoAdd old bsdgrep aliases to ObsoleteFiles.inc
Dimitry Andric [Sun, 3 Jan 2021 16:43:20 +0000 (17:43 +0100)]
Add old bsdgrep aliases to ObsoleteFiles.inc

After 8aff76fb37b58a74832831ac1c54a013a64b35e7 there is only one grep,
so the bsdgrep binary and man page aliases can be cleaned up.

3 years agobhyve: fix build without casper/capsicum support
Mariusz Zaborski [Sun, 3 Jan 2021 16:18:22 +0000 (17:18 +0100)]
bhyve: fix build without casper/capsicum support

PR: 252353

3 years agofusefs: only check vnode locks with DEBUG_VFS_LOCKS
Alan Somers [Fri, 1 Jan 2021 21:27:03 +0000 (14:27 -0700)]
fusefs: only check vnode locks with DEBUG_VFS_LOCKS

MFC-With: 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D27939

3 years agoFix a vnode locking bug in fuse_vnop_advlock.
Alan Somers [Wed, 30 Dec 2020 23:50:35 +0000 (16:50 -0700)]
Fix a vnode locking bug in fuse_vnop_advlock.

Must lock the vnode before accessing the fufh table.  Also, check for
invalid parameters earlier.  Bug introduced by r346170.

MFC after: 2 weeks

Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D27936

3 years agocap_net: CAPNET_CONNECT and CAPNET_CONNECTDNS are not mutually exclusive
Mariusz Zaborski [Sun, 3 Jan 2021 16:10:35 +0000 (17:10 +0100)]
cap_net: CAPNET_CONNECT and CAPNET_CONNECTDNS are not mutually exclusive

Fix the for the CAPNET_CONNECT and CAPNET_CONNECTDNS.
Add test to ensure that this is possible.

3 years agocap_net: allow to use the service without setting the limits
Mariusz Zaborski [Sun, 3 Jan 2021 16:09:20 +0000 (17:09 +0100)]
cap_net: allow to use the service without setting the limits

Add test to ensure that this is possible.

3 years agocapser: add cap_net to the list of services
Mariusz Zaborski [Sun, 3 Jan 2021 15:55:35 +0000 (16:55 +0100)]
capser: add cap_net to the list of services

3 years agozstd: Fix non-FreeBSD CI libzstd build
Conrad Meyer [Sun, 3 Jan 2021 15:39:12 +0000 (07:39 -0800)]
zstd: Fix non-FreeBSD CI libzstd build

Fix non-FreeBSD CI build after v1.4.8.  This definition was only used in
zstd(1), which isn't part of non-FreeBSD CI (I guess).  The ifdef was
added in v1.4.5 import.

Upstream does not currently support shared-linked zstd(1), but I have
proposed https://github.com/facebook/zstd/pull/2450 .  If that is
adopted, we can add -DZSTD_PROGRAMS_LINK_SHARED to our libzstd build and
drop some diffs.

Reported by: uqs

3 years agoUpdate contrib/llvm-project/FREEBSD-Xlist for llvmorg-11.0.1-rc2.
Dimitry Andric [Sun, 3 Jan 2021 13:21:54 +0000 (14:21 +0100)]
Update contrib/llvm-project/FREEBSD-Xlist for llvmorg-11.0.1-rc2.

MFC after: 4 weeks
X-MFC-With: r364284

3 years agoMerge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
Dimitry Andric [Sun, 3 Jan 2021 12:54:24 +0000 (13:54 +0100)]
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after: 4 weeks
X-MFC-With: r364284

3 years agovfs: denote vnode being a mount point with VIRF_MOUNTPOINT
Mateusz Guzik [Fri, 1 Jan 2021 03:10:12 +0000 (04:10 +0100)]
vfs: denote vnode being a mount point with VIRF_MOUNTPOINT

Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D27794

3 years agovfs: add v_irflag accessors
Mateusz Guzik [Mon, 28 Dec 2020 03:01:15 +0000 (03:01 +0000)]
vfs: add v_irflag accessors

Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D27793

3 years agocache: stop checkpointing cn_namelen
Mateusz Guzik [Fri, 1 Jan 2021 13:45:06 +0000 (14:45 +0100)]
cache: stop checkpointing cn_namelen

The variable is recomputed by regular lookup from the get go.

3 years agocache: predict on no spurious slashes in cache_fpl_handle_root
Mateusz Guzik [Fri, 1 Jan 2021 02:25:19 +0000 (02:25 +0000)]
cache: predict on no spurious slashes in cache_fpl_handle_root

This is a step towards speculatively not handling them.

3 years agocache: postpone NAME_MAX check as it may be unnecessary
Mateusz Guzik [Thu, 31 Dec 2020 07:28:32 +0000 (08:28 +0100)]
cache: postpone NAME_MAX check as it may be unnecessary

3 years agocache: remove spurious null check in sdt probe
Mateusz Guzik [Thu, 31 Dec 2020 07:22:30 +0000 (08:22 +0100)]
cache: remove spurious null check in sdt probe

3 years agoThe fsck_ffs program had previously only been able to expand the size
Kirk McKusick [Sun, 3 Jan 2021 06:31:55 +0000 (22:31 -0800)]
The fsck_ffs program had previously only been able to expand the size
of its lost+found directory by allocating direct block pointers. The
effect was that it was limited to about 19,000 files. One of Peter Holm's
tests produced a filesystem with about 23,000 lost files which meant
that fsck_ffs was unable to recover it. This update allows lost+found
to be expanded into a single indirect block which allows it to store
up to about 6,573,000 lost files.

Reported by:  Peter Holm
Sponsored by: Netflix

3 years agoRegenerate syscall files after addition of aio_writev/aio_readv
Alan Somers [Sun, 3 Jan 2021 02:57:39 +0000 (19:57 -0700)]
Regenerate syscall files after addition of aio_writev/aio_readv

3 years agoAdd aio_writev and aio_readv
Alan Somers [Sat, 2 Jan 2021 23:34:20 +0000 (16:34 -0700)]
Add aio_writev and aio_readv

POSIX AIO is great, but it lacks vectored I/O functions. This commit
fixes that shortcoming by adding aio_writev and aio_readv. They aren't
part of the standard, but they're an obvious extension. They work just
like their synchronous equivalents pwritev and preadv.

It isn't yet possible to use vectored aiocbs with lio_listio, but that
could be added in the future.

Reviewed by:    jhb, kib, bcr
Relnotes:       yes
Differential Revision: https://reviews.freebsd.org/D27743

3 years agoarm: fix atomic_testand{set,clear}_64 for ops on high bits
Ryan Libby [Sun, 3 Jan 2021 02:09:37 +0000 (18:09 -0800)]
arm: fix atomic_testand{set,clear}_64 for ops on high bits

The fix in bd03acedb804add1e22178d50eb2bfb703974ddf worked for 32-bit
ops, and for 64-bit ops for bit arguments of 0 - 95, but then was broken
for operations on the high 32 bits after that.

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

3 years agocopy_file_range(2): add recommendation to use large "len"
Rick Macklem [Sun, 3 Jan 2021 01:21:21 +0000 (17:21 -0800)]
copy_file_range(2): add recommendation to use large "len"

PR#252358 reported a serious performance problem w.r.t.
cp(1) when copying large non-sparse files.
This problem appears to have been caused by cp(1)
calling copy_file_range(2) with a small "len" argument.

This patch adds a recommendation to use a large "len"
value where possible, for performance reasons.

Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D27935

3 years agocp(1): fix performance issue for large non-sparse file copies
Rick Macklem [Sun, 3 Jan 2021 00:58:43 +0000 (16:58 -0800)]
cp(1): fix performance issue for large non-sparse file copies

PR252358 reported a serious performance problem when
copying a large non-sparse file on a UFS file system.
This problem seems to have been caused by a large
number of SEEK_HOLE operations, with one done
for each copy_file_range(2) call.

This patch modifies cp(1) to use a large (SSIZE_MAX)
len argument, reducing the number of system calls
and resolving the performance issue.

While here, convert the type of the "rcount" from "int"
to "ssize_t" so that it is consistent with that returned
by both read(2) and copy_file_range(2).

PR: 252358
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D27937

3 years agoGithub actions: s/master/main/ for the CI workflow
Ulrich Spörlein [Sat, 2 Jan 2021 23:08:01 +0000 (00:08 +0100)]
Github actions: s/master/main/ for the CI workflow

3 years agoHandle KDB_WHY_TRAP return on arm and mips
Mitchell Horne [Sat, 2 Jan 2021 23:07:04 +0000 (19:07 -0400)]
Handle KDB_WHY_TRAP return on arm and mips

Upon exit from the debugger, checking the return code of kdb_trap()
allows one to retry the fatal page fault. This matches what is done on
all other architectures.

Reviewed by: jhb (earlier version)
Differential Revision: https://reviews.freebsd.org/D27535

3 years agoloader: fix build on non-x86 platforms
Toomas Soome [Sat, 2 Jan 2021 21:48:52 +0000 (23:48 +0200)]
loader: fix build on non-x86 platforms

Need to build pnglite with all.

Reported by: Herbert J. Skuhra

3 years agoVendor import of llvm-project branch release/11.x
Dimitry Andric [Sat, 2 Jan 2021 21:13:33 +0000 (22:13 +0100)]
Vendor import of llvm-project branch release/11.x
llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

3 years agoarm64: fix mask in atomic_testand{set,clear}_64
Ryan Libby [Sat, 2 Jan 2021 20:11:18 +0000 (12:11 -0800)]
arm64: fix mask in atomic_testand{set,clear}_64

These macros generate both the 32- and 64-bit ops, but the mask was hard
coded for 32-bit ops, causing the 64-bit ops always to affect only the
low 32 bits.

PR: 252324
Reported by: gbe, mmel
Reviewed by: markj, mmel
Tested by: mmel, rwatson
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27886

3 years agoloader: implement framebuffer console
Toomas Soome [Mon, 21 Dec 2020 05:31:16 +0000 (07:31 +0200)]
loader: implement framebuffer console

Draw console on efi.
Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list,
vbe set xxx).
autoload font (/boot/fonts) based on resolution and font size.
Add command loadfont (set font by file) and
variable screen.font (set font by size). Pass loaded font to kernel.

Export variables:
screen.height
screen.width
screen.depth

Add gfx primitives to draw the screen and put png image on the screen.
Rework menu draw to iterate list of consoles to enamble device specific
output.

Probably something else I forgot...

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

3 years agoarm: Fix atomic_testand{set,clear}_32(). According to atomic (9), the bit position...
Michal Meloun [Sat, 2 Jan 2021 19:30:00 +0000 (20:30 +0100)]
arm: Fix atomic_testand{set,clear}_32(). According to atomic (9), the bit position argument should be a modulo operand size. While I'm in, add missing implementation of atomic_testandclear_64(). For more details see https://reviews.freebsd.org/D27886

Discused with: rlibby
MFC after: 3 weeks

3 years agocontrib: setup pnglite
Toomas Soome [Sat, 2 Jan 2021 19:29:24 +0000 (21:29 +0200)]
contrib: setup pnglite

3 years agoAdd 'contrib/pnglite/' from commit 'a70c2a23d0d84dfc63a1d9413a7f4aaede7313aa'
Toomas Soome [Sat, 2 Jan 2021 19:27:29 +0000 (21:27 +0200)]
Add 'contrib/pnglite/' from commit 'a70c2a23d0d84dfc63a1d9413a7f4aaede7313aa'

git-subtree-dir: contrib/pnglite
git-subtree-mainline: 5bcd0b860c7d4935db5b290cf932357fc22adf3a
git-subtree-split: a70c2a23d0d84dfc63a1d9413a7f4aaede7313aa

3 years agoInitial import of vendor/pnglite
Toomas Soome [Sat, 2 Jan 2021 19:20:31 +0000 (21:20 +0200)]
Initial import of vendor/pnglite

3 years agocontrib: setup terminus
Toomas Soome [Sat, 2 Jan 2021 19:03:28 +0000 (21:03 +0200)]
contrib: setup terminus

3 years agoAdd 'contrib/terminus/' from commit 'cee3932f8c02a220d70e48949c7c5ca6e98dfef4'
Toomas Soome [Sat, 2 Jan 2021 18:57:12 +0000 (20:57 +0200)]
Add 'contrib/terminus/' from commit 'cee3932f8c02a220d70e48949c7c5ca6e98dfef4'

git-subtree-dir: contrib/terminus
git-subtree-mainline: 51a9b978e75021415fdced616b4e4bc373a20a8a
git-subtree-split: cee3932f8c02a220d70e48949c7c5ca6e98dfef4

3 years agoimport terminus-font-4.48
Toomas Soome [Sat, 2 Jan 2021 18:17:37 +0000 (20:17 +0200)]
import terminus-font-4.48

3 years agonfs server: improve use of the VFS KPI
Konstantin Belousov [Fri, 1 Jan 2021 15:35:44 +0000 (17:35 +0200)]
nfs server: improve use of the VFS KPI

In particular, do not assume that vn_start_write() returns the same mp
as it was passed in, or never returns error.

Also be more accurate to return NULL vp and mp when error occured, to
catch wrong control flow easier.

Stop checking for NULL mp before calling vn_finished_write(), NULL mp
is handled transparently by the function.

Reviewed by: rmacklem
Tested by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27881

3 years agobootparamd: Add missing __unused mark.
Yoshihiro Takahashi [Sat, 2 Jan 2021 15:40:34 +0000 (00:40 +0900)]
bootparamd: Add missing __unused mark.

e03764d931d820185a019334259b18df2e3f6b6c did not catch all unused
variables.

Submitted by: otis
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D27894

3 years agocontrib: remove libgnuregex
Kyle Evans [Sat, 2 Jan 2021 05:59:21 +0000 (23:59 -0600)]
contrib: remove libgnuregex

This should have been a part of 47d1ad2413da, but it was overlooked. All of
the build bits have been previously removed, and nothing references this
anymore.

3 years agobootparamd: Fix several warnings and increase warn level to 6.
Yoshihiro Takahashi [Sat, 2 Jan 2021 03:36:09 +0000 (12:36 +0900)]
bootparamd: Fix several warnings and increase warn level to 6.

- Increase WARNS to 6.
- Except -Wcast-align and -Wincompatible-pointer-types-discards-qualifiers
  checks.
- Use ANSI C prototype.
- Statically variables and functions.
- Add extern declaration for global variables.
- Rename local variables to resolve shadow warnings.

PR: 71667
MFC after: 2 weeks

3 years agotcgetwinsize(3): provide man page
Konstantin Belousov [Fri, 1 Jan 2021 22:28:42 +0000 (00:28 +0200)]
tcgetwinsize(3): provide man page

The current POSIX.1-202x draft (1.1) was used as source material.

Submitted by: Soumendra Ganguly <soumendraganguly@gmail.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D27787

3 years agortld: call close(2) after errno is saved
Konstantin Belousov [Fri, 1 Jan 2021 22:24:46 +0000 (00:24 +0200)]
rtld: call close(2) after errno is saved

to prevent obliteration of error value from the original syscall.
Also improve error message for short read.

Submitted by: Konrad Sewiłło-Jopek
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27864

3 years agounzip: Sync with NetBSD upstream.
Yoshihiro Takahashi [Sat, 2 Jan 2021 01:50:08 +0000 (10:50 +0900)]
unzip: Sync with NetBSD upstream.

- Ignore malformed directory entries as created by Dropbox ("/").
  (rev 1.24)
- Use libarchive 3.x interface: check result for archive_read_free()
  and don't call archive_read_close manually. (rev 1.23)
- Always overwrite symlinks on extraction, ever if they're newer than
  entries in archive.
- Use getline() rather than getdelim().

PR: 231827
Submitted by: ak
Reviewed by: mm
Obtained from: NetBSD
MFC after: 2 weeks

3 years agousr.sbin/rtadvctl: Remove support for FreeBSD 9.x.
Xin LI [Sat, 2 Jan 2021 00:04:55 +0000 (16:04 -0800)]
usr.sbin/rtadvctl: Remove support for FreeBSD 9.x.

3 years agonfsd: fix NFSv4.0 seqid handling for ERELOOKUP
Rick Macklem [Fri, 1 Jan 2021 22:21:51 +0000 (14:21 -0800)]
nfsd: fix NFSv4.0 seqid handling for ERELOOKUP

Commit 774a36851e0e fixed the NFS server so that it could handle
ERELOOKUP returns from VOP calls by redoing the operation/RPC.
However, for NFSv4.0, redoing an Open would increment
the open_owner's seqid multiple times, breaking the protocol.
This patch sets a new flag called ND_ERELOOKUP on the RPC when
a redo is in progress.  Then the code that increments the seqid
avoids the seqid increment/check when the flag is set, since
it indicates this has already been done for the Open.

3 years agonfsd: fix NFS server for ERELOOKUP
Rick Macklem [Fri, 1 Jan 2021 21:55:51 +0000 (13:55 -0800)]
nfsd: fix NFS server for ERELOOKUP

r367672 modified UFS such that certain VOPs, such as
VOP_CREATE() will intermittently return ERELOOKUP.
When this happens, the entire system call, or NFS
operation in the case of the NFS server, must be redone.

This patch adds that support to the NFS server by rolling
back the state of the NFS request arguments and NFS
reply arguments mbuf lists to the condition they were
in before the operation and then redoing the operation.

Tested by: pho
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D27875

3 years agosyscons: scrnmaps: appease -Wmissing-variable-declarations
Kyle Evans [Fri, 1 Jan 2021 17:53:47 +0000 (11:53 -0600)]
syscons: scrnmaps: appease -Wmissing-variable-declarations

scrmap is only used in the one compilation unit in all cases, make it static
rather than extern'ing it. There's little benefit, but it's easy to do.

It's unclear how this hasn't failed many builds before now, since it should
have cropped up sometime around deeper hierarchies getting a default WARNS.

MFC after: 3 days

3 years agoefi loader: fix typos in a comment
Eric van Gyzen [Fri, 1 Jan 2021 17:38:39 +0000 (11:38 -0600)]
efi loader: fix typos in a comment

...mostly because it's a harmless way to try the shiny new git repo.

Sponsored by: Dell EMC Isilon

3 years agoping: fix ping when the kernel was built without INET6
Alan Somers [Fri, 1 Jan 2021 17:25:49 +0000 (10:25 -0700)]
ping: fix ping when the kernel was built without INET6

If the kernel was built without INET6, default to ICMP.  Or, if it was
built without INET, default to ICMPv6.

PR: 251725
Reported by: jbeich
Reviewed by: jbeich
Tested by: jbeich
MFC with: 368045

3 years agofusefs: implement FUSE_COPY_FILE_RANGE.
Alan Somers [Tue, 29 Dec 2020 01:25:21 +0000 (18:25 -0700)]
fusefs: implement FUSE_COPY_FILE_RANGE.

This updates the FUSE protocol to 7.28, though most of the new features
are optional and are not yet implemented.

MFC after: 2 weeks
Relnotes: yes
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D27818

3 years agofusefs: fix an expectation in one of the tests
Alan Somers [Tue, 29 Dec 2020 17:48:34 +0000 (10:48 -0700)]
fusefs: fix an expectation in one of the tests

An order-of-operations problem caused an expectation intended for
FUSE_READ to instead match FUSE_ACCESS.  Surprisingly, only one test
case was affected.

MFC after: 2 weeks
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D27818

3 years agoFix i386 build following 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4.
Cy Schubert [Fri, 1 Jan 2021 16:46:58 +0000 (08:46 -0800)]
Fix i386 build following 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4.

MFC after: 2 weeks
X-MFC with: 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4

3 years agosctp: improve handling of aborted associations
Michael Tuexen [Fri, 1 Jan 2021 14:59:10 +0000 (15:59 +0100)]
sctp: improve handling of aborted associations

Don't clear a flag, when the structure already has been freed.
Reported by: syzbot+07667d16c96779c737b4@syzkaller.appspotmail.com

3 years agoMerge commit 4f568fbd2 from llvm git (by Nemanja Ivanovic):
Dimitry Andric [Fri, 1 Jan 2021 14:35:13 +0000 (15:35 +0100)]
Merge commit 4f568fbd2 from llvm git (by Nemanja Ivanovic):

  [PowerPC] Do not emit HW loop when TLS var accessed in PHI of loop
  exit

  If any PHI nodes in loop exit blocks have incoming values from the
  loop that are accesses of TLS variables with local dynamic or general
  dynamic TLS model, the address will be computed inside the loop.
  Since this includes a call to __tls_get_addr, this will in turn cause
  the CTR loops verifier to complain. Disable CTR loops in such cases.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=48527
This should fix building ceph 12.2.12 on powerpc64, powerpc, powerpcspe
and powerpc64le.

Requested by: pkubaj
MFC after: 3 days

3 years agostand: fix WITHOUT_FORTH/WITHOUT_LOADER_LUA build
Kyle Evans [Fri, 1 Jan 2021 06:22:48 +0000 (00:22 -0600)]
stand: fix WITHOUT_FORTH/WITHOUT_LOADER_LUA build

Previously having ficl/liblua in LIB32LIST with their respective option
turned OFF would be relatively harmless, as we wouldn't act on it unless we
were building the non-32 variant. As of ac5f382a9d0a, however, these are
now used for dependencies in some cases and must reflect what's actually
going to be built.

3 years agojail: revert the attachment part of b4e87a632955
Jamie Gritton [Fri, 1 Jan 2021 03:55:49 +0000 (19:55 -0800)]
jail: revert the attachment part of b4e87a632955

The change to kern_jail_set that was supposed to "also properly clean
up when attachment fails" didn't fix a memory leak but actually caused
a double free.  Back that part out, and leave the part that manages
allprison_lock state.

3 years agotmpfs: use VNPASS when asserting on a vnode in tmpfs_read_pgcache
Mateusz Guzik [Fri, 1 Jan 2021 03:19:13 +0000 (03:19 +0000)]
tmpfs: use VNPASS when asserting on a vnode in tmpfs_read_pgcache

3 years agoSoften caveat about fractional seconds for sleep(1)
Benjamin Kaduk [Fri, 1 Jan 2021 03:17:40 +0000 (19:17 -0800)]
Soften caveat about fractional seconds for sleep(1)

Support for fractional seconds has become much more widespread since
this text was originally written.

Reported by:    Mark Eichin
Reviewed by:    gbe, jilles
Differential Revision:  https://reviews.freebsd.org/D26208

3 years agoufs: use VNPASS when asserting on a vnode in ufs_read_pgcache
Mateusz Guzik [Fri, 1 Jan 2021 03:14:11 +0000 (03:14 +0000)]
ufs: use VNPASS when asserting on a vnode in ufs_read_pgcache

3 years agoservices: reinstate CouchDB and bring amqps
Pedro F. Giffuni [Fri, 1 Jan 2021 01:49:03 +0000 (20:49 -0500)]
services: reinstate CouchDB and bring amqps

CouchDB was mistakenly removed in r368712
amqps is used by net/rabbitmp

Both are registered in IANA

Reported by: dch
Differential Revision: https://reviews.freebsd.org/D27691

3 years agoservices: fiz bug introduced in r361898
Pedro F. Giffuni [Fri, 1 Jan 2021 00:38:29 +0000 (19:38 -0500)]
services: fiz bug introduced in r361898

Reported by: deischen@

3 years agocache: fold NCF_WHITE check into the rest
Mateusz Guzik [Mon, 28 Dec 2020 11:24:48 +0000 (11:24 +0000)]
cache: fold NCF_WHITE check into the rest

Tested by: pho

3 years agocache: call cache_fplookup_modifying in neg
Mateusz Guzik [Mon, 28 Dec 2020 11:22:35 +0000 (11:22 +0000)]
cache: call cache_fplookup_modifying in neg

Tested by: pho

3 years agocache: refactor cache_fpl_handle_root to fit the rest of the code better
Mateusz Guzik [Mon, 28 Dec 2020 09:25:01 +0000 (09:25 +0000)]
cache: refactor cache_fpl_handle_root to fit the rest of the code better

Tested by: pho

3 years agocache: refactor dot handling
Mateusz Guzik [Mon, 28 Dec 2020 07:46:02 +0000 (08:46 +0100)]
cache: refactor dot handling

Tested by: pho

3 years agocache: remove a branch from mount point checking
Mateusz Guzik [Mon, 28 Dec 2020 07:34:29 +0000 (08:34 +0100)]
cache: remove a branch from mount point checking

Tested by: pho

3 years agocache: support lockless lookup of degenerate paths
Mateusz Guzik [Mon, 28 Dec 2020 06:53:17 +0000 (07:53 +0100)]
cache: support lockless lookup of degenerate paths

Tested by: pho

3 years agocache: save on branching when parsing the path by inserting a sentinel
Mateusz Guzik [Mon, 28 Dec 2020 06:33:12 +0000 (07:33 +0100)]
cache: save on branching when parsing the path by inserting a sentinel

Tested by: pho

3 years agocache: hoist trailing slash and degenerate path handling out of the loop
Mateusz Guzik [Mon, 28 Dec 2020 04:24:15 +0000 (05:24 +0100)]
cache: hoist trailing slash and degenerate path handling out of the loop

Tested by: pho

3 years agofd: inline pwd_get_smr
Mateusz Guzik [Mon, 28 Dec 2020 09:29:57 +0000 (09:29 +0000)]
fd: inline pwd_get_smr

Tested by: pho

3 years agoddb: Display process flags (p_flag and p_flag2) in 'show proc'.
John Baldwin [Fri, 1 Jan 2021 00:01:52 +0000 (16:01 -0800)]
ddb: Display process flags (p_flag and p_flag2) in 'show proc'.

Reviewed by: kib
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D27872

3 years agoUse kdb_thr_* to iterate over threads consistently in DDB.
John Baldwin [Fri, 1 Jan 2021 00:01:35 +0000 (16:01 -0800)]
Use kdb_thr_* to iterate over threads consistently in DDB.

The "findstack", "show all trace", and "show active trace" commands
were iterating over allproc to enumerate threads.  This missed threads
executing in exit1() after being removed from allproc.

Reviewed by: kib
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D27829