linux/include/asm-h8300
Yoshinori Sato 12d48739d0 h8300: fix recent uaccess breakage
Al Viro wrote:
>
> 	After that commit in asm-h8300/uaccess.h we have
>
> #define get_user(x, ptr)                                        \
> ({                                                              \
>     int __gu_err = 0;                                           \
>     uint32_t __gu_val = 0;                              \
>     ^^^^^^^^^^^^^^^^^
>     switch (sizeof(*(ptr))) {                                   \
>     case 1:                                                     \
>     case 2:                                                     \
>     case 4:                                                     \
>         __gu_val = *(ptr);                                      \
>         break;                                                  \
>     case 8:                                                     \
>         memcpy(&__gu_val, ptr, sizeof (*(ptr)));                \
>                                ^^^^^^^^^^^^^^^^
>
> which, of course, is FUBAR whenever we actually hit that case - memcpy of
> 8 bytes into uint32_t is obviously wrong.  Why don't we simply do

Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-13 13:11:43 -07:00
..
Kbuild Add empty Kbuild files for 'make headers_install' in remaining arches. 2006-06-18 12:58:53 +01:00
a.out.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
atomic.h h8300 atomic.h update 2007-05-15 08:54:00 -07:00
auxvec.h [PATCH] auxiliary vector cleanups 2005-09-07 16:57:21 -07:00
bitops.h forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
bootinfo.h
bug.h
bugs.h
byteorder.h
cache.h
cachectl.h
cacheflush.h [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
checksum.h [NET]: H8300 checksum annotations and cleanups. 2006-12-02 21:23:04 -08:00
cputime.h
current.h
dbg.h
delay.h [PATCH] include/asm-h8300/: "extern inline" -> "static inline" 2006-12-07 08:39:45 -08:00
device.h Driver core: add dev_archdata to struct device 2006-12-01 14:52:01 -08:00
div64.h
dma.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
elf.h Cleanup asm/{elf,page,user}.h: #ifdef __KERNEL__ is no longer needed 2008-02-07 08:42:30 -08:00
emergency-restart.h [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
errno.h
fb.h fbdev: detect primary display device 2007-07-17 10:23:11 -07:00
fcntl.h [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
flat.h Binfmt_flat: Add minimum support for the Blackfin relocations 2007-10-03 23:41:43 +08:00
fpu.h
futex.h [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
gpio.h
hardirq.h h8300: IRQ handling update 2008-02-23 17:12:16 -08:00
hw_irq.h
ide.h
io.h remove mm_{ptov,vtop}() 2008-02-06 10:41:01 -08:00
ioctl.h [PATCH] Generic ioctl.h 2006-01-10 08:01:34 -08:00
ioctls.h h8300: enable arbitary speed tty port setup 2007-07-16 09:05:37 -07:00
ipcbuf.h
irq.h h8300: IRQ handling update 2008-02-23 17:12:16 -08:00
irq_regs.h h8300 generic irq 2007-05-07 12:12:58 -07:00
kdebug.h move die notifier handling to common code 2007-05-08 11:15:04 -07:00
keyboard.h [PATCH] remove SYSRQ_KEY and related defines from ppc/sh/h8300 2006-10-01 00:39:22 -07:00
kmap_types.h
linkage.h
local.h
mc146818rtc.h
md.h
mman.h [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
mmu.h
mmu_context.h [PATCH] x86: PARAVIRT: add hooks to intercept mm creation and destruction 2007-05-02 19:27:14 +02:00
module.h
msgbuf.h
mutex.h [PATCH] mutex subsystem, add default include/asm-*/mutex.h files 2006-01-09 15:59:19 -08:00
namei.h
page.h Add pgtable_t to remaining nommu architectures 2008-02-09 11:08:33 -08:00
page_offset.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
param.h avoid overflows in kernel/time.c 2008-02-08 09:22:39 -08:00
pci.h PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries() 2007-07-11 16:02:07 -07:00
percpu.h
pgalloc.h
pgtable.h Clean up mostly unused IOSPACE macros 2007-05-08 11:15:13 -07:00
poll.h Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
posix_types.h asm-*/posix_types.h: scrub __GLIBC__ 2008-02-08 09:22:34 -08:00
processor.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
ptrace.h
regs267x.h
regs306x.h
resource.h
scatterlist.h Add CONFIG_DEBUG_SG sg validation 2007-10-22 21:20:03 +02:00
sections.h
segment.h
semaphore-helper.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
semaphore.h kill DECLARE_MUTEX_LOCKED 2007-10-17 08:42:47 -07:00
sembuf.h
setup.h
sh_bios.h
shm.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h [PATCH] irq-flags: H8300: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
smp.h
socket.h [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
sockios.h [NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution 2007-04-25 22:24:04 -07:00
spinlock.h
stat.h
statfs.h
string.h
system.h Add cmpxchg_local to h8300 2008-02-07 08:42:32 -08:00
target_time.h
termbits.h h8300: enable arbitary speed tty port setup 2007-07-16 09:05:37 -07:00
termios.h h8300: enable arbitary speed tty port setup 2007-07-16 09:05:37 -07:00
thread_info.h remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
timex.h asm-h8300: parentheses around definition CLOCK_TICK_RATE 2007-12-10 19:43:54 -08:00
tlb.h
tlbflush.h remove unused flush_tlb_pgtables 2007-10-19 11:53:34 -07:00
topology.h
traps.h
types.h remove strict ansi check from __u64 in asm/types.h 2007-10-17 08:42:53 -07:00
uaccess.h h8300: fix recent uaccess breakage 2008-03-13 13:11:43 -07:00
ucontext.h
unaligned.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
unistd.h h8300 syscall update 2007-05-11 08:29:33 -07:00
user.h Sanitize the type of struct user.u_ar0 2008-02-07 08:42:30 -08:00
virtconvert.h remove mm_{ptov,vtop}() 2008-02-06 10:41:01 -08:00