linux/arch/arc/include/asm
Alexey Brodkin 06f34e1c28 ARC: fix page address calculation if PAGE_OFFSET != LINUX_LINK_BASE
We used to calculate page address differently in 2 cases:

1. In virt_to_page(x) we do
 --->8---
 mem_map + (x - CONFIG_LINUX_LINK_BASE) >> PAGE_SHIFT
 --->8---

2. In in pte_page(x) we do
 --->8---
 mem_map + (pte_val(x) - PAGE_OFFSET) >> PAGE_SHIFT
 --->8---

That leads to problems in case PAGE_OFFSET != CONFIG_LINUX_LINK_BASE -
different pages will be selected depending on where and how we calculate
page address.

In particular in the STAR 9000853582 when gdb attempted to read memory
of another process it got improper page in get_user_pages() because this
is exactly one of the places where we search for a page by pte_page().

The fix is trivial - we need to calculate page address similarly in both
cases.

Cc: <stable@vger.kernel.org>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-02-13 18:01:12 +05:30
..
arcregs.h ARC: boot: cpu feature print enhancements 2014-10-13 14:46:22 +05:30
asm-offsets.h
atomic.h Platform code reduction/moving-up (TB10X no longer needs any callbacks) 2014-10-21 07:50:02 -07:00
bitops.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +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 ARC: Update comments about uncached address space 2014-10-13 14:46:16 +05:30
cacheflush.h ARC: [mm] Assume pagecache page dirty by default 2013-06-22 19:23:19 +05:30
checksum.h ARC: Checksum/byteorder/swab routines 2013-02-11 20:00:34 +05:30
clk.h ARC: [DeviceTree] Convert some Kconfig items to runtime values 2013-02-15 23:15:56 +05:30
cmpxchg.h ARC: Atomic/bitops/cmpxchg/barriers 2013-02-11 20:00:30 +05:30
current.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
delay.h ARC: Fix __udelay calculation 2013-09-05 10:31:12 +05:30
disasm.h ARC: disassembly (needed by kprobes/kgdb/unaligned-access-emul) 2013-02-15 23:16:04 +05:30
dma-mapping.h arc: fix dma_address assignment during dma_map_sg() 2013-03-19 15:34:53 +05:30
dma.h ARC: I/O and DMA Mappings 2013-02-15 23:15:54 +05:30
elf.h ARC: Remove SET_PERSONALITY (tracks cross-arch change) 2013-03-18 14:37:05 +05:30
entry.h ARC: Exception Handlers Code consolidation 2013-08-26 09:40:25 +05:30
exec.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
futex.h ARC: Futex support 2013-02-15 23:16:00 +05:30
io.h ARC: Remove redundant PCI_IOBASE declaration 2014-11-10 12:14:53 +01:00
irq.h ARC: [SMP] unify cpu private IRQ requests (TIMER/IPI) 2014-07-23 11:16:45 +05:30
irqflags.h ARC: document memory clobber in irq control macros 2014-12-12 16:02:46 +05:30
Kbuild net, lib: kill arch_fast_hash library bits 2014-12-10 15:17:46 -05:00
kdebug.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
kgdb.h ARC: Update order of registers in KGDB to match GDB 7.5 2014-10-13 14:46:20 +05:30
kprobes.h ARC: Remove explicit passing around of ECR 2013-06-26 15:30:50 +05:30
linkage.h ARC: switch to generic ENTRY/END assembler annotations 2014-03-26 14:31:28 +05:30
mach_desc.h arc: use common of_flat_dt_match_machine 2013-10-09 20:03:55 -05:00
mmu_context.h ARC: [SMP] TLB flush 2013-11-06 10:41:45 +05:30
mmu.h ARC: [SMP] ASID allocation 2013-11-06 10:41:45 +05:30
module.h ARC: DWARF2 .debug_frame based stack unwinder 2013-02-15 23:16:03 +05:30
mutex.h ARC: SMP support 2013-02-15 23:16:02 +05:30
page.h ARC: [mm] Make stack/heap Non-executable by default 2013-06-22 19:23:20 +05:30
perf_event.h ARC: Add perf support for ARC700 cores 2013-11-12 09:45:38 +05:30
pgalloc.h arc: handle pgtable_page_ctor() fail 2013-11-15 09:32:16 +09:00
pgtable.h ARC: fix page address calculation if PAGE_OFFSET != LINUX_LINK_BASE 2015-02-13 18:01:12 +05:30
processor.h arc: Remove unused prepare_to_copy() 2015-02-02 17:08:37 +05:30
ptrace.h ARC: Code cosmetics (Nothing semantical) 2013-08-29 17:51:15 +05:30
sections.h of/fdt: consolidate built-in dtb section variables 2014-04-30 00:59:13 -05:00
segment.h ARC: uaccess friends 2013-02-11 20:00:31 +05:30
serial.h ARC: Dynamically determine BASE_BAUD from DeviceTree 2015-02-02 17:08:37 +05:30
setup.h ARC: RIP @running_on_hw 2014-10-13 14:46:17 +05:30
shmparam.h ARC: [mm] Aliasing VIPT dcache support 4/4 2013-05-09 22:00:57 +05:30
smp.h ARC: Allow SMP kernel to build/boot on UP-only infrastructure 2014-09-27 14:49:01 +05:30
spinlock_types.h ARC: Code cosmetics (Nothing semantical) 2013-08-29 17:51:15 +05:30
spinlock.h ARC: Workaround spinlock livelock in SMP SystemC simulation 2013-09-27 16:28:48 +05:30
string.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
switch_to.h ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
syscall.h ARC: stop using pt_regs->orig_r8 2013-06-22 19:23:26 +05:30
syscalls.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
thread_info.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
timex.h ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
tlb-mmu1.h ARC: Disintegrate arcregs.h 2013-06-22 13:46:42 +05:30
tlb.h ARC: Disintegrate arcregs.h 2013-06-22 13:46:42 +05:30
tlbflush.h ARC: [SMP] TLB flush 2013-11-06 10:41:45 +05:30
uaccess.h ARC: Fix 32-bit wrap around in access_ok() 2013-09-27 16:28:47 +05:30
unaligned.h ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
unwind.h ARC: DWARF2 .debug_frame based stack unwinder 2013-02-15 23:16:03 +05:30