]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 months agopkgbase: make sendmail config files as config
Baptiste Daroussin [Wed, 20 Mar 2024 15:44:35 +0000 (16:44 +0100)]
pkgbase: make sendmail config files as config

3 months agopkgbase: separate /etc/mail/aliases from the sendmail package
Baptiste Daroussin [Wed, 20 Mar 2024 15:39:39 +0000 (16:39 +0100)]
pkgbase: separate /etc/mail/aliases from the sendmail package

move /etc/aliases and /etc/mail/aliases into the runtime package
this file is used by both sendmail and dma.

While here mark this file as a config file so 3way merge is performed

3 months agopkgbase: add a mechanism to be able to force a give ucl include
Baptiste Daroussin [Wed, 20 Mar 2024 08:35:47 +0000 (09:35 +0100)]
pkgbase: add a mechanism to be able to force a give ucl include

This is made in order to be able to find add the post-install scripts
for the kernel, where PKGNAME varies for each KERNCONF but we don't want
to dynamically duplicated the kernel.ucl file.

At the same time we don't want the *-dbg* packages to actually include
those post-install scripts

3 months agobuild: Order kernel-toolchain and buildkernel targets
Mark Johnston [Thu, 25 Jan 2024 17:46:58 +0000 (12:46 -0500)]
build: Order kernel-toolchain and buildkernel targets

MFC after: 1 week

3 months agorc.initdiskless: Disable soft-updates in mdmfs (again)
Jose Luis Duran [Wed, 20 Mar 2024 04:54:18 +0000 (00:54 -0400)]
rc.initdiskless: Disable soft-updates in mdmfs (again)

Re-apply the -S switch to disable soft-updates in memory disks (commit
8b1292ac5219). This might be beneficial when tmpfs(5) is not present in
the kernel, as this can cause mdmfs(8)'s auto keyword to fallback to
using md(4).

PR: 85558
MFC after: 1 week
Reviewed by: imp, emaste, brooks
Differential Revision: https://reviews.freebsd.org/D43242

3 months agosys/syscallsubr.h: align definition of kern_fcntl_freebsd() on 32bit
Konstantin Belousov [Wed, 20 Mar 2024 03:49:01 +0000 (05:49 +0200)]
sys/syscallsubr.h: align definition of kern_fcntl_freebsd() on 32bit

Fixes: d0efabdf15d956e9bc0414356ed798ca3c846e08

3 months agodaemon(8): handle case of waitpid() returning without exited child
Konstantin Belousov [Mon, 18 Mar 2024 08:44:39 +0000 (10:44 +0200)]
daemon(8): handle case of waitpid() returning without exited child

Not checking for either WIFEXITED(status) or zero result results in
never finishing the loop.

PR: 277764
Reviewed by: kevans (previous version)
Discussed with: Daniel Tameling
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44401

3 months agosysent: regen
Brooks Davis [Tue, 19 Mar 2024 22:04:37 +0000 (22:04 +0000)]
sysent: regen

3 months agosyscalls.master: use __acl_type_t
Brooks Davis [Tue, 19 Mar 2024 21:53:50 +0000 (21:53 +0000)]
syscalls.master: use __acl_type_t

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44418

3 months agosys/acl.h: move main typedefs to sys/_types.h
Brooks Davis [Mon, 18 Mar 2024 21:45:42 +0000 (21:45 +0000)]
sys/acl.h: move main typedefs to sys/_types.h

Make __ prefixed versions available without the pollution of sys/acl.h
(and by extension sys/param.h).

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44382

3 months agosyscalls.master: make __sys_fcntl take an intptr_t
Brooks Davis [Tue, 19 Mar 2024 21:52:39 +0000 (21:52 +0000)]
syscalls.master: make __sys_fcntl take an intptr_t

The (optional) third argument of fcntl is sometimes a pointer so change
the type to intptr_t.  Update the libc-internal defintion (actually used
by libthr) to take a fixed intptr_t argument rather than pretending it's
a variadic function.  (That worked because all supported architectures
pass variadic arguments as though the function was declared with those
types.  In CheriBSD that changes because variadic arguments are passed
via a bounded array.)

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44381

3 months agosyscalls.master: struct siginfo -> struct __siginfo
Brooks Davis [Mon, 18 Mar 2024 21:40:07 +0000 (21:40 +0000)]
syscalls.master: struct siginfo -> struct __siginfo

struct siginfo doesn't exist, it's struct __siginfo (and siginfo_t).

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44380

3 months agofreebsd32: struct siginfo32 -> struct __siginfo32
Brooks Davis [Mon, 18 Mar 2024 21:37:39 +0000 (21:37 +0000)]
freebsd32: struct siginfo32 -> struct __siginfo32

In the next commit I will update syscalls.master to use struct __siginfo
(which actually exists) so this update will be needed to make
generated files (from make sysent) align.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44380

3 months agosyscalls.master: align with sigfastblock declaration
Brooks Davis [Tue, 19 Mar 2024 21:51:40 +0000 (21:51 +0000)]
syscalls.master: align with sigfastblock declaration

sigfastblock is declared to take a void * argument in the manpage in
headers so declare it that way and use SAL annotations to say it
interacts with a 32-bit word.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44379

3 months agosyscall.master: fix aio_suspend signature
Brooks Davis [Tue, 19 Mar 2024 21:50:18 +0000 (21:50 +0000)]
syscall.master: fix aio_suspend signature

It takes a `const struct iovec *iovp`.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44378

3 months agosyscalls.master: fix readv and writev iovp decl
Brooks Davis [Tue, 19 Mar 2024 21:50:09 +0000 (21:50 +0000)]
syscalls.master: fix readv and writev iovp decl

Both take const struct iovec * and only read the values.

Reviewed by: olce, kib
Differential Revision: https://reviews.freebsd.org/D44377

3 months agofreebsd32: freebsd32_copyinuio takes const iovp
Brooks Davis [Tue, 19 Mar 2024 21:47:55 +0000 (21:47 +0000)]
freebsd32: freebsd32_copyinuio takes const iovp

We only read the iovp so make it const like in copyinuio.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44376

3 months agoDefine stack_t in sys/_sigaltstack.h
Brooks Davis [Tue, 19 Mar 2024 00:24:37 +0000 (00:24 +0000)]
Define stack_t in sys/_sigaltstack.h

The sigaltstack(2) definition needs this type so make it available
without all of sys/signal.h.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44383

3 months agoarm64: Move curthread setup earlier
Isaac Cilia Attard [Wed, 13 Mar 2024 18:06:19 +0000 (19:06 +0100)]
arm64: Move curthread setup earlier

In 469cfa3c30ee cperciva added TSLOG profiling to link_elf_ireloc.  This
requires curthread to be read when the kernel linker is invoked, but it
hadn't yet been initialized.  On amd64 this was harmless since [gs:0] was
readable; but on arm64 this broke since [x18] was not readable.

Move the curthread (and associated PCPU) setup earlier on arm64 in order
to allow TSLOG to work there.

Fixes: 469cfa3c30ee ("tslog: Annotate some early boot functions")
Differential Revision: https://reviews.freebsd.org/D44317

3 months agoAdd myself (eduardo) to the calendar.
Nuno Teixeira [Tue, 19 Mar 2024 21:21:04 +0000 (21:21 +0000)]
Add myself (eduardo) to the calendar.

Reminded by: mckusick

3 months agocarp: check CARP status in in_localip_fib(), in6_localip_fib()
Gleb Smirnoff [Tue, 19 Mar 2024 18:48:59 +0000 (11:48 -0700)]
carp: check CARP status in in_localip_fib(), in6_localip_fib()

Don't report a BACKUP CARP address as local.  These two functions are used
only by source address validation for input packets, controlled by sysctls
net.inet.ip.source_address_validation and
net.inet6.ip6.source_address_validation.  For this purpose we definitely
want to treat BACKUP addresses as non local.

This change is conservative and doesn't modify compat in_localip() and
in6_localip().  They are used more widely than the FIB-aware versions.
The change would modify the notion of ipfw(4) 'me' keyword.  There might
be other consequences as in_localip() is used by various tunneling
protocols.

PR: 277349

3 months agopf: convert DIOCSETSTATUSIF to netlink
Kristof Provost [Mon, 18 Mar 2024 09:56:25 +0000 (10:56 +0100)]
pf: convert DIOCSETSTATUSIF to netlink

While here also add a basic test case for it.

Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D44368

3 months agopf: fix dummynet + route-to
Kristof Provost [Tue, 12 Mar 2024 12:29:08 +0000 (13:29 +0100)]
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

3 months agopf: avoid passing through dummynet multiple times
Kristof Provost [Mon, 11 Mar 2024 13:44:17 +0000 (14:44 +0100)]
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

3 months agopkgbase: fix packaging of dtb
Baptiste Daroussin [Tue, 19 Mar 2024 14:06:02 +0000 (15:06 +0100)]
pkgbase: fix packaging of dtb

3 months agopkgbase: fix typo preventing packaging kernels
Baptiste Daroussin [Tue, 19 Mar 2024 13:05:12 +0000 (14:05 +0100)]
pkgbase: fix typo preventing packaging kernels

3 months agopkgbase: fix kernel packing after switch ucl rework
Baptiste Daroussin [Tue, 19 Mar 2024 09:00:15 +0000 (10:00 +0100)]
pkgbase: fix kernel packing after switch ucl rework

3 months agopkgbase: rework certctl package to only run rehash on the main package
Baptiste Daroussin [Wed, 31 Jan 2024 12:42:16 +0000 (13:42 +0100)]
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

3 months agodiff: Improve history section.
Dag-Erling Smørgrav [Tue, 19 Mar 2024 02:59:00 +0000 (03:59 +0100)]
diff: Improve history section.

Reviewed by: gbe
Differential Revision: https://reviews.freebsd.org/D44409

3 months agokldxref: Properly handle reading strings near the end of an ELF file
John Baldwin [Tue, 19 Mar 2024 00:01:23 +0000 (17:01 -0700)]
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

3 months agoloader.4th dictthreshold too small
Simon J. Gerraty [Mon, 18 Mar 2024 23:16:29 +0000 (16:16 -0700)]
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

3 months agouboot/Makefile move BINDIR
Simon J. Gerraty [Mon, 18 Mar 2024 23:14:15 +0000 (16:14 -0700)]
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

3 months agonfsd.8: Document ways to minimize Copy operation times
Rick Macklem [Mon, 18 Mar 2024 22:40:41 +0000 (15:40 -0700)]
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

3 months agoadd myself(oh) to the calendar
Oskar Holmlund [Mon, 18 Mar 2024 21:33:03 +0000 (22:33 +0100)]
add myself(oh) to the calendar

Reported by: McKusick
Approved by: Manu (mentor)
Differential Revision: https://reviews.freebsd.org/D44408

3 months agokerneldump: add livedump_start_vnode(9)
Vijeyalakshumi Koteeswaran [Mon, 18 Mar 2024 19:26:29 +0000 (15:26 -0400)]
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

3 months agotcp: clear all TCP timers in tcp_timer_stop() when in callout
Gleb Smirnoff [Mon, 18 Mar 2024 20:57:00 +0000 (13:57 -0700)]
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 57e27ff07aff, which was a temporary partial revert of otherwise
correct 62d47d73b7eb, 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

3 months agoAdd myself (rcm) to the calendar.
R. Christian McDonald [Mon, 18 Mar 2024 20:25:43 +0000 (16:25 -0400)]
Add myself (rcm) to the calendar.

Reminded by: mckusick

3 months agorandom(9): bump removal to FreeBSD 15.0
Ed Maste [Mon, 18 Mar 2024 20:02:08 +0000 (16:02 -0400)]
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

3 months agolib{c,sys}: really fix incremental builds
Brooks Davis [Mon, 18 Mar 2024 17:06:41 +0000 (17:06 +0000)]
lib{c,sys}: really fix incremental builds

Reported by: andrew
Fixes: a650ec0e55a9 lib{c,sys}: fix incremental builds

3 months agotcp_rack.4: Update the SEE ALSO section
Gordon Bergling [Mon, 18 Mar 2024 18:25:11 +0000 (19:25 +0100)]
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

3 months agoktls: catch invalid parameters earlier
Richard Scheffenegger [Mon, 18 Mar 2024 01:55:59 +0000 (02:55 +0100)]
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

3 months agoAdd myself (harti) to the calendar.
Hartmut Brandt [Mon, 18 Mar 2024 16:58:03 +0000 (17:58 +0100)]
Add myself (harti) to the calendar.

Reminded by:    mckusick

3 months agoarm64: Return all registers to gdb when able
Andrew Turner [Thu, 14 Mar 2024 17:31:39 +0000 (17:31 +0000)]
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

3 months agouart: Add uart_cpu_acpi_setup to setup the uart
Andrew Turner [Thu, 14 Mar 2024 16:43:28 +0000 (16:43 +0000)]
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

3 months agouart: Split out initilisation of the acpi devinfo
Andrew Turner [Tue, 12 Mar 2024 18:06:18 +0000 (18:06 +0000)]
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

3 months agoarm64: Rename drop_to_el1 to enter_kernel_el
Andrew Turner [Thu, 15 Feb 2024 14:48:54 +0000 (14:48 +0000)]
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

3 months agotcp: remove IS_FASTOPEN() macro
Gleb Smirnoff [Mon, 18 Mar 2024 15:56:17 +0000 (08:56 -0700)]
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

3 months agosockets: remove unused KPIs to manipulate sockets
Gleb Smirnoff [Mon, 18 Mar 2024 15:50:30 +0000 (08:50 -0700)]
sockets: remove unused KPIs to manipulate sockets

These KPIs were added in dd0e6c383a9f0 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

3 months agoinpcb: remove unused KPIs to manipulate inpcbs
Gleb Smirnoff [Mon, 18 Mar 2024 15:49:39 +0000 (08:49 -0700)]
inpcb: remove unused KPIs to manipulate inpcbs

These KPIs were added in 9d29c635daa69 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

3 months agossh: remove deprecated client VersionAddendum
Ed Maste [Mon, 18 Mar 2024 14:15:27 +0000 (10:15 -0400)]
ssh: remove deprecated client VersionAddendum

Support for a client VersionAddendum was removed in bffe60ead024, 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

3 months agocalendars: Add myself to the FreeBSD calendar
Gabriel M. Dutra [Sun, 17 Mar 2024 06:36:07 +0000 (03:36 -0300)]
calendars: Add myself to the FreeBSD calendar

Reported by: mckusick
Approved by: dbaio (mentor)
Differential Revision: https://reviews.freebsd.org/D44396

3 months agossh: Update to OpenSSH 9.7p1
Ed Maste [Mon, 18 Mar 2024 14:00:57 +0000 (10:00 -0400)]
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

3 months agolibbe: Fix some markup issues.
Dag-Erling Smørgrav [Mon, 18 Mar 2024 13:49:27 +0000 (14:49 +0100)]
libbe: Fix some markup issues.

MFC after: 3 days
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D44407

3 months agobectl: Simplify command aliases.
Dag-Erling Smørgrav [Mon, 18 Mar 2024 13:49:23 +0000 (14:49 +0100)]
bectl: Simplify command aliases.

MFC after: 3 days
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D44406

3 months agobectl: Use geopt() and drop mention of -?.
Dag-Erling Smørgrav [Mon, 18 Mar 2024 13:49:18 +0000 (14:49 +0100)]
bectl: Use geopt() and drop mention of -?.

MFC after: 3 days
PR: 272260
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D44405

3 months agoRename VM_LAST to more appropriate VM_GUEST_LAST
Mateusz Guzik [Mon, 18 Mar 2024 10:48:10 +0000 (10:48 +0000)]
Rename VM_LAST to more appropriate VM_GUEST_LAST

NFC

Sponsored by: Rubicon Communications, LLC ("Netgate")

3 months agofreebsd-update: mark "cron" as fetched as "fetch" itself
Michael Osipov [Thu, 14 Mar 2024 16:39:47 +0000 (17:39 +0100)]
freebsd-update: mark "cron" as fetched as "fetch" itself

The change in 33bd05c3187d7b49c80cf1b0132b405c105d0833 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

3 months agorelease: add basic cloudinit images
Baptiste Daroussin [Fri, 15 Mar 2024 08:43:20 +0000 (09:43 +0100)]
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

3 months agolib/msun: Fix tgammal(3) on IEEE 128-bit platforms
Mark Murray [Fri, 1 Mar 2024 15:53:58 +0000 (15:53 +0000)]
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

3 months agoAdd myself (michaelo) to the calendar
Michael Osipov [Mon, 18 Mar 2024 09:46:02 +0000 (10:46 +0100)]
Add myself (michaelo) to the calendar

Reminded by: mckusick

3 months agofreebsd-update: Don't provide copiable commands in output
Michael Osipov [Tue, 30 Jan 2024 16:24:45 +0000 (17:24 +0100)]
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

3 months agoAdd myself (jfree) to calendar.freebsd
Jake Freeland [Sun, 17 Mar 2024 22:41:26 +0000 (17:41 -0500)]
Add myself (jfree) to calendar.freebsd

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44400

3 months agoAdd myself (nc) to the calendar
Neel Chauhan [Sun, 17 Mar 2024 22:34:59 +0000 (15:34 -0700)]
Add myself (nc) to the calendar

Reminded by: mckusick

3 months agoVendor import of OpenSSH 9.7p1
Ed Maste [Sun, 17 Mar 2024 17:47:10 +0000 (13:47 -0400)]
Vendor import of OpenSSH 9.7p1

3 months agoAdd myself (vvd) to the calendar
Vladimir Druzenko [Sun, 17 Mar 2024 15:53:07 +0000 (18:53 +0300)]
Add myself (vvd) to the calendar

Reported by: mckusick
Approved by: mckusick

3 months agoAdd myself (zlei) to the calendar
Zhenlei Huang [Sun, 17 Mar 2024 15:07:53 +0000 (23:07 +0800)]
Add myself (zlei) to the calendar

Reminded by: mckusick

3 months agorelease: remove binutils package data
Ed Maste [Sun, 17 Mar 2024 12:09:31 +0000 (08:09 -0400)]
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: 1c0ea326aa6d ("Retire obsolete GDB 6.1.1")
Sponsored by: The FreeBSD Foundation

3 months agoAdd myself (dsl) to the calendar.freebsd
Dmitry Salychev [Sun, 17 Mar 2024 10:09:52 +0000 (11:09 +0100)]
Add myself (dsl) to the calendar.freebsd

3 months agounbound: Vendor import 1.19.3
Cy Schubert [Sun, 17 Mar 2024 00:13:09 +0000 (18:13 -0600)]
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

3 months agojail: add the -C flag to clean up after a partially removed jail
Jamie Gritton [Sun, 17 Mar 2024 05:11:14 +0000 (22:11 -0700)]
jail: add the -C flag to clean up after a partially removed jail

Differential Revision: https://reviews.freebsd.org/D42670

3 months agounbound: Vendor import 1.19.3
Cy Schubert [Sat, 16 Mar 2024 23:58:33 +0000 (17:58 -0600)]
unbound: Vendor import 1.19.3

Release notes at
https://www.nlnetlabs.nl/news/2024/Mar/14/unbound-1.19.3-released/

4 months agokldxref: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15
Jessica Clarke [Sat, 16 Mar 2024 01:50:21 +0000 (01:50 +0000)]
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

4 months agojevents: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15
Jessica Clarke [Sat, 16 Mar 2024 01:50:20 +0000 (01:50 +0000)]
jevents: 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

4 months agomandoc: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15
Jessica Clarke [Sat, 16 Mar 2024 01:50:20 +0000 (01:50 +0000)]
mandoc: 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

4 months agonfsd: Add a sysctl to limit NFSv4.2 Copy RPC size
Rick Macklem [Sat, 16 Mar 2024 01:04:37 +0000 (18:04 -0700)]
nfsd: Add a sysctl to limit NFSv4.2 Copy RPC size

NFSv4.2 supports a Copy operation, which avoids file data being
read to the client and then written back to the server, if both
input and output files are on the same NFSv4.2 mount for
copy_file_range(2).

Unfortunately, this Copy operation can take a long time under
certain circumstances.  If this occurs concurrently with a RPC
that requires an exclusive lock on the nfsd such as ExchangeID
done for a new mount, the result can be an nfsd "stall" until
the Copy completes.

This patch adds a sysctl that can be set to limit the size of
a Copy operation or, if set to 0, disable Copy operations.

The use of this sysctl and other ways to avoid Copy operations
taking too long will be documented in the nfsd.4 man page by
a separate commit.

MFC after: 2 weeks

4 months agoAdd another commit to .git-blame-ignore-revs
Brooks Davis [Wed, 13 Mar 2024 19:02:14 +0000 (19:02 +0000)]
Add another commit to .git-blame-ignore-revs

4 months agobsd.opts.mk: drop transtion aid for NO_* options
Brooks Davis [Fri, 15 Mar 2024 23:00:46 +0000 (23:00 +0000)]
bsd.opts.mk: drop transtion aid for NO_* options

Setting NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE,
and NO_WARNS was deprecated in 2014 and made an error prior to the
13.0.0 release in commit d3a5bf95f2013af081607abd91b5175f6eafa563.
Likewise, NO_WERROR was made an error prior to 13.0.0 in commit
7fa2f2a62f04f095e1e27ad55aa22a8f59b1df8f.

Remove this transition aid making these variables no-ops as setting them
will result in an error on all supported releases.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44345

4 months agolib{c,sys}: correctly expose sched_getcpu
Brooks Davis [Fri, 15 Mar 2024 22:52:07 +0000 (22:52 +0000)]
lib{c,sys}: correctly expose sched_getcpu

When moving the implementation, I failed to move the symbol entry.

Reviewed by: kib
Fixes: 84dd0c080ba5 libc: libc/gen/sched_getcpu_gen.c -> libsys/
Differential Revision: https://reviews.freebsd.org/D44112

4 months agodiff(1) add FreeBSD HISTORY
David E. O'Brien [Fri, 15 Mar 2024 22:26:12 +0000 (15:26 -0700)]
diff(1) add FreeBSD HISTORY

4 months agoSYSCTL(9): correct typo
David E. O'Brien [Fri, 15 Mar 2024 21:48:17 +0000 (14:48 -0700)]
SYSCTL(9): correct typo

4 months agostrnlen(3): add HISTORY
David E. O'Brien [Tue, 30 Jan 2024 20:55:20 +0000 (12:55 -0800)]
strnlen(3): add HISTORY

Complete 4b7f35db's HISTORY's train of thought

4 months agoifconfig.8: add missing "be"
PauAmma [Fri, 15 Mar 2024 20:59:35 +0000 (13:59 -0700)]
ifconfig.8: add missing "be"

Reviewed by: allanjude, bjk
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44022

4 months agovnet: remove unneeded backslash
Gleb Smirnoff [Fri, 15 Mar 2024 19:17:04 +0000 (12:17 -0700)]
vnet: remove unneeded backslash

Fixes: 430e0e409ce94246bb252cbdddef866fc69dea95

4 months agoarm64: Use void pointers for arguments to arm64_get_writable_addr
John Baldwin [Fri, 15 Mar 2024 17:10:24 +0000 (10:10 -0700)]
arm64: Use void pointers for arguments to arm64_get_writable_addr

No functional change, but this reduces diffs with CheriBSD downstream.

Reviewed by: andrew
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D44344

4 months agoarm busdma: Fix parameter types to exclusion_bounce_check
John Baldwin [Fri, 15 Mar 2024 17:10:07 +0000 (10:10 -0700)]
arm busdma: Fix parameter types to exclusion_bounce_check

These are bus addresses not CPU virtual addresses.

Reviewed by: andrew
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D44343

4 months agoarm64: Switch the address argument to cpu_*cache* to a pointer
John Baldwin [Fri, 15 Mar 2024 17:09:49 +0000 (10:09 -0700)]
arm64: Switch the address argument to cpu_*cache* to a pointer

No functional change, but this reduces diffs with CheriBSD downstream.

Reviewed by: andrew
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D44342

4 months agoarm64 gicv3: Use void pointers instead of vm_offset_t
John Baldwin [Fri, 15 Mar 2024 17:09:29 +0000 (10:09 -0700)]
arm64 gicv3: Use void pointers instead of vm_offset_t

This removes the need for local diffs in CheriBSD where vm_offset_t
is an address and not the same as a uintptr_t.  No functional change.

Reviewed by: imp, andrew
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D44341

4 months agonvmecontrol: Update the test for a valid firmare revision slot
John Baldwin [Fri, 15 Mar 2024 15:18:47 +0000 (08:18 -0700)]
nvmecontrol: Update the test for a valid firmare revision slot

Reported by: Coverity Scan
CID: 1539214
Fixes: 7485926e09a0 nvme: Firmware revisions in the firmware slot info logpage are ASCII strings

4 months agoshare/mk: Don't install only differing in case files on case insensitive fs
Warner Losh [Fri, 15 Mar 2024 04:33:33 +0000 (22:33 -0600)]
share/mk: Don't install only differing in case files on case insensitive fs

MacOS has case insensitive filesystems by default. So trying to link
between foo.X and FOO.X causes an error of some sort since we unlink the
old foo file destroying the newly installed foo due to the insensitive
nature of the FS. Assume that this is true on darwin/macos, though it is
only try by default there.

Perhaps install should grow smarts to know when this is the case, though
that looked much trickier. There didn't seem to be a flag to check. This
would be better, imho, since we could still write the METALOG data
correctly (images created from these metalogs are imperfect due to this
relatively issue...).

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D44347

4 months agoscsi: Stop installing both cam.4 and CAM.4
Warner Losh [Fri, 15 Mar 2024 04:33:25 +0000 (22:33 -0600)]
scsi: Stop installing both cam.4 and CAM.4

There's no real benefit from installing both cam.4 and CAM.4. The latter
is not an kernel option. This hits a pathological case in mlinks: we're
trying to link to another file and the second link fails on
case-preserving, case-insensitive filesystems, like on MacOS by default.
Since we don't need both, avoid this pathological case.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D44346

4 months agonuageinit: be case insentive when looking got labels
Baptiste Daroussin [Fri, 15 Mar 2024 14:15:03 +0000 (15:15 +0100)]
nuageinit: be case insentive when looking got labels

Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>

4 months agopkgbase: remove packages which do not exists anymore
Baptiste Daroussin [Fri, 15 Mar 2024 13:50:40 +0000 (14:50 +0100)]
pkgbase: remove packages which do not exists anymore

4 months agonuageinit: add missing comment and descriptions for the package
Baptiste Daroussin [Fri, 15 Mar 2024 10:39:20 +0000 (11:39 +0100)]
nuageinit: add missing comment and descriptions for the package

4 months agomtree: add the directory for the nuageinit tests
Baptiste Daroussin [Fri, 15 Mar 2024 09:42:53 +0000 (10:42 +0100)]
mtree: add the directory for the nuageinit tests

4 months agosrc.conf(5): regen after addition of nuageinit
Baptiste Daroussin [Fri, 15 Mar 2024 08:21:17 +0000 (09:21 +0100)]
src.conf(5): regen after addition of nuageinit

4 months agonuageinit: add basic support for cloudinit.
Baptiste Daroussin [Wed, 23 Nov 2022 19:00:39 +0000 (20:00 +0100)]
nuageinit: add basic support for cloudinit.

this is a very early script to support cloudinit, it does not intend to
be a full featured cloudinit client, but will support a good enough
subset to be viable in most case.

It support nocloud and openstack config-2 config drive mode (iso9660 or
msdosfs)

The following features are currently supported:
- adding users (including a default user named 'freebsd' with password
  'freebsd'
- adding groups
- adding ssh keys
- static ipv4, static ipv6, dynamic ipv4

With this one is able to use the 'bring your own image feature" out of
box.

It is expected that the script grows the support of other clouds
supporting cloud-init, contributions are welcomed.

It is designed to be only run once via the firstboot mecanism.

Sponsored by: OVHCloud
MFC After: 3 weeks
Differential Revision: https://reviews.freebsd.org/D44141

4 months agoif_wg: use proper barriers around pkt->p_state
Kyle Evans [Fri, 15 Mar 2024 01:19:18 +0000 (20:19 -0500)]
if_wg: use proper barriers around pkt->p_state

Without appropriate load-synchronization to pair with store barriers in
wg_encrypt() and wg_decrypt(), the compiler and hardware are often
allowed to reorder these loads in wg_deliver_out() and wg_deliver_in()
such that we end up with a garbage or intermediate mbuf that we try to
pass on.  The issue is particularly prevalent with the weaker
memory models of !x86 platforms.

Switch from the big-hammer wmb() to more explicit acq/rel atomics to
both make it obvious what we're syncing up with, and to avoid somewhat
hefty fences on platforms that don't necessarily need this.

With this patch, my dual-iperf3 reproducer is dramatically more stable
than it is without on aarch64.

PR: 264115
MFC after: 1 week
Reviewed by: andrew, zlei
Differential Revision: https://reviews.freebsd.org/D44283

4 months agovfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE
Rick Macklem [Fri, 15 Mar 2024 00:35:32 +0000 (17:35 -0700)]
vfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE

vn_generic_copy_file_range() tries to maintain holes
in file ranges being copied, using SEEK_DATA/SEEK_HOLE
where possible,

Unfortunately SEEK_DATA/SEEK_HOLE operations can take
a long time under certain circumstances.
Although it is not currently possible to know if a file has
unallocated data regions, the case where va_bytes >= va_size
is a strong hint that there are no unallocated data regions.
This hint does not work well for file systems doing compression,
but since it is only a hint, it is still useful.

For the case of va_bytes >= va_size, avoid doing SEEK_DATA/SEEK_HOLE.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D44509

4 months agoOpenBSM: Remove $FreeSBD$ tags from the configuration files
Gordon Bergling [Thu, 14 Mar 2024 06:02:44 +0000 (07:02 +0100)]
OpenBSM: Remove $FreeSBD$ tags from the configuration files

In e61dc6cac4001f1abfc48ee27e4e623c2c044fa8 the configuration
files were taken off the vendor branch to help mergemaster
comparing them.

Since mergemaster will be deprecated and $FreeBSD$ tags aren't
used anymore, remove them.

While here, sync audit_filter with upstream commit 5e6da76 (typo).

Reviewed by: imp
Approved by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44318

4 months agoUpdate dirdeps.mk et al
Simon J. Gerraty [Thu, 14 Mar 2024 05:51:08 +0000 (22:51 -0700)]
Update dirdeps.mk et al

bmake-20240309 includes updates to dirdeps and meta mode makefiles