/Linux-v5.15/kernel/bpf/ |
D | bpf_local_storage.c | 18 select_bucket(struct bpf_local_storage_map *smap, in select_bucket() argument 21 return &smap->buckets[hash_ptr(selem, smap->bucket_log)]; in select_bucket() 24 static int mem_charge(struct bpf_local_storage_map *smap, void *owner, u32 size) in mem_charge() argument 26 struct bpf_map *map = &smap->map; in mem_charge() 31 return map->ops->map_local_storage_charge(smap, owner, size); in mem_charge() 34 static void mem_uncharge(struct bpf_local_storage_map *smap, void *owner, in mem_uncharge() argument 37 struct bpf_map *map = &smap->map; in mem_uncharge() 40 map->ops->map_local_storage_uncharge(smap, owner, size); in mem_uncharge() 44 owner_storage(struct bpf_local_storage_map *smap, void *owner) in owner_storage() argument 46 struct bpf_map *map = &smap->map; in owner_storage() [all …]
|
D | stackmap.c | 64 static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) in prealloc_elems_and_freelist() argument 67 (u64)smap->map.value_size; in prealloc_elems_and_freelist() 70 smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, in prealloc_elems_and_freelist() 71 smap->map.numa_node); in prealloc_elems_and_freelist() 72 if (!smap->elems) in prealloc_elems_and_freelist() 75 err = pcpu_freelist_init(&smap->freelist); in prealloc_elems_and_freelist() 79 pcpu_freelist_populate(&smap->freelist, smap->elems, elem_size, in prealloc_elems_and_freelist() 80 smap->map.max_entries); in prealloc_elems_and_freelist() 84 bpf_map_area_free(smap->elems); in prealloc_elems_and_freelist() 92 struct bpf_stack_map *smap; in stack_map_alloc() local [all …]
|
D | bpf_inode_storage.c | 40 struct bpf_local_storage_map *smap; in inode_storage_lookup() local 51 smap = (struct bpf_local_storage_map *)map; in inode_storage_lookup() 52 return bpf_local_storage_lookup(inode_storage, smap, cacheit_lockit); in inode_storage_lookup() 224 struct bpf_local_storage_map *smap; in inode_storage_map_alloc() local 226 smap = bpf_local_storage_map_alloc(attr); in inode_storage_map_alloc() 227 if (IS_ERR(smap)) in inode_storage_map_alloc() 228 return ERR_CAST(smap); in inode_storage_map_alloc() 230 smap->cache_idx = bpf_local_storage_cache_idx_get(&inode_cache); in inode_storage_map_alloc() 231 return &smap->map; in inode_storage_map_alloc() 236 struct bpf_local_storage_map *smap; in inode_storage_map_free() local [all …]
|
D | bpf_task_storage.c | 60 struct bpf_local_storage_map *smap; in task_storage_lookup() local 66 smap = (struct bpf_local_storage_map *)map; in task_storage_lookup() 67 return bpf_local_storage_lookup(task_storage, smap, cacheit_lockit); in task_storage_lookup() 285 struct bpf_local_storage_map *smap; in task_storage_map_alloc() local 287 smap = bpf_local_storage_map_alloc(attr); in task_storage_map_alloc() 288 if (IS_ERR(smap)) in task_storage_map_alloc() 289 return ERR_CAST(smap); in task_storage_map_alloc() 291 smap->cache_idx = bpf_local_storage_cache_idx_get(&task_cache); in task_storage_map_alloc() 292 return &smap->map; in task_storage_map_alloc() 297 struct bpf_local_storage_map *smap; in task_storage_map_free() local [all …]
|
/Linux-v5.15/tools/testing/selftests/vm/ |
D | map_populate.c | 33 static int parent_f(int sock, unsigned long *smap, int child) in parent_f() argument 40 *smap = 0x22222BAD; in parent_f() 41 ret = msync(smap, MMAP_SZ, MS_SYNC); in parent_f() 53 static int child_f(int sock, unsigned long *smap, int fd) in child_f() argument 57 smap = mmap(0, MMAP_SZ, PROT_READ | PROT_WRITE, in child_f() 59 BUG_ON(smap == MAP_FAILED, "mmap()"); in child_f() 61 BUG_ON(*smap != 0xdeadbabe, "MAP_PRIVATE | MAP_POPULATE changed file"); in child_f() 69 BUG_ON(*smap == 0x22222BAD, "MAP_POPULATE didn't COW private page"); in child_f() 70 BUG_ON(*smap != 0xdeadbabe, "mapping was corrupted"); in child_f() 79 unsigned long *smap; in main() local [all …]
|
/Linux-v5.15/net/core/ |
D | bpf_sk_storage.c | 23 struct bpf_local_storage_map *smap; in bpf_sk_storage_lookup() local 29 smap = (struct bpf_local_storage_map *)map; in bpf_sk_storage_lookup() 30 return bpf_local_storage_lookup(sk_storage, smap, cacheit_lockit); in bpf_sk_storage_lookup() 88 struct bpf_local_storage_map *smap; in bpf_sk_storage_map_free() local 90 smap = (struct bpf_local_storage_map *)map; in bpf_sk_storage_map_free() 91 bpf_local_storage_cache_idx_free(&sk_cache, smap->cache_idx); in bpf_sk_storage_map_free() 92 bpf_local_storage_map_free(smap, NULL); in bpf_sk_storage_map_free() 97 struct bpf_local_storage_map *smap; in bpf_sk_storage_map_alloc() local 99 smap = bpf_local_storage_map_alloc(attr); in bpf_sk_storage_map_alloc() 100 if (IS_ERR(smap)) in bpf_sk_storage_map_alloc() [all …]
|
/Linux-v5.15/include/linux/ |
D | bpf_local_storage.h | 63 struct bpf_local_storage_map __rcu *smap; member 126 struct bpf_local_storage_map *smap, 129 void bpf_local_storage_map_free(struct bpf_local_storage_map *smap, 146 void bpf_selem_link_map(struct bpf_local_storage_map *smap, 152 bpf_selem_alloc(struct bpf_local_storage_map *smap, void *owner, void *value, 157 struct bpf_local_storage_map *smap, 161 bpf_local_storage_update(void *owner, struct bpf_local_storage_map *smap,
|
D | bpf.h | 120 int (*map_local_storage_charge)(struct bpf_local_storage_map *smap, 122 void (*map_local_storage_uncharge)(struct bpf_local_storage_map *smap,
|
/Linux-v5.15/fs/xfs/ |
D | xfs_reflink.c | 991 struct xfs_bmbt_irec smap; in xfs_reflink_remap_extent() local 1043 &smap, &nimaps, 0); in xfs_reflink_remap_extent() 1046 ASSERT(nimaps == 1 && smap.br_startoff == dmap->br_startoff); in xfs_reflink_remap_extent() 1047 smap_real = xfs_bmap_is_real_extent(&smap); in xfs_reflink_remap_extent() 1053 dmap->br_blockcount = min(dmap->br_blockcount, smap.br_blockcount); in xfs_reflink_remap_extent() 1054 ASSERT(dmap->br_blockcount == smap.br_blockcount); in xfs_reflink_remap_extent() 1056 trace_xfs_reflink_remap_extent_dest(ip, &smap); in xfs_reflink_remap_extent() 1063 if (dmap->br_startblock == smap.br_startblock) { in xfs_reflink_remap_extent() 1064 if (dmap->br_state != smap.br_state) in xfs_reflink_remap_extent() 1071 smap.br_state == XFS_EXT_UNWRITTEN) in xfs_reflink_remap_extent() [all …]
|
/Linux-v5.15/fs/nilfs2/ |
D | page.c | 241 struct address_space *smap) in nilfs_copy_dirty_pages() argument 250 if (!pagevec_lookup_tag(&pvec, smap, &index, PAGECACHE_TAG_DIRTY)) in nilfs_copy_dirty_pages() 295 struct address_space *smap) in nilfs_copy_back_pages() argument 303 n = pagevec_lookup(&pvec, smap, &index); in nilfs_copy_back_pages() 324 xa_lock_irq(&smap->i_pages); in nilfs_copy_back_pages() 325 p = __xa_erase(&smap->i_pages, offset); in nilfs_copy_back_pages() 327 smap->nrpages--; in nilfs_copy_back_pages() 328 xa_unlock_irq(&smap->i_pages); in nilfs_copy_back_pages()
|
/Linux-v5.15/arch/x86/kvm/ |
D | mmu.h | 196 unsigned long smap = (cpl - 3) & (rflags & X86_EFLAGS_AC); in permission_fault() local 198 (smap >> (X86_EFLAGS_AC_BIT - PFERR_RSVD_BIT + 1)); in permission_fault()
|
/Linux-v5.15/fs/ocfs2/dlm/ |
D | dlmdomain.c | 49 static inline void byte_copymap(u8 dmap[], unsigned long smap[], in byte_copymap() argument 59 if (test_bit(nn, smap)) in byte_copymap()
|
/Linux-v5.15/tools/arch/x86/kcpuid/ |
D | cpuid.csv | 177 7, 0, EBX, 20, smap, Supervisor Mode Access Prevention
|
/Linux-v5.15/arch/x86/kvm/svm/ |
D | svm.c | 4405 bool smep, smap, is_user; in svm_can_emulate_instruction() local 4466 smap = cr4 & X86_CR4_SMAP; in svm_can_emulate_instruction() 4468 if (smap && (!smep || is_user)) { in svm_can_emulate_instruction()
|
/Linux-v5.15/Documentation/virt/kvm/ |
D | mmu.rst | 192 Contains the value of cr4.smap && !cr0.wp for which the page is valid
|
/Linux-v5.15/arch/x86/kvm/mmu/ |
D | mmu.c | 216 BUILD_MMU_ROLE_REGS_ACCESSOR(cr4, smap, X86_CR4_SMAP); 238 BUILD_MMU_ROLE_ACCESSOR(ext, cr4, smap);
|