linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] proc: fix proc-self-map-files selftest for arm
@ 2018-10-11 18:43 Rafael David Tinoco
  2018-10-11 19:42 ` Cyrill Gorcunov
  2018-10-11 20:56 ` Alexey Dobriyan
  0 siblings, 2 replies; 22+ messages in thread
From: Rafael David Tinoco @ 2018-10-11 18:43 UTC (permalink / raw)
  To: linux-kselftest
  Cc: linux-fsdevel, linux-kernel, gorcunov, rafael.tinoco, akpm,
	shuah, adobriyan

MAP_FIXED is important for this test but, unfortunately, lowest virtual
address for user space mapping on arm is (PAGE_SIZE * 2) and NULL hint
does not seem to guarantee that when MAP_FIXED is given. This patch sets
the virtual address that will hold the mapping for the test, fixing the
issue.

Link: https://bugs.linaro.org/show_bug.cgi?id=3782
Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org>
---
 tools/testing/selftests/proc/proc-self-map-files-002.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/proc/proc-self-map-files-002.c b/tools/testing/selftests/proc/proc-self-map-files-002.c
index 6f1f4a6e1ecb..0a47eaca732a 100644
--- a/tools/testing/selftests/proc/proc-self-map-files-002.c
+++ b/tools/testing/selftests/proc/proc-self-map-files-002.c
@@ -55,7 +55,9 @@ int main(void)
 	if (fd == -1)
 		return 1;
 
-	p = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_PRIVATE|MAP_FILE|MAP_FIXED, fd, 0);
+	p = mmap((void *) (2 * PAGE_SIZE), PAGE_SIZE, PROT_NONE,
+			MAP_PRIVATE|MAP_FILE|MAP_FIXED, fd, 0);
+
 	if (p == MAP_FAILED) {
 		if (errno == EPERM)
 			return 2;
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-11-11  2:50 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 18:43 [PATCH] proc: fix proc-self-map-files selftest for arm Rafael David Tinoco
2018-10-11 19:42 ` Cyrill Gorcunov
2018-10-11 20:56 ` Alexey Dobriyan
2018-10-11 21:02   ` Cyrill Gorcunov
2018-10-11 21:30     ` Alexey Dobriyan
2018-10-11 22:00       ` Cyrill Gorcunov
2018-10-15 16:55         ` Rafael David Tinoco
2018-10-15 17:21           ` Cyrill Gorcunov
2018-11-08 10:41             ` Rafael David Tinoco
2018-11-08 11:11               ` Cyrill Gorcunov
2018-11-09 11:30                 ` [PATCH] proc: fix and merge proc-self-map-file tests Rafael David Tinoco
2018-11-09 11:41                   ` Cyrill Gorcunov
2018-11-09 11:45                     ` Rafael David Tinoco
2018-11-09 11:48                       ` Cyrill Gorcunov
2018-11-09 12:01                         ` Rafael David Tinoco
2018-11-09 18:04                           ` Cyrill Gorcunov
2018-11-09 18:48                             ` Rafael David Tinoco
2018-11-09 19:39                               ` Cyrill Gorcunov
2018-11-10 17:47                   ` Alexey Dobriyan
2018-11-10 17:56                     ` Rafael David Tinoco
2018-11-10 18:49                       ` Alexey Dobriyan
2018-11-11  2:50                         ` Rafael David Tinoco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).