fvdl
fe75469d65
Some of this was sparc-specific, so ifdef __sparc__ it (XXX). Also,
...
change the alignment of one structure with an MD ifdef. Should
be moved into the netbsd32_machdep parts.
2001-06-19 00:36:21 +00:00
christos
0f380fac15
Add an e_trapsignal member to struct emul, so that emulated processes can
...
send the appropriate signal depending on the trap type.
2001-06-18 02:00:48 +00:00
thorpej
7660fd850d
In check_exec(), don't bother checking P_TRACED along with
...
MNT_NOSUID, just check MNT_NOSUID to clear the S{U,G}ID bits
in the attributes for the vnode we're about to exec.
We now check P_TRACED right before we would actually perform
the s{u,g}id function in the exec code.
This closes a race condition between exec of a setuid binary
and ptrace(2).
2001-06-15 17:24:19 +00:00
thorpej
80cc38a1af
Fix a partial construction problem that can cause race conditions
...
between creation of a file descriptor and close(2) when using kernel
assisted threads. What we do is stick descriptors in the table, but
mark them as "larval". This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again. When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.
While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.
2001-06-14 20:32:41 +00:00
mrg
25e7951011
proto for coredump32
2001-06-06 21:45:56 +00:00
mrg
a6a28df3e2
add netbsd32_uvm_unix.c and netbsd32_kern_sig.c
2001-06-06 21:30:28 +00:00
mrg
06f624518c
sync with uvm_unix.c 1.23
2001-06-06 21:30:07 +00:00
mrg
85794da2bd
LKM friendly: move coredump32() here
2001-06-06 21:25:11 +00:00
mrg
5677baf886
LKM friendly: move uvm_coredump32() here
2001-06-06 21:24:39 +00:00
mrg
6a89288a37
use _KERNEL_OPT.
2001-05-30 11:37:21 +00:00
kleink
0e1ec27466
Regen.
2001-04-10 11:12:12 +00:00
kleink
7b62f6ff28
Slight indentation nit.
2001-04-10 11:11:17 +00:00
jdolecek
b6d1d4db02
Change the first arg to fileops fo_stat routine to struct file *, adjust
...
callers and appropriate routines to cope. This makes fo_stat more
consistent with rest of fileops routines and also makes the fo_stat
match FreeBSD as an added bonus.
Discussed with Luke Mewburn on tech-kern@.
2001-04-09 10:22:00 +00:00
jdolecek
3fc6fc58e6
Call file descriptor stat function via (*fp->f_ops->fo_stat) instead
...
of a switch statement and explicit call.
Sprinkle some FILE_USE()/FILE_UNUSE() as appropriate.
2001-04-09 09:39:09 +00:00
ross
2d8e2c19d6
Fix soo_stat() calls for the new parameter, even if the direct call is
...
now obsolete, so that kernels will at least compile. I guess it was too
much trouble to change all 10 call sites, or perhaps, these days, only
things that build on i386 are important. Maybe it's the full moon tonight.
2001-04-08 08:01:36 +00:00
chs
ac3bc537bd
eliminate the KERN_* error codes in favor of the traditional E* codes.
...
the mapping is:
KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
2001-03-15 06:10:32 +00:00
mrg
f1a8e2ab5f
be more verbose about failed vmcmds.
2001-03-04 13:42:32 +00:00
eeh
8a4a682091
Support flexible process address space limits and bump kernel version number.
2001-02-14 18:21:42 +00:00
eeh
a562e38910
Don't play fast and loose with pointers.
2001-02-11 00:00:29 +00:00
mrg
da9e4bd3a1
split up netbsd32_netbsd.c into 9 new files, leaving only those syscalls that
...
have no special interpretations besides simple syscall args conversion.
2001-02-08 13:19:33 +00:00
mrg
e927957b42
move the static inline conversion functions into a header file so other
...
files can see these. note a bunch of functions that should be moved
into their own files.
2001-02-07 15:22:39 +00:00
mrg
7217f71af3
compat_12_netbsd32_{,fl}stat12() were not copyout()ing the converted result.
2001-02-07 13:15:54 +00:00
mrg
c1b372c5ca
fix the glaring errors in compat_13_netbsd32_sigaltstack13
2001-02-07 13:14:07 +00:00
mrg
7a908a5f44
compat_sunos needs netbsd32_compat_09.c
2001-02-07 13:13:01 +00:00
eeh
4380259bc7
Specify a process' address space limits for uvmspace_exec().
2001-02-06 17:01:51 +00:00
mrg
8e76e697d7
fix the glaring errors in emulations for osendmsg, orecvmsg, osigvec and osigstack.
2001-02-05 06:32:55 +00:00
mrg
32fdb6e321
change_utimes32() was copyin()ing a struct timeval, not netbsd32_timeval.
...
general clean up.
2001-02-04 09:00:14 +00:00
mrg
a531aa1597
emulate kern.boottime. now 32-bit w(1) works properly.
2001-02-04 07:08:51 +00:00
mrg
2aa001b546
make sysctl vm.loadavg work.
2001-02-04 06:35:07 +00:00
mrg
ef777aa80b
sync a comment from sys_execve().
...
make netbsd32_recvfrom() work.
2001-02-03 12:46:55 +00:00
mrg
dabf2a8634
s/sizeof(struct exec)/sizeof(struct netbsd32_exec)/ when calculating file offsets. now sunos32 nmagic/omagic work.
2001-02-03 12:45:44 +00:00
mrg
eefaef162b
properly implement compat_43_netbsd32_stat43, compat_43_netbsd32_lstat43
...
and compat_43_netbsd32_fstat43. now 32-bit ls(1) works. so does static
sunos `/sbin/sh' on sparc64.
2001-02-02 13:06:48 +00:00
mrg
87cc07b7c9
implement netbsd32_lchflags & netbsd32_utrace
2001-02-02 13:05:18 +00:00
mrg
674f1689f6
regen
2001-02-02 13:03:39 +00:00
mrg
b0f29c9c95
add lchflags, issetugid, utrace, reserves for [gs]etcontext, and sched/SA.
2001-02-02 13:01:44 +00:00
mrg
e4c34bc9e5
de-static netbsd32_exec_aout_prep_[zno]magic().
...
de-static netbsd32_from_stat43().
move the guts of netbsd32_execve() into netbsd32_execve2().
all of are for the forthcoming sunos32 compat mode (for sparc64).
2001-02-02 07:08:17 +00:00
thorpej
b54650a0bc
Regen; getpid(2) is MP-safe.
2001-01-27 07:58:37 +00:00
thorpej
e00fb66e89
getpid(2) is MP-safe.
2001-01-27 07:58:22 +00:00
thorpej
1b6a66420e
Regen; add sy_flags.
2001-01-27 07:23:06 +00:00
jdolecek
13ca559d39
Use CHECK_ALT_SYMLINK() instead CHECK_ALT_EXISTS() where appropriate.
...
This addresses kern/11757.
2001-01-22 20:08:03 +00:00
jdolecek
e9e91a0fb5
split off thread specific stuff from struct sigacts to struct sigctx, leaving
...
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx
This addresses kern/10981 by Matthew Orgass.
2000-12-22 22:58:52 +00:00
mrg
272c549ab2
copy exec_aout.c:exec_aout_setup_stack to netbsd32_exec_aout_setup_stack,
...
but use USRSTACK32 not USRSTACK, so that we get 32-bit stack addresses.
now 32 bit a.out binaries work on sparc64.
2000-12-18 14:50:04 +00:00
mycroft
455360f941
Do the __HAVE_SYSCALL_INTERN and __HAVE_MINIMAL_EMUL dance.
2000-12-12 08:00:26 +00:00
jdolecek
a6ca890142
always fill in e_syscall in respective emul_*; if the emulation doesn't
...
have it's own separated *_syscall() function, use syscall()
2000-12-09 12:38:23 +00:00
mycroft
f348afacb9
Regen.
2000-12-09 05:37:01 +00:00
mycroft
9682cf0b09
Add the %% separators.
2000-12-09 05:27:28 +00:00
jdolecek
0576f87ad3
add infrastructure to load emulations and their executable support dynamically
...
via LKM
2000-12-08 19:42:11 +00:00
eeh
433c92930e
Fix uninitialized pointer bug.
2000-12-05 15:25:57 +00:00
fvdl
c3d820fa5d
Use a copied fktrace syscall arg structure with out 'const int' for the
...
filedescriptor to copy arguments, avoiding a warning. XXX
2000-12-03 14:48:29 +00:00
fvdl
5ce71a2aed
Include opt_* files to make sure prototypes are included.
2000-12-03 14:47:27 +00:00