summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common
AgeCommit message (Collapse)Author
2001-12-19Add some missing ioctl()s. From Tommy Bohlin in PR kern/14414.augustss
2001-12-09replace "vnode" and "vtext" with "file" and "exec" in uvmexp field names.chs
2001-11-15don't need <sys/types.h> when including <sys/param.h>lukem
2001-11-13add RCSIDs (including regeneration of files as appropriate)lukem
2001-10-30- Add a new vnode flag VEXECMAP, which indicates that a vnode hasthorpej
executable mappings. Stop overloading VTEXT for this purpose (VTEXT also has another meaning). - Rename vn_marktext() to vn_markexec(), and use it when executable mappings of a vnode are established. - In places where we want to set VTEXT, set it in v_flag directly, rather than making a function call to do this (it no longer makes sense to use a function call, since we no longer overload VTEXT with VEXECMAP's meaning). VEXECMAP suggested by Chuq Silvers.
2001-10-14Fixed a minor problem so that it buildsmanu
2001-09-30Fixes my last commit: only mips really need fcntl64 to work now. i386 andmanu
powerpc could use it later if needed. m68k and alpha should never need it.
2001-09-30Added initial support for fcntl64 system call (file locking is notmanu
implemented)
2001-09-22Enable Mips Linux emulation in header filesmanu
2001-09-22Fixes for mips supportmanu
2001-09-18Make the setregs hook emulation-specific, rather than executablejdolecek
format specific. Struct emul has a e_setregs hook back, which points to emulation-specific setregs function. es_setregs of struct execsw now only points to optional executable-specific setup function (this is only used for ECOFF).
2001-09-08Allow the old-style sockaddr_in6 for v6 addresses for which thefvdl
scope id is irrelevant. Makes netscape6 for Linux work again, which uses v4-mapped addresses to connect to v4 sites.
2001-09-08Removed a hack to make PowerPC mmap work. This could have side effects onmanu
alpha and i386. It has been tested and works on i386.
2001-09-04change LINUX_F_SETFL so that SIGIO handling for socketsjdolecek
matches more closely add support for NEW_PIPE to the SIGIO hack
2001-08-30Changed the way signature tests are done. This makes possible to runmanu
ld.so as an executable on the PowerPC (Linux's ldd does this), and it also much clearer IMHO.
2001-08-26Moved LINUX_NCCS from MI file to MD file, because the value is differentmanu
on MIPS and sparc machines.
2001-07-29Adjust to the new copyargs() footprint.christos
2001-07-22make linux_socketcall_argsize[] static constjdolecek
2001-07-22seperate -> separatewiz
2001-07-18Add support for the __WALL wait4(2) flag.thorpej
2001-07-14rename elf32_read_from to exec_read_from since it is used in many placeschristos
now.
2001-07-04remove no longer used variablejdolecek
make 'osa' arg of linux_sa_get() const
2001-07-04Do address family (AF_*) number translation for socket system calls whichjdolecek
pass socket address in our or out. This makes Linux programs using IPv6 working under emulation. This addresses kern/13279 by Jun-ichiro itojun Hagino. Change sendmsg()/recvmsg() to expect the control information to be passed the standard way (not 4.3BSD one, imlied by compat_43 code or MSG_COMPAT). Linux uses different (arguably broken) CMSG_ALIGN() on some architectures unfortunately, that would need to be handled eventually. Also provide some other trivial stubs (like linux_sys_send()) to avoid unneeded dependance on uipc_syscalls_43.c.
2001-06-25linux_getifhwaddr(): use strncmp() to find out if if_name starts with 'eth',jdolecek
it's more readable that way
2001-06-22linux_sys_socketcall(): refuse negative 'what' valuesjdolecek
2001-06-18Add an e_trapsignal member to struct emul, so that emulated processes canchristos
send the appropriate signal depending on the trap type.
2001-06-16Removed obsoletes EMUL_NO_BSD_ASYNCIO_PIPE and EMUL_NO_SIGIO_ON_READ flags.manu
Async I/O OS specifities should now handled in OS specific code. Linux has been done, but other emulation should be handled. See case LINUX_F_SETFL in sys/compat/linux/common/linux_file.c:linux_sys_fcntl() for more details. The data that has been collected yet: Net Free Open Linux SunOS AIX OSF1 Darwin send SIGIO to write end of pipe Y N N N N N Y Y send SIGIO to read end of pipe Y Y N N N ? Y ? send SIGIO to write end of socket Y Y Y N N Y Y Y send SIGIO to read end of socket Y Y Y Y Y ? Y ?
2001-06-16Linux does not send a SIGIO to the write end of a socket,manu
neither it does send any SIGIO for pipes. If async I/O was requested, we keep the SS_ASYNC in struct socket flag set, but we clear SB_ASYNC flags on the sending buffer (for socket), and on the sending and the receiving buffer (for pipes). Because we do not alter to SS_ASYNC in struct socket, the Linux process keeps a consistent view of async I/O status if it attemps to read the async flag (SS_ASYNC) This async I/O problem does matters, since some Linux a programs such as the JDK request async I/O on pipes, but they fail if they happen to get a SIGIO to the write end of the pipe.
2001-06-14Fix a partial construction problem that can cause race conditionsthorpej
between creation of a file descriptor and close(2) when using kernel assisted threads. What we do is stick descriptors in the table, but mark them as "larval". This causes essentially everything to treat it as a non-existent descriptor, except for fdalloc(), which sees a filled slot so that it won't (incorrectly) allocate it again. When a descriptor is fully constructed, the code that has constructed it marks it as "mature" (which actually clears the "larval" flag), and things continue to work as normal. While here, gather all the code that gets a descriptor from the table into a fd_getfile() function, and call it, rather than having the same (sometimes incorrect) code copied all over the place.
2001-06-04Fixes by Chuck Silvers to make ptrace PEEKTEXT more 64 bit friendymanu
2001-06-03added a double cast to build on alphamanu
2001-06-02Slighly improve the PTRACE_CONT commentjdolecek
2001-05-30use _KERNEL_OPT.mrg
2001-05-27Fixed the return value of ptrace for PEEKTEXT and PEEKDATA: return value mustmanu
be a pointer to data, which holds the result. Linux's glibc undo this odd operation to bring the standard ptrace behavior to userland.
2001-05-22Enable PowerPC Linux ptrace() emulationmanu
2001-05-22When c_ospeed in termio is null, NetBSD hangup the terminal. Since Linuxmanu
does not do this, we fake null c_ospeed values by -1 in the kernel, so that NetBSD does not hangup.
2001-05-20Added powerpc status in a commentmanu
2001-05-15This file is not used on alpha, and it causes some warning that break themanu
build. Added an ifdef to ignore the file content for alpha (not tested)
2001-05-13Improved the accuracy of gettimeofday/settimeofday: Linux stores a srtuctmanu
timezone in the kernel. We now keep track of it for emulated processes. Tested for powerpc and i386. Untested on m68k, but it should be ok Alpha has a particular implementation (osf1_sys_gettimeofday), and it has therefore not been touched.
2001-05-07Changed EMUL_BSD_ASYNCIO_PIPE to EMUL_NO_BSD_ASYNCIO_PIPE, so thatmanu
the native emulation (NetBSD) does not have a flag.
2001-05-06Added two flags to emulation packages:manu
EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and write(). OSes without this flag do not expect any SIGIO to be fired on read() and write() for pipes, even when async I/O was requested. As far as we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and Darwin. EMUL_NO_SIGIO_ON_READ notes that the emulated binaries that requested asynchrnous I/O expect the reader process to be notified by a SIGIO, but not the writer process. OSes without this flag expect the reader and the writer to be notified when some data has arrived or when some data have been read. As far as we know, the OSes that need EMUL_NO_SIGIO_ON_READ are Linux and SunOS.
2001-03-30Implement linux_sys_nosys() and use it instead of sys_nosys() forjdolecek
unimplemented syscalls. Difference is that linux_sys_nosys() doesn't post SIGSYS to the process. Linux doesn't do that and thus glibc (and probably other Linux code) doesn't deal with SIGSYS, even through it generally contains fallback code for ENOSYS case. This also addresses port-i386/12503, though the issue was already discussed earlier.
2001-03-29Don't do the ioctl call for the get hw addr case, all the work hasfvdl
been done already.
2001-03-24Use parent's vmspace in linux_e_proc_fork() hook, the child does notjdolecek
have vmspace setup yet. This fixes lossage discussed on current-users, thread "hard lockups with -current and Netscape", and should fix kern/12433 by <kawamoto@tenjin.org>, maybe also kern/12455. XXX Threads forked via linux_sys_clone() should share the brk value XXX if they share vmspace. This needs to be implemented.
2001-03-22do not dereference p_vmspace, if it is not initialized yet (NULL).itojun
2001-03-16Removed an unused oldbrk variable in linux_sys_brk()manu
2001-03-15Made linux_sys_brk() cleaner (no functionnality change)manu
2001-03-15Fixed brk() emulation. We now keep track of the processes' idea of themanu
break value. See http://mail-index.netbsd.org/tech-kern/2001/03/15/0000.html for more details.
2001-02-21make some more constant arrays 'const'jdolecek
2001-02-11Moved the fix for negative errno returned to userland on the PowerPC to amanu
more machine independent fashion