Lines Matching refs:prot
635 int prot; member
640 void record_pkey_malloc(void *ptr, long size, int prot) in record_pkey_malloc() argument
672 rec->prot = prot; in record_pkey_malloc()
705 void *malloc_pkey_with_mprotect(long size, int prot, u16 pkey) in malloc_pkey_with_mprotect() argument
712 size, prot, pkey); in malloc_pkey_with_mprotect()
714 ptr = mmap(NULL, size, prot, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); in malloc_pkey_with_mprotect()
716 ret = mprotect_pkey((void *)ptr, PAGE_SIZE, prot, pkey); in malloc_pkey_with_mprotect()
718 record_pkey_malloc(ptr, size, prot); in malloc_pkey_with_mprotect()
725 void *malloc_pkey_anon_huge(long size, int prot, u16 pkey) in malloc_pkey_anon_huge() argument
731 size, prot, pkey); in malloc_pkey_anon_huge()
739 record_pkey_malloc(ptr, size, prot); in malloc_pkey_anon_huge()
740 mprotect_pkey(ptr, size, prot, pkey); in malloc_pkey_anon_huge()
806 void *malloc_pkey_hugetlb(long size, int prot, u16 pkey) in malloc_pkey_hugetlb() argument
814 dprintf1("doing %s(%ld, %x, %x)\n", __func__, size, prot, pkey); in malloc_pkey_hugetlb()
819 mprotect_pkey(ptr, size, prot, pkey); in malloc_pkey_hugetlb()
821 record_pkey_malloc(ptr, size, prot); in malloc_pkey_hugetlb()
827 void *malloc_pkey_mmap_dax(long size, int prot, u16 pkey) in malloc_pkey_mmap_dax() argument
833 size, prot, pkey); in malloc_pkey_mmap_dax()
838 ptr = mmap(0, size, prot, MAP_SHARED, fd, 0); in malloc_pkey_mmap_dax()
841 mprotect_pkey(ptr, size, prot, pkey); in malloc_pkey_mmap_dax()
843 record_pkey_malloc(ptr, size, prot); in malloc_pkey_mmap_dax()
850 void *(*pkey_malloc[])(long size, int prot, u16 pkey) = {
862 void *malloc_pkey(long size, int prot, u16 pkey) in malloc_pkey() argument
873 ret = pkey_malloc[malloc_type](size, prot, pkey); in malloc_pkey()
888 size, prot, pkey, ret); in malloc_pkey()
1361 int prot; in test_mprotect_with_pkey_0() local
1373 prot = pkey_last_malloc_record->prot; in test_mprotect_with_pkey_0()
1376 mprotect_pkey(ptr, size, prot, 0); in test_mprotect_with_pkey_0()
1379 mprotect_pkey(ptr, size, prot, pkey); in test_mprotect_with_pkey_0()
1720 int prot = PROT_READ|PROT_WRITE; in run_tests_once() local
1732 ptr = malloc_pkey(PAGE_SIZE, prot, pkey); in run_tests_once()