Age | Commit message (Collapse) | Author |
|
The given set of fds are converted to equivalent kevents using EV_SET(2)
and passed to the scanning internals of kevent(2): kqueue_scan().
ktrace(1) will now output the converted kevents on top of the usuals set
bits to be able to find possible error in the convertion.
This switch implies that poll(2) and select(2) will now query underlying
kqfilters instead of the *_poll() routines. An increase in latency is
visible, especially with UDP sockets and NET_LOCK()-contended subsystems
and will be addressed in next steps.
Based on similar work done on MacOS and DragonFlyBSD with inputs from
visa@, millert@, anton@, cheloha@, thanks!
Tested by many, thanks!
ok claudio@, bluhm@
|
|
OK todd@, mvs@, kn@
|
|
and returned the error, which made the MI crypto code set the etype for
a second time. We still have to set etype after calling the MD process
function, as the callers of crypto_invoke() still expect error handling
to be shown through the etype. But at least now all MD crypto code does
not have to worry about that anymore. Once the callers are changed to
not look at etype anymore, we can get rid of it completely.
ok tobhe@
|
|
From gerhard@
|
|
|
|
|
|
The filterops instances already provide f_modify and f_process
callbacks with proper internal locking. Locking of socket klists
has been the missing detail for MP-safety.
OK mpi@
|
|
Add the missing f_modify and f_process callbacks so that pipe_lock
serializes pipe knote handling. As pipe klist locking is already in
place, pipe event filters should now be MP-safe.
This uses write locking everywhere in the callbacks for simplicity.
There is not much multiple-readers parallelism to utilize.
OK mpi@ anton@
|
|
ok semarie@
|
|
the mbuf, the callers must be careful. Although there is no bug,
use the common pattern to handle this. Pass down an mbuf pointer
mp and let m_pullup() update the pointer in all callers.
It looks like the tcp signature functions should not be called.
Avoid an mbuf leak and return an error.
OK mvs@
|
|
Retrieve ilen and olen from crypto descriptors before freeing them.
Found by regress/sys/netinet/ipsec.
OK mpi@
|
|
NULL instead of '0'.
ok deraadt@
|
|
uvm_vnp_uncache() in tmpfs_write() when a file grows in size. This
is not enough. We need to invalidate UVM's cache of the vnode every
time the contents of the vnode are modified. Failure to do so might
lead to inconsistencies between read/mmap consumers.
From Pedro Martelletto
|
|
VFS_LOOKUP(dir, &parent) in a loop and looks up the parent directory
".." repeatedly. VFS_LOOKUP is expected to unlock 'dir' and return
'parent' locked.
So tmpfs_lookup() is called for ISDOTDOT and:
- runs with dvp = dir, vpp = &parent
- gets parent from tmpfs_vnode_get() and
- re-locks dir with vn_lock(dvp)
but skips the call to
VOP_UNLOCK(dvp);
on return because *vpp == dvp
The reason for doing so is the lookup for ".". In this case
tmpfs_lookup() just increases the reference on dvp and copies the
pointer:
*vpp = dvp; vref(dvp);
However, in our case we also have *vpp == dvp, but for a different
lookup (ISDOTDOT), so we must do the unlock.
From markus@
|
|
Some modern tpm2 devices require or prefer drivers communicate via
the CRB interface and not the TIS/fifo interface. This change adds
basic support for detecting CRB start mode and using CRB to issue
commands required for proper S4 hibernation. As a result, this also
defines a new struct definition for the TPM2 acpi table required
for start mode detection.
This fixes recent S4 regressions on the Surface Go 2 caused by a
change in firmware from Microsoft.
Other CRB start methods may need implementing in the future to
support additional hardware.
tested by deraadt@ and many others, ok kettenis@
|
|
adds unnecessary complexity. Dedicated crypto offloading devices are not common
anymore. Modern CPU crypto acceleration works synchronously, eliminating the need
for callbacks.
Replace all occurrences of crypto_dispatch() with crypto_invoke(), which is
blocking and only returns after the operation has completed or an error occured.
Invoke callback functions directly from the consumer (e.g. IPsec, softraid)
instead of relying on the crypto driver to call crypto_done().
ok bluhm@ mvs@ patrick@
|
|
Reported by Peter J. Philipp.
OK mpi@
|
|
|
|
is created. Annotate them accordingly.
OK mpi@
|
|
For now, only assert that the tree of pages is empty in uvm_obj_destroy().
This will soon be used to free the per-UVM object lock.
While here call uvm_obj_init() when new vnodes are allocated instead of
in uvn_attach(). Because vnodes and there associated UVM object are
currently never freed, it isn't easy to know where/when to garbage
collect the associated lock. So simply check that the reference of a
given object is 0 when uvn_attach().
Tested by many as part of a bigger diff.
ok kettenis@
|
|
This is a guard against pushing the lock too far in UVM's vnode land.
ok beck@
|
|
data. Also add the MAC address to the nvram data when there is a
"local-mac-address" property in the device tree. This makes bwfm(4) work
with the firmware/nvram/clm_blob files provided with MacOS on the Apple
M1 Macs.
ok patrick@
|
|
OK @mpi
|
|
OK tobhe@
|
|
The logic to emulate the current poll/select behavior is better implemented
at the syscall layer and not in the kqueue backend.
Discussed with deraadt@, ok anton@
|
|
This is a change of behavior and events wont be generated if there
is something to read on the fd. Only EV_EOF or NOTE_OOB will now
be reported.
While here a new filter for FIFOs supporting EV_EOF and __EV_HUP.
ok visa@
|
|
that support Energy Efficient Ethernet when connected to a switch that
also supports Energy Effient Ethernet. For example on the odroid-hc4.
ok patrick@
|
|
algorithm is gone. Reomve all LZS references from the tree. The
v42bis in isakmpd also looks unsupported.
OK mvs@ patrick@ sthen@
|
|
|
|
fix a GMA600 id while here
|
|
ok tb@
|
|
In preparation for implementing select(2) on top of kqueue.
ok mpi@
|
|
keyboard attached and /etc/kbdtype being present. The advertised
encoding of a wsmux is a bit fragile as the last attached device will
dictate it. If this happens to be a ucc keyboard, KB_US will always be
the advertised encoding as its encoding is immutable and /etc/kbdtype is
ignored.
Instead, do not advertise the encoding for ucc devices when the parent
mux queries its attached devices. However, asking the device directly
(i.e. bypassing the mux) still returns the encoding as wsconsctl(8)
would otherwise report an error.
Thanks to landry@ for the report and testing.
|
|
|
|
not reachable because all callers had set the CRYPTO_F_NOQUEUE flag.
ok patrick@ mvs@ bluhm@
|
|
makes interrupts work with Parallels on the Apple M1.
Tested by patrick@ on Ampere eMAG and MacchiatoBin
Tested by fkr@ on Pinebook Pro
ok kettenis@
|
|
access garbage collector data.
This is the next step to make UNIX domain sockets locking fine grained.
This also moves M_WAIT/M_WAITOK allocations out from `unp_lock' rwlock(9).
The lock order between fdplock() and `unp_lock' changed and now fdplock()
should be taken first. This was not required, but helps to mpi@'s knote(9)
related work.
ok bluhm@
|
|
|
|
|
|
the asynchronous crypto API which makes progress in MP difficult.
The hardware is rarely available. They support only obsolete crypto
algorithms. Scheduling crypto tasks via PCI is probably slower
than the CPU, especailly as modern CPUs have their own accelerators.
|
|
correct parent. So far we were directly calling some ampintc(4) code, which
is fine for regular hardware. With Parallels on the Apple M1, ampintcmsi(4)
is combined with agintc(4), which is quite a surprise. Luckily both types of
interrupt controllers use the same API for passing interrupt information, so
we can craft one structure and both ampintc(4) and agintc(4) will happily work
with it.
ok kettenis@
|
|
vfs stalling is used by suspend/resume and by vmt(4) to stall any
filesystem operation from altering the state on disk. All these
operations will call vn_lock and be stalled. Adjust vfs_stall_barrier()
to allow the lock owner to still progress so that suspend can sync
the filesystems after stalling vfs operation.
OK mpi@
|
|
ok bluhm@
|
|
From Douglas Anderson
a7b45024f66f9ec769e8dbb1a51ae83cd05929c7 in linux 5.10.y/5.10.75
97794170b696856483f74b47bfb6049780d2d3a0 in mainline linux
|
|
(both kernel and userland bits)
GENERIC + VFSLCKDEBUG is broken with it.
|
|
This flag is currently used to mark or unmark a vnode to actively
check vnode locking semantic (when compiled with VFSLCKDEBUG).
Currently, VLOCKSWORK flag isn't properly set for several FS
implementation which have full locking support. This commit enable
proper checking for them too (cd9660, udf, fuse, msdosfs, tmpfs).
Instead of using a particular flag, it directly check if
v_op->vop_islocked is nullop or not to activate or not the vnode
locking checks.
ok mpi@
|
|
use VOP_LOCK / VOP_UNLOCK wrappers.
VOP_LOCK() is prefered over vn_lock() here in order to keep equivalent code.
ok mpi@ visa@ (as part of larger diff)
|
|
ok mpi@ visa@ (as part of larger diff)
|
|
ok mpi@
|
|
From Leslie Shi
621ddffb70db824eabd63d18ac635180fe9500f9 in linux 5.10.y/5.10.74
66805763a97f8f7bdf742fc0851d85c02ed9411f in mainline linux
|