linux-stable-rt/arch/parisc/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
agp.h
asm-offsets.h
asmregs.h
assembly.h
atomic.h
auxvec.h
bitops.h
bitsperlong.h
bug.h
bugs.h
byteorder.h
cache.h dma-mapping: parisc: set ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
cacheflush.h kmap_atomic: make kunmap_atomic() harder to misuse 2010-08-09 20:44:54 -07:00
checksum.h
compat.h compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
compat_rt_sigframe.h
compat_signal.h
compat_ucontext.h
cputime.h
current.h
delay.h
device.h
div64.h
dma-mapping.h dma-mapping: remove dma_is_consistent API 2010-08-11 08:59:21 -07:00
dma.h
eisa_bus.h
eisa_eeprom.h
elf.h
emergency-restart.h
errno.h
fb.h
fcntl.h
fixmap.h
floppy.h
ftrace.h
futex.h
grfioctl.h
hardirq.h
hardware.h
hw_irq.h
ide.h
io.h
ioctl.h
ioctls.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
ipcbuf.h
irq.h
irq_regs.h
kdebug.h
kmap_types.h
led.h
linkage.h
local.h
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
machdep.h
mc146818rtc.h
mckinley.h
mman.h
mmu.h
mmu_context.h
mmzone.h
module.h
msgbuf.h
mutex.h
page.h
param.h
parisc-device.h
parport.h
pci.h
pdc.h
pdc_chassis.h
pdcpat.h
percpu.h
perf.h
perf_event.h
pgalloc.h
pgtable.h
poll.h
posix_types.h
prefetch.h
processor.h
psw.h
ptrace.h
real.h
resource.h
ropes.h
rt_sigframe.h
rtc.h
runway.h
scatterlist.h remove needless ISA_DMA_THRESHOLD 2010-08-07 18:15:50 +02:00
sections.h
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h
socket.h
sockios.h
spinlock.h
spinlock_types.h
stat.h
statfs.h
string.h
superio.h
swab.h
syscall.h
system.h Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
termbits.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
termios.h
thread_info.h
timex.h
tlb.h
tlbflush.h
topology.h
traps.h
types.h
uaccess.h
ucontext.h
unaligned.h
unistd.h
unwind.h
user.h
vga.h
xor.h