njoly
a926b97a8e
Enable stat/stat64 nsec time support, for amd64 compat linux/linux32.
2007-04-05 16:39:11 +00:00
hubertf
ef314e20d0
Remove duplicate #include <sys/param.h>,
...
and pull in the <sys/cdefs.h> needed for __KERNEL_RCSID
From: Slava Semushin <php-coder@altlinux.ru>
2007-03-26 22:44:40 +00:00
njoly
6bf18aa85e
Update i386 LINUX_{TIOCGPTN,TIOCSPTLCK} definitions for latest
...
linux_ioctl_termios() changes.
2007-03-26 12:26:11 +00:00
mrg
2cdaa49944
implement emul.linux.kern.machine, which can be set to "i686", like
...
some applications seem to want.
2007-03-23 04:16:13 +00:00
manu
91e99f33d3
Add ptmx fakedevice hack for amd64
...
Fix a bug in ioctl handling
2007-03-14 21:52:17 +00:00
njoly
de5304fe4b
Regen (statfs/fstatfs fixes).
2007-03-14 12:47:46 +00:00
njoly
4e3a8d7d1d
Fix compat linux statfs/fstatfs syscalls on amd64.
...
- Do not use statfs64/fstatfs64 as they have an extra size argument.
- Add full 64bit linux struct statfs support.
ok by manu
2007-03-14 12:44:39 +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
ad
c147748d84
- Make the proclist_lock a mutex. The write:read ratio is unfavourable,
...
and mutexes are cheaper use than RW locks.
- LOCK_ASSERT -> KASSERT in some places.
- Hold proclist_lock/kernel_lock longer in a couple of places.
2007-03-09 14:11:22 +00:00
christos
c74f0279ea
more caddr_t lossage.
2007-03-05 14:13:10 +00:00
tsutsui
48174a79c0
Use (char *) cast on pointer arith.
2007-03-05 10:43:32 +00:00
yamt
731acd91f9
fix fallout from caddr_t changes.
2007-03-04 15:41:02 +00:00
tsutsui
543ff60bc5
Use (char *) on pointer arith.
2007-03-04 11:56:26 +00:00
christos
5ebcdbe8b5
fix caddr_t fallout.
2007-03-04 10:21:25 +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
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
ad
cee712ad2f
Make this build.
2007-02-19 01:19:16 +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
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
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
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
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
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
0ffd2bf379
Adapt to recent machdep scope changes.
...
Pointed out by Kouichirou Hiratsuka, thanks!
2006-12-26 16:42:06 +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
6919c6578c
s/independant/independent/, from Zafer.
2006-11-24 22:04:21 +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
cbiere
4b14bb6309
Changed error message of ENOPROTOOPT to "Protocol option not available".
2006-10-31 00:38:06 +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
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
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
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
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
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