/linux-6.3-rc2/samples/bpf/ |
A D | hash_func01.h | 25 hash = (hash << 16) ^ tmp; in SuperFastHash() 27 hash += hash >> 11; in SuperFastHash() 33 hash ^= hash << 16; in SuperFastHash() 35 hash += hash >> 11; in SuperFastHash() 43 hash += hash >> 1; in SuperFastHash() 47 hash ^= hash << 3; in SuperFastHash() 48 hash += hash >> 5; in SuperFastHash() 49 hash ^= hash << 4; in SuperFastHash() 50 hash += hash >> 17; in SuperFastHash() 51 hash ^= hash << 25; in SuperFastHash() [all …]
|
/linux-6.3-rc2/net/batman-adv/ |
A D | hash.c | 34 kfree(hash->table); in batadv_hash_destroy() 35 kfree(hash); in batadv_hash_destroy() 48 hash = kmalloc(sizeof(*hash), GFP_ATOMIC); in batadv_hash_new() 49 if (!hash) in batadv_hash_new() 52 hash->table = kmalloc_array(size, sizeof(*hash->table), GFP_ATOMIC); in batadv_hash_new() 53 if (!hash->table) in batadv_hash_new() 56 hash->list_locks = kmalloc_array(size, sizeof(*hash->list_locks), in batadv_hash_new() 61 hash->size = size; in batadv_hash_new() 63 return hash; in batadv_hash_new() 66 kfree(hash->table); in batadv_hash_new() [all …]
|
A D | hash.h | 62 void batadv_hash_destroy(struct batadv_hashtable *hash); 87 if (!hash) in batadv_hash_add() 90 index = choose(data, hash->size); in batadv_hash_add() 91 head = &hash->table[index]; in batadv_hash_add() 92 list_lock = &hash->list_locks[index]; in batadv_hash_add() 106 atomic_inc(&hash->generation); in batadv_hash_add() 139 index = choose(data, hash->size); in batadv_hash_remove() 140 head = &hash->table[index]; in batadv_hash_remove() 142 spin_lock_bh(&hash->list_locks[index]); in batadv_hash_remove() 149 atomic_inc(&hash->generation); in batadv_hash_remove() [all …]
|
/linux-6.3-rc2/net/ceph/crush/ |
A D | hash.c | 33 crush_hashmix(b, x, hash); in crush_hash32_rjenkins1() 34 crush_hashmix(y, a, hash); in crush_hash32_rjenkins1() 35 return hash; in crush_hash32_rjenkins1() 43 crush_hashmix(a, b, hash); in crush_hash32_rjenkins1_2() 44 crush_hashmix(x, a, hash); in crush_hash32_rjenkins1_2() 45 crush_hashmix(b, y, hash); in crush_hash32_rjenkins1_2() 46 return hash; in crush_hash32_rjenkins1_2() 54 crush_hashmix(a, b, hash); in crush_hash32_rjenkins1_3() 59 return hash; in crush_hash32_rjenkins1_3() 73 return hash; in crush_hash32_rjenkins1_4() [all …]
|
/linux-6.3-rc2/drivers/net/xen-netback/ |
A D | hash.c | 70 vif->hash.cache.count--; in xenvif_add_hash() 109 vif->hash.cache.count--; in xenvif_flush_hash() 154 u32 hash = 0; in xenvif_set_skb_hash() local 257 vif->hash.alg = alg; in xenvif_set_hash_alg() 328 vif->hash.size = size; in xenvif_set_hash_mapping_size() 329 memset(vif->hash.mapping[vif->hash.mapping_sel], 0, in xenvif_set_hash_mapping_size() 338 u32 *mapping = vif->hash.mapping[!vif->hash.mapping_sel]; in xenvif_set_hash_mapping() 364 memcpy(mapping, vif->hash.mapping[vif->hash.mapping_sel], in xenvif_set_hash_mapping() 379 vif->hash.mapping_sel = !vif->hash.mapping_sel; in xenvif_set_hash_mapping() 401 if (vif->hash.flags) { in xenvif_dump_hash_info() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/freescale/fman/ |
A D | fman_mac.h | 201 if (hash) { in free_hash_table() 202 if (hash->lsts) { in free_hash_table() 214 kfree(hash->lsts); in free_hash_table() 217 kfree(hash); in free_hash_table() 227 hash = kmalloc(sizeof(*hash), GFP_KERNEL); in alloc_hash_table() 228 if (!hash) in alloc_hash_table() 231 hash->size = size; in alloc_hash_table() 233 hash->lsts = kmalloc_array(hash->size, sizeof(struct list_head), in alloc_hash_table() 235 if (!hash->lsts) { in alloc_hash_table() 236 kfree(hash); in alloc_hash_table() [all …]
|
/linux-6.3-rc2/scripts/ |
A D | get_dvb_firmware | 287 verify($fwfile, $hash); 300 verify($outfile,$hash); 347 verify($fwfile, $hash); 360 verify($fwfile, $hash); 490 verify($fwfile, $hash); 503 verify($fwfile, $hash); 516 verify($outfile,$hash); 641 verify($zipfile, $hash); 659 verify($zipfile, $hash); 674 verify($fwfile, $hash); [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | rhashtable.h | 129 unsigned int hash; in rht_key_get_hash() local 152 return hash; in rht_key_get_hash() 236 u32 hash) in lockdep_rht_bucket_is_held() argument 382 unsigned int hash) in rht_ptr() argument 434 rht_for_each_from(pos, rht_ptr(rht_bucket(tbl, hash), tbl, hash), \ 435 tbl, hash) 461 rht_ptr(rht_bucket(tbl, hash), tbl, hash), \ 477 for (pos = rht_ptr(rht_bucket(tbl, hash), tbl, hash), \ 741 rht_for_each_from(head, rht_ptr(bkt, tbl, hash), tbl, hash) { in __rhashtable_insert_fast() 1014 rht_for_each_from(he, rht_ptr(bkt, tbl, hash), tbl, hash) { in __rhashtable_remove_fast_one() [all …]
|
/linux-6.3-rc2/lib/ |
A D | hashtable_test.c | 37 DEFINE_HASHTABLE(hash, 1); in hashtable_test_hash_empty() 43 hash_add(hash, &a.node, a.key); in hashtable_test_hash_empty() 52 DEFINE_HASHTABLE(hash, 4); in hashtable_test_hash_hashed() 56 hash_add(hash, &a.node, a.key); in hashtable_test_hash_hashed() 59 hash_add(hash, &b.node, b.key); in hashtable_test_hash_hashed() 69 DEFINE_HASHTABLE(hash, 3); in hashtable_test_hash_add() 98 DEFINE_HASHTABLE(hash, 6); in hashtable_test_hash_del() 128 DEFINE_HASHTABLE(hash, 3); in hashtable_test_hash_for_each() 158 DEFINE_HASHTABLE(hash, 3); in hashtable_test_hash_for_each_safe() 191 DEFINE_HASHTABLE(hash, 5); in hashtable_test_hash_for_each_possible() [all …]
|
A D | oid_registry.c | 31 unsigned i, j, k, hash; in look_up_OID() local 35 hash = datasize - 1; in look_up_OID() 38 hash += octets[i] * 33; in look_up_OID() 39 hash = (hash >> 24) ^ (hash >> 16) ^ (hash >> 8) ^ hash; in look_up_OID() 40 hash &= 0xff; in look_up_OID() 51 xhash = oid_search_table[j].hash; in look_up_OID() 52 if (xhash > hash) { in look_up_OID() 56 if (xhash < hash) { in look_up_OID()
|
/linux-6.3-rc2/drivers/gpu/drm/vboxvideo/ |
A D | vbox_hgsmi.c | 12 static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) in hgsmi_hash_process() argument 15 hash += *data++; in hgsmi_hash_process() 16 hash += (hash << 10); in hgsmi_hash_process() 17 hash ^= (hash >> 6); in hgsmi_hash_process() 20 return hash; in hgsmi_hash_process() 23 static u32 hgsmi_hash_end(u32 hash) in hgsmi_hash_end() argument 25 hash += (hash << 3); in hgsmi_hash_end() 26 hash ^= (hash >> 11); in hgsmi_hash_end() 27 hash += (hash << 15); in hgsmi_hash_end() 29 return hash; in hgsmi_hash_end()
|
/linux-6.3-rc2/arch/loongarch/kernel/ |
A D | relocate.c | 74 const typeof(hash) *ptr = PTR_ALIGN(area, sizeof(hash)); in rotate_xor() 77 if (size < diff + sizeof(hash)) in rotate_xor() 78 return hash; in rotate_xor() 82 for (i = 0; i < size / sizeof(hash); i++) { in rotate_xor() 84 hash = (hash << ((sizeof(hash) * 8) - 7)) | (hash >> 7); in rotate_xor() 85 hash ^= ptr[i]; in rotate_xor() 88 return hash; in rotate_xor() 93 unsigned long hash = 0; in get_random_boot() local 97 hash = rotate_xor(hash, linux_banner, strlen(linux_banner)); in get_random_boot() 100 hash = rotate_xor(hash, &entropy, sizeof(entropy)); in get_random_boot() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/vmwgfx/ |
A D | vmwgfx_cmdbuf_res.c | 47 struct vmwgfx_hash_item hash; member 86 struct vmwgfx_hash_item *hash; in vmw_cmdbuf_res_lookup() local 90 if (hash->key == key) in vmw_cmdbuf_res_lookup() 91 return hlist_entry(hash, struct vmw_cmdbuf_res, hash)->res; in vmw_cmdbuf_res_lookup() 109 hash_del_rcu(&entry->hash.head); in vmw_cmdbuf_res_free() 171 entry->hash.key); in vmw_cmdbuf_res_revert() 208 hash_add_rcu(man->resources, &cres->hash.head, cres->hash.key); in vmw_cmdbuf_res_add() 241 struct vmwgfx_hash_item *hash; in vmw_cmdbuf_res_remove() local 245 if (hash->key == key) { in vmw_cmdbuf_res_remove() 246 entry = hlist_entry(hash, struct vmw_cmdbuf_res, hash); in vmw_cmdbuf_res_remove() [all …]
|
/linux-6.3-rc2/security/apparmor/ |
A D | crypto.c | 31 char *hash = NULL; in aa_calc_hash() local 37 hash = kzalloc(apparmor_hash_size, GFP_KERNEL); in aa_calc_hash() 38 if (!hash) in aa_calc_hash() 49 error = crypto_shash_final(desc, hash); in aa_calc_hash() 53 return hash; in aa_calc_hash() 56 kfree(hash); in aa_calc_hash() 74 profile->hash = kzalloc(apparmor_hash_size, GFP_KERNEL); in aa_calc_profile_hash() 75 if (!profile->hash) in aa_calc_profile_hash() 89 error = crypto_shash_final(desc, profile->hash); in aa_calc_profile_hash() 96 kfree(profile->hash); in aa_calc_profile_hash() [all …]
|
/linux-6.3-rc2/arch/mips/kernel/ |
A D | relocate.c | 197 const typeof(hash) *ptr = PTR_ALIGN(area, sizeof(hash)); in rotate_xor() 201 if (unlikely(size < diff + sizeof(hash))) in rotate_xor() 202 return hash; in rotate_xor() 208 hash = (hash << ((sizeof(hash) * 8) - 7)) | (hash >> 7); in rotate_xor() 209 hash ^= ptr[i]; in rotate_xor() 212 return hash; in rotate_xor() 218 unsigned long hash = 0; in get_random_boot() local 221 hash = rotate_xor(hash, linux_banner, strlen(linux_banner)); in get_random_boot() 224 hash = rotate_xor(hash, &entropy, sizeof(entropy)); in get_random_boot() 237 hash = rotate_xor(hash, prop, sizeof(*prop)); in get_random_boot() [all …]
|
/linux-6.3-rc2/arch/mips/cavium-octeon/crypto/ |
A D | octeon-md5.c | 39 u64 *hash = (u64 *)ctx->hash; in octeon_md5_store_hash() local 41 write_octeon_64bit_hash_dword(hash[0], 0); in octeon_md5_store_hash() 42 write_octeon_64bit_hash_dword(hash[1], 1); in octeon_md5_store_hash() 47 u64 *hash = (u64 *)ctx->hash; in octeon_md5_read_hash() local 49 hash[0] = read_octeon_64bit_hash_dword(0); in octeon_md5_read_hash() 71 mctx->hash[0] = MD5_H0; in octeon_md5_init() 72 mctx->hash[1] = MD5_H1; in octeon_md5_init() 73 mctx->hash[2] = MD5_H2; in octeon_md5_init() 74 mctx->hash[3] = MD5_H3; in octeon_md5_init() 75 cpu_to_le32_array(mctx->hash, 4); in octeon_md5_init() [all …]
|
/linux-6.3-rc2/fs/ntfs3/ |
A D | lznt.c | 52 const u8 **hash; in longest_match_std() local 58 hash = &(ctx->hash[hash_index].p1); in longest_match_std() 60 if (hash[0] >= ctx->unc && hash[0] < src && hash[0][0] == src[0] && in longest_match_std() 61 hash[0][1] == src[1] && hash[0][2] == src[2]) { in longest_match_std() 68 if (hash[1] >= ctx->unc && hash[1] < src && hash[1][0] == src[0] && in longest_match_std() 69 hash[1][1] == src[1] && hash[1][2] == src[2]) { in longest_match_std() 78 ctx->best_match = hash[1]; in longest_match_std() 81 ctx->best_match = hash[0]; in longest_match_std() 84 hash[1] = hash[0]; in longest_match_std() 85 hash[0] = src; in longest_match_std() [all …]
|
/linux-6.3-rc2/security/integrity/ima/ |
A D | ima_api.c | 206 struct ima_max_digest_data *hash) in ima_get_verity_digest() argument 226 hash->hdr.algo = verity_alg; in ima_get_verity_digest() 248 struct ima_max_digest_data hash; in ima_collect_measurement() local 272 hash.hdr.algo = algo; in ima_collect_measurement() 276 memset(&hash.digest, 0, sizeof(hash.digest)); in ima_collect_measurement() 299 length = sizeof(hash.hdr) + hash.hdr.length; in ima_collect_measurement() 307 memcpy(iint->ima_hash, &hash, length); in ima_collect_measurement() 388 char *hash; in ima_audit_measurement() local 396 if (!hash) in ima_audit_measurement() 401 hash[i * 2] = '\0'; in ima_audit_measurement() [all …]
|
A D | ima_crypto.c | 445 tfm = ima_alloc_atfm(hash->algo); in ima_calc_file_ahash() 457 struct ima_digest_data *hash, in ima_calc_file_hash_tfm() argument 512 tfm = ima_alloc_tfm(hash->algo); in ima_calc_file_shash() 549 hash->algo = ima_hash_algo; in ima_calc_file_hash() 573 rc = ima_calc_file_shash(f, hash); in ima_calc_file_hash() 709 tfm = ima_alloc_atfm(hash->algo); in calc_buffer_ahash() 721 struct ima_digest_data *hash, in calc_buffer_shash_tfm() argument 756 tfm = ima_alloc_tfm(hash->algo); in calc_buffer_shash() 767 struct ima_digest_data *hash) in ima_calc_buffer_hash() argument 852 if (crypto_id == hash->algo) { in ima_calc_boot_aggregate() [all …]
|
/linux-6.3-rc2/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
A D | flowring.c | 62 struct brcmf_flowring_hash *hash; in brcmf_flowring_lookup() local 85 hash = flow->hash; in brcmf_flowring_lookup() 97 return hash[hash_idx].flowid; in brcmf_flowring_lookup() 107 struct brcmf_flowring_hash *hash; in brcmf_flowring_create() local 130 hash = flow->hash; in brcmf_flowring_create() 153 hash[hash_idx].fifo = fifo; in brcmf_flowring_create() 154 hash[hash_idx].ifidx = ifidx; in brcmf_flowring_create() 155 hash[hash_idx].flowid = i; in brcmf_flowring_create() 455 hash = flow->hash; in brcmf_flowring_delete_peer() 458 (hash[i].ifidx == ifidx)) { in brcmf_flowring_delete_peer() [all …]
|
/linux-6.3-rc2/fs/ext4/ |
A D | hash.c | 111 if (hash & 0x80000000) in dx_hack_hash_unsigned() 112 hash -= 0x7fffffff; in dx_hack_hash_unsigned() 114 hash0 = hash; in dx_hack_hash_unsigned() 128 hash -= 0x7fffffff; in dx_hack_hash_signed() 130 hash0 = hash; in dx_hack_hash_signed() 203 __u32 hash; in __ext4fs_dirhash() local 246 hash = buf[1]; in __ext4fs_dirhash() 259 hash = buf[0]; in __ext4fs_dirhash() 279 hinfo->hash = 0; in __ext4fs_dirhash() 282 hash = hash & ~1; in __ext4fs_dirhash() [all …]
|
/linux-6.3-rc2/Documentation/devicetree/bindings/crypto/ |
A D | img-hash.txt | 1 Imagination Technologies hardware hash accelerator 3 The hash accelerator provides hardware hashing acceleration for 8 - compatible : "img,hash-accelerator" 14 - clock-names : "sys" Used to clock the hash block registers 15 "hash" Used to clock data through the accelerator 19 hash: hash@18149600 { 20 compatible = "img,hash-accelerator"; 26 clock-names = "sys", "hash";
|
/linux-6.3-rc2/scripts/basic/ |
A D | fixdep.c | 111 unsigned int hash; member 121 unsigned int i, hash = 2166136261U; in strhash() local 124 hash = (hash ^ str[i]) * 0x01000193; in strhash() 125 return hash; in strhash() 142 aux->hash = hash; in add_to_hashtable() 143 aux->next = hashtab[hash % HASHSZ]; in add_to_hashtable() 144 hashtab[hash % HASHSZ] = aux; in add_to_hashtable() 154 unsigned int hash = strhash(name, len); in in_hashtable() local 156 for (aux = hashtab[hash % HASHSZ]; aux; aux = aux->next) { in in_hashtable() 157 if (aux->hash == hash && aux->len == len && in in_hashtable() [all …]
|
/linux-6.3-rc2/fs/ubifs/ |
A D | key.h | 42 static inline uint32_t key_mask_hash(uint32_t hash) in key_mask_hash() argument 44 hash &= UBIFS_S_KEY_HASH_MASK; in key_mask_hash() 45 if (unlikely(hash <= 2)) in key_mask_hash() 46 hash += 3; in key_mask_hash() 47 return hash; in key_mask_hash() 152 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init() 167 uint32_t hash) in dent_key_init_hash() argument 169 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init_hash() 188 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init_flash() 190 key->j32[1] = cpu_to_le32(hash | in dent_key_init_flash() [all …]
|
/linux-6.3-rc2/arch/powerpc/crypto/ |
A D | md5-glue.c | 34 sctx->hash[0] = MD5_H0; in ppc_md5_init() 35 sctx->hash[1] = MD5_H1; in ppc_md5_init() 36 sctx->hash[2] = MD5_H2; in ppc_md5_init() 37 sctx->hash[3] = MD5_H3; in ppc_md5_init() 66 ppc_md5_transform(sctx->hash, src, len >> 6); in ppc_md5_update() 89 ppc_md5_transform(sctx->hash, src, 1); in ppc_md5_final() 96 ppc_md5_transform(sctx->hash, src, 1); in ppc_md5_final() 98 dst[0] = cpu_to_le32(sctx->hash[0]); in ppc_md5_final() 99 dst[1] = cpu_to_le32(sctx->hash[1]); in ppc_md5_final() 100 dst[2] = cpu_to_le32(sctx->hash[2]); in ppc_md5_final() [all …]
|