summaryrefslogtreecommitdiff
path: root/include/linux/compat.h
AgeCommit message (Collapse)Author
2005-03-09[PATCH] consolidate the last of the compat sigevent structsStephen Rothwell
This patch pulls together the compat_sigevent structs. It also consolidates the copying of these structures into the kernel. The only part of the second union in sigevent that the kernel looks at currently is the _tid, so that is the only bit we copy. This patch depends on my previous two patches "add and use COMPAT_SIGEV_PAD_SIZE" and "Consolidate the last compat sigvals". Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-09[PATCH] add and use COMPAT_SIGEV_PAD_SIZEStephen Rothwell
All the 32 bit architectures (effectively) define SIGEV_PAD_SIZE to be ((SIGEV_MAX_SIZE/sizeof(int)) - 3). So define COMPAT_SIGEV_PAD_SIZE to be this and replace SIGEV_PAD_SIZE32 where it is used. It also needs to be used in the definition of struct compat_sigevent as most of the architectures would have had it 4 bytes too small in the kernel (since we were using SIGEV_PAD_SIZE). Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-06[PATCH] Consolidate compat_sys_waitidStephen Rothwell
This patch does: - consolidate the three implementations of compat_sys_waitid (some were called sys32_waitid). - adds sys_waitid syscall to ppc - adds sys_waitid and compat_sys_waitid syscalls to ppc64 I have left PARISC and MIPS to their own devices (by request). Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-02-21[PATCH] sparc64 rusage build fixAndrew Morton
Some patch in -mm causes the sparc64 build to explode because `struct rusage' isn't defined or declared in compat.h. So forward-declare it. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-04[PATCH] compat: sigtimedwaitZou Nanhai
- Merge sys32_rt_sigtimedwait function in X86_64, IA64, PPC64, MIPS, SPARC64, S390 32 bit layer into 1 compat_rt_sigtimedwait function. It will also fix a bug of copy wrong information to 32 bit userspace siginfo structure on X86_64, IA64 and SPARC64 when calling sigtimedwait on 32 bit layer. - Change all name the of siginfo_t32 structure in X86_64, IA64, MIPS, SPARC64 and S390 to the name compat_siginfo_t as used in PPC64. - Patch introduced a macro __COMPAT_ENDIAN_SWAP__ in include/asm-mips/compat.h when MIPS kernel is compiled in little-endian mode. This macro is used to do byte swapping in function sigset_from_compat. - This patch is only tested on X86_64 and IA_64. Signed-off-by: Zou Nan hai <Nanhai.zou@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-27Fix up "compat_sys_keyctl()" system call.Linus Torvalds
Fix name, and make sure that it's listed as a conditional system call so that we stub it out to ENOSYS if the kernel isn't compiled with key management support.
2004-10-26[PATCH] ppc/ppc64: hook up key management syscallsDavid Howells
The attached patch permits my key management stuff to be used on PPC, PPC64 and PPC on PPC64. Syscall numbers were allocated by Paul Mackerras. I've updated my keyctl utility to work on PPC/PPC64 too: http://people.redhat.com/~dhowells/keys/keyctl.c Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-09-07[PATCH] ppc64: compat_get_bitmap/compat_put_bitmapAnton Blanchard
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-30[PATCH] waitid system callRoland McGrath
This patch adds a new system call `waitid'. This is a new POSIX call that subsumes the rest of the wait* family and can do some things the older calls cannot. A minor addition is the ability to select what kinds of status to check for with a mask of independent bits, so you can wait for just stops and not terminations, for example. A more significant improvement is the WNOWAIT flag, which allows for polling child status without reaping. This interface fills in a siginfo_t with the same details that a SIGCHLD for the status change has; some of that info (e.g. si_uid) is not available via wait4 or other calls. I've added a new system call that has the parameter conventions of the POSIX function because that seems like the cleanest thing. This patch includes the actual system call table additions for i386 and x86-64; other architectures will need to assign the system call number, and 64-bit ones may need to implement 32-bit compat support for it as I did for x86-64. The new features could instead be provided by some new kludge inventions in the wait4 system call interface (that's what BSD did). If kludges are preferable to adding a system call, I can work up something different. I added a struct rusage field si_rusage to siginfo_t in the SIGCHLD case (this does not affect the size or layout of the struct). This is not part of the POSIX interface, but it makes it so that `waitid' subsumes all the functionality of `wait4'. Future kernel ABIs (new arch's or whatnot) can have only the `waitid' system call and the rest of the wait* family including wait3 and wait4 can be implemented in user space using waitid. There is nothing in user space as yet that would make use of the new field. Most of the new functionality is implemented purely in the waitid system call itself. POSIX also provides for the WCONTINUED flag to report when a child process had been stopped by job control and then resumed with SIGCONT. Corresponding to this, a SIGCHLD is now generated when a child resumes (unless SA_NOCLDSTOP is set), with the value CLD_CONTINUED in siginfo_t.si_code. To implement this, some additional bookkeeping is required in the signal code handling job control stops. The motivation for this work is to make it possible to implement the POSIX semantics of the `waitid' function in glibc completely and correctly. If changing either the system call interface used to accomplish that, or any details of the kernel implementation work, would improve the chances of getting this incorporated, I am more than happy to work through any issues. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-05-28[PATCH] sparse: trivial part of kernel/* __user annotationAlexander Viro
2004-05-09[PATCH] Consolidate sys32_selectAndrew Morton
From: Arnd Bergmann <arnd@arndb.de> sys32_select has seven mostly but not exactly identical versions, so consolidate them as compat_sys_select. Based on the ppc64 implementation, which most closely resembles sys_select. One bug that was not caught by LTP has been fixed since the first version of this patch. tested x86_64, ia64 and s390.
2004-05-09[PATCH] Consolidate do_execve32Andrew Morton
From: Arnd Bergmann <arnd@arndb.de> The code for sys32_execve/do_execve32 in most of the seven versions was copied from fs/exec.c but not kept up-to-date. The new compat_do_execve() function is based on the mips code and has been resync'ed with do_execve(). IA64 changes are from Arun Sharma. Tested on x86_64, ia64 and s390
2004-05-09[PATCH] Consolidate sys32_readv and sys32_writevAndrew Morton
From: Arnd Bergmann <arnd@arndb.de> The seven implementations of this have gone out of sync and are mostly buggy. The new compat_sys_* version is based on the ppc64 implementation, which most closely resembles the code in sys_readv/sys_writev. Tested on x86_64, ia64 and s390.
2004-04-11[PATCH] compat emulation for posix message queuesAndrew Morton
From: Arnd Bergmann <arnd@arndb.de> I have tested the code with the open posix test suite and found the same four failures for both 64-bit and compat mode, most tests pass. The patch is against -mc1, but I guess it also applies to the other trees around. What worries me more than mq_attr compatibility is the conversion of struct sigevent, which might turn out really hard when more fields in there are used. AFAICS, the only other part in the kernel ABI is sys_timer_create(), so maybe it's not too late to deprecate the current structure and create a structure that can be used properly for compat syscalls.
2004-03-15[PATCH] generic 32 bit emulation for System-V IPCAndrew Morton
From: Arnd Bergmann <arnd@arndb.de> Adds a generic implementation of 32 bit emulation for IPC system calls. The code is based on the existing implementations for sparc64, ia64, mips, s390, ppc and x86_64, which can subsequently be converted to use this.
2004-03-06[PATCH] fix put_compat_timespec prototypeAndrew Morton
From: Arnd Bergmann <arnd@arndb.de> The wrong argument in put_compat_timespec is marked const, causing unnecessary compiler warnings.
2004-01-18[PATCH] ppc64: compat layer update, from Paul Mackerras, Olaf Hering and myselfAndrew Morton
From: Anton Blanchard <anton@samba.org> - Switch to using the new compat aio syscalls - add compat timer/clock syscalls - use compat_statfs64 - add compat fadvise64_64
2003-12-29[PATCH] more correct get_compat_timespec interfaceAndrew Morton
From: Joe Korty <joe.korty@ccur.com> The API for get_compat_timespec / put_compat_timespec is incorrect, it forces a caller with const args to (incorrectly) cast. The posix message queue patch is one such caller.
2003-12-29[PATCH] statfs64 fixAndrew Morton
From: Andi Kleen <ak@muc.de> It fixes the statfs64 emulation on x86-64. The problem is that x86-64 needs an __attribute__((aligned)) on the compat_statfs64 structure. The conclusion last time this was discussed was that the structure should be duplicated. Essentially it is the old shared structure copied to every user and x86-64 uses __attribute__((packed)).
2003-10-04[PATCH] compat ioctl consolidationAndrew Morton
From: Arun Sharma <arun.sharma@intel.com>, kevin.tian@intel.com Move a whole bunch of filesystem ioctl conversion functions out of per-arch files and into fs/compat_ioctl.c It moves linux32_dirent to compat.h and renames it as compat_dirent. linux32_dirent has been eliminated from ia64. Other archs should do the same. We'll leave old_linux_dirent32 as is, since it seems to be arch specific (ia64 doesn't use it for example).
2003-08-13[PATCH] add posix timer compat functionsAndi Kleen
Add 32bit->64bit conversion functions for POSIX timers. I kept timer_create architecture specific, because it does signal specific stuff which is not portable enough for generic compat.
2003-08-13[PATCH] add compat_statfs64Andi Kleen
Add compat_* functions for statfs64. The 32bit layout unfortunately does not match x86-64.
2003-04-16[PATCH] getrlimit,setrlimit,getrusage,wait4 unificationRandolph Chung
2003-03-23[COMPAT] cleanups in net/compat.c and related filesStephen Rothwell
2003-03-10[PATCH] compat_sys_fcntl{,64} Generic partStephen Rothwell
This patch creates compat_sys_fcntl{,64}. The diffstat for the whole patch set is below, but this is just the generic part, the architecture specific parts will follow. This patch also removes struct flock64 from all the 64 bit architectures (except parisc).
2003-03-05[NET]: Simplify scm handling and sendmsg/recvmsg invocation, consolidate net ↵Benjamin LaHaise
compat syscalls. 1) Pull scm argument from sendmsg/recvmsg, it is available from I/O control block 2) Consolidate networking syscall compat call into net/compat.c 3) Change ops->{sendmsg,recvmsg}() code sequences into sock_{sendmsg,recvmsg}()
2003-01-15[PATCH] compat_{old_}sigset_t generic partStephen Rothwell
This creates compat_sigset_t and compat_old_sigset_t i.e. just the types. This is just the generic part, the architecture specific parts will be sent to respective maintainers.
2003-01-07[PATCH] {get,put}_compat_timspec: genericStephen Rothwell
Andi Kleen asked for these two, so here they are. This is the generic part of creating compat functions for timespec get/put.
2003-01-02[PATCH] compat_flock: genericStephen Rothwell
This moves struct flock32 to struct compat_flock and consolidates the functions used to copy it to/from user mode. This is just the generic part - subarchitectures will follow.
2003-01-02[PATCH] better compat_jiffies_to_clock_tStephen Rothwell
By a suggestion from David Mosberger: use this new version of compat_jiffies_to_clock_t, which is more appropriate on 64-bit hosts that don't have overflow issues. It does better rounding and will not fail if COMPAT_USER_HZ > HZ.
2002-12-14[PATCH] consolidate sys32_new[lf]stat - architecture independentStephen Rothwell
This renames more types and moves them into asm/compat.h and also consolidates sys32_new{stat,fstat,lstat}.
2002-12-14[PATCH] consolidate sys32_times - architecture independentStephen Rothwell
This patch creates compat_sys_times and a few more compability types.
2002-12-03[PATCH] compatibility syscall layerStephen Rothwell
This is the generic part of the start of the compatibility syscall layer. I think I have made it generic enough that each architecture can define what compatibility means. To use this, an architecture must create asm/compat.h and provide typedefs for (currently) 'compat_time_t', 'struct compat_timeval' and 'struct compat_timespec'.