mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
01f7ae0569
setup/restore_sigcontext() want to copy all related registers between user and kernel. So use block copy instead of each registers copy. Then can let code simple and clearer (which can avoid compiler's warning): The related warning (with allmodconfig under tile): CC arch/tile/kernel/signal.o In file included from include/linux/poll.h:11:0, from include/linux/ring_buffer.h:7, from include/linux/ftrace_event.h:5, from include/trace/syscall.h:6, from include/linux/syscalls.h:81, from arch/tile/kernel/signal.c:30: arch/tile/kernel/signal.c: In function 'setup_sigcontext': arch/tile/kernel/signal.c:116:31: warning: iteration 53u invokes undefined behavior [-Waggressive-loop-optimizations] err |= __put_user(regs->regs[i], &sc->gregs[i]); ^ ./arch/tile/include/asm/uaccess.h:236:26: note: in definition of macro '__put_user_asm' : "r" (ptr), "r" (x), "i" (-EFAULT)) ^ ./arch/tile/include/asm/uaccess.h:297:10: note: in expansion of macro '__put_user_8' case 8: __put_user_8(x, ptr, __ret); break; \ ^ arch/tile/kernel/signal.c:116:10: note: in expansion of macro '__put_user' err |= __put_user(regs->regs[i], &sc->gregs[i]); ^ arch/tile/kernel/signal.c:115:2: note: containing loop for (i = 0; i < sizeof(struct pt_regs)/sizeof(long); ++i) ^ Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> |
||
---|---|---|
.. | ||
vdso | ||
asm-offsets.c | ||
backtrace.c | ||
compat_signal.c | ||
compat.c | ||
early_printk.c | ||
entry.S | ||
ftrace.c | ||
hardwall.c | ||
head_32.S | ||
head_64.S | ||
hvglue_trace.c | ||
hvglue.S | ||
intvec_32.S | ||
intvec_64.S | ||
irq.c | ||
kgdb.c | ||
kprobes.c | ||
machine_kexec.c | ||
Makefile | ||
mcount_64.S | ||
messaging.c | ||
module.c | ||
pci_gx.c | ||
pci-dma.c | ||
pci.c | ||
perf_event.c | ||
pmc.c | ||
proc.c | ||
process.c | ||
ptrace.c | ||
reboot.c | ||
regs_32.S | ||
regs_64.S | ||
relocate_kernel_32.S | ||
relocate_kernel_64.S | ||
setup.c | ||
signal.c | ||
single_step.c | ||
smp.c | ||
smpboot.c | ||
stack.c | ||
sys.c | ||
sysfs.c | ||
tile-desc_32.c | ||
tile-desc_64.c | ||
time.c | ||
tlb.c | ||
traps.c | ||
unaligned.c | ||
usb.c | ||
vdso.c | ||
vmlinux.lds.S |