Lines Matching +full:3 +full:base +full:- +full:x
1 // SPDX-License-Identifier: GPL-2.0
31 addr = mmap(NULL, size, PROT_NONE, flags, -1, 0); in find_base_addr()
52 /* let's find a base addr that is free before we start the tests */ in main()
61 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
70 ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
71 ksft_test_result_pass("mmap() 5*PAGE_SIZE at base\n"); in main()
74 size = 3 * page_size; in main()
75 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
80 ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
81 ksft_test_result_pass("mmap() 3*PAGE_SIZE at base+PAGE_SIZE\n"); in main()
85 * base | free | new in main()
88 * +3 | mapped | new in main()
93 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
98 ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
99 ksft_test_result_pass("mmap() 5*PAGE_SIZE at base\n"); in main()
104 * base | free | in main()
107 * +3 | mapped | in main()
112 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
117 ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
118 ksft_test_result_pass("mmap() 2*PAGE_SIZE at base+PAGE_SIZE\n"); in main()
122 * base | free | in main()
125 * +3 | mapped | new in main()
128 addr = base_addr + (3 * page_size); in main()
130 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
133 ksft_exit_fail_msg("Error:3: mmap() succeeded when it shouldn't have\n"); in main()
135 ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
136 ksft_test_result_pass("mmap() 2*PAGE_SIZE at base+(3*PAGE_SIZE)\n"); in main()
140 * base | free | new in main()
143 * +3 | mapped | in main()
148 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
153 ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
154 ksft_test_result_pass("mmap() 2*PAGE_SIZE bytes at base\n"); in main()
158 * base | free | new in main()
161 * +3 | mapped | in main()
166 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
171 ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
172 ksft_test_result_pass("mmap() PAGE_SIZE at base\n"); in main()
176 * base | free | in main()
179 * +3 | mapped | in main()
184 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
189 ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
190 ksft_test_result_pass("mmap() PAGE_SIZE at base+(4*PAGE_SIZE)\n"); in main()
198 ksft_test_result_pass("Base Address unmap() successful\n"); in main()