Commit Graph

512 Commits

Author SHA1 Message Date
chs
a6d33cc1f2 add a new function vn_marktext() for exec code to let others know
that the vnode is now being used as process text.
2000-04-11 04:37:47 +00:00
chs
ef20427f07 sparc -> __sparc__ 2000-04-10 01:22:44 +00:00
augustss
a82aeb5508 Kill register declarations. 2000-03-30 11:24:16 +00:00
simonb
2f1fef39b3 Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
2000-03-28 23:57:24 +00:00
thorpej
7b918b4088 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:40:33 +00:00
erh
24d8dabec4 Regen. 2000-03-20 00:50:45 +00:00
erh
c21d536f5d sys_clone isn't MD on linux. 2000-03-20 00:50:14 +00:00
erh
1d34297aae Regen. 2000-03-18 23:53:38 +00:00
erh
38cf426930 Fix the msgrcv prototype. 2000-03-18 23:53:24 +00:00
erh
0174e6759b Add sigset_t parameter to restore_sigcontext, created by the sigreturn functions. linux_sigreturn still needs to use frame->extramask.
In setup_linux_rt_sigframe copy the signal mask to both possible locations.
2000-03-18 23:45:41 +00:00
erh
224f92b651 Pass a signal mask to restore_sigcontext. 2000-03-18 23:40:56 +00:00
erh
c7a82169cc Regen. 2000-03-18 22:46:53 +00:00
erh
2648835399 Use the new linux_sys_reboot and linux_sys_connect. 2000-03-18 22:46:27 +00:00
erh
9db5981a04 Add linux_sys_reboot. 2000-03-18 22:23:13 +00:00
erh
528f8305be Regen. 2000-03-18 22:21:02 +00:00
erh
f3ae1c7294 Use linux_sys_reboot instead of sys_reboot. 2000-03-18 22:20:57 +00:00
erh
035c694c67 Regen. 2000-03-18 22:16:56 +00:00
erh
dd9cf0df56 Use linux_sys_reboot instead of sys_reboot. 2000-03-18 22:16:46 +00:00
erh
34b72dcf4a Add defines for linux_sys_reboot. 2000-03-18 22:01:02 +00:00
erh
a159733250 Regen. 2000-03-18 20:44:01 +00:00
erh
50ef430f08 resync NOARGS lines with their definitions in kern/syscalls.master. resync STD lines with what is expected in .c files. (especially wrt adding const). Add missing prototype for setfsuid. Fix ptrace prototype. 2000-03-18 20:43:33 +00:00
erh
fa21d7879c Adjust linux_sys_ptrace_args to reflect inconsistencies across ports. Temporarily ifndef alpha around getfsuid since Linux/alpha doesn't seem to have it. 2000-03-18 20:42:14 +00:00
soren
95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
abs
7ff31fc326 Update patch from Witold Wnuk in PR 9335 to solve potential security
issue noted by tls.
2000-02-17 12:34:26 +00:00
abs
052fdc75bc regen 2000-02-03 10:22:34 +00:00
abs
89c5ba9f00 Add Linux fsuid system calls - from Witold J. Wnuk in PR kern/9335 2000-02-03 10:02:59 +00:00
jdolecek
600be45ffc Improve emulation of SIOCGIFHWADDR ioctl:
* when finding an interface, try the real name first before faking eth*
 * Linux kernel returns ENODEV if the request goes to unknown interface,
   so do the same here

This change makes Linux ICA client work.

Patch sent by Zdenek Salvet <salvet@ics.muni.cz> in kern/9169.
2000-01-12 17:19:11 +00:00
tron
885afa5fce Regen. 1999-12-16 15:13:41 +00:00
tron
764eda2f33 Add ptrace(2). 1999-12-16 15:13:01 +00:00
tron
62397f55ef Add support for reading and writing non FPU register with ptrace(2). 1999-12-16 15:11:19 +00:00
tron
4aec38a7db Move MI parts of ptrace(2) emulation to "linux_misc.c". 1999-12-16 15:09:49 +00:00
tron
f5dfa6e4a0 Support a few more request types in ptrace(2) emulation. 1999-12-12 01:30:49 +00:00
tron
df8ccb921c Regen. 1999-12-12 00:00:42 +00:00
tron
0f4ddbec23 Incomplete but already working emulation of Linux's ptrace(2) for i386. 1999-12-12 00:00:16 +00:00
tron
c3ce0bc384 Architecture independent definitions for Linux's ptrace(2) system call. 1999-12-11 23:57:48 +00:00
tron
d5ed9dc998 Regen. 1999-12-05 21:26:36 +00:00
tron
c65011886d Fix incorrect system call number. 1999-12-05 21:25:36 +00:00
tron
ea2517e20d Add proper stub code to make emulation of Linux's pread(2) and pwrite(2)
work. Fixes PR kern/8945 by Dave Sainty.
1999-12-05 21:24:28 +00:00
tron
9b847640c3 Add bound checks in emulation of kill(2). This fixes the last part of
PR kern/8904 by Dave Sainty.
1999-12-04 22:26:52 +00:00
tron
96fdbb96a8 Add bound checks in emulation of sigaction(2). This fixes a part of
PR kern/8904 by Dave Sainty.
1999-12-04 22:21:12 +00:00
tron
60e5eb1dd2 Fix typo in last commit. 1999-12-04 22:17:43 +00:00
tron
f8a4b15b1c Adapt to renamed system call argument. 1999-12-04 22:15:57 +00:00
tron
a3dbb6bba5 Regen. 1999-12-04 22:14:52 +00:00
tron
8b5f9298fa Consistently call signal number arguments "signum". 1999-12-04 22:14:14 +00:00
tron
f8df357a47 Add bound checks in emulation of signal(2) and return SIG_ERR on failure.
This fixes a part of PR kern/8904 by Dave Sainty.
1999-12-04 22:08:36 +00:00
tron
5bc798bb82 Allow signal numbers upto 63 in clone(2) emulation. 1999-12-04 21:58:05 +00:00
tron
9bf4ab219a Correct signal array size. 1999-12-04 21:41:53 +00:00
tron
cd4ab88255 Extend signal mapping array to 64 entries like in the i386 emulation. 1999-12-04 21:38:57 +00:00
thorpej
2859f66b8f Add register prefixes. 1999-11-11 01:27:59 +00:00
erh
5779957787 undo confusion. 1999-11-02 08:02:43 +00:00
mycroft
e45ef6abcd Emulate the Linux DVD_* ioctls(2). This gets us 90% of the way to running the
LiViD DVD player.  (See forthcoming mail to current-users.)
XXX NOTE: We should do something to probe capabilities, rather than allowing
these ioctls on any device.
1999-10-29 15:02:56 +00:00
kleink
522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
itohy
a833d94864 Add #include <machine/cpu.h> for need_resched() macro. 1999-10-21 23:24:08 +00:00
thorpej
09e277b357 Fix typos in the license notice. 1999-10-11 01:18:35 +00:00
tron
4d4888a7cb After linux_sys_clone() has been moved to "linux_sched.c" we don't need
to include "linux_sched.h" any more.
1999-10-05 09:22:04 +00:00
fvdl
6c6e28d62b Handle the newer, larger sigset_t Linux now uses. 1999-10-04 17:46:37 +00:00
tron
684ef7f4c2 Add emulation for scheduler related syscalls. Although they are dummies
even under Linux the posix thread library for "glibc2" requires them.
1999-10-04 16:58:15 +00:00
tron
c81bdfafa8 Regen from "syscalls.master". 1999-10-04 16:57:10 +00:00
tron
9b451861b9 Add emulation for scheduler related syscalls. Although they are dummies
even under Linux the posix thread library for "glibc2" requires them.
1999-10-04 16:55:54 +00:00
tron
0b48cdd9f8 NetBSD's signal number 11 is SIGSYS nog SIGSEGV. 1999-09-30 19:32:53 +00:00
chs
f3a668ed84 eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
1999-09-12 01:16:55 +00:00
jdolecek
cfa9258f85 Use DEBUG_LINUX exclusively. Fixes PR#7684. 1999-09-08 16:52:08 +00:00
thorpej
2c358fca82 Update for new msgctl()/semctl()/shmctl() calls. 1999-08-25 04:52:06 +00:00
tron
14cc7c79c1 Regen. 1999-08-16 19:13:29 +00:00
tron
327a8cdf75 Add stime() to syscalls table. 1999-08-16 19:13:01 +00:00
tron
c3ea560498 Add emulation for Linux stime(2) required for MuPAD's X11 interface. 1999-08-16 19:06:29 +00:00
jtk
92bf84ec68 implement emulation of SIOCGIFHWADDR, PR 7997 1999-07-17 22:03:55 +00:00
jtk
c13299119a add LINUX_SIOCGIFHWADDR 1999-07-17 21:46:28 +00:00
thorpej
c581bf97c5 A few things to make the Linux clone(2) emulation work a bit better:
- When the exit signal is specified to be 0, don't just assume they
  meant SIGCHLD.  In the Linux world, this appears to mean "don't deliver
  an exit signal at all".
- Simplify P_EXITSIG(); don't check against initproc here, just change
  the exit signal to SIGCHLD if reparenting to initproc.

A very simple clone(2) test program now works, and the MpegTV package
starts, but doesn't run properly yet (I believe there is a separate
bug which keeps it from working properly).
1999-07-15 23:18:41 +00:00
tron
c0567a6bc7 Add support for SETALL and GETALL to the Linux emulation of semctl()
and improve handling of SETVAL. Patches supplied by YAMAMOTO Jiro in
PR kern/7621.
1999-05-27 13:30:40 +00:00
thorpej
a2dc12021c Oops, completely forgot to translate the exit signal in clone(2). 1999-05-17 19:26:33 +00:00
thorpej
0f74e48ca5 Emulate the Linux {get,set}resgid(2) system calls. 1999-05-14 18:45:31 +00:00
thorpej
8a61761cc5 Emulate the Linux {get,set}resuid(2) system calls. 1999-05-14 18:44:50 +00:00
thorpej
dd623ce325 Regen. 1999-05-14 18:44:15 +00:00
thorpej
a03622b33f Emulate the Linux vfork(2) (which is like NetBSD's __vfork14(2)),
{get,set}resuid(2), and {get,set}resgid(2).  Note a few more system
calls that we don't yet emulate.
1999-05-14 18:43:58 +00:00
thorpej
5f1b28961e Regen. 1999-05-14 18:43:20 +00:00
thorpej
e0a6808cef Emulate the Linux vfork(2) (which is like NetBSD's __vfork14(2)),
{get,set}resuid(2), and {get,set}resgid(2).  Note a few more system
calls that we don't yet emulate.
1999-05-14 18:43:01 +00:00
thorpej
64d90992b4 Regen. 1999-05-14 18:41:20 +00:00
thorpej
ba8fcafa16 Emulate the Linux vfork(2) (which is like OSF/1 vfork(2) and NetBSD's
__vfork14(2)) and {get,set}resuid(2).  Linux does not have {get,set}resgid(2)
on their Alpha port!
1999-05-14 18:39:38 +00:00
thorpej
087adcea52 Regen. 1999-05-13 23:43:15 +00:00
thorpej
fa1c5fed1a Emulate the Linux clone(2) system call. 1999-05-13 23:42:34 +00:00
thorpej
053ec76d86 Fully emulate the Linux wait4(2) system call, including the __WCLONE
flag (which is equivalent to our new WALTSIG).
1999-05-13 01:00:50 +00:00
thorpej
5512f35a12 Define the flags used by the Linux wait4() system call. 1999-05-13 00:31:57 +00:00
thorpej
e2c674e2c6 Add scheduling-related definitions. Currently we have the flags passed
to the __clone(2) system call.
1999-05-12 19:49:09 +00:00
thorpej
e3669c3393 Add "use counting" to file entries. When closing a file, and it's reference
count is 0, wait for use count to drain before finishing the close.

This is necessary in order for multiple processes to safely share file
descriptor tables.
1999-05-05 20:01:01 +00:00
cgd
af8a9059d3 compute the value to be used for e_arglen via howmany(value, sizeof (char *)),
rather than just "value / sizeof (char *)".  While in these cases the latter
works as well, the former's a better example for other uses to copy (since
it handles the non-integral multiple case correctly).
1999-04-30 23:07:01 +00:00
kleink
6a9c669828 Move linux_reenter_syscall() to a common location and rename it to
reenter_syscall() - it's going to be shared with COMPAT_SVR4 and soon be
used by native code.
1999-04-19 20:58:37 +00:00
tron
ab9ea90a8e Regen. 1999-03-30 07:37:58 +00:00
tron
b46e8732dd Add poll() emulation. 1999-03-30 07:29:05 +00:00
abs
bb2d7dd6dc Regenerate (with poll()) 1999-03-30 02:25:32 +00:00
abs
9c2ef08c3e Since NetBSD has poll(), use it.
Linux oracle install now gets far enough that I want our DBA around to
see if we can finish the job.
1999-03-30 02:22:49 +00:00
tron
82f6a3397b Regen. 1999-03-27 01:15:58 +00:00
tron
5b98b641a8 Add emulation for Linux "getcwd" syscall. 1999-03-27 01:10:56 +00:00
sommerfe
280a842850 commit fix to PR7072: emulate linux non-blocking connect behavior more correctly 1999-03-25 04:26:45 +00:00
mrg
d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
thorpej
9d49c8139a Regen; pread(2) and pwrite(2). 1999-03-23 03:01:48 +00:00
thorpej
e8a3256e7f Add support for emulating the Linux pread(2) and pwrite(2) system calls;
just call the native NetBSD versions.

PR #7202, Jaromir Dolecek <dolecek@ics.muni.cz>.
1999-03-23 03:00:51 +00:00
itohy
cfcb284c09 cachectl -> cachectl1 1999-03-02 18:22:29 +00:00
itohy
da0a919754 Regen. 1999-02-10 10:38:15 +00:00
itohy
5af2655c9d const mania 1999-02-10 10:36:26 +00:00
christos
c3ae7cb2a9 Regen 1999-02-09 20:38:38 +00:00
christos
c8216580df const poisoning. 1999-02-09 20:37:19 +00:00
christos
8024779058 const poisoning 1999-02-09 20:37:00 +00:00
tron
f7f56f986f Revert last changes:
Because "linux_ipccall.h" cannot be included before "sys/shm.h" and
"sys/shm.h" needs to be included after "opt_sysv.h" include "opt_sysv.h"
in "linux_ipccall.c" again.
1999-01-10 15:05:36 +00:00
kleink
5f79ea56a1 Rearrange the emulation-specific setregs() entry to set up the FPU control
word *after* calling the native setregs(), which would clobber it again.
1999-01-08 11:59:38 +00:00
erh
5c1e9076ad Make consistent: si_ -> lsi_ 1999-01-03 05:34:39 +00:00
erh
b19295f334 Speed up compilation by #include-ing C files from common into one file. 1999-01-03 05:29:31 +00:00
erh
d9a22c586a Undo previous: Put back opt_sysv.h 1999-01-03 05:18:01 +00:00
erh
f1a0e1b396 Avoid name clash with standard si_{uid,pid} fields. 1999-01-03 04:53:59 +00:00
erh
5422cb89d9 Moved sysv opt include to header file. 1999-01-03 04:30:56 +00:00
erh
4289065a1b Moved opt include to header file. 1999-01-03 03:54:45 +00:00
erh
41590f69e2 Grab the sysv options. 1999-01-03 03:52:22 +00:00
drochner
8b9671f0f5 get "opt_compat_xxx.h" includes out of <sys/signal.h> 1998-12-19 16:27:09 +00:00
christos
f9ac5ff367 more defensive signal conversion, and fix a malloc sizeof(int) to sizeof(int *). 1998-12-16 10:21:50 +00:00
itohy
0c080222db Added linux compat support on m68k ports. 1998-12-15 19:31:30 +00:00
itohy
e0f218ab08 Generated from syscalls.master. 1998-12-15 19:28:31 +00:00
itohy
0176ca73ed Initial support of Linux/m68k compatibility. 1998-12-15 19:25:40 +00:00
augustss
57186cce33 Slight code rearrangement and more defensive tests for the sequencer device. 1998-12-15 10:32:16 +00:00
christos
f0c7751046 Regen 1998-12-10 17:13:06 +00:00
christos
35af069802 defopt COMPAT_43 1998-12-10 17:07:04 +00:00
erh
efe6591d21 Whoops, _NSIG->LINUX__NSIG. 1998-12-10 00:31:50 +00:00
erh
f7373c1eba Add mmap header. 1998-12-08 21:02:18 +00:00
erh
cdc6431c25 At least make this compile. Add linux compat version of auxillary data eventually to be used to make the emulation work correctly. 1998-12-08 21:00:11 +00:00
drochner
c48ea35c91 include missing SYSV option header - PR kern/6479 by Urban Boquist 1998-11-22 15:00:47 +00:00
erh
bda913305b Make sure the interpreter string is long enough to check against. 1998-11-05 22:19:25 +00:00
christos
7d7a80a8fd Allow kdump to compile again. 1998-10-24 19:03:53 +00:00
veego
4c127bdcd4 Include linux_errno.h to fix the recent error->errno losage. 1998-10-23 10:54:58 +00:00
erh
907ec5233d linux_error.c moved to linux_errno.c 1998-10-23 03:56:22 +00:00
erh
8b351f0104 Change linux_error to native_to_linux_errno. Add some (unrelated) debugging printfs. 1998-10-23 03:53:18 +00:00
erh
76aa1f4bcf Moved to linux_errno.c,v 1998-10-23 03:46:25 +00:00
erh
a766015254 Moved from linux_error.c,v 1998-10-23 03:45:37 +00:00
erh
dd1e5f373e Define LINUX_GCC_SIGNATURE. 1998-10-22 18:13:02 +00:00
tron
120e9f4e91 Defopt SYSVMSG, SYSVSEM and SYSVSHM. 1998-10-19 22:37:53 +00:00
tron
76a0f5408b Regen. 1998-10-19 22:25:55 +00:00
tron
c71ccab136 Defopt SYSVMSG, SYSVSEM and SYSVSHM. 1998-10-19 22:21:19 +00:00
erh
edeeb71bd8 Add the sigaction call. 1998-10-07 23:48:04 +00:00
erh
00a3eb89be This is used on the alpha. It is called osf_sigaction under linux because of the format of the sigaction structure but it acts the same. 1998-10-07 23:47:44 +00:00
erh
7d45dcb522 Kill the linux_old*.h includes (which are only used in the corresponding linux_old*.c). Add linux_siginfo.h. 1998-10-07 23:11:13 +00:00
erh
ecdbc1172b Regen. 1998-10-07 23:08:26 +00:00
erh
358899800e Change sys_mmap to NOARGS. (args defined in linux_sys_mmap.h). Typo: siginfo_t->linux_siginfo_t. 1998-10-07 23:07:30 +00:00
erh
1a89cf484f Move linux_sys_mmap declarations to linux_mmap.h Make sure oldmmap.c includes oldmmap.h. 1998-10-07 23:06:17 +00:00
erh
8ce2ceae35 Fix typos. 1998-10-07 23:05:09 +00:00
erh
a956aca8aa This needs its defines. 1998-10-07 22:58:19 +00:00
erh
47a9e7f352 Fix typos. 1998-10-07 22:50:42 +00:00
erh
baf6c8420d Fix types. Kill old declarations. 1998-10-07 22:45:51 +00:00
erh
c7176f00e4 The siginfo include line is not needed here anymore. 1998-10-07 22:17:57 +00:00
erh
3bd73b1ef1 Add prototype for linux_sigprocmask1(). 1998-10-07 22:13:39 +00:00
erh
ddbb7b3349 sigprocmask (non-rt) version doesn't exist on alpha. rename it to sigprocmask1 for use in linux_sys_sigprocmask and linux_sys_rt_sigprocmask. 1998-10-07 22:12:48 +00:00
erh
30f959e6c6 sigprocmask (non-rt version) doesn't exist on alpha. Add it here. 1998-10-07 22:11:16 +00:00
erh
15eaa765b7 Files moved. Change the paths here. 1998-10-07 20:50:44 +00:00