/linux-6.6.21/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-6.6.21/net/batman-adv/ ! |
D | hash.c | 15 static void batadv_hash_init(struct batadv_hashtable *hash) in batadv_hash_init() argument 19 for (i = 0; i < hash->size; i++) { in batadv_hash_init() 20 INIT_HLIST_HEAD(&hash->table[i]); in batadv_hash_init() 21 spin_lock_init(&hash->list_locks[i]); in batadv_hash_init() 24 atomic_set(&hash->generation, 0); in batadv_hash_init() 31 void batadv_hash_destroy(struct batadv_hashtable *hash) in batadv_hash_destroy() argument 33 kfree(hash->list_locks); in batadv_hash_destroy() 34 kfree(hash->table); in batadv_hash_destroy() 35 kfree(hash); in batadv_hash_destroy() 46 struct batadv_hashtable *hash; in batadv_hash_new() local [all …]
|
D | hash.h | 58 void batadv_hash_set_lock_class(struct batadv_hashtable *hash, 62 void batadv_hash_destroy(struct batadv_hashtable *hash); 75 static inline int batadv_hash_add(struct batadv_hashtable *hash, in batadv_hash_add() argument 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() 129 static inline void *batadv_hash_remove(struct batadv_hashtable *hash, in batadv_hash_remove() argument 139 index = choose(data, hash->size); in batadv_hash_remove() [all …]
|
/linux-6.6.21/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-6.6.21/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() 55 lockdep_is_held(&vif->hash.cache.lock)) { in xenvif_add_hash() 65 new->seq = atomic_inc_return(&vif->hash.cache.seq); in xenvif_add_hash() 66 list_add_rcu(&new->link, &vif->hash.cache.list); in xenvif_add_hash() 68 if (++vif->hash.cache.count > xenvif_hash_cache_size) { in xenvif_add_hash() 70 vif->hash.cache.count--; in xenvif_add_hash() 75 spin_unlock_irqrestore(&vif->hash.cache.lock, flags); in xenvif_add_hash() 86 val = xen_netif_toeplitz_hash(vif->hash.key, in xenvif_new_hash() 87 sizeof(vif->hash.key), in xenvif_new_hash() [all …]
|
/linux-6.6.21/drivers/net/ethernet/freescale/fman/ ! |
D | fman_mac.h | 196 static inline void free_hash_table(struct eth_hash_t *hash) in free_hash_table() argument 201 if (hash) { in free_hash_table() 202 if (hash->lsts) { in free_hash_table() 203 for (i = 0; i < hash->size; i++) { in free_hash_table() 205 dequeue_addr_from_hash_entry(&hash->lsts[i]); in free_hash_table() 209 dequeue_addr_from_hash_entry(&hash-> in free_hash_table() 214 kfree(hash->lsts); in free_hash_table() 217 kfree(hash); in free_hash_table() 224 struct eth_hash_t *hash; in alloc_hash_table() local 227 hash = kmalloc(sizeof(*hash), GFP_KERNEL); in alloc_hash_table() [all …]
|
/linux-6.6.21/scripts/ ! |
D | get_dvb_firmware | 52 my $hash = "53970ec17a538945a6d8cb608a7b3899"; 60 verify("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $hash); 70 my $hash = "237938d53a7f834c05c42b894ca68ac3"; 80 verify("$tmpdir/ZEnglish/sc_main.mc", $hash); 89 my $hash = "2105fd5bf37842fbcdfa4bfd58f3594a"; 98 verify("$tmpdir/fwtmp", $hash); 107 my $hash = "6a7e1e2f2644b162ff0502367553c72d"; 116 verify("$tmpdir/fwtmp", $hash); 125 my $hash = "1ea24dee4eea8fe971686981f34fd2e0"; 134 verify("$tmpdir/fwtmp", $hash); [all …]
|
/linux-6.6.21/include/linux/ ! |
D | rhashtable.h | 120 unsigned int hash) in rht_bucket_index() argument 122 return hash & (tbl->size - 1); in rht_bucket_index() 129 unsigned int hash; in rht_key_get_hash() local 133 hash = ht->p.hashfn(key, ht->key_len, hash_rnd); in rht_key_get_hash() 138 hash = params.hashfn(key, key_len, hash_rnd); in rht_key_get_hash() 140 hash = jhash(key, key_len, hash_rnd); in rht_key_get_hash() 142 hash = jhash2(key, key_len / sizeof(u32), hash_rnd); in rht_key_get_hash() 147 hash = params.hashfn(key, key_len, hash_rnd); in rht_key_get_hash() 149 hash = jhash(key, key_len, hash_rnd); in rht_key_get_hash() 152 return hash; in rht_key_get_hash() [all …]
|
/linux-6.6.21/lib/ ! |
D | hashtable_test.c | 37 DEFINE_HASHTABLE(hash, 1); in hashtable_test_hash_empty() 39 KUNIT_EXPECT_TRUE(test, hash_empty(hash)); in hashtable_test_hash_empty() 43 hash_add(hash, &a.node, a.key); in hashtable_test_hash_empty() 46 KUNIT_EXPECT_FALSE(test, hash_empty(hash)); 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() 74 hash_add(hash, &a.node, a.key); in hashtable_test_hash_add() 78 hash_add(hash, &b.node, b.key); in hashtable_test_hash_add() [all …]
|
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.6.21/drivers/gpu/drm/vboxvideo/ ! |
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.6.21/arch/powerpc/crypto/ ! |
D | aes-gcm-p10-glue.c | 77 static void set_subkey(unsigned char *hash) in set_subkey() argument 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() 87 static void set_aad(struct gcm_ctx *gctx, struct Hash_ctx *hash, in set_aad() argument 96 gcm_ghash_p10(nXi, hash->Htable+32, aad, i); in set_aad() 105 gcm_ghash_p10(gctx->aad_hash, hash->Htable+32, nXi, 16); in set_aad() 110 memcpy(hash->Htable, gctx->aad_hash, 16); in set_aad() 114 struct Hash_ctx *hash, u8 *assoc, unsigned int assoclen) in gcmp10_init() argument 118 aes_p10_encrypt(hash->H, hash->H, rdkey); in gcmp10_init() 119 set_subkey(hash->H); in gcmp10_init() [all …]
|
/linux-6.6.21/arch/loongarch/kernel/ ! |
D | relocate.c | 70 static inline __init unsigned long rotate_xor(unsigned long hash, in rotate_xor() argument 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() 80 size = ALIGN_DOWN(size - diff, sizeof(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 [all …]
|
/linux-6.6.21/drivers/gpu/drm/vmwgfx/ ! |
D | vmwgfx_cmdbuf_res.c | 47 struct vmwgfx_hash_item hash; member 86 struct vmwgfx_hash_item *hash; in vmw_cmdbuf_res_lookup() local 89 hash_for_each_possible_rcu(man->resources, hash, head, key) { in vmw_cmdbuf_res_lookup() 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() 170 hash_add_rcu(entry->man->resources, &entry->hash.head, in vmw_cmdbuf_res_revert() 171 entry->hash.key); in vmw_cmdbuf_res_revert() 207 cres->hash.key = user_key | (res_type << 24); in vmw_cmdbuf_res_add() 208 hash_add_rcu(man->resources, &cres->hash.head, cres->hash.key); in vmw_cmdbuf_res_add() [all …]
|
/linux-6.6.21/security/apparmor/ ! |
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-6.6.21/crypto/ ! |
D | hmac.c | 26 struct crypto_shash *hash; member 51 struct crypto_shash *hash = ctx->hash; in hmac_setkey() local 52 SHASH_DESC_ON_STACK(shash, hash); in hmac_setkey() 58 shash->tfm = hash; in hmac_setkey() 99 desc->tfm = ctx->hash; in hmac_import() 147 struct crypto_shash *hash; in hmac_init_tfm() local 152 hash = crypto_spawn_shash(spawn); in hmac_init_tfm() 153 if (IS_ERR(hash)) in hmac_init_tfm() 154 return PTR_ERR(hash); in hmac_init_tfm() 157 crypto_shash_descsize(hash); in hmac_init_tfm() [all …]
|
D | ahash.c | 416 struct crypto_ahash *hash = __crypto_ahash_cast(tfm); in crypto_ahash_exit_tfm() local 417 struct ahash_alg *alg = crypto_ahash_alg(hash); in crypto_ahash_exit_tfm() 419 alg->exit_tfm(hash); in crypto_ahash_exit_tfm() 424 struct crypto_ahash *hash = __crypto_ahash_cast(tfm); in crypto_ahash_init_tfm() local 425 struct ahash_alg *alg = crypto_ahash_alg(hash); in crypto_ahash_init_tfm() 427 hash->setkey = ahash_nosetkey; in crypto_ahash_init_tfm() 429 crypto_ahash_set_statesize(hash, alg->halg.statesize); in crypto_ahash_init_tfm() 434 hash->init = alg->init; in crypto_ahash_init_tfm() 435 hash->update = alg->update; in crypto_ahash_init_tfm() 436 hash->final = alg->final; in crypto_ahash_init_tfm() [all …]
|
/linux-6.6.21/arch/mips/kernel/ ! |
D | relocate.c | 194 static inline __init unsigned long rotate_xor(unsigned long hash, in rotate_xor() argument 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() 204 size = ALIGN_DOWN(size - diff, sizeof(hash)); in rotate_xor() 206 for (i = 0; i < size / sizeof(hash); i++) { 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 [all …]
|
/linux-6.6.21/arch/mips/cavium-octeon/crypto/ ! |
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() 50 hash[1] = read_octeon_64bit_hash_dword(1); 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() [all …]
|
/linux-6.6.21/fs/ntfs3/ ! |
D | lznt.c | 35 struct lznt_hash hash[LZNT_CHUNK_SIZE]; member 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() 65 hash[0] + 3, ctx->max_len - 3); 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() 73 hash[1] + 3, ctx->max_len - 3); in longest_match_std() 78 ctx->best_match = hash[1]; in longest_match_std() [all …]
|
/linux-6.6.21/security/integrity/ima/ ! |
D | ima_api.c | 205 struct ima_max_digest_data *hash) in ima_get_verity_digest() argument 214 digest_len = fsverity_get_digest(iint->inode, hash->digest, NULL, &alg); in ima_get_verity_digest() 225 hash->hdr.algo = alg; in ima_get_verity_digest() 226 hash->hdr.length = digest_len; in ima_get_verity_digest() 248 struct ima_max_digest_data hash; in ima_collect_measurement() local 276 hash.hdr.algo = algo; in ima_collect_measurement() 277 hash.hdr.length = hash_digest_size[algo]; in ima_collect_measurement() 280 memset(&hash.digest, 0, sizeof(hash.digest)); in ima_collect_measurement() 283 if (!ima_get_verity_digest(iint, &hash)) { in ima_collect_measurement() 288 result = ima_calc_buffer_hash(buf, size, &hash.hdr); in ima_collect_measurement() [all …]
|
D | ima_crypto.c | 330 struct ima_digest_data *hash, in ima_calc_file_hash_atfm() argument 341 hash->length = crypto_ahash_digestsize(tfm); in ima_calc_file_hash_atfm() 432 ahash_request_set_crypt(req, NULL, hash->digest, 0); in ima_calc_file_hash_atfm() 440 static int ima_calc_file_ahash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_ahash() argument 445 tfm = ima_alloc_atfm(hash->algo); in ima_calc_file_ahash() 449 rc = ima_calc_file_hash_atfm(file, hash, tfm); in ima_calc_file_ahash() 457 struct ima_digest_data *hash, in ima_calc_file_hash_tfm() argument 467 hash->length = crypto_shash_digestsize(tfm); in ima_calc_file_hash_tfm() 503 rc = crypto_shash_final(shash, hash->digest); in ima_calc_file_hash_tfm() 507 static int ima_calc_file_shash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_shash() argument [all …]
|
/linux-6.6.21/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ ! |
D | flowring.c | 62 struct brcmf_flowring_hash *hash; in brcmf_flowring_lookup() local 85 hash = flow->hash; in brcmf_flowring_lookup() 87 if ((sta || (memcmp(hash[hash_idx].mac, mac, ETH_ALEN) == 0)) && in brcmf_flowring_lookup() 88 (hash[hash_idx].fifo == fifo) && in brcmf_flowring_lookup() 89 (hash[hash_idx].ifidx == ifidx)) { 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() 132 if ((hash[hash_idx].ifidx == BRCMF_FLOWRING_INVALID_IFIDX) && in brcmf_flowring_create() 133 (is_zero_ether_addr(hash[hash_idx].mac))) { in brcmf_flowring_create() [all …]
|
/linux-6.6.21/fs/ext4/ ! |
D | hash.c | 105 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_unsigned() local 109 hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373)); in dx_hack_hash_unsigned() 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() 121 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_signed() local 125 hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373)); in dx_hack_hash_signed() 127 if (hash & 0x80000000) in dx_hack_hash_signed() 128 hash -= 0x7fffffff; in dx_hack_hash_signed() 130 hash0 = hash; in dx_hack_hash_signed() [all …]
|
/linux-6.6.21/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";
|