tangled
alpha
login
or
join now
jcs.org
/
openbsd-src
0
fork
atom
jcs's openbsd hax
openbsd
0
fork
atom
overview
issues
pulls
pipelines
openbsd-src
/
sys
/
kern
/
at
master
107 files
Makefile
The syscall table generation awk script was also used by compat layers in the past, but those compat layers are gone. Remove support for the "config file" ok miod millert
3 years ago
clock_subr.c
Pull in <sys/time.h> for clock_ymdhms bits
9 years ago
dma_alloc.c
all pools have their ipl set via pool_setipl, so fold it into pool_init.
9 years ago
exec_conf.c
Delete the last emulation callbacks: we're Just ELF, so declare exec_elf_fixup() and coredump_elf() in <sys/exec_elf.h> and call them and the MD setregs() directly in kern_exec.c and kern_sig.c
4 years ago
exec_elf.c
Currently we disable kbind(2) for static program from libc.a's preinit hook. Delete that and instead have the kernel disable kbind at exec-time if the program doesn't have an ELF interpreter. For now, permit userland calls to disable it when already disabled so existing static programs continue to work.
3 years ago
exec_script.c
Do not relock fdp in fdrelease(). This prevents unnecessary locking in the common case.
6 years ago
exec_subr.c
Aggressively randomize the location of the stack on all 64-bit architectures except alpha. This will put the stack at a random location in the upper 1/4th of the userland virtual address space providing up to 26 additional bits of randomness in the address. Skip alpha for now since it currently puts the stack at a (for a 64-bit architecture) very low address. Skip 32-bit architectures for now as well since those have a much smaller virtual address space and we need more time to figure out what a safe amount of extra randomizations is. These architectures will continue to use a mildly randomized stack address through the existing stackgap random mechanism. We will revisit this after 7.3 is released.
3 years ago
genassym.sh
ansi
5 years ago
init_main.c
copyright++;
3 years ago
init_sysent.c
sync
3 years ago
kern_acct.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
kern_bufq.c
zap a pile of dangling tabs
3 years ago
kern_clock.c
initclocks: don't reinitialize ticks, jiffies at runtime
3 years ago
kern_clockintr.c
clockintr: add clockintr_cancel_locked()
3 years ago
kern_descrip.c
zap a pile of dangling tabs
3 years ago
kern_event.c
Adjust knote(9) API
3 years ago
kern_exec.c
for process kills due to execve from non-pinned syscall address, export a new AEXECVE bit to acct(4), and print it in lastcomm(8) ok bluhm
3 years ago
kern_exit.c
Add ktrace struct tracepoints for siginfo_t to the kernel side of waitid(2) and __thrsigdivert(2) and teach kdump(1) to handle them. Also report more from the siginfo_t inside PSIG tracepoints.
3 years ago
kern_fork.c
Adjust knote(9) API
3 years ago
kern_intrmap.c
add intrmap_one, some temp code to help us write pci_intr_establish_cpu.
5 years ago
kern_kthread.c
Mark exit1() and sigexit() as non-returning
4 years ago
kern_ktrace.c
Like other ktrace functions make ktruser() callable without kernel lock by takeing the lock around ktrwrite2(). OK miod@ cheloha@
3 years ago
kern_lock.c
Bump __mp_lock_spinout to INT_MAX.
4 years ago
kern_malloc.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
kern_physio.c
Relax the grip the dead hand of QBUS (a.k.a. MAXPHYS) has on the throat of physio().
6 years ago
kern_pledge.c
Make pinsyscall(2) always available for pledged processes. Needed by pledge execpromises, as noted by regress/sys/kern/pledge/execpromise.
3 years ago
kern_proc.c
Add tfind_user(), for getting a proc* given a user-space TID and the process* that it should be part of. Use that in clock_get{time,res}(), thrkill(), and ptrace().
3 years ago
kern_prot.c
setthrname() should return EINVAL, not ENAMETOOLONG, when the input is too long.
3 years ago
kern_resource.c
kernel: stathz is always non-zero after cpu_initclocks()
3 years ago
kern_rwlock.c
Our read/write lock implementation was not fair to writers. When multiple IP forwarding threads were processing packets and holding the shared net lock, the exclusive net lock was blocked permanently. This could result in ping times well above 10 seconds. Add the RWLOCK_WRWANT bit to the check mask of readers. Then they cannot grab the lock if a writer is also waiting. This logic was already present in revision 1.3, but got lost during refactoring. When exiting the lock, there exists a race when the RWLOCK_WRWANT bit gets deleted. Add a comment that was present until revision 1.8 to document it. The race itself is not easy to fix and had no impact during testing. OK sashan@
3 years ago
kern_sched.c
zap a pile of dangling tabs
3 years ago
kern_sensors.c
zap a pile of dangling tabs
3 years ago
kern_sig.c
Reduce indent in single_thread_check_locked() by inverting initial if () check which just returns. OK mpi@
3 years ago
kern_smr.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
kern_srp.c
srp_finalize(9): tsleep(9) -> tsleep_nsec(9)
5 years ago
kern_subr.c
On systems without xonly mmu hardware-enforcement, we can still mitigate against classic BROP with a range-checking wrapper in front of copyin() and copyinstr() which ensures the userland source doesn't overlap the main program text, ld.so text, signal tramp text (it's mapping is hard to distinguish so it comes along for the ride), or libc.so text. ld.so tells the kernel libc.so text range with msyscall(2). The range checking for 2-4 elements is done without locking (because all 4 ranges are immutable!) and is inexpensive.
3 years ago
kern_synch.c
Relax kernel lock assertion within tsleep(9). The `nowake' channel is the special case which doesn't expect wakeup(9), so allow to use it without kernel lock held.
3 years ago
kern_sysctl.c
Move SS_CANTRCVMORE and SS_RCVATMARK bits from `so_state' to `sb_state' of receive buffer. As it was done for SS_CANTSENDMORE bit, the definition kept as is, but now these bits belongs to the `sb_state' of receive buffer. `sb_state' ored with `so_state' when socket data exporting to the userland.
3 years ago
kern_task.c
Revert previous. It was not ok'ed by dlg@.
3 years ago
kern_tc.c
timecounting: remove incomplete PPS support
3 years ago
kern_time.c
Use the nowake channel for sys_nanosleep() instead of handrolling the same. OK cheloha@ jca@ mvs@
3 years ago
kern_timeout.c
timeout: rename "timeout_at_ts" to "timeout_abs_ts"
3 years ago
kern_unveil.c
zap a pile of dangling tabs
3 years ago
kern_uuid.c
Sync enc/dec routines with libc.
11 years ago
kern_watchdog.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
kern_xxx.c
zap a pile of dangling tabs
3 years ago
makesyscalls.sh
Include varags types in sys/syscalls.h comment
3 years ago
sched_bsd.c
kernel: stathz is always non-zero after cpu_initclocks()
3 years ago
spec_vnops.c
zap a pile of dangling tabs
3 years ago
subr_autoconf.c
introduce a new kern.autoconf_serial sysctl that can be used by userland to monitor state changes of the kernel device tree
3 years ago
subr_blist.c
blist: fix a possible blist corruption with blist_alloc() due to unsigned swblk_t on OpenBSD.
3 years ago
subr_disk.c
Remove explicit rejection of zero duid in disk_map() added in 1.262. Spoofed labels have zero duid and there is no reason not to allow them to work with duid notation.
3 years ago
subr_evcount.c
Avoid event counter re-insert in evcount_percpu()
3 years ago
subr_extent.c
zap a pile of dangling tabs
3 years ago
subr_hibernate.c
whitespace
3 years ago
subr_kubsan.c
Use atomic operations consistently while writing to kubsan_slot. Otherwise, reports might go by unnoticed.
6 years ago
subr_log.c
Remove unused device poll functions.
3 years ago
subr_percpu.c
Add a second membar producer into counters_zero(). Now it is symmetric to counters_read(). OK jmatthew@
3 years ago
subr_poison.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
subr_pool.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
subr_prf.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
subr_prof.c
add kprobes provider for dt
4 years ago
subr_suspend.c
Put CPUs in the lowest P-state just before the final suspend step. The firmware probably does this for us on ACPI systems with proper S3 support, but this doesn't happen on systems where we park CPUs in a low-power idle state ourselves.
3 years ago
subr_tree.c
Fix a "copy-and-paste" error that Coverity picked up in the augment code
7 years ago
subr_userconf.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
subr_witness.c
anscestors -> ancestors
4 years ago
subr_xxx.c
Add SMR_ASSERT_NONCRITICAL() in assertwaitok(). This eases debugging because now the error is detected before context switch.
7 years ago
sys_futex.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
sys_generic.c
Unlock select(2), pselect(2), poll(2) and ppoll(2).
3 years ago
sys_pipe.c
Rename pipeselwakeup() to pipe_wakeup(). It doesn't call selwakeup() anymore, so do it to be consistent with similar *wakeup() functions.
3 years ago
sys_process.c
ptrace reads/writes memory using uvm_io, which generates an temporary alias mapping using uvm_map_extract. With xonly now operational, this alias mapping is created with minprot, which for text will be xonly, and the kernel cannot read it (unless the architecture has implied read for exec from kernel pov). Pass UVM_IO_FIXPROT to create the alias with maxprot instead. ok kettenis
3 years ago
sys_socket.c
Move SS_CANTRCVMORE and SS_RCVATMARK bits from `so_state' to `sb_state' of receive buffer. As it was done for SS_CANTSENDMORE bit, the definition kept as is, but now these bits belongs to the `sb_state' of receive buffer. `sb_state' ored with `so_state' when socket data exporting to the userland.
3 years ago
syscalls.c
sync
3 years ago
syscalls.master
Unlock select(2), pselect(2), poll(2) and ppoll(2).
3 years ago
sysv_ipc.c
Remove some includes include-what-you-use claims don't have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels.
11 years ago
sysv_msg.c
semctl1 and msgctl were introduced for binary compatibility for OpenBSD 3.5. They are no longer needed. OK bluhm@
3 years ago
sysv_sem.c
Fix memory corruptions with sysv semaphores due to sleeps in copyin, copyout and malloc. During a sleep another thread could delete the semaphore (and possibly allocate another one at the same location with different permissions) which would lead to an invalid access after wake up. Therefore check the semaphore pointer, the sequence, the permissions and some values in seminfo after each sleep. OK bluhm@ Reported-by: syzbot+60ba811fe2e8a6b0f975@syzkaller.appspotmail.com
3 years ago
sysv_shm.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
tty.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
tty_conf.c
Re-add config includes
10 years ago
tty_endrun.c
Remove almost unused `flags' argument of suser().
8 years ago
tty_msts.c
Remove almost unused `flags' argument of suser().
8 years ago
tty_nmea.c
Update an old comment
4 years ago
tty_pty.c
openpty() family of functions use /dev/ptm PTMGET to open a master+slave fd pair, and also provides their names. Internally, 3 NDINIT+namei operations access /dev/[tp]ty[p-zP-T][0-9a-zA-Z], of these 2 followed unveil restrictions. I argue if you unveil /dev/ptm, (and not the 372 other nodes), you still want openpty() to provide you with working fd's, and the names, which the caller will probably never open manually, because the fd's are given. So change all NDINIT to use KERNELPATH, bypassing unveil. ok semarie
3 years ago
tty_subr.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
tty_tty.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
uipc_domain.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
uipc_mbuf.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
uipc_mbuf2.c
Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.
5 years ago
uipc_proto.c
Split out handlers for SOCK_DGRAM unix(4) sockets from SOCK_STREAM and SOCK_SEQPACKET. Introduce `uipc_dgram_usrreqs' to store pointers for dgram specific handlers.
3 years ago
uipc_socket.c
Adjust knote(9) API
3 years ago
uipc_socket2.c
Adjust knote(9) API
3 years ago
uipc_syscalls.c
Adjust knote(9) API
3 years ago
uipc_usrreq.c
remove unused unp_lock ok kn@ mvs@
3 years ago
vfs_bio.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
vfs_biomem.c
use NULL not 0 for pointer values in kern ok semarie@
4 years ago
vfs_cache.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
vfs_default.c
vgone() is vgonel() with curproc as 2nd argument. Use vgonel() like the other call in vop_generic_revoke(). OK semarie@
4 years ago
vfs_getcwd.c
zap a pile of dangling tabs
3 years ago
vfs_init.c
Move extern declarations of vfsops variables into header file. OK visa@
6 years ago
vfs_lockf.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
vfs_lookup.c
Replace last user of copystr() with strlcpy(). NFCI
3 years ago
vfs_subr.c
Replace two (void)copystr(..., NULL) with equivalent (void)strlcpy() calls.
3 years ago
vfs_sync.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
vfs_syscalls.c
non-padded 64-bit system calls arrived 2021/12/23, over a year ago. time to delete the backwards compat padded functions in the kernel.
3 years ago
vfs_vnops.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
vfs_vops.c
Remove unused VOP_POLL().
3 years ago