]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 months agoNgATM: deprecate
Brooks Davis [Fri, 3 Mar 2023 16:20:18 +0000 (16:20 +0000)]
NgATM: deprecate

Support for ATM NICs was removed prior to FreeBSD 12.  At the time it
was unclear if this code was still useful without it.  Now the time has
come to finish removing support.

Add DREPRECATION NOTICEs to the manpages and gone_in(14, ...) warnings
in the constructors (or module init for ngatmbase).

MFC after: 3 days
Relnotes: yes

Reviewed by: manu, emaste
Differential Revision: https://reviews.freebsd.org/D38877

14 months agonanobsd: remove comment about keeping C++ enabled
Brooks Davis [Fri, 3 Mar 2023 16:13:44 +0000 (16:13 +0000)]
nanobsd: remove comment about keeping C++ enabled

It's no longer possible to disable C++ so there's no need to comment
on it.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D38883

14 months agoposixshm tests: Correct page size index checks
Mark Johnston [Fri, 3 Mar 2023 16:16:21 +0000 (11:16 -0500)]
posixshm tests: Correct page size index checks

MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.

14 months agodeadlkres: Make parameters settable with tunables
Mark Johnston [Fri, 3 Mar 2023 16:16:16 +0000 (11:16 -0500)]
deadlkres: Make parameters settable with tunables

MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.

14 months agobhyveload: Address compiler warnings and bump WARNS
Mark Johnston [Fri, 3 Mar 2023 14:52:17 +0000 (09:52 -0500)]
bhyveload: Address compiler warnings and bump WARNS

Mostly sprinkle __unused.  Also duplicate strings passed to addenv() so
that constant string literals can be passed.  No functional change
intended.

Reviewed by: corvink, rew, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38840

14 months agobhyvectl: Address compiler warnings and bump WARNS
Mark Johnston [Fri, 3 Mar 2023 14:32:48 +0000 (09:32 -0500)]
bhyvectl: Address compiler warnings and bump WARNS

Avoid unaligned accesses in cpu_vendor_intel() and address a few other
nits.  No functional change intended.

Reviewed by: corvink, rew, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38839

14 months agonetlink: fix vlan interface creation
Alexander V. Chernikov [Fri, 3 Mar 2023 16:01:34 +0000 (16:01 +0000)]
netlink: fix vlan interface creation

MFC after: 2 weeks

14 months agonetlink: add u8/u64 attribute fetcher accessors to snl(3).
Alexander V. Chernikov [Fri, 3 Mar 2023 14:05:40 +0000 (14:05 +0000)]
netlink: add u8/u64 attribute fetcher accessors to snl(3).

MFC after: 2 weeks

14 months agobsnmp: Remove "All Rights Reserved" from FreeBSD Foundation copyrights
Ed Maste [Fri, 3 Mar 2023 13:10:44 +0000 (08:10 -0500)]
bsnmp: Remove "All Rights Reserved" from FreeBSD Foundation copyrights

14 months agodtrace_proc.4: Fix the description of pr_sname
Mateusz Piotrowski [Fri, 3 Mar 2023 10:14:41 +0000 (11:14 +0100)]
dtrace_proc.4: Fix the description of pr_sname

MFC after: 2 weeks
Sponsored by: Klara Inc.
Sponsored by: ELW – Entsorgungsbetriebe der Landeshauptstadt Wiesbaden

14 months agonote that some arch independent code can live in dev (e.g. SMBios)
John-Mark Gurney [Fri, 3 Mar 2023 09:54:07 +0000 (01:54 -0800)]
note that some arch independent code can live in dev (e.g. SMBios)

14 months agosrc.conf.5: Regen after switching to WITHOUT_ATM
Emmanuel Vadot [Fri, 3 Mar 2023 07:50:15 +0000 (08:50 +0100)]
src.conf.5: Regen after switching to WITHOUT_ATM

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38846

14 months agoAdd description for WITH_ATM
Emmanuel Vadot [Thu, 2 Mar 2023 07:26:38 +0000 (08:26 +0100)]
Add description for WITH_ATM

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38845

14 months agoDisable ATM programs by default
Emmanuel Vadot [Thu, 2 Mar 2023 07:21:34 +0000 (08:21 +0100)]
Disable ATM programs by default

ATM is an old technology, remove build of related programs by default

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38844
Reviewed by: brooks, imp, emaste

14 months agodaemon: set supervise_enabled during argument processing
Ihor Antonov [Fri, 3 Mar 2023 05:17:02 +0000 (23:17 -0600)]
daemon: set supervise_enabled during argument processing

Now when supervsion mode has it's own variable there is really no
reason to set it separately from the rest of the variables. Move
initialization of supervise_enabled var to the argument processing
switch loop, where it belongs.

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/672

14 months agodaemon: decouple restart variable
Ihor Antonov [Fri, 3 Mar 2023 05:17:02 +0000 (23:17 -0600)]
daemon: decouple restart variable

The 'restart' variable was responsible for enablement of restart
behavior and for restart delay. While it may seem convenient it
leads to cluttering the exit/restart logic

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/672

14 months agodaemon: add braces to while loop
Ihor Antonov [Fri, 3 Mar 2023 05:17:02 +0000 (23:17 -0600)]
daemon: add braces to while loop

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/672

14 months agodaemon: simplify if/else chain
Ihor Antonov [Fri, 3 Mar 2023 05:17:02 +0000 (23:17 -0600)]
daemon: simplify if/else chain

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/672

14 months agodaemon: change type of listen_child() to C99 bool
Ihor Antonov [Fri, 3 Mar 2023 05:17:02 +0000 (23:17 -0600)]
daemon: change type of listen_child() to C99 bool

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/672

14 months agodaemon: flatten and simplify fork() logic
Ihor Antonov [Fri, 3 Mar 2023 05:17:02 +0000 (23:17 -0600)]
daemon: flatten and simplify fork() logic

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/672

14 months agodaemon: style changes
Ihor Antonov [Fri, 3 Mar 2023 05:17:01 +0000 (23:17 -0600)]
daemon: style changes

This is not a functional change.
- Clean up whitespace (spaces where there should be tabs)
- Break up lines that are longer than 80

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/672

14 months agoMakefile.inc1: Support building with macOS Ventura's AMFI Launch Constraints
Jessica Clarke [Fri, 3 Mar 2023 02:15:30 +0000 (02:15 +0000)]
Makefile.inc1: Support building with macOS Ventura's AMFI Launch Constraints

As of macOS Ventura, Apple-signed binaries cannot be run if copied away from
their system location. This security feature doesn't really make sense for
boring things like sh(1), more so for applications with special entitlements,
but it's universally present, and results in the following error:

  >>> Install check world
  bmake[2]: "/Users/Jess/cheri/freebsd/Makefile.inc1" line 572: warning: "MAKEFLAGS= CPUTYPE=dummy /Users/Jess/cheri/build/freebsd-riscv64-build/bmake-install/bin/bmake -f /dev/null  -m /Users/Jess/cheri/freebsd/share/mk MK_AUTO_OBJ=no -V CPUTYPE" exited on a signal
  bmake[2]: "/Users/Jess/cheri/freebsd/Makefile.inc1" line 575: CPUTYPE global should be set with ?=.

As with host-symlinks, we don't actually need to copy the files on macOS, since
we're not updating the current machine, so copy its approach and just symlink
them instead.

MFC after: 1 week

14 months agomergemaster: add deprecation notice to man page
Ed Maste [Wed, 22 Jan 2020 21:04:03 +0000 (16:04 -0500)]
mergemaster: add deprecation notice to man page

Reviewed by: bapt, gjb, kevans (all earlier)
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23327

14 months agolength for the 64-bit entry is 32-bits, not 16-bits.
John-Mark Gurney [Fri, 3 Mar 2023 01:03:57 +0000 (17:03 -0800)]
length for the 64-bit entry is 32-bits, not 16-bits.

Reported by: Jérôme Duval  (korli on github)

14 months agoabstract out the vm detection via smbios..
John-Mark Gurney [Thu, 23 Feb 2023 20:59:50 +0000 (20:59 +0000)]
abstract out the vm detection via smbios..

This makes the detection of VMs common between platforms that
have SMBios.

Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D38800

14 months agosrc.conf.5: regen for KBOOT and KTLS changes
Brooks Davis [Fri, 3 Mar 2023 00:47:09 +0000 (00:47 +0000)]
src.conf.5: regen for KBOOT and KTLS changes

kboot was enabled for aarch64 in 46010641267 and KTLS was added for
powerpc64* in e552cac3d7d9.

14 months agofreebsd-update: use grep -E instead of egrep
Ed Maste [Thu, 2 Mar 2023 23:54:52 +0000 (18:54 -0500)]
freebsd-update: use grep -E instead of egrep

GNU egrep emits a warning that it is obsolescent and suggests grep -E
instead.  Switch to grep -E in case we end up invoking GNU (e)grep (and
for consistency with other invocations in this file).

Reported by: Steffen Nurpmeso
Sponsored by: The FreeBSD Foundation

14 months agonetgraph.4: remove obsolete ng_atm.4 reference
Brooks Davis [Thu, 2 Mar 2023 23:37:18 +0000 (23:37 +0000)]
netgraph.4: remove obsolete ng_atm.4 reference

MFC After: 3 days

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38876

14 months agoNgATM: Remove useless NGATM_ATM option
Brooks Davis [Thu, 2 Mar 2023 23:37:10 +0000 (23:37 +0000)]
NgATM: Remove useless NGATM_ATM option

MFC after: 3 days

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38875

14 months agoNATM: Remove useless NETGRAPH_ATM_ATMPIF option
Brooks Davis [Thu, 2 Mar 2023 23:36:55 +0000 (23:36 +0000)]
NATM: Remove useless NETGRAPH_ATM_ATMPIF option

This code was removed as part of the NATM removal in 2017 and somehow
this option was missed.

MFC after: 3 days

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38874

14 months agokern_jail.c: Remove #ifdefs for VNET_NFSD
Rick Macklem [Thu, 2 Mar 2023 21:13:24 +0000 (13:13 -0800)]
kern_jail.c: Remove #ifdefs for VNET_NFSD

The consensus was that VNET_NFSD was not needed.
This patch removes it from kern_jail.c.

With this patch, support for the "allow.nfsd"
jail parameter is enabled in the kernel for
kernels built with "options VIMAGE".

Reviewed by: markj
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D38808

14 months agovfs_mount.c: Allow mountd(8) to do exports in a vnet prison
Rick Macklem [Thu, 2 Mar 2023 21:09:01 +0000 (13:09 -0800)]
vfs_mount.c: Allow mountd(8) to do exports in a vnet prison

To run mountd in a vnet prison, three checks in vfs_domount()
and vfs_domount_update() related to doing exports needed
to be changed, so that a file system visible within the
prison but mounted outside the prison can be exported.

I did all three in a minimal way, only changing the checks for
the specific case of a process (typically mountd) doing exports
within a vnet prison and not updating the mount point in other
ways.  The changes are:
- Ignore the error return from vfs_suser(), since the file
  system being mounted outside the prison will cause it to fail.
- Use the priv_check(PRIV_NFS_DAEMON) for this specific case
  within a prison.
- Skip the call to VFS_MOUNT(), since it will return an error,
  due to the "from" argument not being set correctly.  VFS_MOUNT()
  does not appear to do anything for the case of doing exports only.

Reviewed by: markj
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D37741

14 months agoopen.2: describe O_RESOLVE_BENEATH errors correctly
Val Packett [Sun, 19 Feb 2023 20:14:15 +0000 (17:14 -0300)]
open.2: describe O_RESOLVE_BENEATH errors correctly

The behavior is the same as in capability mode, it does not actually
return EINVAL for absolute lookups:

    openat(AT_FDCWD,"/tmp/test",O_RDONLY|O_DIRECTORY,00) = 3 (0x3)
    openat(3,"../../",O_RDONLY|0x800000,00)          ERR#93 'Capabilities insufficient'
    openat(3,"/etc/passwd",O_RDONLY|0x800000,00)     ERR#93 'Capabilities insufficient'

Fixes: 1f305be43 ("Document {O,AT}_RESOLVE_BENEATH...")
Reviewed by:    kib, pauamma (manpages), emaste
Sponsored by:   https://www.patreon.com/valpackett
Pull Request: https://github.com/freebsd/freebsd-src/pull/680
Differential Revision: https://reviews.freebsd.org/D38675

14 months agoxlocale: garbage collect references to strtoq_l/strtouq_l
Val Packett [Mon, 6 Feb 2023 19:43:48 +0000 (16:43 -0300)]
xlocale: garbage collect references to strtoq_l/strtouq_l

These were explicitly never implemented (see
lib/libc/locale/DESIGN.xlocale), but were referenced in the
manpage and the symbol map.

Fixes: 3c87aa1d3dc ("Implement xlocale APIs from Darwin")
Reported by:    ld.lld 16 being --no-undefined-version by default
Reviewed by:    theraven, emaste
Sponsored by:   https://www.patreon.com/valpackett
Pull Request: https://github.com/freebsd/freebsd-src/pull/679
Differential Revision: https://reviews.freebsd.org/D38408

14 months agoFix kernel memory disclosures in mpr and mps
Alan Somers [Wed, 1 Mar 2023 18:53:46 +0000 (11:53 -0700)]
Fix kernel memory disclosures in mpr and mps

In every mpr and mps ioctl that copies kernel data to userland, validate
that the requested length does not exceed the size of the kernel's
buffer.

Note that all of these ioctls already required root access.

MFC after: 2 weeks
Sponsored by: Axcient
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D38842

14 months agoarm: Tag VHYBRID kernel as NO_UNIVERSE
Emmanuel Vadot [Thu, 2 Mar 2023 08:26:54 +0000 (09:26 +0100)]
arm: Tag VHYBRID kernel as NO_UNIVERSE

All drivers are already either in GENERIC or in the other arches LINT
so no need to build this one too.

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38851

14 months agoarm: Tag SOCFPGA kernel as NO_UNIVERSE
Emmanuel Vadot [Thu, 2 Mar 2023 08:25:38 +0000 (09:25 +0100)]
arm: Tag SOCFPGA kernel as NO_UNIVERSE

All drivers are already either in GENERIC or in the other arches LINT
so no need to build this one too.

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38850

14 months agoarm: Tag EFIKA_MX kernel as NO_UNIVERSE
Emmanuel Vadot [Thu, 2 Mar 2023 08:22:59 +0000 (09:22 +0100)]
arm: Tag EFIKA_MX kernel as NO_UNIVERSE

All drivers are already either in GENERIC or in the IMX51 kernel config
so no need to build this one too.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38849

14 months agoarm: Tag ALPINE kernel as NO_UNIVERSE
Emmanuel Vadot [Thu, 2 Mar 2023 08:18:03 +0000 (09:18 +0100)]
arm: Tag ALPINE kernel as NO_UNIVERSE

Specific devices are in LINT so no need to build this one as part
of make universe.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38848
Reviewed by: imp

14 months agoarm: Add PCI and Annapurna devices drivers to LINT
Emmanuel Vadot [Thu, 2 Mar 2023 08:17:21 +0000 (09:17 +0100)]
arm: Add PCI and Annapurna devices drivers to LINT

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38847
Reviewed by: imp

14 months agokboot: Fix hostdisk_override
Warner Losh [Thu, 2 Mar 2023 17:57:43 +0000 (10:57 -0700)]
kboot: Fix hostdisk_override

We were assuming that hostdisk_override was both a directory and a
file, which is not going to work very well. It's supposed to be a
single file, so recode it as such. Simplify erorr handling a little as
well and fix a return type-mismatch that doesn't matter for the
generated code (return NULL is the same as return false in this
context)

Sponsored by: Netflix

14 months agokboot: Use MIN instead of min
Warner Losh [Thu, 2 Mar 2023 17:56:44 +0000 (10:56 -0700)]
kboot: Use MIN instead of min

MIN works for any type, while min() is only for integers. So we were
rounding down to 0 since that's the size of 4GB truncated to an int.

Sponsored by: Netflix

14 months agokboot: Better default boot device
Warner Losh [Thu, 2 Mar 2023 17:55:06 +0000 (10:55 -0700)]
kboot: Better default boot device

Provide a better message when we can't find a boot device.

Sponsored by: Netflix

14 months agokboot: Hack for running on FreeBSD host
Warner Losh [Thu, 2 Mar 2023 17:31:05 +0000 (10:31 -0700)]
kboot: Hack for running on FreeBSD host

When we're running on a FreeBSD host, we can't open /proc/iomem.  So,
for now, just assume that we have 32GB of ram starting at 4GB.

Sponsored by: Netflix

14 months agomoused: Fix typos
Elyes Haouas [Fri, 24 Feb 2023 06:53:51 +0000 (07:53 +0100)]
moused: Fix typos

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
14 months agoftgpio: Fix panic at attach and use better device description
Stéphane Rochoy [Thu, 2 Mar 2023 15:16:35 +0000 (08:16 -0700)]
ftgpio: Fix panic at attach and use better device description

Use ftgpio_group_get_status instead of inlining an imperfect
version of it to get correct register and avoid
panic: ftgpio_group_get_ioreg: invalid register 0 for group 0

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

14 months agoyp_mkdb: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:07 +0000 (07:59 -0700)]
yp_mkdb: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agousbconfig: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:07 +0000 (07:59 -0700)]
usbconfig: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agorrenumd: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:07 +0000 (07:59 -0700)]
rrenumd: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agorpcbind: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:07 +0000 (07:59 -0700)]
rpcbind: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agorpc.yppasswdd: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:07 +0000 (07:59 -0700)]
rpc.yppasswdd: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agopmcstat: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:07 +0000 (07:59 -0700)]
pmcstat: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agolpr: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:07 +0000 (07:59 -0700)]
lpr: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agoextattr: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:06 +0000 (07:59 -0700)]
extattr: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agodiskinfo: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:06 +0000 (07:59 -0700)]
diskinfo: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agodconschat: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:06 +0000 (07:59 -0700)]
dconschat: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agobluetooth/hccontrol: Remove useless return at the end of void function
Elyes Haouas [Thu, 2 Mar 2023 14:59:06 +0000 (07:59 -0700)]
bluetooth/hccontrol: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656

14 months agouuidgen(1): back to the past and fix typo
Baptiste Daroussin [Thu, 2 Mar 2023 08:35:30 +0000 (09:35 +0100)]
uuidgen(1): back to the past and fix typo

Reported by: ceri

14 months agodaemon: more human-friendly variable names
Ihor Antonov [Thu, 2 Mar 2023 03:00:43 +0000 (21:00 -0600)]
daemon: more human-friendly variable names

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: move syslog facility and syslog tag into log_params
Ihor Antonov [Thu, 2 Mar 2023 03:00:42 +0000 (21:00 -0600)]
daemon: move syslog facility and syslog tag into log_params

Since struct log_params already contains logging-related
varaiables, including syslog-related, move remaining
syslog-related variables into struct log_params as well

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: deduplicate log_params varaibles
Ihor Antonov [Thu, 2 Mar 2023 03:00:42 +0000 (21:00 -0600)]
daemon: deduplicate log_params varaibles

While we're here, sort log_params by size.

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: make log_reopen variable a bool
Ihor Antonov [Thu, 2 Mar 2023 03:00:42 +0000 (21:00 -0600)]
daemon: make log_reopen variable a bool

Following style(9) and C99 recommendation use bool instead of
int for boolean operations.

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: make dosyslog variable a bool and give it a better name
Ihor Antonov [Thu, 2 Mar 2023 03:00:42 +0000 (21:00 -0600)]
daemon: make dosyslog variable a bool and give it a better name

Following style(9) and C99 recommendation use bool instead of
int for boolean operations. Also give the variable a more descriptive
name that follows boolean naming convention.

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: add supervision_enabled var
Ihor Antonov [Thu, 2 Mar 2023 03:00:42 +0000 (21:00 -0600)]
daemon: add supervision_enabled var

explicitly name a bunch of boolean checks that enable
supervison mode and improve comments

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: initialize struct sigaction at declaration site
Ihor Antonov [Thu, 2 Mar 2023 03:00:42 +0000 (21:00 -0600)]
daemon: initialize struct sigaction at declaration site

This improves readability by uncluttering the code

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: fix double init of pid variable
Ihor Antonov [Thu, 2 Mar 2023 03:00:42 +0000 (21:00 -0600)]
daemon: fix double init of pid variable

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: initialize mask_orig with sigemptyset()
Ihor Antonov [Thu, 2 Mar 2023 03:00:41 +0000 (21:00 -0600)]
daemon: initialize mask_orig with sigemptyset()

consolidation of variable declarations and initializations in previous
commit allowed me to detect that one of the signal masks is not properly
initialized with sigemptyset (as man 3 sigsetops demands)

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: consolidate variable declarations and initializaions
Ihor Antonov [Thu, 2 Mar 2023 03:00:41 +0000 (21:00 -0600)]
daemon: consolidate variable declarations and initializaions

- improve readability by breaking apart single-line multi-variable declarations
- initialize simple variables at declaration site
- move other top-level variable initializations closer declarations
  to avoid potential UB and unclutter the use-site.

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agodaemon: use braces with 'if' consistently
Ihor Antonov [Thu, 2 Mar 2023 03:00:41 +0000 (21:00 -0600)]
daemon: use braces with 'if' consistently

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/669

14 months agofreebsd-update: re-edit files if merge conflict markers remain
Ed Maste [Wed, 14 Dec 2022 17:34:59 +0000 (12:34 -0500)]
freebsd-update: re-edit files if merge conflict markers remain

freebsd-update will open ${EDITOR} if conflicts occur while merging
updates to config files.  Inform the user if they've left conflict
markers behind, and go back to editing the file.

PR: 185546
PR: 229689
Reviewed by: delphij
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37703

14 months agotools/build: Hide spurious errors if sys/stat.h does not exist
Ed Maste [Fri, 24 Feb 2023 14:43:57 +0000 (09:43 -0500)]
tools/build: Hide spurious errors if sys/stat.h does not exist

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38757

14 months agoFix typo: messages missing an 'a'.
Warner Losh [Wed, 1 Mar 2023 23:34:43 +0000 (16:34 -0700)]
Fix typo: messages missing an 'a'.

14 months agosvc_rpcsec_gss.c: Separate out the non-vnet initialization
Rick Macklem [Wed, 1 Mar 2023 23:29:25 +0000 (15:29 -0800)]
svc_rpcsec_gss.c: Separate out the non-vnet initialization

Without this patch, a single initialization function was
used to initialize both the vnet'd and non-vnet'd data.
This patch separates out the non-vnet'd initializations
into a separate function invoked by SYSINIT().
This avoids use of IS_DEFAULT_VNET() in the initialization
functions and also configures the non-vnet'd initialization
function to be called first, although ordering is not
currently needed.

Reviewed by: glebius
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D38749

14 months agonfs_fha_new: Fix nfs_fha_new so that sysctls work in prisons
Rick Macklem [Wed, 1 Mar 2023 23:25:35 +0000 (15:25 -0800)]
nfs_fha_new: Fix nfs_fha_new so that sysctls work in prisons

The sysctls were in "struct fha_params", making it impractical
to vnet them.  This patch moves the sysctls out of "struct fha_params"
and vnet's them, so that they are available in vnet prisons
running nfsd(8).  It also avoids the IS_DEFAULT_VNET() macros
in the VNET_SYSINIT() function.

Reviewed by: glebius
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D38748

14 months agotesting: skip tarfs tests if module is not loadable.
Olivier Cochard [Wed, 1 Mar 2023 20:26:54 +0000 (21:26 +0100)]
testing: skip tarfs tests if module is not loadable.

Approved by: asomers
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D38828

14 months agosysctl: tests: fix a couple issues
Kyle Evans [Wed, 1 Mar 2023 20:35:52 +0000 (14:35 -0600)]
sysctl: tests: fix a couple issues

The function that sets test case metadata is actually named ${tc}_head
rather than ${tc}, so add the suffix.

While we're here, hook the tests up to the infrastructure so that they
do get run.

Sponsored by: Klara, Inc.

14 months agonvram2env: Remove MIPS-specific support.
John Baldwin [Wed, 1 Mar 2023 18:54:08 +0000 (10:54 -0800)]
nvram2env: Remove MIPS-specific support.

14 months agousb: Trim another MIPS reference.
John Baldwin [Wed, 1 Mar 2023 18:51:27 +0000 (10:51 -0800)]
usb: Trim another MIPS reference.

Fix a nearby whitespace nit while here.

14 months agog_part_ebr: always create "compat" aliases
Ed Maste [Mon, 27 Feb 2023 19:13:09 +0000 (14:13 -0500)]
g_part_ebr: always create "compat" aliases

The "canonical" EBR partition names like `ada0s4+00002081` are not
particularly meaningful.  The "compat" aliases share the same namespace
as the parent MBR, resulting in user-friendly names like `ada0s6`.
These names are consistent with the way Linux names EBR partitions.

We previously provided a sysctl kern.features.geom_part_ebr_compat
(enabled by default) to control the "compat" names.  Remove the sysctl
and always create the aliases.

Relnotes: yes
Reviewed by: cem, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38812

14 months agosys/modules: Make use of SRCS.${KERN_OPT}.
John Baldwin [Wed, 1 Mar 2023 18:32:30 +0000 (10:32 -0800)]
sys/modules: Make use of SRCS.${KERN_OPT}.

kmod.mk appends the value of SRCS.${KERN_OPT} for each defined kernel
option to SRCS.  This helper is shorter than appending to SRCS under
explicit checks on KERN_OPTS.

Reviewed by: imp
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D38738

14 months agosys/modules: fix bogus OPT_ACPI tests
Nathaniel Wesley Filardo [Wed, 1 Mar 2023 18:32:08 +0000 (10:32 -0800)]
sys/modules: fix bogus OPT_ACPI tests

ACPI is not handled specially by sys/conf/kern.opts.mk (unlike a few
options), so we should fall back on the generic behavior of
sys/conf/config.mk, which pulls from all the generated opt*.h files,
including opt_acpi.h, which will cause DEV_ACPI to be included in
KERN_OPTS.  Then the generic machinery in sys/conf/kmod.mk will cause
SRCS.DEV_ACPI to be included in SRCS when appropriate.

Reviewed by: jhb, imp
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D38737

14 months agohwpmc: Don't wrap entire files in #ifdef DEV_ACPI.
John Baldwin [Wed, 1 Mar 2023 18:31:53 +0000 (10:31 -0800)]
hwpmc: Don't wrap entire files in #ifdef DEV_ACPI.

A subsequent commit will instead use existing infrastructure to
exclude the files from hwpmc.ko for non-ACPI builds.  Note that the
original commit left the files as optional in sys/conf/files.arm64.

This reverts commit 751d88119fdc1dff71d1390c7768942a9b857bc6.

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

14 months agomachine-id: generate a compact version of the uuid
Baptiste Daroussin [Tue, 28 Feb 2023 10:31:06 +0000 (11:31 +0100)]
machine-id: generate a compact version of the uuid

dbus and other actually expect an uuid without hyphens

Reported by: tijl
MFC After: 3 days

14 months agouuidgen: add -c for compact uuid
Baptiste Daroussin [Tue, 28 Feb 2023 10:29:51 +0000 (11:29 +0100)]
uuidgen: add -c for compact uuid

It generates the uuid string but without the hyphen

MFC After: 3 days
Reviews by: tcberner
Differential Revision: https://reviews.freebsd.org/D38820

14 months agobhyve: Remove useless return at the end of void function
Elyes Haouas [Thu, 23 Feb 2023 06:36:13 +0000 (07:36 +0100)]
bhyve: Remove useless return at the end of void function

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
14 months agobhyve: remove redundant variable
Vitaliy Gusev [Wed, 1 Mar 2023 07:45:46 +0000 (07:45 +0000)]
bhyve: remove redundant variable

Reviewed by:    corvink,markj
Sponsored by:   vStack
Differential Revision: https://reviews.freebsd.org/D38836

14 months agofreebsd-update: avoid effects of user's environment on grep
Ed Maste [Wed, 14 Dec 2022 17:13:19 +0000 (12:13 -0500)]
freebsd-update: avoid effects of user's environment on grep

A user had GREP_OPTIONS containing --color=always, which broke grep use
in freebsd-update.  Unset this environment variable.

PR: 255990
Reviewed by: kevans
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

14 months agobc: remove MIPS Makefile case
Ed Maste [Mon, 27 Feb 2023 15:05:16 +0000 (10:05 -0500)]
bc: remove MIPS Makefile case

MIPS support has been removed from FreeBSD.

Sponsored by: The FreeBSD Foundation

14 months agonetlink: add userland name mappings to all NETLINK_ROUTE messages.
Alexander V. Chernikov [Wed, 1 Mar 2023 15:22:21 +0000 (15:22 +0000)]
netlink: add userland name mappings to all NETLINK_ROUTE messages.

MFC after: 1 day

14 months agobuf: Make buf_daemon_shutdown() a no-op after a panic
Mark Johnston [Wed, 1 Mar 2023 15:07:56 +0000 (10:07 -0500)]
buf: Make buf_daemon_shutdown() a no-op after a panic

As in commit 9d7cc536e261a7, there is no need to do anything in this
context.

MFC after: 1 week

14 months agopf tests: test pfsync over IPSec
Kristof Provost [Wed, 1 Mar 2023 13:02:15 +0000 (14:02 +0100)]
pf tests: test pfsync over IPSec

Test that we can transport pfsync (unicast) over IPSec.

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

14 months agothunderx: fix potential sign extension issue
Ed Maste [Tue, 28 Feb 2023 19:17:30 +0000 (14:17 -0500)]
thunderx: fix potential sign extension issue

Coverity reported a sign extension issue on rq->caching << 26 in the
Linux ThunderX driver.  (It appears Coverity Scan doesn't build arm64
objects in FreeBSD.)

As done in Linux, add a cast.

Fixes: 3c0086b81391 ("Raw import of ThunderX VNIC networking driver...")
Sponsored by: The FreeBSD Foundation

14 months agoarm64: Shave off two instructions in exceptions
Dapeng Gao [Wed, 1 Mar 2023 14:28:53 +0000 (14:28 +0000)]
arm64: Shave off two instructions in exceptions

This patch shaves off up to two three instructions in
save_registers_head in exception.S for arm64, which would make more
space for instructions that could be added in CheriBSD.

This is done by:
 1. Combining pointer arithmetic with pre-incrementing STP instructions
 2. Removing the instruction that sets the frame pointer (x29) as its
    content is unused

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

14 months agossh: default VerifyHostKeyDNS to no, following upstream
Ed Maste [Fri, 17 Feb 2023 01:26:41 +0000 (20:26 -0500)]
ssh: default VerifyHostKeyDNS to no, following upstream

Revert to upstream's default.  Using VerifyHostKeyDNS may depend on a
trusted nameserver and network path.

This reverts commit 83c6a5242c80160fff76fb85454938761645b0c4.

Reported by: David Leadbeater, G-Research
Reviewed by: gordon
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38648

14 months agou3g(4): Add device ID for the Quectel EM160R
Allan Jude [Wed, 1 Mar 2023 14:01:19 +0000 (14:01 +0000)]
u3g(4): Add device ID for the Quectel EM160R

Also add the EM160R to the man page, noting the work-around
required to make it function properly in PPP mode.

MFC-After: 1 week
Sponsored by: Metify Inc.
Sponsored by: Klara Inc.

14 months agofb: whack __mips__ leftovers
Mateusz Guzik [Wed, 1 Mar 2023 11:40:38 +0000 (11:40 +0000)]
fb: whack __mips__ leftovers

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

14 months agosyscons: whack __mips__ leftovers
Mateusz Guzik [Wed, 1 Mar 2023 11:11:46 +0000 (11:11 +0000)]
syscons: whack __mips__ leftovers

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

14 months agomips: whack __mips__ leftover
Mateusz Guzik [Wed, 1 Mar 2023 11:09:48 +0000 (11:09 +0000)]
mips: whack __mips__ leftover

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

14 months agodtrace: whack __mips__ from dtraceall
Mateusz Guzik [Wed, 1 Mar 2023 11:08:52 +0000 (11:08 +0000)]
dtrace: whack __mips__ from dtraceall

Note contrib code is not modified.

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

14 months agonet: whack __mips__ leftovers
Mateusz Guzik [Wed, 1 Mar 2023 11:07:32 +0000 (11:07 +0000)]
net: whack __mips__ leftovers

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