arm64: Have a common call to userret
Rather than each exception calling userret use a common copy. As
syscallret already calls userret we need to skip it in that case.
Reviewed by: kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55250
LinuxKPI: Clear the sbuf at the start of each call to seq_read
Each invocation of seq_read invokes the seq_file.show callback which
writes into the sbuf. Then it invokes sbuf_finish before copying the
data into the caller's buffer. Without this, a second call to
seq_read on the same file would try to append data to a finished sbuf.
Reviewed by: bz
Sponsored by: AFRL, DARPA
virtio: Ensure power-of-two alignment for indirect queue
Some platforms enforce power-of-two alignment for bus_dma tags. Rounding up
the natural size may result in over-alignment, but should be safe.
PR: 293770
Reviewed by: andrew
Fixes: c499ad6f997c ("virtio: Use bus_dma for ring and indirect buffer allocations")
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55843
if_bridge(4): don't sleep under epoch(9) in destruction
bridge tries to run callout_drain(9) twice under epoch
during destruction.
once for bridge_timer, which is not required to be under epoch.
second time for the BSTP callout, which is already disabled
earlier inside bridge_delete_member.
Reviewed by: glebius, zlei
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D55876
pmcstat: Implement PMC_CAP_SYSWIDE
Implement the PMC_CAP_SYSWIDE capability flag in the same manner as the
PMC_CAP_DOMWIDE flag. This flag was previously introduced along side
the domain wide flag, but is yet to be used anywhere.
Reviewed by: mhorne
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/2075
libpmc: Query hwpmc for caps
This change allows for fine-grained capabilities per counter index. This
is particularly useful for AMD where subclasses are not exposed to the
general PMC code, but other architectures also have asymmetric behaviors
when it comes to specific counter indices.
A new PMC_OP_GETCAPS op is added to the hwpmc(4) ioctl interface.
Reviewed by: mhorne
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/2058
jevents: include file path in whitelist error message
A small enhancement.
Reviewed by: Ali Mashtizadeh <ali at mashtizadeh.com>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55830
nfs_nfsdserv.c: Fix handling of archive flag for mkdir
An NFSv4.1/4.2 client can set/clear the archive, hidden
and system flags when creating non-regular files, such
as directories.
Without this patch, the setting of va_flags causes an
EPERM failure, since they are specified for VOP_MKDIR(),
VOP_MKNOD() and VOP_SYMLINK().
This patch sets va_flags == VNOVAL for the above VOP_xxx()
calls and then sets/clears the flags after creation,
which fixes the problem.
This bug only affects the Windows NFSv4.1/4.2 client.
PR: 293691
Tested by: Dan Shelton <dan.f.shelton at gmail.com>
MFC after: 2 weeks
vm_fault: expand KASSERT message in vm_fault_populate_cleanup
Include index values and object pointer in the diagnostic
to improve debugging of pindex mismatches.
No functional change.
Signed-off-by: Isa Isoux <isa at isoux.org>
Reviewed by: kib, pouria
Pull Request: https://github.com/freebsd/freebsd-src/pull/2038
queue.h: Reorder STAILQ_INSERT_TAIL
The current implementation briefly violates the tail invariant. This
is not usually an issue, but if an insert is in flight when a panic
occurs, we may then trip the invariant while dumping core.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: obiwac, olce, jhb
Differential Revision: https://reviews.freebsd.org/D55819
nvme: Replace bus_space_[read|write]_4 with bus_[read|write]_4
The goal this change is to remove the use of the tag and handle
needed by bus_space_[read|write]_4.
Fixes: b3d9e5013f3e5 (Don't active memory space)
Requested by: jhb
Reviewed by: gallatin, imp, jhb, jrtc27
Differential Revision: https://reviews.freebsd.org/D55818
nvme: Removed unused 'regs' variable
The private struct has a 'regs' member that's only written to
and otherwise unused. This change removes it.
Fixes: b3d9e5013f3e5 (Don't active memory space)
Requested by: jhb
Reviewed by: imp, jhb, jrtc27
Differential Revision: https://reviews.freebsd.org/D55817
ifnet: Remove unreachable code
The ioctls SIOCSIFVNET and SIOCSIFRVNET are for userland only. For
SIOCSIFVNET, if_vmove_loan(), the interface is obtained from current
VNET. For SIOCSIFRVNET, if_vmove_reclaim(), a valid child prison is
held before getting the interface. In both cases the VNET of the
obtained interfaces is stable, so there's no need to check it.
No functional change intended.
Reviewed by: glebius, jamie (for #jails)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D55828
ifnet: Fix decreasing the vnet interface count
It should be decreased only when the interface has been successfully
removed from the "active" list.
This prevents vnet_if_return() from potential OOB writes to the
allocated memory "pending".
Reviewed by: kp, pouria
Fixes: a779388f8bb3 if: Protect V_ifnet in vnet_if_return()
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D55873