Commit Graph

4640 Commits

Author SHA1 Message Date
rmind 4c1098f541 do_sys_wait(): fix previous by checking for ru != NULL. Noticed by
Onno van der Linden.  Also, remove redundant arguments (seems that
was_zombie was not used since rev 1.177 ?).
2009-11-04 21:23:02 +00:00
njoly a135bd0847 Regen for struct linux_stat64 fix. 2009-10-30 10:58:15 +00:00
njoly e8df95dcb7 stat64 syscalls require struct linux_stat64. 2009-10-30 10:57:40 +00:00
rmind 554a0142dc Initialise struct emul members by name (it is readable now and one can search
them in the tree).
2009-10-25 01:14:03 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
yamt bb529e553e compat_50_sys_aio_suspend:
- fix the buffer size.
	- use kmem_alloc instead of kmem_zalloc for buffers which we will
	  overwrite soon.
2009-10-12 23:41:51 +00:00
rmind c9a5a18df3 mq_timedsend/mq_timedreceive: timeout value is absolute, not relative.
While here, drop unecessary (since fdesc API changes) lwp_t arguments.

Bug reported by Stathis Kamperis, thanks!
2009-10-05 23:49:46 +00:00
taca 5a6dad0a4b Trying to fix build problem. Thanks to joerg's advise. 2009-09-20 10:29:30 +00:00
pooka fbd53556dc Wipe out the last vestiges of POOL_INIT with one swift stroke. In
most cases, use a proper constructor.  For proplib, give a local
equivalent of POOL_INIT for the kernel object implementation.  This
way the code structure can be preserved, and a local link set is
not hazardous anyway (unless proplib is split to several modules,
but that'll be the day).

tested by booting a kernel in qemu and compile-testing i386/ALL
2009-09-13 18:45:10 +00:00
njoly 1e0366323b Use correct sched_setscheduler syscall 3rd argument type. 2009-09-03 17:15:17 +00:00
dholland 869e0ec654 Use uintptr_t instead of uint32_t as an intermediate stage when
casting from off_t to a pointer. This way it compiles in a 64-bit
world. Dunno if it'll work though with 64-bit mips kernel addresses,
which are in the negative range of 64-bit off_t.
2009-08-31 05:36:23 +00:00
dholland 97d7a71b45 Use uintptr_t instead of int when munging fcntl flags, which are
pointer-sized integers. Now builds in a 64-bit world, might even work :-)
2009-08-31 05:34:16 +00:00
dholland dbb9a41442 Another one that needs <sys/exec_aout.h>. 2009-08-28 01:39:03 +00:00
christos 84ec419140 add a lot more debugging and error checking. Alas, skype seems to be happy
getting back our values, but still does not work.
2009-08-22 23:31:16 +00:00
drochner eec7391fde remove some "inline" from functions which are defined in a .c file
but used elsewhere -- gcc-4.4.1 doesn't like it and I doubt it
had any effect
2009-08-18 11:22:09 +00:00
christos f73ec80b69 more debugging for mmap 2009-08-18 02:04:14 +00:00
christos fc0d883cc1 add the video ioctls so that the 32 bit skype works with video
more commits to come
2009-08-18 02:02:58 +00:00
cegger ea28690bc6 buildfix: #include <sys/exec_aout.h> 2009-08-17 06:00:05 +00:00
martin b507c43e16 Add missing include <sys/exec_aout.h> 2009-08-16 15:41:51 +00:00
martin ff78bb583b Include <sys/exec_aout.h> for a.out specific defines. 2009-08-16 15:39:30 +00:00
manu a693f69b7e Build COMPAT_DARWIN and COMPAT_MACH as a Xen domU too 2009-08-16 15:35:52 +00:00
matt 7bb407d6e3 Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for you.
2009-08-15 23:39:35 +00:00
matt 69d946c278 Don't include EXEC_AOUT stuff by default. 2009-08-13 03:56:32 +00:00
matt baf57f2df6 #include "opt_execfmt.h" and only compile innards if EXEC_AOUT is defined. 2009-08-13 03:53:13 +00:00
rjs ff83e633bb Add enum uio_seg argument to do_sys_mknod(). 2009-08-10 17:36:00 +00:00
haad 5200b9b492 Add enum uio_seg argument to do_sys_mknod and do_sys_mkdir so these functions
can be called from kernel, too.

Change needed for zfs device node creation, until we have propoer devfs.

Oked by ad@.
2009-08-09 22:49:00 +00:00
njoly 9e069687a9 Make compat netbsd32 sendmsg follow the native version by allowing
empty messages. This let unfdpass regression test work as expected.
2009-07-22 17:19:44 +00:00
njoly 3d5d2c8f61 Make compat linux/linux32 getdents(2) fail with ENOTDIR instead of
EINVAL when file descriptor does not refer to a directory.
2009-07-22 15:49:29 +00:00
njoly 7d645a3ea4 Kill unreachable return statement. 2009-07-21 18:50:43 +00:00
njoly dd5f408241 Do reject unknown/invalid linux clockid. 2009-07-21 18:42:56 +00:00
rmind 029f6c41a7 - Use #ifdef AIO, instead of #ifdef notyet. Not a solution, but at
least gets it working for MONOLITHIC kernel.
- Similarily add #ifdef MQUEUE for mqueue compat.
- Amend TNF license to be 2-clause.  Approved by <christos>.
2009-07-19 02:41:27 +00:00
dholland effcf1af5c Convert 67 namei call sites to use namei_simple, in these functions:
check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.
2009-06-29 05:08:15 +00:00
tsutsui 296279ad74 pad -> PAD, to follow src/sys/kern/makesyscalls.sh rev 1.87. 2009-06-28 09:50:57 +00:00
njoly de2e7a9c8e sched_getaffinity(2) update:
- dynamically calculate the cpu mask size,
- return it upon success,
- fix generated cpu mask.
2009-06-23 13:18:59 +00:00
njoly 9edecd8c07 In linux_sys_sched_getaffinity(), do not leak memory on error. 2009-06-18 20:36:28 +00:00
njoly 3152f584bd Regen for sendmsg/recvmsg definitions update. 2009-06-17 14:20:08 +00:00
njoly f50c7f6eb2 Add a new linux_msghdr structure, as its size differs on 64bit archs.
Do the needed conversions in sendmsg/recvmsg syscalls, and adjust
their definitions accordingly.
2009-06-17 14:18:51 +00:00
njoly cb90fdddc4 Add LINUX_CMSG_{SPACE,LEN} macros. Use then when calculating the
msg_controllen size, when converting the control message buffer from
native (previous version was missing the linux_cmsghdr size).
2009-06-16 23:17:02 +00:00
njoly 83618982c2 For linux cmsg header copyout, use the linux structure size, not the
native one.
2009-06-16 22:56:49 +00:00
njoly 405a83b592 Make compat linux sendmsg/recvmsg output msghdr and control messages
buffers with ktrace(1), just like the native functions.
2009-06-16 15:56:10 +00:00
njoly 21489570f0 Make netbsd32 sendmsg(2), do not use an uninitialised value for
fetching iovec structures.
While here, sync recvmsg(2) to avoid some unneeded casts.
2009-06-15 22:59:53 +00:00
njoly 198ddcca4b In sendmsg(2), do copy the msghdr structure before trying to use it. 2009-06-11 19:57:58 +00:00
njoly add168f4d8 Fix defines against multiple inclusion protection (s/I386/AMD64). 2009-06-08 14:42:10 +00:00
njoly e1a778e452 Regen for rt_queueinfo addition. 2009-06-08 13:41:17 +00:00
njoly 9c8407cd8f Add rt_queueinfo(2) support. 2009-06-08 13:34:23 +00:00
njoly d5203d274e Regen for rt_queueinfo(2) update. 2009-06-08 13:29:00 +00:00
njoly 5bf0ee73ce Update rt_queueinfo(2) definition, and kill a corresponding comment. 2009-06-08 13:26:57 +00:00
njoly a9b9e78076 Small rt_queueinfo(2) update, to require a linux_siginfo structure.
While here, cleanup ifdef out argument types.
2009-06-08 13:23:16 +00:00
njoly 55d5cc9d0d Various compat linux siginfo fixes.
- alpha: add missing _uid member to SIGCHLD structure.
- amd64: add missing typedef, and fix padding size.
- arm: add missing linux_siginfo definition.
2009-06-08 11:46:06 +00:00
njoly b0b09eac89 Regen for fstatfs. 2009-06-05 16:46:52 +00:00