| /freebsd/sys/vm/ |
| H A D | vm_mmap.c | 142 int prot; member 157 .mr_prot = uap->prot, in sys_mmap() 165 kern_mmap_maxprot(struct proc *p, int prot) in kern_mmap_maxprot() argument 172 prot != PROT_NONE) in kern_mmap_maxprot() 173 return (prot); in kern_mmap_maxprot() 187 int align, error, fd, flags, max_prot, prot; in kern_mmap() local 193 prot = mrp->mr_prot; in kern_mmap() 199 if ((prot & ~(_PROT_ALL | PROT_MAX(_PROT_ALL))) != 0) { in kern_mmap() 200 return (EXTERROR(EINVAL, "unknown PROT bits %#jx", prot)); in kern_mmap() 202 max_prot = PROT_MAX_EXTRACT(prot); in kern_mmap() [all …]
|
| /freebsd/sys/compat/linuxkpi/common/include/linux/ |
| H A D | page.h | 67 pgprot2cachemode(pgprot_t prot) in pgprot2cachemode() argument 69 if (prot & LINUXKPI_PROT_VALID) in pgprot2cachemode() 70 return (prot >> LINUXKPI_CACHE_MODE_SHIFT); in pgprot2cachemode() 83 #define pgprot_noncached(prot) \ argument 84 (((prot) & VM_PROT_ALL) | cachemode2protval(VM_MEMATTR_UNCACHEABLE)) 86 #define pgprot_writecombine(prot) \ argument 87 (((prot) & VM_PROT_ALL) | cachemode2protval(VM_MEMATTR_WRITE_COMBINING)) 89 #define pgprot_writecombine(prot) pgprot_noncached(prot) argument
|
| /freebsd/sys/compat/linux/ |
| H A D | linux_mmap.c | 59 static void linux_fixup_prot(struct thread *td, int *prot); 63 linux_mmap_check_fp(struct file *fp, int flags, int prot, int maxprot) in linux_mmap_check_fp() 74 linux_mmap_common(struct thread *td, uintptr_t addr, size_t len, int prot, in linux_mmap_common() 83 addr, len, prot, flags, fd, pos); in linux_mmap_common() 128 linux_fixup_prot(td, &prot); in linux_mmap_common() 203 .mr_prot = prot, in linux_mmap_common() 226 linux_mprotect_common(struct thread *td, uintptr_t addr, size_t len, int prot) in linux_mprotect_common() 231 prot &= ~LINUX_PROT_GROWSUP; in linux_mprotect_common() 232 if ((prot & ~(LINUX_PROT_GROWSDOWN | PROT_READ | PROT_WRITE | in linux_mprotect_common() 235 if ((prot in linux_mprotect_common() 62 linux_mmap_check_fp(struct file * fp,int flags,int prot,int maxprot) linux_mmap_check_fp() argument 73 linux_mmap_common(struct thread * td,uintptr_t addr,size_t len,int prot,int flags,int fd,off_t pos) linux_mmap_common() argument 225 linux_mprotect_common(struct thread * td,uintptr_t addr,size_t len,int prot) linux_mprotect_common() argument 413 linux_fixup_prot(struct thread * td,int * prot) linux_fixup_prot() argument [all...] |
| /freebsd/contrib/llvm-project/compiler-rt/lib/safestack/ |
| H A D | safestack_platform.h | 140 inline void *Mmap(void *addr, size_t length, int prot, int flags, int fd, in Mmap() argument 143 return __mmap(addr, length, prot, flags, fd, 0, offset); in Mmap() 145 return (void *)__syscall(SYS_mmap, addr, length, prot, flags, fd, offset); in Mmap() 147 return (void *)syscall(SYS_mmap, addr, length, prot, flags, fd, offset); in Mmap() 149 return _REAL64(mmap)(addr, length, prot, flags, fd, offset); in Mmap() 151 return (void *)syscall(SYS_mmap, addr, length, prot, flags, fd, offset); in Mmap() 155 return (void *)syscall(SYS_mmap2, addr, length, prot, flags, fd, in Mmap() 171 inline int Mprotect(void *addr, size_t length, int prot) { in Mprotect() argument 174 return _REAL(mprotect, addr, length, prot); in Mprotect() 176 return _REAL(mprotect)(addr, length, prot); in Mprotect() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/profile/ |
| H A D | WindowsMMap.c | 28 void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset) in mmap() argument 30 if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC)) in mmap() 39 if (prot & PROT_WRITE) { in mmap() 40 if (prot & PROT_EXEC) in mmap() 44 } else if (prot & PROT_EXEC) { in mmap() 45 if (prot & PROT_READ) in mmap() 47 else if (prot & PROT_EXEC) in mmap() 63 if (prot & PROT_WRITE) in mmap() 67 if (prot & PROT_EXEC) in mmap()
|
| /freebsd/sys/netipsec/ |
| H A D | ipsec_input.c | 351 int error, prot, af, sproto, isr_prot; in ipsec4_common_input_cb() local 383 prot = ip->ip_p; in ipsec4_common_input_cb() 390 (prot == IPPROTO_UDP || prot == IPPROTO_TCP)) in ipsec4_common_input_cb() 391 udp_ipsec_adjust_cksum(m, sav, prot, skip); in ipsec4_common_input_cb() 404 if (prot == IPPROTO_IPIP && in ipsec4_common_input_cb() 416 else if (prot == IPPROTO_IPV6 && in ipsec4_common_input_cb() 427 else if (prot != IPPROTO_IPV6 && saidx->mode == IPSEC_MODE_ANY) { in ipsec4_common_input_cb() 434 prot = IPPROTO_IPIP; in ipsec4_common_input_cb() 466 prot = IPPROTO_IPIP; in ipsec4_common_input_cb() 470 switch (prot) { in ipsec4_common_input_cb() [all …]
|
| /freebsd/tools/test/stress2/misc/ |
| H A D | mmap32.sh | 94 fuzz(int arg, void *addr, size_t len, int prot, int flags, int fd, 113 prot = makearg(); 125 prot = makearg(); 131 vp = mmap(addr, len, prot, flags, fd, offset); 151 int e, flags, fd, i, prot, status; 160 prot = PROT_READ | PROT_WRITE; 164 vp = mmap(addr, len, prot, flags, fd, offset); 175 fuzz(i + 1, addr, len, prot, flags, fd, 188 fuzz(34, addr, len, prot, flags, fd, offset);
|
| /freebsd/contrib/tcpdump/ |
| H A D | print-gre.c | 109 uint16_t flags, prot; in gre_print_0() local 123 prot = GET_BE_U_2(bp); in gre_print_0() 192 tok2str(ethertype_values,"unknown",prot), prot); in gre_print_0() 201 switch (prot) { in gre_print_0() 224 ND_PRINT("gre-proto-0x%x", prot); in gre_print_0() 236 uint16_t flags, prot; in gre_print_1() local 250 prot = GET_BE_U_2(bp); in gre_print_1() 290 tok2str(ethertype_values,"unknown",prot), prot); in gre_print_1() 302 switch (prot) { in gre_print_1() 307 ND_PRINT("gre-proto-0x%x", prot); in gre_print_1()
|
| H A D | print-geneve.c | 149 uint16_t prot; in geneve_print() local 179 prot = GET_BE_U_2(bp); in geneve_print() 200 tok2str(ethertype_values, "unknown", prot), prot); in geneve_print() 231 if (ethertype_print(ndo, prot, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL) == 0) { in geneve_print() 232 if (prot == ETHERTYPE_TEB) in geneve_print() 235 ND_PRINT("geneve-proto-0x%x", prot); in geneve_print()
|
| /freebsd/crypto/openssl/crypto/cmp/ |
| H A D | cmp_protect.c | 36 ASN1_BIT_STRING *prot = NULL; in ossl_cmp_calc_protection() local 95 if ((prot = ASN1_BIT_STRING_new()) == NULL) in ossl_cmp_calc_protection() 98 ossl_asn1_string_set_bits_left(prot, 0); in ossl_cmp_calc_protection() 99 if (!ASN1_BIT_STRING_set(prot, protection, sig_len)) { in ossl_cmp_calc_protection() 100 ASN1_BIT_STRING_free(prot); in ossl_cmp_calc_protection() 101 prot = NULL; in ossl_cmp_calc_protection() 107 return prot; in ossl_cmp_calc_protection() 121 if ((prot = ASN1_BIT_STRING_new()) == NULL) in ossl_cmp_calc_protection() 125 NULL, prot, &prot_part, NULL, ctx->pkey, md, in ossl_cmp_calc_protection() 127 return prot; in ossl_cmp_calc_protection() [all...] |
| /freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/ |
| H A D | dfsan_interceptors.cpp | 132 INTERCEPTOR(void *, mmap, void *addr, SIZE_T length, int prot, int flags, in INTERCEPTOR() argument 135 ReportMmapWriteExec(prot, flags); in INTERCEPTOR() 137 return (void *)internal_mmap(addr, length, prot, flags, fd, offset); in INTERCEPTOR() 138 COMMON_INTERCEPTOR_ENTER(mmap, addr, length, prot, flags, fd, offset); in INTERCEPTOR() 139 void *res = REAL(mmap)(addr, length, prot, flags, fd, offset); in INTERCEPTOR() 146 INTERCEPTOR(void *, mmap64, void *addr, SIZE_T length, int prot, int flags, in INTERCEPTOR() argument 149 ReportMmapWriteExec(prot, flags); in INTERCEPTOR() 151 return (void *)internal_mmap(addr, length, prot, flags, fd, offset); in INTERCEPTOR() 152 COMMON_INTERCEPTOR_ENTER(mmap64, addr, length, prot, flags, fd, offset); in INTERCEPTOR() 153 void *res = REAL(mmap64)(addr, length, prot, flags, fd, offset); in INTERCEPTOR()
|
| /freebsd/usr.bin/login/ |
| H A D | login_fbtab.c | 86 int prot; in login_fbtab() local 101 || sscanf(cp, "%o", &prot) == 0 in login_fbtab() 102 || prot == 0 in login_fbtab() 103 || (prot & 0777) != prot in login_fbtab() 110 login_protect(table, cp, prot, uid, gid); in login_fbtab()
|
| /freebsd/sys/dev/mlx4/mlx4_core/ |
| H A D | mlx4_mcg.c | 158 u32 prot; in new_steering_entry() local 206 prot = be32_to_cpu(mgm->members_count) >> 30; in new_steering_entry() 221 mgm->members_count = cpu_to_be32(members_count | (prot << 30)); in new_steering_entry() 428 u32 prot; in add_promisc_qp() local 474 prot = be32_to_cpu(mgm->members_count) >> 30; in add_promisc_qp() 505 (prot << 30)); in add_promisc_qp() 695 u8 *gid, enum mlx4_protocol prot, in find_entry() argument 704 u8 op_mod = (prot == MLX4_PROT_ETH) ? in find_entry() 741 be32_to_cpu(mgm->members_count) >> 30 == prot) in find_entry() 1105 int block_mcast_loopback, enum mlx4_protocol prot, in mlx4_qp_attach_common() argument [all …]
|
| /freebsd/lib/libkvm/ |
| H A D | kvm_minidump_i386.c | 252 vm_prot_t prot = VM_PROT_READ; in _i386_entry_to_prot() local 256 prot |= VM_PROT_WRITE; in _i386_entry_to_prot() 258 prot |= VM_PROT_EXECUTE; in _i386_entry_to_prot() 260 return prot; in _i386_entry_to_prot() 286 vm_prot_t *prot) in _i386_iterator_next() argument 297 *prot = 0; in _i386_iterator_next() 303 *prot = _i386_entry_to_prot(pte64); in _i386_iterator_next() 309 *prot = _i386_entry_to_prot(pte32); in _i386_iterator_next() 323 vm_prot_t prot; in _i386_minidump_walk_pages() local 326 while (_i386_iterator_next(&it, &pa, &va, &dva, &prot)) { in _i386_minidump_walk_pages() [all …]
|
| /freebsd/sys/dev/vmm/ |
| H A D | vmm_mem.h | 55 int prot; member 81 size_t len, int prot, int flags); 93 vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); 99 int prot, void **cookie); 101 int prot, void **cookie); 106 uint64_t gla, int prot, uint64_t *gpa, int *is_fault);
|
| H A D | vmm_mem.c | 260 size_t len, int prot, int flags) in vm_mmap_memseg() argument 269 if (prot == 0 || (prot & ~(VM_PROT_ALL)) != 0) in vm_mmap_memseg() 306 prot, prot, 0); in vm_mmap_memseg() 326 map->prot = prot; in vm_mmap_memseg() 356 vm_ooffset_t *segoff, size_t *len, int *prot, int *flags) in vm_mmap_getnext() argument 381 if (prot) in vm_mmap_getnext() 382 *prot = mmnext->prot; in vm_mmap_getnext()
|
| /freebsd/sys/crypto/ccp/ |
| H A D | ccp_hardware.h | 274 uint32_t prot:1; member 288 uint32_t prot:1; member 302 uint32_t prot:1; member 315 uint32_t prot:1; member 327 uint32_t prot:1; member 341 uint32_t prot:1; member 353 uint32_t prot:1; member 366 uint32_t prot:1; member 377 uint32_t prot:1; member
|
| /freebsd/sys/compat/linuxkpi/common/src/ |
| H A D | linux_page.c | 245 vm_prot_t prot; in linux_get_user_pages_internal() local 249 prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; in linux_get_user_pages_internal() 251 count = vm_fault_quick_hold_pages(map, start, len, prot, pages, nr_pages); in linux_get_user_pages_internal() 263 vm_prot_t prot; in __get_user_pages_fast() local 274 prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; in __get_user_pages_fast() 277 *mp = pmap_extract_and_hold(map->pmap, va, prot); in __get_user_pages_fast() 281 if ((prot & VM_PROT_WRITE) != 0 && in __get_user_pages_fast() 416 vmap(struct page **pages, unsigned int count, unsigned long flags, int prot) in vmap() argument 434 linuxkpi_vmap_pfn(unsigned long *pfns, unsigned int count, int prot) in linuxkpi_vmap_pfn() argument 450 attr = pgprot2cachemode(prot); in linuxkpi_vmap_pfn() [all …]
|
| /freebsd/sys/arm64/arm64/ |
| H A D | mem.c | 52 vm_prot_t prot; in memrw() local 84 prot = VM_PROT_READ; in memrw() 87 prot = VM_PROT_WRITE; in memrw() 91 if (!kernacc((void *)v, cnt, prot)) { in memrw() 130 int prot __unused, vm_memattr_t *memattr __unused) in memmmap()
|
| /freebsd/sys/riscv/riscv/ |
| H A D | mem.c | 53 vm_prot_t prot; in memrw() local 85 prot = VM_PROT_READ; in memrw() 88 prot = VM_PROT_WRITE; in memrw() 92 if (!kernacc((void *)v, cnt, prot)) { in memrw() 137 int prot __unused, vm_memattr_t *memattr __unused) in memmmap()
|
| /freebsd/contrib/netbsd-tests/lib/libc/sys/ |
| H A D | t_mprotect.c | 114 int prot[2] = { PROT_NONE, PROT_READ }; in ATF_TC_BODY() local 126 for (i = 0; i < __arraycount(prot); i++) { in ATF_TC_BODY() 128 map = mmap(NULL, page, prot[i], MAP_SHARED, fd, 0); in ATF_TC_BODY() 262 const int prot[4] = { PROT_NONE, PROT_READ, PROT_WRITE }; in ATF_TC_BODY() local 291 for (i = 0; i < __arraycount(prot); i++) { in ATF_TC_BODY() 293 map = mmap(NULL, page, prot[i], MAP_ANON, -1, 0); in ATF_TC_BODY() 298 rv = mprotect(map, 1, prot[i] | PROT_EXEC); in ATF_TC_BODY()
|
| /freebsd/crypto/krb5/src/lib/rpc/unit-test/ |
| H A D | server.c | 61 int c, prot; in main() local 74 prot = 0; in main() 78 prot = IPPROTO_TCP; in main() 81 prot = IPPROTO_UDP; in main() 88 if (prot == 0) in main() 108 if (prot == IPPROTO_TCP) in main() 120 prot == IPPROTO_TCP ? "tcp" : "udp"); in main()
|
| /freebsd/sys/dev/xdma/ |
| H A D | xdma_iommu.c | 78 vm_paddr_t pa, vm_size_t size, vm_prot_t prot) in xdma_iommu_enter() argument 90 pmap_enter(p, va, m, prot, prot | PMAP_ENTER_WIRED, 0); in xdma_iommu_enter() 101 vm_paddr_t pa, vm_size_t size, vm_prot_t prot) in xdma_iommu_add_entry() argument 119 xdma_iommu_enter(xio, addr, pa, size, prot); in xdma_iommu_add_entry()
|
| /freebsd/sys/sys/ |
| H A D | mman.h | 59 #define PROT_EXTRACT(prot) ((prot) & _PROT_ALL) argument 62 #define PROT_MAX(prot) ((prot) << _PROT_MAX_SHIFT) argument 63 #define PROT_MAX_EXTRACT(prot) (((prot) >> _PROT_MAX_SHIFT) & _PROT_ALL) argument
|
| /freebsd/sys/dev/rtwn/rtl8192c/ |
| H A D | r92c_tx.c | 308 enum ieee80211_protmode prot; in r92c_tx_get_protmode() local 310 prot = IEEE80211_PROT_NONE; in r92c_tx_get_protmode() 325 prot = ic->ic_htprotmode; in r92c_tx_get_protmode() 327 prot = ic->ic_protmode; in r92c_tx_get_protmode() 330 prot = ic->ic_htprotmode; in r92c_tx_get_protmode() 332 prot = ic->ic_protmode; in r92c_tx_get_protmode() 340 prot = IEEE80211_PROT_RTSCTS; in r92c_tx_get_protmode() 342 return (prot); in r92c_tx_get_protmode() 356 enum ieee80211_protmode prot; in r92c_fill_tx_desc() local 416 prot = r92c_tx_get_protmode(sc, vap, ni, m, ridx, in r92c_fill_tx_desc() [all …]
|