/
nerfur
/
openbsd-src
ОбзорДокументацияВойти
/
nerfur
/
openbsd-src
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©
openbsd-src/
sys/kern/
..
Makefile

add powerpc64 and riscv64 to tags arch list

2 года назад
clock_subr.c

Pull in <sys/time.h> for clock_ymdhms bits

10 лет назад
dma_alloc.c

all pools have their ipl set via pool_setipl, so fold it into pool_init.

10 лет назад
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

5 лет назад
exec_elf.c

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.

год назад
exec_script.c

Do not relock fdp in fdrelease(). This prevents unnecessary locking in the common case.

7 лет назад
exec_subr.c

Always use new_vmcmd() from exec_subr.c, remove the macro which duplicated code with no benefit.

2 года назад
genassym.sh

Tweak genassym code generation to force preprocessor conditional directives to always be put inside functions.

2 года назад
init_main.c

Rename sched_init_runqueues() to sched_init() since so we can use it for initial bringup of the scheduler. Add the boot processor to sched_all_cpus here to ensure that sched_all_cpus is not empty. OK mpi@ kettenis@ (as part of a larger diff)

год назад
init_sysent.c

sync

год назад
kern_acct.c

Rework per proc and per process time usage accounting

2 года назад
kern_bufq.c

remove unused bufq_switch() bufq_requeue() ok kn@ miod@ tedu@

год назад
kern_clock.c

protect the CPU state statistics with a pclock

год назад
kern_clockintr.c

Constify strings in symbol-related ddb interfaces, and make the iterator callback interface a bit simpler. ok beck@ claudio@ mpi@

2 года назад
kern_descrip.c

kqueue: Implement EVFILT_USER

год назад
kern_event.c

kqueue: Improve EVFILT_USER compatibility

год назад
kern_exec.c

move tusage from a hand rolled prod/cons lock to the one i just committed.

год назад
kern_exit.c

Let the last thread of a process teardown its VM space in exit1().

год назад
kern_fork.c

Cleanup the start of sched_init() and move the addition of CPUs to sched_all_cpus to here. An application processor is only ready to take work once sched_idle() was entered. With this the bootup code no longer requires CPU stealing since work is no longer scheduled onto unhatched CPUs. Also document the fork1() bits to add more breadcrumbs on how all this works. OK mpi@ kettenis@

год назад
kern_intrmap.c

remove unused intrmap_align() intrmap_match() intrmap_one() ok dlg@

год назад
kern_kthread.c

Mark exit1() and sigexit() as non-returning

5 лет назад
kern_ktrace.c

Protects remaining ktrwrite*() with a KERNEL_LOCK dance.

2 года назад
kern_lock.c

Reinstate MP_LOCKDEBUG support for mutexes

год назад
kern_malloc.c

Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm

год назад
kern_physio.c

Remove Softdep.

3 года назад
kern_pledge.c

Add IPV6_RECVTCLASS to the authorized setsockopt operations for IPPROTO_IPV6. Fixes recent chromium browser with IPv6. ok deraadt@

год назад
kern_proc.c

In db_show_all_procs check that p->p_cpu is not NULL before calling __mp_lock_held(). This function is called on ddb entry and needs to be extra careful. OK mpi@ kettenis@

год назад
kern_prot.c

Adjust lock requirements for ps_pptr, ps_ppid and ps_oppid.

2 года назад
kern_resource.c

move tusage from a hand rolled prod/cons lock to the one i just committed.

год назад
kern_rwlock.c

make the sleep time argument in sleep_finish nanoseconds instead of ticks

год назад
kern_sched.c

Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm

год назад
kern_sensors.c

zap a pile of dangling tabs

4 года назад
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.

год назад
kern_smr.c

Introduce sched_unpeg_curproc() to abstract the current implementation.

2 года назад
kern_softintr.c

Add MI high-level software interrupt dispatcher

год назад
kern_srp.c

srp_finalize(9): tsleep(9) -> tsleep_nsec(9)

6 лет назад
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.

4 года назад
kern_synch.c

Assert that reference count is always positive.

год назад
kern_sysctl.c

Protect mbuf statistics counter with splnet.

год назад
kern_task.c

taskq_del_barrier(9) and timeout_del_barrier(9) should always call taskq_barrier(9) and timeout_barrier(9) respectively.

2 года назад
kern_tc.c

Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm

год назад
kern_time.c

Fix the clock_gettime() handler for pthread_getcpuclockid() to use the proper way to read tu_runtime. OK mpi@

2 года назад
kern_timeout.c

interupt -> interrupt

год назад
kern_unveil.c

zap a pile of dangling tabs

4 года назад
kern_uuid.c

Sync enc/dec routines with libc.

12 лет назад
kern_watchdog.c

remove unneeded includes in sys/kern ok mpi@ miod@

4 года назад
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.

год назад
makesyscalls.sh

Error out if one syscall ever takes more than 6 arguments.

3 года назад
sched_bsd.c

Use cpuset_cardinality() and cpuset_complement() to calculate the number of active cpus instead of checking cpuset_isset() over and over again. This is still not really atomic but the loadavg calculation is really not worth more effort. Ok kettenis@ tb@

год назад
spec_vnops.c

eliminate bremfree macro, just an alias for bufcache_take. ok claudio miod

год назад
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

4 года назад
subr_blist.c

spelling ok jmc@ guenther@ tb@

3 года назад
subr_disk.c

directly use dev_t for swdevt[], remove struct swdevt ok mpi@ miod@

2 года назад
subr_evcount.c

Allow counters_read(9) to take an optional scratch buffer.

3 года назад
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.

3 года назад
subr_hibernate.c

preallocate hibernate work area during boot

год назад
subr_kubsan.c

Fix KUBSAN by adding invalid builtin detection, as needed by our current clang. ok anton@

2 года назад
subr_log.c

make the sleep time argument in sleep_finish nanoseconds instead of ticks

год назад
subr_percpu.c

Allow counters_read(9) to take an optional scratch buffer.

3 года назад
subr_poison.c

remove unneeded includes in sys/kern ok mpi@ miod@

4 года назад
subr_pool.c

Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm

год назад
subr_prf.c

remove unneeded includes in sys/kern ok mpi@ miod@

4 года назад
subr_prof.c

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.

год назад
subr_suspend.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.

год назад
subr_tree.c

Fix a "copy-and-paste" error that Coverity picked up in the augment code

8 лет назад
subr_userconf.c

remove unneeded includes in sys/kern ok mpi@ miod@

4 года назад
subr_witness.c

witness: Improve handling of lock nesting

год назад
subr_xxx.c

Add SMR_ASSERT_NONCRITICAL() in assertwaitok(). This eases debugging because now the error is detected before context switch.

7 лет назад
sys_futex.c

This code no longer uses tick_nsec so there is no need for sys/kernel.h OK dlg@

год назад
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.

2 года назад
sys_pipe.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.

2 года назад
sys_process.c

Introduce ps_trapped -- a pointer to the struct proc that is stopped in the debugger trap.

год назад
sys_socket.c

Remove socket lock from soo_ioctl(FIOASYNC).

год назад
syscalls.c

sync

год назад
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.

год назад
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 лет назад
sysv_msg.c

fix double words in comments feedback and ok jmc@ miod, ok millert@

3 года назад
sysv_sem.c

change format strings to fix SEM_DEBUG build

2 года назад
sysv_shm.c

Prevent a double free by unlinking the descriptor before unmaping & freeing it.

2 года назад
tty.c

Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm

год назад
tty_conf.c

Re-add config includes

11 лет назад
tty_endrun.c

Remove almost unused `flags' argument of suser().

8 лет назад
tty_msts.c

Remove almost unused `flags' argument of suser().

8 лет назад
tty_nmea.c

Update an old comment

4 года назад
tty_pty.c

remove VATTR_NULL() define, directly call vattr_null()

2 года назад
tty_subr.c

remove unneeded includes in sys/kern ok mpi@ miod@

4 года назад
tty_tty.c

change some if statements to switch cases ok deraadt@ miod@

год назад
uipc_domain.c

Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm

год назад
uipc_mbuf.c

Protect mbuf statistics counter with splnet.

год назад
uipc_mbuf2.c

Protect mbuf statistics counter with splnet.

год назад
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.

4 года назад
uipc_socket.c

replace timeout_add_tv with timeout_add_nsec via TIMEVAL_TO_NSEC.

год назад
uipc_socket2.c

Get rid of unused `so' argument in sbappendcontrol(). No functional changes.

год назад
uipc_syscalls.c

Switch solisten() from exclusive to shared netlock.

год назад
uipc_usrreq.c

Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm

год назад
vfs_bio.c

Move buf_realloc_pages in buf.h

год назад
vfs_biomem.c

Remove obsolete comment

год назад
vfs_cache.c

remove unneeded includes in sys/kern ok mpi@ miod@

4 года назад
vfs_default.c

remove unused vop_generic_kqfilter() ok mlarkin@

год назад
vfs_getcwd.c

zap a pile of dangling tabs

4 года назад
vfs_init.c

Drop MNT_LOCAL flag in corresponding `vfsconflist' fuse(4) entry instead of cleaning it in fusefs_mount().

2 года назад
vfs_lockf.c

remove unneeded includes in sys/kern ok mpi@ miod@

4 года назад
vfs_lookup.c

namei operates on vnode not inode

год назад
vfs_subr.c

Carefully prune sysctl nodes with #ifndef SMALL_KERNEL recover space lost to other bloaty software. ok bluhm

год назад
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.

2 года назад
vfs_syscalls.c

remove the functionality of fs.posix.setuid sysctl. obsolete and dangerous. ok deraadt

год назад
vfs_vnops.c

Push the KERNEL_LOCK() down to vn_statfile() and unlock fstat(2).

2 года назад
vfs_vops.c

Fail early in VOP_READDIR if the vnode is not a VDIR. OK miod@ dlg@ tedu@ deraadt@ rsadowski@

год назад