Age | Commit message (Collapse) | Author |
|
ok kettenis
|
|
not be allowed upon immutable memory, instead return EPERM.
Some of these ops are not destructive in OpenBSD, but they are destructive
on other systems, so we take the "all ops" are illegal approach.
Related to this, it should not be allowed to minherit(MAP_INHERIT_ZERO)
immutable regions, or vice versa, calling mimmutable() upon MAP_INHERIT_ZERO
regions, because such a range will be zero'd post-fork in the child.
These now also return EPERM.
Adjusting the madvise / msync behaviour upon immutable memory brings us
closer to the behaviour of the mimmutable clone "mseal" being proposed by
google for inclusion in Linux.
ok kettenis
|
|
ok jsg@
|
|
|
|
|
|
|
|
Since inpcb tables for UDP and Raw IP have been split into IPv4 and
IPv6, assert that INP_IPV6 flag is correct instead of checking it.
While there, give the table variable a nicer name.
OK sashan@ mvs@
|
|
|
|
mutable mapping is not working right, so temporarily bring back the
RW -> R *only* for ramdisk kernels
|
|
MAXDSIZ was cranked to 128GB back in April 2023, but vmd(8) was limiting
VM RAM size to the old value (32GB).
|
|
chrome v8_flags variable's placement in bss, and as a workaround made
it possible to demote a mimmutable mapping's permissions from RW to R.
Further mimmutable-related work in libc's malloc created the same
problem, which led to a better design: objects could be placed into
.openbsd.mutable region, and then at runtime their permission and
immutability could be manipulated better. So the RW to R demotion
logic is no longer being used, and now this semantic is being deleted.
ok kettenis
|
|
been deleted.
|
|
distinguish between them. Pay attention to the apple,dma-range property
that tells us the desired DVA window. Add support for a new BUS_DMA_FIXED
that allows use of bus_dmamap_load_raw(9) to map things at a pre-determined
DVA. This last change is needed for the upcoming Apple KMS driver.
Hopefully that is the only driver that will need this, so don't attempt to
turn this into an MI feature.
ok patrick@
|
|
ok mlarkin@, tobhe@
|
|
extent_alloc_region(9) that uses a pre-allocated region descriptor.
ok patrick@
|
|
It has been made redundant by the introduction of pinsyscalls(2) which
handles all system calls, rather than just 1.
|
|
|
|
to assist qwx(4) development. We may remove this code again at some point
in the future.
Multiple Message MSI has some serious design flaws, especially when
combined with the APIC interrupt controller architecture. It was
superseded by MSI-X. Unfortunately qwx(4) does not implement MSI-X.
ok stsp@, deraadt@
|
|
for other generic KMS drivers.
ok jsg@, matthieu@
|
|
ok kettenis
|
|
this solves one probably with an re(4) going away.
|
|
triggered with TCP socket splicing and TSO, and with that fixed, it
works reliably.
tested by hrvoje, jan@, mbuhl@, bluhm@, feedback from jan@ and bluhm@,
ok jan@ mbuhl@ bluhm@
|
|
Many functions for IPv4 call their IPv6 counterpart if INP_IPV6 is
set at the socket's pcb. By using the generic API consistently,
the logic is not in the caller it gets more readable.
OK mvs@
|
|
This approach does not work as LIST_NEXT() of a removed element
does not return NULL. I causes a crash in syzcaller and triggers
kernel diagnostic assertion "vp->v_uvcount == 0" in sys/kern/kern_unveil.c
line 845 during reboot. Unfortunately the backout brings back the
race in fill_file() and fstat(1) may crash the kernel.
Reported-by: syzbot+54fba1c004d7383d5e85@syzkaller.appspotmail.com
|
|
OK bluhm@ mvs@
|
|
|
|
socket types protected. The netlock is still used while fill_file()
called through *table.inpt_queue walkthroughs, but this is the inet
sockets case.
ok bluhm
|
|
ok bluhm
|
|
|
|
|
|
argument. Unused in the function itself as we define away
sysfs_remove_bin_file().
|
|
to be smaller than the mapping. Record which memory segments are backed by
vnodes while walking the uvm map and later suppress EFAULT errors caused
by the underlying file being truncated. okay miod@
|
|
check earlier, the pinsyscall(SYS_execve mechanism has become redundant.
It needs to be removed delicately since ld.so and static binaries use it.
As a first step, neuter the checking code in sys_execve(). Further steps
will follow slowly.
ok kettenis
|
|
|
|
Thanks to the OpenBSD Foundation for sponsoring this work.
|
|
the main program or ld.so, and accept a submission of that information
for libc.so from ld.so via pinsyscalls(2). At system call invocation,
the syscall number is matched to the specific address it must come from.
ok kettenis, gnezdo, testing of variations by many people
|
|
ok stsp@
|
|
ok tobhe@
|
|
list walkthroughs have context switch within, so make exit1() wait
until the last reference released.
Reported-by: syzbot+0e9dda76c42c82c626d7@syzkaller.appspotmail.com
ok bluhm claudio
|
|
for the original 13" M1 MacBook.
ok mlarkin@
|
|
uses an rwlock and curproc isn't initialized yet for these CPUs at this
point. As a result we hit a "locking against myself" panic if there is
any lock contention.
Fix this by adding a new ci_midr member to struct cpu_info which gets
initialized when we identify the CPUs and use that to attach the kstat
stuff.
ok tobhe@, dlg@
|
|
indicated by writing 0 to the 5 bit 'BD count' field in the first slot.
Accordingly, mask the value we're writing there.
Each packet uses one slot for offload information and then one per DMA
segment, which means the maximum number of DMA segments must be 31 rather
than 32. Trying to send a packet using 33 slots makes the nic firmware
very upset.
ok dlg@
|
|
The virtio spec says a driver "should" wait for a device to report
a clear device status after performing a reset. In some hypervisors,
this doesn't matter as the vcpu's io instruction emulation and
virtio network device emulation happen serially in the same thread.
In hypervisors like vmd(8), device reset happens asynchronously and
the driver can't assume the device is ready.
This race condition results in mbuf pool corruption, causing panics.
Bug reported and reproduced by bluhm@. Root cause found and diff
from sf@. ok dv@ and committed on sf@'s behalf with his permission.
|
|
In the near future, we will add support for destroying clockintr
objects. When this happens, it will no longer be safe to dereference
the pointer to the expired clockintr during the dispatch loop in
clockintr_dispatch() after reentering cq_mtx. This means we will not
be able to safely check for the CLST_IGNORE_REQUESTS flag.
So replace the CLST_IGNORE_REQUESTS flag in cl_flags with the
CQ_IGNORE_REQUESTS flag in cq_flags. The semantics are the same.
Both cl_flags and cq_flags are protected by cq_mtx.
Note that we cannot move the CLST_IGNORE_REQUESTS flag to cr_flags in
struct clockrequest: that member is owned by the dispatching CPU and
is not mutated with atomic operations.
|
|
Nothing outside of the _KERNEL guard in <sys/sched.h> needs
<sys/queue.h>, so move its inclusion under _KERNEL.
Requested by claudio@.
Link: https://marc.info/?l=openbsd-tech&m=169937494818685&w=2
ok claudio@
|
|
struct schedstate_perpcu contains struct clockintr pointers. struct
clockintr is not defined in userspace, so move schedstate_percpu into
the _KERNEL guard to hide it from userspace. Nothing in base userspace
uses schedstate_percpu.
Thread: https://marc.info/?l=openbsd-tech&m=169861224916185&w=2
ok claudio@ millert@
|
|
the "platform" interfaces to stash away the bits of fdt_attach_args that
we need later on instead of referencing it directly. This makes those
interfaces usable after attach time.
ok jsg@
|
|
|
|
Sending UDP packets via datagram socket is MP safe now. Same applies
to raw IPv4 and IPv6, and divert sockets. Switch sosend() from
exclusive net lock to shared net lock in combination with per socket
lock. TCP and GRE still use exclusive net lock.
tested by otto@ and florian@
OK mvs@
|
|
If the server doesn't close the socket immediately and starts waiting
for the client to reconnect, then the TCP connection will remain open.
The client will have to wait for the connection to be closed in order
to reconnect with the same source port; this never happens, resulting
in a freeze until the file system is umounted.
This change fixes Linux NFS clients freezing after 5 min of inactivity.
ok miod, help from claudio
|