Lines Matching refs:prandom_u32_below
891 static inline u32 prandom_u32_below(struct rnd_state *rng, u32 ceil) in prandom_u32_below() function
902 return prandom_u32_below(rng, 2); in prandom_bool()
908 return floor + prandom_u32_below(rng, ceil - floor + 1); in prandom_u32_inclusive()
915 unsigned int len = prandom_u32_below(rng, max_len + 1); in generate_random_length()
917 switch (prandom_u32_below(rng, 4)) { in generate_random_length()
930 if (len && prandom_u32_below(rng, 4) == 0) in generate_random_length()
940 bitpos = prandom_u32_below(rng, size * 8); in flip_random_bit()
947 buf[prandom_u32_below(rng, size)] ^= 0xff; in flip_random_byte()
957 if (prandom_u32_below(rng, 4) == 0) { in mutate_buffer()
958 num_flips = min_t(size_t, 1 << prandom_u32_below(rng, 8), in mutate_buffer()
965 if (prandom_u32_below(rng, 4) == 0) { in mutate_buffer()
966 num_flips = min_t(size_t, 1 << prandom_u32_below(rng, 8), size); in mutate_buffer()
982 switch (prandom_u32_below(rng, 8)) { /* Choose a generation strategy */ in generate_random_bytes()
986 switch (prandom_u32_below(rng, 4)) { in generate_random_bytes()
1028 else if (prandom_u32_below(rng, 4) == 0) in generate_random_sgl_divisions()
1034 if (prandom_u32_below(rng, 4) == 0) in generate_random_sgl_divisions()
1039 div->offset = prandom_u32_below(rng, 32); in generate_random_sgl_divisions()
1041 div->offset = prandom_u32_below(rng, PAGE_SIZE); in generate_random_sgl_divisions()
1042 if (prandom_u32_below(rng, 8) == 0) in generate_random_sgl_divisions()
1047 switch (prandom_u32_below(rng, 4)) { in generate_random_sgl_divisions()
1107 switch (prandom_u32_below(rng, 4)) { in generate_random_testvec_config()
1127 switch (prandom_u32_below(rng, 4)) { in generate_random_testvec_config()
1733 if (prandom_u32_below(rng, 4) == 0) in generate_random_hash_testvec()
2344 prandom_u32_below(rng, 4) == 0); in generate_aead_message()
2417 if (prandom_u32_below(rng, 4) == 0) in generate_random_aead_testvec()
2418 vec->klen = prandom_u32_below(rng, maxkeysize + 1); in generate_random_aead_testvec()
2427 if (prandom_u32_below(rng, 4) == 0) in generate_random_aead_testvec()
2428 authsize = prandom_u32_below(rng, maxauthsize + 1); in generate_random_aead_testvec()
2438 if (prandom_u32_below(rng, 4) == 0) in generate_random_aead_testvec()
3063 if (prandom_u32_below(rng, 4) == 0) in generate_random_cipher_testvec()
3064 vec->klen = prandom_u32_below(rng, maxkeysize + 1); in generate_random_cipher_testvec()