Commit Graph

3774 Commits

Author SHA1 Message Date
christos 489fe1e988 add missing initializers 2006-09-02 06:56:30 +00:00
christos de02317b32 comment out impossible code 2006-09-02 06:53:17 +00:00
christos c4501e2800 fix incomplete initializer 2006-09-02 06:52:13 +00:00
matt 2e04559304 When calling PTRACE from an LKM, use sysent[SYS_ptrace].sy_call in case
the sys_ptrace symbol isn't present.
2006-09-01 21:20:46 +00:00
matt 280b69066a Regen. 2006-09-01 21:19:44 +00:00
matt 30183e299f Don't conditionalize *sys_ptrace. The lack of sys_ptrace will be dealt
with differently.
2006-09-01 20:58:18 +00:00
mrg 356f83eb40 clean up ptrace changes: #include "opt_ptrace.h" 2006-09-01 05:27:15 +00:00
sekiya b103a9ae62 Store return value of iur_proc_queue() in local variable iwpr (unreferenced
anywhere else in function), to appease gcc4.
2006-09-01 04:54:45 +00:00
sekiya 40be9d473d Include <sys/vnode.h>. Caught by gcc4. 2006-09-01 04:49:48 +00:00
he 3e73ce6bef Protect the include of "opt_ptrace.h" by _KERNEL_OPT. 2006-08-31 15:01:56 +00:00
oki a7e68afd48 Regen (for PTRACE). 2006-08-31 00:23:11 +00:00
oki a978ade516 Update for options PTRACE. 2006-08-31 00:21:09 +00:00
he 30ef9162ed Regen (for PTRACE). 2006-08-30 23:00:45 +00:00
he 77e02d283d Update for options PTRACE. 2006-08-30 23:00:06 +00:00
he 7fae0d129f Allow this to build as an LKM by testing for _KERNEL_OPT before
including opt_ptrace.h.
2006-08-30 17:14:34 +00:00
christos 8cc5bb6be9 fix and comment initializers. 2006-08-30 15:22:45 +00:00
he a7d7842fcb Regenerate after dealing with options PTRACE. 2006-08-30 14:02:12 +00:00
he 4ca1029105 Update to deal with options PTRACE. 2006-08-30 14:01:25 +00:00
cube 12092a2b5c Regen (netbsd32_ptrace protection). 2006-08-30 13:58:51 +00:00
cube 1282264dd1 Protect netbsd32_ptrace with options PTRACE. 2006-08-30 13:57:47 +00:00
cube f5dc39b8bf netbsd32_core.c is need only under options COREDUMP. 2006-08-30 13:57:11 +00:00
cube ed78ad7eae Protect netbsd32_ptrace with options PTRACE. 2006-08-30 13:56:48 +00:00
matt 3a7b10b907 Regen 2006-08-30 11:19:23 +00:00
matt ad6aa2b08e Update to deal with options PTRACE 2006-08-30 11:14:39 +00:00
matt 5efede10eb Regen (for PTRACE). 2006-08-30 11:05:14 +00:00
matt 181c494b95 Update for options PTRACE 2006-08-30 11:04:37 +00:00
christos df04aa6566 fix incomplete initializer 2006-08-30 02:02:21 +00:00
christos 5970d219ae remove stray ;'s that were unintentionally placed 2006-08-29 23:58:42 +00:00
christos 33cacef35e correct comparison that was always false. 2006-08-29 23:57:49 +00:00
christos 11d381a90a fix incomplete initializer 2006-08-29 23:56:02 +00:00
manu 753fce01f4 netbsd32_sys_ioctl was called with improper syscall argument structure, this
caused any X11 program to fail because FIONREAD ioctl always returned an
error.
2006-08-25 16:17:05 +00:00
manu 01f2e16aa8 Add support for socket ioctl. 2006-08-25 08:25:03 +00:00
manu 432f035fa6 The return value for Linux shmat on amd64 does not suffer the same horrible
hack as on i386.
2006-08-24 16:36:59 +00:00
dogcow 51faed03f9 move #ifdef up a few lines to prevent unused variable warning/error 2006-08-23 21:17:48 +00:00
bjh21 a707189c87 Use VALID_R15_PSR() to check the context we're restoring in
linux_sys_sigreturn().  Somehow this got missed when I introduced that macro.
2006-08-23 21:16:58 +00:00
manu 81c909dd45 1) Complete Linux exit_group() emulation
Members of the thread group must die without reporting to the parent and
without going to zombie stage. We do that by reparenting to init before
catching a SIGKILL. The parent will not see the child death.

The thread group leader must report the exit status, even if it exits
because of another thread calling exit_group(). We do that by storing the
exit status in struct linux_emuldata_shared, and the exit hook has the
duty of setting struct proc's p_xstat for the thread group leader.

2) For exit/fork/exec hooks, move the NPTL specific code to separate functions
that are shared between COMPAT_LINUX and COMPAT_LINUX32

3) Fix LINUX_CLONE_PARENT_SETTID semantics
2006-08-23 19:49:09 +00:00
christos 35ca6c8b5b Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!
2006-08-17 17:11:27 +00:00
manu 05c8a1b827 Add a new signature test for linux probe function. We look for a .debuglink
section, which is specific to the Linux dynamic interpeter (yes, Linux
can execute it as a stand alone program)
2006-08-07 14:19:57 +00:00
yamt a4aecea36e compat_30_sys_getfh: check the size of filehandle. remove an unnecessary cast. 2006-08-04 16:58:27 +00:00
yamt 273fdcedb9 whitespace. 2006-08-04 16:36:44 +00:00
yamt 4977b4bbc0 some filehandle syscall related changes.
- remove the support of variable-sized filehandle from compat version of
  syscalls.  (strictly speaking, it breaks abi.  i don't think it's a problem
  because this feature is short-lived and there are no affected in-tree
  filesystems.)
- unify vfs_copyinfh_alloc and vfs_copyinfh_alloc_size.
- vfs_copyinfh_alloc_size: check fhsize strictly.
- reduce code duplication between compat and current syscalls.
2006-08-04 16:29:51 +00:00
martin 61138efdd6 regen 2006-08-01 21:05:32 +00:00
martin 796cceed8d Adapt to latest fhandle_t changes.
Pointed out by Havard Eidnes.
2006-08-01 21:05:14 +00:00
bjh21 19d3be8004 Fix a typo that was stopping this compiling. 2006-07-31 20:52:13 +00:00
bjh21 e9b4035b9a Correct last commit to use correct variable name in hpux_sys_getpgrp2(). 2006-07-31 20:39:34 +00:00
martin b4cb63a646 Make filehandles opaque to userland 2006-07-31 16:34:42 +00:00
martin f956f13e21 Step 1 to make filehandles completely opaque to userland 2006-07-31 16:32:51 +00:00
hannken 5bc42a01ba Fix typo: slim -> &slim. 2006-07-28 13:02:56 +00:00
hannken 055db86c86 Remove 'unused variable p'. 2006-07-28 13:02:21 +00:00
manu a640310a53 typo 2006-07-24 19:01:49 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
yamt 402cb9eb95 adapt to vfs_copyinfh -> vfs_copyinfh_alloc rename. 2006-07-16 07:52:02 +00:00
rillig 07e31b3af5 When debugging output is disabled, define DPRINTF() to a proper
statement expression instead of the empty string. Fixes a gcc warning in
ibcs2_ioctl.c.
2006-07-16 06:31:42 +00:00
martin b9dade0e59 netbsd32_sys___fhstat30 and netbsd32_sys___fhstatvfs have nothing to do
with compat_30 - so use full/variable sized filehandles here too.
Fixes PR kern/34004.
2006-07-14 22:09:01 +00:00
christos 29b80779c5 make this compile again. 2006-07-14 20:06:57 +00:00
pavel 7173632277 sys_getfh -> compot_30_sys_getfh 2006-07-13 23:52:55 +00:00
pavel 336e41ffa7 regen (sys_getfh -> compat_30_sys_getfh) 2006-07-13 23:48:08 +00:00
pavel 50a6eaa646 use the COMPAT_30 getfh. 2006-07-13 23:47:17 +00:00
pavel 20d6f5666c regen (sys_getfh -> compat_30_sys_getfh). 2006-07-13 23:45:54 +00:00
pavel 485f2e18be use the COMPAT_30 getfh. And do it always - don't protect it by
#if defined(NFS) || defined(NFSSERVER).
2006-07-13 23:44:34 +00:00
pavel b15a1164c7 regen 2006-07-13 23:40:55 +00:00
pavel 6ac5157e79 request the COMPAT_30 getfh in the master files. (Changes to the generated
ones would be lost.)
2006-07-13 23:38:57 +00:00
pavel 56194475a6 regen. 2006-07-13 23:23:52 +00:00
pavel 037b2fed75 do not protect the getfh syscall by
#if defined(NFS) || defined(NFSSERVER).
The native syscall also isn't.
2006-07-13 23:22:30 +00:00
martin f8fef2f801 regen 2006-07-13 23:10:40 +00:00
yamt 9cb0d9a9d8 compat_30_sys_getfh: s/fhandle_t/struct compat_30_fhandle/ (fix overrun.) 2006-07-13 23:04:02 +00:00
pavel 65ace88efa regenerate again to have correct source RCS Id 2006-07-13 22:35:06 +00:00
martin b2fb3338d9 Adapt to getfh versioning 2006-07-13 21:31:31 +00:00
martin 9adca95023 COMPAT_SUNOS* uses COMPAT_30 getfh too 2006-07-13 17:39:47 +00:00
martin 508a062fec Make freebsd_sys_getfh use compat_30_sys_getfh 2006-07-13 16:28:38 +00:00
martin a3b5baed42 Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
2006-07-13 12:00:24 +00:00
christos 9dc3ec85f6 Fix gcc4 bogus initialization warnings from Arnaud Lacombe 2006-07-10 22:38:28 +00:00
manu 2e26811b6b If the user process requests a non null timeout, make sure we do not turn
it into an infinite timeout because of a conversion
2006-07-09 18:51:28 +00:00
drochner ad1ca09fb9 -fix for previous: don't malloc() with spinlock held
-wrap some long lines
2006-06-30 15:50:46 +00:00
he 68f1dc24e6 Convert from using the no-longer-existing sys_socket to using the
recently introduced compat_30_sys_socket.
2006-06-30 09:06:32 +00:00
pavel 60646c8d46 Regen after addition of sys___ntp_gettime30 and sys___socket30. 2006-06-29 06:02:42 +00:00
pavel 78789f2545 after sys_socket() versioning, add the new socket syscall. 2006-06-29 05:58:00 +00:00
pavel 43ffaf603b Add the new ntp_gettime syscall to match native syscalls.master. 2006-06-29 05:54:18 +00:00
pavel a78062784c Use the new socket call for Linux and SVR4, because those systems (at
least Linux 2.4.31, Irix 6.5.20 and Solaris 10) use EAFNOSUPPORT.

Only the Linux emulation has been tested.

XXX somebody should audit the other emulations...
2006-06-27 09:09:40 +00:00
mrg 1b7ff51599 regenerate. 2006-06-26 21:30:50 +00:00
mrg e2eb31d3a3 version the socket(2) syscall. for compat30 socket, we use
EPROTONOSUPPORT instead of EAFNOSUPPORT.

from pavel@ with a little bit of clean up from myself.

XXX: netbsd32 (and perhaps other emulations) should be able
XXX: to call the standard socket calls for this i think, but
XXX: revisit this at another time.
2006-06-26 21:23:56 +00:00
manu 0a52064ba3 Do not implement exit_group() the right way on platforms that do not
define LINUX_NPTL yet, that cause firefox-bin to fail.
2006-06-26 07:42:00 +00:00
manu ce7e36a5a9 Regen 2006-06-25 16:16:52 +00:00
manu b7432513dc - Complete exit_group() implementation. We now maintain a list of Linux
threads in a processes and kill them properly. The code is a bit too
complicated, but I could not find a simplier way of dealing with it

- Change getpid() and getppid() semantics to match what Linux does,
and implement gettid(). In the Linux kernel, threads are implemnted
as plain old processes. A thread group is just a set of processes,
with the parent called leader. Thread ID, which are returned by gettid(),
are just the PID of the plain old processes, and getpid() returns the
PID of the thread group leader.

- Remove struct linux32_emuldata. COMPAT_LINUX32 uses a lot of COMPAT_LINUX
code, where a struct linux_emuldata is assumed. By having distinct emuldata
structure with different sizes and layouts, we caused kernel memory
corruptions.

- Fix setprioriry() and getpriority()

Thanks to Nicolas Joly for tracking down the problem and providing me the
hardware to fix them.
2006-06-25 16:15:39 +00:00
yamt bf0859e932 netbsd32_sacopyout: don't leak kernel stack garbage to userland. 2006-06-25 08:11:06 +00:00
oki aab3cbfbad Added saemul_pecoff structure, and (hope) work again w/ pthread. 2006-06-20 14:11:56 +00:00
christos e6ea8fe642 Don't allocate too much stuff on the stack 2006-06-20 03:21:30 +00:00
he ab1ad64ac0 Make this file compile again by using the appropriate types, casts
and functions.
2006-06-14 14:18:44 +00:00
he fe98fdf977 Regenerate after fixing the getpriority syscall definition. 2006-06-13 22:24:34 +00:00
he e100449f69 We need the argument structure for the getpriority syscall defined, so
change NOARGS to STD.
2006-06-13 22:23:03 +00:00
christos 9d7289ea69 change 20 to NZERO; pointed out by mrg. 2006-06-13 16:54:56 +00:00
skd 99e52fdeb8 include kauth.h
workaround a gcc4 warning.
2006-06-13 16:23:57 +00:00
simonb 5e13eca2c0 tvtohz() compat function isn't needed now we have timecounters. 2006-06-13 03:58:12 +00:00
christos 430ad9c2a9 don't allocate > 1K on the stack. 2006-06-13 02:31:28 +00:00
christos 48432186cb stack police: don't allocate statvfs on the stack. 2006-06-12 00:46:50 +00:00
christos 155721b1be don't allocate a crapload of struct's on the stack. Use a couple of unions
and use malloc for them.
2006-06-12 00:42:18 +00:00
christos 3f0deeffa7 stack police: don't allocate PAGE_SIZE bytes on the stack. 2006-06-12 00:07:24 +00:00
christos 9cfe87267e PR/33671: Nicolas Joly: Add a getpriority syscall to account for the fact
that the linux getpriority is off by 20.
2006-06-10 21:18:11 +00:00
christos ee08f35b9a regen 2006-06-10 21:16:49 +00:00
christos c02c268f6b linux getpriority is off-by-20 so use our own function.
From PR/33671: Nicolas Joly
2006-06-10 21:15:33 +00:00