/Linux-v4.19/samples/bpf/ |
D | hash_func01.h | 11 __u32 hash = initval; in SuperFastHash() local 23 hash += get16bits (data); in SuperFastHash() 24 tmp = (get16bits (data+2) << 11) ^ hash; in SuperFastHash() 25 hash = (hash << 16) ^ tmp; in SuperFastHash() 27 hash += hash >> 11; in SuperFastHash() 32 case 3: hash += get16bits (data); in SuperFastHash() 33 hash ^= hash << 16; in SuperFastHash() 34 hash ^= ((signed char)data[sizeof (__u16)]) << 18; in SuperFastHash() 35 hash += hash >> 11; in SuperFastHash() 37 case 2: hash += get16bits (data); in SuperFastHash() [all …]
|
/Linux-v4.19/net/batman-adv/ |
D | hash.c | 27 static void batadv_hash_init(struct batadv_hashtable *hash) in batadv_hash_init() argument 31 for (i = 0; i < hash->size; i++) { in batadv_hash_init() 32 INIT_HLIST_HEAD(&hash->table[i]); in batadv_hash_init() 33 spin_lock_init(&hash->list_locks[i]); in batadv_hash_init() 41 void batadv_hash_destroy(struct batadv_hashtable *hash) in batadv_hash_destroy() argument 43 kfree(hash->list_locks); in batadv_hash_destroy() 44 kfree(hash->table); in batadv_hash_destroy() 45 kfree(hash); in batadv_hash_destroy() 56 struct batadv_hashtable *hash; in batadv_hash_new() local 58 hash = kmalloc(sizeof(*hash), GFP_ATOMIC); in batadv_hash_new() [all …]
|
D | hash.h | 67 void batadv_hash_set_lock_class(struct batadv_hashtable *hash, 71 void batadv_hash_destroy(struct batadv_hashtable *hash); 84 static inline int batadv_hash_add(struct batadv_hashtable *hash, in batadv_hash_add() argument 96 if (!hash) in batadv_hash_add() 99 index = choose(data, hash->size); in batadv_hash_add() 100 head = &hash->table[index]; in batadv_hash_add() 101 list_lock = &hash->list_locks[index]; in batadv_hash_add() 137 static inline void *batadv_hash_remove(struct batadv_hashtable *hash, in batadv_hash_remove() argument 147 index = choose(data, hash->size); in batadv_hash_remove() 148 head = &hash->table[index]; in batadv_hash_remove() [all …]
|
/Linux-v4.19/net/ceph/crush/ |
D | hash.c | 29 __u32 hash = crush_hash_seed ^ a; in crush_hash32_rjenkins1() local 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() 40 __u32 hash = crush_hash_seed ^ a ^ b; in crush_hash32_rjenkins1_2() local 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() 51 __u32 hash = crush_hash_seed ^ a ^ b ^ c; in crush_hash32_rjenkins1_3() local [all …]
|
/Linux-v4.19/include/linux/ |
D | rhashtable.h | 93 unsigned int hash) in rht_bucket_index() argument 95 return hash & (tbl->size - 1); in rht_bucket_index() 102 unsigned int hash; in rht_key_get_hash() local 106 hash = ht->p.hashfn(key, ht->key_len, hash_rnd); in rht_key_get_hash() 111 hash = params.hashfn(key, key_len, hash_rnd); in rht_key_get_hash() 113 hash = jhash(key, key_len, hash_rnd); in rht_key_get_hash() 115 hash = jhash2(key, key_len / sizeof(u32), hash_rnd); in rht_key_get_hash() 120 hash = params.hashfn(key, key_len, hash_rnd); in rht_key_get_hash() 122 hash = jhash(key, key_len, hash_rnd); in rht_key_get_hash() 125 return hash; in rht_key_get_hash() [all …]
|
/Linux-v4.19/drivers/net/xen-netback/ |
D | hash.c | 50 spin_lock_irqsave(&vif->hash.cache.lock, flags); in xenvif_add_hash() 54 list_for_each_entry_rcu(entry, &vif->hash.cache.list, link) { in xenvif_add_hash() 64 new->seq = atomic_inc_return(&vif->hash.cache.seq); in xenvif_add_hash() 65 list_add_rcu(&new->link, &vif->hash.cache.list); in xenvif_add_hash() 67 if (++vif->hash.cache.count > xenvif_hash_cache_size) { in xenvif_add_hash() 69 vif->hash.cache.count--; in xenvif_add_hash() 74 spin_unlock_irqrestore(&vif->hash.cache.lock, flags); in xenvif_add_hash() 85 val = xen_netif_toeplitz_hash(vif->hash.key, in xenvif_new_hash() 86 sizeof(vif->hash.key), in xenvif_new_hash() 103 spin_lock_irqsave(&vif->hash.cache.lock, flags); in xenvif_flush_hash() [all …]
|
/Linux-v4.19/scripts/ |
D | get_dvb_firmware | 65 my $hash = "53970ec17a538945a6d8cb608a7b3899"; 73 verify("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $hash); 83 my $hash = "237938d53a7f834c05c42b894ca68ac3"; 93 verify("$tmpdir/ZEnglish/sc_main.mc", $hash); 102 my $hash = "2105fd5bf37842fbcdfa4bfd58f3594a"; 111 verify("$tmpdir/fwtmp", $hash); 120 my $hash = "6a7e1e2f2644b162ff0502367553c72d"; 129 verify("$tmpdir/fwtmp", $hash); 138 my $hash = "1ea24dee4eea8fe971686981f34fd2e0"; 147 verify("$tmpdir/fwtmp", $hash); [all …]
|
/Linux-v4.19/drivers/net/ethernet/freescale/fman/ |
D | fman_mac.h | 224 static inline void free_hash_table(struct eth_hash_t *hash) in free_hash_table() argument 229 if (hash) { in free_hash_table() 230 if (hash->lsts) { in free_hash_table() 231 for (i = 0; i < hash->size; i++) { in free_hash_table() 233 dequeue_addr_from_hash_entry(&hash->lsts[i]); in free_hash_table() 237 dequeue_addr_from_hash_entry(&hash-> in free_hash_table() 242 kfree(hash->lsts); in free_hash_table() 245 kfree(hash); in free_hash_table() 252 struct eth_hash_t *hash; in alloc_hash_table() local 255 hash = kmalloc_array(size, sizeof(struct eth_hash_t *), GFP_KERNEL); in alloc_hash_table() [all …]
|
/Linux-v4.19/drivers/staging/vboxvideo/ |
D | vbox_hgsmi.c | 32 static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) in hgsmi_hash_process() argument 35 hash += *data++; in hgsmi_hash_process() 36 hash += (hash << 10); in hgsmi_hash_process() 37 hash ^= (hash >> 6); in hgsmi_hash_process() 40 return hash; in hgsmi_hash_process() 43 static u32 hgsmi_hash_end(u32 hash) in hgsmi_hash_end() argument 45 hash += (hash << 3); in hgsmi_hash_end() 46 hash ^= (hash >> 11); in hgsmi_hash_end() 47 hash += (hash << 15); in hgsmi_hash_end() 49 return hash; in hgsmi_hash_end()
|
/Linux-v4.19/security/integrity/ima/ |
D | ima_crypto.c | 208 struct ima_digest_data *hash, in ima_calc_file_hash_atfm() argument 219 hash->length = crypto_ahash_digestsize(tfm); in ima_calc_file_hash_atfm() 309 ahash_request_set_crypt(req, NULL, hash->digest, 0); in ima_calc_file_hash_atfm() 317 static int ima_calc_file_ahash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_ahash() argument 322 tfm = ima_alloc_atfm(hash->algo); in ima_calc_file_ahash() 326 rc = ima_calc_file_hash_atfm(file, hash, tfm); in ima_calc_file_ahash() 334 struct ima_digest_data *hash, in ima_calc_file_hash_tfm() argument 345 hash->length = crypto_shash_digestsize(tfm); in ima_calc_file_hash_tfm() 386 rc = crypto_shash_final(shash, hash->digest); in ima_calc_file_hash_tfm() 390 static int ima_calc_file_shash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_shash() argument [all …]
|
D | ima_api.c | 100 } hash; in ima_store_template() local 106 hash.hdr.algo = HASH_ALGO_SHA1; in ima_store_template() 109 num_fields, &hash.hdr); in ima_store_template() 116 memcpy(entry->digest, hash.hdr.digest, hash.hdr.length); in ima_store_template() 212 } hash; in ima_collect_measurement() local 223 hash.hdr.algo = algo; in ima_collect_measurement() 226 memset(&hash.digest, 0, sizeof(hash.digest)); in ima_collect_measurement() 229 result = ima_calc_buffer_hash(buf, size, &hash.hdr); in ima_collect_measurement() 231 result = ima_calc_file_hash(file, &hash.hdr); in ima_collect_measurement() 236 length = sizeof(hash.hdr) + hash.hdr.length; in ima_collect_measurement() [all …]
|
/Linux-v4.19/security/apparmor/ |
D | crypto.c | 35 char *hash = NULL; in aa_calc_hash() local 41 hash = kzalloc(apparmor_hash_size, GFP_KERNEL); in aa_calc_hash() 42 if (!hash) in aa_calc_hash() 54 error = crypto_shash_final(desc, hash); in aa_calc_hash() 58 return hash; in aa_calc_hash() 61 kfree(hash); in aa_calc_hash() 79 profile->hash = kzalloc(apparmor_hash_size, GFP_KERNEL); in aa_calc_profile_hash() 80 if (!profile->hash) in aa_calc_profile_hash() 95 error = crypto_shash_final(desc, profile->hash); in aa_calc_profile_hash() 102 kfree(profile->hash); in aa_calc_profile_hash() [all …]
|
/Linux-v4.19/scripts/basic/ |
D | fixdep.c | 152 unsigned int hash; member 162 unsigned int i, hash = 2166136261U; in strhash() local 165 hash = (hash ^ str[i]) * 0x01000193; in strhash() 166 return hash; in strhash() 172 static int is_defined_config(const char *name, int len, unsigned int hash) in is_defined_config() argument 176 for (aux = hashtab[hash % HASHSZ]; aux; aux = aux->next) { in is_defined_config() 177 if (aux->hash == hash && aux->len == len && in is_defined_config() 187 static void define_config(const char *name, int len, unsigned int hash) in define_config() argument 197 aux->hash = hash; in define_config() 198 aux->next = hashtab[hash % HASHSZ]; in define_config() [all …]
|
/Linux-v4.19/lib/ |
D | oid_registry.c | 34 unsigned i, j, k, hash; in look_up_OID() local 38 hash = datasize - 1; in look_up_OID() 41 hash += octets[i] * 33; in look_up_OID() 42 hash = (hash >> 24) ^ (hash >> 16) ^ (hash >> 8) ^ hash; in look_up_OID() 43 hash &= 0xff; in look_up_OID() 54 xhash = oid_search_table[j].hash; in look_up_OID() 55 if (xhash > hash) { in look_up_OID() 59 if (xhash < hash) { in look_up_OID()
|
/Linux-v4.19/fs/ext4/ |
D | hash.c | 104 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_unsigned() local 108 hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373)); in dx_hack_hash_unsigned() 110 if (hash & 0x80000000) in dx_hack_hash_unsigned() 111 hash -= 0x7fffffff; in dx_hack_hash_unsigned() 113 hash0 = hash; in dx_hack_hash_unsigned() 120 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_signed() local 124 hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373)); in dx_hack_hash_signed() 126 if (hash & 0x80000000) in dx_hack_hash_signed() 127 hash -= 0x7fffffff; in dx_hack_hash_signed() 129 hash0 = hash; in dx_hack_hash_signed() [all …]
|
/Linux-v4.19/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
D | flowring.c | 72 struct brcmf_flowring_hash *hash; in brcmf_flowring_lookup() local 95 hash = flow->hash; in brcmf_flowring_lookup() 97 if ((sta || (memcmp(hash[hash_idx].mac, mac, ETH_ALEN) == 0)) && in brcmf_flowring_lookup() 98 (hash[hash_idx].fifo == fifo) && in brcmf_flowring_lookup() 99 (hash[hash_idx].ifidx == ifidx)) { in brcmf_flowring_lookup() 107 return hash[hash_idx].flowid; in brcmf_flowring_lookup() 117 struct brcmf_flowring_hash *hash; in brcmf_flowring_create() local 140 hash = flow->hash; in brcmf_flowring_create() 142 if ((hash[hash_idx].ifidx == BRCMF_FLOWRING_INVALID_IFIDX) && in brcmf_flowring_create() 143 (is_zero_ether_addr(hash[hash_idx].mac))) { in brcmf_flowring_create() [all …]
|
/Linux-v4.19/arch/mips/cavium-octeon/crypto/ |
D | octeon-md5.c | 40 u64 *hash = (u64 *)ctx->hash; in octeon_md5_store_hash() local 42 write_octeon_64bit_hash_dword(hash[0], 0); in octeon_md5_store_hash() 43 write_octeon_64bit_hash_dword(hash[1], 1); in octeon_md5_store_hash() 48 u64 *hash = (u64 *)ctx->hash; in octeon_md5_read_hash() local 50 hash[0] = read_octeon_64bit_hash_dword(0); in octeon_md5_read_hash() 51 hash[1] = read_octeon_64bit_hash_dword(1); in octeon_md5_read_hash() 72 mctx->hash[0] = cpu_to_le32(MD5_H0); in octeon_md5_init() 73 mctx->hash[1] = cpu_to_le32(MD5_H1); in octeon_md5_init() 74 mctx->hash[2] = cpu_to_le32(MD5_H2); in octeon_md5_init() 75 mctx->hash[3] = cpu_to_le32(MD5_H3); in octeon_md5_init() [all …]
|
/Linux-v4.19/fs/ubifs/ |
D | key.h | 54 static inline uint32_t key_mask_hash(uint32_t hash) in key_mask_hash() argument 56 hash &= UBIFS_S_KEY_HASH_MASK; in key_mask_hash() 57 if (unlikely(hash <= 2)) in key_mask_hash() 58 hash += 3; in key_mask_hash() 59 return hash; in key_mask_hash() 162 uint32_t hash = c->key_hash(fname_name(nm), fname_len(nm)); in dent_key_init() local 164 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init() 165 ubifs_assert(c, !nm->hash && !nm->minor_hash); in dent_key_init() 167 key->u32[1] = hash | (UBIFS_DENT_KEY << UBIFS_S_KEY_HASH_BITS); in dent_key_init() 180 uint32_t hash) in dent_key_init_hash() argument [all …]
|
/Linux-v4.19/Documentation/devicetree/bindings/crypto/ |
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-v4.19/arch/powerpc/crypto/ |
D | md5-glue.c | 40 sctx->hash[0] = MD5_H0; in ppc_md5_init() 41 sctx->hash[1] = MD5_H1; in ppc_md5_init() 42 sctx->hash[2] = MD5_H2; in ppc_md5_init() 43 sctx->hash[3] = MD5_H3; in ppc_md5_init() 66 ppc_md5_transform(sctx->hash, (const u8 *)sctx->block, 1); in ppc_md5_update() 72 ppc_md5_transform(sctx->hash, src, len >> 6); in ppc_md5_update() 95 ppc_md5_transform(sctx->hash, src, 1); in ppc_md5_final() 102 ppc_md5_transform(sctx->hash, src, 1); in ppc_md5_final() 104 dst[0] = cpu_to_le32(sctx->hash[0]); in ppc_md5_final() 105 dst[1] = cpu_to_le32(sctx->hash[1]); in ppc_md5_final() [all …]
|
/Linux-v4.19/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_cmdbuf_res.c | 45 struct drm_hash_item hash; member 84 struct drm_hash_item *hash; in vmw_cmdbuf_res_lookup() local 88 ret = drm_ht_find_item(&man->resources, key, &hash); in vmw_cmdbuf_res_lookup() 93 (drm_hash_entry(hash, struct vmw_cmdbuf_res, hash)->res); in vmw_cmdbuf_res_lookup() 109 WARN_ON(drm_ht_remove_item(&man->resources, &entry->hash)); in vmw_cmdbuf_res_free() 173 &entry->hash); in vmw_cmdbuf_res_revert() 211 cres->hash.key = user_key | (res_type << 24); in vmw_cmdbuf_res_add() 212 ret = drm_ht_insert_item(&man->resources, &cres->hash); in vmw_cmdbuf_res_add() 248 struct drm_hash_item *hash; in vmw_cmdbuf_res_remove() local 252 &hash); in vmw_cmdbuf_res_remove() [all …]
|
/Linux-v4.19/arch/mips/kernel/ |
D | relocate.c | 187 static inline __init unsigned long rotate_xor(unsigned long hash, in rotate_xor() argument 193 for (i = 0; i < size / sizeof(hash); i++) { in rotate_xor() 195 hash = (hash << ((sizeof(hash) * 8) - 7)) | (hash >> 7); in rotate_xor() 196 hash ^= ptr[i]; in rotate_xor() 199 return hash; in rotate_xor() 205 unsigned long hash = 0; in get_random_boot() local 208 hash = rotate_xor(hash, linux_banner, strlen(linux_banner)); in get_random_boot() 211 hash = rotate_xor(hash, &entropy, sizeof(entropy)); in get_random_boot() 224 hash = rotate_xor(hash, prop, sizeof(*prop)); in get_random_boot() 229 return hash; in get_random_boot()
|
/Linux-v4.19/crypto/ |
D | md4.c | 37 u32 hash[MD4_HASH_WORDS]; member 67 static void md4_transform(u32 *hash, u32 const *in) in md4_transform() argument 71 a = hash[0]; in md4_transform() 72 b = hash[1]; in md4_transform() 73 c = hash[2]; in md4_transform() 74 d = hash[3]; in md4_transform() 127 hash[0] += a; in md4_transform() 128 hash[1] += b; in md4_transform() 129 hash[2] += c; in md4_transform() 130 hash[3] += d; in md4_transform() [all …]
|
/Linux-v4.19/drivers/gpu/drm/ttm/ |
D | ttm_object.c | 123 struct drm_hash_item hash; member 177 &base->hash, in ttm_base_object_init() 192 (void)drm_ht_remove_item_rcu(&tdev->object_hash, &base->hash); in ttm_base_object_init() 206 (void)drm_ht_remove_item_rcu(&tdev->object_hash, &base->hash); in ttm_release_base() 234 struct drm_hash_item *hash; in ttm_base_object_lookup() local 239 ret = drm_ht_find_item_rcu(ht, key, &hash); in ttm_base_object_lookup() 242 base = drm_hash_entry(hash, struct ttm_ref_object, hash)->obj; in ttm_base_object_lookup() 256 struct drm_hash_item *hash; in ttm_base_object_lookup_for_ref() local 261 ret = drm_ht_find_item_rcu(ht, key, &hash); in ttm_base_object_lookup_for_ref() 264 base = drm_hash_entry(hash, struct ttm_base_object, hash); in ttm_base_object_lookup_for_ref() [all …]
|
/Linux-v4.19/Documentation/crypto/ |
D | api-digest.rst | 4 .. kernel-doc:: include/crypto/hash.h 7 .. kernel-doc:: include/crypto/hash.h 13 .. kernel-doc:: include/crypto/hash.h 16 .. kernel-doc:: include/crypto/hash.h 22 .. kernel-doc:: include/crypto/hash.h 25 .. kernel-doc:: include/crypto/hash.h 31 .. kernel-doc:: include/crypto/hash.h 34 .. kernel-doc:: include/crypto/hash.h
|