Add a scroll-to-mouse command for copy mode to scroll to the mouse
position and bind to the scrollbar, brings the scrollbar keys into line
with the other mouse keys. From Michael Grant, GitHub issue 4731.
On kernels compiled for both 88100 and 88110, replace the CPU_IS881[01]0
logic to no longer check the cputyp variable, but directly check bits in the
processor identification register; loading this value produces faster and
smaller code than accessing memory, and the compiler can be instructed that
the value is a constant.
vmm(4): don't return EIO from ioctl(2) on vcpu halt.
In the current design, if a vcpu halts without interrupts enabled,
the vcpu run loop returns EIO. This was then being returned as the
result of the ioctl(2) call, which is incorrect. The VMM_IOC_RUN
ioctl is successful and this isn't an error condition. vmm(4) already
associates this vcpu state with vcpu termination and communicates
this to vmd(8) in the returned vcpu state.
This is observed primarily by Linux guests that, due to vmd(8) not
emulating an ACPI method to power off, the kernel disables interrupts
and halts the cpu. vmd(8) ends up logging some noise because of the
EIO return value.
ok mlarkin@
Implement a per-peer pending prefix queue and lookup table and
a pending attribute queue and lookup table.
Withdraws just end up in the peer pending withdraw prefix queue.
For updates the prefix is queued on a pending attribute entry, which
itself is queued on the peer pending update queue.
For updates this allows to aggregate multiple prefixes into a single
UPDATE message.
All prefixes are also stored in the per-peer lookup table and this table
is checked before adding an entry. If the object already exists the prefix
is first dequeued and the requeued at the tail of its queue.
pend_prefix_add() is therefor a bit fiddly.
Similar all attrs are added to the per-peer attribute lookup table and this
is used to locate the update queue where the prefix is queued on.
Once queued an attr is not requeued to ensure updates are sent in FIFO order.
If the attr pointer in struct pend_prefix is NULL then it is a withdraw.
[8 lines not shown]
Push `pageqlock' dances inside uvm_page{de,}activate() & uvm_pagewire().
Tested during multiple bulks on amd64, i386, arm64 and sparc64 by jca@,
phessler@ and sthen@.
use an smr crit section instead of real iface refs in the uRPF check
the uRPF tries to use interface indexes, but if the index doesnt
match it'll resolve to a real interface and do an IFT_CARP and
carpdev index check.
it's easy to do this lookup from an smr crit section and avoid the
refcnt ops.
use an smr crit section instead of real interface refs in pf_match_rcvif
this is only used during ruleset evaluation, so it is less hot than
the carpdev resolution done in pf_test, but it's an easy change to
avoid unecessary atomic ops.
use an smr crit section to get the parent of carp interfaces.
pf maps packets "received" on carp interfaces back to the actual
interface it was received on and applies policy to that parent.
eg, if you have carp0 on top of em0, packets destined to the carp0
mac address, the network stack will think that the packets were
received by carp0. pf maps carp0 back to em0 and applies policy on
em0 though.
previously pf used if_get/if_put to do this lookup of the carp
parent, which is a couple of atomic ops on what can be a contended
cacheline for every packet destined for a carp interface. now the
lookup is done in an SMR critical section, against what will
hopefully be a shared cacheline.
replace if_get with if_get_smr in the vlan transmit path.
this mitigates against hammering the parent interface refcnt when
transmitting packets.
this means we call if_enqueue against the parent interface from an
smr critical section rather than calling it while holding a "real"
ref, but aggr has been calling if_enqueue from an smr critical
section for years without issue.
add if_get_smr()
if_get_smr() is like if_get() in that you give it an interface index
and it gives you an ifnet pointer (or NULL), except it doesnt bump
the reference count on the interface. to compensate, you can only
use it inside an SMR critical section.
the good news is that the ifidxmap map and ifnet lookups are already
done using SMR, so this is an extremely trivial change.
the benefit of this is that you can avoid the atomic operations on
a shared variable (the ifnet refcnt) when using an interface in an
smr critical section.
Do not crash when calling freeaddrinfo(NULL)
Supported by Linux since at least 1997, and FreeBSD since 2017. While
not defined, there's no real good reason to crash when we could just
cope. Indeed, software out there relies on the Linux behavior.
Point out in the manpage that the behavior of getaddrinfo(NULL) isn't
defined and thus isn't portable.
Edge case spotted recently by kn@ in OpenVPN.
ok millert@ djm@ deraadt@ kn@
Setting working directory after fork means there is a race with
pane_current_path (especially on platforms with systemd which have to
take time to do some additional faffing around). To avoid this, change
it before fork and back in the parent afterwards. GitHub issue 4719.