Commit Graph

537 Commits

Author SHA1 Message Date
ad 830ab6bb3c - Fix a bug with _lwp_park() where if the computed wakeup time was under
1 microsecond into the future, the thread could enter an untimed sleep.
- Change the signature of _lwp_park() to accept an lwpid_t and second
  hint pointer, but do so in a way that remains compatible with older
  pthread libraries. This can be used to wake another thread before the
  calling thread goes asleep, saving at least one syscall + involuntary
  context switch. This turns out to be a fairly large win on the condvar
  benchmarks that I have tried.
- Mark some more syscalls MP safe.
2007-08-07 19:00:42 +00:00
briggs 883152ac0b Fix typo: mnfromname -> mntfromname. 2007-07-18 13:53:34 +00:00
christos 18754a7640 kill silly constants. 2007-07-17 20:39:42 +00:00
christos ecb7144e3a include <compat/sys/mount.h> MFSNAMELEN 2007-07-17 20:36:11 +00:00
dsl 0bfa8b4ee7 Adapt for sys_mount() becoming compat_40_sys_mount(), 2007-07-14 15:47:26 +00:00
dsl 53e0243f27 Changes to sompat socket function to avoid the dreaded stackgap. 2007-06-30 15:31:49 +00:00
dsl 879c84a74d The code to directly call sigaction1() and sigaltstack1() is much shorter
than the mess required to call the compat_43_xxx functions.
2007-06-16 22:31:08 +00:00
dsl ec918d6dc6 Modify the (recently added) compat_sigaltstack() #define to take the
values of the SS_ONSTACK and SS_DISABLE constants.
Use it to shorten the source files when this action is replicated.
Actually, given the monstrous complexity of sigaltstack1() there is
probably a much better way to do this...
2007-06-16 20:04:27 +00:00
ad c741f88d56 Acquire proclist_mutex before sending signals. XXX irix emul needs a bit
of work.
2007-06-09 21:25:49 +00:00
dsl 938cde68e5 Add a #define that expands to the compat wrapper for sigaltstack1().
Use it for the netbsd32_compat_13.c version of the code.
2007-06-03 14:59:46 +00:00
dsl 671dc7790c sendmsg() shouldn't modify the 'msg' parameter, and recvmsg() doesn't have
to modify the 'iov' array - it isn't updated.
2007-06-03 11:30:59 +00:00
dsl 97d93705e5 Calling sigaltstack1() directly is so much easier than going via
compat_13_sys_sigaltstack().
2007-06-03 11:09:35 +00:00
dsl ed63ffe787 Split netbsd32___semctl14() so that it is callable from
compat_10_netbsd32_sys_semsys() (where the one parameter is already in
kernel space).
Note that the code in compat_10_netbsd32_sys_semsys() has always been wrong,
since it called compat_14_sys___semctl() - which would read 64bit values!
2007-06-03 10:55:10 +00:00
dsl 7ba299c5d4 Split sys__lwp_park() so that the compat/netbsd32 code can copyin and convert
its timeout then call the standard function.
2007-06-03 09:50:12 +00:00
dsl d7f93c5c67 Split sys_bind() and sys_connect() so that compat code can use common code
once the 'address' has been copied into an mbuf.
Add extra flags for 'struct msghdr.msg_flags' to indicate that the address
  and control are already in mbufs, and that the uio structure is in userspace
  for sending data, rename sendit() to do_sys_sendmsg() to ensure no old code
  passes in random flags.
Changes to compat code to use new functions - removing some stackgap use.
Fix a 'use after free' in compat_43_sys_recvmsg.
I ***THINK*** the code that converts 'cmsg' formatted data is borked!
svr4_stream.c ought to be generated from svr4_32_stream.c during the build.
2007-06-01 22:53:52 +00:00
christos ab89ea8ca6 message size == 0 is valid. From Markus Mayer 2007-05-31 23:34:42 +00:00
christos 9bf57b1f3a make this compile again
XXX: The ioctls will need to be fixed.
2007-05-30 00:00:59 +00:00
christos c61eed39a8 rename si_sigval -> si_value to match POSIX RTS. 2007-05-21 15:35:47 +00:00
dsl c83f8a10ad Change the compat sys_[fl]utime code to not use the stackgap. 2007-05-12 17:28:19 +00:00
dsl 1844147fa9 Split sys_wait4() so that compat code can fiddle with the returned 'status'
and 'rusage' without having to copy data to/from stackgap buffers.
The old split (find_stopped_child) could be removed.
amd64 seems to run netbsd32, linux and linux32 emulations. sparc64 compiles.
2007-05-07 16:53:17 +00:00
dsl 906b9af2a7 Rework compat stat() and statvfs() code so that it no longer uses the stackgap. 2007-04-30 14:05:47 +00:00
dsl 8932ebd238 Remove some unused calls to stackgap_init() 2007-04-30 09:20:18 +00:00
dsl 0df00dcf55 Split the statvfs functions so that the 'work' is done to a kernel buffer
which can either be copied directly to userspace, or converted then copied.
Saves replicating a lot of code in the compat functions (esp. for
getvfsstat) at a cast of an extra function call in the non-emulated case -
which is unlikely to be measurable given the other costs of the actions
involved (even on vax).
Remove dofhstat() and dofhstatvfs() (and the last caller).
Remove some redundant stackgap_init() calls.
2007-04-30 08:32:14 +00:00
dsl d0b9f67395 Delete a diagnostic printf and some unused 'stack gap' initialisation. 2007-04-22 14:10:30 +00:00
dsl 313aae0af3 Actually report an error when sys__stat30() fails. 2007-04-22 10:54:43 +00:00
dsl b8fbaf8c4b Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
  - which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
  the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
  during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
  search for absolute pathnames in the emulation root, if that fails it will
  retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
  of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
  relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
  inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
  the real root is returned instead (matching the behaviour of emul_lookup,
  but being a cheap comparison here) so that programs that scan "../.."
  looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
  CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
  TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
2007-04-22 08:29:55 +00:00
pooka 652606289c I'm not sure if I want to know what MNT_LAXY means, so I'll just
assume the comment has a tyop of MNT_LAZY.
2007-04-16 18:33:39 +00:00
cube c8ff1b6980 Count environment vars with envc, not argc [hi dsl!]. Reported by Nicolas
Joly in private mail.
2007-03-26 17:12:02 +00:00
njoly 226b6c843f Add ktrace I/O support to netbsd32_ioctl() syscall.
Reviewed by cube.
2007-03-20 11:02:18 +00:00
cube e8beebe1e2 More SCARG_P32 fallout. 2007-03-20 08:25:37 +00:00
cube 35a0a309fb Fix typo. Reported by martin. 2007-03-20 08:12:42 +00:00
dsl d364d308c7 Change all the NETBSD32PTR64(SCARG(uap, xxx))) to SCARG_P32(uap, xxx). 2007-03-18 21:38:32 +00:00
dsl a065e51621 remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers.  Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.
2007-03-16 22:21:40 +00:00
dsl 893faeae9e Update all the compat stuff to not use the 'stackgap' for processing
sys_stat() and friends, instead use do_sys_stat() and do_sys_fstat()
that write the answer into a kernel buffer (on stack) that can be
converted to the correct form and written the userspace.
I've test compiled a few kernels, and tested i386 netbsd1.6 ls.
Given I think I've fixed some bugs, it might be 50-50 with new ones.
2007-03-10 21:40:23 +00:00
christos fffc9c66c9 fix fallout from caddr_t changes. 2007-03-04 07:54:07 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
cube 26a6c15e1a Regen (a few MPSAFE additions). 2007-02-19 15:33:20 +00:00
cube b2d510bccc Mark MPSAFE the syscalls that are not translated (and of course, only when
the native syscall is itself marked MPSAFE).
2007-02-19 15:32:43 +00:00
cube 632ece3eaf Introduce a new member to struct emul, e_startlwp, to be used by
sys__lwp_create.  It allows using the said syscall under COMPAT_NETBSD32.

The libpthread regression tests now pass on amd64 and sparc64.
2007-02-19 15:10:02 +00:00
cube 0ff7d99ddb Make netbsd32_{get,set}ucontext and associated functions
{get,set}ucontext32 look like their native counterparts again after
newlock2 merge.  This avoids entering sigprocmask1 without the proc mutex
held...
2007-02-19 14:39:43 +00:00
cube c7565916df Regen (missing lwp syscalls). 2007-02-18 15:00:14 +00:00
cube c376ba15d1 Add missing lwp syscalls. Put them all together into a new file,
netbsd32_lwp.c, and remove remaining traces of SA.

This still needs some MD (and possibly MI, depending on the chosen
solution) changes to actually work.
2007-02-18 09:03:54 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf eda05c6413 Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
2007-01-29 01:52:43 +00:00
christos d6bc4d2b49 deal with RLIM_INFINITY in the setrlimit case. 2006-11-21 18:50:01 +00:00
christos 887f588c92 adjust limits takes struct proc again. 2006-11-21 15:02:18 +00:00
christos 0470afd097 Simplify previous commit not to use dosetrlimit(), since we don't want the
kauth tests etc.
2006-11-21 14:57:54 +00:00
christos 1882355e27 From Nicolas Joly:
> It seems that 32bits programs, running under compat_netbsd32, using
> setrlimit force all other programs to have their maximum data size
> fixed at 3GB, where native 64bits apps used 8GB previously.

I tracked this one to the `netbsd32_adjust_limits()' function (called
when creating a new process under compat_netbsd32), where data and
stack limits are set without checking for shared `p_limit' structure
(p_limit->p_refcnt > 1). This explain the side effect where processes
have their limits changed when a compat_netbsd32 (or compat_linux32)
program is run.

The fix is to use `dosetrlimit()' to ensure the needed copy-on-write
behaviour for shared structure.
2006-11-21 14:32:27 +00:00
elad 68f43d80fe Clean some KAUTH_GENERIC_ISSUSER usage in compat code. 2006-11-14 13:34:29 +00:00
cube 3574e17e23 Regen (PR#34951 fixes). 2006-11-09 14:10:21 +00:00
cube 1277ee639e - Make better use of COMPAT_XX type in syscalls.master
- Remove useless (thanks to COMPAT_XX behaviour) #ifdefs in
  syscalls.master
- Make netbsd32_compat_43.c compiled per COMPAT_LINUX32 because the latter
  needs stuff from it.

Fixes Perry's PR#34951.
2006-11-09 14:09:37 +00:00
drochner b1af2cb9b9 -SUS says that a successful call to setcontext(2) does not return. This
implies that _UC_CPU must be set in the context passed. Check for this
 and return EINVAL if not; this gives a cheap test for corrupted
 ucontexts eg on a signal handler stack which would go unnoticed otherwise.
-Don't ckeck for NULL ucontext pointers explicitely. This is an error,
 except in the swapcontext() case where it can be easily caught in
 userland.
2006-11-08 20:18:32 +00:00
fvdl fc06b6e99a EPASSTHROUGH from lower layers is returned as ENOTTY to the (system) caller.
Make it so.
2006-09-24 10:20:16 +00:00
manu 63ac93df54 Add sysctl tracing to emulations.
While we are there, fix a bug in FreeBSD sysctl emulation: use copyin for
moving data to the kernel
2006-09-23 22:11:59 +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
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
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 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
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
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
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
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
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
yamt bf0859e932 netbsd32_sacopyout: don't leak kernel stack garbage to userland. 2006-06-25 08:11:06 +00:00
kardel de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
drochner 05a790f438 regen 2006-05-31 09:54:45 +00:00
drochner 5529c06d6a support ntp_gettime again
compile tested by Havard Eidnes
2006-05-31 09:52:27 +00:00
drochner 21166bafa5 regen 2006-05-29 09:46:54 +00:00
drochner 9575ca7cfd Remove emulation of ntp_gettime. In preparation for "timecounters" we
will change "struct ntptimeval", so some translation would be necessary.
ntp_gettine is considered dispensable, the only userland program known
to use it is "ntptime".
2006-05-29 09:44:51 +00:00
simonb e78022e1d6 Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.
2006-05-27 23:46:49 +00:00
elad 874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
mrg f068df14bb use socklen_t where appropriate. 2006-05-11 00:59:10 +00:00
mrg 13e3bbe4e1 add an extra (uintptr_t) cast to NETBSD32TOP. 2006-05-11 00:58:25 +00:00
cube 1233d0b5cd Move fhstat as sys___fhstat30 in netbsd32_fs.c because it doesn't belong
to netbsd32_netbsd.c (which incidentally means it had been broken for a
while I guess).  Add compat_30 version.
2006-05-05 13:31:30 +00:00
cube 8332bbc306 Regen (fhstat versioning, posix_fadvise). 2006-05-05 13:29:50 +00:00
cube 8a02261127 Follow on fhstat(2) versioning. While there, add sys_posix_fadvise (no
emulation needed there).
2006-05-05 13:28:52 +00:00
cube a107f9847e Add compat_30 as a compatopts. 2006-05-05 13:27:29 +00:00
cube 69a77971a8 Regen (_lwp*, sa_*). 2006-03-29 23:04:48 +00:00
cube 99a30ba980 Implement the _lwp* and sa_* families of syscalls, using the newly
introduced hooks in the native code.
2006-03-29 23:04:12 +00:00
matt 6a9dc55430 More variable sized MALLOC -> malloc changes. 2006-03-19 22:39:28 +00:00
matt 170f4f3a59 MALLOC -> malloc 2006-03-18 18:56:19 +00:00
cube daab1bf18c Move malloc calls outside of the block where a lock is held. 2006-03-15 11:36:42 +00:00
cube 37b7f4fbd8 SA introduce a new case of siginfo structure. Be ready for it when the
time comes to support SA in COMPAT_NETBSD32 (which is soon).
2006-03-15 09:09:47 +00:00
thorpej be8b235384 Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
  trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
  about KTRACE and SYSTRACE, but do no more.
2006-03-07 03:32:04 +00:00
cube ceafd0acdb Regen (SysV IPC). 2006-03-06 14:41:28 +00:00
cube 754cf030b7 Implement the SysV IPC family of syscalls. 2006-03-06 14:40:55 +00:00
cube 40a483cd0b Regen (ksem_*). 2006-03-05 01:29:28 +00:00
cube 6d0cb97ff8 Implement the ksem_* family of syscalls. 2006-03-05 01:28:20 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
he 1f315c6ab1 Paste in the conditional declaration of the pps_* extern variables
from kern_ntptime.c, so that this file can build under PPS_SYNC.
2006-02-17 15:44:17 +00:00
perry fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
manu ee0c5b44de Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough so
that the i386 license manager part of amd64 version of Fluent works.

While I'm here, add SysV IPC to COMPAT_LINUX/amd64
2006-02-09 19:18:56 +00:00
cube 16b23e6e66 More ktrace-lwp merge fallout: netbsd_elf32_signature's prototype has
changed.  Too bad C doesn't have signatures in symbols.

Fixes PR#32388 by Nicolas Joly.
2005-12-27 00:36:00 +00:00
perry 0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
christos fa7190ea1a more proc to lwp problems. 2005-12-12 02:51:07 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos 0e0397d742 netbsd32_timevalp_t is not really a pointer. 2005-12-06 13:37:35 +00:00
christos 58b2cd40fa remove conflict. 2005-12-05 15:17:18 +00:00
christos 9612f9a4de untagle a bit. 2005-12-05 15:16:51 +00:00
kleink cb3b376555 Sync with kern_time.c rev. 1.98:
- make settime take timespec.
- pass struct proc down so that we can log a detailed message.
2005-12-05 10:31:00 +00:00
simonb a21c456e2e Call nanotime() directly, instead of doing the
microtime()/TIMEVAL_TO_TIMESPEC() dance.
2005-11-11 07:07:42 +00:00
christos 82eba32c06 need compat/sys/shm.h 2005-11-10 18:47:53 +00:00
cube 75d561e358 Move prototypes for siginfo32 to/from siginfo converters at the right
place.
2005-10-24 15:28:09 +00:00
cube fc1218444f Regen (kqueue, kevent). 2005-10-23 01:34:33 +00:00
cube 97e4d77453 - Split sys_kevent into kevent1 so that it can be used by COMPAT_NETBSD32
code.

- To achieve COMPAT_NETBSD32 compatibility, introduce a parameter to
  kevent1 that points to functions that do the actual copyin/copyout
  operations.  This is similar to what was done in FreeBSD by Paul Saab.

- Add the COMPAT_NETBSD32 definitions and hooks.
2005-10-23 01:33:32 +00:00
cube 388b97e039 Implement a few changes needed to properly resolve PR#30924, as
discussed in the PR.

- introduce sys/timevar.h to hold kernel-specific stuff relevant to
  sys/time.h.  Ideally, timevar.h would contain all (or almost) of the
  #ifdef _KERNEL part of time.h, but that's a pretty big and tedious
  change to make.  For now, it will contain only the prototypes I
  introduced when working on COMPAT_NETBSD32.

- split copyinout_t into copyin_t and copyout_t, it makes prototypes more
  explicit about the meaning of a given argument.  Suggested by yamt@.

- move copyinout_t definition in sys/time.h to systm.h as copyin_t and
  copyout_t

- make everything uses the new types and include the proper headers at
  the proper places.
2005-10-23 00:09:14 +00:00
chs ffd3aa297e make the previous apply only to x86_64. 2005-10-07 14:46:04 +00:00
chs 26a2ca0397 add __attribute__((packed)) to struct netbsd32_stat13. the alignment of
64-bit values is annoying in the x86 world:  they require 64-bit alignment
in 64-bit mode but only 32-bit alignment in 32-bit mode.
2005-10-07 14:40:06 +00:00
chs 8a6025c821 this needs stuff from compat/sys/siginfo.h now, just include it here. 2005-09-27 15:09:04 +00:00
chs 94be8205d7 make this compile again. 2005-09-27 14:37:06 +00:00
christos a5d6ab9188 need compat/sys/socket.h 2005-09-24 21:34:35 +00:00
christos 91e84b20b0 make the siginfo converters static and comment out the one that is not used. 2005-09-24 21:34:18 +00:00
christos dd40a9f6f6 include new compat siginfo header. 2005-09-24 17:29:47 +00:00
chs 33359b3121 need to include sys/socket.h here now, sys/mount.h no longer does it for us. 2005-09-24 15:42:58 +00:00
christos 58b392c018 make this compile again. 2005-09-13 03:23:09 +00:00
kent 868a42c866 fix a compilation problem on NetBSD/amd64 2005-08-20 15:02:36 +00:00
christos b041fac92d Fix lossage I created with the 64 bit ino_t change. 2005-08-19 04:24:38 +00:00
christos 758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
cube ae35d4a4e9 Regen (__sigtimedwait(2)). 2005-07-23 22:04:12 +00:00
cube 73fe747f11 Implement __sigtimedwait(2). 2005-07-23 22:03:45 +00:00
cube a6b803a79f Constify conversion functions. 2005-07-23 21:51:29 +00:00
cube 21472d491b Regen (timer_create(2) and friends). 2005-07-23 18:57:07 +00:00
cube 23a1110cbd Implement the timer_create(2) family of syscalls. 2005-07-23 18:56:15 +00:00
cube ee24060ae4 Remove duplication of code for netbsd32_wait4() by using stackgap(9). 2005-07-22 22:46:29 +00:00
cube 86f97cc446 Do the CHECK_ALT_EXIST dance again in netbsd32_execve(). It was lost in
previous commit.
2005-07-13 11:55:19 +00:00
cube e13e6c14c7 netbsd32_execve2() doesn't exist anymore. 2005-07-13 11:53:57 +00:00
martin e14ba58310 When returning 64bit values (from netbsd32_lseek) fix up the return
value vector (of 32bit values, most likely) via a MD macro.
2005-07-12 15:06:17 +00:00
cube e937141b42 Regen (*xattr(2)). 2005-07-12 07:46:19 +00:00
cube 728e5e01bd Add the *xattr(2) family of syscalls. Just like the *extattr(2) family,
they're waiting for an actual FS back-end to be tested, but are still
straightforward enough.
2005-07-12 07:45:34 +00:00
cube 0477abe883 Regen (rasctl(2)). 2005-07-11 20:18:52 +00:00
cube 241e7db4d5 Add rasctl(2). Thanks to the regression tests for that syscall, I was able
to discover the bugs in netbsd32_setitimer() and netbsd32_execve().
2005-07-11 20:18:05 +00:00
cube 355bcba766 Split sys_execve() and add execve1() that does most of the work, and takes
as an argument a function that will retrieve an element of the pointer
arrays in user space.  This allows COMPAT_NETBSD32 to share the code for
the emulated version of execve(2), and fixes various issues that came from
the slow drift between the two implementations.

Note:  when splitting up a syscall function, I'll use two different ways
       of naming the resulting helper function.  If it stills does
       copyin/out operations, it will be named <syscall>1().  If it does
       not (as it was the case for get/setitimer), it will be named
       do<syscall>.
2005-07-11 20:15:26 +00:00
cube 08fd92bac5 Split sys_getitimer and sys_setitimer to make it possible to share the
relevant code with the COMPAT_NETBSD32 version, and make the latter use
the new functions.

This fixes netbsd32_setitimer() which had drifted from the native syscall
and did not work properly anymore.
2005-07-11 19:50:42 +00:00
cube 0057da6efa NOFOLLOW should be passed to NDINIT() instead of FOLLOW for lstat(2).
Reported by Martin Husemann.
2005-07-10 16:34:53 +00:00
cube 4a8942e74c Regen. 2005-07-10 14:32:35 +00:00
cube 7e3a28a419 Add support for fsync_range(2). 2005-07-10 14:32:16 +00:00
cube c6a5f27efa Regen. 2005-07-10 11:29:35 +00:00
cube b01a57e4ce Implement __clone(2). 2005-07-10 11:28:58 +00:00
cube 91598566dc Report changes from sys_wait4(). 2005-07-10 11:28:03 +00:00
cube 16e20b37d6 Regen. 2005-07-09 22:40:34 +00:00