Make it possible to search for literal two colons (::) and actually
find something. Make the "x"/"x:"/"x::" examples more explicit and
more visibile.
Signed-off-by: Simon Wollwage <rootnode+freebsd@wollwage.com>
Obtained from: NetBSD, nbuwe <uwe@stderr.spb.ru>, 856d5b6
PR: 291374
Reviewed by: imp, jlduran
Pull Request: https://github.com/freebsd/freebsd-src/pull/1923
All sysctls except thermal sensor readings and the handlerevents
whitelist-separated string are bitmasks or small integers. This avoids some
bitmasks being erroneously displayed as negative values.
Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1824
The apst_data tunable allows APST configuration to be adjusted
during controller initialization. It accepts an array of encoded
integers, each defining specific transition parameters.
Relnotes: YES
Signed-off-by: Alexey Sukhoguzov <sap@eseipi.net>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1444
APST is an optional NVMe power-saving feature that allows devices
to autonomously enter higher non-operational power states after a
certain amount of idle time, reducing the controller's overall power
consumption.
Signed-off-by: Alexey Sukhoguzov <sap@eseipi.net>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1444
Some of the cases inside umouse_request() (usr.sbin/bhyve/usb_mouse.c)
use the data component of an event, while only partially checking if
it's NULL. 'data' has a NULL check, but then 'data' is immediately
deferenced anyway after the check regardless of if it's NULL or not.
For example:
case UREQ(UR_GET_STATUS, UT_READ_INTERFACE):
case UREQ(UR_GET_STATUS, UT_READ_ENDPOINT):
DPRINTF(("umouse: (UR_GET_STATUS, UT_READ_INTERFACE)"));
if (data != NULL && len > 1) {
USETW(udata, 0);
data->blen = len - 2;
data->bdone += 2;
}
eshort = data->blen > 0;
break;
There are actually four occurrences of this same bug, each in a
different case in this switch block.
Signed-off-by: Jack Bendtsen <jackdbendtsen@gmail.com>
PR: 282237
Reviewed by: imp, jhb, vexeduxr
MFC After: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1728
This patch resolves inconsistent behavior between the -k option and
other related flags, including -P. Previously, using -k resulted in
output displayed in 1024-byte blocks, which did not align with the
behavior of similar options such as -m and -g, where output is shown in
1M-blocks and 1G-blocks respectively.
The updated implementation ensures that -k now correctly displays sizes
in 1K-blocks. In addition, the patch incorporates the POSIX requirement
that when both -k -P are specified, the block size must be explicitly
forced to 1024-blocks.
Together, these changes make the behavior of -k consistent, predictable,
and compliant with the standard.
Signed-off-by: Ankush Mondal <mondalankush9851@gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1906
This is equivalent of sdio_readw and sdio_writew in linuxkpi
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1951
This updates the smartpqi driver to Microchip's
latest available public release.
Reviewed by: imp
Approved by: imp
Sponsored by: Microchip Technology Inc.
Differential Revision: https://reviews.freebsd.org/D52507
Contrary to what is stated in commit f224591746 ("Add ASMC_DEBUG make
option"), the various NOTES files should list all available options.
Since vt_efifb is supported also on i386, add it back to x86/NOTES
instead of amd64/NOTES.
Fixes: f224591746 ("Add ASMC_DEBUG make option")
Sponsored by: The FreeBSD Foundation
Found these changes by chance in an old patch file. Should have been
committed along with the ps(1) modifications done in March 2025.
No functional change (intended).
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
As reported on the freebsd-announce mailing list[1] FreeBSD is
continuing to retire 32-bit support. Remove powerpcspe from boot test
tools.
[1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: jhibbits, emaste
Pull request: 698d3c98d8f5814f705908d5bc6d930e3d4c4eda
Only fairly recent GCC versions support and sys/_types.h must work with
quite old compilers and without sys/cdef.h being included. The prior
workaround works fine, but we can have the same effect with compiler
macro definitions. In this specific case, compilers that define the
__intcap_t builtin type will define __SIZEOF_INTCAP__.
This reverts commit 029a09f180
This reverts commit 19728f31ae
Reviewed by: imp, des, kib, emaste
Effort: CHERI upstreaming
Fixes: 85ab981a8e ("sys/_types.h: define fallback __(u)intcap_t")
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D54009
Replace a collection of aliasing violations and ifdefs with memset
(which now expands to __builtin_memset and should be quite reliably
inlined.) The old code is hard to maintain as evidenced by the most
recent change to if_pkt_info_t updating the defines, but not the zeroing
code.
Reviewed by: gallatin, erj
Effort: CHERI upstreaming
Sponsored by: Innovate UK
Fixes: 43d7ee540e ("iflib: support for transmit side nic KTLS offload")
Differential Revision: https://reviews.freebsd.org/D54605
Compute the cutoff at compile time instead which will avoid the need
for a CHERI case.
Correct the comment about CACHE_PATH_CUTOFF. It dates to 5.2.0 not 4.4
BSD. Historic values are:
32 - introduced (c2935410f6)
35 - NUL terminated and bumped (5d5c174869)
39 - sized to alignment (bb48255cf5)
45 - bumped to improve efficency on 64-bit (3862838921)
No functional change.
Reviewed by: markj
Suggested by: jhb
Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D54554
Previously, this was underaligned on CHERI system where pointers are
larger than time_t.
Use the alignment of struct namecache_ts which picks up time_t via strut
timespec and pointers via struct namecache. This arguably overaligns
cache_zone_small and cache_zone_large on i386 kernels, but I suspect the
actual microarchitectures most i386 binaries are run on do better with
64-bit alignment.
Reviewed by: olce, markj
Effort: CHERI upstreaming
Sponsored by: Innovate UK
Fixes: cf8ac0de81 ("cache: reduce zone alignment to 8 bytes")
Differential Revision: https://reviews.freebsd.org/D54376
Extend the FreeBSD OFED build framework to include the Broadcom bnxtre RDMA
provider library.
This change:
-Registers libbnxtre in src.libnames.mk so it is built and installed as part
of the OFED libraries.
-Adds bnxtre to the OFED pcap dependency set when MK_OFED is enabled.
-Declares proper dependency mappings for bnxtre (ibverbs, pthread).
-Introduces LIBBNXTREDIR for consistent object directory handling.
-Updates libibverbs and librdmacm build rules to link against libbnxtre,
enabling Broadcom RoCE device support at runtime.
-libbnxtre library uses below constructor to register with the libibverbs,
static attribute((constructor)) void bnxt_re_register_driver(void)
These updates ensure that applications using libibverbs and librdmacm can
discover and use Broadcom bnxt RDMA devices on FreeBSD.
Reviewed by: markj, ssaxena
Differential Revision: https://reviews.freebsd.org/D54368
MFC after: 3 days
The commit message has to be rewritten as it is not clear and lacks
some key details about the change.
This reverts commit 35dd53a9e1.
Reported by: jrtc27
The driver and applications currently use hard-coded numeric ioctl command
opcodes. These opcodes are interpreted as having the IOC_IN direction (data
copied from the user application to the driver), regardless of the actual packet
size. Consequently, when the packet size is zero and the direction is set to
IOC_IN, the kernel fails these ioctls if COMPAT is disabled.
While the driver and applications should ideally set the direction correctly—
for example, using IOC_VOID when the packet size is zero—the driver will now
be updated to define ioctl opcodes using the _IOC macro to support both
IOC_VOID and IOC_IN. This change ensures backward compatibility with older
applications that exclusively use IOC_IN.
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D54601
MFC after: 3 days
Remote stray "-r" from the example of installing a toolchain
to alternate root.
Reviewed by: ivy
Differential Revision: https://reviews.freebsd.org/D54611
The default shell for root has been changed to sh(1) followup changing
in release images sh(1) the shell for the "freebsd" user.
MFC After: 1 week
Reviewed by: manu, emaste (re)
Approved by: manu, emaste (re)
Differential Revision: https://reviews.freebsd.org/D54602
These are sample dtrace scripts that likely need to be modified for
whatever problem you are chasing. Unfortuneately, you have to read the
driver extensively to understand them or how to use them. But studying
the completion routine of mpr/mps will help understand many of the error
and recovery paths.
Sponsored by: Netflix
cam::mpr:complete(union ccb *, struct mpr_command *, u_int, u32);
Where u_int is scsas->flags u32 is the device_info.
This can't be done as an fbt because the data needed for it isn't
present out a function boundary.
Sponsored by: Netflix
cam::mps:complete(union ccb *, struct mps_command *, u_int, u32);
Where u_int is scsas->flags u32 is the device_info.
This can't be done as an fbt because the data needed for it isn't
present out a function boundary.
Sponsored by: Netflix
Replace bzero with the equivalent memset(x,0,x) since the latter is
available in the kshim environment and we have a soft goal of migrating
to standard interfaces when there's a reason...
Sponsored by: Netflix
When an NFSv4.n client specifies settings for the archive,
hidden and/or system attributes during a Open/Create, the
Open/Create fails for ZFS. This is caused by ZFS doing
a secpolicy_xvattr() call, which fails for non-root.
If this check is bypassed, ZFS panics.
This patch resolves the problem by disabling va_flags
for the VOP_CREATE() call in the NFSv4.n server and
then setting the flags with a subsequent VOP_SETATTR().
This problem only affects FreeBSD-15 and main, since the
archive, system and hidden attributes are not enabled
for FreeBSD-14.
I think a similar problem exists for the NFSv4.n
Open/Create/Exclusive_41, but that will be resolved
in a future commit.
Note that the Linux, Solaris and FreeBSD clients
do not set archive, hidden or system for Open/Create,
so the bug does not affect mounts from those clients.
PR: 292283
Reported by: Aurelien Couderc <aurelien.couderc2002@gmail.com>
Tested by: Aurelien Couderc <aurelien.couderc2002@gmail.com>
MFC after: 2 weeks
Required when KTR is configured.
Remove the pcpu.h include while here, as it seems to be unneeded.
Reported by: Jenkins
Fixes: 5f13d6b607 ("vmm: Move common accessors and vm_eventinfo into sys/dev/vmm")
Now that struct vm and struct vcpu are defined in headers, provide
inline accessors. We could just remove the accessors outright, but they
don't hurt and it would result in unneeded churn.
As a part of this, consolidate definitions related to struct
vm_eventinfo as well. I'm not sure if struct vm_eventinfo is really
needed anymore, now that vmmops_run implementations can directly access
vm and vcpu fields, but this can be resolved later.
No functional change intended.
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53586
Now that the machine-independent fields of struct vm and struct vcpu are
available in a header, we can move lots of duplicated code into
sys/dev/vmm/vmm_vm.c. This change does exactly that.
No functional change intended.
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53585
There is quite a lot of duplication of code between amd64, arm64 and
riscv with respect to VM and vCPU state management. This is a bit
tricky to resolve since struct vm and struct vcpu are private to vmm.c
and both structures contain a mix of machine-dependent and
machine-independent fields.
To allow deduplication without also introducing a lot of churn, follow
the approach of struct pcpu and 1) lift the definitions of those
structures into a new header, sys/dev/vmm/vmm_vm.h, and 2) define
machine-dependent macros, VMM_VM_MD_FIELDS and VMM_VCPU_MD_FIELDS which
lay out the machine-dependent fields.
One disadvantage of this approach is that the two structures are no
longer private to vmm.c, but I think this is acceptable.
No functional change intended. A follow-up change will move a good deal
of machine/vmm/vmm.c into sys/dev/vmm/vmm_vm.c.
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53584
Support configuring MTU for the SLIRP net backend, for example:
-s 1:0,virtio-net,slirp,mtu=2048,open
Update the manual page accordingly. While here, also document
MAC address configuration.
Reviewed by: markj
Approved by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D54133
Remove the width modifier to remove white space padding
added to "description" field when running
`sesutil --libxo:JP show`.
Reviewed by: asomers
Approved by: asomers (mentor)
MFC after: 1w
Sponsored by: ConnectWise
Differential Revision: https://reviews.freebsd.org/D54536
This commit adds support for a UNIX domain socket to bhyve's remote
framebuffer. It enables the use of the graphical console when the bhyve instance
is running in a jail with no networking, for instance. A VNC client running on
the host can then connect to the UNIX domain socket through the filesystem.
Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Sponsored by: Defenso
Reviewed by: kevans, markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D53814
It breaks suspend/resume and no one has had time to investigate and fix
it.
PR: 291067
Reviewed by: emaste
Fixes: 3deb21f1af ("random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM")
Differential Revision: https://reviews.freebsd.org/D54587