android_kernel_xiaomi_sm8350/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
..
a.out.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
atomic.h
auxvec.h
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
checksum.h
cputime.h
current.h
dbg.h
delay.h
device.h
div64.h
dma.h
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
errno.h
fb.h fbdev: detect primary display device 2007-07-17 10:23:11 -07:00
fcntl.h
flat.h Binfmt_flat: Add minimum support for the Blackfin relocations 2007-10-03 23:41:43 +08:00
fpu.h
futex.h
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
ioctls.h
ipcbuf.h
irq_regs.h
irq.h h8300: IRQ handling update 2008-02-23 17:12:16 -08:00
Kbuild
kdebug.h
keyboard.h
kmap_types.h
linkage.h
local.h
mc146818rtc.h
md.h
mman.h
mmu_context.h
mmu.h
module.h
msgbuf.h
mutex.h
namei.h
page_offset.h
page.h Add pgtable_t to remaining nommu architectures 2008-02-09 11:08:33 -08:00
param.h avoid overflows in kernel/time.c 2008-02-08 09:22:39 -08:00
pci.h
percpu.h
pgalloc.h
pgtable.h
poll.h
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
semaphore.h kill DECLARE_MUTEX_LOCKED 2007-10-17 08:42:47 -07:00
sembuf.h
setup.h
sh_bios.h
shm.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h
socket.h [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
sockios.h
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
termios.h
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
unistd.h
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