Commit Graph

1547 Commits

Author SHA1 Message Date
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
matt
efc9b37ead expunge vm_offset_t/vm_size_t 2000-03-04 07:28:44 +00:00
matt
74ca33774a only include i386/include/reg.h on i386. 2000-02-27 17:30:10 +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
eeh
cde9dba8ab Add support for -current's ELF32 exec format. 2000-02-06 16:45:56 +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
tsutsui
11c8f56d48 Revert STRIPPROG -> STRIP 2000-02-01 05:25:24 +00:00
christos
3cb8a24438 Regen 2000-01-31 16:41:20 +00:00
christos
7ccc44e6f7 __semctl13 -> ____semctl13 2000-01-31 15:59:58 +00:00
christos
72ff1dee2f Regen 2000-01-31 15:53:46 +00:00
christos
44b3655e9d __semctl13 -> ___semctl13 2000-01-31 15:53:01 +00:00
tsutsui
e61f177ab1 STRIP -> STRIPPROG 2000-01-19 16:29:54 +00:00
matt
897c73a03a Fix wait case for VAX SVR3. 2000-01-13 06:33:29 +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
matt
a0bcad1505 move to ibcs2_sysi86 to arch/i386/i386/ibcs2_machdep.c.
XXX -- still need to properly MI the waitsys code.
2000-01-10 03:16:25 +00:00
matt
8e42885010 Clean things up. Only include the ELF EXEC iff EXEC_ELF32 is already
asserted.

XXX -- this should mutate into kern/exec_coff someday with a cpu_coff_hooks
ala ecoff support.
2000-01-10 03:14:56 +00:00
matt
47b5b640a7 Regen. 2000-01-10 03:12:19 +00:00
matt
61783809dc rename ibcs2_sysi86 to ibcs2_sysmachine (since ibcs2 now runs on other
things than i386).
2000-01-10 03:10:15 +00:00
tron
bfea30bc82 Regen. 2000-01-08 17:03:23 +00:00
tron
1433852cb6 Add missing system calls mlockall() and munlockall() as suggested by
Michael Eriksson in PR kern/9147.
2000-01-08 17:02:46 +00:00
eeh
a7474fcab6 netbsd32_close() would work better if it called sys_close() rather than
sys_write().
netbsd32_getfsstat() cannot just copyin()/copyout(), convert the structures,
and call sys_getffstat().  sys_getffstat() wants to do its own
copyin()/copyout().  So we need to implent the whole of sys_getffstat()
in netbsd32_getfsstat().
1999-12-31 22:26:21 +00:00
eeh
a65e57bfc6 Update to 32-bit compatibility routines. 1999-12-30 15:40:45 +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
matt
9fcf201409 Make this compile again on sparc. 1999-11-28 18:06:46 +00:00
augustss
83c33f4fee Fix typo in comment. From Brad <brad@openbsd.org> 1999-11-19 23:50:21 +00:00
augustss
d37a1f8e3b Implement OSS_SOUND_MIXER_INFO. 1999-11-17 00:06:38 +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
eeh
1f45477db9 Add netbsd32_compat_14.c
Rename everything from compat_netbsd32 -> netbsd32 so we don't have silly
names like compat_14_compat_netbsd32_sys_shmctl().
1999-10-11 01:36:21 +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
bouyer
52497e180a Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.
1999-09-28 14:47:00 +00:00
christos
75d8e5904a Regen 1999-09-16 18:19:11 +00:00
christos
36140f8037 fix olseek botch 1999-09-16 18:18:28 +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
christos
d205cc9cd4 oops, forgot to include new files. 1999-09-07 18:20:18 +00:00
christos
ffdf7a5fe8 regen 1999-09-07 06:25:14 +00:00
christos
c7897366b5 preliminary lwp support; currently staroffice breaks because set_ldt emulation
is borken, not because of threads problems.
1999-09-07 06:24:56 +00:00
thorpej
2c358fca82 Update for new msgctl()/semctl()/shmctl() calls. 1999-08-25 04:52:06 +00:00
thorpej
03a42efc4b Regen. 1999-08-25 04:51:06 +00:00
thorpej
0dc5bd44d5 Update for new SVID IPC calls, and also update the list of syscalls
to include the complete set as of 9.x.
1999-08-25 04:50:53 +00:00
thorpej
0d32655143 Completely rewrite the HP-UX SVID IPC compat calls. 1999-08-25 04:50:08 +00:00
thorpej
c1f3fb3299 Regen. 1999-08-25 04:48:48 +00:00
thorpej
710fa26673 Update for new msgctl()/semctl()/shmctl(). 1999-08-25 04:48:21 +00:00
thorpej
9244fc5b3e Add compatibility calls for the 1.4 System V IPC *ctl() calls, and
update the 1.0 compat calls.
1999-08-25 04:47:12 +00:00
thorpej
ed1f903927 Regen. 1999-08-25 04:45:43 +00:00
thorpej
943b6fe91f Update for new msgctl()/semctl()/shmctl(), and add fhopen(), fhstat(),
and fhstatfs().
1999-08-25 04:45:24 +00:00
thorpej
d30f8c710b Erg, fix a typo that snuck in there. 1999-08-23 20:59:33 +00:00
thorpej
0693721b59 A more-or-less complete list of the types used in HP-UX 9.x hp9000s300. 1999-08-23 18:40:43 +00:00
kleink
79ce98b212 Per discussion with Lennart Augustsson, change the behaviour to report emulated
encodings, too.  (This is currently an issue with the eso(4) driver, which,
due to different byte orders in playing and recording directions, sets the
emulated flag for all 16-bit encodings, although it could be argued that this
is an unfortunate weakness of the query_encoding() interface.)
1999-08-22 13:43:09 +00:00
kleink
a6a1795f0e Nuke a comment of mine (obsoleted by previous revision). 1999-08-22 13:11:38 +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
simonb
299578ebd5 Spell "privilege" correctly (correct spelling from Jonathan Stone). 1999-08-16 02:59:22 +00:00
thorpej
eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
wrstuden
3bf14d81e9 Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden
1999-08-03 20:19:16 +00:00
christos
2f73c9bc1d sparc is not defined anymore... Use __sparc__ and __i386__. Also default
to the standard elf NOADDR...
1999-08-01 23:55:40 +00:00
drochner
44b56d917e regen 1999-07-30 16:04:41 +00:00
drochner
287f2ffe69 emulate fcntl(F_SETLK) & Co.
(seti@home works now:-)
1999-07-30 16:03:49 +00:00
rh
cfa2c0bd79 Remove superfluous NULL argument from proclist_lock_read() call. 1999-07-25 08:55:46 +00:00
thorpej
01a8cffe77 Add a read/write lock to the proclists and PID hash table. Use the
write lock when doing PID allocation, and during the process exit path.
Use a read lock every where else, including within schedcpu() (interrupt
context).  Note that holding the write lock implies blocking schedcpu()
from running (blocks softclock).

PID allocation is now MP-safe.

Note this actually fixes a bug on single processor systems that was probably
extremely difficult to tickle; it was possible that schedcpu() would run
off a bad pointer if the right clock interrupt happened to come in the
middle of a LIST_INSERT_HEAD() or LIST_REMOVE() to/from allproc.
1999-07-22 21:08:30 +00:00
thorpej
32e1fd0d03 Move the call of cpu_wait() out of the wait4() functions, and into the
body of reaper(), right before the call to uvm_exit().  cpu_wait() must
be done before uvm_exit() because the resources it frees might be located
in the PCB.
1999-07-20 21:54:05 +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
kleink
dfa5aad003 Regen. 1999-07-12 22:04:00 +00:00
kleink
e79a283e47 XSH5: change function signature to `void *sbrk(intptr_t)'. 1999-07-12 21:55:19 +00:00
cgd
2055d9d08d emulate (parts of) flock 1999-06-26 01:24:41 +00:00
cgd
1e29f2fb1f convert flock struct 1999-06-26 01:23:23 +00:00
cgd
b9c997eba9 flock struct and related constants and types 1999-06-26 01:21:30 +00:00
thorpej
12347b2657 Make uvm_vslock() return the error code from uvm_fault_wire(). All places
which use uvm_vslock() should now test the return value.  If it's not
KERN_SUCCESS, wiring the pages failed, so the operation which is using
uvm_vslock() should error out.

XXX We currently just EFAULT a failed uvm_vslock().  We may want to do
more about translating error codes in the future.
1999-06-17 15:47:22 +00:00
oster
f4628e2fda FILE_UNUSE needs two args, not one. 1999-06-13 21:34:32 +00:00
drochner
6e2b65ec1d regen 1999-06-09 12:38:50 +00:00
drochner
b4e4c530db add "sys_" prefix to LFS syscalls 1999-06-09 12:33:18 +00:00
christos
354ba222e6 Regen 1999-06-09 04:50:32 +00:00
christos
b7a0cd53a2 Propagate kern changes 1999-06-09 04:50:10 +00:00
christos
4ebea99d8e Regen 1999-06-09 04:28:24 +00:00
christos
1e6c35821b propagate changes from kern 1999-06-09 04:27:44 +00:00
cgd
3da80f5ebd don't vrele a bogus pointer if the namei() of the loader fails 1999-05-28 04:39:14 +00:00
pk
bd84136493 copyinst() takes a `size_t *'. 1999-05-27 14:03:05 +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
497248ca55 XXX Pass VM_PROT_NONE to uvm_vslock() as access_type. Why are we even
vslocking here?!  copyout() on its own seems to suffice just about everwhere
else, and it's not like the process is going to exit; it's in a system
call!
1999-05-26 01:07:06 +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
cgd
c283289b46 For lack of a bit, the letter was lost. For lack of the letter, the
macro was lost.  For lack of the macro, the function was lost.  For lack
of the function, the syscall was lost.  For lack of the syscall, the
application was lost.  For lack of the application, my time was lost.
1999-05-10 21:41:07 +00:00
cgd
9ee892559b regen 1999-05-10 06:00:10 +00:00
cgd
798cd0a332 start at (new) sendmsg and recvmsg. right now, the former doesn't
handle control messages and the latter is just a stub.
1999-05-10 05:58:44 +00:00
cgd
55c7aec3cc rename xopen-ish iovec and msghdr structs 1999-05-10 04:18:22 +00:00
cgd
21c7b563a8 msghdr and x/open iovec structs 1999-05-10 03:58:50 +00:00
cgd
99cc65e9ba regen 1999-05-10 03:34:20 +00:00
cgd
4bf16b94f4 old accept -> compat_43_sys_accept 1999-05-10 03:33:04 +00:00
cgd
bf29d6c987 regen 1999-05-10 03:00:27 +00:00
cgd
1c05179cd4 usleep_thread: round ticks up, don't sleep forever, use better wchan 1999-05-10 02:55:57 +00:00
cgd
1e2f18cb6a listen is the same as native 1999-05-10 02:54:57 +00:00
cgd
f7c70eaf0e regen 1999-05-10 01:59:41 +00:00
cgd
726fed408a plink, plink.... socketpair! 1999-05-10 01:58:37 +00:00
kleink
fe0ce0cd42 Need to explicitly include <machine/cpu.h> for a cpu_wait() macro definition. 1999-05-08 01:23:01 +00:00
drochner
192b3c733c Build libraries for kernel/standalone code from within their compilation
directories and use .PATH to lookup the source files.
(Formerly, the libs were built from the source dirs, with MAKEOBJDIR
set to the compilation directory.)
This solves 2 problems:
-"mkdep" and "make" are now consistent about the file lookup, this fixes
 bad interactions with amd reported in PR bin/7374 (Arne Juul) and
 lossage reported by Andrew Gillham ("obj" dirs and relative paths still
 don't work well together)
-kernel compile trees can be moved around without forcing a new
 "make depend" - fixing PR kern/4021 by Martin Husemann
1999-05-07 14:28:50 +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