Commit Graph

1559 Commits

Author SHA1 Message Date
matt
cf77a76b75 Adapt to new PCU based FPU code. 2011-05-05 16:20:55 +00:00
he
bb979087ff Regenerate these files after adding pipe2() and dup3(). 2011-04-15 13:07:37 +00:00
he
0e4429dc30 Add dup3() and pipe2() for these archs as well. 2011-04-15 13:04:52 +00:00
he
d6f2b33ab3 Fix this so that it builds (missing "struct" keyword). 2011-04-14 11:17:47 +00:00
christos
caa78eadaf add the "special" pipe2. 2011-04-14 01:03:23 +00:00
christos
239691fffa move dup3 to a more appropriate place because pipe is "special". Gotta love
linux.
2011-04-14 00:59:06 +00:00
christos
c1bc70d6fb - implement dup3 and pipe2
- eliminate amd64 ifdef
2011-04-10 15:50:34 +00:00
christos
0d7e057e6b We have O_CLOEXEC now 2011-04-10 15:49:56 +00:00
christos
a5071c95ef Regen: Argh:
cat: rumphdr.types: No such file or directory
rm: rumphdr.types: No such file or directory
*** Error code 1
2011-04-10 15:49:23 +00:00
christos
dd9e944ede add pipe2 and dup3 2011-04-10 15:48:46 +00:00
plunky
1a7622f6a7 tidy up include pathname to exclude undefined behaviour
"If the characters ', \, ", //, or /* occur in the sequence between
  the < and > delimiters, the behavior is undefined."
2011-03-29 20:10:31 +00:00
joerg
48717cfc00 Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-04 22:25:24 +00:00
matt
aa306c700f Deal with differences in signal delivery between o32/n32/n64. 2011-02-20 08:14:10 +00:00
matt
6a385f43c2 Regen. 2011-02-20 08:13:29 +00:00
matt
6ab83fddf5 Change some ints to longs (for LP64). 2011-02-20 08:09:46 +00:00
he
68cb75d86c save_fpu_lwp() was renamed to fpu_save_lwp(), so follow suit. 2011-01-20 11:59:24 +00:00
matt
773e544e8c Deal with changes in the trapframe. 2011-01-18 01:13:03 +00:00
rmind
7146b2f61d Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
2011-01-14 02:06:22 +00:00
dholland
8f6ed30d57 Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
2010-11-19 06:44:33 +00:00
chs
6842940109 personality() now interprets its parameter as having
the base personality type in the low byte and
various flags in the upper bytes.  for now just mask off
the flags to make sure the base type is one we accept.
store the current personality in the emuldata so that
we can return the expected value for PER_QUERY.
2010-11-02 18:18:07 +00:00
chs
fc7a196102 implement the following syscalls for linux32:
truncate64
  ftruncate64
  profil
  ioperm
  iopl
  setdomainname
  modify_ldt
  statfs64
  fstatfs64

note that iopl(), ioperm() and modify_ldt() just call
the respective 64-bit handlers, which don't do anything yet.
2010-11-02 18:14:05 +00:00
chs
3c3115da20 update linux_sys_socket() to understand the flags that are now
included in the "type" parameter.  in linux_sys_sendmsg(),
if we see an SCM_CREDENTIALS control message, just drop it
instead of giving an error.  the linux and native versions of
the cred-passing operation are very different and some apps
(eg. linux pulseaudio library talking to a native server)
will work without the control data.
2010-11-02 18:02:59 +00:00
chs
069ef5a4d0 define LINUX_O_CLOEXEC.
sort definitions by value.
consistently use hex instead of octal for the values.
2010-11-02 18:01:25 +00:00
chs
38b9dc3505 implement O_DIRECTORY as standardized in POSIX-2008,
for both native and linux emulations.
this fixes the rest of PR 43695.
2010-09-21 19:26:18 +00:00
chs
e0ef945cee recent versions of linux (which we now claim to be) supply a BSD-style
d_type value in getdents() results, after the d_name field.
make our emulation do the same.  fixes part of PR 43695.
2010-09-11 20:53:04 +00:00
chs
590b90699b always supply an auxiliary vector for linux ELF processes.
static executables (such as newer versions of /sbin/ldconfig)
require this to work properly.  since static executables
also don't have a PT_PHDR entry, use the same heuristic as
linux does to provide a value for AT_PHDR in this case.
2010-09-11 20:49:28 +00:00
njoly
328f6885dc Add CLOCK_MONOTONIC support for compat linux/linux32
clock_nanosleep(2).
2010-07-12 12:01:53 +00:00
chs
d916122e7d regen 2010-07-07 01:31:51 +00:00
chs
33fa5ccbbf many changes for COMPAT_LINUX:
- update the linux syscall table for each platform.
 - support new-style (NPTL) linux pthreads on all platforms.
   clone() with CLONE_THREAD uses 1 process with many LWPs
   instead of separate processes.
 - move the contents of sys__lwp_setprivate() into a new
   lwp_setprivate() and use that everywhere.
 - update linux_release[] and linux32_release[] to "2.6.18".
 - adjust placement of emul fork/exec/exit hooks as needed
   and adjust other emul code to match.
 - convert all struct emul definitions to use named initializers.
 - change the pid allocator to allow multiple pids to refer to the same proc.
 - remove a few fields from struct proc that are no longer needed.
 - disable the non-functional "vdso" code in linux32/amd64,
   glibc works fine without it.
 - fix a race in the futex code where we could miss a wakeup after
   a requeue operation.
 - redo futex locking to be a little more efficient.
2010-07-07 01:30:32 +00:00
rmind
3c507045e2 Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
2010-07-01 02:38:26 +00:00
hannken
1423e65b26 Clean up vnode lock operations pass 2:
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
2010-06-24 12:58:48 +00:00
joerg
f5b7f56dbd Use struct segment_descriptor for pcb_fsd and pcb_gsd instead of int[2]. 2010-04-23 16:07:33 +00:00
chs
e59be4800f regen 2010-04-23 03:03:03 +00:00
chs
822c314290 add missing argument to clone(). the symptom of this was that pthread_join()
would sometimes get stuck, such as in our "mutex2" regression test.
2010-04-23 03:02:16 +00:00
njoly
e05f3d58b2 Do not use 0 for pointers, but NULL. 2010-04-08 15:59:37 +00:00
njoly
4f2ea8f3c9 Add a new clock_gettime1() function that holds most of the
clock_gettime syscall code (except for the copyout). Adjust all
corresponding syscalls to make use of it.
2010-04-08 11:51:13 +00:00
njoly
0876f873dd Move most clock_getres syscall code, except for coypout call, to a new
clock_getres1() function which can be used by emulations. Adjust all
clock_getres syscalls to now make of use it.
2010-04-03 17:20:05 +00:00
njoly
6d63d66929 Convert linux/linux32/netbsd32 clock_settime syscalls, to use the
common clock_settime1() function.
2010-03-29 15:34:07 +00:00
he
7a30544200 When implementing "read directory", when there are too many empty entries
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-03 08:20:38 +00:00
pooka
a9b0264ca7 Nuke fs_lfs.h included for unknown reasons (if there was a reason
other than "accident", i hereby declare that reason invalid)
2010-03-02 15:46:19 +00:00
njoly
db6e663a4c Small typo in comment. 2010-02-09 16:46:07 +00:00
wiz
cc199107ab Remove extra parenthesis. Found by cppcheck, reported by
Henning Petersen in PR 42732.
2010-02-03 13:48:53 +00:00
wiz
11b7e600cb Missing printf in sys/compat/linux/arch/powerpc/linux_machdep.c
found by cppcheck and reported by Henning Petersen in PR 42720.
2010-02-02 15:02:07 +00:00
mbalmer
93f06d875c Remove extra semicolon. 2010-01-05 13:22:40 +00:00
matt
15aa4c53c9 Regen (new makesyscalls.sh) 2009-12-14 00:53:32 +00:00
matt
e110dba586 Merge from matt-nb5-mips64 2009-12-14 00:47:10 +00:00
matt
6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
pooka
70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00
dsl
ea4ea02d98 Add LINUX_SIOCGIFMTU and LINUX_IP_HDRINCL support.
Fixes part of PR/31358
The other parts are rather too intrusive to be fixed as in the PR.
2009-11-28 22:11:42 +00:00
njoly
4898628cc1 Regen for personality(2) update. 2009-11-24 10:44:41 +00:00