summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/syscalls.master
Commit message (Collapse)AuthorAgeFilesLines
* Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.ed2008-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Looking at our source code history, it seems the uname(), getdomainname() and setdomainname() system calls got deprecated somewhere after FreeBSD 1.1, but they have never been phased out properly. Because we don't have a COMPAT_FREEBSD1, just use COMPAT_FREEBSD4. Also fix the Linuxolator to build without the setdomainname() routine by just making it call userland_sysctl on kern.domainname. Also replace the setdomainname()'s implementation to use this approach, because we're duplicating code with sysctl_domainname(). I wasn't able to keep these three routines working in our COMPAT_FREEBSD32, because that would require yet another keyword for syscalls.master (COMPAT4+NOPROTO). Because this routine is probably unused already, this won't be a problem in practice. If it turns out to be a problem, we'll just restore this functionality. Reviewed by: rdivacky, kib
* Implement robust futexes. Most of the code is modelled afterrdivacky2008-05-131-2/+4
| | | | | | | | | | | what Linux does. This is because robust futexes are mostly userspace thing which we cannot alter. Two syscalls maintain pointer to userspace list and when process exits a routine walks this list waking up processes sleeping on futexes from that list. Reviewed by: kib (mentor) MFC after: 1 month
* Add stubs for syscalls introduced in Linux 2.6.17 kernel.jkim2008-04-161-0/+6
| | | | | | Some GNU libc version started using them before 2.6.17 was officially out. MFC after: 3 days
* Implement the linux syscallskib2008-04-081-13/+24
| | | | | | | | | openat, mkdirat, mknodat, fchownat, futimesat, fstatat, unlinkat, renameat, linkat, symlinkat, readlinkat, fchmodat, faccessat. Submitted by: rdivacky Sponsored by: Google Summer of Code 2007 Tested by: pho
* Implement sched_setaffinity and get_setaffinity usingrdivacky2008-03-161-1/+2
| | | | | | | real cpu affinity setting primitives. Reviewed by: jeff Approved by: kib (mentor)
* The kernel version of Linux statfs64 is actually supposed to takedwmalone2007-09-181-1/+1
| | | | | | | | | | | | | 3 arguments, but we had forgotten the second argument. Also make the Linux statfs64 struct depend on the architecture because it has an extra 4 bytes padding on amd64 compared to i386. The three argument fix is from David Taylor, the struct statfs64 stuff is my fault. With this patch I can install i386 Linux matlab on an amd64 machine. Submitted by: David Taylor <davidt_at_yadt.co.uk> Approved by: re (kensmith)
* Implement fake linux sched_getaffinity() syscall to enable java to workkib2007-08-281-1/+2
| | | | | | | | | | with Linux 2.6 emulation. This shall be reimplemented once FreeBSD gets native scheduler affinity syscalls. Submitted by: rdivacky Reviewed by: jkim Sponsored by: Google Summer of Code 2007 Approved by: re (kensmith)
* Implement the openat() linux syscalljulian2007-03-291-1/+2
| | | | | Submitted by: Roman Divacky (rdivacky@) MFC after: 2 weeks
* MFP4: 113025, 113146, 113177, 113203, 113500, 113546, 113570jkim2007-02-151-1/+1
| | | | | | | | - PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC. Linux/ia64's i386 emulation layer does this and it complies with Linux header files. This fixes mmap05 LTP test case on amd64. - Do not adjust stack size when failure has occurred. - Synchronize i386 mmap/mprotect with amd64.
* MFp4 (111746, 108671, 108945, 112352):netchild2006-12-311-2/+6
| | | | | | | | | - add linux utimes syscall [1] - add linux rt_sigtimedwait syscall [2] Submitted by: "Scot Hetzel" <swhetzel@gmail.com> [1] Submitted by: Bruce Becker <hostmaster@whois.gts.net> [2] PR: 93199 [2]
* Add linux_nanosleep() and regen.jkim2006-12-201-3/+3
|
* Backout the linux aio stuff. Several problems where identified and thenetchild2006-10-291-5/+5
| | | | | | | | | | | | | | | dynamic nature (if no native aio code is available, the linux part returns ENOSYS because of missing requisites) should be solved differently than it is. All this will be done in P4. Not included in this commit is a backout of the changes to the native aio code (removing static in some places). Those changes (and some more) will also be needed when the reworked linux aio stuff will reenter the tree. Requested by: rwatson Discussed with: rwatson
* MFP4:netchild2006-10-281-1/+2
| | | | | | | Implement prctl(). Submitted by: rdivacky Tested with: LTP
* MFP4 (with some minor changes):netchild2006-10-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the linux_io_* syscalls (AIO). They are only enabled if the native AIO code is available (either compiled in to the kernel or as a module) at the time the functions are used. If the AIO stuff is not available there will be a ENOSYS. From the submitter: ---snip--- DESIGN NOTES: 1. Linux permits a process to own multiple AIO queues (distinguished by "context"), but FreeBSD creates only one single AIO queue per process. My code maintains a request queue (STAILQ of queue(3)) per "context", and throws all AIO requests of all contexts owned by a process into the single FreeBSD per-process AIO queue. When the process calls io_destroy(2), io_getevents(2), io_submit(2) and io_cancel(2), my code can pick out requests owned by the specified context from the single FreeBSD per-process AIO queue according to the per-context request queues maintained by my code. 2. The request queue maintained by my code stores contrast information between Linux IO control blocks (struct linux_iocb) and FreeBSD IO control blocks (struct aiocb). FreeBSD IO control block actually exists in userland memory space, required by FreeBSD native aio_XXXXXX(2). 3. It is quite troubling that the function io_getevents() of libaio-0.3.105 needs to use Linux-specific "struct aio_ring", which is a partial mirror of context in user space. I would rather take the address of context in kernel as the context ID, but the io_getevents() of libaio forces me to take the address of the "ring" in user space as the context ID. To my surprise, one comment line in the file "io_getevents.c" of libaio-0.3.105 reads: Ben will hate me for this REFERENCE: 1. Linux kernel source code: http://www.kernel.org/pub/linux/kernel/v2.6/ (include/linux/aio_abi.h, fs/aio.c) 2. Linux manual pages: http://www.kernel.org/pub/linux/docs/manpages/ (io_setup(2), io_destroy(2), io_getevents(2), io_submit(2), io_cancel(2)) 3. Linux Scalability Effort: http://lse.sourceforge.net/io/aio.html The design notes: http://lse.sourceforge.net/io/aionotes.txt 4. The package libaio, both source and binary: http://rpmfind.net/linux/rpm2html/search.php?query=libaio Simple transparent interface to Linux AIO system calls. 5. Libaio-oracle: http://oss.oracle.com/projects/libaio-oracle/ POSIX AIO implementation based on Linux AIO system calls (depending on libaio). ---snip--- Submitted by: Li, Xiao <intron@intron.ac>
* Use AUE_CREAT instead of AUE_O_CREAT for linux_creat().rwatson2006-09-211-1/+1
| | | | Obtained from: TrustedBSD Project
* Use AUE_GETDIRENTRIES instead of AUE_O_GETDENTS and AUE_NULL for a numberrwatson2006-09-211-13/+14
| | | | | | | | | | | | | of directory reading system calls. Respell a mis-spelled event name. Clean up white space/line wraps in a couple of places. Assign event numbers to some new system call entries that have turned up in the list since audit support was added. Obtained from: TrustedBSD Project
* Add the linux statfs64 call. This allows Tivoli backup to proceed a littlenetchild2006-08-271-1/+1
| | | | | | | | | but further on -current (still not successful, but a step into the right direction). Sponsored by: Google SoC 2006 Submitted by: rdivacky Tested by: Paul Mather <paul@gromit.dlib.vt.edu>
* Add new syscalls in the linuxolator (only used when the sysctlnetchild2006-08-151-28/+39
| | | | | | | | | | compat.linux.osrelease is changed to "2.6.16" or similar). On amd64 not everything is supported like on i386, the catchup is planned for later when the remaining bugs in the new functions are fixed. Sponsored by: Google SoC 2006 Submitted by: rdivacky
* Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used tojhb2006-07-281-280/+280
| | | | | | | | | mark system calls as being MPSAFE: - Stop conditionally acquiring Giant around system call invocations. - Remove all of the 'M' prefixes from the master system call files. - Remove support for the 'M' prefix from the script that generates the syscall-related files from the master system call files. - Don't explicitly set SYF_MPSAFE when registering nfssvc.
* Various fixes to comments in the syscall master files including removingjhb2006-07-281-7/+2
| | | | cruft from the audit import and adding mention of COMPAT4 to freebsd32.
* - Pass the MPSAFE flag to namei() in linux_uselib() and handle conditionaljhb2006-07-211-1/+1
| | | | | | | | | | | | | Giant VFS locking in that function. - Remove bogus code to handle the case where namei() returns success but a NULL vnode pointer. - Note that this code duplicates exec_check_permissions() and annotate where it differs. - Hold the vnode lock longer to protect the write to set VV_TEXT in v_vflag. - Mark linux_uselib() MPSAFE. Reviewed by: rwatson
* - Add conditional VFS Giant locking to getdents_common() (linux ABIs),jhb2006-07-111-3/+3
| | | | | | | | ibcs2_getdents(), ibcs2_read(), ogetdirentries(), svr4_sys_getdents(), and svr4_sys_getdents64() similar to that in getdirentries(). - Mark ibcs2_getdents(), ibcs2_read(), linux_getdents(), linux_getdents64(), linux_readdir(), ogetdirentries(), svr4_sys_getdents(), and svr4_sys_getdents64() MPSAFE.
* - Protect the list of linux ioctl handlers with an sx lock.jhb2006-07-061-1/+1
| | | | | | - Hold Giant while calling linux ioctl handlers for now as they aren't all known to be MPSAFE yet. - Mark linux_ioctl() MPSAFE.
* - Add a kern_semctl() helper function for __semctl(). It accepts a pointerjhb2006-06-271-1/+1
| | | | | | | to a copied-in copy of the 'union semun' and a uioseg to indicate which memory space the 'buf' pointer of the union points to. This is then used in linux_semctl() and svr4_sys_semctl() to eliminate use of the stackgap. - Mark linux_ipc() and svr4_sys_semsys() MPSAFE.
* - Expand the scope of Giant some in mount(2) to protect the vfsp structurejhb2006-06-271-3/+3
| | | | | | | | from going away. mount(2) is now MPSAFE. - Expand the scope of Giant some in unmount(2) to protect the mp structure (or rather, to handle concurrent unmount races) from going away. umount(2) is now MPSAFE, as well as linux_umount() and linux_oldumount(). - nmount(2) and linux_mount() were already MPSAFE.
* linux_brk() is MPSAFE.jhb2006-06-261-1/+1
|
* Switch to using the DUMMY infrastructure instead of UNIMPL for the newnetchild2006-06-201-58/+58
| | | | | | | | | | | | syscalls. This way there will be a log message printed to the console (this time for real). Note: UNIMPL should be used for syscalls we do not implement ever, e.g. syscalls to load linux kernel modules. Submitted by: rdivacky Sponsored by: Goole SoC 2006 P4 IDs: 99600, 99602
* MFP4 (soc2006/rdivacky_linuxolator)netchild2006-06-131-1/+44
| | | | | | | | | | | | | Update of syscall.master: o Adding of several new dummy syscalls (268-310) o Synchronization of amd64 syscall.master with i386 one o Auditing added to amd64 syscall.master o Change auditing type for lstat syscall (bugfix). [1] P4-Changes: 98672, 98674 Noticed by: rwatson [1] Sponsored by: Google SoC 2006 Submitted by: rdivacky
* Implement rt_sigpending in the linuxolator.netchild2006-05-101-1/+2
| | | | | PR: 92671 Submitted by: Markus Niemist"o <markus.niemisto@gmx.net>
* Fixup some problems in my previous commit (COMPAT_43).netchild2006-03-181-3/+3
| | | | Pointyhat to: netchild
* Get rid of the need of COMPAT_43 in the linuxolator.netchild2006-03-181-11/+7
| | | | | Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz> Obtained from: DragonFly (some parts)
* Assign audit event identifiers to Linux i386 system calls.rwatson2006-02-061-169/+177
| | | | Obtained from: TrustedBSD Project
* Make a pass through all the compat ABIs sychronizing the MP safe flagsjhb2005-07-131-125/+125
| | | | | | | with the master syscall table as well as marking several ABI wrapper functions safe. MFC after: 1 week
* Properly convert FreeBSD priority values into Linux values in thesobomax2005-06-081-1/+1
| | | | | | | getpriority(2) syscall. PR: kern/81951 Submitted by: Andriy Gapon <avg@icyb.net.ua>
* Introduce a new field in the syscalls.master file format to hold therwatson2005-05-301-313/+397
| | | | | | | | | | | | | audit event identifier associated with each system call, which will be stored by makesyscalls.sh in the sy_auevent field of struct sysent. For now, default the audit identifier on all system calls to AUE_NULL, but in the near future, other BSM event identifiers will be used. The mapping of system calls to event identifiers is many:one due to multiple system calls that map to the same end functionality across compatibility wrappers, ABI wrappers, etc. Submitted by: wsalamon Obtained from: TrustedBSD Project
* Handle unimplemented syscall by instantly returning ENOSYS instead of sendingsobomax2005-03-071-0/+4
| | | | | | | signal first and only then returning ENOSYS to match what real linux does. PR: kern/74302 Submitted by: Travis Poppe <tlp@LiquidX.org>
* Add a few stub syscalls to get TransGaming's winex a bit closer todfr2004-09-061-3/+3
| | | | working.
* Fix the ABI wrappers to use kern_fcntl() rather than calling fcntl()jhb2004-08-241-2/+2
| | | | | | | | directly. This removes a few more users of the stackgap and also marks the syscalls using these wrappers MP safe where appropriate. Tested on: i386 with linux acroread5 Compiled on: i386, alpha LINT
* Use the BSD madvise() syscall implementation for Linux binary emulation,bms2004-03-281-1/+1
| | | | | | | | instead of treating it as an unimplemented syscall. This appears to make StarOffice 7.0 Linux binaries work according to submitter; also tested with nvidia driver by submitter. Submitted by: Matthias Schuendehuette
* - Mark ABI syscalls that call wait4() MP safe as recent changes tojhb2004-03-151-3/+3
| | | | | | the kernel wait4() made these all panic() implementations otherwise. - The i386 linux_ptrace() syscall is MP safe. Alpha was already marked MP safe.
* The following compat syscalls are now mpsafe: linux_getrlimit(),jhb2004-02-041-3/+3
| | | | | | | linux_setrlimit(), linux_old_getrlimit(), osf1_getrlimit(), osf1_setrlimit(), svr4_sys_ulimit(), svr4_sys_setrlimit(), svr4_sys_getrlimit(), svr4_sys_setrlimit64(), svr4_sys_getrlimit64(), ibcs2_sysconf(), and ibcs2_ulimit().
* GC unused third namespace column.peter2003-12-231-311/+268
|
* Pull latest changes from OpenBSD:sobomax2003-11-161-0/+46
| | | | | | | | | | | - improve sysinfo(2) syscall; - add dummy fadvise64(2) syscall; - add dummy *xattr(2) family of syscalls; - add protos for the syscalls 222-225, 238-249 and 253-267; - add exit_group(2) syscall, which is currently just wired to exit(2). Obtained from: OpenBSD MFC after: 2 weeks
* Sync up MP safe flags with global syscalls.master for the first time. Thisjhb2003-11-071-68/+68
| | | | | | | | | | | | | | | | | | | | includes read(), write(), close(), linux_setuid16(), linux_getuid16(), linux_pause(), linux_nice(), linux_kill(), dup(), linux_pipe(), linux_setgid16(), linux_getgid16(), linux_signal(), linux_geteuid16(), linux_getegid16(), acct(), setpgid(), umask(), dup2(), getppid(), getpgrp(), setsid(), linux_sigaction(), linux_sgetmask(), linux_ssetmask(), linux_setreuid16(), linux_setregid16(), linux_sigsuspend(), getrusage(), gettimeofday(), linux_getgroups16(), linux_setgroups16(), getpriority(), setpriority(), linux_sigreturn(), linux_clone(), linux_sigprocmask(), linux_getsid(), mlock(), munlock(), mlockall(), munlockall(), sched_setparam(), sched_getparam(), linux_sched_setscheduler(), linux_sched_getscheduler(), linux_sched_get_priority_max(), linux_sched_get_priority_min(), sched_rr_get_interval(), linux_setresuid16(), linux_getresuid16(), linux_setresgid16(), linux_getresgid16(), linux_rt_sigaction(), linux_rt_sigprocmask(), linux_rt_sigsuspend(), geteuid(), getegid(), setreuid(), setregid(), linux_getgroups(), linux_setgroups(), setresuid(), getresuid(), setresgid(), getresgid(), setuid(), and setgid().
* Mark linux_getpid(), linux_getuid() and linux_getgid() as MPSAFE.tjr2003-02-201-3/+3
|
* Mark linux_sigpending() as MPSAFE.tjr2003-02-161-1/+1
|
* Back out last commit. Linux uses the old 4.3BSD sockaddr format.mini2002-09-241-3/+4
|
* Don't use compatability syscall wrappers in emulation code.mini2002-09-231-4/+3
| | | | | | This is needed for the COMPAT_FREEBSD3 option split. Reviewed by: alfred, jake
* Sparkling new implementation of linux_ptrace. Slight tweaking bymarcel2002-05-191-1/+2
| | | | | | | yours truly. PR: 33299 Submitted by: Alexander N. Kabaev <ak03@gte.com>
* o Change prototype of linux_lchown and linux_chown so that themarcel2001-10-161-6/+5
| | | | | | | | | argument names match those on Alpha. o Map the fchown directly to FreeBSD. Since the old version of fchown is also mapped to the native fchown, give the new one type NODEF. Tested by: Martin Blapp <mb@imp.ch>
OpenPOWER on IntegriCloud