Commit Graph

401 Commits

Author SHA1 Message Date
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