Commit Graph

1052 Commits

Author SHA1 Message Date
abs 5958dd944e Fix comments slighly 2004-12-12 20:42:53 +00:00
christos 040c934485 Remove setup stack function. It moved to linux_exec_machdep.c. 2004-11-13 08:58:23 +00:00
christos b7286f5ccd Add ptyfs pty device number translation. 2004-11-13 07:20:54 +00:00
christos 1265044e00 add LINUX_TIOCGPTN 2004-11-13 07:20:35 +00:00
christos 44264ea2a6 Add ptyfs magic number and entry. 2004-11-13 07:19:27 +00:00
christos d5b128a728 Add LINUX_TIOCGPTN for ptyfs pty emulation. 2004-11-13 07:18:34 +00:00
christos 7bd9648b13 Split out the setup stack function for the benefit of lkms.
XXX: Our lkm system sucks. We really need to be exporting symbols, but
that leads to symbol conflicts.
2004-11-13 06:01:34 +00:00
thorpej 42b8fac3b8 Move boot device detection code from i386 and amd64 ports to x86_autoconf.c.
Rename i386_alldisks and x86_64_alldisks to x86_alldisks, adjust other
references to compensate.
2004-10-20 04:20:05 +00:00
erh f747989e34 PR kern/27184: Have linux_sys_waitpid() call linux_sys_wait4() so the
supported options can't get out of sync.  This add support for the
  linux __WCLONE and __WALL options (NetBSD version: WALTSIG and WALLSIG)
Add a diagnostic check to see if the one unhandled option (__WNOTHREAD) is
  specified.
This should prevent linux processes from losing their children and creating
  tons of zombie processes.
2004-10-07 19:30:28 +00:00
jdolecek 6513aa8291 regen: generate struct linux_sys_shmget_args for linux_sys_shmget(2) 2004-10-05 06:02:36 +00:00
jdolecek 361bf102b8 mark linux_sys_shmget() STD, so that appropriate struct linux_sys_shmget_args
would be defined for use by alpha linux_sysent.c
2004-10-05 06:01:20 +00:00
jdolecek decdc3f95c regen - now using wrapper for shmget(2) 2004-09-28 19:05:58 +00:00
jdolecek f64366a240 add flag for shmget(2) to specify that later shmat(2) for the shared memory
segment should succeed even if the segment would be marked removed; use this
to implement the Linux-compatible semantics of shmat(2)

this fixes the old Linux VMware3 graphics problem with local display,
and possibly other local Linux X clients using MIT-SHM
2004-09-28 19:05:19 +00:00
jdolecek 68ee548306 fold shmat1() back into sys_shmat(), the change in rev 1.64 is not sufficient
for Linux-compatible shmat() behaviour - shmat() for the removed shared memory
segment must work from all callers, the shared memory id could be passed e.g.
to native X server via MIT-SHM

temporarily remove the functionality, the Linux-compatible semantics
will be reimplemented differently
2004-09-28 17:26:25 +00:00
he 9f596d4761 Since the implementation of bsd_to_linux_statfs64() is conditional,
also make the forward declaration conditional.  Fixes compile
problem for m68k ports.
2004-09-24 13:10:46 +00:00
jdolecek 81ed8f7972 move definition of linux_fsid_t to common/linux_types.h - it's identical
across all Linux archs
2004-09-20 18:51:55 +00:00
jdolecek 43b3feff28 regen:
implement support for Linux statfs64() syscall - 64bit variant of statfs()
2004-09-20 18:42:23 +00:00
jdolecek 110cc1cc61 implement support for Linux statfs64() syscall - 64bit variant of statfs() 2004-09-20 18:41:07 +00:00
christos dbac2396e8 Add a linux_fsid_t typedef for the ports that don't have architecture dependent
linux_types.h. Fixes sparc build.
2004-09-20 03:21:40 +00:00
jdolecek 48373456d4 Adjust struct statfs content to flag that the newer Linux kernel do
provide f_frsize. It cannot be actually used to GNU C statvfs() bug
in f_frsize != f_bsize case, so just keep pretending we don't support it.
Update comments and explain the situation in detail there.
2004-09-19 16:50:11 +00:00
jdolecek 2580579147 move definition of struct linux_stafs to common/linux_types.h, and use
explicit size types - the structure definition is actually identical
on currently support COMPAT_LINUX archs, so no point to have 6 copies of it
in the tree
2004-09-19 15:06:32 +00:00
skrll f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
jdolecek f16bab2269 bsd_to_linux_statfs():
- filesystem size is expressed in number of fragments, not blocks;
  this fixes computed filesystem sizes for Linux df(1) and other Linux
  binaries using statfs(2) for filesystems, which use different value
  for frament and block, such as FFS
- use FS f_namemax instead of always using MAXNAMLEN
2004-09-13 20:09:44 +00:00
jdolecek 9cc50db4c5 if passed sockaddr has family AF_UNSPEC, use socket family of the socket
the sockaddr is used for

this fixes bind() problem in Linux version of Theocracy, testing
by Thomas Klausner
2004-09-12 15:32:55 +00:00
wiz be98c25ecf Fix typo in comment. 2004-09-10 22:22:20 +00:00
tron e5f111e223 Next attempt to fix the RCS Id. *sigh* 2004-09-09 10:45:52 +00:00
tron e22003b771 Finish linux_sys_exit_group() with a (never reached) "return" statement so
that GCC will actually compile this.
2004-09-09 07:02:50 +00:00
jdolecek 3b18315bb9 regen: add exit_group(2) 2004-09-08 19:46:17 +00:00
jdolecek 78569d6650 implement basic exit_group(2), which just terminates calling thread;
apparently not many apps use thread groups yet, at least not with default
SuSE 9.1 libraries, so this is enough for now
2004-09-08 19:45:21 +00:00
jdolecek 6b3117d804 do more strict flag checking in clone(2) (matches what Linux does) 2004-09-08 19:41:24 +00:00
jdolecek ec083dc43c linux_sa_get: g/c curproc use, we get the process as one of arguments 2004-09-05 09:38:17 +00:00
jdolecek 4032a79979 improve the (#ifdef DEBUG_LINUX) socketcall argument dump code:
- print the socketcall type
- special case socket(2) call, it's also the only one with first argument
  not being a socket descriptor
- only dump the relevant part of linux_socketcall_dummy_args, instead
  of always the whole structure
2004-09-05 09:09:02 +00:00
jdolecek bae3c8fbb8 add some newer clone flags 2004-09-05 07:22:20 +00:00
jdolecek 6cfdd8bdbf dump socketcall data #ifdef DEBUG_LINUX 2004-08-29 20:45:18 +00:00
jdolecek 0659b2b55e in debug log, data dump is more useful unsigned 2004-08-29 20:10:42 +00:00
jdolecek 466a837559 handle mmap() request with MAP_GROWSDOWN flag (request for stack-like
grow-down auto extend segment) by allocating segment sized at
current stack size limit, and offsetting requested/returned address
as required

due to how normal virtual memory management work, allocating the
full sized stack memory segment up-front actually requires exactly same
amount of VA space and physical memory as the Linux 'grow' scheme and the
'grow' scheme is quite a lot more difficult to use in applications correctly,
so it's not very apparent why Linux introduced this feature at all

this fixes Thomas Klausner's Heroes3 crash, and might also
fix PR 26687 by Jan Schaumann
2004-08-29 14:08:06 +00:00
jdolecek a95e4d7c87 g/c LINUX_MAP_IGNMASK define - it's not used anywhere 2004-08-28 18:58:57 +00:00
jdolecek b63de69b76 fix debug printf - lm_addr is not pointer anumore 2004-08-24 17:41:54 +00:00
jdolecek c341a3a03a make struct linux_oldmmap members explicitly unsigned (with exception
of lm_fd, which can be -1), rename lm_pos to lm_offset, g/c some unneeded casts

no functional change
2004-08-22 15:40:41 +00:00
jdolecek 42d15fca03 on Linux, unlink() fails with EISDIR if the target is directory,
rather than EPERM; to emulate this properly, translate the error to EISDIR
if the target patch exists and points to a directory

this fixes the 'ant clean' problem reported by Marc Recht on current-users@
with SuSE 9.1 libraries
2004-08-13 21:27:32 +00:00
jdolecek b43cbaf291 fix two bugs in previous:
* flags passed from fork1() are FORK_*, not CLONE_*; thus, correct is to check
  for FORK_SHAREVM, not CLONE_VM
* fix a reference counting bug
2004-08-08 19:52:37 +00:00
jdolecek a714ac8294 linux processes sharing VM space (via clone() call) must also
share same 'break' value used for brk()/sbrk(), otherwise application SIGSEGVs
quickly once different threads try to adjust data segment size

this fixes linux Mozilla crashes with SuSE 9.1 libraries, and possibly
other linux applications using real threads
2004-08-08 09:40:50 +00:00
jdolecek 10a205d5d1 Linux returns ENOMEM (not EFAULT) if the address specified in mprotect()
is not part of process address space

this fixes Linux libgcc_s's stack executability setup
2004-08-01 22:44:10 +00:00
jdolecek 88c36114af regen - sync syscall lists with Linux kernel 2.6.7 2004-08-01 15:38:10 +00:00
jdolecek 6e41cd161f add entries for #403, #404 (unused) 2004-08-01 15:36:23 +00:00
jdolecek d1d5ac79b4 sync the syscall lists with Linux kernel 2.6.7 2004-08-01 15:34:22 +00:00
jdolecek 945fc3e577 regen:
add stub entries for syscalls added until Linux kernel 2.6.7

move the ARM-specific syscall range up to offset 0x180, to make room
for the new syscalls
2004-08-01 14:17:19 +00:00
jdolecek 2873b62b57 add stub entries for syscalls added until Linux kernel 2.6.7
move the ARM-specific syscall range up to offset 0x180, to make room
for the new syscalls
2004-08-01 14:16:32 +00:00
jdolecek 4b33174cf9 regen:
connect madvise(2) and mincore(2) - apparently the newer Linux libs
don't stub it anymore, so allow the application to take advantage
of them

the Linux calls appear to be compatible in the flag values and semantics,
so a wrapper is not necessary
2004-08-01 10:38:38 +00:00
jdolecek ae85fa27f7 connect madvise(2) and mincore(2) - apparently the newer Linux libs
don't stub it anymore, so allow the application to take advantage
of them

the Linux calls appear to be compatible in the flag values and semantics,
so a wrapper is not necessary
2004-08-01 10:32:40 +00:00