Aneesh Kumar K.V
71013d071b
selftest/vm: fix map_fixed_noreplace test failure
[ Upstream commit f39c58008dee7ab5fc94c3f1995a21e886801df0 ]
On the latest RHEL the test fails due to executable mapped at 256MB
address
# ./map_fixed_noreplace
mmap() @ 0x10000000-0x10050000 p=0xffffffffffffffff result=File exists
10000000-10010000 r-xp 00000000 fd:04 34905657 /root/rpmbuild/BUILD/kernel-5.14.0-56.el9/linux-5.14.0-56.el9.ppc64le/tools/testing/selftests/vm/map_fixed_noreplace
10010000-10020000 r--p 00000000 fd:04 34905657 /root/rpmbuild/BUILD/kernel-5.14.0-56.el9/linux-5.14.0-56.el9.ppc64le/tools/testing/selftests/vm/map_fixed_noreplace
10020000-10030000 rw-p 00010000 fd:04 34905657 /root/rpmbuild/BUILD/kernel-5.14.0-56.el9/linux-5.14.0-56.el9.ppc64le/tools/testing/selftests/vm/map_fixed_noreplace
10029b90000-10029bc0000 rw-p 00000000 00:00 0 [heap]
7fffbb510000-7fffbb750000 r-xp 00000000 fd:04 24534 /usr/lib64/libc.so.6
7fffbb750000-7fffbb760000 r--p 00230000 fd:04 24534 /usr/lib64/libc.so.6
7fffbb760000-7fffbb770000 rw-p 00240000 fd:04 24534 /usr/lib64/libc.so.6
7fffbb780000-7fffbb7a0000 r--p 00000000 00:00 0 [vvar]
7fffbb7a0000-7fffbb7b0000 r-xp 00000000 00:00 0 [vdso]
7fffbb7b0000-7fffbb800000 r-xp 00000000 fd:04 24514 /usr/lib64/ld64.so.2
7fffbb800000-7fffbb810000 r--p 00040000 fd:04 24514 /usr/lib64/ld64.so.2
7fffbb810000-7fffbb820000 rw-p 00050000 fd:04 24514 /usr/lib64/ld64.so.2
7fffd93f0000-7fffd9420000 rw-p 00000000 00:00 0 [stack]
Error: couldn't map the space we need for the test
Fix this by finding a free address using mmap instead of hardcoding
BASE_ADDRESS.
Link: https://lkml.kernel.org/r/20220217083417.373823-1-aneesh.kumar@linux.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Jann Horn <jannh@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-03-16 14:16:00 +01:00
..
2020-04-03 13:12:26 -07:00
2021-09-30 10:11:03 +02:00
2022-03-16 14:15:59 +01:00
2020-07-06 15:47:48 -06:00
2020-03-25 11:50:48 +01:00
2020-08-12 10:57:55 -07:00
2022-02-23 12:01:06 +01:00
2021-11-18 14:04:01 +01:00
2021-03-04 11:38:05 +01:00
2022-03-08 19:09:36 +01:00
2020-03-25 11:50:48 +01:00
2022-02-23 12:01:03 +01:00
2020-11-06 15:42:42 -08:00
2021-09-18 13:40:20 +02:00
2020-06-29 10:02:23 +02:00
2022-01-27 10:54:15 +01:00
2022-02-08 18:30:39 +01:00
2021-06-03 09:00:31 +02:00
2020-03-25 11:50:48 +01:00
2020-04-23 17:23:20 -06:00
2020-04-14 10:24:28 -06:00
2020-03-25 11:50:48 +01:00
2020-03-25 11:50:48 +01:00
2020-08-12 10:58:01 -07:00
2021-05-22 11:40:55 +02:00
2021-12-22 09:30:50 +01:00
2020-06-04 19:06:25 -07:00
2020-08-27 15:27:24 +02:00
2021-07-19 09:45:00 +02:00
2020-03-25 11:50:48 +01:00
2020-03-25 11:50:48 +01:00
2020-04-23 17:23:20 -06:00
2022-02-23 12:00:59 +01:00
2020-08-27 16:06:47 -04:00
2020-03-25 11:50:48 +01:00
2022-03-16 14:15:59 +01:00
2022-02-23 12:01:01 +01:00
2020-05-08 09:42:14 -06:00
2020-06-05 20:02:09 -04:00
2022-02-23 12:00:59 +01:00
2020-07-06 15:59:07 -06:00
2022-02-23 12:01:06 +01:00
2022-01-27 10:54:23 +01:00
2020-03-25 11:50:48 +01:00
2020-11-05 10:08:14 -07:00
2020-05-30 10:34:02 -07:00
2020-07-20 18:04:59 -07:00
2020-09-23 10:19:25 -06:00
2020-09-03 09:47:01 -07:00
2021-08-15 14:00:25 +02:00
2020-09-25 14:23:27 +02:00
2022-02-23 12:00:58 +01:00
2020-03-25 11:50:48 +01:00
2022-03-08 19:09:29 +01:00
2020-07-06 15:57:15 -06:00
2020-03-25 11:50:48 +01:00
2020-03-25 11:50:48 +01:00
2021-07-14 16:56:42 +02:00
2020-07-06 15:57:28 -06:00
2020-06-09 10:03:12 -07:00
2021-07-14 16:56:26 +02:00
2020-10-20 17:02:57 +02:00
2021-07-20 16:05:42 +02:00
2020-03-25 11:50:48 +01:00
2020-07-06 14:20:35 -06:00
2020-07-06 15:59:07 -06:00
2020-05-22 11:05:07 -06:00
2022-03-16 14:16:00 +01:00
2020-03-25 11:50:48 +01:00
2021-12-08 09:03:22 +01:00
2022-01-11 15:24:58 +01:00
2022-02-23 12:00:58 +01:00
2020-04-03 13:12:26 -07:00
2020-05-19 16:11:46 -06:00
2020-04-23 17:23:20 -06:00
2022-02-23 12:00:58 +01:00
2019-11-07 14:43:27 -07:00
2020-08-05 10:28:25 -07:00
2021-10-09 14:40:57 +02:00
2020-10-07 07:58:54 -06:00
2020-12-30 11:53:07 +01:00