mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
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>
|
||
|---|---|---|
| .. | ||
| a.out.h | ||
| atomic.h | ||
| auxvec.h | ||
| bitops.h | ||
| 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 | ||
| emergency-restart.h | ||
| errno.h | ||
| fb.h | ||
| fcntl.h | ||
| flat.h | ||
| fpu.h | ||
| futex.h | ||
| gpio.h | ||
| hardirq.h | ||
| hw_irq.h | ||
| ide.h | ||
| io.h | ||
| ioctl.h | ||
| ioctls.h | ||
| ipcbuf.h | ||
| irq_regs.h | ||
| irq.h | ||
| 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 | ||
| param.h | ||
| pci.h | ||
| percpu.h | ||
| pgalloc.h | ||
| pgtable.h | ||
| poll.h | ||
| posix_types.h | ||
| processor.h | ||
| ptrace.h | ||
| regs267x.h | ||
| regs306x.h | ||
| resource.h | ||
| scatterlist.h | ||
| sections.h | ||
| segment.h | ||
| semaphore-helper.h | ||
| semaphore.h | ||
| sembuf.h | ||
| setup.h | ||
| sh_bios.h | ||
| shm.h | ||
| shmbuf.h | ||
| shmparam.h | ||
| sigcontext.h | ||
| siginfo.h | ||
| signal.h | ||
| smp.h | ||
| socket.h | ||
| sockios.h | ||
| spinlock.h | ||
| stat.h | ||
| statfs.h | ||
| string.h | ||
| system.h | ||
| target_time.h | ||
| termbits.h | ||
| 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 | ||
| user.h | ||
| virtconvert.h | ||