]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agopf: Split pf_rule into kernel and user space versions
Kristof Provost [Sat, 5 Dec 2020 13:32:54 +0000 (14:32 +0100)]
pf: Split pf_rule into kernel and user space versions

No functional change intended.

MFC after: 2 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D27758

3 years agopf: Migrate pf_rule and related structs to pf.h
Kristof Provost [Thu, 3 Dec 2020 16:17:39 +0000 (17:17 +0100)]
pf: Migrate pf_rule and related structs to pf.h

As part of the split between user and kernel mode structures we're
moving all user space usable definitions into pf.h.

No functional change intended.

MFC after:      2 weeks
Sponsored by:   Orange Business Services
Differential Revision: https://reviews.freebsd.org/D27757

3 years agopf: Use counter_u64 in pf_src_node
Kristof Provost [Fri, 13 Nov 2020 19:31:51 +0000 (20:31 +0100)]
pf: Use counter_u64 in pf_src_node

Reviewd by: philip
MFC after:      2 weeks
Sponsored by:   Orange Business Services
Differential Revision: https://reviews.freebsd.org/D27756

3 years agopf: Split pf_src_node into a kernel and userspace struct
Kristof Provost [Wed, 23 Dec 2020 13:51:52 +0000 (14:51 +0100)]
pf: Split pf_src_node into a kernel and userspace struct

Introduce a kernel version of struct pf_src_node (pf_ksrc_node).

This will allow us to improve the in-kernel data structure without
breaking userspace compatibility.

Reviewed by: philip
MFC after: 2 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D27707

3 years agoFix devinfo typo.
Alexander Motin [Tue, 5 Jan 2021 19:56:23 +0000 (14:56 -0500)]
Fix devinfo typo.

Submitted by: Nick Wolff <darkfiberiru@gmail.com>
MFC after:  1 week
Differential Revision: https://reviews.freebsd.org/D27981

3 years agoarm64: genet: Add bcm2711-genet-v5 compatible
Emmanuel Vadot [Tue, 5 Jan 2021 19:50:43 +0000 (20:50 +0100)]
arm64: genet: Add bcm2711-genet-v5 compatible

Later dtb from the RPI Foundation removed the brcm,genet-v5 compatible
for some unknown reason, add brcm,bcm2711-genet-v5 to the list of compatible
device for if_genet

3 years agoUPDATING: we are now in 2021, bye 2020
Baptiste Daroussin [Tue, 5 Jan 2021 16:16:46 +0000 (17:16 +0100)]
UPDATING: we are now in 2021, bye 2020

Reported by: N.J. Mann <njm@njm.me.uk>

3 years agortld: map without PROT_EXEC for relocation
Ed Maste [Mon, 4 Jan 2021 18:55:44 +0000 (13:55 -0500)]
rtld: map without PROT_EXEC for relocation

This makes text segment relocation work under W^X.

Submitted by: Greg V <greg@unrelenting.technology> (original version)
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D27953

3 years agoncurses: document the change requires a clean build
Baptiste Daroussin [Tue, 5 Jan 2021 15:38:05 +0000 (16:38 +0100)]
ncurses: document the change requires a clean build

Reporter by: cy

3 years agoAdd some examples to script.1
Mateusz Piotrowski [Tue, 5 Jan 2021 15:28:32 +0000 (16:28 +0100)]
Add some examples to script.1

While here:

- Split synopsis into two parts. The first explains how to record
  sessions, while the second one explains how to replay (some of)
  the recorded sessions.
- Fix the -width argument of the environment variables list.

MFC after: 1 week

3 years agoImprove readability of the options list
Mateusz Piotrowski [Tue, 5 Jan 2021 14:46:56 +0000 (15:46 +0100)]
Improve readability of the options list

MFC after: 3 days

3 years agoncurses: only keep the version with widechar support
Baptiste Daroussin [Mon, 4 Jan 2021 16:29:40 +0000 (17:29 +0100)]
ncurses: only keep the version with widechar support

Only keep the widechar version of ncurses as libncursesw.so.9

Keep the old name to avoid breaking the ABI compatibility (the non
widechar version libncurses.so.9 is not binary compatible with
libncursesw.so.9) since all ports and base are already only linking
against the widechar version we can simply remove libncurses.so.9

Since the .9 version only lived in the dev branch and never ended in a
release, it is simply removed and not added to any binary compat
package.

Add symlinks to keep build time compatibility for anyone linking against
-lncurses

3 years agoAdd the missing pmcstat log entries
Andrew Turner [Mon, 4 Jan 2021 18:16:10 +0000 (18:16 +0000)]
Add the missing pmcstat log entries

Sponsored by: Innovate UK

3 years agoAdd missing structs to pmclog_entry
Andrew Turner [Mon, 4 Jan 2021 17:44:10 +0000 (17:44 +0000)]
Add missing structs to pmclog_entry

This is used to size allocations so needs to incude all log structs
to ensure its size is correct.

Sponsored by: Innovate UK

3 years agoloader: only use vidc_install_font() with vga controller
Toomas Soome [Mon, 4 Jan 2021 22:43:39 +0000 (00:43 +0200)]
loader: only use vidc_install_font() with vga controller

If the controller does not support VGA, we should not
touch VGA registers.

3 years agoloader: vidc_load_palette() does not need arguments
Toomas Soome [Mon, 4 Jan 2021 21:29:43 +0000 (23:29 +0200)]
loader: vidc_load_palette() does not need arguments

Remove left over argument from vidc_load_palette.

3 years agoHonor the vm page's PG_NODUMP flag on arm and i386.
Alan Cox [Mon, 4 Jan 2021 21:59:05 +0000 (15:59 -0600)]
Honor the vm page's PG_NODUMP flag on arm and i386.

Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27949

3 years agoRemove now-unused RT_GATEWAY* definitions.
Alexander V. Chernikov [Mon, 4 Jan 2021 21:45:46 +0000 (21:45 +0000)]
Remove now-unused RT_GATEWAY* definitions.

They were used to simplify nexthop transition, hence not needed
 anymore.

3 years agocap_sysctl: expose structures and variables
Mariusz Zaborski [Mon, 4 Jan 2021 19:56:07 +0000 (20:56 +0100)]
cap_sysctl: expose structures and variables

Expose structures and variables that may be used on systems
build without Casper support.

3 years agocasper: convert macros to inline functions
Mariusz Zaborski [Mon, 4 Jan 2021 19:50:58 +0000 (20:50 +0100)]
casper: convert macros to inline functions

In libcasper, the first argument to the function is a structure that
represents a connection to Casper. On systems without Casper, macros
are used to interpose the Casper functions to standard libc ones.
This may cause errors/warnings that the variable is not used.
With the inline function, there is no such problem.

3 years agolib9p: fix building on systems without capser
Mariusz Zaborski [Mon, 4 Jan 2021 19:48:48 +0000 (20:48 +0100)]
lib9p: fix building on systems without capser

PR: 252353

3 years agoSupport overflow count in hwpmc on arm64
Andrew Turner [Tue, 29 Dec 2020 12:44:45 +0000 (12:44 +0000)]
Support overflow count in hwpmc on arm64

We increment the overflow count when receiving an overflow interrupt
with special care to check if it happens while reading the event counter.

Sponsored by: Innovate UK

3 years agoloader: fix powerpc build with gfx_fb
Toomas Soome [Mon, 4 Jan 2021 16:51:58 +0000 (16:51 +0000)]
loader: fix powerpc build with gfx_fb

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

3 years agoloader: fix mips build with gfx_fb
Toomas Soome [Mon, 4 Jan 2021 16:41:04 +0000 (16:41 +0000)]
loader: fix mips build with gfx_fb

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

3 years agoarm64: rockchip: rk_clk_mux: Tell the clk framework if we didn't change the clock
Emmanuel Vadot [Mon, 4 Jan 2021 16:30:00 +0000 (17:30 +0100)]
arm64: rockchip: rk_clk_mux: Tell the clk framework if we didn't change the clock

Otherwise the clk framework will not pass the freq change request to the clock
parents.
Fix d03fd8ede2c4
Reported by: br

3 years agoinclude: Use INCSGROUPS for a few files
Emmanuel Vadot [Mon, 14 Dec 2020 17:56:56 +0000 (18:56 +0100)]
include: Use INCSGROUPS for a few files

Instead of using install directly use INCSGROUPS for them.
All those files are the ones we installed when the directory have more .h
files that we don't want to install so they aren't using the LSUBDIR stuff.

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

3 years agoinclude: Tag the last includes files as part of the -dev package
Emmanuel Vadot [Tue, 15 Dec 2020 12:50:00 +0000 (13:50 +0100)]
include: Tag the last includes files as part of the -dev package

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

3 years agopkgbase: rename PKGSIGNKEY to PKG_REPO_SIGNING_KEY
Emmanuel Vadot [Mon, 4 Jan 2021 15:23:10 +0000 (16:23 +0100)]
pkgbase: rename PKGSIGNKEY to PKG_REPO_SIGNING_KEY

this way, it'll be automatically picked up by poudriere
That's quite handy when building pkgbase!

Submitted by: Mina Galić <me@igalic.co>
Reviewed By: bapt, bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D27690

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.