summaryrefslogtreecommitdiff
path: root/sys/compat/linux
AgeCommit message (Collapse)Author
2010-03-03When implementing "read directory", when there are too many empty entrieshe
in a row, and we need to try to read the next block, and have passed a non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie buffer before re-doing VOP_READDIR, so that we don't leak memory. This fix is similar to nfs_serv.c revisions 1.115 + 1.124. This should fix the long-standing problem observed by e.g. using Linux- emulated programs to take backup of servers, which is one of the problems which were reported in PR#42661. Thanks to pooka@ for the hints for traversing the VOP* layer.
2010-03-02Nuke fs_lfs.h included for unknown reasons (if there was a reasonpooka
other than "accident", i hereby declare that reason invalid)
2010-02-09Small typo in comment.njoly
2010-02-03Remove extra parenthesis. Found by cppcheck, reported bywiz
Henning Petersen in PR 42732.
2010-02-02Missing printf in sys/compat/linux/arch/powerpc/linux_machdep.cwiz
found by cppcheck and reported by Henning Petersen in PR 42720.
2010-01-05Remove extra semicolon.mbalmer
2009-12-14Regen (new makesyscalls.sh)matt
2009-12-14Merge from matt-nb5-mips64matt
2009-12-10Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostlymatt
involves setregs and vmcmds). Should result in no code differences.
2009-12-05Remove the portalfs kernel file system driver. Replace mount_portal(8)pooka
with a version based on puffs. User functionality remains the same.
2009-11-28Add LINUX_SIOCGIFMTU and LINUX_IP_HDRINCL support.dsl
Fixes part of PR/31358 The other parts are rather too intrusive to be fixed as in the PR.
2009-11-24Regen for personality(2) update.njoly
2009-11-24Update personality(2) to match Linux definition where the argument is annjoly
unsigned long.
2009-11-23Use lwp_getpcb() in compat code, clean from struct user.rmind
2009-11-18Make compat linux/linux32 msgrcv_msgarg type member of typenjoly
long/netbsd32_long to match linux definition.
2009-11-16Make sure to never leak padding space before copyout or copyinjoerg
uninitialized fields by explicitly using memset in the conversion routines.
2009-11-13Return the result of copyout. Reminded by Niolas Joly.joerg
2009-11-13Provide SIOCGIFNAME.joerg
2009-11-11- selcommon/pollcommon: drop redundant l argument.rmind
- Use cached curlwp->l_fd, instead of p->p_fd. - Inline selscan/pollscan.
2009-11-04do_sys_wait(): fix previous by checking for ru != NULL. Noticed byrmind
Onno van der Linden. Also, remove redundant arguments (seems that was_zombie was not used since rev 1.177 ?).
2009-10-30Regen for struct linux_stat64 fix.njoly
2009-10-30stat64 syscalls require struct linux_stat64.njoly
2009-10-25Initialise struct emul members by name (it is readable now and one can searchrmind
them in the tree).
2009-10-21Remove uarea swap-out functionality:rmind
- 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-09-20Trying to fix build problem. Thanks to joerg's advise.taca
2009-09-03Use correct sched_setscheduler syscall 3rd argument type.njoly
2009-08-28Another one that needs <sys/exec_aout.h>.dholland
2009-08-18remove some "inline" from functions which are defined in a .c filedrochner
but used elsewhere -- gcc-4.4.1 doesn't like it and I doubt it had any effect
2009-08-18more debugging for mmapchristos
2009-08-15Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> tomatt
do it for you.
2009-08-13Don't include EXEC_AOUT stuff by default.matt
2009-08-09Add enum uio_seg argument to do_sys_mknod and do_sys_mkdir so these functionshaad
can be called from kernel, too. Change needed for zfs device node creation, until we have propoer devfs. Oked by ad@.
2009-07-22Make compat linux/linux32 getdents(2) fail with ENOTDIR instead ofnjoly
EINVAL when file descriptor does not refer to a directory.
2009-07-21Do reject unknown/invalid linux clockid.njoly
2009-06-29Convert 67 namei call sites to use namei_simple, in these functions:dholland
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-23sched_getaffinity(2) update:njoly
- dynamically calculate the cpu mask size, - return it upon success, - fix generated cpu mask.
2009-06-18In linux_sys_sched_getaffinity(), do not leak memory on error.njoly
2009-06-17Regen for sendmsg/recvmsg definitions update.njoly
2009-06-17Add a new linux_msghdr structure, as its size differs on 64bit archs.njoly
Do the needed conversions in sendmsg/recvmsg syscalls, and adjust their definitions accordingly.
2009-06-16Add LINUX_CMSG_{SPACE,LEN} macros. Use then when calculating thenjoly
msg_controllen size, when converting the control message buffer from native (previous version was missing the linux_cmsghdr size).
2009-06-16For linux cmsg header copyout, use the linux structure size, not thenjoly
native one.
2009-06-16Make compat linux sendmsg/recvmsg output msghdr and control messagesnjoly
buffers with ktrace(1), just like the native functions.
2009-06-11In sendmsg(2), do copy the msghdr structure before trying to use it.njoly
2009-06-08Regen for rt_queueinfo(2) update.njoly
2009-06-08Update rt_queueinfo(2) definition, and kill a corresponding comment.njoly
2009-06-08Small rt_queueinfo(2) update, to require a linux_siginfo structure.njoly
While here, cleanup ifdef out argument types.
2009-06-08Various compat linux siginfo fixes.njoly
- alpha: add missing _uid member to SIGCHLD structure. - amd64: add missing typedef, and fix padding size. - arm: add missing linux_siginfo definition.
2009-06-02Add the mask value returned by siggetmask.njoly
2009-06-02Make nice(2) return EPERM on error, not EACCES (from sys_setpriority).njoly
2009-05-29Add native to linux siginfo si_status translation, used on i386 andnjoly
amd64.