| /linux/drivers/firmware/efi/libstub/ |
| H A D | random.c | 70 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() 160 status = efi_bs_call(install_configuration_table, &rng_table_guid, seed); in efi_random_get_seed() [all …]
|
| /linux/lib/ |
| H A D | xxhash.c | 79 static uint32_t xxh32_round(uint32_t seed, const uint32_t input) in xxh32_round() argument 81 seed += input * PRIME32_2; in xxh32_round() 82 seed = xxh_rotl32(seed, 13); in xxh32_round() 83 seed *= PRIME32_1; in xxh32_round() 84 return seed; in xxh32_round() 87 uint32_t xxh32(const void *input, const size_t len, const uint32_t seed) in xxh32() argument 95 uint32_t v1 = seed + PRIME32_1 + PRIME32_2; in xxh32() 96 uint32_t v2 = seed + PRIME32_2; in xxh32() 97 uint32_t v3 = seed + 0; in xxh32() 98 uint32_t v4 = seed - PRIME32_1; in xxh32() [all …]
|
| /linux/kernel/trace/ |
| H A D | trace_benchmark.c | 43 u64 seed; in trace_do_benchmark() local 123 seed = avg; in trace_do_benchmark() 125 last_seed = seed; in trace_do_benchmark() 126 seed = stddev; in trace_do_benchmark() 129 seed = div64_u64(seed, last_seed); in trace_do_benchmark() 130 seed += last_seed; in trace_do_benchmark() 131 do_div(seed, 2); in trace_do_benchmark() 132 } while (i++ < 10 && last_seed != seed); in trace_do_benchmark() 134 std = seed; in trace_do_benchmark()
|
| /linux/scripts/basic/ |
| H A D | Makefile | 7 # randstruct: the seed is needed before building the gcc-plugin or 9 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
|
| /linux/include/linux/ |
| H A D | xxhash.h | 95 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() 162 void xxh64_reset(struct xxh64_state *state, uint64_t seed);
|
| H A D | prandom.h | 40 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()
|
| /linux/arch/x86/tools/ |
| H A D | insn_sanity.c | 33 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()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | sha256.c | 22 __u64 seed = 0; in test_sha256() local 36 seed = (seed * 25214903917 + 11) & ((1ULL << 48) - 1); in test_sha256() 37 data[i] = (__u8)(seed >> 16); in test_sha256()
|
| /linux/arch/riscv/kernel/pi/ |
| H A D | archrandom_early.c | 21 unsigned long seed = 0; in get_kaslr_seed_zkr() local 26 if (!csr_seed_long(&seed)) in get_kaslr_seed_zkr() 29 return seed; in get_kaslr_seed_zkr()
|
| /linux/arch/s390/boot/ |
| H A D | kaslr.c | 57 unsigned long seed, random; in get_random() local 63 seed = get_tod_clock_fast(); in get_random() 70 (u8 *) &seed, sizeof(seed)); in get_random() 76 *(unsigned long *) prng.parm_block ^= seed; in get_random() 83 random = seed; in get_random()
|
| /linux/arch/powerpc/mm/nohash/ |
| H A D | kaslr_booke.c | 288 u64 seed; in kaslr_choose_location() local 297 seed = get_tb() << 32; in kaslr_choose_location() 298 seed ^= get_tb(); in kaslr_choose_location() 299 random = rotate_xor(random, &seed, sizeof(seed)); in kaslr_choose_location() 304 seed = get_kaslr_seed(dt_ptr); in kaslr_choose_location() 305 if (seed) in kaslr_choose_location() 306 random = rotate_xor(random, &seed, sizeof(seed)); in kaslr_choose_location()
|
| /linux/drivers/char/hw_random/ |
| H A D | hisi-rng.c | 38 u32 seed; in hisi_rng_init() local 41 get_random_bytes(&seed, sizeof(seed)); in hisi_rng_init() 43 writel_relaxed(seed, hrng->base + RNG_SEED); in hisi_rng_init()
|
| /linux/drivers/mtd/tests/ |
| H A D | nandbiterrs.c | 49 static unsigned seed; variable 50 module_param(seed, uint, S_IRUGO); 51 MODULE_PARM_DESC(seed, "Random seed"); 162 if (rbuffer[i] != hash(i+seed)) { in verify_page() 164 i, hash(i+seed), rbuffer[i]); in verify_page() 209 wbuffer[i] = hash(i+seed); in incremental_errors_test() 272 wbuffer[i] = hash(i+seed); in overwrite_test()
|
| /linux/tools/testing/selftests/powerpc/ptrace/ |
| H A D | ptrace-gpr.c | 119 unsigned long seed; in ptrace_gpr() local 123 seed = getpid() ^ time(NULL); in ptrace_gpr() 124 printf("srand(%lu)\n", seed); in ptrace_gpr() 125 srand(seed); in ptrace_gpr()
|
| /linux/include/net/ |
| H A D | ipv6_frag.h | 41 static inline u32 ip6frag_key_hashfn(const void *data, u32 len, u32 seed) in ip6frag_key_hashfn() argument 44 sizeof(struct frag_v6_compare_key) / sizeof(u32), seed); in ip6frag_key_hashfn() 47 static inline u32 ip6frag_obj_hashfn(const void *data, u32 len, u32 seed) in ip6frag_obj_hashfn() argument 52 sizeof(struct frag_v6_compare_key) / sizeof(u32), seed); in ip6frag_obj_hashfn()
|
| /linux/tools/testing/selftests/kvm/lib/ |
| H A D | test_util.c | 34 struct kvm_random_state new_kvm_random_state(u32 seed) in new_guest_random_state() 36 struct kvm_random_state s = {.seed = seed}; in new_guest_random_state() 42 state->seed = (u64)state->seed * 48271 % ((u32)(1 << 31) - 1); in guest_random_u32() 43 return state->seed; in guest_random_u32() 33 new_guest_random_state(u32 seed) new_guest_random_state() argument
|
| /linux/scripts/ |
| H A D | Makefile.randstruct | 12 += -frandomize-layout-seed-file=$(objtree)/scripts/basic/randstruct.seed
|
| /linux/tools/perf/bench/ |
| H A D | mem-functions.c | 45 static unsigned int seed; 88 unsigned int seed; 297 p.seed = seed; in bench_mem_common() 513 unsigned int seed; in do_mmap() 527 if (data->seed) in do_mmap() 528 srand(data->seed); 536 fn(dst, p->size, p->page_shift, p->seed); 566 if (p->seed) 567 data[i].seed 43 static unsigned int seed; global() variable 85 unsigned int seed; global() member [all...] |
| /linux/drivers/nvdimm/ |
| H A D | claim.c | 61 struct device *seed = NULL; in is_idle() local 64 seed = nd_region->btt_seed; in is_idle() 66 seed = nd_region->pfn_seed; in is_idle() 68 seed = nd_region->dax_seed; in is_idle() 70 if (seed == dev || ndns || dev->driver) in is_idle()
|
| /linux/scripts/gcc-plugins/ |
| H A D | randomize_layout_plugin.c | 135 static void raninit(ranctx *x, u64 *seed) { in raninit() argument 138 x->a = seed[0]; in raninit() 139 x->b = seed[1]; in raninit() 140 x->c = seed[2]; in raninit() 141 x->d = seed[3]; in raninit() 245 u64 seed[4]; in shuffle() local 264 seed[i] = shuffle_seed[i]; in shuffle() 265 seed[i] ^= name_hash(structname); in shuffle() 268 raninit(&prng_state, (u64 *)&seed); in shuffle()
|
| /linux/tools/testing/radix-tree/ |
| H A D | main.c | 288 unsigned int seed = time(NULL); in main() local 294 seed = strtoul(optarg, NULL, 0); in main() 299 printf("random seed %u\n", seed); in main() 300 srand(seed); in main()
|
| /linux/tools/testing/selftests/net/forwarding/ |
| H A D | router_mpath_seed.sh | 223 local seed=$1; shift 226 sysctl -qw net.ipv4.fib_multipath_hash_seed=$seed 271 local seed=$1; shift 276 check_err $? "seed $seed: active NH moved from $act_0 to $act_1 after seed change"
|
| /linux/Documentation/security/tpm/ |
| H A D | tpm-security.rst | 89 elliptic curve key from the null seed using the standard storage seed 90 parameters. The null seed has two advantages: firstly the hierarchy 92 it and secondly, the null seed changes across TPM resets, meaning if 93 we establish trust on the null seed at start of day, all sessions 94 salted with the derived key will fail if the TPM is reset and the seed 97 Obviously using the null seed without any other prior shared secrets, 102 certifying the null seed primary with that key) which is too complex 116 hands to user-space the name of the derived null seed key which can 120 null seed scheme for security and hand the name off to the kernel in 201 null seed name presented by the kernel in
|
| /linux/scripts/kconfig/tests/ |
| H A D | conftest.py | 215 def randconfig(self, all_config=None, seed=None): argument 222 if seed is not None: 223 extra_env = {'KCONFIG_SEED': hex(seed)}
|
| /linux/scripts/crypto/ |
| H A D | gen-hash-testvecs.py | 19 # Generate the given number of random bytes, using the length itself as the seed 24 seed = length 27 seed = (seed * 25214903917 + 11) % 2**48 28 out.append((seed >> 16) % 256)
|