Commit Graph

272670 Commits

Author SHA1 Message Date
Michael Tuexen
bdb99f6f5e sctp: remove KASSERT() which not always holds
Reported by:	syzbot+c907045aed2043011f3c@syzkaller.appspotmail.com
MFC after:	3 days
2022-02-20 15:59:21 +01:00
Michael Tuexen
e255f0c9fb sctp: make sure new locking requirements are satisfied.
Reported by:	syzbot+cd3c1dd64861b8c200bd@syzkaller.appspotmail.com
MFC after:	3 days
2022-02-20 15:36:26 +01:00
Stefan Eßer
32066c96fa fetch: make -S argument accept values > 2GB
Use strtoll() to parse the argument of the -S option.

FreeBSD has supported 64 bit file offsets for more than 25 years on
all architectures and off_t is a 64 bit integer type for that reason.

While strtol() returns a 64 bit value on 64 LP64 architectures, it
is limit to 32 bit on e.g. i386. The strtoll() function returns a 64
but result on all supported architectures and therefore supports the
possible file lengths and file offsets on 32 bit archtectures.

Reported by:	antoine
MFC after:	3 days
2022-02-20 15:24:43 +01:00
Michael Tuexen
2f0656fb9b sctp: don't hold the assoc create lock longer than needed
Reported by:	syzbot+c738e3df67cf425c49a2@syzkaller.appspotmail.com
MFC after:	3 days
2022-02-20 14:55:41 +01:00
Michal Meloun
7504f32c2e ofw_iicbus: Use uint32_t for iic bus address argument, not int.
The iicbus devinfo uses uint32_t for storing iic bus address and new method
should comply with this fact.

MFC with:	1bd3e8ba696633ccd7525030d951b58ade167814#
2022-02-20 14:17:50 +01:00
Michal Meloun
960ce3f7b2 Fix a534b50e24 on powerpc.
MFC with:	1bd3e8ba69
2022-02-20 14:06:29 +01:00
Michal Meloun
a534b50e24 tegra: Improve the detection of the secondary function (RTC) of the MAX77620.
Use the new ofw_iicbus_set_devinfo() method to implant an OFW compatibility
string for a manually created RTC sub-device.

MFC after:	4 weeks
Reported by:	archimedes.gaviola_at_gmail.com
		bscott_at_bunyatech.com.au
2022-02-20 12:26:04 +01:00
Michal Meloun
1bd3e8ba69 ofw_iicbus: Add method for manual setting of basic OFW parameters.
Some IIC multifunction devices may have multiple I2C addresses per chip, but
only the primary address is listed in the DT (e.g. MAX776200). In this case,
the sub-devices for the secondary addresses must be created manually with
fixed OFW parameters (node, name, compatibility string, IIC address).
Add a bus method to the ofw_iicbus interface that does this.

MFC after:	4 weeks
2022-02-20 12:25:58 +01:00
Kirk McKusick
c8cc568961 Provide an interface that allows GEOM modules to return multiple messages.
The gctl_error() function provides GEOM modules with the ability
to report only a single message. When running with the verbose
flag, commands that handle multiple devices may want to report a
message for each of the devices on which it operates. This commit
adds the gctl_msg() function that can be called multiple times
to post messages. When finished issuing messages, the application
must either call gctl_post_messages() or call gctl_error() to cause
the messages to be reported to the calling process.

Tested by:    Peter Holm
2022-02-19 21:33:02 -08:00
Michael Tuexen
a4a31271cc sctp: cleanup sctp_lower_sosend
This is a preparation for retiring the tcp send lock in the
next step.

MFC after:	3 days
2022-02-20 01:09:30 +01:00
Hans Petter Selasky
f190f8d1a2 snd_uaudio(4): Set hardware buffering to the minimum by default.
Improves the audio experience when using applications like
audio/jamulus and audio/hpsjam .

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-20 00:11:51 +01:00
Mateusz Guzik
430e0e409c vnet: add CURVNET_ASSERT_SET for !VIMAGE
Reported by:	ler
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-02-19 21:00:00 +00:00
Henri Hennebert
577130e56e rtsx: Add RTS5260 support and replace bootverbose with sysctl.
Tested by:	mav
MFC after:	4 days
Differential Revision:	https://reviews.freebsd.org/D34246
2022-02-19 11:46:40 -05:00
Mateusz Guzik
8a9269edd7 ipsec: sprinkle CURVNET_ASSERT_SET
Reviewed by:	ae
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D34314
2022-02-19 13:10:41 +00:00
Mateusz Guzik
91c35dd765 ipsec: extend vnet coverage in esp_input/output_cb
key_delsav used to conditionally dereference vnet, leading to panics as
it was getting unset too early.

While the particular condition was removed, it makes sense to handle all
operations of the sort with correct vnet set so change it.

Reviewed by:	ae
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D34313
2022-02-19 13:10:21 +00:00
Mateusz Guzik
75cde1f872 vnet: add CURVNET_ASSERT_SET
Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D34312
2022-02-19 13:10:01 +00:00
Martin Matuska
47a2e541dc libarchive: merge vendor bugfixes
Bugfixes:
OSS-Fuzz #44547: fix heap-use-after-free in RAR (v4) filter code
PR #1671: Fix 7z PPMD reading beyond boundary

X-MFC-with: 833a452e9d
2022-02-19 01:00:15 +01:00
Martin Matuska
3c540f9694 Update vendor/libarchive to libarchive/libarchive@72ce1ff7c
Bugfixes:
  OSS-Fuzz #44547 (security):
    fix heap-use-after-free in RAR (v4) filter code
  PR #1671:
    Fix 7z PPMD reading beyond boundary

Obtained from:		libarchive
Libarchive commit:	72ce1ff7c6857a7334baa05884e69b9264a2199c
2022-02-19 00:49:06 +01:00
John Baldwin
bd6e8729d6 ctl ramdisk: Free compare buffer after a compare I/O request.
For a compare request, the ramdisk backend allocates a temporary
buffer to hold the I/O data and then compares it against the LUN's
pages in ctl_backend_ramdisk_cmp after the data has been filled.
However, the tempory buffer was leaked when after the comparison was
complete.  Fix this by freeing the buffer after the comparison.

Reviewed by:	mav
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34316
2022-02-18 15:20:14 -08:00
Bjoern A. Zeeb
39d8c38707 LinuxKPI: return value for linux_pci_probe()
In linux_pci_probe() return BUS_PROBE_DEFAULT rather than 0
(which actually is BUS_PROBE_SPECIFIC and means 'Only this
driver can use this device').

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D33913
2022-02-18 21:52:33 +00:00
Navdeep Parhar
e9e7bc8250 cxgbe(4): Changes to the fatal error handler.
* New error_flags that can be used from the error ithread and elsewhere
  without a synch_op.
* Stop the adapter immediately in t4_fatal_err but defer most of the
  rest of the handling to a task.  The task is allowed to sleep, unlike
  the ithread.  Remove async_event_task as it is no longer needed.
* Dump the devlog, CIMLA, and PCIE_FW exactly once on any fatal error
  involving the firmware or the CIM block.  While here, dump some
  additional info (see dump_cim_regs) for these errors.
* If both reset_on_fatal_err and panic_on_fatal_err are set then attempt
  a reset first and do not panic the system if it is successful.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2022-02-18 09:16:14 -08:00
наб
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