Home
last modified time | relevance | path

Searched refs:seed (Results 1 – 25 of 42) sorted by relevance

12

/linux-4.19.296/lib/
Dtest_hash.c27 xorshift(u32 seed) in xorshift() argument
29 seed ^= seed << 13; in xorshift()
30 seed ^= seed >> 17; in xorshift()
31 seed ^= seed << 5; in xorshift()
32 return seed; in xorshift()
48 fill_buf(char *buf, size_t len, u32 seed) in fill_buf() argument
53 seed = xorshift(seed); in fill_buf()
54 buf[i] = mod255(seed); in fill_buf()
Dxxhash.c94 static uint32_t xxh32_round(uint32_t seed, const uint32_t input) in xxh32_round() argument
96 seed += input * PRIME32_2; in xxh32_round()
97 seed = xxh_rotl32(seed, 13); in xxh32_round()
98 seed *= PRIME32_1; in xxh32_round()
99 return seed; in xxh32_round()
102 uint32_t xxh32(const void *input, const size_t len, const uint32_t seed) in xxh32() argument
110 uint32_t v1 = seed + PRIME32_1 + PRIME32_2; in xxh32()
111 uint32_t v2 = seed + PRIME32_2; in xxh32()
112 uint32_t v3 = seed + 0; in xxh32()
113 uint32_t v4 = seed - PRIME32_1; in xxh32()
[all …]
Drandom32.c132 u32 seed; member
142 u32 seed; member
259 static void prandom_seed_early(struct rnd_state *state, u32 seed, in prandom_seed_early() argument
264 state->s1 = __seed(HWSEED() ^ LCG(seed), 2U); in prandom_seed_early()
278 prandom_seed_early(&state, test1[i].seed, false); in prandom_state_selftest()
293 prandom_seed_early(&state, test2[i].seed, false); in prandom_state_selftest()
/linux-4.19.296/include/linux/
Dprandom.h17 void prandom_seed(u32 seed);
85 static inline void prandom_seed_state(struct rnd_state *state, u64 seed) in prandom_seed_state() argument
87 u32 i = ((seed >> 32) ^ (seed << 10) ^ seed) & 0xffffffffUL; in prandom_seed_state()
96 static inline u32 next_pseudo_random32(u32 seed) in next_pseudo_random32() argument
98 return seed * 1664525 + 1013904223; in next_pseudo_random32()
Dxxhash.h95 uint32_t xxh32(const void *input, size_t length, uint32_t seed);
108 uint64_t xxh64(const void *input, size_t length, uint64_t seed);
155 void xxh32_reset(struct xxh32_state *state, uint32_t seed);
189 void xxh64_reset(struct xxh64_state *state, uint64_t seed);
Dcrc32.h66 #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length) argument
Drhashtable-types.h38 typedef u32 (*rht_hashfn_t)(const void *data, u32 len, u32 seed);
39 typedef u32 (*rht_obj_hashfn_t)(const void *data, u32 len, u32 seed);
/linux-4.19.296/drivers/base/power/
Dtrace.c139 static unsigned int hash_string(unsigned int seed, const char *data, unsigned int mod) in hash_string() argument
143 seed = (seed << 16) + (seed << 6) - seed + c; in hash_string()
145 return seed % mod; in hash_string()
/linux-4.19.296/crypto/
Dansi_cprng.c370 const u8 *seed, unsigned int slen) in cprng_reset() argument
373 const u8 *key = seed + DEFAULT_BLK_SZ; in cprng_reset()
382 reset_prng_context(prng, key, DEFAULT_PRNG_KSZ, seed, dt); in cprng_reset()
400 const u8 *seed, unsigned int slen) in fips_cprng_reset() argument
403 const u8 *key = seed + DEFAULT_BLK_SZ; in fips_cprng_reset()
412 if (!memcmp(seed, key, DEFAULT_PRNG_KSZ)) in fips_cprng_reset()
415 rc = cprng_reset(tfm, seed, slen); in fips_cprng_reset()
431 .seed = cprng_reset,
445 .seed = fips_cprng_reset,
Drng.c36 int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) in crypto_rng_reset() argument
41 if (!seed && slen) { in crypto_rng_reset()
49 seed = buf; in crypto_rng_reset()
52 err = crypto_rng_alg(tfm)->seed(tfm, seed, slen); in crypto_rng_reset()
Ddrbg.c421 struct drbg_string *seed = NULL; in drbg_ctr_df() local
433 list_for_each_entry(seed, seedlist, list) in drbg_ctr_df()
434 inputlen += seed->len; in drbg_ctr_df()
530 static int drbg_ctr_update(struct drbg_state *drbg, struct list_head *seed, in drbg_ctr_update() argument
559 if (seed) { in drbg_ctr_update()
560 ret = drbg_ctr_df(drbg, df_data, drbg_statelen(drbg), seed); in drbg_ctr_update()
653 static int drbg_hmac_update(struct drbg_state *drbg, struct list_head *seed, in drbg_hmac_update() argument
674 if (seed) in drbg_hmac_update()
675 list_splice_tail(seed, &seedlist); in drbg_hmac_update()
697 if (!seed) in drbg_hmac_update()
[all …]
Djitterentropy-kcapi.c163 const u8 *seed, unsigned int slen) in jent_kcapi_reset() argument
170 .seed = jent_kcapi_reset,
Dalgif_rng.c160 static int rng_setkey(void *private, const u8 *seed, unsigned int seedlen) in rng_setkey() argument
166 return crypto_rng_reset(private, seed, seedlen); in rng_setkey()
/linux-4.19.296/include/net/
Dipv6_frag.h40 static inline u32 ip6frag_key_hashfn(const void *data, u32 len, u32 seed) in ip6frag_key_hashfn() argument
43 sizeof(struct frag_v6_compare_key) / sizeof(u32), seed); in ip6frag_key_hashfn()
46 static inline u32 ip6frag_obj_hashfn(const void *data, u32 len, u32 seed) in ip6frag_obj_hashfn() argument
51 sizeof(struct frag_v6_compare_key) / sizeof(u32), seed); in ip6frag_obj_hashfn()
/linux-4.19.296/drivers/char/hw_random/
Dhisi-rng.c41 u32 seed; in hisi_rng_init() local
44 get_random_bytes(&seed, sizeof(seed)); in hisi_rng_init()
46 writel_relaxed(seed, hrng->base + RNG_SEED); in hisi_rng_init()
/linux-4.19.296/block/
Dt10-pi.c58 pi->ref_tag = cpu_to_be32(lower_32_bits(iter->seed)); in t10_pi_generate()
64 iter->seed++; in t10_pi_generate()
86 lower_32_bits(iter->seed)) { in t10_pi_verify()
90 iter->seed, be32_to_cpu(pi->ref_tag)); in t10_pi_verify()
106 (unsigned long long)iter->seed, in t10_pi_verify()
114 iter->seed++; in t10_pi_verify()
/linux-4.19.296/include/crypto/
Drng.h50 int (*seed)(struct crypto_rng *tfm, const u8 *seed, unsigned int slen); member
182 int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed,
Ddrbg.h94 int (*update)(struct drbg_state *drbg, struct list_head *seed,
/linux-4.19.296/fs/nilfs2/
Dsegbuf.c176 nilfs_segbuf_fill_in_segsum_crc(struct nilfs_segment_buffer *segbuf, u32 seed) in nilfs_segbuf_fill_in_segsum_crc() argument
188 crc = crc32_le(seed, in nilfs_segbuf_fill_in_segsum_crc()
204 u32 seed) in nilfs_segbuf_fill_in_data_crc() argument
214 crc = crc32_le(seed, in nilfs_segbuf_fill_in_data_crc()
232 u32 seed) in nilfs_segbuf_fill_in_super_root_crc() argument
241 crc = crc32_le(seed, in nilfs_segbuf_fill_in_super_root_crc()
319 void nilfs_add_checksums_on_logs(struct list_head *logs, u32 seed) in nilfs_add_checksums_on_logs() argument
325 nilfs_segbuf_fill_in_super_root_crc(segbuf, seed); in nilfs_add_checksums_on_logs()
326 nilfs_segbuf_fill_in_segsum_crc(segbuf, seed); in nilfs_add_checksums_on_logs()
327 nilfs_segbuf_fill_in_data_crc(segbuf, seed); in nilfs_add_checksums_on_logs()
Dsegbuf.h165 void nilfs_add_checksums_on_logs(struct list_head *logs, u32 seed);
/linux-4.19.296/drivers/char/
Drandom.c661 u8 seed[BLAKE2S_HASH_SIZE], next_key[BLAKE2S_HASH_SIZE]; in extract_entropy() local
677 blake2s_final(&input_pool.hash, seed); in extract_entropy()
681 blake2s(next_key, (u8 *)&block, seed, sizeof(next_key), sizeof(block), sizeof(seed)); in extract_entropy()
691 blake2s(buf, (u8 *)&block, seed, i, sizeof(block), sizeof(seed)); in extract_entropy()
696 memzero_explicit(seed, sizeof(seed)); in extract_entropy()
/linux-4.19.296/fs/ext4/
Dhash.c216 if (hinfo->seed) { in ext4fs_dirhash()
218 if (hinfo->seed[i]) { in ext4fs_dirhash()
219 memcpy(buf, hinfo->seed, sizeof(buf)); in ext4fs_dirhash()
/linux-4.19.296/include/drm/
Ddrm_hashtab.h55 unsigned long seed, int bits, int shift,
/linux-4.19.296/include/linux/ceph/
Dosdmap.h24 uint32_t seed; member
238 pgid->seed = ceph_decode_32(p); in ceph_decode_pgid()
/linux-4.19.296/fs/btrfs/
Dvolumes.c1005 if (fs_devices->seed) { in btrfs_free_extra_devids()
1006 fs_devices = fs_devices->seed; in btrfs_free_extra_devids()
1107 seed_devices = fs_devices->seed; in btrfs_close_devices()
1108 fs_devices->seed = NULL; in btrfs_close_devices()
1114 seed_devices = fs_devices->seed; in btrfs_close_devices()
2007 if (fs_devices->seed == cur_devices) { in btrfs_rm_device()
2008 fs_devices->seed = cur_devices->seed; in btrfs_rm_device()
2011 fs_devices = fs_devices->seed; in btrfs_rm_device()
2013 cur_devices->seed = NULL; in btrfs_rm_device()
2087 if (tmp_fs_devices->seed == fs_devices) { in btrfs_rm_dev_replace_free_srcdev()
[all …]

12