| /linux/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/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/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/drivers/net/xen-netback/ |
| A D | hash.c | 70 vif->hash.cache.count--; in xenvif_add_hash() 108 vif->hash.cache.count--; in xenvif_flush_hash() 153 u32 hash = 0; in xenvif_set_skb_hash() local 256 vif->hash.alg = alg; in xenvif_set_hash_alg() 327 vif->hash.size = size; in xenvif_set_hash_mapping_size() 328 memset(vif->hash.mapping[vif->hash.mapping_sel], 0, in xenvif_set_hash_mapping_size() 337 u32 *mapping = vif->hash.mapping[!vif->hash.mapping_sel]; in xenvif_set_hash_mapping() 363 memcpy(mapping, vif->hash.mapping[vif->hash.mapping_sel], in xenvif_set_hash_mapping() 378 vif->hash.mapping_sel = !vif->hash.mapping_sel; in xenvif_set_hash_mapping() 400 if (vif->hash.flags) { in xenvif_dump_hash_info() [all …]
|
| /linux/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/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/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/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/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/arch/powerpc/crypto/ |
| A D | aes-gcm-p10-glue.c | 79 *(u64 *)&hash[0] = be64_to_cpup((__be64 *)&hash[0]); in set_subkey() 80 *(u64 *)&hash[8] = be64_to_cpup((__be64 *)&hash[8]); in set_subkey() 110 memcpy(hash->Htable, gctx->aad_hash, 16); in set_aad() 118 aes_p10_encrypt(hash->H, hash->H, rdkey); in gcmp10_init() 119 set_subkey(hash->H); in gcmp10_init() 120 gcm_init_htable(hash->Htable+32, hash->H); in gcmp10_init() 138 set_aad(gctx, hash, assoc, assoclen); in gcmp10_init() 150 memcpy(hash->Htable, gctx->ivtag, 16); in finish_tag() 163 gcm_ghash_p10(hash->Htable, hash->Htable+32, aclen, 16); in finish_tag() 166 hash->Htable[i] ^= gctx->ivtag[i]; in finish_tag() [all …]
|
| /linux/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/arch/loongarch/kernel/ |
| A D | relocate.c | 91 const typeof(hash) *ptr = PTR_ALIGN(area, sizeof(hash)); in rotate_xor() 94 if (size < diff + sizeof(hash)) in rotate_xor() 95 return hash; in rotate_xor() 99 for (i = 0; i < size / sizeof(hash); i++) { in rotate_xor() 101 hash = (hash << ((sizeof(hash) * 8) - 7)) | (hash >> 7); in rotate_xor() 102 hash ^= ptr[i]; in rotate_xor() 105 return hash; in rotate_xor() 110 unsigned long hash = 0; in get_random_boot() local 114 hash = rotate_xor(hash, linux_banner, strlen(linux_banner)); in get_random_boot() 117 hash = rotate_xor(hash, &entropy, sizeof(entropy)); in get_random_boot() [all …]
|
| /linux/security/apparmor/ |
| A D | crypto.c | 31 char *hash; 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/crypto/ |
| A D | hmac.c | 26 struct crypto_shash *hash; member 38 struct crypto_shash *hash = tctx->hash; in hmac_setkey() local 47 shash->tfm = hash; in hmac_setkey() 88 desc->tfm = tctx->hash; in hmac_import() 146 if (IS_ERR(hash)) in hmac_init_tfm() 147 return PTR_ERR(hash); in hmac_init_tfm() 152 tctx->hash = hash; in hmac_init_tfm() 162 hash = crypto_clone_shash(sctx->hash); in hmac_clone_tfm() 163 if (IS_ERR(hash)) in hmac_clone_tfm() 164 return PTR_ERR(hash); in hmac_clone_tfm() [all …]
|
| /linux/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/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/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/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/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() 286 hash = hash & ~1; in __ext4fs_dirhash() [all …]
|
| /linux/security/integrity/ima/ |
| A D | ima_crypto.c | 440 tfm = ima_alloc_atfm(hash->algo); in ima_calc_file_ahash() 452 struct ima_digest_data *hash, in ima_calc_file_hash_tfm() argument 507 tfm = ima_alloc_tfm(hash->algo); in ima_calc_file_shash() 544 hash->algo = ima_hash_algo; in ima_calc_file_hash() 568 rc = ima_calc_file_shash(f, hash); in ima_calc_file_hash() 704 tfm = ima_alloc_atfm(hash->algo); in calc_buffer_ahash() 716 struct ima_digest_data *hash, in calc_buffer_shash_tfm() argument 751 tfm = ima_alloc_tfm(hash->algo); in calc_buffer_shash() 762 struct ima_digest_data *hash) in ima_calc_buffer_hash() argument 847 if (crypto_id == hash->algo) { in ima_calc_boot_aggregate() [all …]
|
| /linux/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/scripts/basic/ |
| A D | fixdep.c | 113 unsigned int hash; member 123 unsigned int i, hash = 2166136261U; in strhash() local 126 hash = (hash ^ str[i]) * 0x01000193; in strhash() 127 return hash; in strhash() 141 aux->hash = hash; in add_to_hashtable() 142 aux->next = hashtab[hash % HASHSZ]; in add_to_hashtable() 143 hashtab[hash % HASHSZ] = aux; in add_to_hashtable() 153 unsigned int hash = strhash(name, len); in in_hashtable() local 155 for (aux = hashtab[hash % HASHSZ]; aux; aux = aux->next) { in in_hashtable() 156 if (aux->hash == hash && aux->len == len && in in_hashtable() [all …]
|
| /linux/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 …]
|