Commit Graph

3854 Commits

Author SHA1 Message Date
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
dyoung
448664e102 Use __arraycount(). 2006-03-27 21:27:02 +00:00
drochner
86225028d1 kill the last use of vm_fault_t, from Havard Eidnes 2006-03-20 13:14:37 +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
erh
8ad33681f8 Fix Coverity issues 2321 and 2320. Make sure to free allocated memory. 2006-03-17 06:01:14 +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
jonathan
b9c6a2634b Rework Linux sysctl()-emulation, so that on amd64, we return the same
Linux kernel-version as on i386 and ppc (currently 2.4.18), and a date
in Feb 2002.

On all other NetBSD platforms we return a Linux-kernel version of
2.0.38 and a date sometime in 2000, which (AFAIK) predates the
existence of amd64, and therefore predates Linux support for amd64.

To me, it makes much more sense to return the same Linux-kernel-version
and date for both 32-bit x86 and 64-bit x86.

Empirically (and not least), this change also allows SuSE 10 amd64
binaries to run under our Linux amd64 binary emulation (both static
and dynamic-linked, given suitable setup) , which they didn't when we
reported a Linux/x86_64 kernel version of 2.0.38.
2006-03-08 03:55:31 +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
thorpej
6e72296875 Remove SET/CLR/ISSET definitions. 2006-03-06 23:19:50 +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
christos
1b2709754a cleanup more SET/CLR/ISSET lossage 2006-03-05 17:33:33 +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
xtraeme
312ebc355d Instead of getting properties from calling ioctl with AUDIO_GETINFO, use
AUDIO_INITINFO(). Now the sound with the linux flash plugin works
properly.

From OpenBSD.
2006-03-04 11:17:08 +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
kent
d3dccfb5d8 regenerate for syscalls.master rev.1.16 2006-02-26 17:13:51 +00:00
kent
1d37dd09ca follow recent changes in sys/kern/syscalls.master 2006-02-26 17:12:44 +00:00
wiz
5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
manu
c7fca50583 Fix compat_linux32 time(2) emulation 2006-02-24 06:39:47 +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
5e9b532be2 Add getcwd (for real this time), fix dup and dup2 2006-02-15 15:23:18 +00:00
manu
f806470fb3 - Move the BSD to Linux and Linux to BSD termio/termios conversion functions
to a header where they can be shared between COMPAT_LINUX and COMPAT_LINUX32
- Add termios ioctl emulation to COMPAT_LINUX32
- Add the getcwd system call to COMPAT_LINUX32/amd64

That makes Linux's bash working with COMPAT_LINUX32.
2006-02-15 09:31:17 +00:00
dogcow
663b29bb4a make linux emulation compile on i386 again. 2006-02-09 23:27:08 +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
yamt
cab41a8b8a linux_sys_mremap: validate flags. 2006-01-31 14:02:55 +00:00
yamt
e8e7ab8637 implement compat_linux mremap. 2006-01-21 13:34:15 +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
3d4ed1fbc7 __inline__ -> inline 2005-12-24 23:41:33 +00:00
perry
00d6acb4b6 bare asm -> __asm 2005-12-24 22:59:39 +00:00
perry
0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
christos
55f7db0668 PR/32303: Nicolas Joly: Fix -current amd64 kernel compilation failure with
options COMPAT_LINUX
2005-12-16 14:16:14 +00:00
christos
7330d168b8 proc to lwp change 2005-12-14 18:33:32 +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
tron
9ca15b486f Fix problem in ioctl() handling in OSS audio emulation which caused
unintentional changes of the audio settings e.g. when running "kphone".

Patch submitted by George Michaelson on "tech-kern@NetBSD.org".
2005-12-08 19:19:14 +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
christos
184ad089a7 - make settime take timespec.
- avoid wrapping of time in settime.
- pass struct proc down so that we can log a detailed message.
2005-12-05 00:16:33 +00:00
rpaulo
462d39494a Remove the debugging printf left in linux_sys_getrlimit(). 2005-11-30 11:36:22 +00:00
jdolecek
a2e3927e39 undo linux_sys_exit_group() change _again_ - please do not commit known
broken code
2005-11-29 22:31:59 +00:00
manu
35923ac2fc Threads should not send a signal on exit. 2005-11-29 16:24:41 +00:00
thorpej
7d00e1aff3 Overhaul how TTY line disciplines are handled:
- Replace references to linesw[0] with a ttyldisc_default() function
  that returns the default ("termios") line discipline.
- The linesw[] array is gone, replaced by a linked list.
- ttyldisc_add() and ttyldisc_remove() have been replaced by
  ttyldisc_attach() and ttyldisc_detach().
- Things that provide line disciplines are now responsible for
  registering those disciplines with the system.  The linesw
  structures are no longer declared in tty_conf.c
- Line disciplines are now refcounted; a lookup causes a reference to
  be held.  ttyldisc_release() releases the reference.  Attempts to
  detach an in-use line discipline result in EBUSY.
- Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c
  that was masked by the old tty_conf.c
- tty_init() is no longer necessary; delete it and its call from main().
2005-11-27 05:35:52 +00:00
manu
2697809839 To awake all processes sleeping on a futex, set maximum value to 0x7fffffff
instead of -1 (0xffffffff): the value is signed...
2005-11-23 22:38:46 +00:00
manu
c06b3dd8a8 Remove a debug printf 2005-11-23 22:23:30 +00:00
manu
23cf341ea0 - Add Linux tkill and tgkill (partial emulation).
- Fix getrlimit on amd64
2005-11-23 16:14:57 +00:00
christos
c3ae1990ca Regen 2005-11-17 17:09:05 +00:00
christos
7faedc67d3 need the non-compat version of shm.h too. 2005-11-17 17:07:03 +00:00
simonb
772f8208fc Copyright maintenance - only include the copyrights from the original
sys/*.h files that were in the files at the time the old structures
were present.
2005-11-12 00:39:22 +00:00
chs
001ec1422b include additional headers that are now needed. 2005-11-11 23:22:08 +00:00
jdolecek
95d0b66d28 undo the linux_sys_exit_group() change for now - complete CLONE_THREAD support
is necessary for this to work properly
2005-11-11 22:45:41 +00:00
christos
88056ee1bd Move more compat stuff from sys. 2005-11-11 17:10:42 +00:00
tron
19c262ce51 Include "sys/ipc.h" to get definition of "ipc_perm14" structure.
This fixes the build of "pecoff_exec" LKM.
2005-11-11 11:59:53 +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
christos
306385b2a5 regen. 2005-11-10 18:47:31 +00:00
christos
e2f2b17e31 add the new compat header. 2005-11-10 18:47:16 +00:00
christos
75fdf989ea These two really don't need the new header. 2005-11-10 18:43:32 +00:00
christos
2a4a5534b4 Include new compat header. 2005-11-10 18:39:30 +00:00
christos
0b0496e3d5 move the compat code out of the sys file. 2005-11-10 18:36:20 +00:00
christos
65de380a95 More ipc support for linux; makes oracle work. From chuq and
jlrodriguez at terra dot es
2005-11-10 18:33:37 +00:00
manu
e75bcb9ebf Fix build problem 2005-11-09 21:56:11 +00:00
manu
f98d5d856e Improve Linux exit_group emulation by sending a SIGKILL to all other
processes in the group instead of letting them live. It would be better
to properly terminate them.
2005-11-09 14:56:50 +00:00
manu
f53c4d1d1e Prevent integer overflow in timout calculation.
changed DEBUG_LINUX to DEBUG_LINUX_FUTEX so that we have less debug
messages on the console
2005-11-09 14:52:18 +00:00
manu
26222780eb Correctly computes futex timeout. 2005-11-08 21:28:49 +00:00
manu
d72135b371 Include linux_machdep.h so that LINUX_UNAME_ARCH ges defined (fixes
uname emulation)
2005-11-07 14:17:45 +00:00
manu
a5d2387dbb regen 2005-11-06 21:50:28 +00:00
manu
7505cb92a6 Back out sched_{set|get}affinity addition because it breaks the
build again on i386 now it is fixed for other archs (Tom's fix and
mine got in colision)
2005-11-06 18:16:31 +00:00
tron
0c24d80f02 Regen with correct RCS Ids. 2005-11-06 14:25:48 +00:00
manu
35f76b0ac2 ifdef out sched_{get|set}affinity for ports that don't use it yet. That
should fix build.
2005-11-05 23:44:25 +00:00
dogcow
b3b0932a5d mirror manu's amd64 changes to implement linux sched_{seg,get}affinity;
the kernel and linux lkm now compile again.
2005-11-05 10:56:48 +00:00
manu
2ae48df4fc regen 2005-11-05 08:11:30 +00:00
manu
0cf4b35fe6 Implement more of Linux futex(2) 2005-11-05 08:07:44 +00:00
manu
41455b2ed0 Implement Linux sched_{set|get}affinity 2005-11-05 08:06:58 +00:00
manu
67fcd6abf5 Fix build when LINUX_NPTL is not defined 2005-11-05 07:26:45 +00:00
manu
2cac35470c Fix a messed up patch 2005-11-05 00:58:57 +00:00
manu
88a5eb33ed Instead of ifdef'ing __amd64__ all the Linux NPTL stuff, introduce an
ifdef LINUX_NPTL.
Also implement SETTLS flag to Linux clone()
2005-11-05 00:47:26 +00:00
chs
df018c387b make this compile on m68k by including sys/device.h explicitly.
on other platforms it's apparently included implicitly, probably through cpu.h.
2005-11-04 17:00:43 +00:00
manu
b72e0d5382 Fix machine name returned by uname on Linux 2005-11-04 16:58:14 +00:00
manu
78ad642708 regen 2005-11-04 16:57:03 +00:00
manu
e7609e6478 Implement Linux futex ang gettid 2005-11-04 16:54:11 +00:00
manu
3b8100b96a register_t is not an int on amd64 2005-11-04 16:52:51 +00:00
manu
e1c0c1c9dd Implement Linux futex and gettid system calls for amd64 2005-11-04 16:51:56 +00:00
manu
0a3dbc01d5 build fix 2005-11-04 16:49:55 +00:00
manu
b7ba0ebc16 Fix pipe linux emulation on amd64 2005-10-31 18:00:30 +00:00
manu
5d2a593dcd build fix 2005-10-31 17:58:07 +00:00
chs
d17f6e14bc add support for the linux PROT_GROWS{DOWN,UP} mprotect() flags.
fixes PR 30008.
2005-10-30 16:25:50 +00:00
cube
75d561e358 Move prototypes for siginfo32 to/from siginfo converters at the right
place.
2005-10-24 15:28:09 +00:00
christos
6f981830a9 PR/31905: Wolfgang Stukenbrock: Termios ioctls TIOCMBIC and TIOCMBIS missing
in linux emulation code
2005-10-24 12:58:34 +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
christos
78063c9188 regen. 2005-10-20 15:35:42 +00:00
christos
0270612ce7 Conditionalize the sigreturn syscall inclusion; from Patrick Welche 2005-10-20 15:35:25 +00:00
christos
e780c5edaf regen 2005-10-18 19:52:07 +00:00
christos
8fc452caf8 add the missing %% that confused joerg and the parser. 2005-10-18 19:51:47 +00:00
joerg
5e74202601 Regen. 2005-10-18 19:08:51 +00:00
joerg
39fcee12fe sys_uselib is needed by COMPAT_LINUX for EXEC_AOUT. Since it doesn't get
build when EXEC_AOUT is not defined, the syscalls.master entry has to be
conditionalized. Alpha did so already, so let the other archs catch up
with it.

Go-on: christos
2005-10-18 18:37:44 +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
manu
bc210edac8 Fix COMPAT_DARWIN build. This closes PR#31336 2005-10-03 17:11:25 +00:00
he
c6c2d9e696 Suddenly these need explicit inclusion of <sys/socket.h>; they use
the MSG_OOB and AF_LINK symbols (among others).  Fixes build problem.
2005-09-28 06:40:15 +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
1e20ffb8a1 regen 2005-09-27 15:07:54 +00:00
chs
ad1b7e8d5c include "opt_compat_sunos.h", netbsd32_syscallargs.h wants it. 2005-09-27 15:07:40 +00:00
chs
94be8205d7 make this compile again. 2005-09-27 14:37:06 +00:00
martin
3faf969174 Adapt to struct vfsops changes during the NFS export rototill. 2005-09-27 13:26:03 +00:00
jmmv
20ac358c50 Instead of trying to clear ufs_args' export member, zero the whole
structure so that we don't rely on that (renamed) field.  Should fix
the build.  Found by he@.
2005-09-24 21:44:15 +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
6c8e87cff8 add struct forwards. 2005-09-24 21:33:48 +00:00
christos
dd40a9f6f6 include new compat siginfo header. 2005-09-24 17:29:47 +00:00
christos
5c03cd2255 more header cleanup. 2005-09-24 17:27:44 +00:00
christos
ca3a193432 factor out some of the osockaddr, omsghdr code. 2005-09-24 15:51:03 +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
03ec972e58 maplen was uninitialized. 2005-09-19 02:47:15 +00:00
christos
d359ae5c43 MINSIGSTKSZ on linux is different depending on the platform and usually
smaller than ours.
2005-09-19 02:46:49 +00:00
christos
e20c28140a Add compat signal headers. 2005-09-18 14:30:15 +00:00
yamt
a0bdf5ef81 irix_sys_swapctl: follow uvm_swap_stats changes. 2005-09-17 14:52:55 +00:00
yamt
209478cccf protect p_nrlwps by sched_lock. 2005-09-17 14:35:51 +00:00
christos
29f3692018 add <compat/sys/signal*.h> 2005-09-16 17:09:52 +00:00
christos
c315b31f19 Fix a comment. 2005-09-15 03:00:16 +00:00
he
70fe9e01e8 This now needs <compat/sys/signal.h> to build. 2005-09-14 13:49:50 +00:00
he
87e3d67bce This file now needs <compat/sys/stat.h> to build. 2005-09-14 13:49:27 +00:00
christos
ff66f5797e need linux_syscallargs.h to compile, and remove inline function. 2005-09-13 22:08:21 +00:00
christos
c83d281198 Forgot to reverse the conditional test. 2005-09-13 16:35:24 +00:00
christos
58b392c018 make this compile again. 2005-09-13 03:23:09 +00:00
christos
6acf4b5ca8 add compat netbsd32 context. 2005-09-13 03:22:54 +00:00
christos
063b880cf0 compat code reorg. 2005-09-13 01:42:32 +00:00
christos
49110e63f0 Range checks are not optional. The omission of this one, allows the user
to corrupt the heap and/or crash the kernel (Christer Oeberg).
2005-09-12 22:17:49 +00:00
christos
6a2a989266 variable name mistake again. 2005-09-12 22:16:56 +00:00
christos
d9f67be7fe - Avoid overflow by checking the count argument (Christer Oeberg).
- While I am here, don't leak fds either.
2005-09-12 20:54:38 +00:00
jmmv
ec93365612 Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program.  This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*.  Therefore, it is disabled by
default in all kernels.  However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
2005-09-10 19:20:48 +00:00
rpaulo
257017665e Add a SYSCTL_SETUP_PROTO() so that it compiles fine in the lkm. 2005-09-02 14:34:00 +00:00
he
eb89cd94e9 Now that <ufs/ufsmount.h> includes <ufs/extattr.h>, we also need
<sys/vnode.h> and <sys/vnode_if.h> to bring the definition of struct
vop_getextattr_args into scope.  Fixes build problem for arc.
2005-08-31 16:01:56 +00:00
he
54e6da6105 Change from using sys___{,f,l}stat13() to sys___{,f,l}stat30() and
associated data structures, following the change to 64-bit inodes.
2005-08-22 10:57:04 +00:00
yamt
0ed4057082 linux_machdepioctl: remove duplicated FILE_USE/UNUSE. 2005-08-21 13:13:50 +00:00
kent
868a42c866 fix a compilation problem on NetBSD/amd64 2005-08-20 15:02:36 +00:00
yamt
e4ab81774d compat_30_sys_getdents: netbsd 1.2 -> 3.0 in comments/messages. 2005-08-19 13:17:37 +00:00
yamt
34dab5e58c compat_30_sys_getdents: don't leak kernel stack garbage to userland. 2005-08-19 13:16:56 +00:00
christos
4ce7529a64 change a hard-coded 0xf to _DIRENT_ALIGN (thanks yamt) 2005-08-19 06:01:00 +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
christos
c0ee8a4184 Fix systeminfo.
1. return length is the string length even if the string would not fit.
2. add SI_ISALIST
3. on 32 bit emulation, don't return sparc64 as the arch!
2005-07-28 03:50:52 +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