Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 131) sorted by relevance

123456

/fs/ntfs3/
Dlznt.c35 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 …]
/fs/ext4/
Dhash.c105 __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 …]
Ddir.c405 __u32 hash; member
460 int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, in ext4_htree_store_dirent() argument
478 new_fn->hash = hash; in ext4_htree_store_dirent()
493 if ((new_fn->hash == fname->hash) && in ext4_htree_store_dirent()
500 if (new_fn->hash < fname->hash) in ext4_htree_store_dirent()
502 else if (new_fn->hash > fname->hash) in ext4_htree_store_dirent()
535 ctx->pos = hash2pos(file, fname->hash, fname->minor_hash); in call_filldir()
611 info->curr_hash = fname->hash; in ext4_dx_readdir()
620 info->curr_hash = fname->hash; in ext4_dx_readdir()
Dxattr.c338 static void ext4_xattr_inode_set_hash(struct inode *ea_inode, u32 hash) in ext4_xattr_inode_set_hash() argument
340 ea_inode->i_atime.tv_sec = hash; in ext4_xattr_inode_set_hash()
454 u32 hash; in ext4_xattr_inode_verify_hashes() local
457 hash = ext4_xattr_inode_hash(EXT4_SB(ea_inode->i_sb), buffer, size); in ext4_xattr_inode_verify_hashes()
458 if (hash != ext4_xattr_inode_get_hash(ea_inode)) in ext4_xattr_inode_verify_hashes()
465 tmp_data = cpu_to_le32(hash); in ext4_xattr_inode_verify_hashes()
1225 u32 hash, ref; in ext4_xattr_release_block() local
1236 hash = le32_to_cpu(BHDR(bh)->h_hash); in ext4_xattr_release_block()
1247 oe = mb_cache_entry_delete_or_get(ea_block_cache, hash, in ext4_xattr_release_block()
1276 ce = mb_cache_entry_get(ea_block_cache, hash, in ext4_xattr_release_block()
[all …]
/fs/ubifs/
Dkey.h42 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()
150 uint32_t hash = c->key_hash(fname_name(nm), fname_len(nm)); in dent_key_init() local
152 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init()
154 key->u32[1] = hash | (UBIFS_DENT_KEY << UBIFS_S_KEY_HASH_BITS); 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()
[all …]
Dreplay.c49 u8 hash[UBIFS_HASH_ARR_SZ]; member
255 r->len, r->hash, &r->nm); in apply_replay_entry()
280 r->len, r->hash); in apply_replay_entry()
384 const u8 *hash, union ubifs_key *key, in insert_node() argument
404 ubifs_copy_hash(c, hash, r->hash); in insert_node()
433 const u8 *hash, union ubifs_key *key, in insert_dent() argument
459 ubifs_copy_hash(c, hash, r->hash); in insert_dent()
565 struct shash_desc *log_hash, u8 *hash) in authenticate_sleb_hash() argument
572 return crypto_shash_final(hash_desc, hash); in authenticate_sleb_hash()
598 u8 hash[UBIFS_HASH_ARR_SZ]; in authenticate_sleb() local
[all …]
Dauth.c30 u8 *hash) in __ubifs_node_calc_hash() argument
35 hash); in __ubifs_node_calc_hash()
46 static int ubifs_hash_calc_hmac(const struct ubifs_info *c, const u8 *hash, in ubifs_hash_calc_hmac() argument
49 return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac()
67 u8 hash[UBIFS_HASH_ARR_SZ]; in ubifs_prepare_auth_node() local
76 err = crypto_shash_final(hash_desc, hash); in ubifs_prepare_auth_node()
81 err = ubifs_hash_calc_hmac(c, hash, auth->hmac); in ubifs_prepare_auth_node()
137 void ubifs_bad_hash(const struct ubifs_info *c, const void *node, const u8 *hash, in ubifs_bad_hash() argument
149 ubifs_err(c, "hash expected: %*ph%s", len, hash, cont); in ubifs_bad_hash()
Dtnc_commit.c29 u8 hash[UBIFS_HASH_ARR_SZ]; in make_idx_node() local
44 ubifs_copy_hash(c, zbr->hash, ubifs_branch_hash(c, br)); in make_idx_node()
55 ubifs_node_calc_hash(c, idx, hash); in make_idx_node()
72 ubifs_copy_hash(c, hash, zbr->hash); in make_idx_node()
77 ubifs_copy_hash(c, hash, c->zroot.hash); in make_idx_node()
858 u8 hash[UBIFS_HASH_ARR_SZ]; in write_index() local
877 ubifs_copy_hash(c, zbr->hash, ubifs_branch_hash(c, br)); in write_index()
889 ubifs_node_calc_hash(c, idx, hash); in write_index()
894 ubifs_copy_hash(c, hash, in write_index()
895 znode->cparent->zbranch[znode->ciip].hash); in write_index()
[all …]
/fs/smbfs_common/
Dcifs_md4.c54 static void md4_transform(u32 *hash, u32 const *in) in md4_transform() argument
58 a = hash[0]; in md4_transform()
59 b = hash[1]; in md4_transform()
60 c = hash[2]; in md4_transform()
61 d = hash[3]; in md4_transform()
114 hash[0] += a; in md4_transform()
115 hash[1] += b; in md4_transform()
116 hash[2] += c; in md4_transform()
117 hash[3] += d; in md4_transform()
123 md4_transform(ctx->hash, ctx->block); in md4_transform_helper()
[all …]
/fs/ext2/
Dxattr.c523 __u32 hash = le32_to_cpu(header->h_hash); in ext2_xattr_set() local
530 mb_cache_entry_delete(EA_BLOCK_CACHE(inode), hash, in ext2_xattr_set()
752 __u32 hash = le32_to_cpu(HDR(old_bh)->h_hash); in ext2_xattr_set2() local
758 mb_cache_entry_delete(ea_block_cache, hash, in ext2_xattr_set2()
833 __u32 hash = le32_to_cpu(HDR(bh)->h_hash); in ext2_xattr_delete_inode() local
839 mb_cache_entry_delete(EA_BLOCK_CACHE(inode), hash, in ext2_xattr_delete_inode()
873 __u32 hash = le32_to_cpu(HDR(bh)->h_hash); in ext2_xattr_cache_insert() local
876 error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr, in ext2_xattr_cache_insert()
884 ea_bdebug(bh, "inserting [%x]", (int)hash); in ext2_xattr_cache_insert()
939 __u32 hash = le32_to_cpu(header->h_hash); in ext2_xattr_cache_find() local
[all …]
/fs/hpfs/
Ddentry.c18 unsigned long hash; in hpfs_hash_dentry() local
30 hash = init_name_hash(dentry); in hpfs_hash_dentry()
32 hash = partial_name_hash(hpfs_upcase(hpfs_sb(dentry->d_sb)->sb_cp_table,qstr->name[i]), hash); in hpfs_hash_dentry()
33 qstr->hash = end_name_hash(hash); in hpfs_hash_dentry()
/fs/hfs/
Dstring.c57 unsigned int hash, len = this->len; in hfs_hash_dentry() local
62 hash = init_name_hash(dentry); in hfs_hash_dentry()
64 hash = partial_name_hash(caseorder[*name++], hash); in hfs_hash_dentry()
65 this->hash = end_name_hash(hash); in hfs_hash_dentry()
/fs/coda/
Dcnode.c65 unsigned long hash = coda_f2i(fid); in coda_iget() local
67 inode = iget5_locked(sb, hash, coda_test_inode, coda_set_inode, fid); in coda_iget()
75 inode->i_ino = hash; in coda_iget()
122 unsigned long hash = coda_f2i(newfid); in coda_replace_fid() local
130 inode->i_ino = hash; in coda_replace_fid()
131 __insert_inode_hash(inode, hash); in coda_replace_fid()
138 unsigned long hash = coda_f2i(fid); in coda_fid_to_inode() local
140 inode = ilookup5(sb, hash, coda_test_inode, fid); in coda_fid_to_inode()
/fs/kernfs/
Ddir.c308 unsigned long hash = init_name_hash(ns); in kernfs_name_hash() local
311 hash = partial_name_hash(*name++, hash); in kernfs_name_hash()
312 hash = end_name_hash(hash); in kernfs_name_hash()
313 hash &= 0x7fffffffU; in kernfs_name_hash()
315 if (hash < 2) in kernfs_name_hash()
316 hash += 2; in kernfs_name_hash()
317 if (hash >= INT_MAX) in kernfs_name_hash()
318 hash = INT_MAX - 1; in kernfs_name_hash()
319 return hash; in kernfs_name_hash()
322 static int kernfs_name_compare(unsigned int hash, const char *name, in kernfs_name_compare() argument
[all …]
/fs/notify/fanotify/
Dfanotify.c119 if (old->hash != new->hash || in fanotify_should_merge()
362 unsigned int fh_len, unsigned int *hash, in fanotify_encode_fh() argument
407 *hash ^= fanotify_hash_fh(fh); in fanotify_encode_fh()
462 unsigned int *hash, in fanotify_alloc_path_event() argument
473 *hash ^= fanotify_hash_path(path); in fanotify_alloc_path_event()
499 unsigned int *hash, in fanotify_alloc_fid_event() argument
510 *hash ^= fanotify_hash_fsid(fsid); in fanotify_alloc_fid_event()
512 hash, gfp); in fanotify_alloc_fid_event()
521 unsigned int *hash, in fanotify_alloc_name_event() argument
542 *hash ^= fanotify_hash_fsid(fsid); in fanotify_alloc_name_event()
[all …]
Dfanotify.h158 unsigned int hash : FANOTIFY_EVENT_HASH_BITS; member
164 unsigned int hash, u32 mask) in fanotify_init_event() argument
168 event->hash = hash; in fanotify_init_event()
325 return event->hash & FANOTIFY_HTABLE_MASK; in fanotify_event_hash_bucket()
/fs/nfs/
Dpnfs_dev.c81 long hash) in _lookup_deviceid() argument
85 hlist_for_each_entry_rcu(d, &nfs4_deviceid_cache[hash], node) in _lookup_deviceid()
174 const struct nfs4_deviceid *id, long hash) in __nfs4_find_get_deviceid() argument
180 hash); in __nfs4_find_get_deviceid()
192 long hash = nfs4_deviceid_hash(id); in nfs4_find_get_deviceid() local
195 d = __nfs4_find_get_deviceid(server, id, hash); in nfs4_find_get_deviceid()
206 d = __nfs4_find_get_deviceid(server, id, hash); in nfs4_find_get_deviceid()
212 hlist_add_head_rcu(&new->node, &nfs4_deviceid_cache[hash]); in nfs4_find_get_deviceid()
331 _deviceid_purge_client(const struct nfs_client *clp, long hash) in _deviceid_purge_client() argument
338 hlist_for_each_entry_rcu(d, &nfs4_deviceid_cache[hash], node) in _deviceid_purge_client()
/fs/efivarfs/
Dsuper.c63 unsigned long hash = init_name_hash(dentry); in efivarfs_d_hash() local
71 hash = partial_name_hash(*s++, hash); in efivarfs_d_hash()
75 hash = partial_name_hash(tolower(*s++), hash); in efivarfs_d_hash()
77 qstr->hash = end_name_hash(hash); in efivarfs_d_hash()
/fs/jbd2/
Drevoke.c104 struct list_head hash; member
131 static inline int hash(journal_t *journal, unsigned long long block) in hash() function
151 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash()
153 list_add(&record->hash, hash_list); in insert_revoke_hash()
166 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record()
170 while (&(record->hash) != hash_list) { in find_revoke_record()
175 record = (struct jbd2_revoke_record_s *) record->hash.next; in find_revoke_record()
450 list_del(&record->hash); in jbd2_journal_cancel_revoke()
557 list_del(&record->hash); in jbd2_journal_write_revoke_records()
739 list_del(&record->hash); in jbd2_journal_clear_revoke()
/fs/affs/
Dnamei.c49 unsigned long hash; in __affs_hash_dentry() local
57 hash = init_name_hash(dentry); in __affs_hash_dentry()
60 hash = partial_name_hash(toupper(*name), hash); in __affs_hash_dentry()
61 qstr->hash = end_name_hash(hash); in __affs_hash_dentry()
160 u32 hash; in affs_hash_name() local
162 hash = len = min(len, AFFSNAMEMAX); in affs_hash_name()
164 hash = (hash * 13 + toupper(*name++)) & 0x7ff; in affs_hash_name()
166 return hash % AFFS_SB(sb)->s_hashsize; in affs_hash_name()
/fs/xfs/
Dxfs_attr_list.c32 if (sa->hash < sb->hash) { in xfs_attr_shortform_compare()
34 } else if (sa->hash > sb->hash) { in xfs_attr_shortform_compare()
133 sbp->hash = xfs_da_hashname(sfe->nameval, sfe->namelen); in xfs_attr_shortform_list()
156 if (sbp->hash == cursor->hashval) { in xfs_attr_shortform_list()
161 } else if (sbp->hash > cursor->hashval) { in xfs_attr_shortform_list()
172 if (cursor->hashval != sbp->hash) { in xfs_attr_shortform_list()
173 cursor->hashval = sbp->hash; in xfs_attr_shortform_list()
/fs/verity/
DKconfig7 # SHA-256 is implied as it's intended to be the default hash algorithm.
24 Merkle tree root hash also allows efficiently supporting
27 hash), or (b) authenticity verification (comparing the hash
33 protection against malicious disks vs. an ahead-of-time hash.
/fs/hfsplus/
Dunicode.c390 unsigned long hash; in hfsplus_hash_dentry() local
397 hash = init_name_hash(dentry); in hfsplus_hash_dentry()
416 hash = partial_name_hash(c2, hash); in hfsplus_hash_dentry()
423 hash = partial_name_hash(c2, hash); in hfsplus_hash_dentry()
426 str->hash = end_name_hash(hash); in hfsplus_hash_dentry()
/fs/incfs/
Dverity.c299 struct incfs_hash_alg *alg, struct mem_range hash) in incfs_build_merkle_tree() argument
343 error = incfs_calc_digest(alg, partial_buf, hash); in incfs_build_merkle_tree()
357 result = incfs_kwrite(bfc, hash.data, hash.len, in incfs_build_merkle_tree()
358 hash_level_offset + hash.len * i); in incfs_build_merkle_tree()
365 if (result != hash.len) { in incfs_build_merkle_tree()
371 INCFS_DATA_FILE_BLOCK_SIZE / hash.len); in incfs_build_merkle_tree()
428 struct mem_range hash = range(hash_buf, hash_size); in incfs_add_signature_record() local
471 hash); in incfs_add_signature_record()
476 memcpy(sig.hash_section.root_hash, hash.data, alg->digest_size); in incfs_add_signature_record()
489 memcpy(hash_tree->root_hash, hash.data, alg->digest_size); in incfs_add_signature_record()
/fs/unicode/
Dutf8-core.c134 unsigned long hash = init_name_hash(salt); in utf8_casefold_hash() local
142 hash = partial_name_hash((unsigned char)c, hash); in utf8_casefold_hash()
144 str->hash = end_name_hash(hash); in utf8_casefold_hash()

123456