]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 months ago.github: Build stable/14
Andrew Turner [Fri, 27 Oct 2023 16:26:15 +0000 (17:26 +0100)]
.github: Build stable/14

Sponsored by: Arm Ltd

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/878

4 months agoinclude/math.h: fix warning with -Wconversion
Martin Oliveira [Tue, 12 Sep 2023 20:31:00 +0000 (14:31 -0600)]
include/math.h: fix warning with -Wconversion

The way the __fp_type_select macro uses the _Generic expression causes
gcc to throw a warning on valid code if the -Wconversion flag is used.

For example, consider the following program:

    #include <math.h>
    int main()
    {
     double x = 1.0;
     isnan(x);
     return 0;
    }

which throws a warning:

    $ gcc -Wconversion a.c
    a.c:5:15: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion]
        5 |         isnan(x);
          |               ^

This happens because the functions are invoked inside of the _Generic.
Looking at the example of _Generic in the C11 specification, one sees
that the parameters are outside of the _Generic expression (see page 79
here: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf).

Reference: https://stackoverflow.com/a/68309379
Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/841

4 months agorelease: Add the Ed25519 vagrant insecure key
Jose Luis Duran [Sat, 4 Nov 2023 00:17:19 +0000 (00:17 +0000)]
release: Add the Ed25519 vagrant insecure key

Both insecure keys, RSA and Ed25519, are required.

Obtained from: https://github.com/hashicorp/vagrant/commit/b40f6e5fdae1113518e9c92f96dfcd364b646ff9
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/835

4 months agorelease: Allow sudo -g anyone and sudo -u anyone -g anytwo
Jose Luis Duran [Mon, 4 Sep 2023 16:45:52 +0000 (16:45 +0000)]
release: Allow sudo -g anyone and sudo -u anyone -g anytwo

When only the user (ALL) is specified explicitly, and the group is
implied, only sudo -u works.  Specifying both the user and group, like
(ALL:ALL), is required to:

1. Use sudo -g by itself (with no -u user)
2. Use sudo -u and -g together, with a -g group that is different from
   the -u user's primary group

Obtained from: https://github.com/sudo-project/sudo/commit/1d13533ea3cda05ec666c45c6c533b614fdd97aa
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/835

4 months agourndis(4): retrospective, address for hselasky
Graham Perrin [Sat, 2 Sep 2023 18:25:52 +0000 (19:25 +0100)]
urndis(4): retrospective, address for hselasky

PR: 273530
Fixes: 08c9016bc61b Add a manpage for the urndis driver.
Signed-off-by: Graham Perrin <grahamperrin@gmail.com>
Reviewed-by: imp, zlei
Pull-request: https://github.com/freebsd/freebsd-src/pull/834

4 months agotraceroute: Remove $FreeBSD$ rcsid tags
Jose Luis Duran [Fri, 17 Nov 2023 18:36:30 +0000 (18:36 +0000)]
traceroute: Remove $FreeBSD$ rcsid tags

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901

4 months agotraceroute: Lint manuals
Jose Luis Duran [Fri, 17 Nov 2023 16:41:24 +0000 (16:41 +0000)]
traceroute: Lint manuals

Fix a number of warning mandoc -Tlint and igor turned up.  No changes
intended.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901

4 months agotraceroute: Standardize usage
Jose Luis Duran [Sun, 5 Nov 2023 18:35:23 +0000 (18:35 +0000)]
traceroute: Standardize usage

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901

4 months agotraceroute: Update values in examples
Jose Luis Duran [Sun, 5 Nov 2023 17:57:25 +0000 (17:57 +0000)]
traceroute: Update values in examples

Standardize the documentation and update it to reflect the current
values.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901

4 months agotraceroute: Silence compiler warning
Jose Luis Duran [Fri, 17 Nov 2023 16:15:27 +0000 (16:15 +0000)]
traceroute: Silence compiler warning

Silence the warning:

argument to 'sizeof' in 'strncpy' call is the same expression as the
source; did you mean to use the size of the destination?"

by using strlcpy() and the size of the destination (device).

No functional change intended.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901

4 months agobsdinstall: Drop Error from title in netconfig no interfaces dialog
Jessica Clarke [Sat, 3 Feb 2024 01:52:53 +0000 (01:52 +0000)]
bsdinstall: Drop Error from title in netconfig no interfaces dialog

This isn't inherently an error. It is if you're attempting to download
dist tarballs or later install packages, but a FreeBSD system with no
NIC is a reasonable setup to have, especially in a throwaway VM setting,
so we shouldn't say it is one.

Leaving the exit code as 1 is still fine, since auto will ignore it, and
avoids breaking other uses.

MFC after: 1 week

4 months agobsdinstall: Fix netconfig script when no interfaces are present
Jessica Clarke [Sat, 3 Feb 2024 01:52:37 +0000 (01:52 +0000)]
bsdinstall: Fix netconfig script when no interfaces are present

The script uses [ -z "$INTERFACES" ] to check if the list of interfaces
is empty and will exit early if so, but INTERFACES always contains at
least a space due to the way it appends the list of wireless devices.
Fix this by only adding the space when there are devices to append,
mirroring the behaviour for non-wireless devices above (both will result
in a redundant leading space when the list is non-empty, but that one is
harmless).

Fixes: 159ca5c844cd ("Adapt to new wireless scheme where base wlan interfaces do not show up in ifconfig anymore.")
MFC after: 1 week

4 months agolib/libfetch/common.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:13 +0000 (17:38 -0700)]
lib/libfetch/common.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agolib/libbe/be.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:13 +0000 (17:38 -0700)]
lib/libbe/be.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agolib/libvgl/main.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:13 +0000 (17:38 -0700)]
lib/libvgl/main.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/arm64/rockchip/rk_gpio.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:13 +0000 (17:38 -0700)]
sys/arm64/rockchip/rk_gpio.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/netlink/route/iface.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:13 +0000 (17:38 -0700)]
sys/netlink/route/iface.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/fs/unionfs/union_vnops.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:13 +0000 (17:38 -0700)]
sys/fs/unionfs/union_vnops.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/compat/linux/linux_misc.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:13 +0000 (17:38 -0700)]
sys/compat/linux/linux_misc.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/netpfil/pf/pf.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:13 +0000 (17:38 -0700)]
sys/netpfil/pf/pf.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/netpfil/pf/pf.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:12 +0000 (17:38 -0700)]
sys/netpfil/pf/pf.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/dev/enic/if_enic.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:12 +0000 (17:38 -0700)]
sys/dev/enic/if_enic.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/dev/mii/mcommphy.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:12 +0000 (17:38 -0700)]
sys/dev/mii/mcommphy.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agosys/dev/iicbus/pmic/rockchip/rk8xx.c: remove an extra semicolon
rilysh [Sat, 3 Feb 2024 00:38:12 +0000 (17:38 -0700)]
sys/dev/iicbus/pmic/rockchip/rk8xx.c: remove an extra semicolon

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959

4 months agoqlnx: Fix typo (triple M)
Jose Luis Duran [Sat, 3 Feb 2024 00:35:54 +0000 (17:35 -0700)]
qlnx: Fix typo (triple M)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/963

4 months agoath: Fix typo (triple M)
Jose Luis Duran [Sat, 3 Feb 2024 00:35:54 +0000 (17:35 -0700)]
ath: Fix typo (triple M)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/963

4 months agolibc: Fix typo (triple M)
Jose Luis Duran [Sat, 3 Feb 2024 00:35:54 +0000 (17:35 -0700)]
libc: Fix typo (triple M)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/963

4 months agoamd64 & i386: enable VIMAGE in MINIMAL
Mina Galić [Sat, 3 Feb 2024 00:35:18 +0000 (17:35 -0700)]
amd64 & i386: enable VIMAGE in MINIMAL

VNET(9) is very useful, and is not loadable.
Enable it in MINIMAL.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/962

4 months agoumount: Add -d option to detach md devices
Ricardo Branco [Sat, 3 Feb 2024 00:29:48 +0000 (17:29 -0700)]
umount: Add -d option to detach md devices

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/972

4 months agosctp: update manpages
Lexi Winter [Sat, 3 Feb 2024 00:20:57 +0000 (17:20 -0700)]
sctp: update manpages

Add missing documentation for sctp_sendv(3) and sctp_recvv(3).

Add a note that sctp_send(3), sctp_sendx(3) and sctp_recvmsg(3) are
deprecated by RFC 6458.

Add a STANDARDS section to all functions specified in RFC 6458 to
indicate their standards conformance.

MFC after: 2 weeks
Reviewed by: imp, bcr, kp, tuexen
Pull Request: https://github.com/freebsd/freebsd-src/pull/965

4 months agoprocfs: Add self & exe symlinks like NetBSD does
Ricardo Branco [Sat, 3 Feb 2024 00:17:52 +0000 (17:17 -0700)]
procfs: Add self & exe symlinks like NetBSD does

NetBSD calls "curproc" "self" and "exe" "file" for proc. Reduce
gratuitous differnces by including them as well.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/976

4 months agoquot: Use getopt(3) and show usage() if no arguments
Ricardo Branco [Sat, 3 Feb 2024 00:12:22 +0000 (17:12 -0700)]
quot: Use getopt(3) and show usage() if no arguments

Also update the man page and usage to be a little more accurate with the
-a flag.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/983

4 months agowc: Do not use st_size if it equals zero
Ricardo Branco [Sat, 3 Feb 2024 00:05:05 +0000 (17:05 -0700)]
wc: Do not use st_size if it equals zero

Pseudo-filesystems often cannot compute the size of the file correctly
and report 0 for the size. Ignore the size when it's zero and fallback
to the size unknown code.

PR: 276093
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/985

4 months agopkg-stage.sh: add x11/sddm
Graham Perrin [Fri, 2 Feb 2024 23:35:42 +0000 (16:35 -0700)]
pkg-stage.sh: add x11/sddm

MFC After: 2 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/996

4 months agoman: fix redirect for locales and file arguments
Mohamed Akram [Fri, 2 Feb 2024 23:26:20 +0000 (16:26 -0700)]
man: fix redirect for locales and file arguments

Use the locale-specific path for localized pages and the appropriate parent
directory for file arguments when handling redirects.

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1019

4 months agoRevert "bsdinstall: separate out dist selection in prep for pkgbase support"
Jessica Clarke [Sat, 3 Feb 2024 01:31:11 +0000 (01:31 +0000)]
Revert "bsdinstall: separate out dist selection in prep for pkgbase support"

Firstly, my review comments were not addressed and instead totally
ignored. Secondly, and a more valid justification for the revert, this
completely breaks the installer, since selectdists isn't installed.
Given the blatant lack of testing, back out this commit until it has
actually been tested and review comments taken on board so that the
installer actually works.

This reverts commit 009d3f66cb5f0cf3f1d353f311d3a6878b2a534e.

4 months agoOpenSSL: Update version strings
Cy Schubert [Sat, 3 Feb 2024 00:34:36 +0000 (16:34 -0800)]
OpenSSL: Update version strings

Reported by: "Herbert J. Skuhra" <herbert@gojira.at>
Fixes: 9eb4e0b42d7c
MFC after: 3 days

4 months agox86 mem: Pass standard bool value to pmap_demote_DMAP
John Baldwin [Fri, 2 Feb 2024 23:32:07 +0000 (15:32 -0800)]
x86 mem: Pass standard bool value to pmap_demote_DMAP

4 months agoddb: Use bool for boolean variables in MD code
John Baldwin [Fri, 2 Feb 2024 23:08:53 +0000 (15:08 -0800)]
ddb: Use bool for boolean variables in MD code

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43695

4 months agoarm: pmap_extract() returns a PA not a boolean value
John Baldwin [Fri, 2 Feb 2024 22:59:03 +0000 (14:59 -0800)]
arm: pmap_extract() returns a PA not a boolean value

Assume a PA of 0 indicates an invalid virtual address.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43694

4 months agoamd64: Use bool for booleans in getmemsize
John Baldwin [Fri, 2 Feb 2024 22:58:46 +0000 (14:58 -0800)]
amd64: Use bool for booleans in getmemsize

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43693

4 months agox86: Consistently pass true/false to is_pde parameter of pmap_cache_bits
John Baldwin [Fri, 2 Feb 2024 22:58:30 +0000 (14:58 -0800)]
x86: Consistently pass true/false to is_pde parameter of pmap_cache_bits

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43692

4 months agotraceroute6: remove -l flag
Lexi Winter [Fri, 2 Feb 2024 21:46:14 +0000 (14:46 -0700)]
traceroute6: remove -l flag

The -l flag was used to tell traceroute6(8) to show both hostname and
address for each hop.  However, traceroute(8) already does this by
default, and there's no reason for traceroute6 to behave differently.

Make this the default behaviour, and accept -l for backward
compatibility as a no-op flag.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1023

4 months agoOpenSSL: Vendor import of OpenSSL 3.0.13
Cy Schubert [Fri, 2 Feb 2024 21:10:22 +0000 (13:10 -0800)]
OpenSSL: Vendor import of OpenSSL 3.0.13

 * Fixed PKCS12 Decoding crashes ([CVE-2024-0727])
 * Fixed Excessive time spent checking invalid RSA public keys
   ([CVE-2023-6237])
 * Fixed POLY1305 MAC implementation corrupting vector registers on
   PowerPC CPUs which support PowerISA 2.07 ([CVE-2023-6129])
 * Fix excessive time spent in DH check / generation with large Q
   parameter value ([CVE-2023-5678])

Release notes can be found at
            https://www.openssl.org/news/openssl-3.0-notes.html.

Approved by: emaste
MFC after: 3 days

Merge commit '9dd13e84fa8eca8f3462bd55485aa3da8c37f54a'

4 months agobsd.subdir.mk: Drop broken optimisation for realinstall parallelisation
Jessica Clarke [Fri, 2 Feb 2024 21:17:23 +0000 (21:17 +0000)]
bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation

Not all of the tree is happy for realinstall to be done in parallel. In
particular, Makefile.inc1 uses .WAIT to force etc to be installed after
earlier subdirectories, since etc calls into share/man's makedb to run
makewhatis on the tree and needs all manpages to have been installed.
Also, libexec/Makefile doesn't set SUBDIR_PARALLEL, and the link from
ld-elf32.1 to ld-elf.1 relies on rtld-elf having been installed before
rtld-elf32, otherwise creating the link will fail.

In general, core behavioural differences like this between NO_ROOT and
"normal" builds are also dangerous and confusing.

If this optimisation is deemed important, it should be reintroduced in a
more limited and robust manner that doesn't break the above situations.
Until then value correctness over slight efficiency gains on high core
count machines, the same machines where you're more likely to encounter
issues from this optimisation.

This reverts commits cd19ecdbdc87 ("Similar to r296013 for NO_ROOT,
force SUBDIR_PARALLEL for buildworld WORLDTMP staging.") and
b9c6f3168112 ("Add more STANDALONE_SUBDIR_TARGETS.").

Found by: CheriBSD Jenkins
Reviewed by: bdrewery, brooks
Fixes: cd19ecdbdc87 ("Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging.")
Fixes: b9c6f3168112 ("Add more STANDALONE_SUBDIR_TARGETS.")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43705

4 months agoloader: Move build_font_module to gfx_fb.c
Warner Losh [Fri, 2 Feb 2024 01:38:18 +0000 (18:38 -0700)]
loader: Move build_font_module to gfx_fb.c

The font module is part and parsel of the gfx_fb support. Move it to
gfx_fb.c where it can access the data it needs.

Sponsored by: Netflix

4 months agoloader: Font module is EFI dependent
Warner Losh [Fri, 2 Feb 2024 01:37:12 +0000 (18:37 -0700)]
loader: Font module is EFI dependent

The font module is part of the gfx_fb support. Since we share this file
between EFI and kboot, we only want to pass the font data to the kernel
when we're booting from EFI, not kboot.

Sponsored by: Netflix

4 months agolibsa: Move hash functions up a level
Warner Losh [Wed, 31 Jan 2024 23:54:19 +0000 (16:54 -0700)]
libsa: Move hash functions up a level

This should have no functional change. Move compiling the sha256, sha512
and md5 hash functions up into libsa to allow them to be used elsewhere
in the boot loader when geli isn't configured. Since libsa is a .a, these
won't wind up in any boot loader that doesn't reference them, so should
be a nop.

Sponsored by: Netflix

4 months agolibsa: Move include file creation to the end of the Makefile
Warner Losh [Wed, 31 Jan 2024 23:42:49 +0000 (16:42 -0700)]
libsa: Move include file creation to the end of the Makefile

The include file symblic links, etc are out of place where they
are. Move them to the end of the file. No functional change intended.

Sponsored by: Netflix

4 months agofreebsd-update(8): Update date
Graham Perrin [Sun, 20 Aug 2023 10:05:19 +0000 (11:05 +0100)]
freebsd-update(8): Update date

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/826

4 months agofreebsd-update(8): wrap to 80 columns
Graham Perrin [Sun, 20 Aug 2023 10:01:05 +0000 (11:01 +0100)]
freebsd-update(8): wrap to 80 columns

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/826

4 months agofreebsd-update(8): Explain conflicts in /etc
Graham Perrin [Sat, 19 Aug 2023 14:52:18 +0000 (15:52 +0100)]
freebsd-update(8): Explain conflicts in /etc

Unlike etcupdate(8), freebsd-update only prints the files with
conflicts. It doesn't merge.

PR: 204549
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/826

4 months agols: versort incompatible w/ timesort and sizesort
Alexander Ziaee [Fri, 2 Feb 2024 20:19:07 +0000 (13:19 -0700)]
ls: versort incompatible w/ timesort and sizesort

ls.1: versort incompatible w/ timesort and sizesort

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/825

4 months agox86 & arm: remove CAM_DEBUG_FLAGS= from MMCCAM kernels
Mina Galić [Fri, 2 Feb 2024 19:46:01 +0000 (12:46 -0700)]
x86 & arm: remove CAM_DEBUG_FLAGS= from MMCCAM kernels

we leave `options CAMDEBUG` enabled, so that when needed, CAM debugging
can be enabled *as needed*, rather than setting a default of everything.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/798

4 months agoamd64: switch GENERIC-MMCCAM to GENERIC
Mina Galić [Fri, 2 Feb 2024 19:46:01 +0000 (12:46 -0700)]
amd64: switch GENERIC-MMCCAM to GENERIC

arm's and arm64's GENERIC-MMCCAM is based on GENERIC. amd64's is based
on MINIMAL. For consistency, switch it to GENERIC.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/798

4 months agoarm: fix typo in GENERIC-MMCCAM
Mina Galić [Fri, 2 Feb 2024 19:46:01 +0000 (12:46 -0700)]
arm: fix typo in GENERIC-MMCCAM

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/798

4 months agoaxgbe: Various link stability and module compatibilty improvements
Stephan de Wit [Fri, 2 Feb 2024 19:17:14 +0000 (12:17 -0700)]
axgbe: Various link stability and module compatibilty improvements

Move the phy_stop() routine to if_detach() to prevent link interruptions
when configuring the interface. Accompanying this is a sanity check
using phy_started, which was already there but remained unused. We do
not move phy_start(), as the logic there is needed for any init routine,
be it attach or start.

Also bring in the linux PMA_PLL change which addresses the flapping of
back-to-back fiber connections.

Use miibus for SFP PHYs up to 1G copper. We retry in cases where the PHY
is not directly reachable.  Set the correct IFM_100_SGMII flag when the
phy speed has been set to 100. We remove xgbe_phy_start_aneg() since
it's handled by miibus.

Add support for 100 and 1000 BASE-BX fiber modules

Add support for 25G multirate DACs which are capable of 10G.

While here, also fixup the LINK_ERR state. It was impossible to recover
from this previously.

[[ Note: light style fixes by imp, slight commit message adjustment,
   and a warning that I don't have the hardware to validate, but
   the changes do track the commit message and seem otherwise OK ]]

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/768

4 months agostdlib.h: Partially revert c27a89971805
Warner Losh [Fri, 2 Feb 2024 19:06:25 +0000 (12:06 -0700)]
stdlib.h: Partially revert c27a89971805

quick_exit() can call other functions, and we don't guarantee it calls
std::terminate should those other functions throw exceptions. And to
make it do so has ABI complications for libc. Until that's sorted out,
revert this noexcept (but leave a comment behind so people will find
this commit message)

Requested by: kib

Sponsored by: Netflix

4 months agostand/lua: always allow overriding with local config files
Stéphane Rochoy [Thu, 21 Dec 2023 14:05:58 +0000 (15:05 +0100)]
stand/lua: always allow overriding with local config files

Loader now also read configuration files listed in local_loader_conf_files.
Files listed here are the last ones read. And /boot/loader.conf.local was
moved from loader_conf_files to local_loader_conf_files leaving only
loader.conf and device.hints in loader_conf_files by default.

The idea is to ensure local_loader_conf_files, i.e., /boot/loader.conf.local,
can always be used to override other user defined settings.

So the sequencing is now as follow:

 1. Bootstrap:
     /boot/defaults/loader.conf

 2. Read loader_conf_files files:
     /boot/device.hints
     /boot/loader.conf

 3. Read loader_conf_dirs files:
     /boot/loader.conf.d/*.conf

 4. And finally, rread local_loader_conf_files files:
     /boot/loader.conf.local

Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/759

4 months agostand/lua: per-product conf if requested via product_vars
Stéphane Rochoy [Thu, 4 May 2023 07:23:47 +0000 (09:23 +0200)]
stand/lua: per-product conf if requested via product_vars

If product_vars is set, it must be a space separated list of environment
variable names to walk through to guess the product. Each time a product can be
guessed (i.e., the corresponding variable is defined), prepend
/boot/loader.conf.d/PRODUCT/ to loader_conf_dirs.

It can be typically used as follow:

    smbios.system.planar.maker="PLANAR_MAKER"
    smbios.system.planar.product="PLANAR_PRODUCT"
    smbios.system.product="PRODUCT"
    uboot.m_product="M_PRODUCT"
    product_vars="smbios.system.planar.maker smbios.system.planar.product smbios.system.product uboot.m_product"

to read files found in the following directories, in that order:

    /boot/loader.conf.d/PLANAR_MAKER
    /boot/loader.conf.d/PLANAR_PRODUCT
    /boot/loader.conf.d/PRODUCT
    /boot/loader.conf.d/M_PRODUCT

Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/759

4 months agoRevert "stand/lua: per-product conf if requested via product_vars"
Warner Losh [Fri, 2 Feb 2024 19:02:23 +0000 (12:02 -0700)]
Revert "stand/lua: per-product conf if requested via product_vars"

This reverts commit 754cac4b283eb024a3a6a194130199c860e32ebf. No mail
went out and commit message was wrong.

Sponsored by: Netflix

4 months agoRevert "stand/lua: always allow overriding with local config files"
Warner Losh [Fri, 2 Feb 2024 19:01:56 +0000 (12:01 -0700)]
Revert "stand/lua: always allow overriding with local config files"

This reverts commit d3d0b735571d9562812ce5b343a6e91f7a795dbe. no mail
sent out, and the commit message was wrong.

Sponsored by: Netflix

4 months agosocket: Don't assume m0 != NULL in sbappendcontrol_locked()
Mark Johnston [Fri, 2 Feb 2024 18:58:37 +0000 (13:58 -0500)]
socket: Don't assume m0 != NULL in sbappendcontrol_locked()

Some callers (e.g., ktls_decrypt()) violate this assumption and thus
could trigger a NULL pointer dereference in KMSAN kernels.

Reported by: glebius
Fixes: ec45f952a232 ("sockbuf: Add KMSAN checks to sbappend*()")
MFC after: 1 week

4 months agostand/lua: always allow overriding with local config files
Stéphane Rochoy [Thu, 21 Dec 2023 14:05:58 +0000 (15:05 +0100)]
stand/lua: always allow overriding with local config files

Loader now also read configuration files listed in local_loader_conf_files.
Files listed here are the last ones read. And /boot/loader.conf.local was
moved from loader_conf_files to local_loader_conf_files leaving only
loader.conf and device.hints in loader_conf_files by default.

The idea is to ensure local_loader_conf_files, i.e., /boot/loader.conf.local,
can always be used to override other user defined settings.

So the sequencing is now as follow:

 1. Bootstrap:
     /boot/defaults/loader.conf

 2. Read loader_conf_files files:
     /boot/device.hints
     /boot/loader.conf

 3. Read loader_conf_dirs files:
     /boot/loader.conf.d/*.conf

 4. And finally, rread local_loader_conf_files files:
     /boot/loader.conf.local

4 months agostand/lua: per-product conf if requested via product_vars
Stéphane Rochoy [Thu, 4 May 2023 07:23:47 +0000 (09:23 +0200)]
stand/lua: per-product conf if requested via product_vars

If product_vars is set, it must be a space separated list of environment
variable names to walk through to guess the product. Each time a product can be
guessed (i.e., the corresponding variable is defined), prepend
/boot/loader.conf.d/PRODUCT/ to loader_conf_dirs.

It can be typically used as follow:

    smbios.system.planar.maker="PLANAR_MAKER"
    smbios.system.planar.product="PLANAR_PRODUCT"
    smbios.system.product="PRODUCT"
    uboot.m_product="M_PRODUCT"
    product_vars="smbios.system.planar.maker smbios.system.planar.product smbios.system.product uboot.m_product"

to read files found in the following directories, in that order:

    /boot/loader.conf.d/PLANAR_MAKER
    /boot/loader.conf.d/PLANAR_PRODUCT
    /boot/loader.conf.d/PRODUCT
    /boot/loader.conf.d/M_PRODUCT

4 months agoregex: fix freeing g->charjump in low memory condition
Corinna Vinschen [Fri, 2 Feb 2024 18:30:39 +0000 (11:30 -0700)]
regex: fix freeing g->charjump in low memory condition

computejumps() moves g->charjump to a position relativ to the value of
CHAR_MIN.  As such, g->charjump doesn't necessarily point to the address
actually allocated.  While regfree() takes that into account, the low
memory handling in regcomp_internal() doesn't.  Fix that by free'ing
the actually allocated address, as in regfree().

MFC After: 2 weeks
Reviewed by: imp,jrtc27
Pull Request: https://github.com/freebsd/freebsd-src/pull/692

4 months agodaily/223.backup-zfs: improve daily_backup_zfs_verbose behaviour
Lexi Winter [Fri, 2 Feb 2024 18:18:54 +0000 (11:18 -0700)]
daily/223.backup-zfs: improve daily_backup_zfs_verbose behaviour

- 223.backup-zfs would previously honour the daily_backup_zfs_verbose
  flag for zfs/zpool list, but not for the properties list.  fix it to
  show a diff for both of these if requested.

- if daily_backup_zfs_verbose was disabled, 223.backup-zfs would still
  set rc=1 if the backup files changed, which caused periodic(8) to send
  a useless email even if daily_show_success=NO was set.

  change this so that it only sets rc=1 if diff output is enabled, i.e.
  the output is actually useful to the admin.

MFC after: 2 weeks
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1091

4 months agostdlib.h: add __noexcept to prototypes
Lexi Winter [Fri, 2 Feb 2024 16:41:40 +0000 (09:41 -0700)]
stdlib.h: add __noexcept to prototypes

The noexcept specifier is required on these functions in C++:
_Exit(), atexit(), quick_exit(), at_quick_exit(), abort().

MFC after: 2 weeks

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1085

4 months agosys/cdefs.h: add __noexcept and __noexcept_if
Lexi Winter [Fri, 2 Feb 2024 16:41:40 +0000 (09:41 -0700)]
sys/cdefs.h: add __noexcept and __noexcept_if

These macros provide the C++11 noexcept and noexcept(...) keywords if
we're compiling in a C++11 environment.  Otherwise, they expand to an
empty string.

This will be used to add the required noexcept specifier to several libc
functions as required in C++11.

MFC after: 2 weeks

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1085

4 months agoaarch/SYS.h: implement _SYSCALL_BODY() macro
Brooks Davis [Fri, 2 Feb 2024 17:08:55 +0000 (17:08 +0000)]
aarch/SYS.h: implement _SYSCALL_BODY() macro

Add _SYSCALL_BODY() macro which invokes the syscall via _SYCALL() and
calls cerror as required.  Use to implement PSEUDO() and RSYSCALL().

Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D43058

4 months agolibpfct: fix incorrect array check
Kristof Provost [Thu, 1 Feb 2024 21:32:32 +0000 (22:32 +0100)]
libpfct: fix incorrect array check

Reported by: Coverity Scan
CID: 1523771
Sponsored by: Rubicon Communications, LLC ("Netgate")

4 months agopf: implement addrule via netlink
Kristof Provost [Fri, 12 Jan 2024 10:54:18 +0000 (11:54 +0100)]
pf: implement addrule via netlink

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

4 months agopf: ensure dummynet gets the correct direction after route-to
Kristof Provost [Thu, 1 Feb 2024 17:59:36 +0000 (18:59 +0100)]
pf: ensure dummynet gets the correct direction after route-to

If we apply a route-to to an inbound packet pf_route() may hand that
packet over to dummynet. Dummynet may then delay the packet, and later
re-inject it. This re-injection (in dummynet_send()) needs to know
if the packet was inbound or outbound, to call the correct path for
continued processing.

That's done based on the pf_pdesc we pass along (through
pf_dummynet_route() and pf_pdesc_to_dnflow()). In the case of pf_route()
on inbound packets that may be wrong, because we're called in the input
path, and didn't update pf_pdesc->dir.

This can manifest in issues with fragmented packets. For example, a
fragmented packet will be re-fragmented in pf_route(), and if dummynet
makes different decisions for some of the fragments (that is, it delays
some and allows others to pass through directly) this will break.

The packets that pass through dummynet without delay will be transmitted
correctly (through the ifp->if_output() call in pf_route()), but
the delayed packets will be re-injected in the input path (and not
the output path, as they should be). These packets will pass through
pf_test(PF_IN) as they're tagged PF_MTAG_FLAG_DUMMYNET. However,
this tag is then removed and the packet will be routed and enter
pf_test(PF_OUT) where pf_reassemble() will hold them indefinitely
(as some fragments have been transmitted directly, and will never hit
pf_test(PF_OUT)).

The fix is simple: we must update pf_pfdesc->dir to PF_OUT before we
pass the packet to dummynet.

See also: https://redmine.pfsense.org/issues/15156
Reviewed by: rcm
Sponsored by: Rubicon Communications, LLC ("Netgate")

4 months ago.gitignore: add sys/*/compile
Lexi Winter [Fri, 2 Feb 2024 16:17:19 +0000 (09:17 -0700)]
.gitignore: add sys/*/compile

Files in sys/*/compile are created when compiling the kernel with
config(8).  They are never source files and should never be committed to
source control, so list this entire directory in .gitignore. While not
the official way to build the kernel, it's often useful to debug
sys/conf/files* changes when adding new drivers, etc.

Reviewed by: imp, meena <me igalic co>
Pull Request: https://github.com/freebsd/freebsd-src/pull/1082

4 months agokldxref: Fix maketempfile function's way of finding the root dir
Mina Galić [Fri, 2 Feb 2024 15:35:46 +0000 (08:35 -0700)]
kldxref: Fix maketempfile function's way of finding the root dir

Rather than assuming that the "root" is passed as directory and will be
marked by a trailing slash, we just assume that the directory, which has
been checked previously to be a directory, is a directory.

This fixes an inconsistency between `kldxref /boot/modules`, which tries
to create the temp file in `/boot/`, and `kldxref /boot/modules/`, which
tries to create it in `/boot/modules/` itself.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1093

4 months agolibthr: Force the thr_wake() symbol to be resolved during initialization
Mark Johnston [Fri, 2 Feb 2024 14:23:53 +0000 (09:23 -0500)]
libthr: Force the thr_wake() symbol to be resolved during initialization

Otherwise the lock upgrade performed by rtld's load_filtees() can result
in infinite recursion, wherein:
1. _rtld_bind() acquires the bind read lock,
2. the source DSO's filtees haven't been loaded yet, so the lock upgrade
   in load_filtees() cause rtld to jump to _rtld_bind() and release the
   bind lock,
3. _thr_rtld_lock_release() calls _thr_ast(), which calls thr_wake(),
   which hasn't been resolved yet,
4. _rtld_bind() acquires the bind read lock in order to resolve
   thr_wake(),
5. ...

See the linked pull request for an instance of this problem arising with
libsys.  That particular instance is also worked around by commit
e7951d0b04e6.

Reported by: brooks
Reviewed by: kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/908
MFC after: 1 week
Sponsored by: Innovate UK

4 months agoshare/examples/IPv6/USAGE: remove
Lexi Winter [Fri, 2 Feb 2024 15:29:01 +0000 (08:29 -0700)]
share/examples/IPv6/USAGE: remove

This document dates from the KAME days and, among other things,
references the 'prefix' command which has not existed for a long time.
Since IPv6 configuration is now documented in the Handbook, remove this
obsolete file.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1094

4 months agofreebsd-tips: freebsd-update fetch, then install
Graham Perrin [Fri, 2 Feb 2024 15:25:41 +0000 (08:25 -0700)]
freebsd-tips: freebsd-update fetch, then install

In end of life (EOL) warning cases: freebsd-update fetch install (the
two commands, combined) may fetch and patch, but not install.

Instead: run the two consecutively. Consistent with installation
information in /releases/ areas and with accepted
https://reviews.freebsd.org/D42722

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1096

4 months agortld-elf: Avoid unnecessary lock_restart_for_upgrade() calls
Mark Johnston [Thu, 1 Feb 2024 22:43:05 +0000 (17:43 -0500)]
rtld-elf: Avoid unnecessary lock_restart_for_upgrade() calls

In order to atomically upgrade the rtld bind lock, load_filtees() may
trigger a longjmp back to _rtld_bind() so that the binding can be done
with the write lock held.  However, the write lock is only needed when
filtee objects haven't already been loaded, so move the
lock_restart_for_upgrade() call to avoid unnecessary lock upgrades when
a filtee is defined.

Reviewed by: kib
Tested by: brooks
MFC after: 1 week
Sponsored by: Innovate UK

4 months agoRevert "pkgbase: Create a FreeBSD-dtb package"
Emmanuel Vadot [Fri, 2 Feb 2024 10:39:51 +0000 (11:39 +0100)]
Revert "pkgbase: Create a FreeBSD-dtb package"

Somehow this doesn't work iwth make packages due to some kind of a race.
The package is first created correctly but later in the process it is
overwritten by a badly created empty package.
Revert in the mean time so we can have working pkgbase on arm/arm64

This reverts commit a5afd7920d50ff23f91bdbabb1f0fd7ba028ba9e.

4 months agoOpenSSL: Vendor import of OpenSSL 3.0.13
Cy Schubert [Fri, 2 Feb 2024 04:39:16 +0000 (20:39 -0800)]
OpenSSL: Vendor import of OpenSSL 3.0.13

* Fixed PKCS12 Decoding crashes ([CVE-2024-0727])
* Fixed Excessive time spent checking invalid RSA public keys
  ([CVE-2023-6237])
* Fixed POLY1305 MAC implementation corrupting vector registers on
  PowerPC CPUs which support PowerISA 2.07 ([CVE-2023-6129])
* Fix excessive time spent in DH check / generation with large Q
  parameter value ([CVE-2023-5678])

Release notes can be found at
https://www.openssl.org/news/openssl-3.0-notes.html.

4 months agocheckstyle9.pl: Differentiate errors and warnings
Warner Losh [Fri, 2 Feb 2024 07:23:43 +0000 (00:23 -0700)]
checkstyle9.pl: Differentiate errors and warnings

Use ::error and ::warning as appropriate to give better meaning to the
messages.

Sponsored by: Netflix

4 months agocheckstyle9.pl: Another correction to github workflow
Warner Losh [Fri, 2 Feb 2024 06:26:38 +0000 (23:26 -0700)]
checkstyle9.pl: Another correction to github workflow

Remove extra space...

Sponsored by: Netflix

4 months agocheckstyle9.pl: Correct github output
Warner Losh [Fri, 2 Feb 2024 06:15:13 +0000 (23:15 -0700)]
checkstyle9.pl: Correct github output

Change the : between file and line to a ,. This should fix this...

Sponsored by: Netflix

4 months agogithub: Enable github workflow output from checkstyle9.pl
Warner Losh [Fri, 2 Feb 2024 05:53:58 +0000 (22:53 -0700)]
github: Enable github workflow output from checkstyle9.pl

Let's see if we can get the style issues flagged inline.

Sponsored by: Netflix

4 months agocheckstyle9.pl: Add --github to output for github workflows
Warner Losh [Fri, 2 Feb 2024 05:50:19 +0000 (22:50 -0700)]
checkstyle9.pl: Add --github to output for github workflows

If you add "::error file=foo/bar.c:line=123:" before the error message,
it will appear inline.

Sponsored by: Netflix

4 months agocontrib/tzdata: import tzdata 2024a
Philip Paeps [Fri, 2 Feb 2024 02:01:39 +0000 (10:01 +0800)]
contrib/tzdata: import tzdata 2024a

Changes: https://github.com/eggert/tz/blob/2024a/NEWS

MFC after: 3 days

4 months agoImport tzdata 2024a
Philip Paeps [Fri, 2 Feb 2024 01:53:59 +0000 (09:53 +0800)]
Import tzdata 2024a

4 months agopflowctl: add missing break to case 's'
Ed Maste [Thu, 1 Feb 2024 21:22:11 +0000 (16:22 -0500)]
pflowctl: add missing break to case 's'

CID: 1534009
Reported by: Coverity Scan
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D43704

4 months agotests/netinet: add a demo of TCP implied connect
Gleb Smirnoff [Thu, 1 Feb 2024 21:37:26 +0000 (13:37 -0800)]
tests/netinet: add a demo of TCP implied connect

The TCP implied connect is an artifact left after T/TCP.  To my surprise
it still works, hence the existence of this test.  Please read this email
first:

https://lists.freebsd.org/pipermail/freebsd-net/2010-August/026311.html

An interesting fact that this test takes 220 - 240 milliseconds to
execute on my Threadripper PRO.  Flipping the '#if 0' to '#if 1' in the
test, thus bringing it back to normal connect(2), would speed the test up
a hundred times and I guess all this time is fork+exec of the test.

4 months agosocket tests: improve error message
Gleb Smirnoff [Thu, 1 Feb 2024 21:37:26 +0000 (13:37 -0800)]
socket tests: improve error message

4 months agounix/dgram: don't clear so_error in case of MSG_PEEK
Gleb Smirnoff [Thu, 1 Feb 2024 21:37:26 +0000 (13:37 -0800)]
unix/dgram: don't clear so_error in case of MSG_PEEK

4 months agosyscalls.master: Remove stray blank lines
Brooks Davis [Thu, 1 Feb 2024 17:13:19 +0000 (17:13 +0000)]
syscalls.master: Remove stray blank lines

No functional change.

4 months agobintrans: Remove unused variable.
Dag-Erling Smørgrav [Thu, 1 Feb 2024 13:10:45 +0000 (14:10 +0100)]
bintrans: Remove unused variable.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D43559

4 months agobintrans: Add base64 to name list in manual page.
Dag-Erling Smørgrav [Thu, 1 Feb 2024 13:10:41 +0000 (14:10 +0100)]
bintrans: Add base64 to name list in manual page.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: 0mp, pstef
Differential Revision: https://reviews.freebsd.org/D43558

4 months agobintrans: Fix uninitialized variable.
Dag-Erling Smørgrav [Thu, 1 Feb 2024 13:10:37 +0000 (14:10 +0100)]
bintrans: Fix uninitialized variable.

`prev` may be used uninitialized if `body` starts with a newline.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D43534

4 months agobintrans: Error out if writing to the output failed.
Dag-Erling Smørgrav [Thu, 1 Feb 2024 13:10:31 +0000 (14:10 +0100)]
bintrans: Error out if writing to the output failed.

- Cover all code paths.
- When decoding, check all output files, not just the last one.
- A simple `ferror()` check is not enough as an error may later occur
  while flushing whatever remains in the output buffer.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D43532

4 months agokbdmap: fix typo preventing kbdmap to work under vt
Baptiste Daroussin [Thu, 1 Feb 2024 07:44:04 +0000 (08:44 +0100)]
kbdmap: fix typo preventing kbdmap to work under vt

4 months agokbdmap: remove debug
Baptiste Daroussin [Thu, 1 Feb 2024 07:40:00 +0000 (08:40 +0100)]
kbdmap: remove debug

4 months agompr: endianess fix for set/get dpm page0
Robert Wing [Thu, 1 Feb 2024 02:33:05 +0000 (17:33 -0900)]
mpr: endianess fix for set/get dpm page0

Reviewed by: oshogbo, imp
Sponsored by:   Klara, Inc.
Sponsored by:   Datazap
Differential Revision: https://reviews.freebsd.org/D43505