Commit graph

290335 commits

Author SHA1 Message Date
Kristof Provost c6f1116357 pf: fix dummynet + route-to
Ensure that we pick the correct dummynet pipe (i.e. forward vs. reverse
direction) when applying route-to.

We mark the processing as outbound so that dummynet will re-inject in
the correct phase of processing after it's done with the packet, but
that will cause us to pick the wrong pipe number. Reverse them so that
the incorrect decision ends up picking the correct pipe.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D44366
2024-03-19 16:29:29 +01:00
Kristof Provost 0ea0c02655 pf: avoid passing through dummynet multiple times
In some setups we end up with multiple states created for a single
packet, which in turn can mean we run the packet through dummynet
multiple times. That's not expected or intended. Mark each packet when
it goes through dummynet, and do not pass packet through dummynet if
they're marked as having already passed through.

See also:	https://redmine.pfsense.org/issues/14854
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D44365
2024-03-19 16:29:29 +01:00
Baptiste Daroussin 02b25ccfc0 pkgbase: fix packaging of dtb 2024-03-19 15:07:28 +01:00
Baptiste Daroussin 2addba5caf pkgbase: fix typo preventing packaging kernels 2024-03-19 14:05:12 +01:00
Baptiste Daroussin 7622906160 pkgbase: fix kernel packing after switch ucl rework 2024-03-19 10:00:15 +01:00
Baptiste Daroussin f8e46fd61e pkgbase: rework certctl package to only run rehash on the main package
Rework how ucl manifest are generated leveraging ucl features and flua

now the ucl generation is done via a lua script which uses libucl to
ingest the template and use variables as defined in its command line.

the template will include only if it exist a ucl file named after the
package name which will complement the template or overwrite what was
defined in the template if defined in this specific ucl file

this allows to overwrite license, but add script only to the packages
who actually needs them.

As a results the post install scripts are now only added to the right
package and not also added to the subpackages like -man or -dev

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44374
2024-03-19 07:58:29 +01:00
Dag-Erling Smørgrav 6561c0eceb diff: Improve history section.
Reviewed by:	gbe
Differential Revision:	https://reviews.freebsd.org/D44409
2024-03-19 03:59:00 +01:00
John Baldwin 785600d0fb kldxref: Properly handle reading strings near the end of an ELF file
If a string is at or near the end of an input file and the amount of
remaining data in the file is smaller than the maximum string size,
the pread(2) system call would return a short read which is treated as
an error.  Instead, add a new helper function for reading a string
which permits short reads so long as the data read from the file
contains a terminated string.

Reported by:	jrtc27
Reviewed by:	jrtc27
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D44419
2024-03-18 17:01:23 -07:00
Simon J. Gerraty a8eb3b365e loader.4th dictthreshold too small
The dictthreshold in stand/forth/loader.4th is too small
resulting in full dictionary.

Reviewed by:	stevek, imp
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D44414
2024-03-18 16:16:29 -07:00
Simon J. Gerraty 01f3abbfcd uboot/Makefile move BINDIR
Set BINDIR before we include bsd.init.mk
so we can override it via local.init.mk

Reviewed by:	imp
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D44413
2024-03-18 16:14:15 -07:00
Rick Macklem 8f13abb4fd nfsd.8: Document ways to minimize Copy operation times
For NFSv4.2, a Copy operation can take a long time to complete.
If there is a concurrent ExchangeID or DelegReturn operation
which requires the exclusive lock on all NFSv4 state, this can
result in a stall of the nfsd server.

This patch documents ways to avoid this problem.

This is a content change.

Reviewed by:	karels, wollman, pauamma_gundo.com (manpages)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D44395
2024-03-18 15:40:41 -07:00
Oskar Holmlund d4135972ae add myself(oh) to the calendar
Reported by: McKusick
Approved by: Manu (mentor)
Differential Revision: https://reviews.freebsd.org/D44408
2024-03-18 22:33:03 +01:00
Vijeyalakshumi Koteeswaran 60bc9617e7 kerneldump: add livedump_start_vnode(9)
livedump_start_vnode(9) is introduced such that the live minidump on the
system could take a vnode. This interface could be used to extend support
for the existing framework in downstream.

Bump __FreeBSD_version for introducing livedump_start_vnode(9).

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	khng
Differential Revision:	https://reviews.freebsd.org/D43471
2024-03-18 17:12:18 -04:00
Gleb Smirnoff e34ea0196f tcp: clear all TCP timers in tcp_timer_stop() when in callout
When a TCP callout decides to disable self, e.g. tcp_timer_2msl() calling
tcp_close(), we must also clear all other possible timers.  Otherwise,
upon return, the callout would be scheduled again in tcp_timer_enter().

Revert 57e27ff07a, which was a temporary partial revert of otherwise
correct 62d47d73b7, that exposed the problem being fixed now.  Add an
extra assertion in tcp_timer_enter() to check we aren't arming callout for
a closed connection.

Reviewed by:	rscheff
2024-03-18 13:57:00 -07:00
R. Christian McDonald 576fbcbf2d Add myself (rcm) to the calendar.
Reminded by:	mckusick
2024-03-18 16:26:59 -04:00
Ed Maste f50322c1dc random(9): bump removal to FreeBSD 15.0
It has not yet been removed, and still has some in-tree consumers.

PR:		277655
Sponsored by:	The FreeBSD Foundation
2024-03-18 16:03:49 -04:00
Brooks Davis d9108adbc0 lib{c,sys}: really fix incremental builds
Reported by:	andrew
Fixes:		a650ec0e55 lib{c,sys}: fix incremental builds
2024-03-18 18:52:42 +00:00
Gordon Bergling e29be07861 tcp_rack.4: Update the SEE ALSO section
Correct the surname of one of authors of RFC 8985 and add RFC 5681 and
RFC 6937 (PRR: Proportional Rate Reduction for TCP).

Reviewed by:	tuexen
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44399
2024-03-18 19:25:11 +01:00
Richard Scheffenegger b5a9299bb8 ktls: catch invalid parameters earlier
Move safety checks forward from ktls_session_create() to
ktls_copyin_tls_enable(). Prevents zero mallocs, and excessively
large kernel mallocs.

Reported-by:	syzbot+72022fa9163fa958b66c@syzkaller.appspotmail.com
Reported-by:	syzbot+8992893e13058ce0670a@syzkaller.appspotmail.com
Sponsored by:	NetApp, Inc.
X-NetApp-PR:	#79
Reviewed By:	tuexen
Differential Revision:	https://reviews.freebsd.org/D44364
2024-03-18 03:37:49 +01:00
Hartmut Brandt c85d75a9fc Add myself (harti) to the calendar.
Reminded by:    mckusick
2024-03-18 17:58:03 +01:00
Andrew Turner 0a5f7918fc arm64: Return all registers to gdb when able
When the kdb thread is the current thread we read the registers from
the trap frame. As this contains all general purpose registers we can
use it to read these in the gdb stub. This allows us to include the
non-callee saved registers, e.g. function arguments.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D44360
2024-03-18 16:22:18 +00:00
Andrew Turner a931b85a09 uart: Add uart_cpu_acpi_setup to setup the uart
In preperation for adding debug port support add a generic function
to setup the uart from ACPI tables.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D44358
2024-03-18 16:20:52 +00:00
Andrew Turner 473c0b44ae uart: Split out initilisation of the acpi devinfo
Split out the common parts of building the uart devinfo from ACPI
tables from the SPCR parser. This will be used when we support the DBG2
table to find the debug uart to be used by the kernel gdb stub.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D44357
2024-03-18 16:20:52 +00:00
Andrew Turner 801160f4c0 arm64: Rename drop_to_el1 to enter_kernel_el
In the future we may not drop to EL1, e.g. when we support FEAT_VHE
where the kernel runs in EL2.

Reviewed by:	emaste, imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D43976
2024-03-18 16:20:51 +00:00
Gleb Smirnoff dd7b86e2a0 tcp: remove IS_FASTOPEN() macro
The macro is more obfuscating than helping as it just checks a single flag
of t_flags.  All other t_flags bits are checked without a macro.

A bigger problem was that declaration of the macro in tcp_var.h depended
on a kernel option.  It is a bad practice to create such definitions in
installable headers.

Reviewed by:		rscheff, tuexen, kib
Differential Revision:	https://reviews.freebsd.org/D44362
2024-03-18 08:56:17 -07:00
Gleb Smirnoff d62c4607e8 sockets: remove unused KPIs to manipulate sockets
These KPIs were added in dd0e6c383a and through 15 years had zero use.
They slightly remind what IfAPI does for struct ifnet.  But IfAPI does
that for the sake of large collection of NIC drivers not being aware of
struct ifnet.  For the sockets it is unclear what could be a large
collection of externally written kernel modules that need extensively use
sockets and not be aware of their internals at the same time. This
isolation of a structure knowledge requires a lot of work, and just
throwing in a few KPIs isn't helpful.

Reviewed by:		kib, olce, markj
Differential Revision:	https://reviews.freebsd.org/D44311
2024-03-18 08:50:30 -07:00
Gleb Smirnoff 027fda80fe inpcb: remove unused KPIs to manipulate inpcbs
These KPIs were added in 9d29c635da and through 15 years had zero use.
They slightly remind what IfAPI does for struct ifnet.  But IfAPI does
that for the sake of large collection of NIC drivers not being aware of
struct ifnet.  For the inpcb it is unclear what could be a large
collection of externally written kernel modules that need extensively use
inpcb and not be aware of its internals at the same time. This isolation
of a structure knowledge requires a lot of work, and just throwing in a
few KPIs isn't helpful.

Reviewed by:		kib, bz, markj
Differential Revision:	https://reviews.freebsd.org/D44310
2024-03-18 08:49:39 -07:00
Ed Maste e600fc7295 ssh: remove deprecated client VersionAddendum
Support for a client VersionAddendum was removed in bffe60ead0, but
the option was retained (as oDeprecated) as a transition aid.
Sufficient time has passed that it can be removed.

Sponsored by:	The FreeBSD Foundation
2024-03-18 10:20:18 -04:00
Gabriel M. Dutra f56e9a65cf calendars: Add myself to the FreeBSD calendar
Reported by:	mckusick
Approved by:	dbaio (mentor)
Differential Revision:	https://reviews.freebsd.org/D44396
2024-03-18 11:14:00 -03:00
Ed Maste a91a246563 ssh: Update to OpenSSH 9.7p1
This release contains mostly bugfixes.

It also makes support for the DSA signature algorithm a compile-time
option, with plans to disable it upstream later this year and remove
support entirely in 2025.

Full release notes at https://www.openssh.com/txt/release-9.7

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2024-03-18 10:00:57 -04:00
Dag-Erling Smørgrav ad99fea904 libbe: Fix some markup issues.
MFC after:	3 days
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44407
2024-03-18 14:49:27 +01:00
Dag-Erling Smørgrav a46217ce7d bectl: Simplify command aliases.
MFC after:	3 days
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44406
2024-03-18 14:49:23 +01:00
Dag-Erling Smørgrav e819534f15 bectl: Use geopt() and drop mention of -?.
MFC after:	3 days
PR:		272260
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44405
2024-03-18 14:49:18 +01:00
Mateusz Guzik b0aaf8beb1 Rename VM_LAST to more appropriate VM_GUEST_LAST
NFC

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-03-18 10:49:09 +00:00
Michael Osipov 85c3ef77cc freebsd-update: mark "cron" as fetched as "fetch" itself
The change in 33bd05c318 was incomplete
because it did not mark "cron" as ISFETCHED=1 although it performs the
same operations as "install", but less output and does not perform a
hard exit. Mark result as such and make "install" know that updates have
been fetched.

PR:		277699
Approved by:	jrm (mentor), emaste, cperciva
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D44356
2024-03-18 11:01:59 +01:00
Baptiste Daroussin 78b6117dac release: add basic cloudinit images
Provide both zfs and ufs images which a 1MB partition reserved for the
config drive wearing a GPT Label "config-drive" to allow consumer to
know where they should push the config drive on the provided image.

2 formats available: qcow2 and raw

This has been tested on OVHCloud baremetal via "bring your own image"
Also tested on openstack

Reviewed by:		emaste
Sponsored by:		OVHCloud
Differential Revision:		https://reviews.freebsd.org/D44369
2024-03-18 10:58:50 +01:00
Mark Murray e38f230827 lib/msun: Fix tgammal(3) on IEEE 128-bit platforms
Undo the 80-bit "stub" implementation of the 128-bit long double
tgammal(3) function. The latest (as of Feb 2024) version of the
src/contrib/arm-optimised-routines library includes a standalone,
full 128-bit replacement. This needs a small bit of wrapping to
fit it in, but is otherwise a drop-in replacement.

Testing this is hard, as most maths packages blow up as soon as
their 80-bit floating-point capability is exceeded. With 128-bit
tgammal(), this is easy to do, and this is the range that needs to
be checked the most carefully. Using my copy of Maple, I was able
to check that the output was within a few ULP of the correct answer,
right up to the point of 128-bit over- and underflow. Additionally,
the results are no worse, and indeed better than the 80-bit version.

Steve Kargl sent me his libm testing code, which I used to verify
that the excpetions for certain key values were correct. Tested in
this case were +-Inf, +-NaN, +-1 and +-0.

Differential Revision:	https://reviews.freebsd.org/D44168
Reviewed by:	theraven, andrew, imp
2024-03-18 09:48:43 +00:00
Michael Osipov c547f17816 Add myself (michaelo) to the calendar
Reminded by:	mckusick
2024-03-18 10:46:02 +01:00
Michael Osipov 59b02bb420 freebsd-update: Don't provide copiable commands in output
Previously, freebsd-update provided ready-to-go commands for copying and
pasting into the terminal. This causes problems as soon as options are
used and not supplied again by the user, e.g., '-b' or '-d'.
Stop making them copiable and force the user to construct a valid command
line by himself to avoid failures.

PR:		276102
Approved by:	jrm (mentor), emaste
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D43700
2024-03-18 10:33:42 +01:00
Jake Freeland 04473cfc4d Add myself (jfree) to calendar.freebsd
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44400
2024-03-17 18:10:42 -05:00
Neel Chauhan f526590a78 Add myself (nc) to the calendar
Reminded by:	mckusick
2024-03-17 15:34:59 -07:00
Ed Maste 9200ce3210 Vendor import of OpenSSH 9.7p1 2024-03-17 13:47:10 -04:00
Vladimir Druzenko 228fc43bcf Add myself (vvd) to the calendar
Reported by:	mckusick
Approved by:	mckusick
2024-03-17 18:53:07 +03:00
Zhenlei Huang 4319ccae87 Add myself (zlei) to the calendar
Reminded by:	mckusick
2024-03-17 23:07:53 +08:00
Ed Maste 1e4cd5ed54 release: remove binutils package data
GDB was the final GNU binutils component included in the base system,
but was removed in 2020.  Nothing provides a pkgbase binutils package
any longer.

Fixes: 1c0ea326aa ("Retire obsolete GDB 6.1.1")
Sponsored by:	The FreeBSD Foundation
2024-03-17 08:11:57 -04:00
Dmitry Salychev 65eb09f9d5
Add myself (dsl) to the calendar.freebsd 2024-03-17 11:09:52 +01:00
Cy Schubert b7c0c8c18e unbound: Vendor import 1.19.3
Release notes at
	https://www.nlnetlabs.nl/news/2024/Mar/14/unbound-1.19.3-released/

MFC after:	1 week

Merge commit '5a33598e88ad8fbc0affa74dee0a2d8cc4010fbc' into main
2024-03-17 01:57:42 -06:00
Jamie Gritton d50685b303 jail: add the -C flag to clean up after a partially removed jail
Differential Revision:	https://reviews.freebsd.org/D42670
2024-03-16 22:11:14 -07:00
Cy Schubert 5a33598e88 unbound: Vendor import 1.19.3
Release notes at
	https://www.nlnetlabs.nl/news/2024/Mar/14/unbound-1.19.3-released/
2024-03-16 18:00:52 -06:00
Jessica Clarke 75464941dc kldxref: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15
macOS, like Linux, does not include an outer const qualifier for its
fts_open callback arguments, so -Wincompatible-function-pointer-types
also picks this up and breaks the build now Clang 16 makes it an error
by default. Extend the existing Linux support to fix this.

MFC after:	1 week
2024-03-16 01:50:21 +00:00