random: Have RANDOM_PURE_START be a cross-platform source
and one that will be with us in the long-term future.
(this helps reduce diffs in the future and for down-stream users
that trim entropy sources). Also, move deprecated (removed in 16.0)
sources to the bottom of the list to reduce changes to 15.x.
Reviewed by: glebius
Obtained from: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D53311
(cherry picked from commit 9f3886347c1750cf80a82314470fc7186088eb9a)
pathconf: Define a new name called _PC_CASE_INSENSITIVE
Some FreeBSD file systems (msdosfs and optionally ZFS)
handle case insensitive file name lookup.
NFS (v3 and 4) provide an attribute to indicate this
capability, but without this patch, the NFS server does
not know if the file system does support this.
This patch adds the pathconf name_PC_CASE_INSENSITIVE
that can be used by the NFS server or user programs to
check for this feature.
(cherry picked from commit d6864221d88425a079f76ca106f30812c671ca9a)
random: Have RANDOM_PURE_START be a cross-platform source
and one that will be with us in the long-term future.
(this helps reduce diffs in the future and for down-stream users
that trim entropy sources). Also, move deprecated (removed in 16.0)
sources to the bottom of the list to reduce changes to 15.x.
Reviewed by: glebius
Obtained from: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D53311
virtio: Fix polling in virtqueue_dequeue()
The access of vq->vq_ring.used->idx needs to be volatile-qualified,
otherwise the compiler may optimize virtqueue_poll() into an infinite
loop if there is no data available upon the first poll.
Prior to commit ad17789a8569 this wasn't a problem since an external
function call after each poll inhibited the optimization.
Approved by: re (cperciva)
PR: 289930
MFC after: 3 days
Sponsored by: Klara, Inc.
Fixes: ad17789a8569 ("virtio: Remove the unused poll method")
(cherry picked from commit f999ffdce3813eb946f10999ccffb8275c324469)
(cherry picked from commit 72c76047541ab6cc0e989a74e8de4d6e6a1a94b6)
release: Add WITHOUT_QEMU to IMAKE
We have NO_ROOT here, so we need WITHOUT_QEMU to avoid problems.
15.0 candidate.
Reviewed by: emaste, markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53637
sh: Implement simple parameter expansion in PS1 and PS2
This change follows a localized approach within getprompt() and avoids
full parser reentry. While this means we don't support advanced
expansions like ${parameter#pattern}, it provides POSIX-compliant basic
parameter expansion without the complexity of making the parser
reentrant. This is sufficient for the vast majority of use cases.
PR: 46441
bsd-family-tree: Re-center OpenBSD line
Commit 09aeca28dd75 ("BSD family tree: reduce OpenBSD-NetBSD crowding")
moved OpenBSD releases over 2 spaces. Move the line through OpenBSD
releases over as well.
Reviewed by: obrien
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53635
if_vxlan: fix byteorder of source port
Fix the htons byteorder of vxlan packets after
`vxlan_pick_source_port` picks a source port during encapsulation.
Reviewed by: zlei, kp, adrian
Differential Revision: https://reviews.freebsd.org/D53022
(cherry picked from commit 1cc316727ebae157b3d035d9fb1ad38310a80698)
mpr.4: Remove Broadcom LSI 3908 from support list
"This one is my fault due to incorrect merging" ~ziaee
MFC after: 3 days
Reviewed by: ziaee
Fixes: 744c8d554453 (mpr.4: Add Broadcom LSI 3808)
Differential Revision: https://reviews.freebsd.org/D53634
sh tests: Fix racy test11.0
This was sometimes exiting while the child fifo was created resulting in
[ENOTEMPTY] from rm. The child fifo isn't needed, just sleep.
PR: 290837
Fixes: e31fb97148f ("read builtin: Empty variables on timeout")
MFC after: 3 days
tcp: improve comments in the syncache code
Add a comment explaining why syncache entries are dropped and fix a
typo in a comment.
Reviewed by: rrs, glebius
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D53564
vmm: Fix a deadlock between vm_smp_rendezvous() and vcpu_lock_all()
vm_smp_rendezvous() invokes a callback on all vCPUs, blocking the
initiator until all vCPUs have responded. vcpu_lock_all() blocks each
vCPU by waiting for it to go idle and setting the vCPU state to frozen.
These two operations can deadlock on each other, particularly when
booting a Windows guest, when vcpu_lock_all() blocks waiting for a
rendezvous initiator, and the initiator is blocked waiting for the vCPU
thread which called vcpu_lock_all() to invoke the rendezvous callback.
Implement vcpu_lock_all() in a way that avoids deadlocks with
vm_smp_rendezvous(). In particular, when traversing vCPUs, invoke the
rendezvous callback on the vCPU's behalf to help the initiator finish.
We can only safely do so when the vCPU is IDLE or we have already locked
it, otherwise we may be racing with the target vCPU thread. Thus:
- Use an exclusive lock to serialize vcpu_lock_all() callers, which lets
us lock vCPUs out of order without fear of deadlock with parallel
vcpu_lock_all() callers.
- If a rendezvous is pending, lock all idle vCPUs and invoke the
[16 lines not shown]
riscv/vmm: Remove a redundant maxcpu check in vm_alloc_vcpu()
aplic_max_cpu_count() just returns the VM's max vCPU count, and
vm_alloc_vcpu() already checks that. Just remove this check so that
it's easier to merge vm_alloc_vcpu() into MI code.
If the APLIC really does require us to lower the limit, we should
instead adjust vm->maxcpu in vm_create().
No functional change intended.
Reviewed by: br
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53496
(cherry picked from commit 5baa83cfcbd87109dc8a61fbb2e183998cc2d5c5)
virtio: Fix polling in virtqueue_dequeue()
The access of vq->vq_ring.used->idx needs to be volatile-qualified,
otherwise the compiler may optimize virtqueue_poll() into an infinite
loop if there is no data available upon the first poll.
Prior to commit ad17789a8569 this wasn't a problem since an external
function call after each poll inhibited the optimization.
PR: 289930
MFC after: 3 days
Sponsored by: Klara, Inc.
Fixes: ad17789a8569 ("virtio: Remove the unused poll method")
(cherry picked from commit f999ffdce3813eb946f10999ccffb8275c324469)
if_vxlan: fix byteorder of source port
Fix the htons byteorder of vxlan packets after
`vxlan_pick_source_port` picks a source port during encapsulation.
Reviewed by: zlei, kp, adrian
Differential Revision: https://reviews.freebsd.org/D53022
(cherry picked from commit 1cc316727ebae157b3d035d9fb1ad38310a80698)
if_vxlan: fix byteorder of source port
Fix the htons byteorder of vxlan packets after
`vxlan_pick_source_port` picks a source port during encapsulation.
Reviewed by: zlei, kp, adrian
Differential Revision: https://reviews.freebsd.org/D53022
(cherry picked from commit 1cc316727ebae157b3d035d9fb1ad38310a80698)
libcrypto: Install tests in the tests package
libcrypto's Makefile.inc used PACKAGE=openssl, which overrides the
PACKAGE=tests in libcrypto/tests/Makefile. Use PACKAGE?=openssl
instead to avoid this. This puts the OpenSSL tests in the tests
package where they belong.
Approved by: re (cperciva)
MFC after: 1 day
Reviewed by: manu, ngie
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53595
(cherry picked from commit c3b853fe522ead976863af086557be8863327eb0)
(cherry picked from commit 4e672f6ff005412365a0ef8b5fe0ca415e92146a)
BSD family tree: reduce OpenBSD-NetBSD crowding
OpenBSD was nearly against the NetBSD entries, especially in their
earlier lineages. Now line up "OpenBSD" with | at the 'e'.
Reviewed by: gordon (in person)
Differential Revision: https://reviews.freebsd.org/D53509