Home
last modified time | relevance | path

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

12345678910

/openbmc/u-boot/net/
H A Dnet_rand.h20 unsigned int seed; in seed_mac() local
25 seed = enetaddr[5]; in seed_mac()
26 seed ^= enetaddr[4] << 8; in seed_mac()
27 seed ^= enetaddr[3] << 16; in seed_mac()
28 seed ^= enetaddr[2] << 24; in seed_mac()
29 seed ^= enetaddr[1]; in seed_mac()
30 seed ^= enetaddr[0] << 8; in seed_mac()
32 return seed; in seed_mac()
/openbmc/bios-settings-mgr/src/
H A Dpassword.cpp38 const std::array<uint8_t, maxSeedSize>& seed, in compareDigest() argument
47 seed.size(), iterValue, digestFunc, hashLen, in compareDigest()
64 const std::array<uint8_t, maxSeedSize>& seed, in isMatch() argument
86 std::array<uint8_t, maxSeedSize>& seed, in getParam() argument
109 seed = json["Seed"]; in getParam()
124 std::string& newPassword, std::array<uint8_t, maxSeedSize>& seed, in verifyIntegrityCheck() argument
132 seed.size(), iterValue, digestFunc, mdLen, in verifyIntegrityCheck()
149 std::array<uint8_t, maxSeedSize> seed; in verifyPassword() local
152 if (getParam(orgUsrPwdHash, orgAdminPwdHash, seed, hashAlgo)) in verifyPassword()
155 seed.empty() || hashAlgo.empty()) in verifyPassword()
[all …]
/openbmc/linux/drivers/firmware/efi/libstub/
H A Drandom.c70 struct linux_efi_random_seed *prev_seed, *seed = NULL; in efi_random_get_seed() local
106 struct_size(seed, bits, seed_size), in efi_random_get_seed()
107 (void **)&seed); in efi_random_get_seed()
115 EFI_RANDOM_SEED_SIZE, seed->bits); in efi_random_get_seed()
123 EFI_RANDOM_SEED_SIZE, seed->bits); in efi_random_get_seed()
131 &nv_seed_size, seed->bits + offset); in efi_random_get_seed()
148 memzero_explicit(seed->bits + offset, nv_seed_size); in efi_random_get_seed()
155 memcpy(seed->bits + offset, prev_seed->bits, prev_seed_size); in efi_random_get_seed()
159 seed->size = offset; in efi_random_get_seed()
172 memzero_explicit(seed, struct_size(seed, bits, seed_size)); in efi_random_get_seed()
[all …]
H A Dzboot.c101 u32 seed = U32_MAX; in efi_zboot_entry() local
106 seed = 0; in efi_zboot_entry()
110 status = efi_get_random_bytes(sizeof(seed), (u8 *)&seed); in efi_zboot_entry()
122 seed, EFI_LOADER_CODE, 0, EFI_ALLOC_LIMIT); in efi_zboot_entry()
/openbmc/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-prng.c19 int sun8i_ss_prng_seed(struct crypto_rng *tfm, const u8 *seed, in sun8i_ss_prng_seed() argument
24 if (ctx->seed && ctx->slen != slen) { in sun8i_ss_prng_seed()
25 kfree_sensitive(ctx->seed); in sun8i_ss_prng_seed()
27 ctx->seed = NULL; in sun8i_ss_prng_seed()
29 if (!ctx->seed) in sun8i_ss_prng_seed()
30 ctx->seed = kmalloc(slen, GFP_KERNEL); in sun8i_ss_prng_seed()
31 if (!ctx->seed) in sun8i_ss_prng_seed()
34 memcpy(ctx->seed, seed, slen); in sun8i_ss_prng_seed()
52 kfree_sensitive(ctx->seed); in sun8i_ss_prng_exit()
53 ctx->seed = NULL; in sun8i_ss_prng_exit()
[all …]
/openbmc/linux/drivers/crypto/allwinner/sun8i-ce/
H A Dsun8i-ce-prng.c29 kfree_sensitive(ctx->seed); in sun8i_ce_prng_exit()
30 ctx->seed = NULL; in sun8i_ce_prng_exit()
34 int sun8i_ce_prng_seed(struct crypto_rng *tfm, const u8 *seed, in sun8i_ce_prng_seed() argument
39 if (ctx->seed && ctx->slen != slen) { in sun8i_ce_prng_seed()
40 kfree_sensitive(ctx->seed); in sun8i_ce_prng_seed()
42 ctx->seed = NULL; in sun8i_ce_prng_seed()
44 if (!ctx->seed) in sun8i_ce_prng_seed()
45 ctx->seed = kmalloc(slen, GFP_KERNEL | GFP_DMA); in sun8i_ce_prng_seed()
46 if (!ctx->seed) in sun8i_ce_prng_seed()
49 memcpy(ctx->seed, seed, slen); in sun8i_ce_prng_seed()
[all …]
/openbmc/linux/scripts/basic/
H A DMakefile9 gen-randstruct-seed := $(srctree)/scripts/gen-randstruct-seed.sh
12 $(CONFIG_SHELL) $(gen-randstruct-seed) \
14 $(obj)/randstruct.seed: $(gen-randstruct-seed) FORCE
16 always-$(CONFIG_RANDSTRUCT) += randstruct.seed
/openbmc/linux/lib/
H A Dxxhash.c96 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()
112 uint32_t v3 = seed + 0; in xxh32()
129 h32 = seed + PRIME32_5; in xxh32()
182 uint64_t v3 = seed + 0; in xxh64()
204 h64 = seed + PRIME64_5; in xxh64()
249 state.v2 = seed + PRIME32_2; in xxh32_reset()
250 state.v3 = seed + 0; in xxh32_reset()
[all …]
H A Dtest_hash.c26 xorshift(u32 seed) in xorshift() argument
28 seed ^= seed << 13; in xorshift()
29 seed ^= seed >> 17; in xorshift()
30 seed ^= seed << 5; in xorshift()
31 return seed; in xorshift()
46 static void fill_buf(char *buf, size_t len, u32 seed) in fill_buf() argument
51 seed = xorshift(seed); in fill_buf()
52 buf[i] = mod255(seed); in fill_buf()
H A Drandom32.c131 u32 seed; member
141 u32 seed; member
248 static void prandom_state_selftest_seed(struct rnd_state *state, u32 seed) in prandom_state_selftest_seed() argument
251 state->s1 = __seed(LCG(seed), 2U); in prandom_state_selftest_seed()
265 prandom_state_selftest_seed(&state, test1[i].seed); in prandom_state_selftest()
280 prandom_state_selftest_seed(&state, test2[i].seed); in prandom_state_selftest()
/openbmc/linux/include/linux/
H A 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);
124 uint64_t seed) in xxhash() argument
127 return xxh64(input, length, seed); in xxhash()
129 return xxh32(input, length, seed); in xxhash()
178 void xxh32_reset(struct xxh32_state *state, uint32_t seed);
212 void xxh64_reset(struct xxh64_state *state, uint64_t seed);
H A Dprandom.h40 static inline void prandom_seed_state(struct rnd_state *state, u64 seed) in prandom_seed_state() argument
42 u32 i = ((seed >> 32) ^ (seed << 10) ^ seed) & 0xffffffffUL; in prandom_seed_state()
51 static inline u32 next_pseudo_random32(u32 seed) in next_pseudo_random32() argument
53 return seed * 1664525 + 1013904223; in next_pseudo_random32()
/openbmc/linux/kernel/trace/
H A Dtrace_benchmark.c43 u64 seed; in trace_do_benchmark() local
124 seed = avg; in trace_do_benchmark()
126 last_seed = seed; in trace_do_benchmark()
127 seed = stddev; in trace_do_benchmark()
130 do_div(seed, last_seed); in trace_do_benchmark()
131 seed += last_seed; in trace_do_benchmark()
132 do_div(seed, 2); in trace_do_benchmark()
133 } while (i++ < 10 && last_seed != seed); in trace_do_benchmark()
135 std = seed; in trace_do_benchmark()
/openbmc/openbmc/poky/meta/recipes-kernel/kexec/kexec-tools/
H A D0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch4 Subject: [PATCH] arm64: kexec: disabled check if kaslr-seed dtb property was
7 Kexec when loading arm64 kernel checks if chosen/kaslr-seed dtb property is
9 if bootloader creates and fills kaslr-seed property and kernel is not
11 kaslr-seed does not run. As a result kaslr-seed property is not zero and when
14 setup_2nd_dtb: kaslr-seed is not wiped to 0.
19 qemu 5.1.0. Qemu created kaslr-seed property but kernel was not configured
25 Note in described use-case the fact that kaslr-seed is not wiped and user
27 /sys/firmware/devicetree/base/chosen/kaslr-seed is not a security problem
59 - dbgprintf("%s: kaslr-seed is not wiped to 0.\n",
/openbmc/qemu/util/
H A Dguest-random.c80 void qemu_guest_random_seed_thread_part2(uint64_t seed) in qemu_guest_random_seed_thread_part2() argument
85 g_rand_new_with_seed_array((const guint32 *)&seed, in qemu_guest_random_seed_thread_part2()
86 sizeof(seed) / sizeof(guint32)); in qemu_guest_random_seed_thread_part2()
92 uint64_t seed; in qemu_guest_random_seed_main() local
93 if (parse_uint_full(seedstr, 0, &seed)) { in qemu_guest_random_seed_main()
98 qemu_guest_random_seed_thread_part2(seed); in qemu_guest_random_seed_main()
/openbmc/qemu/tests/image-fuzzer/
H A Drunner.py121 def __init__(self, test_id, seed, work_dir, run_log, argument
128 if seed is not None:
129 self.seed = seed
131 self.seed = str(random.randint(0, sys.maxsize))
132 random.seed(self.seed)
241 % (self.seed, " ".join(current_cmd),
330 def run_test(test_id, seed, work_dir, run_log, cleanup, log_all, argument
334 test = TestEnv(test_id, seed, work_dir, run_log, cleanup,
365 seed = None variable
384 seed = arg variable
[all …]
/openbmc/linux/drivers/crypto/
H A Dexynos-rng.c98 const u8 *seed, unsigned int slen) in exynos_rng_set_seed() argument
112 val = seed[i] << 24; in exynos_rng_set_seed()
113 val |= seed[i + 1] << 16; in exynos_rng_set_seed()
114 val |= seed[i + 2] << 8; in exynos_rng_set_seed()
115 val |= seed[i + 3] << 0; in exynos_rng_set_seed()
178 u8 seed[EXYNOS_RNG_SEED_SIZE]; in exynos_rng_reseed() local
184 if (exynos_rng_get_random(rng, seed, sizeof(seed), &read)) in exynos_rng_reseed()
187 exynos_rng_set_seed(rng, seed, read); in exynos_rng_reseed()
225 static int exynos_rng_seed(struct crypto_rng *tfm, const u8 *seed, in exynos_rng_seed() argument
237 ret = exynos_rng_set_seed(ctx->rng, seed, slen); in exynos_rng_seed()
[all …]
/openbmc/linux/arch/arm64/kernel/pi/
H A Dkaslr_early.c90 u64 seed; in kaslr_early_init() local
95 seed = get_kaslr_seed(fdt); in kaslr_early_init()
96 if (!seed) { in kaslr_early_init()
98 !__arm64_rndr((unsigned long *)&seed)) in kaslr_early_init()
109 return BIT(VA_BITS_MIN - 3) + (seed & GENMASK(VA_BITS_MIN - 3, 0)); in kaslr_early_init()
/openbmc/linux/drivers/firmware/efi/
H A Defi.c700 seed = early_memremap(efi_rng_seed, sizeof(*seed)); in efi_config_parse_tables()
701 if (seed != NULL) { in efi_config_parse_tables()
703 early_memunmap(seed, sizeof(*seed)); in efi_config_parse_tables()
713 early_memunmap(seed, sizeof(*seed) + size); in efi_config_parse_tables()
1152 seed = memremap(efi_rng_seed, sizeof(*seed), MEMREMAP_WB); in update_efi_random_seed()
1153 if (seed != NULL) { in update_efi_random_seed()
1155 memunmap(seed); in update_efi_random_seed()
1160 seed = memremap(efi_rng_seed, sizeof(*seed) + size, in update_efi_random_seed()
1162 if (seed != NULL) { in update_efi_random_seed()
1164 get_random_bytes(seed->bits, seed->size); in update_efi_random_seed()
[all …]
/openbmc/linux/block/
H A Dt10-pi.c50 iter->seed++; in t10_pi_generate()
73 lower_32_bits(iter->seed)) { in t10_pi_verify()
77 iter->seed, be32_to_cpu(pi->ref_tag)); in t10_pi_verify()
91 (unsigned long long)iter->seed, in t10_pi_verify()
99 iter->seed++; in t10_pi_verify()
306 iter->seed++; in ext_pi_crc64_generate()
326 u64 ref, seed; in ext_pi_crc64_verify() local
334 seed = lower_48_bits(iter->seed); in ext_pi_crc64_verify()
335 if (ref != seed) { in ext_pi_crc64_verify()
337 iter->disk_name, seed, ref); in ext_pi_crc64_verify()
[all …]
/openbmc/linux/arch/s390/crypto/
H A Dprng.c261 static const u8 seed[] __initconst = { in prng_sha512_selftest() local
339 &ws, NULL, 0, seed, sizeof(seed)); in prng_sha512_selftest()
371 u8 seed[128 + 16]; in prng_sha512_instantiate() local
402 cpacf_trng(NULL, 0, seed, seedlen); in prng_sha512_instantiate()
411 ret = generate_entropy(seed, seedlen); in prng_sha512_instantiate()
423 memzero_explicit(seed, sizeof(seed)); in prng_sha512_instantiate()
452 u8 seed[64]; in prng_sha512_reseed() local
458 cpacf_trng(NULL, 0, seed, seedlen); in prng_sha512_reseed()
462 ret = generate_entropy(seed, seedlen); in prng_sha512_reseed()
463 if (ret != sizeof(seed)) in prng_sha512_reseed()
[all …]
/openbmc/linux/crypto/
H A Dxxhash_generic.c13 u64 seed; member
25 if (keylen != sizeof(tctx->seed)) in xxhash64_setkey()
27 tctx->seed = get_unaligned_le64(key); in xxhash64_setkey()
36 xxh64_reset(&dctx->xxhstate, tctx->seed); in xxhash64_init()
65 put_unaligned_le64(xxh64(data, length, tctx->seed), out); in xxhash64_digest()
/openbmc/linux/drivers/crypto/allwinner/sun4i-ss/
H A Dsun4i-ss-prng.c4 int sun4i_ss_prng_seed(struct crypto_rng *tfm, const u8 *seed, in sun4i_ss_prng_seed() argument
11 memcpy(algt->ss->seed, seed, slen); in sun4i_ss_prng_seed()
48 writel(ss->seed[i], ss->base + SS_KEY0 + i * 4); in sun4i_ss_prng_generate()
59 ss->seed[i] = v; in sun4i_ss_prng_generate()
/openbmc/linux/arch/x86/tools/
H A Dinsn_sanity.c33 static unsigned int seed; /* Random seed */ variable
101 fprintf(fp, " $ %s -s 0x%x,%lu\n", prog, seed, nr_iter); in dump_stream()
113 if (read(fd, &seed, sizeof(seed)) != sizeof(seed)) in init_random_seed()
185 seed = (unsigned int)strtoul(optarg, &tmp, 0); in parse_args()
215 srand(seed); in parse_args()
262 seed); in main()
/openbmc/openbmc/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs/
H A D0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch30 - uint_t seed;
31 + uint32_t seed;
39 - seed = (uint_t)time(NULL);
40 + seed = (uint32_t)time(NULL);
41 srandom(seed);

12345678910