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
/
sys
/
at
jcs
146 files
_endian.h
cast the result of the ternary operators in __swapXX to the right type
8 years ago
_lock.h
Remove unused flags.
11 months ago
_null.h
Remove duplicated contents, either a patch bug or PEBKAC.
9 years ago
_time.h
Move CLOCKS_PER_SEC to sys/_time.h so the kernel has access to it. This will be used in waitid(2) to set si_utime and si_stime. The definition of struct timespec also moves from time.h to sys/_time.h for struct itimerspec. OK kettenis@
3 years ago
_types.h
remove swblk_t type from sys/types.h
3 years ago
acct.h
New accounting flag ABTCFI to indicate signal SIGILL + code ILL_BTCFI has occurred in the process. ok various people
2 years ago
ataio.h
Typos: defintion -> definition, proccess -> process
22 years ago
atomic.h
Use atomic operations to modify the MTU of route.
1 year ago
audioio.h
Remove drain(), query_encoding(), mappage() and get_default_params() methods from all audio drivers and from the audio_if structure as they are never called.
9 years ago
auxv.h
Add elf_aux_info(3)
2 years ago
blist.h
blist: use swblk_t type (defined in sys/blist.h)
3 years ago
buf.h
revert previous
7 months ago
cdefs.h
Make __pure macro use the __pure__ attribute, not __const__
10 months ago
cdio.h
remove defines for ioctls the kernel doesn't recognise ok mpi@
8 years ago
chio.h
remove outdated note to drop O* ioctl defines, they were removed in 2003
1 year ago
clockintr.h
clockintr: rename "struct clockintr_queue" to "struct clockqueue"
2 years ago
conf.h
Cleanup the kernel fuse device code to remove support for ioctl. This is no longer needed since an fbuf is now read or written in one go, rather than a combination of read(2) or write(2) and ioctl(2) to read or write the buffer used by the vfs syscalls read, write, readlink and readdir.
7 months ago
core.h
Fix core file writing when a file map into memory has later been truncated 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@
2 years ago
ctf.h
Convert variable type to C99. OK mpi@
8 years ago
device.h
Whitelist devices in cfdriver for use when SEV is enabled
6 months ago
dir.h
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
23 years ago
dirent.h
Zap some getdirentries() leftovers.
12 years ago
disk.h
Expand the masks tracking disk partition status to 64 bits.
6 months ago
disklabel.h
Begin transition to 52-partition support. The partition encoding used to be lowest 4 bits of dev_t, and now becomes 6. This supplies 64 partitions in struct disklabel.d_partitions[MAXPARTITIONSUNIT], but we only use 52 of these slots (an architecture can be either 16 partition or 52 partition, depending on MD define MAXPARTITIONS). The 52-partition limit is due to single-character representation limit of a-zA-Z. We supply a backwards-compat ioctl for a while which can read an disklabel structure.
4 months ago
dkio.h
Begin transition to 52-partition support. The partition encoding used to be lowest 4 bits of dev_t, and now becomes 6. This supplies 64 partitions in struct disklabel.d_partitions[MAXPARTITIONSUNIT], but we only use 52 of these slots (an architecture can be either 16 partition or 52 partition, depending on MD define MAXPARTITIONS). The 52-partition limit is due to single-character representation limit of a-zA-Z. We supply a backwards-compat ioctl for a while which can read an disklabel structure.
4 months ago
domain.h
remove unneeded forward struct declarations
1 year ago
endian.h
<sys/endian.h> needs <sys/cdefs.h>
11 years ago
errno.h
Add additional errno values required by POSIX.
8 years ago
evcount.h
Add support for per-cpu event counters, to be used for clock and IPI counters where the event being counted occurs across all CPUs in the system. Counter instances can be made per-cpu by calling evcount_percpu() after the counter is attached, and this can occur before or after all system CPUs are attached. Per-cpu counter instances should be incremented using evcount_inc().
3 years ago
event.h
kqueue: Implement EVFILT_USER
11 months ago
eventvar.h
Unwrap klist from struct selinfo as this code no longer uses selwakeup().
3 years ago
exec.h
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
exec_elf.h
Implement MD corefile notes and use them to write out the PAC note on arm64.
8 months ago
exec_script.h
the SETUIDSCRIPTS define is no longer needed since the code was unifdef a few years ago. spotted by tb.
8 years ago
extent.h
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
fcntl.h
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
file.h
Remove unused struct fileops field fo_poll and callbacks.
3 years ago
filedesc.h
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
filio.h
FIBMAP is used by nothing; checked by miod and pvalchev
19 years ago
fusebuf.h
Change the kernel fuse device and libfuse to read and write entire fusebufs. This is a required step along the way to improving FUSE compatibility with other platforms..
7 months ago
futex.h
avoid lock contention in futex syscalls
11 months ago
gmon.h
This thread-aware profiling support diff comes from Yuichiro NAITO. At runtime, profiling data is stored per-thread. Upon termination, the per-thread profiling data pools are merged into a into a single record, which is then written out (using the new kernel-assisted system). I think the original gmon merging parts may have come from or been inspired by someone at NetBSD. This has been delayed because there were concerns about adding a TLS object which would require other library cranks, so this rides all the major cranks today. ok kettenis tb claudio sthen etc etc etc
8 months ago
gpio.h
Add a 'flag' locator to gpioiic(4), and define a first flag value to swap the SDA and SCL pins assigment during attach. Mostly from work with mbalmer@NetBSD. ok miod@
14 years ago
hibernate.h
remove prototypes for removed functions
9 months ago
hotplug.h
Actually remove the device id from events.
20 years ago
intrmap.h
remove unused intrmap_align() intrmap_match() intrmap_one() ok dlg@
9 months ago
ioccom.h
change some casts to constant suffixes ok bluhm@
11 months ago
ioctl.h
Support for running Linux binaries under emulation is going away.
10 years ago
ipc.h
Pull in sys/types.h for the necessary typedefs
11 years ago
kcore.h
Leo Weppelman agreed to rescind clause 3 and 4 in NetBSD kvm_dump.3 rev 1.15 kcore.h rev 1.3
3 years ago
kcov.h
Avoid accessing curproc early during boot when kcov is enabled as it might be unassigned until all secondary processors are up and running.
2 years ago
kernel.h
Remove last callers of the 'lbolt' sleep channel.
6 months ago
kstat.h
Add forward declaration for struct rwlock.
10 months ago
kthread.h
Cleanup <sys/kthread.h> and <sys/proc.h> includes.
6 years ago
ktrace.h
Sort and regularize all the ktrstruct() macros
2 years ago
limits.h
Further standards compliance fixes: export LONG_BIT, WORD_BIT, and NL_{ARG,LANG,MSG,SET,TEXT}MAX with newer POSIX. Hide {FLT,DBL}_{DIG,MAX,MIN} and {PASS,TMP,NL_N}_MAX with newer XPG. Make _POSIX_NGROUPS_MAX and _POSIX_OPEN_MAX conditional on the POSIX version, like _POSIX_TZNAME_MAX already is. Add some more _POSIX_* and _XOPEN_* 'specified' limits.
13 years ago
lock.h
Remove the lockmgr() API. It is only used by filesystems, where it is a trivial change to use rrw locks instead. All it needs is LK_* defines for the RW_* flags.
9 years ago
lockf.h
Move lockf structures from header to implementation since external users only need a lockf_state pointer by now.
7 years ago
malloc.h
Limit net.bpf.maxbufsize sysctl(8) to a value that malloc(9) can handle. Introduce MALLOC_MAX definition to keep this value in sync and use it system wide.
1 year ago
mbuf.h
revert "use pf_states to link mbufs/inpcbs and forwarded connections together"
2 months ago
memrange.h
typos
10 years ago
mman.h
Add mimmutable(2) system call which locks the permissions (PROT_*) of memory mappings so they cannot be changed by a later mmap(), mprotect(), or munmap(), which will error with EPERM instead. ok kettenis
3 years ago
mount.h
introduce reference counts on struct mount.
1 year ago
mplock.h
remove __mp_release_all_but_one(), unused since sched_bsd.c rev 1.92 ok claudio@
2 years ago
msg.h
remove unused MSQID defines; ok mpi@ miod@
1 year ago
msgbuf.h
Serialize msgbuf access with a mutex.
5 years ago
mtio.h
No need for tape fields to be daddr_t. int will do.
19 years ago
mutex.h
replace the cas spinlock in kernel mutexes with a "parking" lock.
3 months ago
namei.h
spelling
4 years ago
param.h
crank to 7.8-beta
6 months ago
pciio.h
let userland read vpd info from a pci device.
5 years ago
pclock.h
add producer/consumer locking
10 months ago
percpu.h
Allow counters_read(9) to take an optional scratch buffer.
2 years ago
pipe.h
Unwrap klist from struct selinfo as this code no longer uses selwakeup().
3 years ago
pledge.h
remove prototypes for removed functions
9 months ago
poll.h
ppoll() is in POSIX-2024. Update #include visibility and manpages and add restrict qualifiers. While here, rename the BUGS section to CAVEATS since they're really "these probably don't do what you want" notes and not things that need fixing.
2 years ago
pool.h
Get rid of unused `pr_hardlimit_warning', `pr_hardlimit_ratecap' and `pr_hardlimit_warning_last'.
10 months ago
proc.h
pull __thrsleep tendrils out of struct proc.
7 months ago
protosw.h
Use softnet threads for socket splicing.
5 months ago
ptrace.h
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.
3 months ago
queue.h
Add singly-linked tail queue macros from FreeBSD. These are essentially equivalent to the simple queue macros from NetBSD but predate them and are more widely available on other systems. OK mpi@ denis@
5 years ago
radioio.h
This does not need <sys/param.h>. <sys/types.h> is enough. discussed with ratchov and sthen
11 years ago
reboot.h
Whitelist devices in cfdriver for use when SEV is enabled
6 months ago
refcnt.h
Document dt(4) tracing initializers for refcnt and rwlock.
8 months ago
resource.h
Move the declarations for dogetrusage(), itimerround(), and dowait4() to sys/*.h headers so that the compat/linux code can use them. Change dowait4() to not copyout() the status value, but rather leave that for its caller, as compat/linux has to translate it, with the side benefit of simplifying the native code.
12 years ago
resourcevar.h
remove unneeded timeout.h include, missed in rev 1.15
1 year ago
rwlock.h
Add dt(4) trace points to rwlock(9).
8 months ago
sched.h
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)
10 months ago
scsiio.h
struct oscsi_addr is not used anymore
13 years ago
select.h
More #include cleanup per POSIX: - <sys/types.h>: don't pull in <sys/select.h> - <sys/select.h>: don't pull in <sys/time.h>, but rather declare timeval and timespec locally - <sys/time.h>: *do* always pull in <sys/select.h> - <sys/socket.h>: declare timeval if __BSD_VISIBLE for struct splice
9 years ago
selinfo.h
Remove old poll/select wakeup mechanism.
3 years ago
sem.h
remove unneeded forward struct declarations
1 year ago
sensors.h
POWE9 CPUs provide an energy sensor that accumulates the emount of energy used by the processor chip. Although we have a SENSOR_WATTHOUR sensor type its units are not really suitable for this sensor. So add a SENSOR_ENERGY type that uses micro Joules as its unit.
5 years ago
shm.h
remove unneeded forward struct declarations
1 year ago
siginfo.h
create a new code ILL_BTCFI associated with SIGILL for trap faults which indicate missing indirect branch target instructions (on the two architectures which currently have this). This becomes nicely visible in kdump: 6526 cat PSIG SIGILL SIG_DFL code=ILL_BTCFI addr=0x438fad6a990 trapno=21 ok kettenis sthen miod rsadowski
2 years ago
sigio.h
Unify handling of ioctls FIOSETOWN/SIOCSPGRP/TIOCSPGRP and FIOGETOWN/SIOCGPGRP/TIOCGPGRP. Do this by determining the meaning of the ID parameter inside the sigio code. Also add cases for FIOSETOWN and FIOGETOWN where there have been TIOCSPGRP and TIOCGPGRP before. These changes allow removing the ID translation from sys_fcntl() and sys_ioctl().
6 years ago
signal.h
Some programs create a PROT_NONE guard page at the far-end of the provided stack buffer. With a page-aligned buffer, creating a MAP_STACK sub-region would undo the PROT_NONE guard. Ignore that last page. (We could check if the last page is non-RW before choosing to skip it. But we've already elected to grow STK sizes to compensate. Always ignoring the last page makes it a non-MAP_STACK guard page which can be opportunistically discovered) ok semarie stefan kettenis
8 years ago
signalvar.h
Rework how processes are stopped because of a signal
1 year ago
smr.h
Fix annotation of smr_tqh_last
3 years ago
socket.h
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
socketvar.h
Use softnet threads for socket splicing.
5 months ago
sockio.h
add Private VLAN support to veb(4) as per RFC 5517
4 months ago
softintr.h
Add MI high-level software interrupt dispatcher
11 months ago
specdev.h
Remove unused VOP_POLL().
3 years ago
srp.h
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
stacktrace.h
Implement dt(4) utrace support on amd64 and i386.
2 years ago
stat.h
spelling
4 years ago
statvfs.h
Fix typo in comment for f_favail. From Alf Schlichting
4 years ago
stdarg.h
The "unsupported compiler" checks were added back in December when MD versions of these headers were unhooked. As nothing has hit those checks we can drop them at this point.
5 years ago
stdint.h
I am retiring my old email address; replace it with my OpenBSD one.
7 years ago
swap.h
Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN, MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
12 years ago
syscall.h
sync
10 months ago
syscall_mi.h
Protects remaining ktrwrite*() with a KERNEL_LOCK dance.
1 year ago
syscallargs.h
sync
10 months ago
sysctl.h
Unlock ip6_sysctl().
8 months ago
syslimits.h
getentropy(2) is in POSIX-2024, so adjust the #include visibility, change the "too much" error to EINVAL, add GETENTROPY_MAX to <limits.h> (via sys/syslimits.h), and update the manpage.
2 years ago
syslog.h
Use __size_t which is available in syslog.h
2 years ago
systm.h
add void cond_signal_handler(void *), for use with tasks, timeouts, etc.
8 months ago
task.h
Add support for remote coverage to kcov. Remote coverage is collected from threads other than the one currently having kcov enabled. A thread with kcov enabled occasionally delegates work to another thread, collecting coverage from such threads improves the ability of syzkaller to correlate side effects in the kernel caused by issuing a syscall.
5 years ago
termios.h
Add TABDLY, TAB0, TAB3 for better source compatibility. These are XSI extensions but some code seems to expect them. We don't currently implement TAB1 or TAB2. Idea from FreeBSD. OK guenther@ gnezdo@
3 years ago
time.h
Add a helper function TICKS_TO_NSEC() to transform ticks into nanoseconds. This is done since the multiplication needs to happen with uint64_t types to prevent overflows. Ticks use most probably a type of int and tick_nsec is also defined as an int. OK dlg@
10 months ago
timeout.h
deprecate timeout_add_tv now that nothing uses it anymore.
10 months ago
times.h
__clock_t is now defined in <sys/_types.h>; ok guenther@
12 years ago
timetc.h
timecounting: remove incomplete PPS support
3 years ago
tprintf.h
sprinkle some __kprintf__ attributes around functions which use format strings in the kernel to make gcc aware of the extra modifiers deraadt@ ok
22 years ago
tracepoint.h
Use btrace(8) to debug reference counting. dt(4) provides a static tracepoint for each type of refcnt we have. As a start, add inpcb and tdb refcnt. When the counter changes, btrace may print the actual object, the current counter, the change value and optionally the stack trace. discussed with visa@; OK mpi@
3 years ago
tree.h
Delete obsolete /* ARGSUSED */ lint comments.
3 years ago
tty.h
Remove last callers of the 'lbolt' sleep channel.
6 months ago
ttycom.h
base and ports are now clean of TIOCSTI uses. The #define can now be removed. The code was already changed to return EIO, it will now return ENOTTY since the code is deleted. ok sthen
7 years ago
ttydefaults.h
Almost all terminals now support hardware tabs so default to OXTABS off.
7 years ago
types.h
remove swblk_t type from sys/types.h
3 years ago
ucred.h
Use the refcnt API with struct ucred.
4 years ago
uio.h
remove unneeded forward struct declarations
1 year ago
un.h
Change unp_scan() and its callbacks to pass the array of struct file ** and a count instead of calling the callback on each one, while also renders the 'dispose' argument superfluous. Move unp_*() prototypes from <sys/un.h> to <sys/unpcb.h>
10 years ago
unistd.h
Add kbind, a syscall for ld.so to use to securely and efficiently update memory for lazy binding
10 years ago
unpcb.h
Merge uipc_bind() with unp_bind(). Unlike other unp_*() functions, unp_bind() has the only uipc_bind() caller. In the uipc_usrreq() times, it made sense to have dedicated unp_bind() for prevent tne code mess within giant switch(), but now it doesn't.
3 years ago
user.h
sys/user.h can now be substantially gutted. ok guenther
11 years ago
utsname.h
hide some userland functions from the kernel
13 years ago
uuid.h
Remove unused uuid_dec_{be,le} routines.
9 months ago
varargs.h
The "unsupported compiler" checks were added back in December when MD versions of these headers were unhooked. As nothing has hit those checks we can drop them at this point.
5 years ago
videoio.h
sys/videoio.h: sync with Linux
4 months ago
vmmeter.h
increase the size of forkstat fields to accomodate large values
9 years ago
vnode.h
Move initializaion of UVM vnode descriptors into its own function.
6 months ago
wait.h
Add WTRAPPED opiton for waitid(2) to control whether CMD_TRAPPED state changes are reported. That's the 6th bit, so switch to hex constants. Adjust #if tests for consistency
3 years ago
witness.h
remove prototypes for removed functions
9 months ago
xcall.h
wire up cpu_xcall on amd64.
4 months ago