| Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
- 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>
|
|
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.
|
|
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>
|
|
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
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>
|
|
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
From: Arnd Bergmann <arnd@arndb.de>
The wrong argument in put_compat_timespec is marked const, causing
unnecessary compiler warnings.
|
|
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
|
|
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.
|
|
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)).
|
|
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).
|
|
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.
|
|
Add compat_* functions for statfs64. The 32bit layout unfortunately
does not match x86-64.
|
|
|
|
|
|
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).
|
|
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}()
|
|
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.
|
|
Andi Kleen asked for these two, so here they are. This is the generic
part of creating compat functions for timespec get/put.
|
|
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.
|
|
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.
|
|
This renames more types and moves them into asm/compat.h and also
consolidates sys32_new{stat,fstat,lstat}.
|
|
This patch creates compat_sys_times and a few more compability types.
|
|
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'.
|