/linux/drivers/crypto/intel/qat/qat_common/ |
H A D | adf_heartbeat_inject.c | 47 u32 rand, rand_ae, rand_thr; in adf_heartbeat_inject_error() local 55 get_random_bytes(&rand, sizeof(rand)); in adf_heartbeat_inject_error() 56 rand_ae = rand % max_aes; in adf_heartbeat_inject_error() 59 get_random_bytes(&rand, sizeof(rand)); in adf_heartbeat_inject_error() 60 rand_thr = rand % hb_ctrs; in adf_heartbeat_inject_error()
|
/linux/tools/testing/radix-tree/ |
H A D | main.c | 58 __gang_check(start, rand() % 113 + 1, rand() % 71, in __big_gang_check() 59 rand() % 157, rand() % 91 + 1); in __big_gang_check() 61 start += rand() % 1000000; in __big_gang_check() 164 start = rand(); in copy_tag_check() 165 end = rand(); in copy_tag_check() 166 if (start > end && (rand() % 10)) { in copy_tag_check() 173 cur = rand(); in copy_tag_check() 203 idx[i] = rand(); in copy_tag_check() 207 if (rand() & 1) { in copy_tag_check() 225 tmp = rand() % (count / 10 + 2); in copy_tag_check()
|
/linux/tools/testing/selftests/powerpc/ptrace/ |
H A D | ptrace-hwbreak.c | 139 if (rand() % 2) in test_workload() 155 if (rand() % 2) in test_workload() 164 gstruct.a[rand() % A_LEN] = 'a'; in test_workload() 167 cvar = gstruct.a[rand() % A_LEN]; in test_workload() 170 if (rand() % 2) in test_workload() 171 gstruct.a[rand() % A_LEN] = 'a'; in test_workload() 173 cvar = gstruct.a[rand() % A_LEN]; in test_workload() 176 gstruct.b[rand() % B_LEN] = 'b'; in test_workload() 179 cvar = gstruct.b[rand() % B_LEN]; in test_workload() 182 if (rand() % 2) in test_workload() [all …]
|
H A D | ptrace-tm-spd-vsx.c | 136 fp_load[i] = 1 + rand(); in ptrace_tm_spd_vsx() 137 fp_load_new[i] = 1 + 2 * rand(); in ptrace_tm_spd_vsx() 138 fp_load_ckpt[i] = 1 + 3 * rand(); in ptrace_tm_spd_vsx() 139 fp_load_ckpt_new[i] = 1 + 4 * rand(); in ptrace_tm_spd_vsx()
|
H A D | ptrace-tm-vsx.c | 120 fp_load[i] = 1 + rand(); in ptrace_tm_vsx() 121 fp_load_ckpt[i] = 1 + 2 * rand(); in ptrace_tm_vsx() 122 fp_load_ckpt_new[i] = 1 + 3 * rand(); in ptrace_tm_vsx()
|
/linux/tools/testing/selftests/powerpc/dscr/ |
H A D | dscr_explicit_test.c | 107 expected_dscr = rand() % DSCR_MAX; in dscr_explicit_random_thread() 110 for (int j = rand() % 5; j > 0; --j) { in dscr_explicit_random_thread() 114 if (args->do_yields && rand() % 2) in dscr_explicit_random_thread() 118 expected_dscr = rand() % DSCR_MAX; in dscr_explicit_random_thread() 121 for (int j = rand() % 5; j > 0; --j) { in dscr_explicit_random_thread() 125 if (args->do_yields && rand() % 2) in dscr_explicit_random_thread()
|
/linux/tools/testing/selftests/kvm/s390x/ |
H A D | memop.c | 291 mem1[i] = rand(); in prepare_mem12() 526 unsigned int rand; in choose_block() local 528 rand = i; in choose_block() 530 rand = rand * 19 + 11; in choose_block() 531 *size = 1 << ((rand % 3) + 2); in choose_block() 532 rand = rand * 19 + 11; in choose_block() 533 *offset = (rand % max_block) & ~(*size - 1); in choose_block() 535 rand = rand * 17 + 5; in choose_block() 536 *size = 1 << (rand % 5); in choose_block() 537 rand = rand * 17 + 5; in choose_block() [all …]
|
/linux/tools/testing/selftests/mm/ |
H A D | mlock-random-test.c | 153 int is_mlock = !!(rand() % 2); in test_mlock_within_limit() 154 int lock_size = rand() % alloc_size; in test_mlock_within_limit() 155 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_within_limit() 214 int is_mlock = !!(rand() % 2); in test_mlock_outof_limit() 215 int lock_size = (rand() % (alloc_size - cur.rlim_cur)) in test_mlock_outof_limit() 217 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_outof_limit()
|
/linux/Documentation/arch/s390/ |
H A D | mm.rst | 35 +- AMODE31_START --+- AMODE31_START --+ .amode31 rand. phys/virt start 37 +- AMODE31_END ----+- AMODE31_END ----+ .amode31 rand. phys/virt end (<2GB) 40 +- __kaslr_offset_phys | kernel rand. phys start 95 +- __kaslr_offset -+ kernel rand. virt start 99 +- kernel .bss end + kernel rand. virt end
|
/linux/include/linux/ |
H A D | randomize_kstack.h | 85 #define choose_random_kstack_offset(rand) do { \ argument 89 offset = ror32(offset, 5) ^ (rand); \ 95 #define choose_random_kstack_offset(rand) do { } while (0) argument
|
/linux/mm/ |
H A D | shuffle.c | 163 static u64 rand; in shuffle_pick_tail() local 173 rand = get_random_u64(); in shuffle_pick_tail() 176 ret = rand & 1; in shuffle_pick_tail() 179 rand >>= 1; in shuffle_pick_tail()
|
/linux/tools/testing/selftests/net/ |
H A D | ip_defrag.c | 245 if (!cfg_overlap && (rand() % 100 < 15)) { in send_udp_frags() 255 if (!cfg_overlap && (rand() % 100 < 20) && in send_udp_frags() 280 if (rand() % 100 == 1) in send_udp_frags() 299 offset = rand() % (payload_len / 2); in send_udp_frags() 300 frag_len = 2 * max_frag_len + 1 + rand() % 256; in send_udp_frags() 328 if (rand() % 100 == 1) in send_udp_frags() 364 payload_len += (rand() % 4096)) { in run_test() 375 rand() % (1500 - FRAG_HLEN - min_frag_len); in run_test() 389 max_frag_len += 8 * (rand() % 8); in run_test()
|
/linux/tools/testing/selftests/bpf/ |
H A D | bpf_rand.h | 11 return (((uint64_t)(uint32_t)rand()) | in bpf_rand_mask() 12 ((uint64_t)(uint32_t)rand() << 32)) & mask; in bpf_rand_mask() 37 switch (rand() % 39) { in bpf_semi_rand_get()
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | tcp_hdr_options.c | 64 prefix ? : "", opt->flags, opt->max_delack_ms, opt->rand); in print_option() 304 exp_passive_estab_in.rand = 0xfa; in fastopen_estab() 308 exp_active_estab_in.rand = 0xce; in fastopen_estab() 341 exp_passive_estab_in.rand = 0xfa; in syncookie_estab() 346 exp_active_estab_in.rand = 0xce; in syncookie_estab() 385 exp_passive_fin_in.rand = 0xfa; in fin() 388 exp_active_fin_in.rand = 0xce; in fin() 417 exp_passive_estab_in.rand = 0xfa; in __simple_estab() 421 exp_active_estab_in.rand = 0xce; in __simple_estab()
|
/linux/kernel/rcu/ |
H A D | rcutorture.c | 1410 static DEFINE_TORTURE_RANDOM(rand); in rcu_torture_writer() 1449 torture_hrtimeout_us(500, 1000, &rand); in rcu_torture_writer() 1456 udelay(torture_random(&rand) & 0x3ff); in rcu_torture_writer() 1503 switch (synctype[torture_random(&rand) % nsynctypes]) { in rcu_torture_writer() 1510 do_rtws_sync(&rand, cur_ops->exp_sync); in rcu_torture_writer() 1516 torture_hrtimeout_jiffies(torture_random(&rand) % 16, &rand); in rcu_torture_writer() 1524 torture_hrtimeout_jiffies(torture_random(&rand) % 16, &rand); in rcu_torture_writer() 1532 torture_hrtimeout_jiffies(torture_random(&rand) % 16, &rand); in rcu_torture_writer() 1540 torture_hrtimeout_jiffies(torture_random(&rand) % 16, &rand); in rcu_torture_writer() 1560 torture_hrtimeout_jiffies(torture_random(&rand) % 16, in rcu_torture_writer() [all …]
|
/linux/lib/ |
H A D | crc16_kunit.c | 61 static u32 rand = CRC16_KUNIT_SEED; in _rand16() local 63 rand = next_pseudo_random32(rand); in _rand16() 64 return rand & 0xFFFF; in _rand16()
|
/linux/net/rds/ |
H A D | threads.c | 126 unsigned long rand; in rds_queue_reconnect() local 148 get_random_bytes(&rand, sizeof(rand)); in rds_queue_reconnect() 150 rand % cp->cp_reconnect_jiffies, cp->cp_reconnect_jiffies, in rds_queue_reconnect() 155 rand % cp->cp_reconnect_jiffies); in rds_queue_reconnect()
|
/linux/tools/perf/tests/ |
H A D | wp.c | 83 unsigned long tmp, tmp1 = rand(); in test__wp_ro() 107 unsigned long tmp, tmp1 = rand(); in test__wp_wo() 131 unsigned long tmp, tmp1 = rand(); in test__wp_rw() 155 unsigned long tmp = rand(); in test__wp_modify()
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | struct_ops_nulled_out_cb.c | 9 int rand; variable 15 return arr[rand]; /* potentially way out of range access */ in BPF_PROG()
|
/linux/kernel/ |
H A D | torture.c | 345 DEFINE_TORTURE_RANDOM(rand); in torture_onoff() 359 torture_hrtimeout_jiffies(onoff_holdoff, &rand); in torture_onoff() 364 torture_hrtimeout_jiffies(HZ / 10, &rand); in torture_onoff() 367 cpu = torture_random(&rand) % (maxcpu + 1); in torture_onoff() 374 torture_hrtimeout_jiffies(onoff_interval, &rand); in torture_onoff() 561 DEFINE_TORTURE_RANDOM(rand); in torture_shuffle() 565 torture_hrtimeout_jiffies(shuffle_interval, &rand); in torture_shuffle() 566 torture_shuffle_tasks(&rand); in torture_shuffle()
|
/linux/tools/testing/selftests/net/tcp_ao/lib/ |
H A D | utils.c | 15 *p++ = rand(); in randomize_buffer() 18 int tmp = rand(); in randomize_buffer()
|
/linux/arch/x86/kernel/ |
H A D | espfix_64.c | 97 unsigned long rand = get_random_long(); in init_espfix_random() local 99 slot_random = rand % ESPFIX_STACKS_PER_PAGE; in init_espfix_random() 100 page_random = (rand / ESPFIX_STACKS_PER_PAGE) in init_espfix_random()
|
/linux/samples/bpf/ |
H A D | map_perf_test_user.c | 382 key->prefixlen = rand() % 33; in fill_lpm_trie() 383 key->data[0] = rand() & 0xff; in fill_lpm_trie() 384 key->data[1] = rand() & 0xff; in fill_lpm_trie() 385 key->data[2] = rand() & 0xff; in fill_lpm_trie() 386 key->data[3] = rand() & 0xff; in fill_lpm_trie()
|
/linux/tools/testing/selftests/sync/ |
H A D | sync_stress_merge.c | 64 timeline_offset = rand() % timeline_count; in test_merge_stress_random_merge() 66 sync_point = rand(); in test_merge_stress_random_merge()
|
/linux/net/rose/ |
H A D | rose_subr.c | 259 facilities->rand = ((p[1] << 8) & 0xFF00) + ((p[2] << 0) & 0x00FF); in rose_parse_national() 443 if (rose->rand != 0 || rose->source_ndigis == 1 || rose->dest_ndigis == 1) { in rose_create_facilities() 447 if (rose->rand != 0) { in rose_create_facilities() 449 *p++ = (rose->rand >> 8) & 0xFF; in rose_create_facilities() 450 *p++ = (rose->rand >> 0) & 0xFF; in rose_create_facilities()
|