| /freebsd-14.2/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
|
| H A D | highmem.h | 77 kmap_atomic_prot(struct page *page, pgprot_t prot) in kmap_atomic_prot() argument 79 vm_memattr_t attr = pgprot2cachemode(prot); in kmap_atomic_prot() 104 kmap_local_page_prot(struct page *page, pgprot_t prot) in kmap_local_page_prot() argument 107 return (kmap_atomic_prot(page, prot)); in kmap_local_page_prot()
|
| H A D | mm.h | 202 vm_memattr_t prot) in io_remap_pfn_range() argument 204 vma->vm_page_prot = prot; in io_remap_pfn_range() 213 unsigned long pfn, pgprot_t prot); 217 unsigned long pfn, pgprot_t prot) in vmf_insert_pfn_prot() argument 222 ret = lkpi_vmf_insert_pfn_prot_locked(vma, addr, pfn, prot); in vmf_insert_pfn_prot() 243 pgprot_t prot); 247 unsigned long pfn, unsigned long size, pgprot_t prot) in remap_pfn_range() argument 249 return (lkpi_remap_pfn_range(vma, addr, pfn, size, prot)); in remap_pfn_range()
|
| /freebsd-14.2/sys/compat/linux/ |
| H A D | linux_mmap.c | 58 static void linux_fixup_prot(struct thread *td, int *prot); 82 addr, len, prot, flags, fd, pos); in linux_mmap_common() 127 linux_fixup_prot(td, &prot); in linux_mmap_common() 202 .mr_prot = prot, in linux_mmap_common() 230 prot &= ~LINUX_PROT_GROWSUP; in linux_mprotect_common() 234 if ((prot & LINUX_PROT_GROWSDOWN) != 0) { in linux_mprotect_common() 235 prot &= ~LINUX_PROT_GROWSDOWN; in linux_mprotect_common() 240 linux_fixup_prot(td, &prot); in linux_mprotect_common() 242 return (kern_mprotect(td, addr, len, prot, flags)); in linux_mprotect_common() 413 linux_fixup_prot(struct thread *td, int *prot) in linux_fixup_prot() argument [all …]
|
| /freebsd-14.2/sys/vm/ |
| H A D | vm_mmap.c | 164 int prot; member 195 return (prot); in kern_mmap_maxprot() 215 prot = mrp->mr_prot; in kern_mmap() 224 prot = PROT_EXTRACT(prot); in kern_mmap() 225 if (max_prot != 0 && (max_prot & prot) != prot) in kern_mmap() 438 int prot; member 465 int flags, prot; in kern_ommap() local 478 prot != 0) in kern_ommap() 495 .mr_prot = prot, in kern_ommap() 639 int prot; member [all …]
|
| /freebsd-14.2/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-14.2/tools/test/stress2/misc/ |
| H A D | mmap32.sh | 93 fuzz(int arg, void *addr, size_t len, int prot, int flags, int fd, 112 prot = makearg(); 124 prot = makearg(); 130 vp = mmap(addr, len, prot, flags, fd, offset); 152 int e, flags, fd, i, prot, status; 161 prot = PROT_READ | PROT_WRITE; 165 vp = mmap(addr, len, prot, flags, fd, offset); 176 fuzz(i + 1, addr, len, prot, flags, fd, 189 fuzz(34, addr, len, prot, flags, fd, offset);
|
| H A D | setsockopt2.sh | 102 int domain, fd, i, one, prot, success, typ; 120 prot = arc4random() % 10; 122 prot = 0; 123 if ((fd = socket(domain, typ, prot)) == -1) 132 fd = socket(domain, typ, prot); 149 fd = socket(domain, typ, prot);
|
| /freebsd-14.2/contrib/llvm-project/compiler-rt/lib/safestack/ |
| H A D | safestack_platform.h | 93 inline void *Mmap(void *addr, size_t length, int prot, int flags, int fd, in Mmap() argument 96 return __mmap(addr, length, prot, flags, fd, 0, offset); in Mmap() 98 return (void *)__syscall(SYS_mmap, addr, length, prot, flags, fd, offset); in Mmap() 100 return (void *)syscall(SYS_mmap, addr, length, prot, flags, fd, offset); in Mmap() 113 inline int Mprotect(void *addr, size_t length, int prot) { in Mprotect() argument 116 return _REAL(mprotect, addr, length, prot); in Mprotect() 118 return syscall(SYS_mprotect, addr, length, prot); in Mprotect()
|
| /freebsd-14.2/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-14.2/sys/netipsec/ |
| H A D | ipsec_input.c | 377 prot = ip->ip_p; in ipsec4_common_input_cb() 384 (prot == IPPROTO_UDP || prot == IPPROTO_TCP)) in ipsec4_common_input_cb() 428 prot = IPPROTO_IPIP; in ipsec4_common_input_cb() 460 prot = IPPROTO_IPIP; in ipsec4_common_input_cb() 464 switch (prot) { in ipsec4_common_input_cb() 477 __func__, prot)); in ipsec4_common_input_cb() 591 int prot, af, sproto; in ipsec6_common_input_cb() local 629 prot = nxt8; in ipsec6_common_input_cb() 686 if (prot == IPPROTO_IPIP) in ipsec6_common_input_cb() 699 switch (prot) { in ipsec6_common_input_cb() [all …]
|
| /freebsd-14.2/crypto/openssl/crypto/cmp/ |
| H A D | cmp_protect.c | 33 ASN1_BIT_STRING *prot = NULL; in ossl_cmp_calc_protection() local 92 if ((prot = ASN1_BIT_STRING_new()) == NULL) in ossl_cmp_calc_protection() 95 prot->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); in ossl_cmp_calc_protection() 96 prot->flags |= ASN1_STRING_FLAG_BITS_LEFT; in ossl_cmp_calc_protection() 97 if (!ASN1_BIT_STRING_set(prot, protection, sig_len)) { in ossl_cmp_calc_protection() 98 ASN1_BIT_STRING_free(prot); in ossl_cmp_calc_protection() 99 prot = NULL; in ossl_cmp_calc_protection() 105 return prot; in ossl_cmp_calc_protection() 121 if ((prot = ASN1_BIT_STRING_new()) == NULL) in ossl_cmp_calc_protection() 126 return prot; in ossl_cmp_calc_protection() [all …]
|
| /freebsd-14.2/usr.bin/login/ |
| H A D | login_fbtab.c | 87 int prot; in login_fbtab() local 102 || sscanf(cp, "%o", &prot) == 0 in login_fbtab() 103 || prot == 0 in login_fbtab() 104 || (prot & 0777) != prot in login_fbtab() 111 login_protect(table, cp, prot, uid, gid); in login_fbtab()
|
| /freebsd-14.2/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-14.2/sys/compat/linuxkpi/common/src/ |
| H A D | linux_page.c | 213 vm_prot_t prot; in linux_get_user_pages_internal() local 217 prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; in linux_get_user_pages_internal() 231 vm_prot_t prot; in __get_user_pages_fast() local 242 prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; in __get_user_pages_fast() 245 *mp = pmap_extract_and_hold(map->pmap, va, prot); in __get_user_pages_fast() 249 if ((prot & VM_PROT_WRITE) != 0 && in __get_user_pages_fast() 297 unsigned long pfn, pgprot_t prot) in lkpi_vmf_insert_pfn_prot_locked() argument 348 pmap_page_set_memattr(page, pgprot2cachemode(prot)); in lkpi_vmf_insert_pfn_prot_locked() 402 pgprot_t prot; in lkpi_io_mapping_map_user() local 405 prot = cachemode2protval(iomap->attr); in lkpi_io_mapping_map_user() [all …]
|
| /freebsd-14.2/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-14.2/sys/dev/mlx4/mlx4_core/ |
| H A D | mlx4_mcg.c | 158 u32 prot; in new_steering_entry() local 428 u32 prot; in add_promisc_qp() local 505 (prot << 30)); in add_promisc_qp() 1272 if (prot == MLX4_PROT_ETH) in mlx4_qp_detach_common() 1353 qpn |= (prot << 28); in mlx4_QP_ATTACH() 1388 switch (prot) { in mlx4_trans_to_dmfs_attach() 1414 if (prot == MLX4_PROT_ETH) in mlx4_multicast_attach() 1431 prot, reg_id); in mlx4_multicast_attach() 1532 if (prot == MLX4_PROT_ETH) in mlx4_unicast_attach() 1540 prot, MLX4_UC_STEER); in mlx4_unicast_attach() [all …]
|
| /freebsd-14.2/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-14.2/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-14.2/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-14.2/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-14.2/contrib/ntp/sntp/libopts/ |
| H A D | text_mmap.c | 168 validate_mmap(char const * fname, int prot, int flags, tmap_info_t * mapinfo) in validate_mmap() argument 175 mapinfo->txt_prot = prot; in validate_mmap() 192 FILE_WRITABLE(prot, flags) ? O_RDWR : O_RDONLY; in validate_mmap() 198 if (((flags & MAP_SHARED) == 0) && (prot & PROT_WRITE)) in validate_mmap() 310 text_mmap(char const * pzFile, int prot, int flags, tmap_info_t * mi) in text_mmap() argument 312 validate_mmap(pzFile, prot, flags, mi); in text_mmap()
|
| /freebsd-14.2/contrib/libfido2/src/ |
| H A D | pcsc.c | 107 prepare_io_request(DWORD prot, SCARD_IO_REQUEST *req) in prepare_io_request() argument 109 switch (prot) { in prepare_io_request() 120 (u_long)prot); in prepare_io_request() 132 DWORD prot = 0; in copy_info() local 140 SCARD_PROTOCOL_Tx, &h, &prot)) != SCARD_S_SUCCESS) { in copy_info() 144 if (prepare_io_request(prot, &req) < 0) { in copy_info() 247 DWORD prot = 0; in fido_pcsc_open() local 264 SCARD_PROTOCOL_Tx, &h, &prot)) != SCARD_S_SUCCESS) { in fido_pcsc_open() 268 if (prepare_io_request(prot, &req) < 0) { in fido_pcsc_open()
|
| /freebsd-14.2/sys/contrib/dev/mediatek/mt76/ |
| H A D | mt76x02_mac.c | 950 u32 prot[6]; in mt76x02_mac_set_tx_protection() local 957 prot[i] &= ~MT_PROT_CFG_CTRL; in mt76x02_mac_set_tx_protection() 959 prot[i] &= ~MT_PROT_CFG_RATE; in mt76x02_mac_set_tx_protection() 970 prot[0] |= MT_PROT_CTRL_RTS_CTS; in mt76x02_mac_set_tx_protection() 975 prot[2] |= MT_PROT_RATE_CCK_11; in mt76x02_mac_set_tx_protection() 976 prot[3] |= MT_PROT_RATE_CCK_11; in mt76x02_mac_set_tx_protection() 977 prot[4] |= MT_PROT_RATE_CCK_11; in mt76x02_mac_set_tx_protection() 978 prot[5] |= MT_PROT_RATE_CCK_11; in mt76x02_mac_set_tx_protection() 987 prot[2] |= MT_PROT_RATE_OFDM_24; in mt76x02_mac_set_tx_protection() 989 prot[4] |= MT_PROT_RATE_OFDM_24; in mt76x02_mac_set_tx_protection() [all …]
|