summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_misc.c
AgeCommit message (Collapse)Author
2007-10-19Add compat_linux and exec_linux_elf lkm support for amd64:njoly
- Add needed COMPAT_OSSAUDIO to GENERIC. - Add missing includes needed by linux_syscallargs.h. - Add lkm building.
2007-07-17Add native mremap system call based on the UVM implementation forjoerg
Linux compat. Add code to enforce alignment of the new location. Special thanks to wizd for helping with the man page.
2007-07-04It seems that min(16,16) isn't a compile time constant.dsl
So don't bother limiting the local arrays to NGROUPS, just use 16.
2007-06-30Match updates to kauth_cred_set/getgroups.dsl
2007-06-23Simplify code to get/set 16bit group lists.dsl
Cloned from ibcs2 copy (maybe I should have worked out somewhere to put this as common code...)
2007-06-23These now need sys/prot.hdsl
2007-06-04Fix select() without a timeout parameter.dsl
2007-06-02Call selcommon() directly instead of using the stackgap...dsl
2007-05-12There is no need to use the stackgap for get/setrlimit.dsl
2007-05-10- linux uname -m on x86 returns i{3,4,5,6}86 make it so.christos
- delete the machine sysctl that never worked, and gc linux_machine.
2007-05-08Remember to copy the rusage to the users buffer.dsl
2007-05-07Split sys_wait4() so that compat code can fiddle with the returned 'status'dsl
and 'rusage' without having to copy data to/from stackgap buffers. The old split (find_stopped_child) could be removed. amd64 seems to run netbsd32, linux and linux32 emulations. sparc64 compiles.
2007-04-30Rework compat stat() and statvfs() code so that it no longer uses the stackgap.dsl
2007-04-22Change the way that emulations locate files within the emulation root todsl
avoid having to allocate space in the 'stackgap' - which is very LWP unfriendly. The additional code for non-emulation namei() is trivial, the reduction for the emulations is massive. The vnode for a processes emulation root is saved in the cwdi structure during process exec. If the emulation root the TRYEMULROOT flag are set, namei() will do an initial search for absolute pathnames in the emulation root, if that fails it will retry from the normal root. ".." at the emulation root will always go to the real root, even in the middle of paths and when expanding symlinks. Absolute symlinks found using absolute paths in the emulation root will be relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links inside the emulation root don't need changing). If the root of the emulation would be returned (for an emulation lookup), then the real root is returned instead (matching the behaviour of emul_lookup, but being a cheap comparison here) so that programs that scan "../.." looking for the root dircetory don't loop forever. The target for symbolic links is no longer mangled (it used to get the CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended). CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding TRYEMULROOT to the flags to NDINIT(). A lot of the emulation system call stubs could now be deleted.
2007-04-11- Add compat amd64 linux32 statfs support, adapted from PR/35956.njoly
- Move bsd_to_linux_statfs() function to its own file to be shared between both linux compats. ok by manu.
2007-03-23implement emul.linux.kern.machine, which can be set to "i686", likemrg
some applications seem to want.
2007-03-14Fix compat linux statfs/fstatfs syscalls on amd64.njoly
- Do not use statfs64/fstatfs64 as they have an extra size argument. - Add full 64bit linux struct statfs support. ok by manu
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2007-02-09Merge newlock2 to head.ad
2006-11-16__unused removal on arguments; approved by core.christos
2006-11-14Clean some KAUTH_GENERIC_ISSUSER usage in compat code.elad
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-09-13Jumbo COMPAT_LINUX/COMPAT_LINUX32 bugfix, with the help of Nicolas Jolymanu
- 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-01When calling PTRACE from an LKM, use sysent[SYS_ptrace].sy_call in casematt
the sys_ptrace symbol isn't present.
2006-08-30Allow this to build as an LKM by testing for _KERNEL_OPT beforehe
including opt_ptrace.h.
2006-08-30Update to deal with options PTRACEmatt
2006-07-23Use the LWP cached credentials where sane.ad
2006-06-13change 20 to NZERO; pointed out by mrg.christos
2006-06-10PR/33671: Nicolas Joly: Add a getpriority syscall to account for the factchristos
that the linux getpriority is off by 20.
2006-06-07merge FreeBSD timecounters from branch simonb-timecounterskardel
- 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-05-14integrate kauth.elad
2006-05-10don't allocate struct statvfs on stack as it's too large.yamt
while i'm here, remove some unnecessary casts.
2006-03-17Fix Coverity issues 2321 and 2320. Make sure to free allocated memory.erh
2006-03-01merge yamt-uio_vmspace branch.yamt
- 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-02-09Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough somanu
that the i386 license manager part of amd64 version of Fluent works. While I'm here, add SysV IPC to COMPAT_LINUX/amd64
2006-01-31linux_sys_mremap: validate flags.yamt
2006-01-21implement compat_linux mremap.yamt
2005-12-11merge ktrace-lwp.christos
2005-11-30Remove the debugging printf left in linux_sys_getrlimit().rpaulo
2005-11-23Remove a debug printfmanu
2005-11-23- Add Linux tkill and tgkill (partial emulation).manu
- Fix getrlimit on amd64
2005-11-07Include linux_machdep.h so that LINUX_UNAME_ARCH ges defined (fixesmanu
uname emulation)
2005-11-04Fix machine name returned by uname on Linuxmanu
2005-10-30add support for the linux PROT_GROWS{DOWN,UP} mprotect() flags.chs
fixes PR 30008.
2005-09-10Initial addition of tmpfs, an efficient memory file-system. This projectjmmv
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-06-02more cast-qual falloutdrochner
2005-05-29- sprinkle const.christos
- add XXXUNCONST to the emul_find() pbuf argument free'ing. XXX: this needs an api change. - avoid variable shadowing.
2005-05-03First work on COMPAT_LINUX/amd64manu
Process startup and dynamiclinking work, but processes hang due to Linux arch_prctl(2) not being really supported yet.
2005-04-19PR/29696: Joel Carnat: NetBSD freezes when accessing smbfs mounted FS withchristos
firefox/linux due to compat getdents() call assumption that all filesystems support cookies.
2005-02-26nuke trailing whitespaceperry