summaryrefslogtreecommitdiff
path: root/sys/compat/linux/arch/i386
AgeCommit message (Collapse)Author
2022-09-05G/C ISSET() macro copies. It has been defined in <sys/types.h> since 2006.tsutsui
2021-12-02regenryo
2021-12-02add prlimit64(2) syscall to COMPAT_LINUX and COMPAT_LINUX32ryo
2021-11-26- LINUX_GO_RT0_SIGNATURE for compat_linux is no longer enabled by default.ryo
it is now defined in each arch same as the other *_SIGNATURE definitions. - add new LINUX32_GO_RT0_SIGNATURE for compat_linux32, and is defined in amd64 and aarch64.
2021-11-01Use "stack_t" instead of "struct sigaltstack", as the former is thethorpej
newer standardized name. NFC.
2021-10-12fix various typos, mainly in comments.andvar
2021-09-20Regen for preadv(2) / pwritev(2).thorpej
2021-09-20Add preadv(2) and pwritev(2) system calls to COMPAT_LINUX and COMPAT_LINUX32.thorpej
2021-09-20Regen for eventfd.thorpej
2021-09-20Add the eventfd system calls to COMPAT_LINUX and COMPAT_LINUX32.thorpej
2021-09-19Regen for timerfd.thorpej
2021-09-19Add the timerfd syscalls to COMPAT_LINUX and COMPAT_LINUX32.thorpej
2021-09-19Regen for POSIX timer syscalls.thorpej
2021-09-19Add the POSIX timer syscalls (timer_create(), timer_settime(), timer_gettime(),thorpej
timer_getoverrun(), and timer_delete()) to COMPAT_LINUX and COMPAT_LINUX32.
2021-09-07sys/compat: Memset zero before copyout.riastradh
Just in case of uninitialized padding which would lead to kernel stack disclosure. If the compiler can prove the memset redundant then it can optimize it away; otherwise better safe than sorry.
2021-08-09fix typos in asymmetry, asymmetric(al), symmetrical.andvar
2020-09-05Round of uvm.h cleanup.riastradh
The poorly named uvm.h is generally supposed to be for uvm-internal users only. - Narrow it to files that actually need it -- mostly files that need to query whether curlwp is the pagedaemon, which should maybe be exposed by an external header. - Use uvm_extern.h where feasible and uvm_*.h for things not exposed by it. We should split up uvm_extern.h but this will serve for now to reduce the uvm.h dependencies. - Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use UVMHIST(ubchist), since ubchist is declared in uvm.h but the reference evaporates if UVMHIST is not defined, so we reduce header file dependencies. - Make uvm_device.h and uvm_swap.h independently includable while here. ok chs@
2020-07-19don't include opt_user_ldt.h when it is not neededmaxv
2020-05-23Move proc_lock into the data segment. It was dynamically allocated becausead
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
2020-05-03Always clear FUTEX_PRIVATE_FLAG for Linux processes. NetBSD-native futexesthorpej
exist in different namespace depending on FUTEX_PRIVATE_FLAG. This appears not to be the case in Linux, and some futex users will mix private and non- private ops on the same futex object. Provide a convenience wrapper that puts this logic in one place witn a comment explaining why. While here, move the Linux futex wrapper out of its own file and plop it in linux_misc.c, which is where it lives in the linux32 module.
2020-04-26Regen for native futex calls.thorpej
2020-04-26Add a NetBSD native futex implementation, mostly written by riastradh@.thorpej
Map the COMPAT_LINUX futex calls to the native ones.
2019-11-09regenjdolecek
2019-11-09add dummy implementation of linux fallocate() which just returns EOPNOTSUPP;jdolecek
this is needed so that glibc falls back to emulation and apps behaving properly, since EOPNOTSUPP is a documented and expected return code, but ENOSYS is not right now there are no filesystems in NetBSD tree supporting the fallocate VOP, so no point trying to map this to a native call supposed to help with problem reported in https://mail-index.netbsd.org/tech-kern/2019/11/03/msg025641.html
2019-05-19Renamemaxv
fpu_save_area_clear -> fpu_clear fpu_save_area_reset -> fpu_sigreset Clearer, and reduces a future diff. No real functional change.
2018-09-03Rename min/max -> uimin/uimax for better honesty.riastradh
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended. HOWEVER! Some subsystems have #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation. To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it. I have left a handful of bootloaders that are too annoying to compile-test, and some dead code: cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4)) It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them. Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
2018-08-10Regenpgoyette
2017-09-17Remove the second argument from USERMODE and KERNELMODE, it is unusedmaxv
now that we don't have vm86 anymore.
2017-08-28Remove the filesystem tracing featurekamil
This is a legacy interface from 4.4BSD, and it was introduced to overcome shortcomings of ptrace(2) at that time, which are no longer relevant (performance). Today /proc/#/ctl offers a narrow subset of ptrace(2) commands and is not applicable for modern applications use beyond simplistic tracing scenarios. This removal will simplify kernel internals. Users will still be able to use all the other /proc files. This change won't affect other procfs files neither Linux compat features within mount_procfs(8). /proc/#/ctl isn't available on Linux. Remove: - /proc/#/ctl from mount_procfs(8) - P_FSTRACE note from the documentation of ps(1) - /proc/#/ctl and filesystem tracing documentation from mount_procfs(8) - KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9) - source code file miscfs/procfs/procfs_ctl.c - PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h - KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h - PSL_FSTRACE (0x00010000) from sys/sys/proc.h - P_FSTRACE (0x00010000) from sys/sys/sysctl.h Reduce code complexity after removal of this functionality. Update TODO.ptrace accordingly: remove two entries about /proc tracing. Do not keep legacy notes as comments in the headers about removed PSL_FSTRACE / P_FSTRACE, as this interface had little number of users (close or equal to zero). Proposed on tech-kern@. All filesystem tracing utility users are encouraged to switch to ptrace(2). Sponsored by <The NetBSD Foundation>
2017-08-12Remove vm86.maxv
Pass 3.
2017-08-12Remove vm86. Simplifies a number of critical places.maxv
Pass 2.
2017-05-10regenriastradh
2017-02-12es_arglen is now in units of bytes, update the emulations accordingly.chs
2017-02-05Rename ldt->ldtstore and gdt->gdtstore on i386. It reduces the diff withmaxv
amd64, and makes it easier to track down these variables on nxr - 'ldt' and 'gdt' being common keywords.
2017-01-16regen allchristos
2017-01-13regenchristos
2017-01-02Regen (something apparently went wrong in previous)martin
2017-01-02Regenmanu
2017-01-02Add pselect6 Linux system call.manu
This lets Matlab R2016A run on NetBSD/amd64
2016-07-24Regen for readlink/readlinkat signatures.njoly
2016-07-24Small cleanup. Adjust readlink/readlinkat signatures to reduce diffs withnjoly
native.
2016-07-13x86_alldisks can be NULL, so don't dereference it. Not tested, but obviousmaxv
enough.
2015-12-08Fix DIOCGPARTINFOchristos
2015-12-08Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead ofchristos
pointers.
2015-10-13Don't release proc_lock until we're done looking at things that arepgoyette
protected by the lock, particularly p_stat and p_waited. Found by Robert Elz. XXX Pullup to NetBSD-7, -6, -6-0, and -6-1
2015-09-24regenchristos
2015-03-23Regenozaki-r
2015-03-23Fix inconsistent argument namesozaki-r
2015-03-14Support Linux MAP_LOCKED mmap flag.njoly
2015-03-07regenchristos