kernel_optimize_test/arch/arc/include/asm
Vineet Gupta 05d9d0b96e ARC: uaccess: get_user to zero out dest in cause of fault
Al reported potential issue with ARC get_user() as it wasn't clearing
out destination pointer in case of fault due to bad address etc.

Verified using following

| {
|  	u32 bogus1 = 0xdeadbeef;
|	u64 bogus2 = 0xdead;
|	int rc1, rc2;
|
|  	pr_info("Orig values %x %llx\n", bogus1, bogus2);
|	rc1 = get_user(bogus1, (u32 __user *)0x40000000);
|	rc2 = get_user(bogus2, (u64 __user *)0x50000000);
|	pr_info("access %d %d, new values %x %llx\n",
|		rc1, rc2, bogus1, bogus2);
| }

| [ARCLinux]# insmod /mnt/kernel-module/qtn.ko
| Orig values deadbeef dead
| access -14 -14, new values 0 0

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-09-13 17:49:41 -04:00
..
arcregs.h ARC: build: Better way to detect ISA compatible toolchain 2016-03-12 11:58:30 +05:30
asm-offsets.h
atomic.h locking/atomic, arch/arc: Fix build 2016-06-20 11:25:49 +02:00
barrier.h ARC: [plat-eznps] Use dedicated SMP barriers 2016-05-09 09:32:33 +05:30
bitops.h ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg 2016-05-09 09:32:33 +05:30
bug.h ARC: BUG() dumps stack after @msg (@msg now same as in generic BUG)) 2014-10-13 14:46:18 +05:30
cache.h ARCv2: ioremap: Support dynamic peripheral address space 2016-03-19 14:34:10 +05:30
cacheflush.h ARC: dma: ioremap: use phys_addr_t consistenctly in code paths 2016-03-19 14:34:09 +05:30
checksum.h ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
cmpxchg.h ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg 2016-05-09 09:32:33 +05:30
current.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
delay.h ARCv2: Adhere to Zero Delay loop restriction 2015-06-22 14:06:56 +05:30
disasm.h
dma-mapping.h ARC: dma: reintroduce platform specific dma<->phys 2016-03-19 14:34:09 +05:30
dma.h ARC: Add PCI support 2016-03-10 14:44:13 -06:00
elf.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
entry-arcv2.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
entry-compact.h Fix typos 2016-05-30 10:07:32 +05:30
entry.h ARCv2: STAR 9000808988: signals involving Delay Slot 2015-06-22 14:06:55 +05:30
exec.h
fb.h arc: Add our own implementation of fb_pgprotect() 2016-04-07 14:59:09 +05:30
futex.h ARC: change some branchs to jumps to resolve linkage errors 2015-08-20 18:53:15 +05:30
highmem.h ARC: mm: HIGHMEM: kmap API implementation 2015-10-28 19:49:04 +05:30
hugepage.h arch: fix has_transparent_hugepage() 2016-05-19 19:12:14 -07:00
io.h ARC: Add missing io barriers to io{read,write}{16,32}be() 2016-05-05 16:35:28 +05:30
irq.h ARC: irq: export some IRQs again 2016-05-09 09:32:30 +05:30
irqflags-arcv2.h ARCv2: Enable LOCKDEP 2016-04-22 18:12:31 +05:30
irqflags-compact.h ARC: Abstract out ISA specific SLEEP args 2015-11-16 14:17:02 +05:30
irqflags.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
kdebug.h
kgdb.h ARC: Update order of registers in KGDB to match GDB 7.5 2014-10-13 14:46:20 +05:30
kmap_types.h ARC: mm: HIGHMEM: kmap API implementation 2015-10-28 19:49:04 +05:30
kprobes.h
linkage.h ARC: switch to generic ENTRY/END assembler annotations 2014-03-26 14:31:28 +05:30
mach_desc.h ARC: smp: Rename platform hook @init_cpu_smp -> @init_per_cpu 2015-12-17 12:56:56 +05:30
mcip.h ARCv2: clocksource: Rename GRTC -> GFRC ... 2016-01-29 16:51:02 +05:30
mmu_context.h Fix typos 2016-05-30 10:07:32 +05:30
mmu.h ARC: mm: PAE40 support 2015-10-29 18:41:30 +05:30
mmzone.h ARC: support HIGHMEM even without PAE40 2016-05-05 16:35:46 +05:30
module.h
mutex.h
page.h ARC: pae: STRICT_MM_TYPECHECKS was broken 2016-05-13 09:16:09 +05:30
pci.h ARC: Add PCI support 2016-03-10 14:44:13 -06:00
perf_event.h ARCv2: perf: Finally introduce HS perf unit 2015-08-27 14:59:07 +05:30
pgalloc.h arc: get rid of superfluous __GFP_REPEAT 2016-06-24 17:23:52 -07:00
pgtable.h ARC: mm: don't loose PTE_SPECIAL in pte_modify() 2016-07-28 12:38:17 -07:00
processor.h Fix typos 2016-05-30 10:07:32 +05:30
ptrace.h ARC: Make pt_regs regs unsigned 2015-08-05 11:48:21 +05:30
sections.h of/fdt: consolidate built-in dtb section variables 2014-04-30 00:59:13 -05:00
segment.h
serial.h ARC: Dynamically determine BASE_BAUD from DeviceTree 2015-02-02 17:08:37 +05:30
setup.h ARC: [plat-eznps] Use dedicated COMMAND_LINE_SIZE 2016-05-09 09:32:33 +05:30
shmparam.h
smp.h Fix typos 2016-05-30 10:07:32 +05:30
spinlock_types.h ARC: LLOCK/SCOND based rwlock 2015-08-04 09:26:33 +05:30
spinlock.h locking/spinlock, arch: Update and fix spin_unlock_wait() implementations 2016-06-14 11:55:15 +02:00
stacktrace.h ARC: Make arc_unwind_core accessible externally 2015-02-27 10:15:00 +05:30
string.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
switch_to.h
syscall.h
syscalls.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
thread_info.h Fix typos 2016-05-30 10:07:32 +05:30
timex.h
tlb-mmu1.h
tlb.h
tlbflush.h ARC: thp: unbork !CONFIG_TRANSPARENT_HUGEPAGE build 2016-03-17 15:31:45 +05:30
uaccess.h ARC: uaccess: get_user to zero out dest in cause of fault 2016-09-13 17:49:41 -04:00
unaligned.h ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
unwind.h ARC: dw2 unwind: Reinstante unwinding out of modules 2015-12-17 11:10:23 +05:30