Lines Matching defs:prot
466 dprintf2("%s(0x%p, %zx, prot=%lx, pkey=%lx)\n", __func__,
473 dprintf2("SYS_mprotect_key prot: 0x%lx\n", orig_prot);
596 dprintf1("sys_mprotect_pkey(%p, %zx, prot=0x%lx, pkey=%ld) ret: %d\n",
614 dprintf1("mprotect_pkey(%p, %zx, prot=0x%lx, pkey=%ld) ret: %d\n",
626 int prot;
631 void record_pkey_malloc(void *ptr, long size, int prot)
663 rec->prot = prot;
696 void *malloc_pkey_with_mprotect(long size, int prot, u16 pkey)
702 dprintf1("doing %s(size=%ld, prot=0x%x, pkey=%d)\n", __func__,
703 size, prot, pkey);
705 ptr = mmap(NULL, size, prot, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
707 ret = mprotect_pkey((void *)ptr, PAGE_SIZE, prot, pkey);
709 record_pkey_malloc(ptr, size, prot);
716 void *malloc_pkey_anon_huge(long size, int prot, u16 pkey)
721 dprintf1("doing %s(size=%ld, prot=0x%x, pkey=%d)\n", __func__,
722 size, prot, pkey);
730 record_pkey_malloc(ptr, size, prot);
731 mprotect_pkey(ptr, size, prot, pkey);
797 void *malloc_pkey_hugetlb(long size, int prot, u16 pkey)
805 dprintf1("doing %s(%ld, %x, %x)\n", __func__, size, prot, pkey);
810 mprotect_pkey(ptr, size, prot, pkey);
812 record_pkey_malloc(ptr, size, prot);
818 void *malloc_pkey_mmap_dax(long size, int prot, u16 pkey)
823 dprintf1("doing %s(size=%ld, prot=0x%x, pkey=%d)\n", __func__,
824 size, prot, pkey);
829 ptr = mmap(0, size, prot, MAP_SHARED, fd, 0);
832 mprotect_pkey(ptr, size, prot, pkey);
834 record_pkey_malloc(ptr, size, prot);
841 void *(*pkey_malloc[])(long size, int prot, u16 pkey) = {
853 void *malloc_pkey(long size, int prot, u16 pkey)
864 ret = pkey_malloc[malloc_type](size, prot, pkey);
878 dprintf3("%s(%ld, prot=%x, pkey=%x) returning: %p\n", __func__,
879 size, prot, pkey, ret);
1352 int prot;
1364 prot = pkey_last_malloc_record->prot;
1367 mprotect_pkey(ptr, size, prot, 0);
1370 mprotect_pkey(ptr, size, prot, pkey);
1711 int prot = PROT_READ|PROT_WRITE;
1723 ptr = malloc_pkey(PAGE_SIZE, prot, pkey);