cube
c7565916df
Regen (missing lwp syscalls).
2007-02-18 15:00:14 +00:00
dsl
923424a8c0
Keep proclist_lock held across p_find and use of result proc.
2007-02-18 11:45:35 +00:00
dsl
1564fa5d82
ANSI prototypes
2007-02-18 11:38:15 +00:00
dsl
c7907fd992
Factor out the replicated code that verifies that the caller is allowed
...
to acces the required process into a separate function (hi cut and paste).
Acquire the proclist_lock across p_find().
2007-02-18 09:45:39 +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
pavel
934634a18c
Change the process/lwp flags seen by userland via sysctl back to the
...
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.
Restores source compatibility with pre-newlock2 tools like ps or top.
Reviewed by Andrew Doran.
2007-02-17 22:31:36 +00:00
dsl
2b491f69ce
Acquire proclist_lock across the calls to p_find() and pg_find().
2007-02-17 21:40:19 +00:00
njoly
5f6b6270e4
Regen.
2007-02-16 20:49:40 +00:00
njoly
11f77cf45a
Add support for a few syscalls:
...
setfsuid16/getfsuid16
setfsuid/getfsuid
sched_yield
ok by manu
2007-02-16 20:49:06 +00:00
ad
57aa4fbf3b
proc_free() was returning a NULL rusage pointer to wait() when a traced
...
process was reparented. Change proc_free() to copy the rusage to a buffer
on the stack if required, so it can be passed both to the debugger and
to the real parent process.
Fixes kern/35582 (kernel panics with gdb).
2007-02-16 00:39:16 +00:00
ad
087fdb9080
Count the number of CPUs at boot and stash in 'ncpu'. Eventually should
...
have each CPU register at attach, so we can figure out the topology for
the scheduler.
2007-02-15 20:32:47 +00:00
ad
12460decf9
Fix COMPAT_LINUX32.
2007-02-15 15:29:07 +00:00
ad
d0a51fd23b
Fix Linux compat on amd64.
2007-02-15 15:13:33 +00:00
mlelstv
8d08c62fcc
Make setsockopt return compatible error codes for AF_UNIX sockets.
2007-02-11 08:00:59 +00:00
ad
6faf4c1b76
Sprinkle some more locks.
2007-02-10 10:12:34 +00:00
ad
8cfae44a35
Sprinkle a couple more locks.
2007-02-10 10:09:01 +00:00
tsutsui
18f2cde2bd
Make COMPAT_HPUX compile by mechanical replacements.
...
XXX1: not sure if it still works even before newlock2 merge
XXX2: some more mutex locks might be required
2007-02-10 02:42:30 +00:00
ad
88cb6cb846
Acquire proclist_mutex before sending signals.
2007-02-09 23:51:20 +00:00
ad
b07ec3fc38
Merge newlock2 to head.
2007-02-09 21:55:00 +00:00
njoly
8fbf55addb
Regen (aliases cleanup).
2007-02-08 12:32:17 +00:00
njoly
fb1562ae0f
Remove some aliases, for syscalls that use their netbsd32 equivalent.
...
This makes the ktrace output more consistent.
ok by manu.
2007-02-08 12:29:39 +00:00
njoly
835e659d6b
Regen (poll argument fix).
2007-02-07 15:35:00 +00:00
njoly
398ec1833a
Use netbsd32_pollfdp_t instead of wrong `struct pollfd *'.
...
ok by manu.
2007-02-07 15:32:52 +00:00
njoly
0d81683020
Add a new linux_emuldata_shared flag value LINUX_LES_USE_NPTL to allow
...
both NPTL and old linuxthreads behaviour depending on process needs.
Apply to exit_group(), getpid() and getppid() to share them between
compat linux32 (non NPTL) and compat linux (NPTL) on amd64.
ok by manu and christos
2007-02-05 18:31:36 +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
he
a128c1c544
Adapt to the addition of vfs_suspendctl in struct vfsops.
2007-01-23 10:35:05 +00:00
elad
1113a3afe4
Consistent usage of KAUTH_GENERIC_ISSUSER.
2007-01-05 15:40:51 +00:00
elad
b31e9c44cf
Consistent usage of KAUTH_GENERIC_ISSUSER.
2007-01-04 18:27:36 +00:00
elad
8d28e56e22
Remove KAUTH_GENERIC_ISSUSER.
2007-01-04 15:21:09 +00:00
elad
0ffd2bf379
Adapt to recent machdep scope changes.
...
Pointed out by Kouichirou Hiratsuka, thanks!
2006-12-26 16:42:06 +00:00
wiz
0ec178eea9
Spell "relevant" correctly. From Zafer Aydogan.
2006-12-25 18:31:18 +00:00
elad
c96fdfd49b
Part of PR/33280: Christian Ehrhardt: The call to FILE_USE should be
...
immediatly before the FREAD | FWRITE test not after it or FILE_UNUSE will
be called after the jump to out without a corresponding FILE_USE.
2006-11-25 22:03:41 +00:00
wiz
09cb1d6f1c
s/existance/existence/, from Zafer.
2006-11-24 22:52:16 +00:00
wiz
6919c6578c
s/independant/independent/, from Zafer.
2006-11-24 22:04:21 +00:00
christos
d8f5d5f044
fix capitalization of NetBSD; from Zapher
2006-11-24 19:38:55 +00:00
christos
91ad430f6c
adjust_limits takes p, not l again
2006-11-22 13:56:09 +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
christos
168cd830d2
__unused removal on arguments; approved by core.
2006-11-16 01:32:37 +00:00
elad
68f43d80fe
Clean some KAUTH_GENERIC_ISSUSER usage in compat code.
2006-11-14 13:34:29 +00:00
jmmv
c963ce01ee
Pull in opt_ktrace.h (and sys/ktrace.h) so that the ktrace-related code
...
is compiled when enabled. You know, preprocessor hell...
2006-11-13 17:01:06 +00:00
jmmv
870dd91500
Let this build when KTRACE is not enabled. Closes PR kern/33210.
2006-11-13 16:57:40 +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
cbiere
4b14bb6309
Changed error message of ENOPROTOOPT to "Protocol option not available".
2006-10-31 00:38:06 +00:00
christos
9e34b4bbee
ktruser checks for length now.
2006-10-22 18:18:49 +00:00
christos
0838967c65
ktruser now returns an error if the buffer length is too big.
2006-10-22 18:18:08 +00:00
reinoud
98d17cde9d
Make it compile again; it had an empty if body due the the DPRINTF and gcc
...
complained about it.
2006-10-19 15:11:59 +00:00
martin
dda2fa3e76
Make it compile with -Wextra
2006-10-16 20:18:55 +00:00
martin
14e2e5cf6a
Missing initializer
2006-10-16 20:12:38 +00:00
martin
a4f14b9dd0
Missing initializers
2006-10-15 21:12:08 +00:00
christos
a2161fece4
sprinkle __unused.
2006-10-14 18:57:06 +00:00
christos
4d595fd7b1
- sprinkle __unused on function decls.
...
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos
ed106f137b
Coverity CID 2990: fix memory leak (from Arnaud Lacombe)
2006-09-29 14:24:55 +00:00
pavel
3cdb79bdae
Replace homegrown tests for FIFO (... & S_IFIFO) by S_ISFIFO. The old code
...
was "correct" by luck - we don't have any other file type whose S_IF* bits
in sys/stat.h overlap with S_IFIFO.
Originally discovered by Paul Stoeber in OpenBSD.
2006-09-25 16:16:18 +00:00
dbj
2df12fb8b5
use _KERNEL_OPT instead of _LKM to check whether to include "opt_ktrace.h"
2006-09-24 21:44:58 +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
dogcow
e15e9231e6
opt_ktrace.h doesn't exist when building LKMs.
2006-09-24 05:48:27 +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
jmcneill
8c94a07b9d
In mach_msg_receive(), don't declare 'struct proc *p' unless either
...
DEBUG_MACH_MSG or KTRACE are defined. The variable is unused otherwise,
resulting in a compile error. Fixes PR# 33211.
2006-09-23 03:34:19 +00:00
christos
487c57538b
Pretend to implement TIOCSPTLCK. Although failing is harmless, there is no
...
point in doing so.
2006-09-22 15:12:02 +00:00
manu
876294b403
Proprely convert devices on amd64
2006-09-20 09:54:55 +00:00
yamt
90cb722c5c
svr4_32_sys_sysconfig: fix a compilation failure after yamt-pdpolicy merge.
...
reported by Kurt Schreiner on current-users@.
2006-09-17 08:41:31 +00:00
yamt
9d3e3eab23
merge yamt-pdpolicy branch.
...
- separate page replacement policy from the rest of kernel
- implement an alternative replacement policy
2006-09-15 15:51:12 +00:00
manu
717102f4bb
Jumbo COMPAT_LINUX/COMPAT_LINUX32 bugfix, with the help of Nicolas Joly
...
- Fix shmat return value on amd64: it uses no black magic with retval[0]
- Fix integer overflows in sysinfo
- Implement sysinfo, mmap2, sched_getparam, sched_getscheduler, mremap,
and madvise in COMPAT_LINUX32
- Fix improper types used in setgroups16/getgroups16
- Implement mmap2 for COMPAT_LINUX32
- Ifdef debug messages by DEBUG_LINUX
2006-09-13 19:55:49 +00:00
manu
99bb1b27be
This file was not used anymore
2006-09-13 19:47:30 +00:00
christos
1ae1244b82
avoid empty if body.
2006-09-13 00:57:29 +00:00
christos
46c5717199
avoid empty if body.
2006-09-13 00:52:07 +00:00
christos
6a76f8e0d2
Avoid empty body in if
2006-09-13 00:51:12 +00:00
christos
193447d4bd
avoid empty if
2006-09-13 00:49:07 +00:00
tsutsui
c1ba1fb63b
Try to make this timecounter ready.
...
XXX untested since I have no HP-UX binary to test these syscalls
2006-09-09 11:27:19 +00:00
manu
f0cbe4f3bf
Implement Linux's fdatasync, patch from Nicolas Joly
2006-09-06 12:01:23 +00:00
manu
84b03d19fe
Fix linux32_sys_setres{uid|gid}: -1 does not means the same thing on i386
...
and amd64...
2006-09-06 08:32:00 +00:00
manu
4d5f807455
Fix linux32_sys_sysctl, it was horribly broken.
2006-09-05 17:12:19 +00:00
manu
ea514e44f5
typo
2006-09-05 08:17:09 +00:00
christos
b33a26ac88
remove unneeded initializer.
2006-09-03 20:58:26 +00:00
christos
1b87f8e9cc
add missing initializer
2006-09-03 06:29:03 +00:00
christos
59d19c4947
add missing initializers
2006-09-03 06:28:16 +00:00
christos
489fe1e988
add missing initializers
2006-09-02 06:56:30 +00:00
christos
de02317b32
comment out impossible code
2006-09-02 06:53:17 +00:00
christos
c4501e2800
fix incomplete initializer
2006-09-02 06:52:13 +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
mrg
356f83eb40
clean up ptrace changes: #include "opt_ptrace.h"
2006-09-01 05:27:15 +00:00
sekiya
b103a9ae62
Store return value of iur_proc_queue() in local variable iwpr (unreferenced
...
anywhere else in function), to appease gcc4.
2006-09-01 04:54:45 +00:00
sekiya
40be9d473d
Include <sys/vnode.h>. Caught by gcc4.
2006-09-01 04:49:48 +00:00
he
3e73ce6bef
Protect the include of "opt_ptrace.h" by _KERNEL_OPT.
2006-08-31 15:01:56 +00:00
oki
a7e68afd48
Regen (for PTRACE).
2006-08-31 00:23:11 +00:00
oki
a978ade516
Update for options PTRACE.
2006-08-31 00:21:09 +00:00
he
30ef9162ed
Regen (for PTRACE).
2006-08-30 23:00:45 +00:00
he
77e02d283d
Update for options PTRACE.
2006-08-30 23:00:06 +00:00
he
7fae0d129f
Allow this to build as an LKM by testing for _KERNEL_OPT before
...
including opt_ptrace.h.
2006-08-30 17:14:34 +00:00
christos
8cc5bb6be9
fix and comment initializers.
2006-08-30 15:22:45 +00:00
he
a7d7842fcb
Regenerate after dealing with options PTRACE.
2006-08-30 14:02:12 +00:00
he
4ca1029105
Update to deal with options PTRACE.
2006-08-30 14:01:25 +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
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