Commit Graph

272599 Commits

Author SHA1 Message Date
наб
7e05fa3b44 uname: -v: strip final whitespace compatibly with uname(3)
This restores POSIX.1 conformance

PR: 260938
2022-02-18 16:30:10 +00:00
Michael Tuexen
fd0d53f85c sctp: improve robustness
MFC after:	3 days
2022-02-18 14:30:07 +01:00
Michael Tuexen
274a0e4a8d sctp: cleanup, no functional change intended.
MFC after:	3 days
2022-02-18 14:20:01 +01:00
Tom Jones
3931c072c6 diff: fix failed compare when ignoring file case
With --ignore-file-name-case we need to compare files regardless of
case. We need to propigate both names down to diffit so we can look up
the correct file when the names differ based on case, otherwise we try
to look up the file using the case from the a tree which might not be
discoverable if its case is different in the b tree.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34201
2022-02-18 15:51:38 +00:00
Tom Jones
cffebd1e8f Remove surplus check for which diff is being tested
Must have left this when I was testing the test invocation for
8f79bd9b85

Pointy hat:	thj
Sponsored by:	Klara Inc.
2022-02-18 15:47:46 +00:00
Tom Jones
f4be3645a1 diff: add --no-dereference flag
When diffing files and directories, don't follow symbolic links, instead
compare where the links point to.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34203
2022-02-18 15:17:13 +00:00
Tom Jones
8f79bd9b85 diff: Detect Objective-C methods
When searching back for function definitions, consider lines starting
with '+' and '-', this allows us to pick up Objective-C methods as well
as C style function definitions.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34202
2022-02-18 15:09:57 +00:00
Michael Tuexen
3ca204c97a sctp: remove unused parameter
MFC after:	3 days
2022-02-18 12:20:44 +01:00
Ed Maste
4e1e3ff571 vtfontcvt: update FreeBSD Foundation copyrights
Remove "All Rights Reserved"
2022-02-17 20:05:14 -05:00
Cy Schubert
9cf5bc93f6 unbound: Vendor import 1.15.0
Vendor import GA release of unbound 1.15.0.

MFC after:      2 weeks
2022-02-17 16:05:15 -08:00
Cy Schubert
3574dc0bd8 unbound: Vendor import 1.15.0 2022-02-17 14:47:14 -08:00
Michael Tuexen
11c4d4b966 sctp: fix a signed/unsigned mismatch.
MFC after:	3 days
2022-02-17 22:45:57 +01:00
Colin Percival
5c73b3e0a3 Add support for getting early entropy from UEFI
UEFI provides a protocol for accessing randomness. This is a good way
to gather early entropy, especially when there's no driver for the RNG
on the platform (as is the case on the Marvell Armada8k (MACCHIATObin)
for now).

If the entropy_efi_seed option is enabled in loader.conf (default: YES)
obtain 2048 bytes of entropy from UEFI and pass is to the kernel as a
"module" of name "efi_rng_seed" and type "boot_entropy_platform"; if
present, ingest it into the kernel RNG.

Submitted by:	Greg V
Reviewed by:	markm, kevans
Approved by:	csprng (markm)
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D20780
2022-02-17 13:01:11 -08:00
Alfonso S. Siciliano
c44160d8ad
Add myself (asiciliano) as src committer and bapt as my mentor
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34310
2022-02-17 19:49:40 +01:00
Mark Johnston
c89def05b5 armv8crypto: Remove leftover debug printfs
Fixes:	26b08c5d21 ("armv8crypto: Use cursors to access crypto buffer data")
Reported by:	bz
2022-02-17 14:25:45 -05:00
Aleksandr Fedorov
cb28dfb27d md(4): Add dummy support of the BIO_FLUSH command for malloc and swap
backend.

PR:	260200
Reported by:	editor@callfortesting.org
Reviewed by:	vmaffione (mentor), markj
Approved by:	vmaffione (mentor), markj
Differential Revision:	https://reviews.freebsd.org/D34260
2022-02-17 22:21:56 +03:00
Michael Tuexen
76e03cc940 sctp: avoid undefined behaviour and cleanup the code.
MFC after:	3 days
2022-02-17 19:23:59 +01:00
Cy Schubert
0640e0c196 unbound: Refresh manpages to latest version
Update unbound manpages by copying the current unbound manpages in
contrib/doc/*.in to their respective manpages,

PR:		262013
Reported by:	Michael Osipov <michael.osipov@siemens.com>
Fixes:		numerous previous updates
MFC after:	3 days
2022-02-17 09:05:34 -08:00
Eric van Gyzen
86e5e10daf elfdump: handle small files more gracefully
elfdump -E on an empty file would complain "Invalid argument" because
it tried to mmap zero bytes.  With the -E flag, elfdump should
simply exit non-zero.  For tiny files, the code would reference off
the end of the mapped region.

Ensure the file is large enough to contain an ELF header before mapping it.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2022-02-17 10:09:53 -06:00
Bjoern A. Zeeb
95edb10b47 LinuxKPI: implement dma_sync_single_for_*, apply to (un)map single/sg
Implement dma_sync_single_for_{cpu,device} translating the Linux
DMA_ flags to BUS_DMASYNC_ combinations.  Make map_single/unmap_single*
functions call the respective sync function.   Apply the same logic to
the scatter-gather list map/unmap functions.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D32255
2022-02-17 13:39:15 +00:00
Kristof Provost
7d3fc84b2d pf tests: Test per-anchor tables
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-02-17 14:13:50 +01:00
Kristof Provost
7f55a9b490 pf tests: remove a stray 'set -x'
'set -x' is very useful when debugging tests, but does not need to be
left in.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-02-17 13:40:41 +01:00
Hans Petter Selasky
bc531a1faa mlx5en: Improve CQE error debugging.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-17 13:13:09 +01:00
Hans Petter Selasky
015f22f5d0 mlx5en: Fix TLS worker thread race.
Create a dedicated free state, in case the taskqueue worker is still pending,
to avoid re-activation of a freed send tag.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-17 13:13:09 +01:00
Hans Petter Selasky
ebdb700649 mlx5en: Improve RX- and TX- TLS refcounting.
Use the send tag refcounting mechanism to refcount the RX- and TX- TLS
send tags. Then it is no longer needed to wait for refcounts to reach
zero when destroying RX- and TX- TLS send tags as a result of pending
data or WQE commands.

This also ensures that when TX-TLS and rate limiting is used at the same
time, the underlying SQ is not prematurely destroyed.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-17 13:13:09 +01:00
Hans Petter Selasky
d2a788a522 mlx5en: Add missing refcount decrement on link-down.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-17 13:13:09 +01:00
Mateusz Piotrowski
bf8e978583 freebsd-update.conf.5: Sort options
Reported by:	pauamma_gundo.com
MFC after:	1 week
2022-02-17 10:54:07 +01:00
Mateusz Piotrowski
b80bb8b197 freebsd-update.conf.5: Address style issues
- Do not set Os to FreeBSD explicitly. We don't do it in other manual
  pages.
- Remove macros from the -width specifier.
- Use Xr instead of Cm to refer to the freebsd-update command.
- Address some mandoc lint warnings and use \(em instead of --.
- Wordsmith some paragraphs.
- Add a missing El macro.

MFC after:	1 week
2022-02-17 10:46:48 +01:00
Mateusz Piotrowski
6d17f2d043 freebsd-update.8: Document CreateBootEnv
Also, add bectl(8) to section "See Also". [1]

PR:		261716
Reviewed by:	debdrup, pauamma_gundo.com
MFC after:	1 week
Fixes:		f28f138905 freebsd-update: create a ZFS boot environment on install
Differential Revision:	https://reviews.freebsd.org/D34169
Co-authored-by:	Tobias Rehbein <tobias.rehbein@web.de> [1]
2022-02-17 10:26:59 +01:00
Emmanuel Vadot
ba87e9bf74 Bump FreeBSD_version after linuxkpi update.
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-17 09:42:42 +01:00
Emmanuel Vadot
995c3b88d4 linuxkpi: Add mmap_lock.h
This contain mmap_read_lock, mmap_read_unlock and mmap_write_lock_killable
which are abstraction around down_read, up_read and down_write_killable.
Note that in Linux 5.8 mmap_sem was renamed to mmap_lock.
We might want to do the same at some point but some drivers still uses
the old mmap locking API.

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34297
2022-02-17 09:31:51 +01:00
Emmanuel Vadot
1889bed23d linuxkpi: Add atomic64_fetch_add
Linux variant of atomic_fetchadd_64.

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34296
2022-02-17 09:31:39 +01:00
Emmanuel Vadot
8021ba6723 linuxkpi: Add orderly_poweroff
This simply poweroff the system.
Needed by drm-kmod v5.8

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34287
2022-02-17 09:31:25 +01:00
Emmanuel Vadot
e3f1af9b33 linuxkpi: Add dev_emerg
Needed by drm-kmod v5.8

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34286
2022-02-17 09:31:17 +01:00
Emmanuel Vadot
2cc3af6e1d linuxkpi: Add backlight_device_set_brightness
This simply set the brightness of a backlight device.
Needed by drm-kmod v5.8

Reviewed by:	bz, emaste
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34285
2022-02-17 09:31:12 +01:00
Emmanuel Vadot
4f689b302f linuxkpi: Add user_write_access_*
Needed by drm-kmod v5.8

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34284
2022-02-17 09:30:55 +01:00
Emmanuel Vadot
bf7deecfe7 linuxkpi: Add list_rotate_to_front
This just calls list_move_tail.

Reviewed by:	hselasky, bz
Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34251
2022-02-17 09:30:46 +01:00
Emmanuel Vadot
cb15ed7da2 linuxkpi: Add __var_waitqueue
This returns the wait queue based on the object but in LinuxKPI
we only have one waitqueue for this.

Reviewed by:	hselasky, bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34250
2022-02-17 09:30:27 +01:00
David E. O'Brien
74ca6a22f9 Document when zfree(9) was added to FreeBSD. 2022-02-16 20:03:48 -08:00
David E. O'Brien
aea2a658ef Don't delete hack.c - causes perpetual 'out of date' kernel
Deleting hack.c cause the kernel to always be out of date:

   $ make kernel
   make: /usr/src/sys/amd64/compile/GENERIC/.depend.hack.pico, 1:
	     ignoring stale .depend for hack.c
   :> hack.c
   cc -shared -O2 -pipe ... -nostdlib hack.c -o hack.pico
   rm -f hack.c
   MAKE="make" sh ../../../conf/newvers.sh "-R" GENERIC
   cc -c -O2 -pipe ...  -std=iso9899:1999 -Werror  vers.c
   ctfconvert -L VERSION -g vers.o
   linking kernel.full

Keeping hack.c in the compile directory causes no harm,
so there's no reason to delete it.

Also rename the file to "force-dyamic-hack.c" so it is
clear what the hack is aboug.

Reviewed by: sjg
Differential Revision: https://reviews.freebsd.org/D34281
2022-02-16 20:02:50 -08:00
Ed Maste
e49b6ead41 Add a number of five letter words to the dictionary
(And a four letter root of one of them.)

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D34299
2022-02-16 20:39:16 -05:00
Bjoern A. Zeeb
c0cadd99d1 LinuxKPI: 802.11 simplify beacon checks in rx path
In linuxkpi_ieee80211_rx() check if the frame is a beacon once upfront
and use the result for enhanced debugging and further checks.
This was done intially for rx_status->device_timestamp debugging.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-02-17 00:58:12 +00:00
Bjoern A. Zeeb
cc4e78d513 LinuxKPI: 802.11 advertise full offload scanning based on hw_scan only
We disabled hw_scan for drivers not advertising SINGLE_SCAN_ON_ALL_BANDS.
Do not depend on this hw flag to set IEEE80211_FEXT_SCAN_OFFLOAD for
net80211 as otherwise scanning will never work.
Long-term we probably want to re-think how we do/integrate hw_scan
better in net80211.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-02-17 00:15:56 +00:00
Bjoern A. Zeeb
3d09d310d9 LinuxKPI: 802.11: disable ic_headroom for the moment
There is a problem with some drivers, such as rtw88, asking for more
headroom than we currently can handle throughout the stack (we have
other legacy wireless driver in the tree with similar problems).
This may trigger an assertion in the TCP syncache where we are checking
for a reply to fit in MHLEN.
While for the moment we still copy data from mbufs to skbs,
we can simply disable the extra headroom request in ic_headroom and
deal with it ourselves (which we already did anyway).
Leave a link to the thread on freebsd-transport detailing more of the
problem so we can find it again and solve it here or there.

MFC after:	3 days
2022-02-16 23:57:27 +00:00
Simon J. Gerraty
c4bf04f40b cc-wrap.mk: fix typo in modifiers 2022-02-16 15:21:27 -08:00
Ed Maste
ef135466f8 Clean up warnings in pthread tests
I intend to move these into lib/libthr/tests/ and connect to kyua.  This
is a first step to address warnings emitted when building using standard
make infrastructure.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34306
2022-02-16 16:28:31 -05:00
Eric van Gyzen
1581ec9a45 Integrate contrib/file/tests with kyua/atf
This could be done better by making each test a separate ATF test case.
This exercise is left for the reader.

Reviewed by:	delphij (earlier version)
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34303
2022-02-16 13:02:45 -06:00
Ed Maste
089eb4ead8 readelf: add newer Linux core arm note types
Sponsored by:	The FreeBSD Foundation
2022-02-16 11:02:02 -05:00
Eric van Gyzen
4e71258227 newfs_msdos: connect the ATF test from NetBSD
NetBSD has an ATF test for newfs_msdos.  Connect it to the build.
Adapt it for FreeBSD.  This would have caught the bug fixed by my
previous commit.

Reviewed by:	delphij, emaste
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34116
2022-02-16 09:56:16 -06:00
Eric van Gyzen
9990450e17 newfs_msdos: fix type of kern.maxphys
The type of the kern.maxphys sysctl OID is now ulong.  Change the
local variable type to match.

Reviewed by:	delphij, emaste
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34116
2022-02-16 09:56:16 -06:00