Searched refs:mremap (Results 1 - 25 of 33) sorted by relevance

12

/linux-master/tools/testing/selftests/mm/
H A Dmremap_dontunmap.c4 * Tests for mremap w/ MREMAP_DONTUNMAP.
53 mremap(source_mapping, num_pages * page_size, num_pages * page_size,
108 mremap(source_mapping, num_pages * page_size, num_pages * page_size,
110 BUG_ON(dest_mapping == MAP_FAILED, "mremap");
150 mremap(source_mapping, num_pages * page_size, num_pages * page_size,
159 BUG_ON(dest_mapping == MAP_FAILED, "mremap");
202 mremap(source_mapping, num_pages * page_size, num_pages * page_size,
205 BUG_ON(remapped_mapping == MAP_FAILED, "mremap");
207 "mremap should have placed the remapped mapping at dest_mapping");
209 // The dest mapping will have been unmap by mremap s
[all...]
H A Dhugepage-mremap.c3 * hugepage-mremap:
6 * mremap system call. The path to a file in a hugetlbfs filesystem must
12 * path in the mremap code use 1GB (1024) or more.
148 void *addr = mremap(haddr, length, length,
151 ksft_exit_fail_msg("mremap: %s\n", strerror(errno));
160 addr = mremap(addr, length, length, 0);
162 ksft_exit_fail_msg("mremap: Expected failure, but call succeeded\n");
H A Dmremap_test.c239 char *test_name = "mremap expand merge";
252 remap = mremap(start, page_size, 2 * page_size, 0);
254 ksft_print_msg("mremap failed: %s\n", strerror(errno));
279 char *test_name = "mremap expand merge offset";
293 remap = mremap(start + page_size, page_size, 2 * page_size, 0);
295 ksft_print_msg("mremap failed: %s\n", strerror(errno));
312 * Verify that an mremap within a range does not cause corruption
321 * adjacent mremap.
327 char *test_name = "mremap mremap mov
[all...]
H A Dmseal_test.c1165 ret2 = mremap(ptr, size, 2 * page_size, 0, 0);
1197 ret2 = mremap(ptr, 2 * page_size, 4 * page_size, 0, 0);
1230 ret2 = mremap(ptr, size, size, MREMAP_MAYMOVE | MREMAP_FIXED, newPtr);
1348 /* mremap to move and shrink to fixed address */
1349 ret2 = mremap(ptr, size, 2 * page_size, MREMAP_MAYMOVE | MREMAP_FIXED,
1379 /* mremap to move and expand to fixed address */
1380 ret2 = mremap(ptr, page_size, size, MREMAP_MAYMOVE | MREMAP_FIXED,
1410 /* mremap to move to fixed address */
1411 ret2 = mremap(ptr, size, size, MREMAP_MAYMOVE | MREMAP_FIXED, newAddr);
1440 ret2 = mremap(pt
[all...]
H A Drun_vmtests.sh40 - mremap
41 tests for mremap(2)
265 CATEGORY="hugetlb" run_test ./hugepage-mremap
328 CATEGORY="mremap" run_test ./mremap_test
363 CATEGORY="mremap" run_test ./mremap_dontunmap
H A Dsplit_huge_page_test.c158 pte_mapped = mremap(one_page, pagesize, pagesize, MREMAP_MAYMOVE);
162 pte_mapped2 = mremap(one_page + pmd_pagesize * i + pagesize * i,
167 ksft_exit_fail_msg("mremap failed: %s\n", strerror(errno));
170 /* smap does not show THPs after mremap, use kpageflags instead */
178 ksft_exit_fail_msg("Some THPs are missing during mremap\n");
184 /* smap does not show THPs after mremap, use kpageflags instead */
H A DMakefile46 TEST_GEN_FILES += hugepage-mremap
H A Dkhugepaged.c851 p = mremap(BASE_ADDR - i * page_size,
857 perror("mremap+unmap");
861 p = mremap(BASE_ADDR + 2 * hpage_pmd_size,
867 perror("mremap+alloc");
/linux-master/arch/parisc/kernel/
H A Dvdso.c39 .mremap = vdso_mremap,
45 .mremap = vdso_mremap,
/linux-master/tools/testing/selftests/x86/
H A Dtest_mremap_vdso.c3 * 32-bit test to check vDSO mremap.
42 new_addr = mremap(vdso_addr, size, size,
98 ksft_test_result_fail("mremap() of the vDSO does not work on this kernel!\n");
H A Dsysret_rip.c134 ret = mremap((void *)current_test_page_addr, 4096, 4096,
138 err(1, "mremap to %p", new_address);
146 errx(1, "mremap malfunctioned: asked for %p but got %p\n",
177 /* One extra test to check that we didn't screw up the mremap logic. */
/linux-master/arch/arm64/kernel/
H A Dvdso.c261 .mremap = aarch32_sigpage_mremap,
269 .mremap = vdso_mremap,
423 .mremap = vdso_mremap,
/linux-master/tools/testing/selftests/powerpc/signal/
H A Dsigreturn_vdso.c96 assert(mremap((void *)low, size, size, MREMAP_MAYMOVE|MREMAP_FIXED, p) != MAP_FAILED);
/linux-master/arch/riscv/kernel/
H A Dvdso.c165 .mremap = vdso_mremap,
185 .mremap = vdso_mremap,
/linux-master/arch/s390/kernel/
H A Dvdso.c125 .mremap = vdso_mremap,
130 .mremap = vdso_mremap,
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dringbuf.c113 tmp_ptr = mremap(mmap_ptr, page_size, 2 * page_size, MREMAP_MAYMOVE);
142 ASSERT_ERR_PTR(mremap(mmap_ptr, 0, 4 * page_size, MREMAP_MAYMOVE), "ro_remap");
152 ASSERT_ERR_PTR(mremap(mmap_ptr, 0, 3 * page_size, MREMAP_MAYMOVE), "ro_remap");
H A Duser_ringbuf.c115 ASSERT_ERR_PTR(mremap(mmap_ptr, 0, 4 * page_size, MREMAP_MAYMOVE), "wr_prod_pos");
/linux-master/arch/loongarch/kernel/
H A Dvdso.c91 .mremap = vdso_mremap,
/linux-master/arch/powerpc/kernel/
H A Dvdso.c94 .mremap = vdso32_mremap,
99 .mremap = vdso64_mremap,
/linux-master/arch/arm/kernel/
H A Dvdso.c56 .mremap = vdso_mremap,
H A Dprocess.c392 .mremap = sigpage_mremap,
/linux-master/mm/
H A DMakefile37 mlock.o mmap.o mmu_gather.o mprotect.o mremap.o \
H A Dmremap.c3 * mm/mremap.c
160 * - During mremap(), new_vma is often known to be placed after vma
249 * However, there's a case during execve() where we use mremap
565 * Only realign if the mremap copying hits a PMD boundary.
719 } else if (vma->vm_ops && vma->vm_ops->mremap) {
720 err = vma->vm_ops->mremap(new_vma);
828 * is contrary to the basic idea of mremap which creates new mappings
833 pr_warn_once("%s (%d): attempted to duplicate a private mapping with mremap. This is not supported.\n", current->comm, current->pid);
993 SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
/linux-master/arch/x86/entry/vdso/
H A Dvma.c211 .mremap = vdso_mremap,
/linux-master/kernel/
H A Dsys_ni.c164 COND_SYSCALL(mremap); variable

Completed in 192 milliseconds

12