efibootmgr: Show attributes, category and optional data when verbose
Also rework a bit the way device path are displayed for consistency.
Signed-off-by: stephane.rochoy at stormshield.eu
Reviewed by: imp
Sponsored by: Stormshield
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2167
efivar: Move dump functions into libefivar
To allow their use by efibootmgr.
Signed-off-by: stephane.rochoy at stormshield.eu
Reviewed by: imp
Sponsored by: Stormshield
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2167
ctld: kernel-sourced portal groups are not dummies
The current and historical versions of ctld would flag our initial set
of kernel ports as dummies, because their portal groups were empty since
portals come from the configuration on-disk.
As a result, we would never try to remove a kernel port at startup that
didn't exist in the configuration (possibly a feature if you wanted
concurrent ctld(8)), and we would always try to port->kernel_add() on
ports in the configuration (even if they actually did have an existing
kernel port).
Flag these portal groups as kernel groups so that we avoid trying to add
ports that already exist. It may be the case that the kernel_remove()
loop in conf::apply() needs to do something other than the current
`oldport->is_dummy()` to avoid removing ports that it isn't supposed to
be managing, but that wuld also seem to apply to LUNs that would be
removed today.
[2 lines not shown]
libiscsiutil: preserve errno across warning logs
Various calls in the implementation can clobber errno; preserve it for
the caller since none of these will bubble up pass/fail to simplify
some future error handling in ctld.
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D56539
bsdinstall: fix root password prompt with backslashes
Use "read -r" to set the root password in "bsdinstall rootpass" to
prevent issues with passwords containing one or more backslash
characters.
PR: 294781
Discussed with: tuexen, crest
Approved by: khorben
MFC after: 3 days
Event: Wiesbaden Hackathon 202604
(cherry picked from commit 1566386b90d34dea7f30a0e6b511e178bd0d50b8)
Makefile.inc1: Only copy locales to INSTALLTMP on FreeBSD
Makefile.inc1 copies locales to ${INSTALLTMP} to avoid issues when
running make installworld on a live system. However, this can break
on non-FreeBSD systems, e.g. on openSUSE where /usr/share/locales
has mode 0555, which means after we copy it, we can't delete it,
so the build fails.
Since this functionality is only useful when installing over a
live system, disable it when the build host is not FreeBSD.
MFC after: 2 weeks
Reviewed by: kevans, emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56677
packages: Make create-sets.sh more robust
Use ${PKG_CMD} rather than bare 'pkg' to fix the build when pkg is
not in the tools path. Provide a default in case it's not set for
some reason (e.g., running the script by hand).
Since set -- $(...) does not trigger an exit from set -e if the
command fails, this failure was silent and resulted in sets not
being built correctly if we failed to run pkg. Use a temporary
variable, which does trigger set -e, to fail correctly.
MFC after: 2 weeks
Reviewed by: sjg
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56676
llvm: Move libprivatelldb to the lldb package
Set PACKAGE=lldb in lldb.pre.mk rather than in individual Makefiles;
change lib/clang/Makefile.inc from PACKAGE=clang to PACKAGE?=clang to
avoid overwriting it.
This is safe to MFC to stable/15 since the moved library will be
picked up automatically by pkg.
MFC after: 2 weeks
Reviewed by: emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56674
acpi: Remove userland bits on non-ACPI platforms
ACPI is only supported on amd64, arm64 and i386. Don't install the
power_profile rc script or devd configuration on other platforms.
This avoids creating a useless FreeBSD-acpi package on those platforms.
MFC after: 2 weeks
Reviewed by: imp
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56650
hwpmc: Add IBS capability control policy
Reject unsupported AMD IBS and PMU control bits before programming the
MSRs.
Initialize IBS fetch/op allow masks from CPUID feature bits and validate
user-provided IBS control values against those masks. Keep the
load-latency filter dependency on L3MissOnly, but avoid decoding fields
that are already constrained by the mask.
Apply the same reserved-bit policy to the AMD PMU raw-config path by
checking core, L3, and data fabric configs against subclass-specific
masks.
Fix the IBS CPUID feature bit definitions used by the policy.
Reviewed by: mhorne, Ali Mashtizadeh <ali at mashtizadeh.com>
Sponsored by: AMD
Signed-off-by: Andre Silva <andasilv at amd.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2140
hwpmc: Add extra_mask sysctls per counter type
Expose kern.hwpmc.{ibs_fetch,ibs_op,amd_core,amd_l3,amd_df}_extra_mask
as RWTUN uint64s that OR into the CPUID-derived allow mask at
validation time. Default 0, so the strict policy applies unless an
administrator opts bits back in — intended for testing the wrmsr_safe
path in PR #2157.
Reviewed by: mhorne, Ali Mashtizadeh <ali at mashtizadeh.com>
Sponsored by: AMD
Signed-off-by: Andre Silva <andasilv at amd.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2140
hwpmc_ibs: Add external error handling
Add EXTERR_CAT_HWPMC_IBS to the external error categories and replace generic
EINVAL returns in ibs_allocate_pmc() with EXTERROR() calls that provide
detailed error messages.
This will be augmented with additional cases in the near future.
Reviewed by: mhorne
Sponsored by: AMD
Signed-off-by: Andre Silva <andasilv at amd.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2134
sys.net.if_wg.wg_key_peerdev_makeshared: Add require metadata
Add require.user root and require.kmods if_wg to
wg_key_peerdev_makeshared_head(), consistent with the other wg tests.
Without if_wg.ko causes ifconfig wg create to fail with EINVAL. The
test also needs root to create jails.
Sponsored by: The FreeBSD Foundation
Vendor import of smart at 1.0.2
smart/diskhealth is a command line application to monitor disk health
from a storage device via SMART.
Reviewed by: fuz, jrm
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D56638
bsdinstall: Improve auto-partition message
Manually tuning ZFS for systems with <8GB ram hasn't been necessary at
least since the switch to OpenZFS. We have users reporting using 1GB RAM
with no manual tuning/issues. Further, the page this links to is a stale
wiki page, which is causing complaints. Remove this misleading note and
replace it with a similar message for UFS. While here, reword that note
to be a bit clearer.
PR: 287719
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D50971
vt_core: make sure the driver's functions exist
These are NULL if they're not implemented. Make sure all the functions
we need are there before doing anything.
Also invert the first if statment to lessen the indentation a bit.
Reported by: Quentin Thébault <quentin.thebault at defenso.fr>
MFC after: 3 days
(cherry picked from commit d1854272b646306de6546f8e5702e8072051d7f6)
vt_core: delay the shutdown splash event handler
Even though the functions are currently executed in the correct order,
there's no garuntee that this will always be the case.
Reported by: kevans
Discussed with: kevans
Fixes: 4b862c713ac5556ab4bd1828b47c5eb9cb28e067
MFC after: 3 days
(cherry picked from commit e72c59315e7a2bedd654ac7c6e82dd3ceba30ed2)
pf: do not allow flags to be changed with securelevel set
With securelevel set (for pf that means >= 3) we're expected to reject
rule changes. However, we allowed interface flags to be changed, which
would allow 'set skip on X' to be changed.
Remove DIOCSETIFFLAG and DIOCCLRIFFLAG from the securelevel whitelist.
MFC after: 1 week
Reported by: cyberkittens
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit d5ca00f2d8743f0885c17f50c8c011cae285fbdb)
pf: do not allow flags to be changed with securelevel set
With securelevel set (for pf that means >= 3) we're expected to reject
rule changes. However, we allowed interface flags to be changed, which
would allow 'set skip on X' to be changed.
Remove DIOCSETIFFLAG and DIOCCLRIFFLAG from the securelevel whitelist.
MFC after: 1 week
Reported by: cyberkittens
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit d5ca00f2d8743f0885c17f50c8c011cae285fbdb)
pf: only allow a subset of netlink calls when securelevel is set
Extend the genl_cmd struct to allow calls to also carry a securelevel.
If that's set compare the current securelevel to only allow the call if
the level is lower than that.
If no value is specified continue to allow calls in any securelevel,
as before.
This allows us to easily implement the same securelevel restrictions for
pf as we have for the corresponding ioctls.
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D56390
(cherry picked from commit 9933bdcb12641839b7396ccd0c6b8a2d55d12744)
amd64: Make EFI runtime faults look less like panics
EFI runtime faults may be mistaken for kernel panics, and do not
necessarily represent actual problems. Try to differentiate them some
more by printing "EFI runtime trap" rather than "Fatal trap".
PR: 291193
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56309
termcap: fix screen entry standout mode (so/se) capabilities
so=\E[3m (italic) is incorrect, should be so=\E[7m (reverse video).
se=\E[23m (italic off) is incorrect, should be se=\E[27m (reverse off).
mr=\E[7m (reverse video) is correctly defined in the same entry.
screen-256color inherits from screen via tc=screen and is fixed
transitively.
PR: 294499
Pull Request: https://github.com/freebsd/freebsd-src/pull/2139
Signed-off-by: Dan Mahoney <freebsd at gushi.org>
(cherry picked from commit 2bff747bb04db6beb19678abc45edd96be0a1347)
termcap: fix screen entry standout mode (so/se) capabilities
so=\E[3m (italic) is incorrect, should be so=\E[7m (reverse video).
se=\E[23m (italic off) is incorrect, should be se=\E[27m (reverse off).
mr=\E[7m (reverse video) is correctly defined in the same entry.
screen-256color inherits from screen via tc=screen and is fixed
transitively.
PR: 294499
Pull Request: https://github.com/freebsd/freebsd-src/pull/2139
Signed-off-by: Dan Mahoney <freebsd at gushi.org>
(cherry picked from commit 2bff747bb04db6beb19678abc45edd96be0a1347)
termcap: fix screen entry standout mode (so/se) capabilities
so=\E[3m (italic) is incorrect, should be so=\E[7m (reverse video).
se=\E[23m (italic off) is incorrect, should be se=\E[27m (reverse off).
mr=\E[7m (reverse video) is correctly defined in the same entry.
screen-256color inherits from screen via tc=screen and is fixed
transitively.
PR: 294499
Pull Request: https://github.com/freebsd/freebsd-src/pull/2139
Signed-off-by: Dan Mahoney <freebsd at gushi.org>
(cherry picked from commit 2bff747bb04db6beb19678abc45edd96be0a1347)