summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove the Linux emulation code, no longer referenced by anythingnaddy2016-03-021-1720/+0
|
* Rename __sysctl syscall to just sysctl, as the userland wrapper is no longerguenther2015-09-131-3/+3
| | | | | | necessary ok deraadt@ jsing@
* Pass a thread pointer instead of its file descriptor table to getvnode(9).mpi2015-05-071-2/+2
| | | | Input and ok millert@
* add missing splx callsjsg2015-05-021-3/+7
| | | | ok krw@
* Replace a plethora of historical protection options with justderaadt2014-11-161-3/+3
| | | | | | | PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
* Delete procfs; it's always had races and is now unused: no one noticed forguenther2014-09-081-5/+1
| | | | | | months that I broke it before the 5.5 release. confirmed as not being required by ports by sthen@, ajacoutot@, dcoppa@
* Don't use meaningless MAP_TRYFIXED flag in compat_linuxmatthew2014-06-281-2/+2
| | | | Pointed out by deraadt
* Eliminates struct pcred by moving the real and saved ugids intoguenther2014-03-301-4/+4
| | | | | | | | | struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
* Move p_emul and p_sigcode from proc to process.guenther2014-03-261-7/+7
| | | | | | | | | Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
* The kernel isn't involved in times(3); <sys/times.h> should never beguenther2014-03-241-2/+1
| | | | included there
* Eliminate the exit sig handling, which was only invokable via theguenther2014-02-121-5/+2
| | | | | | | | Linux-compat clone() syscall when *not* using CLONE_THREAD. pirofti@ confirms Opera runs in compat without this, so out it goes; one less hair to choke on in kern_exit.c ok tedu@ pirofti@
* adjust a comment or twotedu2014-01-231-3/+4
|
* Remove unsigned comparison < 0.brad2013-12-081-2/+2
| | | | | | Pointed out by LLVM. ok pirofti@
* Unimplement stime() and settimeofday(): why are you using a Linux-compatguenther2013-10-251-28/+1
| | | | | | binary to change the system time? ok pirofti@
* Start to deal with the time_t change's effect on compat/linux:guenther2013-10-251-55/+95
| | | | | | | | | | | | | | - add Linux versions of struct rusage, timeval, and itimerval and conversion functions for them - add Linux versions of getrusage(), gettimeofday(), {set,get}itimer(), and nanosleep() - fix various inconsistencies in naming of Linux versions of types and conversion functions - add mappings for LINUX_CLOCK_{PROCESS,THREAD}_CPUTIME_ID to the native versions Originally written months ago as part of the time_t work; long memory, prodding, and ok from pirofti@
* Switch time_t, ino_t, clock_t, and struct kevent's ident and dataguenther2013-08-131-6/+5
| | | | | | | | | | | | | | | | | | | | members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
* compat_linux: Add support for future time_t and ino_t size enlargements.pirofti2013-05-101-10/+39
| | | | Reviewed by guenther@.
* Remove the lack of gettid() implementation. Okay tedu@pirofti2012-06-081-1/+8
| | | | Looks right to jasper@ as well.
* Add emulation support for fstatfs64.pirofti2012-05-231-1/+30
| | | | Okay matthew@.
* Add support for statfs64.pirofti2012-05-231-11/+91
| | | | | | | | | While at it get rid of some magic numbers and add support for more filesystem types (like NTFS, AFS etc.). Suggestions and feedback from ajacoutot@, jsing@ and matthew@. Okay matthew@.
* Add struct proc * argument to FRELE() and FILE_SET_MATURE() inguenther2012-04-221-3/+3
| | | | | | anticipation of further changes to closef(). No binary change. ok krw@ miod@ deraadt@
* Make the KERN_NPROCS and KERN_MAXPROC sysctl()s and the RLIMIT_NPROC rlimitguenther2012-04-101-2/+2
| | | | | | | | count processes instead of threads. New sysctl()s KERN_NTHREADS and KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel variables are replaced by nprocess, maxprocess, nthreads, and maxthread. ok tedu@ mikeb@
* Make rusage totals, itimers, and profile settings per-process insteadguenther2012-03-231-14/+15
| | | | | | | of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
* implement prctl() for COMPAT_LINUXrobert2011-12-141-1/+83
| | | | ok pirofti@
* Remove COMPAT_25. The one piece moved by COMPAT_LINUX moves there.deraadt2011-07-091-1/+16
| | | | ok guenther
* remove all traces of COMPAT_09 and COMPAT_10. ok deraadttedu2011-07-081-1/+14
|
* Remove the sys_opipe() kernel entry point. sys_pipe() is the future.matthew2011-07-081-47/+1
| | | | | | | While here, switch compat_linux to just use sys_pipe() rather than incorrectly wrapping sys_opipe(). ok tedu@, miod@
* remove all the old COMPAT_43 syscalls. The option itself remains fortedu2011-07-071-1/+16
| | | | | | the other things it enables. Move a few old wrappers into linux compat where they are still being used. ok deraadt guenther
* Move the bufcachepercent setting code to MI locations -- set it to 42%deraadt2011-06-051-2/+2
| | | | | | | for now; that is unlikely to hit some of the remaining starvation bugs. Repair the bufpages calculation too; i386 was doing it ahead of time (incorrectly) and then re-calculating it. ok thib
* Fix PID fetching -- noticed last night by guenther@.pirofti2011-04-051-3/+3
|
* Add linux_mprotect() syscall. Okay otto@.pirofti2011-02-111-1/+11
|
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-261-5/+5
| | | | | | | | | so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
* Merge from NetBSD: "Linux's getsid(2) does in fact return a pid,guenther2010-06-301-28/+1
| | | | | not a pointer." So just use the native implementation. ok deraadt@
* Fix various cases of stackgap_alloc() size arguments not being computedmiod2009-09-051-2/+2
| | | | | correctly, usually yielding the right value on 32 bit machines because sizeof int == sizeof pointer.
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* replace the machine dependant bytes-to-clicks macro by the MI ptoa()martin2007-09-011-2/+2
| | | | | | | | version for i386 more architectures and ctob() replacement is being worked on prodded by and ok miod
* Use atomic.h operation for manipulating p_siglist in struct proc. Solvesart2007-02-061-2/+2
| | | | | | the problem with lost signals in MP kernels. miod@, kettenis@ ok
* Pass linux_sys_waitpid() on to linux_sys_wait4() in order to properlysturm2006-10-081-32/+11
| | | | | | check and translate options. from netbsd ok deraadt, kettenis
* miscellaneous typo fixes:jfb2005-02-171-4/+4
| | | | | | | - sturct -> struct (spotted by pedro) - elimination of consecutive 'the' words ok jmc@, henning@, krw@, robert@, some whining by jolan@
* This moves access to wall and uptime variables in MI code,tholo2004-06-241-17/+15
| | | | | | | | | | | | | | encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
* Replace a whole bunch of scary uses of strncpy() with strlcpy() andjfb2004-06-221-23/+17
| | | | | | use compat-specific MAXNAMLEN values where appropriate ok millert@, pedro@
* Count from now, not from the epoch, to arm alarm.nordin2003-12-021-2/+2
|
* change arguments to suser. suser now takes the process, and a flagstedu2003-08-151-2/+2
| | | | | | | | | argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
* simplify.fgsch2003-08-151-7/+1
|
* unbust my previous commit.fgsch2003-08-141-1/+7
|
* add sys_sysinfo. from marius aamodt eriksen.tedu2003-07-231-17/+62
| | | | linux_misc.c: fvdl gave his copyright to tnf, adjust.
* add mmap2 (mmap64, take your pick) and clean up some. use MAP_TRYFIXEDtedu2003-07-031-17/+72
| | | | | since that's the way linux works. no regressions by various ports testers, eyeballed by a few others.
* add exec/fork/exit hooks per process for compat emulations.tedu2003-06-211-11/+7
| | | | | | | | | | use them to correctly emulate linux brk. update to TNF copyright in linux_exec.c. from netbsd, mostly from a diff by Kurt Miller in pr3318. this should fix java. no regressions in testing by kurt and sturm@. be prepared for "proc size mismatch" -- recompile ps and friends. ok deraadt@
* Bring back setreuid(2) and setregid(2) as first class syscallsmillert2003-01-301-5/+5
| | | | | | | (but still implemented via setres[ug]id(2)). Basically this just moves them from COMPAT_43 into kern_prot.c. Also fixes a typo in my old implementation. The userland portion will follow in a few days. deraadt@ OK
* Now that we have [gs]etres[ug]id() as a native system call, use itmillert2002-10-301-171/+58
| | | | | | for HP-UX, FreeBSD, and Linux emulations. Note that Linux has two versions of these system calls. One for 16bit uids and another for 32bit uids.