linux_dsm_epyc7002/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
checksum.h
clk.h
cmpxchg.h
current.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
delay.h
disasm.h
dma-mapping.h
dma.h
elf.h
entry.h
exec.h
futex.h
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
kgdb.h ARC: Update order of registers in KGDB to match GDB 7.5 2014-10-13 14:46:20 +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
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
mutex.h
page.h
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
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: RIP @running_on_hw 2014-10-13 14:46:17 +05:30
shmparam.h
smp.h ARC: Allow SMP kernel to build/boot on UP-only infrastructure 2014-09-27 14:49:01 +05:30
spinlock_types.h
spinlock.h
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 ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
timex.h
tlb-mmu1.h
tlb.h
tlbflush.h ARC: [SMP] TLB flush 2013-11-06 10:41:45 +05:30
uaccess.h
unaligned.h ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
unwind.h