/kernel/linux/linux-5.10/mm/ |
D | debug_vm_pgtable.c | 63 pgprot_t prot = protection_map[idx]; in pte_basic_tests() local 64 pte_t pte = pfn_pte(pfn, prot); in pte_basic_tests() 92 pgprot_t prot) in pte_advanced_tests() argument 94 pte_t pte = pfn_pte(pfn, prot); in pte_advanced_tests() 103 pte = pfn_pte(pfn, prot); in pte_advanced_tests() 112 pte = pfn_pte(pfn, prot); in pte_advanced_tests() 125 pte = pfn_pte(pfn, prot); in pte_advanced_tests() 135 static void __init pte_savedwrite_tests(unsigned long pfn, pgprot_t prot) in pte_savedwrite_tests() argument 137 pte_t pte = pfn_pte(pfn, prot); in pte_savedwrite_tests() 150 pgprot_t prot = protection_map[idx]; in pmd_basic_tests() local [all …]
|
D | ioremap.c | 65 unsigned long end, phys_addr_t phys_addr, pgprot_t prot, in ioremap_pte_range() argument 77 set_pte_at(&init_mm, addr, pte, pfn_pte(pfn, prot)); in ioremap_pte_range() 86 pgprot_t prot) in ioremap_try_huge_pmd() argument 103 return pmd_set_huge(pmd, phys_addr, prot); in ioremap_try_huge_pmd() 107 unsigned long end, phys_addr_t phys_addr, pgprot_t prot, in ioremap_pmd_range() argument 119 if (ioremap_try_huge_pmd(pmd, addr, next, phys_addr, prot)) { in ioremap_pmd_range() 124 if (ioremap_pte_range(pmd, addr, next, phys_addr, prot, mask)) in ioremap_pmd_range() 132 pgprot_t prot) in ioremap_try_huge_pud() argument 149 return pud_set_huge(pud, phys_addr, prot); in ioremap_try_huge_pud() 153 unsigned long end, phys_addr_t phys_addr, pgprot_t prot, in ioremap_pud_range() argument [all …]
|
/kernel/linux/linux-5.10/arch/arm64/include/asm/ |
D | mman.h | 9 static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot, in arch_calc_vm_prot_bits() argument 14 if (system_supports_bti() && (prot & PROT_BTI)) in arch_calc_vm_prot_bits() 17 if (system_supports_mte() && (prot & PROT_MTE)) in arch_calc_vm_prot_bits() 22 #define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey) argument 40 pteval_t prot = 0; in arch_vm_get_page_prot() local 43 prot |= PTE_GP; in arch_vm_get_page_prot() 56 prot |= PTE_ATTRINDX(MT_NORMAL_TAGGED); in arch_vm_get_page_prot() 58 return __pgprot(prot); in arch_vm_get_page_prot() 62 static inline bool arch_validate_prot(unsigned long prot, in arch_validate_prot() argument 73 return (prot & ~supported) == 0; in arch_validate_prot() [all …]
|
D | pgalloc.h | 23 static inline void __pud_populate(pud_t *pudp, phys_addr_t pmdp, pudval_t prot) in __pud_populate() argument 25 set_pud(pudp, __pud(__phys_to_pud_val(pmdp) | prot)); in __pud_populate() 33 static inline void __pud_populate(pud_t *pudp, phys_addr_t pmdp, pudval_t prot) in __pud_populate() argument 41 static inline void __p4d_populate(p4d_t *p4dp, phys_addr_t pudp, p4dval_t prot) in __p4d_populate() argument 43 set_p4d(p4dp, __p4d(__phys_to_p4d_val(pudp) | prot)); in __p4d_populate() 51 static inline void __p4d_populate(p4d_t *p4dp, phys_addr_t pudp, p4dval_t prot) in __p4d_populate() argument 61 pmdval_t prot) in __pmd_populate() argument 63 set_pmd(pmdp, __pmd(__phys_to_pmd_val(ptep) | prot)); in __pmd_populate()
|
/kernel/linux/linux-5.10/net/ipv4/ |
D | protocol.c | 32 int inet_add_protocol(const struct net_protocol *prot, unsigned char protocol) in inet_add_protocol() argument 34 if (!prot->netns_ok) { in inet_add_protocol() 41 NULL, prot) ? 0 : -1; in inet_add_protocol() 45 int inet_add_offload(const struct net_offload *prot, unsigned char protocol) in inet_add_offload() argument 48 NULL, prot) ? 0 : -1; in inet_add_offload() 52 int inet_del_protocol(const struct net_protocol *prot, unsigned char protocol) in inet_del_protocol() argument 57 prot, NULL) == prot) ? 0 : -1; in inet_del_protocol() 65 int inet_del_offload(const struct net_offload *prot, unsigned char protocol) in inet_del_offload() argument 70 prot, NULL) == prot) ? 0 : -1; in inet_del_offload()
|
/kernel/liteos_a/testsuites/unittest/net/netdb/smoke/ |
D | net_netdb_test_001.cpp | 40 struct protoent *prot = getprotobyname("icmp"); in ProtoentTest() local 41 ICUNIT_ASSERT_NOT_EQUAL(prot, NULL, -1); in ProtoentTest() 42 ICUNIT_ASSERT_EQUAL(prot->p_proto, 1, prot->p_proto); in ProtoentTest() 44 prot = getprotobynumber(1); in ProtoentTest() 45 ICUNIT_ASSERT_NOT_EQUAL(prot, NULL, -1); in ProtoentTest() 46 ICUNIT_ASSERT_EQUAL(strcmp(prot->p_name, "icmp"), 0, -1); in ProtoentTest() 48 prot = getprotoent(); in ProtoentTest() 49 ICUNIT_ASSERT_NOT_EQUAL(prot, NULL, -1); in ProtoentTest()
|
/kernel/linux/linux-5.10/net/ipv6/ |
D | protocol.c | 28 int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char protocol) in inet6_add_protocol() argument 31 NULL, prot) ? 0 : -1; in inet6_add_protocol() 35 int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char protocol) in inet6_del_protocol() argument 40 prot, NULL) == prot) ? 0 : -1; in inet6_del_protocol() 52 int inet6_add_offload(const struct net_offload *prot, unsigned char protocol) in inet6_add_offload() argument 55 NULL, prot) ? 0 : -1; in inet6_add_offload() 59 int inet6_del_offload(const struct net_offload *prot, unsigned char protocol) in inet6_del_offload() argument 64 prot, NULL) == prot) ? 0 : -1; in inet6_del_offload()
|
/kernel/linux/linux-5.10/arch/powerpc/mm/ |
D | ioremap.c | 14 pgprot_t prot = pgprot_noncached(PAGE_KERNEL); in ioremap() local 18 return iowa_ioremap(addr, size, prot, caller); in ioremap() 19 return __ioremap_caller(addr, size, prot, caller); in ioremap() 25 pgprot_t prot = pgprot_noncached_wc(PAGE_KERNEL); in ioremap_wc() local 29 return iowa_ioremap(addr, size, prot, caller); in ioremap_wc() 30 return __ioremap_caller(addr, size, prot, caller); in ioremap_wc() 36 pgprot_t prot = pgprot_cached(PAGE_KERNEL); in ioremap_coherent() local 40 return iowa_ioremap(addr, size, prot, caller); in ioremap_coherent() 41 return __ioremap_caller(addr, size, prot, caller); in ioremap_coherent() 64 unsigned long size, pgprot_t prot) in early_ioremap_range() argument [all …]
|
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
D | mman.h | 16 static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot, in arch_calc_vm_prot_bits() argument 20 return (((prot & PROT_SAO) ? VM_SAO : 0) | pkey_to_vmflag_bits(pkey)); in arch_calc_vm_prot_bits() 22 return ((prot & PROT_SAO) ? VM_SAO : 0); in arch_calc_vm_prot_bits() 25 #define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey) argument 39 static inline bool arch_validate_prot(unsigned long prot, unsigned long addr) in arch_validate_prot() argument 41 if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM | PROT_SAO)) in arch_validate_prot() 43 if (prot & PROT_SAO) { in arch_validate_prot()
|
/kernel/linux/linux-5.10/arch/arm/include/asm/ |
D | pgtable.h | 113 #define __pgprot_modify(prot,mask,bits) \ argument 114 __pgprot((pgprot_val(prot) & ~(mask)) | (bits)) 116 #define pgprot_noncached(prot) \ argument 117 __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) 119 #define pgprot_writecombine(prot) \ argument 120 __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) 122 #define pgprot_stronglyordered(prot) \ argument 123 __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) 125 #define pgprot_device(prot) \ argument 126 __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_DEV_SHARED | L_PTE_SHARED | L_PTE_DIRTY | L_PTE_XN) [all …]
|
D | pgtable-nommu.h | 50 #define pgprot_noncached(prot) (prot) argument 51 #define pgprot_writecombine(prot) (prot) argument 52 #define pgprot_device(prot) (prot) argument
|
/kernel/linux/linux-5.10/arch/m68k/include/asm/ |
D | pgtable_mm.h | 159 # define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | CF_PAGE_NOCACHE)) argument 166 #define pgprot_noncached(prot) \ argument 168 ? (__pgprot(pgprot_val(prot) | __SUN3_PAGE_NOCACHE)) \ 170 ? (__pgprot(pgprot_val(prot) | _PAGE_NOCACHE030)) \ 172 ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S)) \ 173 : (prot))) 175 pgprot_t pgprot_dmacoherent(pgprot_t prot); 176 #define pgprot_dmacoherent(prot) pgprot_dmacoherent(prot) argument
|
/kernel/linux/linux-5.10/arch/x86/mm/ |
D | iomap_32.c | 21 int iomap_create_wc(resource_size_t base, unsigned long size, pgprot_t *prot) in iomap_create_wc() argument 33 *prot = __pgprot(__PAGE_KERNEL | cachemode2protval(pcm)); in iomap_create_wc() 35 pgprot_val(*prot) &= __default_kernel_pte_mask; in iomap_create_wc() 47 void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot) in kmap_atomic_prot_pfn() argument 58 set_pte(kmap_pte - idx, pfn_pte(pfn, prot)); in kmap_atomic_prot_pfn() 68 iomap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot) in iomap_atomic_prot_pfn() argument 77 if (!pat_enabled() && pgprot2cachemode(prot) != _PAGE_CACHE_MODE_WB) in iomap_atomic_prot_pfn() 78 prot = __pgprot(__PAGE_KERNEL | in iomap_atomic_prot_pfn() 82 pgprot_val(prot) &= __default_kernel_pte_mask; in iomap_atomic_prot_pfn() 84 return (void __force __iomem *) kmap_atomic_prot_pfn(pfn, prot); in iomap_atomic_prot_pfn()
|
/kernel/linux/linux-5.10/net/tls/ |
D | tls_main.c | 65 static void build_protos(struct proto prot[TLS_NUM_CONFIG][TLS_NUM_CONFIG], 678 struct proto *prot = READ_ONCE(sk->sk_prot); in tls_build_proto() local 682 unlikely(prot != smp_load_acquire(&saved_tcpv6_prot))) { in tls_build_proto() 684 if (likely(prot != saved_tcpv6_prot)) { in tls_build_proto() 685 build_protos(tls_prots[TLSV6], prot); in tls_build_proto() 688 smp_store_release(&saved_tcpv6_prot, prot); in tls_build_proto() 694 unlikely(prot != smp_load_acquire(&saved_tcpv4_prot))) { in tls_build_proto() 696 if (likely(prot != saved_tcpv4_prot)) { in tls_build_proto() 697 build_protos(tls_prots[TLSV4], prot); in tls_build_proto() 700 smp_store_release(&saved_tcpv4_prot, prot); in tls_build_proto() [all …]
|
D | tls_sw.c | 132 struct tls_prot_info *prot, struct sk_buff *skb) in padding_length() argument 138 if (prot->version == TLS_1_3_VERSION) { in padding_length() 144 if (back > rxm->full_len - prot->prepend_size) in padding_length() 168 struct tls_prot_info *prot; in tls_decrypt_done() local 177 prot = &tls_ctx->prot_info; in tls_decrypt_done() 190 pad = padding_length(ctx, prot, skb); in tls_decrypt_done() 196 rxm->offset += prot->prepend_size; in tls_decrypt_done() 197 rxm->full_len -= prot->overhead_size; in tls_decrypt_done() 237 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_do_decryption() local 242 aead_request_set_ad(aead_req, prot->aad_size); in tls_do_decryption() [all …]
|
/kernel/linux/linux-5.10/include/net/ |
D | protocol.h | 84 struct proto *prot; member 101 int inet_add_protocol(const struct net_protocol *prot, unsigned char num); 102 int inet_del_protocol(const struct net_protocol *prot, unsigned char num); 103 int inet_add_offload(const struct net_offload *prot, unsigned char num); 104 int inet_del_offload(const struct net_offload *prot, unsigned char num); 109 int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char num); 110 int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char num); 114 int inet6_add_offload(const struct net_offload *prot, unsigned char num); 115 int inet6_del_offload(const struct net_offload *prot, unsigned char num);
|
/kernel/linux/linux-5.10/arch/sparc/include/asm/ |
D | mman.h | 30 #define arch_calc_vm_prot_bits(prot, pkey) sparc_calc_vm_prot_bits(prot) argument 31 static inline unsigned long sparc_calc_vm_prot_bits(unsigned long prot) in sparc_calc_vm_prot_bits() argument 33 if (adi_capable() && (prot & PROT_ADI)) { in sparc_calc_vm_prot_bits() 55 #define arch_validate_prot(prot, addr) sparc_validate_prot(prot, addr) argument 56 static inline int sparc_validate_prot(unsigned long prot, unsigned long addr) in sparc_validate_prot() argument 58 if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM | PROT_ADI)) in sparc_validate_prot()
|
/kernel/linux/linux-5.10/arch/sh/include/asm/ |
D | pgtable.h | 139 static inline bool __pte_access_permitted(pte_t pte, u64 prot) in __pte_access_permitted() argument 141 return (pte_val(pte) & (prot | _PAGE_SPECIAL)) == prot; in __pte_access_permitted() 147 u64 prot = _PAGE_PRESENT; in pte_access_permitted() local 149 prot |= _PAGE_EXT(_PAGE_EXT_KERN_READ | _PAGE_EXT_USER_READ); in pte_access_permitted() 151 prot |= _PAGE_EXT(_PAGE_EXT_KERN_WRITE | _PAGE_EXT_USER_WRITE); in pte_access_permitted() 152 return __pte_access_permitted(pte, prot); in pte_access_permitted() 157 u64 prot = _PAGE_PRESENT | _PAGE_USER; in pte_access_permitted() local 160 prot |= _PAGE_RW; in pte_access_permitted() 161 return __pte_access_permitted(pte, prot); in pte_access_permitted()
|
/kernel/linux/linux-5.10/arch/arm/mm/ |
D | idmap.c | 25 unsigned long prot) in idmap_add_pmd() argument 50 *pmd = __pmd((addr & PMD_MASK) | prot); in idmap_add_pmd() 56 unsigned long prot) in idmap_add_pmd() argument 60 addr = (addr & PMD_MASK) | prot; in idmap_add_pmd() 69 unsigned long prot) in idmap_add_pud() argument 77 idmap_add_pmd(pud, addr, next, prot); in idmap_add_pud() 82 const char *text_end, unsigned long prot) in identity_mapping_add() argument 91 prot |= PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AF; in identity_mapping_add() 94 prot |= PMD_BIT4; in identity_mapping_add() 99 idmap_add_pud(pgd, addr, next, prot); in identity_mapping_add()
|
/kernel/linux/common_modules/xpm/core/ |
D | xpm_security_hooks.c | 245 static int xpm_check_signature(struct vm_area_struct *vma, unsigned long prot) in xpm_check_signature() argument 252 is_exec = !xpm_is_anonymous_vma(vma) && (prot & PROT_EXEC); in xpm_check_signature() 264 vma, prot); in xpm_check_signature() 272 is_exec ? TYPE_ELF : TYPE_ABC, vma, prot); in xpm_check_signature() 279 is_exec ? TYPE_ELF : TYPE_ABC, vma, prot); in xpm_check_signature() 286 is_exec ? TYPE_ELF : TYPE_ABC, vma, prot); in xpm_check_signature() 297 static int xpm_check_prot(struct vm_area_struct *vma, unsigned long prot) in xpm_check_prot() argument 306 if (is_anon || (prot & PROT_EXEC)) { in xpm_check_prot() 317 if (is_anon && (prot & PROT_EXEC)) { in xpm_check_prot() 320 report_mmap_event(ANON_EXEC, TYPE_ANON, vma, prot); in xpm_check_prot() [all …]
|
/kernel/linux/linux-5.10/include/xen/ |
D | xen-ops.h | 66 xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot, 71 pgprot_t prot, unsigned int domid, in xen_remap_pfn() argument 85 int *err_ptr, pgprot_t prot, 98 int *err_ptr, pgprot_t prot, in xen_xlate_remap_gfn_array() argument 135 int *err_ptr, pgprot_t prot, in xen_remap_domain_gfn_array() argument 141 prot, domid, pages); in xen_remap_domain_gfn_array() 148 return xen_remap_pfn(vma, addr, gfn, nr, err_ptr, prot, domid, in xen_remap_domain_gfn_array() 172 pgprot_t prot, unsigned int domid, in xen_remap_domain_mfn_array() argument 178 return xen_remap_pfn(vma, addr, mfn, nr, err_ptr, prot, domid, in xen_remap_domain_mfn_array() 197 pgprot_t prot, unsigned int domid, in xen_remap_domain_gfn_range() argument [all …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | mman.h | 86 #define arch_calc_vm_prot_bits(prot, pkey) 0 argument 104 static inline bool arch_validate_prot(unsigned long prot, unsigned long addr) in arch_validate_prot() argument 106 return (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM)) == 0; in arch_validate_prot() 139 calc_vm_prot_bits(unsigned long prot, unsigned long pkey) in calc_vm_prot_bits() argument 141 return _calc_vm_trans(prot, PROT_READ, VM_READ ) | in calc_vm_prot_bits() 142 _calc_vm_trans(prot, PROT_WRITE, VM_WRITE) | in calc_vm_prot_bits() 143 _calc_vm_trans(prot, PROT_EXEC, VM_EXEC) | in calc_vm_prot_bits() 144 arch_calc_vm_prot_bits(prot, pkey); in calc_vm_prot_bits()
|
D | io-mapping.h | 26 pgprot_t prot; member 46 pgprot_t prot; in io_mapping_init_wc() local 48 if (iomap_create_wc(base, size, &prot)) in io_mapping_init_wc() 53 iomap->prot = prot; in io_mapping_init_wc() 72 return iomap_atomic_prot_pfn(PHYS_PFN(phys_addr), mapping->prot); in io_mapping_map_atomic_wc() 117 iomap->prot = pgprot_noncached_wc(PAGE_KERNEL); in io_mapping_init_wc() 119 iomap->prot = pgprot_writecombine(PAGE_KERNEL); in io_mapping_init_wc() 121 iomap->prot = pgprot_noncached(PAGE_KERNEL); in io_mapping_init_wc()
|
/kernel/linux/linux-5.10/arch/mips/include/asm/ |
D | pgtable-32.h | 160 pfn_pte(unsigned long pfn, pgprot_t prot) in pfn_pte() argument 165 (pgprot_val(prot) & ~_PFNX_MASK); in pfn_pte() 167 (pgprot_val(prot) & ~_PFN_MASK); in pfn_pte() 176 static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot) in pfn_pte() argument 180 pte.pte_high = (pfn << 6) | (pgprot_val(prot) & 0x3f); in pfn_pte() 181 pte.pte_low = pgprot_val(prot); in pfn_pte() 191 #define pfn_pte(pfn, prot) __pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot)) argument 194 #define pfn_pte(pfn, prot) __pte(((unsigned long long)(pfn) << _PFN_SHIFT) | pgprot_val(prot)) argument 195 #define pfn_pmd(pfn, prot) __pmd(((unsigned long long)(pfn) << _PFN_SHIFT) | pgprot_val(prot)) argument
|
/kernel/linux/linux-5.10/fs/affs/ |
D | amigaffs.c | 391 affs_prot_to_mode(u32 prot) in affs_prot_to_mode() argument 395 if (!(prot & FIBF_NOWRITE)) in affs_prot_to_mode() 397 if (!(prot & FIBF_NOREAD)) in affs_prot_to_mode() 399 if (!(prot & FIBF_NOEXECUTE)) in affs_prot_to_mode() 401 if (prot & FIBF_GRP_WRITE) in affs_prot_to_mode() 403 if (prot & FIBF_GRP_READ) in affs_prot_to_mode() 405 if (prot & FIBF_GRP_EXECUTE) in affs_prot_to_mode() 407 if (prot & FIBF_OTR_WRITE) in affs_prot_to_mode() 409 if (prot & FIBF_OTR_READ) in affs_prot_to_mode() 411 if (prot & FIBF_OTR_EXECUTE) in affs_prot_to_mode() [all …]
|