History log of /arch/s390/kernel/compat_linux.h
Revision Date Author Comments
8070361799ae1e3f4ef347bd10f0a508ac10acfb 06-Oct-2014 Martin Schwidefsky <schwidefsky@de.ibm.com> s390: add support for vector extension

The vector extension introduces 32 128-bit vector registers and a set of
instruction to operate on the vector registers.

The kernel can control the use of vector registers for the problem state
program with a bit in control register 0. Once enabled for a process the
kernel needs to retain the content of the vector registers on context
switch. The signal frame is extended to include the vector registers.
Two new register sets NT_S390_VXRS_LOW and NT_S390_VXRS_HIGH are added
to the regset interface for the debugger and core dumps.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
b9c9a33b765b0dd9279a99fcbb63f54950655e77 11-Jun-2014 Martin Schwidefsky <schwidefsky@de.ibm.com> s390/compat: correct ucontext layout for high gprs

The uc_sigmask definition in the kernel differs from the one in the
glibc, the kernel uc_sigmask has 64 bits while the glibc verison
is 1024 bits. The extension of the ucontext structure for 64-bit
register support for 31-bit compat processes added a new field
uc_gprs_high which starts 8 bytes after the uc_sigmask field.
As the glibc view of the ucontext assumes a size of 128 bytes for
uc_sigmask add a 120 byte padding to the kernel structure
ucontext_extended after the 8 byte uc_sigmask.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
5b098c204827ed21961988b4206b411f90cc89c8 05-Mar-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: get rid of compat wrapper assembly code

Now that all compat syscalls have been converted to use the
COMPAT_SYSCALL_DEFINE macros, we don't need to compat syscall
wrapper assembly code anymore.
So remove it and fix up the system call table accordingly.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2c81fc4fb41f589454861bbdb90ffde73840b8f8 01-Mar-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: add sync_file_range and fallocate compat syscalls

The compat syscall wrappers for sync_file_range and fallocate merged 32 bit
parameters into 64 bit parameters. Therefore they did more than just the
usual zero and/or sign extension of system call parameters.

So convert these two wrappers to full s390 specific compat sytem calls.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
5383d2c8b3ee61a762043818d7c07bbc0049b031 26-Feb-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: convert to COMPAT_SYSCALL_DEFINEx part 7

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
a0f8c6da8f3da63283e978ebece03e81d107b1d0 26-Feb-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: convert to COMPAT_SYSCALL_DEFINEx part 6

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
52a0b536a3addcfe20325303b2dddc2538019476 26-Feb-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: convert to COMPAT_SYSCALL_DEFINEx part 5

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
e723e0cc17f8d8573b19a809277d81cecdd6e92b 26-Feb-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: convert to COMPAT_SYSCALL_DEFINEx part 4

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
4ca2ea58c8421784bdad43b05e9939549e4d34e9 25-Feb-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: convert to COMPAT_SYSCALL_DEFINEx part 3

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
208096eee2fa44de0464e1f3c1f0c1ca1afe67ad 25-Feb-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: convert to COMPAT_SYSCALL_DEFINEx part 2

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
c6c0f58f90cb8e159702ccc08772bc9221f1c35e 25-Feb-2014 Heiko Carstens <heiko.carstens@de.ibm.com> s390/compat: convert to COMPAT_SYSCALL_DEFINEx part 1

Convert s390 specific system calls to to the new COMPAT_SYSCALL_DEFINE macro.
This allows us to get rid of the assembly compat wrappers.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
4725c86055f5bbdcdfe47199c0715881893a2c79 15-Oct-2013 Martin Schwidefsky <schwidefsky@de.ibm.com> s390: fix save and restore of the floating-point-control register

The FPC_VALID_MASK has been used to check the validity of the value
to be loaded into the floating-point-control register. With the
introduction of the floating-point extension facility and the
decimal-floating-point additional bits have been defined which need
to be checked in a non straight forward way. So far these bits have
been ignored which can cause an incorrect results for decimal-
floating-point operations, e.g. an incorrect rounding mode to be
set after signal return.

The static check with the FPC_VALID_MASK is replaced with a trial
load of the floating-point-control value, see test_fp_ctl.

In addition an information leak with the padding word between the
floating-point-control word and the floating-point registers in
the s390_fp_regs is fixed.

Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
56e41d3c5aa84d679eebdb3cb8a70b03c5fbd6c3 22-Jan-2013 Al Viro <viro@zeniv.linux.org.uk> merge compat sys_ipc instances

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
19f4fc3aee180000fe45952691bbe69dde1d9e95 24-Feb-2013 Al Viro <viro@zeniv.linux.org.uk> convert sendfile{,64} to COMPAT_SYSCALL_DEFINE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
7eddd99c289a443d76391d740c7c62d542174f27 26-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> s390: switch to generic old sigaction()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
f036b943441ac8e79b779e3500ae4820c243b4f2 26-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> s390: switch to generic compat rt_sigaction

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
d7b5427cec79d993459c162db67eac9e22135e8b 25-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> s390: switch to generic compat sched_rr_get_interval()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
07562be77d5b36aa961f722292a708bb663f8a73 25-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> s390: switch to generic compat rt_sigqueueinfo()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
bdcf03183cbf208923752bd26f6b9488c60ec1ca 25-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> s390: switch to generic compat rt_sigpending()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
742602243177f3d1d87dede110d278a0f656cf4d 25-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> s390: switch to generic compat rt_sigprocmask(2)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
e214125aa8c0546b24dabf6f47b28c5e20133d1d 23-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> s390: switch to generic sigaltstack

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
751f409db6216ebd134a94f6dcd97779933a5106 05-Oct-2012 Denys Vlasenko <vda.linux@googlemail.com> compat: move compat_siginfo_t definition to asm/compat.h

This is a preparatory patch for the introduction of NT_SIGINFO elf note.

Make the location of compat_siginfo_t uniform across eight architectures
which have it. Now it can be pulled in by including asm/compat.h or
linux/compat.h.

Most of the copies are verbatim. compat_uid[32]_t had to be replaced by
__compat_uid[32]_t. compat_uptr_t had to be moved up before
compat_siginfo_t in asm/compat.h on a several architectures (tile already
had it moved up). compat_sigval_t had to be relocated from linux/compat.h
to asm/compat.h.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Amerigo Wang <amwang@redhat.com>
Cc: "Jonathan M. Foote" <jmfoote@cert.org>
Cc: Roland McGrath <roland@hack.frob.com>
Cc: Pedro Alves <palves@redhat.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
65f22a906e154e8086ed561904d09c3586de85f4 06-Sep-2012 Al Viro <viro@zeniv.linux.org.uk> s390: fold execve_tail() into start_thread(), convert to generic sys_execve()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
c7887325230aec47d47a32562a6e26014a0fafca 11-Aug-2010 David Howells <dhowells@redhat.com> Mark arguments to certain syscalls as being const

Mark arguments to certain system calls as being const where they should be but
aren't. The list includes:

(*) The filename arguments of various stat syscalls, execve(), various utimes
syscalls and some mount syscalls.

(*) The filename arguments of some syscall helpers relating to the above.

(*) The buffer argument of various write syscalls.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
399643f25eb93374e27e06ec85f0e8958298af2e 03-Dec-2009 Boaz Harrosh <bharrosh@panasas.com> s390: remove un-used nfsd #includes

Some un-used includes removed.

This patch is in an effort to cleanup nfsd headers and move
private definitions to source directory.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2da3cf9755ea992a18650860fde74e3bfa8c8b65 07-Dec-2009 Boaz Harrosh <bharrosh@panasas.com> [S390] s390: remove unused nfsd #includes

Some unused includes removed.

This patch is in an effort to cleanup nfsd headers and move
private definitions to source directory.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
4ddf61ea99c1bbed4dcd889803c73213e1b3256b 03-Apr-2009 Eric W. Biederman <ebiederm@xmission.com> sysctl: s390 Use the compat_sys_sysctl

Now that we have a generic 32bit compatibility implementation
there is no need for s390 to implement it's own.

Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
3e86a8c617413e344143839c514e9b0c1713065c 22-Sep-2009 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] Convert sys_execve to function with parameters.

Use function parameters instead of accessing the pt_regs structure
to get the parameters.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2d70ca23f86647e076e3a8b64b3a90e583b894d5 22-Sep-2009 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] Convert sys_clone to function with parameters.

Use function parameters instead of accessing the pt_regs structure
to get the parameters.
Also merge the 31 and 64 bit versions since they are identical.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
b418da16dd44810e5d5a22bba377cca80512a524 16-Oct-2008 Christoph Hellwig <hch@lst.de> compat: generic compat get/settimeofday

Nothing arch specific in get/settimeofday. The details of the timeval
conversion varied a little from arch to arch, but all with the same
results.

Also add an extern declaration for sys_tz to linux/time.h because externs
in .c files are fowned upon. I'll kill the externs in various other files
in a sparate patch.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net> [ sparc bits ]
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
d86730bb9597b02bff59a3a5a01c0094d71a265f 10-Oct-2008 Christoph Hellwig <hch@lst.de> [S390] s390: use sys_pause for 31bit pause entry point

sys32_pause is a useless copy of the generic sys_pause.
(and it's certainly not there for old sparc32 binaries..)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
a806170e29c5468b1d641a22518243bdf1b8d58b 17-Apr-2008 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] Fix a lot of sparse warnings.

Most noteable part of this commit is the new local header file entry.h
which contains all the function declarations of functions that get only
called from asm code or are arch internal. That way we can avoid extern
declarations in C files.
This is more or less the same that was done for sparc64.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
c1821c2e9711adc3cd298a16b7237c92a2cee78d 05-Feb-2007 Gerald Schaefer <geraldsc@de.ibm.com> [S390] noexec protection

This provides a noexec protection on s390 hardware. Our hardware does
not have any bits left in the pte for a hw noexec bit, so this is a
different approach using shadow page tables and a special addressing
mode that allows separate address spaces for code and data.

As a special feature of our "secondary-space" addressing mode, separate
page tables can be specified for the translation of data addresses
(storage operands) and instruction addresses. The shadow page table is
used for the instruction addresses and the standard page table for the
data addresses.
The shadow page table is linked to the standard page table by a pointer
in page->lru.next of the struct page corresponding to the page that
contains the standard page table (since page->private is not really
private with the pte_lock and the page table pages are not in the LRU
list).
Depending on the software bits of a pte, it is either inserted into
both page tables or just into the standard (data) page table. Pages of
a vma that does not have the VM_EXEC bit set get mapped only in the
data address space. Any try to execute code on such a page will cause a
page translation exception. The standard reaction to this is a SIGSEGV
with two exceptions: the two system call opcodes 0x0a77 (sys_sigreturn)
and 0x0aad (sys_rt_sigreturn) are allowed. They are stored by the
kernel to the signal stack frame. Unfortunately, the signal return
mechanism cannot be modified to use an SA_RESTORER because the
exception unwinding code depends on the system call opcode stored
behind the signal stack frame.

This feature requires that user space is executed in secondary-space
mode and the kernel in home-space mode, which means that the addressing
modes need to be switched and that the noexec protection only works
for user space.
After switching the addressing modes, we cannot use the mvcp/mvcs
instructions anymore to copy between kernel and user space. A new
mvcos instruction has been added to the z9 EC/BC hardware which allows
to copy between arbitrary address spaces, but on older hardware the
page tables need to be walked manually.

Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
0d77e5a2c23da734f5a7925f64afa1c2ed92e0f9 23-Jun-2005 Stephen Rothwell <sfr@canb.auug.org.au> [PATCH] compat: introduce compat_time_t

This patch is based on work by Carlos O'Donell and Matthew Wilcox. It
introduces/updates the compat_time_t type and uses it for compat siginfo
structures. I have built this on ppc64 and x86_64.

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>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!