summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_dummy.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r313284:dchagin2017-02-221-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update syscall.master to 4.10-rc6. Also fix comments, a typo, and wrong numbering for a few unimplemented syscalls. For 32-bit Linuxulator, socketcall() syscall was historically the entry point for the sockets API. Starting in Linux 4.3, direct syscalls are provided for the sockets API. Enable it. The initial version of patch was provided by trasz@ and extended by me. MFC r313285: Regen after r313284. MFC r313684: Fix r313284. Members of the syscall argument structures are padded to a word size. So, for COMPAT_LINUX32 we should convert user supplied system call arguments which is 32-bit in that case to the array of register_t. MFC r313912: Finish r313684. Convert linux_recv(), linux_send() and linux_accept() system call arguments to the register_t type too.
* Implement fstatfs64 system call.dchagin2016-03-201-1/+0
| | | | | | PR: 181012 Submitted by: John Wehle MFC after: 1 week
* Implement Linux specific syncfs() system call.dchagin2015-05-241-1/+0
|
* Implement recvmmsg() and sendmmsg() system calls.dchagin2015-05-241-2/+0
|
* Implement epoll_pwait() system call.dchagin2015-05-241-1/+0
|
* Add utimensat() system call.dchagin2015-05-241-1/+0
| | | | | The patch developed by Jilles Tjoelker and Andrew Wilcox and adopted for lemul branch by me.
* Add preliminary fallocate system call implementationdchagin2015-05-241-2/+0
| | | | | | | to emulate posix_fallocate() function. Differential Revision: https://reviews.freebsd.org/D1523 Reviewed by: emaste
* Implement ppoll() system call.dchagin2015-05-241-1/+0
| | | | | Differential Revision: https://reviews.freebsd.org/D1105 Reviewed by: trasz
* Implement eventfd system call.dchagin2015-05-241-2/+0
| | | | | Differential Revision: https://reviews.freebsd.org/D1094 In collaboration with: Jilles Tjoelker
* Implement epoll family system calls. This is a tiny wrapperdchagin2015-05-241-4/+0
| | | | | | | | | | | | around kqueue() to implement epoll subset of functionality. The kqueue user data are 32bit on i386 which is not enough for epoll user data, so we keep user data in the proc emuldata. Initial patch developed by rdivacky@ in 2007, then extended by Yuri Victorovich @ r255672 and finished by me in collaboration with mjg@ and jillies@. Differential Revision: https://reviews.freebsd.org/D1092
* Implement pselect6() system call.dchagin2015-05-241-1/+0
| | | | | Differential Revision: https://reviews.freebsd.org/D1051 Reviewed by: trasz
* Implement prlimit64() system call.dchagin2015-05-241-2/+0
| | | | | Differential Revision: https://reviews.freebsd.org/D1050 Reviewed by: emaste, trasz
* Implement dup3() system call.dchagin2015-05-241-1/+0
| | | | | Differential Revision: https://reviews.freebsd.org/D1049 Reviewed by: emaste
* Implement rt_sigqueueinfo() system call.dchagin2015-05-241-1/+0
| | | | | Differential Revision: https://reviews.freebsd.org/D1047 Reviewed by: trasz
* Implement waitid() system call.dchagin2015-05-241-1/+0
| | | | Differential Revision: https://reviews.freebsd.org/D1046
* - For kernel compiled only with KDTRACE_HOOKS and not any lock debuggingattilio2013-11-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | option, unbreak the lock tracing release semantic by embedding calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined version of the releasing functions for mutex, rwlock and sxlock. Failing to do so skips the lockstat_probe_func invokation for unlocking. - As part of the LOCKSTAT support is inlined in mutex operation, for kernel compiled without lock debugging options, potentially every consumer must be compiled including opt_kdtrace.h. Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES is linked there and it is only used as a compile-time stub [0]. [0] immediately shows some new bug as DTRACE-derived support for debug in sfxge is broken and it was never really tested. As it was not including correctly opt_kdtrace.h before it was never enabled so it was kept broken for a while. Fix this by using a protection stub, leaving sfxge driver authors the responsibility for fixing it appropriately [1]. Sponsored by: EMC / Isilon storage division Discussed with: rstone [0] Reported by: rstone [1] Discussed with: philip
* Revert r255672, it has some serious flaws, leaking file references etc.rdivacky2013-09-181-0/+4
| | | | Approved by: re (delphij)
* Implement epoll support in Linuxulator. This is a tiny wrapper around kqueuerdivacky2013-09-181-4/+0
| | | | | | | | | | | | | | to implement epoll subset of functionality. The kqueue user data are 32bit on i386 which is not enough for epoll user data so this patch overrides kqueue fileops to maintain enough space in struct file. Initial patch developed by me in 2007 and then extended and finished by Yuri Victorovich. Approved by: re (delphij) Sponsored by: Google Summer of Code Submitted by: Yuri Victorovich <yuri at rawbw dot com> Tested by: Yuri Victorovich <yuri at rawbw dot com>
* - >500 static DTrace probes for the linuxulatornetchild2012-05-051-0/+9
| | | | | | | | | | | | | | | | | | - DTrace scripts to check for errors, performance, ... they serve mostly as examples of what you can do with the static probe;s with moderate load the scripts may be overwhelmed, excessive lock-tracing may influence program behavior (see the last design decission) Design decissions: - use "linuxulator" as the provider for the native bitsize; add the bitsize for the non-native emulation (e.g. "linuxuator32" on amd64) - Add probes only for locks which are acquired in one function and released in another function. Locks which are aquired and released in the same function should be easy to pair in the code, inter-function locking is more easy to verify in DTrace. - Probes for locks should be fired after locking and before releasing to prevent races (to provide data/function stability in DTrace, see the man-page of "dtrace -v ..." and the corresponding DTrace docs).
* - Implement pipe2 syscall for Linuxulator. This syscall appeared in 2.6.27jkim2012-04-161-1/+0
| | | | | | | | | | but GNU libc used it without checking its kernel version, e. g., Fedora 10. - Move pipe(2) implementation for Linuxulator from MD files to MI file, sys/compat/linux/linux_file.c. There is no MD code for this syscall at all. - Correct an argument type for pipe() from l_ulong * to l_int *. Probably this was the source of MI/MD confusion. Reviewed by: emulation
* - add comments to syscalls.master and linux(32)_dummy about which linuxnetchild2012-03-101-0/+47
| | | | | | | | | | kernel version introduced the sysctl (based upon a linux man-page) - add comments to sscalls.master regarding some names of sysctls which are different than the linux-names (based upon the linux unistd.h) - add some dummy sysctls - name an unimplemented sysctl MFC after: 1 month
* Convert files to UTF-8uqs2012-01-151-1/+1
|
* Implement linux_fadvise64() and linux_fadvise64_64() usingjhb2011-12-291-2/+0
| | | | | | | kern_posix_fadvise(). Reviewed by: silence on emulation@ MFC after: 2 weeks
* linux compat: add non-dummy capget and capset system calls, regenerateavg2011-03-261-2/+0
| | | | | | | | | | And drop dummy definitions for those system calls. This may transiently break the build. PR: kern/149168 Submitted by: John Wehle <john@feith.com> Reviewed by: netchild MFC after: 2 weeks
* Implement robust futexes. Most of the code is modelled afterrdivacky2008-05-131-2/+0
| | | | | | | | | | | 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
* Implement linux_truncate64() syscall.rdivacky2008-04-231-1/+0
| | | | | Tested by: Aline de Freitas <aline@riseup.net> Approved by: kib (mentor)
* 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-12/+0
| | | | | | | | | 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 the openat() linux syscalljulian2007-03-291-1/+0
| | | | | Submitted by: Roman Divacky (rdivacky@) MFC after: 2 weeks
* MFp4 (111746, 108671, 108945, 112352):netchild2006-12-311-2/+0
| | | | | | | | | - 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]
* MFP4:netchild2006-10-281-1/+0
| | | | | | | Implement prctl(). Submitted by: rdivacky Tested with: LTP
* Add the linux statfs64 call. This allows Tivoli backup to proceed a littlenetchild2006-08-271-1/+0
| | | | | | | | | 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 the linux 2.6.x stuff (not used by default!):netchild2006-08-151-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - TLS - complete - pid/tid mangling - complete - thread area - complete - futexes - complete with issues - clone() extension - complete with some possible minor issues - mq*/timer*/clock* stuff - complete but untested and the mq* stuff is disabled when not build as part of the kernel with native FreeBSD mq* support (module support for this will come later) Tested with: - linux-firefox - works, tested - linux-opera - works, tested - linux-realplay - doesnt work, issue with futexes - linux-skype - doesnt work, issue with futexes - linux-rt2-demo - works, tested - linux-acroread - doesnt work, unknown reason (coredump) and sometimes issue with futexes - various unix utilities in linux-base-gentoo3 and linux-base-fc4: everything tried worked 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. To test this new stuff, you have to run sysctl compat.linux.osrelease=2.6.16 to switch back use sysctl compat.linux.osrelease=2.4.2 Don't switch while running a linux program, strange things may or may not happen. Sponsored by: Google SoC 2006 Submitted by: rdivacky Some suggestions/help by: jhb, kib, manu@NetBSD.org, netchild
* Switch to using the DUMMY infrastructure instead of UNIMPL for the newnetchild2006-06-201-0/+56
| | | | | | | | | | | | 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
* Implement rt_sigpending in the linuxolator.netchild2006-05-101-1/+0
| | | | | PR: 92671 Submitted by: Markus Niemist"o <markus.niemisto@gmx.net>
* regen after COMPAT_43 removalnetchild2006-03-181-1/+0
|
* Use the BSD madvise() syscall implementation for Linux binary emulation,bms2004-03-281-1/+0
| | | | | | | | 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
* Pull latest changes from OpenBSD:sobomax2003-11-161-0/+22
| | | | | | | | | | | - 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
* Use __FBSDID().obrien2003-06-021-2/+3
|
* - Add support for IPC_64 extensions into shmctl(2), semctl(2) and msgctl(2);sobomax2002-10-111-2/+0
| | | | | | | | | | | | | - add wrappers for mmap2(2) and ftruncate64(2) system calls; - don't spam console with printf's when VFAT_READDIR_BOTH ioctl(2) is invoked; - add support for SOUND_MIXER_READ_STEREODEVS ioctl(2); - make msgctl(IPC_STAT) and IPC_SET actually working by converting from BSD msqid_ds to Linux and vice versa; - properly return EINVAL if semget(2) is called with nsems being negative. Reviewed by: marcel Approved by: marcel Tested with: LSB runtime test
* Fix typo in the BSD copyright: s/withough/without/schweikh2002-06-021-1/+1
| | | | | Spotted and suggested by: des MFC after: 3 weeks
* Hook up the new linux_ptrace implementation.marcel2002-05-191-1/+0
| | | | | PR: 33299 Submitted by: Alexander N. Kabaev <ak03@gte.com>
* Implement linux_chown and linux_lchown. The fchown syscall mapsmarcel2001-10-161-3/+0
| | | | | | | directly to the native syscall, because no filename handling needs to be done. Tested by: Martin Blapp <mb@imp.ch>
* Add a wrapper for linux_getsid -> getsid Syscall.mr2001-09-151-1/+0
|
* Round of cleanups and enhancements. These include (in random order):marcel2001-09-081-39/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Introduce private types for use in linux syscalls for two reasons: 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all syscalls and remove dummy functions or implementations of truely obsolete syscalls. o Sanitize the shm*, sem* and msg* syscalls. o Make a first attempt to implement the linux_sysctl syscall. At this time it only returns one MIB (KERN_VERSION), but most importantly, it tells us when we need to add additional sysctls :-) o Bump the kenel version up to 2.4.2 (this is not the same as the KERN_VERSION MIB, BTW). o Implement new syscalls, of which most are specific to i386. Our syscall table is now up to date with Linux 2.4.2. Some highlights: - Implement the 32-bit uid_t and gid_t bases syscalls. - Implement a couple of 64-bit file size/offset bases syscalls. o Fix or improve numerous syscalls and prototypes. o Reduce style(9) violations while I'm here. Especially indentation inconsistencies within the same file are addressed. Re-indenting did not obfuscate actual changes to the extend that it could not be combined. NOTE: I spend some time testing these changes and found that if there were regressions, they were not caused by these changes AFAICT. It was observed that installing a RH 7.1 runtime environment did make matters worse. Hangs and/or reboots have been observed with and without these changes, so when it failed to make life better in cases it doesn't look like it made it worse.
* Added the linux_sysinfo function to implement sysinfo(2).pirzyk2001-07-231-1/+0
| | | | | | | PR: kern/27759 Reviewed by: marcel Approved by: marcel MFC after: 1 week
* Remove dummy stub functions.jlemon2001-02-161-3/+0
|
* Revert auto-generation. The Alpha port is broken.marcel2000-11-101-1/+1
| | | | Syncing with it is wrong.
* Sync with Alpha:marcel2000-11-091-1/+1
| | | | | Do not use sysent.c, proto.h and syscall.h in source tree; use auto-generated versions.
* A start at an implemention of linux_rt_sendsig & linux_rt_sigreturngallatin2000-10-171-1/+0
| | | | | | | | | | | | | | and associated user-level signal trampoline glue. Without this patch, an SA_SIGINFO style handler can be installed by a linux app, but if the handler accesses its sip argument, it will get a garbage pointer and likely segfault. We currently supply a valid pointer, but its contents are mainly garbage. Filling this in properly is future work. This is the second of 3 commits that will get IBM's JDK 1.3 working with FreeBSD ...
OpenPOWER on IntegriCloud