Commit Graph

4614 Commits

Author SHA1 Message Date
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
njoly
ca080002aa Add fstatfs syscall. 2009-06-05 16:45:33 +00:00
njoly
4c8893bb2f Regen for stat/lstat/fstat syscalls. 2009-06-04 18:01:02 +00:00
njoly
33fdfb68ef Add stat/lstat/fstat syscalls. 2009-06-04 17:59:30 +00:00
njoly
ad76703a87 Cleanup (no functional changes).
Kill some unneeded variables and return stattement.
Rename linux32_from_stat() to better bsd_to_linux32_stat64().
Fix some types.
2009-06-03 15:13:26 +00:00
njoly
5a5f8e093f Fix inverted lst_ino/__lst_ino assignment in linux32_from_stat(). 2009-06-03 14:17:18 +00:00
pooka
b89c189be7 Declare extern syscallnames in a header. 2009-06-02 23:21:37 +00:00
njoly
49c8536f1f Regen for siggetmask/sigsetmask. 2009-06-02 16:55:16 +00:00
njoly
9a0f18cccc Add siggetmask/sigsetmask syscalls. 2009-06-02 16:54:39 +00:00
njoly
5932e6a6cd Add the mask value returned by siggetmask. 2009-06-02 16:53:07 +00:00
njoly
7c47c56d95 Make nice(2) return EPERM on error, not EACCES (from sys_setpriority). 2009-06-02 13:00:23 +00:00
njoly
d22e6f64ab Add native to linux siginfo si_status translation, used on i386 and
amd64.
2009-05-29 14:19:12 +00:00
njoly
05d61dcbbd Make getdirentries set a correct block read position for basep
argument.
2009-05-29 09:32:41 +00:00
njoly
c2d83ad5c5 Redo previous, by simply updating basep earlier, before label. 2009-05-28 15:21:26 +00:00
njoly
2a614502ab Make getdirentries(2) correctly fail with EINVAL for an invalid file
descriptor (not for a directory), by not updating basep syscall
argument on error.
2009-05-28 14:48:20 +00:00
njoly
a88fd78513 Use correct linux_clock_t type for _stime, not native clock_t. 2009-05-27 12:20:37 +00:00
ad
d991fcb3b6 More changes to improve kern_descrip.c.
- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
  It was only being used to synchronize close, and in any case we needed
  to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
  that we can eliminate the membar_consumer() call in fd_getfile().  This is
  mostly syntactic sugar; the main functional change is that fd_nfiles now
  lives alongside the open file array.

Some measurements with libmicro:

- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.
2009-05-24 21:41:25 +00:00
njoly
eb51be4e79 Adjust compat osf1 to recent pad -> PAD change. 2009-05-18 12:39:02 +00:00
pooka
bb7d994504 pad -> PAD. Fixes build problem reported by Paul Goyette in private email. 2009-05-17 05:57:01 +00:00
pooka
ed09069bac regen: pad -> PAD 2009-05-17 05:55:42 +00:00
pooka
5b4deca5cb pad -> PAD 2009-05-17 05:54:22 +00:00
nakayama
a7ae1082e0 Follow pad to PAD change. 2009-05-16 17:45:23 +00:00
pooka
dfb36ab4e4 pad -> PAD 2009-05-15 16:59:07 +00:00
cegger
cb0f831638 use device_xname() 2009-05-11 21:34:55 +00:00
cegger
2dc0e43978 use device_xname() 2009-05-11 20:53:47 +00:00
ad
6977231a34 G/C reference to LK_CANRECURSE. 2009-05-06 22:38:31 +00:00
njoly
692b478fd5 Add IPC_64 support to all semctl(2) commands, following corresponding
compat linux change.
2009-04-27 13:24:18 +00:00