Commit Graph

2403 Commits

Author SHA1 Message Date
tron
add83289ca Move implementation of linux_sys_getdents64() to source file for
Linux 64bit filesystem calls.
2002-05-10 14:38:08 +00:00
thorpej
27f38656ef Add missing const. 2002-05-05 08:23:03 +00:00
martin
8ff591e85d Add missing prototype for compat_43_netbsd32_sigsetmask. 2002-05-04 12:54:03 +00:00
manu
83c4aab4e2 bug for bug emulation of IRIX: on some device, including
/dev/usemaclone, fchmod returns 0 on faillure, and libc
depends on that behavior.
2002-05-04 07:45:05 +00:00
eeh
8da818b968 __LP64__ -> _LP64 2002-05-03 01:34:48 +00:00
eeh
89e107d917 Regen. 2002-05-03 00:22:16 +00:00
eeh
9bd29db83b Use #if defined(_LP64) to determine if we're generating 64-bit binaries,
not #if defined(alpha).
2002-05-03 00:20:56 +00:00
manu
494d226a5d Added GETSHMASK command to prctl(). This is incomplete, we do not really
keep track of the shmask yet. (It could go in p->p_emuldata)
2002-05-02 17:17:29 +00:00
manu
27cb16e028 sproc: Correctly interpret NULL stack and stacklen when shared vm space is not
requested
2002-04-29 16:01:12 +00:00
manu
36b681f651 Added a void framework for usync_cntl(), which is another undocumented IRIX
system call.
2002-04-29 14:40:23 +00:00
mrg
86477819ce regenerate. 2002-04-29 09:55:11 +00:00
mrg
0ce90a9fef build the netbsd32_compat* objects into libcompat.a, so they are available
to emulations not just netbsd itself.  rename the compat_10 functions to
match everything else.  fixes a problem reported by julian coleman.
2002-04-29 09:53:39 +00:00
manu
adc1ff6c40 Added pread() and pwrite() 2002-04-28 20:23:21 +00:00
manu
fc1efb9ee8 Use stack rlimit for the stack size, and not the current stack size. This
avoids requestion 2*rlimit on second sproc call.
2002-04-28 19:42:13 +00:00
manu
c2f72d8d1c Updated PR_GETNSHARE and added PR_TERMCHILD 2002-04-28 17:56:53 +00:00
manu
3568060679 Implements IRIX sproc(2) and friends.
There may be a problem with stack size overflow in this implementation
2002-04-28 17:21:58 +00:00
manu
ee5b3b3977 Added a void IRIX /dev/usema and /dev/usemaclone pseudodevice driver.
IRIX uses this for implementing atomics operation on semaphores

This will be filled later.
2002-04-23 05:51:14 +00:00
manu
f599dce291 Added fchdir, fchown and fchmod system calls 2002-04-23 05:47:38 +00:00
manu
0e9a3e0d43 - We now use irix_sys_mmap instead of svr4_sys_mmap
- initial support for MAP_AUTOGROW flag. When mapping beyond the end of file is
requested with MAP_AUTOGROW, if pages beyond the end of file are touched, the
file should be resized. We are not able to emulate this yet, so we immediatly
resize the file to fit the whole mapping.
- implements mmap64
2002-04-22 05:58:46 +00:00
manu
4678e0b326 Fixed functions to get the number of CPU in sysmp() and systeminfo(). The
problam was that when hw_sysctl() is used, the result is supposed to be
in userland
2002-04-20 21:25:01 +00:00
manu
ded3c31a9c On IRIX, fcntl F_FREESP, F_ALLOCSP, F_FREESP64 and F_ALLOCSP64 commands
ignore the len argument. We now correctly emulate the behavior of these
commands.
2002-04-20 20:38:21 +00:00
manu
e67d46d7af Added one more system call: msync 2002-04-20 16:56:28 +00:00
manu
21d2265eea Fixed mistakes in irix_sys_fcntl() (missing breaks in case statement) 2002-04-20 16:20:12 +00:00
manu
d5ed80d9c6 The IRIX usinit(3) function expects a page of memory to be available at
address 0x200000 (disasembling usinit shows that this address is hardcoded in
libc). It uses it for locks and semaphres.

We therefore allocate this page of memory, to prevent IRIX process from
faulting when thay call usinit(3).
2002-04-20 16:19:22 +00:00
manu
1f32c2b1c4 One more unsupported feature: SGI_SATCTL 2002-04-20 07:43:35 +00:00
manu
829bfed008 Added missing irix_misc.c 2002-04-20 07:42:32 +00:00
manu
5261d673c9 Added getpgrp/setpgrp.
setpgrp is stolen from compat/sunos. It should probbaly be moved to
/compat/common
2002-04-16 20:15:47 +00:00
manu
08948f97d1 Added sysconf(SC_IP_SECOPTS) 2002-04-16 20:15:03 +00:00
manu
28a3cfe032 Do not restore SR on sigreturn: this could enable the user process to gain
unpropre privileges.
2002-04-15 20:48:12 +00:00
manu
f8c12b3107 IRIX provide a signal trampoline in libc, we now use it.
- the signal trampoline address is given to the kernel by a sigaction()
  fourth argument
- we introduce an irix_emuldata structure to keep track of the signal
  trampoline address
- we don't support per-sigaction signal trampolines, we only do per-process
- now that we use the IRIX libc signal trampoline, we do not have to handle
  the errno update from the signal trampoline
- it is possible that IRIX 5 signal delivery works too, since theses binaries
  will come with their own signal trampoline
2002-04-14 21:50:49 +00:00
manu
c56e133974 More comments on the new signal frame/trampoline 2002-04-13 10:52:59 +00:00
manu
5ee554064d Reworked IRIX signal delivery so that ucontext is used instead of sigcontext
when SA_SIGINFO is used. The IRIX process will hence find the expected
information using the third argument of the signal handler.

We do not provide code and siginfo yet.
2002-04-12 18:44:57 +00:00
manu
78583a4567 Always define SA_SIGINFO, and keep track of it in SVR4 emulation. This is
needed for IRIX signal delivery.
Approved by Christos.
2002-04-12 17:37:30 +00:00
christos
10ecebd46a implement getdents64; my full java tree builds now. 2002-04-10 18:19:34 +00:00
christos
7e9e73a53c regen 2002-04-10 18:19:04 +00:00
christos
db952e86f3 add getdents64 2002-04-10 18:18:26 +00:00
itojun
9998fd3a57 revert previous 2002-04-10 09:53:01 +00:00
itojun
7aef2b4e07 make it compile (missing includes) 2002-04-10 09:37:51 +00:00
christos
ca4d90ffa1 Fix compile problem. 2002-04-08 14:51:29 +00:00
christos
b10c779726 #ifdef __alpha__ pal functions. 2002-04-08 14:51:18 +00:00
christos
bd432c1642 PR/16236: Joachim Koenig-Baltes: Linux emulation connect requires IPV6.
Apparently the sockaddr len fix was only compiled when IPV6 was enabled.
2002-04-08 14:00:31 +00:00
christos
866ad0f73f PR/16231: Ben Harris: m68k does not compile. 2002-04-08 13:27:37 +00:00
manu
fb46073720 backed out the irix_siginfo field name change: we need different field names
to avoid collision with svr4_siginfo #define si_signo  _info._signo and
friends.
2002-04-06 22:58:43 +00:00
manu
8e8b498d9c Changed irix_siginfo field names to make them closer to svr4 names (and to
original IRIX names too)
2002-04-06 18:08:31 +00:00
christos
e9c4f70b2f use lsi_ like all other linux emulations. 2002-04-04 22:17:29 +00:00
tron
d09c25ca9a Set default kernel version of Linux emulation to 2.4.18 on the i386 port.
It has been successfully tested using SuSE 7.3 libraries and binaries with
many applications.
2002-04-04 09:32:11 +00:00
christos
cb483bd247 make this compile on archs that don't define linux signals. 2002-04-03 17:18:21 +00:00
christos
f28b55d327 provide missing types for arch's that don't have specific linux_types.h 2002-04-03 17:13:32 +00:00
christos
aa3369abe2 don't bail out if we don't have an arch/siginfo.h because we are being used
from userland.
2002-04-03 17:02:12 +00:00
tron
9121bc2ec4 Fix a cut and paste error in the emulation of getresgid(2): it returned
the effective user id as effective group id.
2002-04-03 14:28:36 +00:00
fvdl
221107a13b Use shmat1(), and tell it to find removed segments. 2002-04-03 11:54:37 +00:00
fvdl
7fc44e13a8 Allocate the right size for the native gid_t array in setgroups16. 2002-04-03 10:17:01 +00:00
christos
fa33d13de9 Don't blow up if we don't have a machine dependend linux_signal.h.
kdump includes linux_signo.c
2002-04-02 23:25:07 +00:00
christos
eda21311fd save/restore fs and gs; this should be pulled up. 2002-04-02 22:32:16 +00:00
manu
4bca6e2fd0 Added fsync 2002-04-02 20:29:52 +00:00
jdolecek
ee37f0c738 rename sysctl_linux() to linux_sysctl() and hook it into emul_linux 2002-04-02 20:23:43 +00:00
manu
062e23b4e2 Added IRIX fcntl(F_GETBSDLK) and fcntl(F_GETBSDLKW) 2002-04-02 19:58:38 +00:00
manu
456cced40e Removed one debug line that was committed by mistake 2002-04-01 15:45:16 +00:00
manu
a98e52cc55 Added code to handle FPU and signal stack for IRIX signal delivery
(copied from the native version, not tested yet)
2002-04-01 13:42:36 +00:00
christos
840887afee bring the reverse signal mapping array into linux_signo.c 2002-03-31 22:40:16 +00:00
christos
ac29fb3782 make signal array handling uniform, and put signal arrays in a separate
file. This is simular to errno array handling.
2002-03-31 22:22:43 +00:00
christos
018a4082cc - #undef DPRINTF for files that are included from other files.
- more debugging for socketcalls
- fix sa_len if AF_INET; somehow we get passed 28 instead of 16?
2002-03-29 20:49:40 +00:00
kent
dad83731c1 pecoff_misc.c: Remove compat functions.
pecoff_sys*.[ch]: regen
2002-03-29 17:04:46 +00:00
christos
c9e808f0ee 1. fill in the ldt.sd_xx field, for total compat with linux.
2. in setregs, use gdt's instead of ldt's because linux wants to play with
   all the ldts. Apparently linuxthreads uses ldt's to allocate space for
   pthread_t's.
2002-03-29 17:01:49 +00:00
kent
e6ef08a13e Exclude all compat syscalls. 2002-03-29 17:00:43 +00:00
manu
4a466c8fec Added proper locks when calling uvm_swap_stats() 2002-03-29 09:06:54 +00:00
manu
2dd126f08e Fixed the swap block size problem: the swap block size as used in struct
swapent, or as seen in userland, is dbtob(1), which turns to be 512 for all
arch for now.

In struct swapdev, there is another field for block size. This value is private
to uvm_swap.c and is only used for swap I/O on regular files. It is equal to
the underlying device block size and it is not necessarily 512.
2002-03-28 18:45:28 +00:00
manu
9278164721 - now reports accurate swap object size with swapctl(SWAP_STATS)
- Added two more swapctl commands: GETFREESWAP and GETSWAPVIRT.

There is a problem in the way swap block size are found here. See comment
in get_block_size().
2002-03-28 13:14:42 +00:00
manu
2ad173ef3f Added syssgi(SETSID) 2002-03-28 12:59:35 +00:00
manu
50ac30b510 - now return real values in the rminfo system accounting structure. Theses
are not 100% accurate, but it should be okay for most programs
- fix a bug: we were doing the copyout of the struct on failure, not success
2002-03-28 10:37:46 +00:00
manu
5c37c50788 Use irix_sys_sigprocmask instead of svr4_sys_sigprocmask to make use
of the SETMASK32 command.
2002-03-28 10:36:14 +00:00
manu
fff388471d Added the SETMASK32 command for sigprocmask(2). This is equivalent to
SETMASK except that the upper 32 bits are left untouched
2002-03-26 22:59:32 +00:00
manu
58537aa4d9 Fixed a typo in DEBUG_IRIX code 2002-03-26 16:58:56 +00:00
manu
a4085df772 - Uses p->p_stats->p_ru instead of p->P_ru to get ressource usage, since
p->p_ru sometime happens to be equal to 0xdeadbeef.

- added more debug output.
2002-03-26 16:38:12 +00:00
manu
a0fa2e7fa5 Added support for sysmp system accounting structures. Only real memory info
is defined yet, but it returns zeroes (will be fixed later).
2002-03-26 10:54:40 +00:00
manu
2ccdf1d7ec Added truncate(2), ftruncate(2), truncate64() and ftruncate64(), the two latter
being untested yet.
2002-03-26 10:52:52 +00:00
manu
76084f5561 Added syssgi(PATHCONF), which implements pathconf(2), and syssgi(SETPGID)
which implements setpgid(2).
2002-03-25 20:42:50 +00:00
manu
0e9d73c741 Added support for IRIX kernel var emulation in kmem (not functionnal yet) 2002-03-25 18:43:59 +00:00
kent
d92d45e16c Move a variable `emul_pecoff' to new file. 2002-03-25 06:44:46 +00:00
bjh21
99ba40c188 arm26->acorn26 transition. 2002-03-24 15:49:38 +00:00
jdolecek
bbee4277ca fd_revoke(): don't assume that f_type other DTYPE_VNODE and DTYPE_SOCKET
is automatically bogus, make the code return EINVAL for all non-vnode
descriptors
2002-03-24 15:32:51 +00:00
jdolecek
4cfe9dc1f6 use FILE_USE()/FILE_UNUSE() as appropriate, use malloc()/free()
instead of MALLOC()/FREE() for variable-size allocations (sync
with kern/sys_generic.c)
XXX not tested
2002-03-24 15:19:24 +00:00
jdolecek
3089d90eeb add explicit comment a FILE_USE() is not needed here 2002-03-24 15:12:45 +00:00
jdolecek
fc18dc8984 minor indentation fix 2002-03-24 15:03:00 +00:00
oki
b10ef43c8e Read /usr/libexec/ld.so.dll if failed to read
/emul/pecoff/usr/libexec/ld.so.dll.
reported via IRC from kent, thanks.
2002-03-24 05:55:49 +00:00
jdolecek
0b5e2aba9a Fix problem with assumption non-socket == vnode in F_{G,S}ETOWN different way
(revisions 1.47 & 1.48 effectively backed off):
* for all but vnodes, just fallback to sys_fcntl(); assumming
  state of support for F_SETOWN/F_GETOWN and even hardcoding it here is
  not right (e.g. rev. 1.47 had this incorrect for DTYPE_PIPE)
* fallback to sys_fcntl() also for vnodes which don't represent tty
* don't need to use FILE_{,UN}USE() here, the code won't block while
  using the pointer
* add/fix some comments
2002-03-24 00:32:34 +00:00
christos
3c2d0dbff9 correct placement for FILE_UNUSE [from Izumi Tsutsui] 2002-03-23 15:36:15 +00:00
chs
60b5cc6ac2 make this compile again (PS_STRINGS is gone). 2002-03-23 05:00:04 +00:00
jdolecek
dd94bff875 invoke setregs hooks correctly, as in sys_execve()
Problem noted and fix tested by Eduardo Horvath
2002-03-22 21:36:46 +00:00
christos
0a4f1c3d8f sync with current reality and fix debugging. 2002-03-22 18:39:23 +00:00
christos
65fc8539e4 gc debugging printfs. 2002-03-22 17:14:18 +00:00
christos
8b2467a1e9 nuke mmap2, cleanup mmap, add mprotect 2002-03-22 15:21:28 +00:00
christos
5681411206 regen 2002-03-22 15:19:53 +00:00
christos
b3c32e7e6d nuke mmap2, add mprotect 2002-03-22 15:19:43 +00:00
christos
99ff14c9f3 regen 2002-03-22 15:18:48 +00:00
christos
45af46eb53 add mprotect, nuke mmap2 2002-03-22 15:18:13 +00:00
christos
b9a0007d1d regen 2002-03-22 15:17:17 +00:00
christos
190ffecb97 add mprotect, nuke mmap2 2002-03-22 15:17:04 +00:00
christos
7359db6620 regen 2002-03-22 15:16:14 +00:00
christos
24e38ed8f3 nuke mmap2 add mprotect 2002-03-22 15:16:02 +00:00