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
matt
3a7b10b907
Regen
2006-08-30 11:19:23 +00:00
matt
ad6aa2b08e
Update to deal with options PTRACE
2006-08-30 11:14:39 +00:00
matt
5efede10eb
Regen (for PTRACE).
2006-08-30 11:05:14 +00:00
matt
181c494b95
Update for options PTRACE
2006-08-30 11:04:37 +00:00
christos
df04aa6566
fix incomplete initializer
2006-08-30 02:02:21 +00:00
christos
5970d219ae
remove stray ;'s that were unintentionally placed
2006-08-29 23:58:42 +00:00
christos
33cacef35e
correct comparison that was always false.
2006-08-29 23:57:49 +00:00
christos
11d381a90a
fix incomplete initializer
2006-08-29 23:56:02 +00:00
manu
753fce01f4
netbsd32_sys_ioctl was called with improper syscall argument structure, this
...
caused any X11 program to fail because FIONREAD ioctl always returned an
error.
2006-08-25 16:17:05 +00:00
manu
01f2e16aa8
Add support for socket ioctl.
2006-08-25 08:25:03 +00:00
manu
432f035fa6
The return value for Linux shmat on amd64 does not suffer the same horrible
...
hack as on i386.
2006-08-24 16:36:59 +00:00
dogcow
51faed03f9
move #ifdef up a few lines to prevent unused variable warning/error
2006-08-23 21:17:48 +00:00
bjh21
a707189c87
Use VALID_R15_PSR() to check the context we're restoring in
...
linux_sys_sigreturn(). Somehow this got missed when I introduced that macro.
2006-08-23 21:16:58 +00:00
manu
81c909dd45
1) Complete Linux exit_group() emulation
...
Members of the thread group must die without reporting to the parent and
without going to zombie stage. We do that by reparenting to init before
catching a SIGKILL. The parent will not see the child death.
The thread group leader must report the exit status, even if it exits
because of another thread calling exit_group(). We do that by storing the
exit status in struct linux_emuldata_shared, and the exit hook has the
duty of setting struct proc's p_xstat for the thread group leader.
2) For exit/fork/exec hooks, move the NPTL specific code to separate functions
that are shared between COMPAT_LINUX and COMPAT_LINUX32
3) Fix LINUX_CLONE_PARENT_SETTID semantics
2006-08-23 19:49:09 +00:00
christos
35ca6c8b5b
Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
...
Mostly from Arnaud Lacombe, many thanks!
2006-08-17 17:11:27 +00:00
manu
05c8a1b827
Add a new signature test for linux probe function. We look for a .debuglink
...
section, which is specific to the Linux dynamic interpeter (yes, Linux
can execute it as a stand alone program)
2006-08-07 14:19:57 +00:00
yamt
a4aecea36e
compat_30_sys_getfh: check the size of filehandle. remove an unnecessary cast.
2006-08-04 16:58:27 +00:00
yamt
273fdcedb9
whitespace.
2006-08-04 16:36:44 +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
61138efdd6
regen
2006-08-01 21:05:32 +00:00
martin
796cceed8d
Adapt to latest fhandle_t changes.
...
Pointed out by Havard Eidnes.
2006-08-01 21:05:14 +00:00
bjh21
19d3be8004
Fix a typo that was stopping this compiling.
2006-07-31 20:52:13 +00:00
bjh21
e9b4035b9a
Correct last commit to use correct variable name in hpux_sys_getpgrp2().
2006-07-31 20:39:34 +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
hannken
5bc42a01ba
Fix typo: slim -> &slim.
2006-07-28 13:02:56 +00:00
hannken
055db86c86
Remove 'unused variable p'.
2006-07-28 13:02:21 +00:00
manu
a640310a53
typo
2006-07-24 19:01:49 +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
rillig
07e31b3af5
When debugging output is disabled, define DPRINTF() to a proper
...
statement expression instead of the empty string. Fixes a gcc warning in
ibcs2_ioctl.c.
2006-07-16 06:31:42 +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
christos
29b80779c5
make this compile again.
2006-07-14 20:06:57 +00:00
pavel
7173632277
sys_getfh -> compot_30_sys_getfh
2006-07-13 23:52:55 +00:00
pavel
336e41ffa7
regen (sys_getfh -> compat_30_sys_getfh)
2006-07-13 23:48:08 +00:00
pavel
50a6eaa646
use the COMPAT_30 getfh.
2006-07-13 23:47:17 +00:00
pavel
20d6f5666c
regen (sys_getfh -> compat_30_sys_getfh).
2006-07-13 23:45:54 +00:00
pavel
485f2e18be
use the COMPAT_30 getfh. And do it always - don't protect it by
...
#if defined(NFS) || defined(NFSSERVER).
2006-07-13 23:44:34 +00:00
pavel
b15a1164c7
regen
2006-07-13 23:40:55 +00:00
pavel
6ac5157e79
request the COMPAT_30 getfh in the master files. (Changes to the generated
...
ones would be lost.)
2006-07-13 23:38:57 +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
yamt
9cb0d9a9d8
compat_30_sys_getfh: s/fhandle_t/struct compat_30_fhandle/ (fix overrun.)
2006-07-13 23:04:02 +00:00
pavel
65ace88efa
regenerate again to have correct source RCS Id
2006-07-13 22:35:06 +00:00
martin
b2fb3338d9
Adapt to getfh versioning
2006-07-13 21:31:31 +00:00
martin
9adca95023
COMPAT_SUNOS* uses COMPAT_30 getfh too
2006-07-13 17:39:47 +00:00
martin
508a062fec
Make freebsd_sys_getfh use compat_30_sys_getfh
2006-07-13 16:28:38 +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
christos
9dc3ec85f6
Fix gcc4 bogus initialization warnings from Arnaud Lacombe
2006-07-10 22:38:28 +00:00
manu
2e26811b6b
If the user process requests a non null timeout, make sure we do not turn
...
it into an infinite timeout because of a conversion
2006-07-09 18:51:28 +00:00
drochner
ad1ca09fb9
-fix for previous: don't malloc() with spinlock held
...
-wrap some long lines
2006-06-30 15:50:46 +00:00
he
68f1dc24e6
Convert from using the no-longer-existing sys_socket to using the
...
recently introduced compat_30_sys_socket.
2006-06-30 09:06:32 +00:00
pavel
60646c8d46
Regen after addition of sys___ntp_gettime30 and sys___socket30.
2006-06-29 06:02:42 +00:00
pavel
78789f2545
after sys_socket() versioning, add the new socket syscall.
2006-06-29 05:58:00 +00:00
pavel
43ffaf603b
Add the new ntp_gettime syscall to match native syscalls.master.
2006-06-29 05:54:18 +00:00
pavel
a78062784c
Use the new socket call for Linux and SVR4, because those systems (at
...
least Linux 2.4.31, Irix 6.5.20 and Solaris 10) use EAFNOSUPPORT.
Only the Linux emulation has been tested.
XXX somebody should audit the other emulations...
2006-06-27 09:09:40 +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
manu
0a52064ba3
Do not implement exit_group() the right way on platforms that do not
...
define LINUX_NPTL yet, that cause firefox-bin to fail.
2006-06-26 07:42:00 +00:00
manu
ce7e36a5a9
Regen
2006-06-25 16:16:52 +00:00
manu
b7432513dc
- Complete exit_group() implementation. We now maintain a list of Linux
...
threads in a processes and kill them properly. The code is a bit too
complicated, but I could not find a simplier way of dealing with it
- Change getpid() and getppid() semantics to match what Linux does,
and implement gettid(). In the Linux kernel, threads are implemnted
as plain old processes. A thread group is just a set of processes,
with the parent called leader. Thread ID, which are returned by gettid(),
are just the PID of the plain old processes, and getpid() returns the
PID of the thread group leader.
- Remove struct linux32_emuldata. COMPAT_LINUX32 uses a lot of COMPAT_LINUX
code, where a struct linux_emuldata is assumed. By having distinct emuldata
structure with different sizes and layouts, we caused kernel memory
corruptions.
- Fix setprioriry() and getpriority()
Thanks to Nicolas Joly for tracking down the problem and providing me the
hardware to fix them.
2006-06-25 16:15:39 +00:00
yamt
bf0859e932
netbsd32_sacopyout: don't leak kernel stack garbage to userland.
2006-06-25 08:11:06 +00:00
oki
aab3cbfbad
Added saemul_pecoff structure, and (hope) work again w/ pthread.
2006-06-20 14:11:56 +00:00
christos
e6ea8fe642
Don't allocate too much stuff on the stack
2006-06-20 03:21:30 +00:00
he
ab1ad64ac0
Make this file compile again by using the appropriate types, casts
...
and functions.
2006-06-14 14:18:44 +00:00
he
fe98fdf977
Regenerate after fixing the getpriority syscall definition.
2006-06-13 22:24:34 +00:00
he
e100449f69
We need the argument structure for the getpriority syscall defined, so
...
change NOARGS to STD.
2006-06-13 22:23:03 +00:00
christos
9d7289ea69
change 20 to NZERO; pointed out by mrg.
2006-06-13 16:54:56 +00:00
skd
99e52fdeb8
include kauth.h
...
workaround a gcc4 warning.
2006-06-13 16:23:57 +00:00
simonb
5e13eca2c0
tvtohz() compat function isn't needed now we have timecounters.
2006-06-13 03:58:12 +00:00
christos
430ad9c2a9
don't allocate > 1K on the stack.
2006-06-13 02:31:28 +00:00
christos
48432186cb
stack police: don't allocate statvfs on the stack.
2006-06-12 00:46:50 +00:00
christos
155721b1be
don't allocate a crapload of struct's on the stack. Use a couple of unions
...
and use malloc for them.
2006-06-12 00:42:18 +00:00
christos
3f0deeffa7
stack police: don't allocate PAGE_SIZE bytes on the stack.
2006-06-12 00:07:24 +00:00
christos
9cfe87267e
PR/33671: Nicolas Joly: Add a getpriority syscall to account for the fact
...
that the linux getpriority is off by 20.
2006-06-10 21:18:11 +00:00
christos
ee08f35b9a
regen
2006-06-10 21:16:49 +00:00
christos
c02c268f6b
linux getpriority is off-by-20 so use our own function.
...
From PR/33671: Nicolas Joly
2006-06-10 21:15:33 +00:00
christos
d5ba7564d8
stack police: don't allocate statvfs on the stack.
2006-06-09 23:24:24 +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
rittera
98c1d0c0f5
Replaced some #ifdef NDIS_LKM's which were commenting out debugging
...
information with #ifdef NDIS_DBG. Also added a commented out #define NDIS_DBG
to ndis_var.h.
2006-05-29 20:49:03 +00:00
drochner
42a3bd3098
Extend "struct ntptimeval" for the needs of "timecounters".
...
Allocate a new syscall for ntp_gettime() and set up COMPAT_30 for
the old one.
2006-05-29 09:57:54 +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
rittera
2fb24c8b6d
Added an #ifdef _KERNEL around the #include <sys/device.h>. This is needed
...
because nbcompat.h is included from the user-level ndiscvt utility, which
wouldn't compile due to the indirect inclusion of sys/device.h.
2006-05-26 19:31:35 +00:00
christos
57f1eb7d75
XXX: GCC uninitialized
2006-05-20 22:15:20 +00:00
yamt
175d40d2ca
crfree -> kauth_cred_free.
2006-05-15 22:15:32 +00:00
yamt
cc6a9a01ab
include kauth.h for kauth_cred_getuid, etc.
2006-05-15 22:10:09 +00:00
yamt
9c86170376
include kauth.h for kauth_cred_getgid.
2006-05-15 13:12:13 +00:00
yamt
88f8ec6c15
include kauth.h for kauth_authorize_generic.
2006-05-15 13:11:29 +00:00
yamt
17e49bf47c
include kauth.h for kauth_cred_geteuid, etc.
2006-05-15 13:11:00 +00:00
yamt
576f2b4ce7
fix another kauth mistake.
2006-05-15 13:06:40 +00:00
yamt
1e7ca6733e
include kauth.h for kauth_cred_getegid, etc.
2006-05-15 13:04:08 +00:00
yamt
7395572139
- don't try to use nonexistent variable.
...
- while i'm here, remove unnecessary casts.
2006-05-15 13:01:39 +00:00
yamt
fb7becdc2d
include kauth.h for kauth_authorize_generic, etc.
2006-05-15 12:48:09 +00:00
yamt
17e8de7630
- include kauth.h for kauth_authorize_generic.
...
- wrap a long line.
2006-05-15 09:19:31 +00:00
yamt
6c89e74b38
include kauth.h for kauth_cred_geteuid.
2006-05-15 09:17:05 +00:00
christos
fc6d984beb
kauth fallout
2006-05-15 00:05:16 +00:00
elad
874fef3711
integrate kauth.
2006-05-14 21:19:33 +00:00
christos
fc33769a12
gcc 4 does not like LHS casts.
2006-05-14 05:28:45 +00:00
christos
ca0ec852e6
XXX: GCC uninitialized
2006-05-14 03:40:02 +00:00
mrg
84e6307a04
use socklen_t when talking to the NetBSD side of things
2006-05-12 01:58:55 +00:00
mrg
b569463af0
in pecoff_load_file() make size a u_long to match it's use.
2006-05-11 17:17:00 +00:00
yamt
f5ff7e4897
cleanup user.h.
...
- remove several #include which are not directly related to
this header anymore. tweak *.c accordingly.
- update comments.
- move some !_KERNEL #include to proc.h because it's more appropriate
place these days.
- whitespace.
2006-05-11 11:54:36 +00:00
mrg
43463a5acc
cast to (socklen_t *) where appropriate.
2006-05-11 01:01:13 +00:00
mrg
a07ab709de
cast to (lwpid_t *) where appropriate.
2006-05-11 01:00:43 +00:00
mrg
de67006891
cast to (socklen_t *) where appropriate.
2006-05-11 01:00:02 +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
yamt
f3e4e9f8a2
don't allocate struct statvfs on stack as it's too large.
...
while i'm here, remove some unnecessary casts.
2006-05-10 11:05:34 +00:00
tsutsui
96d1fdec03
Regen from syscalls.master rev 1.15:
...
> Use "#if defined(COMPAT_xx) || !defined(_KERNEL)" so that
> kdump(1) can get all proper syscall names.
2006-05-07 08:41:09 +00:00
tsutsui
97c5ca2016
Use "#if defined(COMPAT_xx) || !defined(_KERNEL)" so that
...
kdump(1) can get all proper syscall names.
2006-05-07 08:39:22 +00:00
tsutsui
0a6d1d8a5c
Update for fhstat(2) versioning.
2006-05-05 13:58:48 +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
tsutsui
0229d65930
Generate initial aoutm68k_syscalls.c.
2006-05-04 22:30:00 +00:00
tsutsui
3c4442d43e
aoutm68k_syscalls.c is now required by kdump(1).
2006-05-04 22:27:51 +00:00
christos
bc364eb43f
update for fhstat.
2006-05-04 17:56:22 +00:00
christos
89a5572015
Regen
2006-05-04 17:50:28 +00:00
christos
9ec9aed92e
fhstat needs to be versioned too (for ino_t). Pointed out by Izumi Tsutsui
2006-05-04 17:48:56 +00:00
christos
cffd112ba3
regen
2006-05-04 17:23:00 +00:00
christos
6507871e48
Add compat30 getdents. Pointed out by Izumi Tsutsui.
2006-05-04 17:22:43 +00:00
rittera
a7d881767a
replaced all device_printf()'s in compat/ndis/ with printf()
2006-04-24 00:23:41 +00:00
drochner
2f9ef14bcf
make this compile w/o KTRACE,
...
resolves PR kern/33212 by KIYOHARA Takashi
2006-04-07 09:23:16 +00:00
drochner
9242c10539
in sysinfo(), force NUL termination of truncated
...
strings if the buffer was too small, as OSF1 does
2006-04-06 15:45:20 +00:00
drochner
61f5f2c87d
-Consistently check the buffer length in getsysinfo(),
...
and require one additional byte for string termination
in the GSI_PLATFORM_NAME case.
This should fix PR kern/33198 by Nicolas Joly.
-Make sysinfo() behave more like the original: return
the length needed and copy out as much as possible.
2006-04-05 15:30:48 +00:00
macallan
f8e479a39b
correct a typo
2006-04-02 17:09:01 +00:00
macallan
3bd975beb8
declare len before using it
2006-04-02 17:08:23 +00:00
christos
af0a2a9e7a
Add a new lifnum sockio.
2006-04-02 07:17:16 +00:00
christos
0185b5a197
remove dup decl
2006-04-02 06:45:16 +00:00
christos
e5c9c0c478
minor nits
2006-04-02 06:44:23 +00:00
macallan
c0007febd1
add a dummy implementation of the schedctl() syscall
2006-04-02 06:34:18 +00:00
rittera
8336364859
Added a #include for sys/device.h. This is necessary when building
...
ndiscvt
2006-04-02 03:07:18 +00:00
rittera
6df1940b32
Removed typedef for device_t, which is apparently no longer
...
needed. Apparently this was added to sys/sys/device.h after SoC 2005.
2006-03-31 03:09:36 +00:00
rittera
a71d97c1d4
Added 3 files which were not part of the original FreeBSD code:
...
1. sys/compat/ndis/files.ndis
-needed to compile sys/compat/ndis into the kernel
2. sys/compat/ndis/nbcompat.h
-Various macros, typedefs, etc. needed for NetBSD
3. sys/compat/ndis/nbcompat.c
-A few function definitions needed for NetBSD. Mainly functions
available in the FreeBSD kernel, but not in NetBSD.
2006-03-31 02:43:18 +00:00
rittera
ace2baad8b
Updated to the latest NDIS code. I added commented out lines in the files
...
arch/i386/conf/GENERIC, arch/i386/conf/files.i386 and dev/pci/files.pci which
can simply be uncommented to compile NDIS into the kernel. I'll write some
documentation on this soon.
Note that NDIS is still somewhat experimental. It is currently tested and
functions relatively well on on two cards:
1. Dell (Broadcom) TrueMobile 1400 Dual Band WLAN Mini-PCI
2. Intel EtherExpress Pro/100
2006-03-31 00:03:57 +00:00
rittera
e584f1ac27
Applied iMil's patch
2006-03-30 23:06:56 +00:00
rittera
3d0ceda304
Added the original FreeBSD RELENG_54 files in sys/compat/ndis.
2006-03-30 22:56:50 +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
thorpej
8077f13805
Use device_is_a(), rather than testing the dv_cfdriver pointer.
2006-03-29 04:19:48 +00:00
thorpej
39cd836ee1
Use device_unit().
2006-03-28 17:38:24 +00:00