Lines Matching full:smem

1407 typedef void (*non_anon_test_fn)(char *mem, const char *smem, size_t size);
1409 static void test_cow(char *mem, const char *smem, size_t size) in test_cow() argument
1414 memcpy(old, smem, size); in test_cow()
1420 ksft_test_result(!memcmp(smem, old, size), in test_cow()
1425 static void test_ro_pin(char *mem, const char *smem, size_t size) in test_ro_pin() argument
1430 static void test_ro_fast_pin(char *mem, const char *smem, size_t size) in test_ro_fast_pin() argument
1437 char *mem, *smem, tmp; in run_with_zeropage() local
1448 smem = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); in run_with_zeropage()
1455 tmp = *mem + *smem; in run_with_zeropage()
1458 fn(mem, smem, pagesize); in run_with_zeropage()
1461 if (smem != MAP_FAILED) in run_with_zeropage()
1462 munmap(smem, pagesize); in run_with_zeropage()
1467 char *mem, *smem, *mmap_mem, *mmap_smem, tmp; in run_with_huge_zeropage() local
1495 smem = (char *)(((uintptr_t)mmap_smem + pmdsize) & ~(pmdsize - 1)); in run_with_huge_zeropage()
1498 ret |= madvise(smem, pmdsize, MADV_HUGEPAGE); in run_with_huge_zeropage()
1509 tmp = *mem + *smem; in run_with_huge_zeropage()
1512 !pagemap_is_populated(pagemap_fd, smem + pagesize)) { in run_with_huge_zeropage()
1517 fn(mem, smem, pmdsize); in run_with_huge_zeropage()
1526 char *mem, *smem, tmp; in run_with_memfd() local
1549 smem = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, fd, 0); in run_with_memfd()
1556 tmp = *mem + *smem; in run_with_memfd()
1559 fn(mem, smem, pagesize); in run_with_memfd()
1562 if (smem != MAP_FAILED) in run_with_memfd()
1563 munmap(smem, pagesize); in run_with_memfd()
1570 char *mem, *smem, tmp; in run_with_tmpfile() local
1600 smem = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, fd, 0); in run_with_tmpfile()
1607 tmp = *mem + *smem; in run_with_tmpfile()
1610 fn(mem, smem, pagesize); in run_with_tmpfile()
1613 if (smem != MAP_FAILED) in run_with_tmpfile()
1614 munmap(smem, pagesize); in run_with_tmpfile()
1623 char *mem, *smem, tmp; in run_with_memfd_hugetlb() local
1650 smem = mmap(NULL, hugetlbsize, PROT_READ, MAP_SHARED, fd, 0); in run_with_memfd_hugetlb()
1657 tmp = *mem + *smem; in run_with_memfd_hugetlb()
1660 fn(mem, smem, hugetlbsize); in run_with_memfd_hugetlb()
1664 munmap(smem, hugetlbsize); in run_with_memfd_hugetlb()