Lines Matching refs:prandom_u32_max
858 unsigned int len = prandom_u32_max(max_len + 1); in generate_random_length()
860 switch (prandom_u32_max(4)) { in generate_random_length()
877 bitpos = prandom_u32_max(size * 8); in flip_random_bit()
884 buf[prandom_u32_max(size)] ^= 0xff; in flip_random_byte()
894 if (prandom_u32_max(4) == 0) { in mutate_buffer()
895 num_flips = min_t(size_t, 1 << prandom_u32_max(8), size * 8); in mutate_buffer()
901 if (prandom_u32_max(4) == 0) { in mutate_buffer()
902 num_flips = min_t(size_t, 1 << prandom_u32_max(8), size); in mutate_buffer()
918 switch (prandom_u32_max(8)) { /* Choose a generation strategy */ in generate_random_bytes()
922 switch (prandom_u32_max(4)) { in generate_random_bytes()
962 if (div == &divs[max_divs - 1] || prandom_u32_max(2) == 0) in generate_random_sgl_divisions()
965 this_len = 1 + prandom_u32_max(remaining); in generate_random_sgl_divisions()
968 if (prandom_u32_max(4) == 0) in generate_random_sgl_divisions()
969 div->offset = (PAGE_SIZE - 128) + prandom_u32_max(128); in generate_random_sgl_divisions()
970 else if (prandom_u32_max(2) == 0) in generate_random_sgl_divisions()
971 div->offset = prandom_u32_max(32); in generate_random_sgl_divisions()
973 div->offset = prandom_u32_max(PAGE_SIZE); in generate_random_sgl_divisions()
974 if (prandom_u32_max(8) == 0) in generate_random_sgl_divisions()
979 switch (prandom_u32_max(4)) { in generate_random_sgl_divisions()
991 prandom_u32_max(2) == 0) in generate_random_sgl_divisions()
1038 switch (prandom_u32_max(4)) { in generate_random_testvec_config()
1053 if (prandom_u32_max(2) == 0) { in generate_random_testvec_config()
1058 switch (prandom_u32_max(4)) { in generate_random_testvec_config()
1074 prandom_u32_max(2) == 0) { in generate_random_testvec_config()
1087 if (cfg->inplace_mode == OUT_OF_PLACE && prandom_u32_max(2) == 0) { in generate_random_testvec_config()
1096 if (prandom_u32_max(2) == 0) { in generate_random_testvec_config()
1097 cfg->iv_offset = 1 + prandom_u32_max(MAX_ALGAPI_ALIGNMASK); in generate_random_testvec_config()
1101 if (prandom_u32_max(2) == 0) { in generate_random_testvec_config()
1102 cfg->key_offset = 1 + prandom_u32_max(MAX_ALGAPI_ALIGNMASK); in generate_random_testvec_config()
1655 if (prandom_u32_max(4) == 0) in generate_random_hash_testvec()
1656 vec->ksize = 1 + prandom_u32_max(maxkeysize); in generate_random_hash_testvec()
2221 if (prandom_u32_max(2) == 0 && vec->alen > aad_tail_size) { in mutate_aead_message()
2224 if (prandom_u32_max(2) == 0) in mutate_aead_message()
2227 if (prandom_u32_max(2) == 0) { in mutate_aead_message()
2252 (prefer_inauthentic || prandom_u32_max(4) == 0); in generate_aead_message()
2260 if (inauthentic && prandom_u32_max(2) == 0) { in generate_aead_message()
2324 if (prandom_u32_max(4) == 0) in generate_random_aead_testvec()
2325 vec->klen = prandom_u32_max(maxkeysize + 1); in generate_random_aead_testvec()
2334 if (prandom_u32_max(4) == 0) in generate_random_aead_testvec()
2335 authsize = prandom_u32_max(maxauthsize + 1); in generate_random_aead_testvec()
2345 if (prandom_u32_max(4) == 0) in generate_random_aead_testvec()
2961 if (prandom_u32_max(4) == 0) in generate_random_cipher_testvec()
2962 vec->klen = prandom_u32_max(maxkeysize + 1); in generate_random_cipher_testvec()