Lines Matching defs:prot
474 dprintf2("%s(0x%p, %zx, prot=%lx, pkey=%lx)\n", __func__,
481 dprintf2("SYS_mprotect_key prot: 0x%lx\n", orig_prot);
604 dprintf1("sys_mprotect_pkey(%p, %zx, prot=0x%lx, pkey=%ld) ret: %d\n",
622 dprintf1("mprotect_pkey(%p, %zx, prot=0x%lx, pkey=%ld) ret: %d\n",
634 int prot;
639 void record_pkey_malloc(void *ptr, long size, int prot)
671 rec->prot = prot;
704 void *malloc_pkey_with_mprotect(long size, int prot, u16 pkey)
710 dprintf1("doing %s(size=%ld, prot=0x%x, pkey=%d)\n", __func__,
711 size, prot, pkey);
713 ptr = mmap(NULL, size, prot, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
715 ret = mprotect_pkey((void *)ptr, PAGE_SIZE, prot, pkey);
717 record_pkey_malloc(ptr, size, prot);
724 void *malloc_pkey_anon_huge(long size, int prot, u16 pkey)
729 dprintf1("doing %s(size=%ld, prot=0x%x, pkey=%d)\n", __func__,
730 size, prot, pkey);
738 record_pkey_malloc(ptr, size, prot);
739 mprotect_pkey(ptr, size, prot, pkey);
805 void *malloc_pkey_hugetlb(long size, int prot, u16 pkey)
813 dprintf1("doing %s(%ld, %x, %x)\n", __func__, size, prot, pkey);
818 mprotect_pkey(ptr, size, prot, pkey);
820 record_pkey_malloc(ptr, size, prot);
826 void *malloc_pkey_mmap_dax(long size, int prot, u16 pkey)
831 dprintf1("doing %s(size=%ld, prot=0x%x, pkey=%d)\n", __func__,
832 size, prot, pkey);
837 ptr = mmap(0, size, prot, MAP_SHARED, fd, 0);
840 mprotect_pkey(ptr, size, prot, pkey);
842 record_pkey_malloc(ptr, size, prot);
849 void *(*pkey_malloc[])(long size, int prot, u16 pkey) = {
861 void *malloc_pkey(long size, int prot, u16 pkey)
872 ret = pkey_malloc[malloc_type](size, prot, pkey);
886 dprintf3("%s(%ld, prot=%x, pkey=%x) returning: %p\n", __func__,
887 size, prot, pkey, ret);
1288 int prot;
1300 prot = pkey_last_malloc_record->prot;
1303 mprotect_pkey(ptr, size, prot, 0);
1306 mprotect_pkey(ptr, size, prot, pkey);
1520 int prot = PROT_READ|PROT_WRITE;
1532 ptr = malloc_pkey(PAGE_SIZE, prot, pkey);