sysconf: add a poudriere target
poudriere.conf is handed to sysrc(8), including the jail, tree, and
set overlays poudriere(8) consults. make, src, and src-env are
sub-targets over the matching make(1) files under poudriere.d. -l
and -L list one path per line; -L includes overlays that do not exist
yet. A bare -- ends the sub-target so the next word is a variable.
Bump sysconf(8) to 2.2.
Reviewed by: fuz, kfv, bcr
Differential Revision: https://reviews.freebsd.org/D59943
sysconf: accept a unique prefix of a target keyword
Exact match still wins. An ambiguous prefix is rejected with the
list of matches. Move keyword selection and the rc pass-through
into sysconf-targets.c. Bump sysconf(8) to 2.1.
Reviewed by: kfv
Differential Revision: https://reviews.freebsd.org/D59924
ctld: Fix namespace IDs for exported NVMe namespaces
NVMe namespace IDs are 1-based, but CTL LUN IDs are 0-based. The
in-kernel NVMe ctl(4) target accounts for this by adding one to the
LUN ID to compute a namespace ID. ctld was attempting to handle this
by translating namespace IDs from config files to internal LUN IDs,
but it did this incorrectly resulting in the namespace configured for
as namespace N actually showing up as namespace N + 1.
Fixes: 66b5296f1b29 ("ctld: Add support for NVMe over Fabrics")
Sponsored by: Chelsio Communications
nvmf: Limit namespace character device I/O size
Set si_iosize_max for namespace character devices matching the fix
from commit 125ec0e30785bb0cbca7aa6c0b1a34b75e53078d.
Sponsored by: Chelsio Communications
libsysdecode: Fix some cpp conditionals
While testing the bare values happens to work, the intent is to test
for their definition.
Reviewed by: emaste
Fixes: 9a16bd169e8c ("libsysdecode: support errno and syscalls for arm64 Linux")
Fixes: b69ae1a34c6f ("libsysdecode: Add preliminary support for decoding Linux syscalls")
Differential Revision: https://reviews.freebsd.org/D60415
bhyve: Remove unneeded include of <machine/iodev.h>
This is a kernel-only header for /dev/io. The user-facing header
defining the ioctl commands is <dev/io/iodev.h>.
Reviewed by: bnovkov, imp
Differential Revision: https://reviews.freebsd.org/D60399
sys: Enable pcfclock.ko on all architectures
This driver has been in sys/conf/NOTES (and thus enabled in LINT
builds on all architectures) since the file was renamed from the i386
LINT and there is no i386-specific code in the driver.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D60177
hwpmc: return errors from PMC_OP_PMCGETMSR
pcd_get_msr() returns a positive errno, but only a negative value was
treated as a failure, so errors were reported as success.
Signed-off-by: Osvaldo Janeri Filho <ojanerif at amd.com>
Reviewed by: mhorne
MFC after: 3 days
Sponsored by: AMD
Pull Request: https://github.com/freebsd/freebsd-src/pull/2461
libpmc: fix the family check for the AMD DF event encoding
The check compares cpu_family with decimal 19 instead of 0x19, so
Families 17h and 19h get the Family 1Ah DF encoding.
Signed-off-by: Osvaldo Janeri Filho <ojanerif at amd.com>
Reviewed by: mhorne
Fixes: 00c0a1f0bf6c ("hwpmc: Fix PMC flags for AMD Zen cores")
MFC after: 3 days
Sponsored by: AMD
Pull Request: https://github.com/freebsd/freebsd-src/pull/2461
route/fib_algo: Fix FIB_ALGO without ROUTE_MPATH option
The ROUTE_MPATH compile option has been removed from CURRENT
branch. Therefore, use the ROUTE_MPATH macro for nhgrp headers.
PR: 299210
Fixes: 891bda143f6b ("route/fib_algo: Fix nexthop index ...")
Differential Revision: https://reviews.freebsd.org/D59552
(cherry picked from commit 63343822430453f4add20bcbfa134c99132361df)
sysctl: don't loop when EAGAIN is returned
When userland_sysctl() experiences EAGAIN, don't loop internally but
leave retrying to the caller.
Looping was a problem in case of using tcpsso(8) to switch a TCP stack
where the acceptance check of the new TCP stack results in EAGAIN.
Reviewed by: kib, glebius
MFC after: 1 week
MFC to: stable/15
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D60444
acpi: Tasks: Document why 'acpi_task_count' is accessed unsynchronized
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit e89c3ac5df58a9eae9d01f325ffc9b34258c4b29)
acpi: Tasks: Make OsdSchedule.c whitespace clean
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit f0825f75bab8ae7cb8e0ba717f76110b6f1862f3)
acpi: Tasks: Remove unnecessary includes
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 2165accd3748c0acb6e82756d71a46509b220fd8)
ifuncs: Include <machine/ifunc.h> instead of <x86/ifunc.h>
All architectures have been providing an 'ifunc.h' header with
DEFINE_IFUNC() et alter working both in kernel and userland since commit
cf41d1113377 ("riscv: implement kernel ifunc resolution"), and separate
<i386/ifunc.h> and <amd64/ifunc.h> headers were introduced in commit
2b1db07bec92 ("x86: add machine/ifunc.h"), so stop including
<x86/ifunc.h> directly and use the common <machine/ifunc.h> idiom.
While here, re-order includes in the blocks featuring <x86/ifunc.h>,
which requires fixing <x86/apicvar.h> so that it can be included before
<machine/intr_machdep.h>.
Reviewed by: kib
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60194
(cherry picked from commit a2fbd988638e94b61cc78449e893f2c02d43dec0)
random: Remove unused include of ifuncs
No functional change (intended).
Reviewed by: markj, emaste
Fixes: 3a12982962ce ("random: add RDSEED as a provably unique entropy source")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60193
(cherry picked from commit 18ce3f50f630f64d5e9e898a3c06e9ed6e5a63a5)
NOTES: Multiple schedulers can be compiled in at once
Mention that ULE is the default scheduler when multiple ones are
compiled in and how the tunable 'kern.sched.name' can be used to select
another one.
While here, regroup SCHED_ULE and SCHED_4BSD, as they control if the
respective scheduler instances are compiled in, putting SCHED_STATS
aside.
Reviewed by: mchoo
Fixes: 75a66a92c92f ("- Add an option to compile in SCHED_STATS. ...")
Fixes: 1322760fd127 ("sys: enable both SCHED_ULE and SCHED_4BSD for some configs")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60014
(cherry picked from commit 754d2c69f3589cdd0bc4649d9e85ecd59935d9d3)
ifuncs: Have DEFINE_*IFUNC() macros expand the passed name
While here, make each <machine/ifunc.h> header include <sys/types.h> so
that it can be included standalone.
Reviewed by: kib
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60167
(cherry picked from commit ab9fcc5a553a25804b9535190e914e3ba0e746cf)
NOTES: SMP: Move PREEMPTION out of the debugging options section
It has been activated by default for more than 20 years.
Reviewed by: mchoo, srcmgr (imp)
Fixes: 444ba945136b ("Switch the default scheduler to 4BSD...")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60012
(cherry picked from commit 61ce73643f22f6f8273701eb978faa246bbca27d)
NOTES: IPI_PREEMPTION: Fix documentation, applies to all architectures
Move its description into 'sys/conf/NOTES' and update it to match reality.
Reviewed by: scheduler (mchoo)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60013
(cherry picked from commit d972d832f580c307cdfd87d563a382f40877dd10)
sched: options: Regroup scheduler-related kernel options
This makes it easier to have a full list of them at a glance, and makes
for a natural place to add new ones.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60010
(cherry picked from commit 406d6658ff821fc43eb0b2b10df4ab09eb2e2e16)
SYSCTL(9): Retire SYSCTL_NODE_CHILDREN()
It does not provide value over the pre-existing SYSCTL_STATIC_CHILDREN()
macro, which is widely used in the tree, whereas SYSCTL_NODE_CHILDREN()
is not.
Reviewed by: markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60009
(cherry picked from commit 4672ad1f16092c146261b4de485ec5eb5e8d127b)
pwd(1): De-obfuscate, style(9)
In getcwd_logical(), test for a '.' or '..' component in one of the most
straightforward and intelligible ways possible.
In particular, this removes a superfluous re-test of the the component's
first character being '.' when the first one did not pass and, more
importantly, prevents the second test from relying on a side-effect in
the first.
While here, for better clarity, replace the loop that searches for '/'
with a simple call to strchrnul().
Add high-level comments about what is going on.
While here, test explicitly that pointed 'char' values are not 0 ('\0')
(style(9)).
While here, separate the successive steps of getcwd_logical() with blank
[11 lines not shown]
ports.7: Document how to use mdo(1) for SU_CMD
Reviewed by: olce
MFC after: 1 week
Sponsored by: fme AG
Differential Revision: https://reviews.freebsd.org/D60443