linux-kernel-test/arch
Linus Torvalds 7f81890687 x86: don't use 'access_ok()' as a range check in get_user_pages_fast()
It's really not right to use 'access_ok()', since that is meant for the
normal "get_user()" and "copy_from/to_user()" accesses, which are done
through the TLB, rather than through the page tables.

Why? access_ok() does both too few, and too many checks.  Too many,
because it is meant for regular kernel accesses that will not honor the
'user' bit in the page tables, and because it honors the USER_DS vs
KERNEL_DS distinction that we shouldn't care about in GUP.  And too few,
because it doesn't do the 'canonical' check on the address on x86-64,
since the TLB will do that for us.

So instead of using a function that isn't meant for this, and does
something else and much more complicated, just do the real rules: we
don't want the range to overflow, and on x86-64, we want it to be a
canonical low address (on 32-bit, all addresses are canonical).

Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-20 09:52:27 -07:00
..
alpha Delete pcibios_select_root 2009-06-17 14:04:42 -07:00
arm Delete pcibios_select_root 2009-06-17 14:04:42 -07:00
avr32 ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
blackfin Blackfin: convert page/tlb to asm-generic 2009-06-18 21:42:30 -04:00
cris kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
frv mm: consolidate init_mm definition 2009-06-16 19:47:28 -07:00
h8300 ptrace: remove PT_DTRACE from arch/h8300 2009-06-18 13:03:48 -07:00
ia64 dma-mapping: ia64: add CONFIG_DMA_API_DEBUG support 2009-06-18 13:03:58 -07:00
m32r ptrace: remove PT_DTRACE from arch/m32r 2009-06-18 13:03:49 -07:00
m68k ptrace: remove PT_DTRACE from m68k, m68knommu 2009-06-18 13:03:48 -07:00
m68knommu ptrace: remove PT_DTRACE from m68k, m68knommu 2009-06-18 13:03:48 -07:00
microblaze kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
mips Delete pcibios_select_root 2009-06-17 14:04:42 -07:00
mn10300 MN10300: Add support for new ELF relocs in kernel modules 2009-06-18 13:10:33 -07:00
parisc ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-06-19 17:40:40 -07:00
s390 ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
sh Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2009-06-18 14:07:35 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6 2009-06-19 17:42:01 -07:00
um Merge branch 'akpm' 2009-06-16 19:50:13 -07:00
x86 x86: don't use 'access_ok()' as a range check in get_user_pages_fast() 2009-06-20 09:52:27 -07:00
xtensa ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
.gitignore
Kconfig gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00