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
jcs
109 files
Makefile
add powerpc64 and riscv64 to tags arch list
1 year 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
uprintf() is the wrong way to show this error to a user's tty (I am not sure there is a right way)
1 month ago
exec_script.c
Do not relock fdp in fdrelease(). This prevents unnecessary locking in the common case.
6 years ago
exec_subr.c
Move allocation of "mmap descriptors" (UVM vnode) into uvn_attach().
5 months ago
genassym.sh
Tweak genassym code generation to force preprocessor conditional directives to always be put inside functions.
2 years ago
init_main.c
copyright++;
3 months ago
init_sysent.c
sync
10 months ago
kern_acct.c
Rework per proc and per process time usage accounting
2 years ago
kern_bufq.c
remove unused bufq_switch() bufq_requeue() ok kn@ miod@ tedu@
10 months ago
kern_clock.c
protect the CPU state statistics with a pclock
10 months ago
kern_clockintr.c
Constify strings in symbol-related ddb interfaces, and make the iterator callback interface a bit simpler. ok beck@ claudio@ mpi@
1 year ago
kern_descrip.c
Implement the POSIX-2024 close-on-fork flag, but modified to be reset on exec as preserving it across exec is not necessary for its original purpose and has security and usability concerns.
8 months ago
kern_event.c
kqueue: Improve EVFILT_USER compatibility
10 months ago
kern_exec.c
Fix reference counting for sigobject initialization. Simplify error handling; we can't even exec init(8) if sigobject initialization fails, so just panic and don't worry about cleaning up after ourselves. This code should always succeed.
6 months ago
kern_exit.c
typo in argument comment block of new waitid syscall stub. from David Higgs
8 months ago
kern_fork.c
pull __thrsleep tendrils out of struct proc.
7 months ago
kern_intrmap.c
remove unused intrmap_align() intrmap_match() intrmap_one() ok dlg@
10 months ago
kern_kthread.c
Mark exit1() and sigexit() as non-returning
4 years ago
kern_ktrace.c
Protects remaining ktrwrite*() with a KERNEL_LOCK dance.
1 year ago
kern_lock.c
attmepting -> attempting
2 months ago
kern_malloc.c
Annotate some more uvmexp.h field as [a]tomic and only manipulate them via the atomic macros. In the near future we'll use these fields in the pagedaemon to observe live system state and make better decisions. discussed with beck and others, ok bluhm
1 month ago
kern_physio.c
Remove Softdep.
2 years ago
kern_pledge.c
delete pledge_sysctl() printing of the failing mibs, because it truncates it's buffer, produces misleading output, and is pointless tty output, Like with other system calls failuress, the standard pledge_fail() tty output should lead the user to use ktrace which will provide an accurate view. discussed with bluhm
1 month ago
kern_proc.c
Implement a ddb stop command that sends a SIGSTOP to the specified pid.
2 months ago
kern_prot.c
Instead of failing with EINVAL when setthrname(2) is passed a thread name longer then _MAXCOMLEN-1, truncate the name to fit. This is likely what the user wants and saves them from having to snprintf(3) into a buffer sized _MAXCOMLEN first. Man page update to follow.
4 months ago
kern_resource.c
Annotate some more uvmexp.h field as [a]tomic and only manipulate them via the atomic macros. In the near future we'll use these fields in the pagedaemon to observe live system state and make better decisions. discussed with beck and others, ok bluhm
1 month ago
kern_rwlock.c
Add dt(4) trace points to rwlock(9).
8 months ago
kern_sched.c
Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm
10 months ago
kern_sensors.c
zap a pile of dangling tabs
3 years ago
kern_sig.c
Do not retake the SCHED_LOCK when going out of mi_switch(). No code really depends on that and it is one extra mutex operation for no good reason.
10 months ago
kern_smr.c
use cond_signal_handler instead of having little wrappers for cond_signal.
8 months ago
kern_softintr.c
Add MI high-level software interrupt dispatcher
11 months ago
kern_srp.c
fix srp_follow to close a window on use-after-free
3 months 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
Assert that P_SINTR is unset on sleep_setup() entry
4 months ago
kern_sysctl.c
Annotate some more uvmexp.h field as [a]tomic and only manipulate them via the atomic macros. In the near future we'll use these fields in the pagedaemon to observe live system state and make better decisions. discussed with beck and others, ok bluhm
1 month ago
kern_task.c
taskq_del_barrier(9) and timeout_del_barrier(9) should always call taskq_barrier(9) and timeout_barrier(9) respectively.
1 year ago
kern_tc.c
Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm
10 months ago
kern_time.c
Fix the clock_gettime() handler for pthread_getcpuclockid() to use the proper way to read tu_runtime. OK mpi@
2 years ago
kern_timeout.c
use cond_signal_handler instead of having little wrappers for cond_signal.
8 months ago
kern_unveil.c
zap a pile of dangling tabs
3 years ago
kern_uuid.c
Remove unused uuid_dec_{be,le} routines.
9 months ago
kern_watchdog.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
kern_xcall.c
wire up cpu_xcall on amd64.
5 months ago
kern_xxx.c
Introduce a generic powerbutton_event() function that does everything we expect from a power button event in a consistent manner. This gets rid of some duplicated code and means all drivers now prevent shutdown within the first 10 seconds after resume.
9 months ago
makesyscalls.sh
Error out if one syscall ever takes more than 6 arguments.
2 years ago
sched_bsd.c
Remove last callers of the 'lbolt' sleep channel.
6 months ago
spec_vnops.c
eliminate bremfree macro, just an alias for bufcache_take. ok claudio miod
1 year ago
subr_autoconf.c
Whitelist devices in cfdriver for use when SEV is enabled
6 months ago
subr_blist.c
spelling ok jmc@ guenther@ tb@
2 years ago
subr_disk.c
disk masks are now 64-bit, use ULL suffix when bit shifting Coverity CID 1667591 1667586 1667584 1667583 1667585 ok deraadt@
4 months ago
subr_evcount.c
Allow counters_read(9) to take an optional scratch buffer.
2 years ago
subr_extent.c
Implement extent_alloc_region_with_descr(9) which is the equivalent of extent_alloc_region(9) that uses a pre-allocated region descriptor.
2 years ago
subr_hibernate.c
Annotate some more uvmexp.h field as [a]tomic and only manipulate them via the atomic macros. In the near future we'll use these fields in the pagedaemon to observe live system state and make better decisions. discussed with beck and others, ok bluhm
1 month ago
subr_kubsan.c
Fix KUBSAN by adding invalid builtin detection, as needed by our current clang. ok anton@
2 years ago
subr_log.c
make the sleep time argument in sleep_finish nanoseconds instead of ticks
10 months ago
subr_percpu.c
Allow counters_read(9) to take an optional scratch buffer.
2 years ago
subr_poison.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
subr_pool.c
use some macros to make the cache list sizes less magical.
2 months ago
subr_prf.c
kprintf: bring back timestamping, disabled by default
5 years ago
subr_prof.c
Move the proc.ps_flags PS_* bits that are only changed by sys_execve() and not tested (by name) in userland to a new ps_iflags member. This frees up some ps_flags bits for other uses.
7 months ago
subr_suspend.c
Better fix for power-button event handling during resume
8 months 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
replace the cas spinlock in kernel mutexes with a "parking" lock.
3 months ago
subr_xxx.c
Remove unused cdevsw_lookup().
9 months ago
sys_futex.c
track which hash bucket a futex is on to make it easier to unwait.
7 months ago
sys_generic.c
All the device and file type ioctl routines just ignore FIONBIO, so stop calling down into those layer from fcntl(F_SETFL) or ioctl(FIONBIO) and delete the "do nothing for this" stubs in all the *ioctl routines.
1 year ago
sys_pipe.c
Implement the POSIX-2024 close-on-fork flag, but modified to be reset on exec as preserving it across exec is not necessary for its original purpose and has security and usability concerns.
8 months ago
sys_process.c
Extend ptrace(2) PT_GET_THREAD_* to include thread names. Use a new define larger then _MAXCOMLEN to avoid that define from propagating to ptrace.h. Ensure that pts_name is large enough with a compile time assert.
4 months ago
sys_socket.c
Remove socket lock from soo_ioctl(FIOASYNC).
1 year ago
syscalls.c
sync
10 months ago
syscalls.master
In the old gprof profiling subsystem, the simplistic profil() syscall told the kernel about the sample buffer, and then the normal exit-time _mcleanup() would finalize the buffer, open()'ed a file and write out the details. This file opening has become increasingly impossible because of our privsep / privdrop, chroot, setresuid uid-dropping, pledge, unveil, and other efforts. So people stopped using gprof. Programs which needed profiling needed substantial mitigation removal changes to put them under test.
10 months 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
fix double words in comments feedback and ok jmc@ miod, ok millert@
3 years ago
sysv_sem.c
In semctl(2), set pointers to NULL after free(). Avoids false positive warnings with a simple use-after-free checker.
2 months ago
sysv_shm.c
Prevent a double free by unlinking the descriptor before unmaping & freeing it.
1 year ago
tty.c
Remove last callers of the 'lbolt' sleep channel.
6 months 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
Remove last callers of the 'lbolt' sleep channel.
6 months ago
tty_subr.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
tty_tty.c
change some if statements to switch cases ok deraadt@ miod@
11 months ago
uipc_domain.c
Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm
10 months ago
uipc_mbuf.c
revert "use pf_states to link mbufs/inpcbs and forwarded connections together"
2 months ago
uipc_mbuf2.c
Remove, or comment out (if prototypes were already commented out with a hope that they would get used in the future), unused code.
9 months 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
Revert revision 1.379
2 months ago
uipc_socket2.c
Unlock shared netlock before socket lock.
8 months ago
uipc_syscalls.c
Allow low-risk getsockname() and getpeername() in stdio, because an upcoming ssh diff benefits greatly from this. ok djm
8 months ago
uipc_usrreq.c
Implement the POSIX-2024 close-on-fork flag, but modified to be reset on exec as preserving it across exec is not necessary for its original purpose and has security and usability concerns.
8 months ago
vfs_bio.c
Annotate some more uvmexp.h field as [a]tomic and only manipulate them via the atomic macros. In the near future we'll use these fields in the pagedaemon to observe live system state and make better decisions. discussed with beck and others, ok bluhm
1 month ago
vfs_biomem.c
Remove obsolete comment
10 months ago
vfs_cache.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
vfs_default.c
remove unused vop_generic_kqfilter() ok mlarkin@
1 year ago
vfs_getcwd.c
zap a pile of dangling tabs
3 years ago
vfs_init.c
Drop MNT_LOCAL flag in corresponding `vfsconflist' fuse(4) entry instead of cleaning it in fusefs_mount().
2 years ago
vfs_lockf.c
remove unneeded includes in sys/kern ok mpi@ miod@
3 years ago
vfs_lookup.c
Retire NULLVP, use NULL for coherency.
6 months ago
vfs_subr.c
Move allocation of "mmap descriptors" (UVM vnode) into uvn_attach().
5 months ago
vfs_sync.c
Put the bowels of the various VOP_PRINT routines under defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG) as they won't be used otherwise.
1 year ago
vfs_syscalls.c
Retire NULLVP, use NULL for coherency.
6 months ago
vfs_vnops.c
Push the KERNEL_LOCK() down to vn_statfile() and unlock fstat(2).
1 year ago
vfs_vops.c
Fail early in VOP_READDIR if the vnode is not a VDIR. OK miod@ dlg@ tedu@ deraadt@ rsadowski@
11 months ago