linux-stable-rt/arch/s390/include/asm
H. Peter Anvin c41d68a513 compat: Make compat_alloc_user_space() incorporate the access_ok()
compat_alloc_user_space() expects the caller to independently call
access_ok() to verify the returned area.  A missing call could
introduce problems on some architectures.

This patch incorporates the access_ok() check into
compat_alloc_user_space() and also adds a sanity check on the length.
The existing compat_alloc_user_space() implementations are renamed
arch_compat_alloc_user_space() and are used as part of the
implementation of the new global function.

This patch assumes NULL will cause __get_user()/__put_user() to either
fail or access userspace on all architectures.  This should be
followed by checking the return value of compat_access_user_space()
for NULL in the callers, at which time the access_ok() in the callers
can also be removed.

Reported-by: Ben Hawkes <hawkes@sota.gen.nz>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James Bottomley <jejb@parisc-linux.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: <stable@kernel.org>
2010-09-14 16:08:45 -07:00
..
Kbuild archs: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
airq.h
appldata.h
asm-offsets.h
atomic.h
auxvec.h
bitops.h
bitsperlong.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
ccwdev.h [S390] cio: CHSC SIOSL Support 2010-08-09 18:12:53 +02:00
ccwgroup.h
checksum.h
chpid.h
chsc.h
cio.h
cmb.h
compat.h compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
cpcmd.h
cpu.h
cputime.h
crw.h
current.h
dasd.h
debug.h
delay.h
device.h
diag.h
div64.h
dma.h
ebcdic.h
elf.h
emergency-restart.h
errno.h
etr.h
extmem.h
fb.h
fcntl.h
fcx.h
ftrace.h
futex.h
hardirq.h
hugetlb.h [S390] fix tlb flushing vs. concurrent /proc accesses 2010-08-24 09:26:34 +02:00
idals.h
io.h
ioctl.h
ioctls.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
ipcbuf.h
ipl.h
irq.h
irq_regs.h
irqflags.h
isc.h
itcw.h
kdebug.h
kexec.h
kmap_types.h
kprobes.h
kvm.h
kvm_host.h KVM: Remove unnecessary divide operations 2010-08-01 10:47:30 +03:00
kvm_para.h
kvm_virtio.h
linkage.h
local.h
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
lowcore.h
mathemu.h
mman.h
mmu.h [S390] fix tlb flushing vs. concurrent /proc accesses 2010-08-24 09:26:34 +02:00
mmu_context.h [S390] fix tlb flushing vs. concurrent /proc accesses 2010-08-24 09:26:34 +02:00
module.h
monwriter.h
msgbuf.h
mutex.h
nmi.h
page.h
param.h
pci.h
percpu.h
perf_event.h
pgalloc.h
pgtable.h [S390] fix tlb flushing vs. concurrent /proc accesses 2010-08-24 09:26:34 +02:00
poll.h
posix_types.h
processor.h
ptrace.h
qdio.h [SCSI] zfcp: Enable data division support for FCP devices 2010-07-28 09:48:55 -05:00
qeth.h
reset.h
resource.h
rwsem.h
s390_ext.h
scatterlist.h remove needless ISA_DMA_THRESHOLD 2010-08-07 18:15:50 +02:00
schid.h
sclp.h
scsw.h
seccomp.h
sections.h
segment.h
sembuf.h
setup.h
sfp-machine.h
sfp-util.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sigp.h
smp.h
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
stat.h
statfs.h add f_flags to struct statfs(64) 2010-08-09 16:48:44 -04:00
string.h
suspend.h
swab.h
syscall.h
sysinfo.h
system.h
tape390.h
termbits.h
termios.h
thread_info.h
timer.h
timex.h
tlb.h [S390] fix tlb flushing vs. concurrent /proc accesses 2010-08-24 09:26:34 +02:00
tlbflush.h [S390] fix tlb flushing vs. concurrent /proc accesses 2010-08-24 09:26:34 +02:00
topology.h [S390] topology: use default MC domain initializer 2010-08-09 18:12:54 +02:00
types.h
uaccess.h
ucontext.h
unaligned.h
unistd.h [S390] wire up prlimit64 and fanotify* syscalls 2010-08-13 10:06:54 +02:00
user.h
vdso.h
vtoc.h
xor.h
zcrypt.h