Commit Graph

257196 Commits

Author SHA1 Message Date
Nathan Whitehorn
e77cf2a4ab Restore /boot/efi to mtree.
Instead of whether /boot/efi exists, which it now always does, including
on systems that don't and can't use EFI, use whether /boot/efi is
present in fstab to signal to the installer that it is a valid ESP and
should be configured. This has essentially the same semantics, but allows
/boot/efi to be created unconditionally.

Reviewed by:	bdragon, imp
Tested by:	bdragon (ppc64)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D29068
2021-03-05 21:01:11 -05:00
Eric Joyner
d08b8680e1 ice(4): Update to version 0.28.1-k
This updates the driver to align with the version included in
the "Intel Ethernet Adapter Complete Driver Pack", version 25.6.

There are no major functional changes; this mostly contains
bug fixes and changes to prepare for new features. This version
of the driver uses the previously committed ice_ddp package
1.3.19.0.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Tested by:	jeffrey.e.pieper@intel.com
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D28640
2021-03-05 17:33:39 -08:00
Richard Scheffenegger
e53138694a tcp: Add prr_out in preparation for PRR/nonSACK and LRD
Reviewed By:           #transport, kbowling
MFC after:             3 days
Sponsored By:          Netapp, Inc.
Differential Revision: https://reviews.freebsd.org/D29058
2021-03-06 00:38:22 +01:00
Mark Johnston
fef8450971 netmap: Stop printing a line to the dmesg in netmap_init()
netmap is compiled into the kernel by default so initialization was
always reported, and netmap uses a formatting convention not used in the
rest of the kernel.

Reviewed by:	vmaffione
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29099
2021-03-05 18:07:47 -05:00
Scott Long
afbee98232 Remove xform_poly1305.h from the build, it is not necessary. 2021-03-05 21:28:10 +00:00
Navdeep Parhar
765d623d60 cxgbe(4): Remove extra blank line.
No functional change.
2021-03-05 12:48:39 -08:00
Dimitry Andric
772c631af8 Add a few missed files to libclang_rt.profile-<arch>.a
Otherwise, programs compiled with -fprofile-instr-generate will
encounter undefined symbol errors during linking, for example
__llvm_profile_counter_bias, lprofSetRuntimeCounterRelocation and a few
others were missing from the profile library.

Reported by:	ota@j.email.ne.jp
PR:		254001
MFC after:	3 days
2021-03-05 21:07:07 +01:00
Navdeep Parhar
4a4e9c516c cxgbe(4): Fix an assertion that is not valid during attach.
Firmware access from t4_attach takes place without any synchronization.
The driver should not panic (debug kernels) if something goes wrong in
early communication with the firmware.  It should still load so that
it's possible to poke around with cxgbetool.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2021-03-05 11:28:18 -08:00
Eric van Gyzen
8b434feedf Only set delayed inval for procs using PTI
invltlb_invpcid_pti_handler() was requesting delayed TLB invalidation
even for processes that aren't using PTI.  With an out-of-tree
change to avoid PTI for non-jailed root processes, this caused an
assertion failure in pmap_activate_sw_pcid_pti() when context-switching
between PTI and non-PTI processes.

Reviewed by:	bdrewery kib tychon
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D29094
2021-03-05 13:20:08 -06:00
Mark Johnston
4fc60fa929 opencrypto: Make cryptosoft attach silently
cryptosoft is always present and doesn't print any useful information
when it attaches.

Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29098
2021-03-05 13:11:25 -05:00
Mark Johnston
89b650872b ktls: Hide initialization message behind bootverbose
We don't typically print anything when a subsystem initializes itself,
and KTLS is currently disabled by default anyway.

Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29097
2021-03-05 13:11:02 -05:00
John Baldwin
bb6e84c988 poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c.
There currently isn't a need to provide a public interface to a
software Poly1305 implementation beyond what is already available via
libsodium's APIs and these symbols conflict with symbols shared within
the ossl.ko module between ossl_poly1305.c and ossl_chacha20.c.

Reported by:	se, kp
Fixes:		78991a93eb
Sponsored by:	Netflix
2021-03-05 09:55:11 -08:00
Mark Johnston
732b69c9f9 acpi: Make nexus_acpi quiet on amd64 and i386
Otherwise during attach newbus prints "nexus0", which is not very
useful.

The generic nexus device is already quiet, as is nexus_acpi on arm64.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2021-03-05 12:54:00 -05:00
Richard Scheffenegger
9a13d9dcee tcp: remove a superfluous local var in tcp_sack_partialack()
No functional change.

Reviewed By: #transport, tuexen
MFC after:   3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29088
2021-03-05 18:20:23 +01:00
Richard Scheffenegger
4a8f3aad37 tcp: remove incorrect reset of SACK variable in PRR
Reviewed By:   #transport, rrs, tuexen
PR:            253848
MFC after:     3 days
Sponsored By:  NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29083
2021-03-05 17:45:54 +01:00
Michael Tuexen
705d06b289 rack: unbreak TCP fast open for the client side
Allow sending user data on the SYN segment.

Reviewed by:		rrs
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D29082
Sponsored by:		Netflix, Inc.
2021-03-05 16:03:03 +01:00
Martin Matuska
6781b8a32e zfs: update openzfs version reference to bedbc13da
It was missed in the latest merge.

X-MFC-with:	caed7b1c39
2021-03-05 15:55:58 +01:00
Stefan Eßer
028616d0dd bc: Vendor import new version 3.3.3 2021-03-05 12:33:01 +01:00
Ryan Moeller
88832d59de sbin/ifconfig: Minor housekeeping
Coalesce adjacent lint ifdefs.
Fix spelling of nitems.

Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D29022
2021-03-05 04:15:55 -05:00
Ryan Moeller
2803fa471e sbin/ifconfig: Get media status with libifconfig
Code deduplication.

Reviewed by:	kp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D29030
2021-03-05 04:15:55 -05:00
Ryan Moeller
c4ba4aa547 libifconfig: Overhaul ifconfig_media_* interfaces
Define an ifmedia_t type to use for ifmedia words.

Add ifconfig_media_lookup_* functions to lookup ifmedia words by name.

Get media options as an array of option names rather than formatting it
as a comma-delimited list into a buffer.

Sprinkle const on static the static description tables for peace of
mind.

Don't need to zero memory allocated by calloc.

Reviewed by:	kp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D29029
2021-03-05 04:15:55 -05:00
Michal Vanco
5084dde5f0 pchtherm: fix a wrong bit and a wrong register use
Probably just copy-paste errors that slipped in.

PR:		253915
Reported by:	Michal Vanco <michal.vanco@gmail.com>
MFC after:	1 week
2021-03-05 11:01:28 +02:00
Kristof Provost
29698ed904 pf: Mark struct pf_pdesc as kernel only
This structure is only used by the kernel module internally. It's not
shared with user space, so hide it behind #ifdef _KERNEL.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-03-05 09:21:06 +01:00
Wei Hu
80f39bd95f Hyper-V: hn: Store host hash value in flowid
When rx packet contains hash value sent from host, store it in
the mbuf's flowid field so when the same mbuf is on the tx path,
the hash value can be used by the host to determine the outgoing
network queue.

MFC after:	2 weeks
Sponsored by:	Microsoft
2021-03-05 04:46:54 +00:00
Mark Johnston
ff6a7e4ba6 ktls: Fix CBC encryption when input and output iov sizes are different
Reported by:	gallatin
Tested by:	gallatin
Fixes:		49f6925ca
Differential Revision:	https://reviews.freebsd.org/D29073
2021-03-04 22:45:40 -05:00
Mitchell Horne
0d3b3beeb2 riscv: fix errors in some atomic type aliases
This appears to be a copy-and-paste error that has simply been
overlooked. The tree contains only two calls to any of the affected
variants, but recent additions to the test suite started exercising the
call to atomic_clear_rel_int() in ng_leave_write(), reliably causing
panics.

Apparently, the issue was inherited from the arm64 atomic header. That
instance was addressed in c90baf6817, but the fix did not make its way
to RISC-V.

Note that the particular test case ng_macfilter_test:main still appears
to fail on this platform, but this change reduces the panic to a
timeout.

PR:		253237
Reported by:	Jenkins, arichardson
Reviewed by:	kp, arichardson
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D29064
2021-03-04 16:59:58 -04:00
Ed Maste
19587d7422 clang: Fix -gz=zlib options for linker
Clang commit ccb4124a4172bf2cb2e1cd7c253f0f1654fce294:

Fix -gz=zlib options for linker

gcc translates -gz=zlib to --compress-debug-options=zlib for both
assembler and linker but clang only does this for assembler.

The linker needs --compress-debug-options=zlib option to compress the
debug sections in the generated executable or shared library.

Due to this bug, -gz=zlib has no effect on the generated executable or
shared library.

This patch fixes that.

Clang commit 462cf39a5c180621b56f7602270ce33eb7b68d23:

[Driver] Fix -gz=zlib options for linker also on FreeBSD

ccb4124a4172 fixed translating -gz=zlib to --compress-debug-sections for
linker invocation for several ToolChains, but omitted FreeBSD.

Approved by:	dim
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29028
2021-03-04 15:10:03 -05:00
Kristof Provost
448732b8e2 altq: Increase maximum number of CBQ and HFSC classes
In some configurations we need more classes than ALTQ supports by
default.  Increase the maximum number of classes we allow.
This will only cost us a comparatively trivial amount of memory, so
there's little reason not to do so.

If ever we find we want even more we may want to consider turning these
defines into a tunable, but for now do the easy thing.

Reviewed by:	donner@
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D29034
2021-03-04 20:58:22 +01:00
Kristof Provost
bb4a7d94b9 net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros
Introduce convenience macros to retrieve the DSCP, ECN or traffic class
bits from an IPv6 header.

Use them where appropriate.

Reviewed by:	ae (previous version), rscheff, tuexen, rgrimes
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D29056
2021-03-04 20:56:48 +01:00
Kristof Provost
f19323847c pf: Retrieve DSCP value from the IPv6 header
Teach pf to read the DSCP value from the IPv6 header so that we can
match on them.

Reviewed by:	donner
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D29048
2021-03-04 20:56:48 +01:00
Kyle Evans
466df976ba jail(8): reset to root cpuset before attaching to run commands
Recent changes have made it such that attaching to a jail will augment
the attaching process' cpu mask with the jail's cpuset. While this is
convenient for allowing the administrator to cpuset arbitrary programs
that will attach to a jail, this is decidedly not convenient for
executing long-running daemons during jail creation.

This change inserts a reset of the process cpuset to the root cpuset
between the fork and attach to execute a command. This allows commands
executed to have the widest mask possible, and the administrator can
cpuset(1) it back down inside the jail as needed.

With this applied, one should be able to change a jail's cpuset at
exec.poststart in addition to exec.created.  The former was made
difficult if jail(8) itself was running with a constrained set, as then
some processes may have been spawned inside the jail with a non-root
set.  The latter is the preferred option so that processes starting in
the jail are constrained appropriately up front.

Note that all system commands are still run with the process' initial
cpuset applied.

PR:		253724
MFC after:	3 days
Reviewed by:	jamie
Differential Revision:	https://reviews.freebsd.org/D29008
2021-03-04 13:28:53 -06:00
Alex Richardson
6019514b0b truss: split counting of syscalls and syscall calling convention
This change is a refactoring cleanup to improve support for compat32
syscalls (and compat64 on CHERI systems). Each process ABI now has it's
own struct sycall instead of using one global list. The list of all
syscalls is replaced with a list of seen syscalls. Looking up the syscall
argument passing convention now interates over the fixed-size array instead
of using a link-list that's populated on startup so we no longer need the
init_syscall() function.
The actual functional changes are in D27625.

Reviewed By:	jhb
Differential Revision: https://reviews.freebsd.org/D27636
2021-03-04 18:30:02 +00:00
Alex Richardson
172a624f0c Silence annoying and incorrect non-default linker warning with GCC
The CROSS_TOOLCHAIN GCC .mk files include -B${CROSS_BINUTILS_PREFIX}, so
GCC will select the right linker and we don't need to warn.
While here also apply 17b8b8fb5f to kern.mk.

Test Plan:	no more warning printed with CROSS_TOOLCHAIN=mips-gcc6
Reviewed By:	jhb
Differential Revision: https://reviews.freebsd.org/D29015
2021-03-04 18:27:39 +00:00
Alex Richardson
b2c8cbf992 Remove unnecessary semicolon from CRITICAL_ASSERT()
This fixes off-by-default "empty statement" compiler warnings.
2021-03-04 18:26:50 +00:00
Alex Richardson
0072e5e0f3 sys/arm64/arm64/vfp.c: Fix -Wunused and -Wpointer-sign warnings
These are off by default but were flagged by my IDE while adding some
debugging printfs for D29060.
2021-03-04 18:25:44 +00:00
Michal Meloun
a5dce53b75 mvebu_gpio: Multiple fixes.
- gpio register access primitives
- locking in interrupt path
- cleanup

In cooperation with: mw
Reviewed by:	mw (initial version)
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D29044
Differential Revision:	https://reviews.freebsd.org/D28911
2021-03-04 17:54:40 +01:00
Michal Meloun
f97f57b518 simple_mfd: switch to controllable locking for syscon provider.
MFC after	3 weeks
2021-03-04 16:12:39 +01:00
Mark Johnston
5e6989ba4f link_elf_obj: Handle init_array sections in KLDs
Reuse existing handling for .ctors, print a warning if multiple
constructor sections are present.   Destructors are not handled as of
yet.

This is required for KASAN.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29049
2021-03-04 10:07:10 -05:00
Andrew Turner
23553d6b94 Fix creating the early arm64 level 2 blocks
In 48ba9b2669 we switched from creating level 1 blocks to smaller
level 2 blocks when creating the early arm64 page tables. On issue
was that they had a different meaning for register x7. The former used
it to hold page table attributes, while the latter held just the memory
type. This caused these attributes to be incorrectly shifted.

Fix this by changing the meaning of x7 to hold the block attributes
and fix the only caller that used the old meaning.

Most hardware seems to have handled the bits being off however qemu
failed to boot as reserved bits that should be zero were being set and
qemu fails to clear these when translating from a virtual address to a
physical address.

Sponsored by:	Innovate UK
2021-03-04 14:39:12 +00:00
Alan Somers
f05b724ecb Modernize geom_stats_snapshot_get
* A logically useless memset() is used to fault in some memory pages.
  Change it to explicit_bzero so the compiler won't eliminate it.

* Eliminate the second memset.  It made sense in the days of the Big
  Kernel Lock, but not in the days of fine-grained SMP and especially
  not in the days of VDSO.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	phk
Differential Revision:	https://reviews.freebsd.org/D29047
2021-03-04 07:45:48 -07:00
Glen Barber
63749bfe96 release: sprinkle UNAME_r hacks following c883b6fd8c
Pass UNAME_r override to make(1) for ports builds when building
ports for another branch.

MFC after:	3 days
MFC with:	0be274d373, 80ab50e1de, c883b6fd8c
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-03-04 09:25:18 -05:00
Fernando Apesteguía
fc1e79740e compress(1): warn about link handling
compress(1) handles links badly and does not provide link-handling options.
Document this behavior.

PR:     84271
Submitted by: garys@opusnet.com
Approved by: gbe@ (mentor)
Differential Revision:	https://reviews.freebsd.org/D28552
2021-03-04 14:52:12 +01:00
Glen Barber
fa04db4762 release: fix VMSIZE following 1ca8842f3a
truncate(1) is not case-sensitive with regard to setting the size
of a file.  makefs(8), however, does not honor upper-case values.
Update release-specific files and the release(7) manual page to
reflect this.

MFC with:	1ca8842f3a
Submitted by:	ehem_freebsd_m5p.com (original)
Differential Review:	https://reviews.freebsd.org/D28979
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-03-04 08:43:02 -05:00
Stefan Eßer
a0d921bae9 Remove obsolete bc library and dc test files
The new bc implementation has the library embedded into the binary
and tests in tests/usr.bin/bc instead of tests/ustr.bin/dc.

MFC after:	3 days
2021-03-04 14:24:51 +01:00
Fernando Apesteguía
3457dbd52b mq_open(2): Fix xref to mq_unlink(2)
mq_unlink(2) was added in acab1d58be

PR: 215611
Reported by: rwatson@FreeBSD.org
Approved by: gbe@ (mentor)
Differential Revision:	https://reviews.freebsd.org/D28913
2021-03-04 13:32:42 +01:00
Chris Rees
5ac70383c8 elftoolchain: stop leaving tempfiles on error
Temporary files were not cleaned up, resulting in $TMPDIR or even
the current directory becoming littered with ecp.* files.

This happened with error and even sometimes on success!

Approved by:		dim
MFC after:		4 weeks
Accepted upstream:	https://sourceforge.net/p/elftoolchain/code/3918/
Differential Revision:	https://reviews.freebsd.org/D28651
2021-03-04 12:24:07 +00:00
Oleksandr Tymoshenko
37cd6c20db cron: consume blanks in system crontabs before options
On system crontabs, multiple blanks are not being consumed after reading the
username. This change adds blank consumption before parsing any -[qn] options.
Without this change, an entry like:

  * * * * * username  -n true  # Two spaces between username and option.

will fail, as the shell will try to execute (' -n true'), while an entry like:

  * * * * * username -n true   # One space between username and option.

works as expected (executes 'true').

For user crontabs, this is not an issue as the preceding (day of week
or @shortcut) processing consumes any leading whitespace.

PR:		253699
Submitted by:	Eric A. Borisch <eborisch@gmail.com>
MFC after:	1 week
2021-03-03 23:23:31 -08:00
Jung-uk Kim
483c6da3a2 libkvm: Refine the previous commit (645eaa2cca)
Resort free()'ing memory in kvm_close() to make it easier to MFC.

MFC after:	3 days
2021-03-03 18:50:45 -05:00
Ed Maste
0dcde5cc12 growfs: allow operation on RW-mounted filesystems
growfs supports growing mounted filesystems (writes are temporarily
suspended while the grow happens).  Drop the check for fs_clean == 0
to restore this case.  Leave fs_flags check for FS_UNCLEAN or
FS_NEEDSFSCK which represent the state of the filesystem when it was
mounted, and fsck should be run first if they are set.

PR:		253754
Reviewed by:	mckusick
MFC after:	3 days
Fixes:		6eb925f845 ("Filesystem utilities that modify the...")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29021
2021-03-03 18:35:21 -05:00
John Baldwin
78991a93eb ossl: Add support for the ChaCha20 + Poly1305 AEAD cipher from RFC 8439
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D28757
2021-03-03 15:20:57 -08:00