diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2015-02-12 21:10:11 +0300 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-02-13 18:01:12 +0530 |
commit | 06f34e1c28f3608b0ce5b310e41102d3fe7b65a1 (patch) | |
tree | dfe8d03ffc8a8945713174c91f7eee25e01d863d /fs/xfs/libxfs/xfs_da_format.h | |
parent | 091f56be10efe8ac7c09d6368d885f41fa7eb809 (diff) | |
download | linux-06f34e1c28f3608b0ce5b310e41102d3fe7b65a1.tar.bz2 |
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_da_format.h')
0 files changed, 0 insertions, 0 deletions