linux/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
..
agp.h agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asmregs.h
assembly.h parisc: fix 64bit build 2009-03-13 01:18:56 -04:00
atomic.h atomic_t: Cast to volatile when accessing atomic variables 2010-05-17 07:57:27 -07:00
auxvec.h
bitops.h
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
bug.h panic: Allow warnings to set different taint flags 2010-05-19 08:36:48 +01:00
bugs.h
byteorder.h byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
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 parisc: fix ipv6 checksum 2009-01-05 19:11:05 +00:00
compat_rt_sigframe.h
compat_signal.h
compat_ucontext.h
compat.h compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
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 parisc: remove CVS keywords 2009-07-03 03:34:06 +00:00
eisa_bus.h
eisa_eeprom.h
elf.h elf: kill USE_ELF_CORE_DUMP 2009-12-16 07:20:12 -08:00
emergency-restart.h
errno.h cfg80211: errno.h: define ERFKILL 2009-06-07 05:01:00 -07:00
fb.h
fcntl.h vfs: Implement proper O_SYNC semantics 2009-12-10 15:02:50 +01:00
fixmap.h parisc: rename parisc's vmalloc_start to parisc_vmalloc_start 2009-09-27 23:27:04 -04:00
floppy.h
ftrace.h parisc: add CALLER_ADDR{0-6} macros 2009-12-16 03:48:54 +00:00
futex.h
grfioctl.h
hardirq.h parisc: convert to asm-generic/hardirq.h 2009-09-28 00:24:23 -04:00
hardware.h
hw_irq.h
ide.h
io.h parisc: define x->x mmio accessors 2009-03-13 01:20:48 -04:00
ioctl.h
ioctls.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
ipcbuf.h
irq_regs.h
irq.h parisc: convert cpu_check_affinity to new cpumask api 2009-03-13 01:20:27 -04:00
Kbuild archs: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
kdebug.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
led.h
linkage.h
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
local.h
machdep.h
mc146818rtc.h
mckinley.h
mman.h mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions 2009-09-22 07:17:41 -07:00
mmu_context.h parisc: fix braino in commit adding __space_to_prot 2009-01-05 18:15:25 +00:00
mmu.h
mmzone.h
module.h parisc: fix module loading failure of large kernel modules 2009-01-05 08:40:14 +10:30
msgbuf.h
mutex.h
page.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
param.h parisc: Simplify param.h by including <asm-generic/param.h> 2010-03-06 22:54:10 +00:00
parisc-device.h parisc: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-26 22:22:41 +00:00
parport.h
pci.h pci-dma: add linux/pci-dma.h to linux/pci.h 2010-03-12 15:52:42 -08:00
pdc_chassis.h
pdc.h parisc: asm/pdc.h should include asm/page.h 2009-04-02 00:20:15 +00:00
pdcpat.h
percpu.h
perf_event.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
perf.h
pgalloc.h
pgtable.h MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
poll.h
posix_types.h parisc: __kernel_time_t is always long 2008-11-26 22:22:36 +00:00
prefetch.h
processor.h parisc: add task_pt_regs macro 2009-07-03 03:34:11 +00:00
psw.h
ptrace.h ptrace: move user_enable_single_step & co prototypes to linux/ptrace.h 2010-03-12 15:52:38 -08:00
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 cpumask: remove arch_send_call_function_ipi 2009-09-24 09:34:47 +09:30
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock.h locking: Convert raw_rwlock functions to arch_rwlock 2009-12-14 23:55:32 +01:00
stat.h
statfs.h
string.h
superio.h
swab.h headers_check fix: parisc, swab.h 2009-02-01 11:01:27 +05:30
syscall.h parisc: add skeleton syscall.h 2009-09-27 23:07:23 -04:00
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 add descriptive comment for TIF_MEMDIE task flag declaration. 2010-05-14 11:13:27 +02:00
timex.h
tlb.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h parisc: ensure broadcast tlb purge runs single threaded 2009-07-03 03:34:09 +00:00
topology.h
traps.h
types.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
uaccess.h parisc: add strict copy size checks (v2) 2010-03-06 22:54:09 +00:00
ucontext.h
unaligned.h
unistd.h parisc: ditto sys_accept4 2010-03-06 22:54:09 +00:00
unwind.h
user.h
vga.h
xor.h