rand 97 arch/x86/kernel/espfix_64.c unsigned long rand; rand 103 arch/x86/kernel/espfix_64.c if (!arch_get_random_long(&rand)) { rand 105 arch/x86/kernel/espfix_64.c rand = rdtsc(); rand 106 arch/x86/kernel/espfix_64.c rand *= 0xc345c6b72fd16123UL; rand 109 arch/x86/kernel/espfix_64.c slot_random = rand % ESPFIX_STACKS_PER_PAGE; rand 110 arch/x86/kernel/espfix_64.c page_random = (rand / ESPFIX_STACKS_PER_PAGE) rand 78 arch/x86/mm/kaslr.c unsigned long rand, memory_tb; rand 136 arch/x86/mm/kaslr.c prandom_bytes_state(&rand_state, &rand, sizeof(rand)); rand 137 arch/x86/mm/kaslr.c entropy = (rand % (entropy + 1)) & PUD_MASK; rand 61 drivers/leds/leds-blinkm.c u8 rand:1; /* rand fade mode on = 1 */ rand 259 drivers/net/hamradio/dmascc.c static unsigned long rand; rand 305 drivers/net/hamradio/dmascc.c rand = jiffies; rand 1084 drivers/net/hamradio/dmascc.c rand = rand * 1664525L + 1013904223L; rand 1085 drivers/net/hamradio/dmascc.c return (unsigned char) (rand >> 24); rand 1136 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c u32 rand = (prandom_u32() % (64 - 36)) + 36; rand 1138 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c ieee80211_tu_to_usec(data.beacon_int * rand / rand 750 include/net/bluetooth/hci.h __u8 rand[16]; rand 1066 include/net/bluetooth/hci.h __u8 rand[16]; rand 1482 include/net/bluetooth/hci.h __le64 rand; rand 2157 include/net/bluetooth/hci.h __le64 rand; rand 137 include/net/bluetooth/hci_core.h __le64 rand; rand 1111 include/net/bluetooth/hci_core.h u8 tk[16], u8 enc_size, __le16 ediv, __le64 rand); rand 1597 include/net/bluetooth/hci_core.h void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand, rand 201 include/net/bluetooth/mgmt.h __le64 rand; rand 318 include/net/bluetooth/mgmt.h __u8 rand[16]; rand 123 include/net/rose.h unsigned int rand; rand 135 include/net/rose.h unsigned int lci, rand; rand 86 include/uapi/linux/rose.h unsigned int rand; rand 622 kernel/locking/locktorture.c static DEFINE_TORTURE_RANDOM(rand); rand 628 kernel/locking/locktorture.c if ((torture_random(&rand) & 0xfffff) == 0) rand 631 kernel/locking/locktorture.c cxt.cur_ops->task_boost(&rand); rand 640 kernel/locking/locktorture.c cxt.cur_ops->write_delay(&rand); rand 659 kernel/locking/locktorture.c static DEFINE_TORTURE_RANDOM(rand); rand 665 kernel/locking/locktorture.c if ((torture_random(&rand) & 0xfffff) == 0) rand 674 kernel/locking/locktorture.c cxt.cur_ops->read_delay(&rand); rand 948 kernel/rcu/rcutorture.c static DEFINE_TORTURE_RANDOM(rand); rand 1005 kernel/rcu/rcutorture.c udelay(torture_random(&rand) & 0x3ff); rand 1018 kernel/rcu/rcutorture.c switch (synctype[torture_random(&rand) % nsynctypes]) { rand 1031 kernel/rcu/rcutorture.c i = torture_random(&rand) % 16; rand 1034 kernel/rcu/rcutorture.c udelay(torture_random(&rand) % 1000); rand 1053 kernel/rcu/rcutorture.c !(torture_random(&rand) & 0xff & (!!expediting - 1))) { rand 1100 kernel/rcu/rcutorture.c DEFINE_TORTURE_RANDOM(rand); rand 1106 kernel/rcu/rcutorture.c schedule_timeout_uninterruptible(1 + torture_random(&rand)%10); rand 1107 kernel/rcu/rcutorture.c udelay(torture_random(&rand) & 0x3ff); rand 1109 kernel/rcu/rcutorture.c torture_random(&rand) % (nfakewriters * 8) == 0) { rand 1112 kernel/rcu/rcutorture.c if (cur_ops->sync && torture_random(&rand) & 0x80) rand 1359 kernel/rcu/rcutorture.c DEFINE_TORTURE_RANDOM(rand); rand 1372 kernel/rcu/rcutorture.c if (!rcu_torture_one_read(&rand)) rand 188 kernel/torture.c DEFINE_TORTURE_RANDOM(rand); rand 218 kernel/torture.c cpu = (torture_random(&rand) >> 4) % (maxcpu + 1); rand 35 lib/raid6/test/test.c data[i][j] = rand(); rand 95 lib/test_printf.c int rand; rand 114 lib/test_printf.c rand = 1 + prandom_u32_max(elen+1); rand 116 lib/test_printf.c failed_tests += do_test(rand, expect, elen, fmt, ap); rand 189 mm/shuffle.c static u64 rand; rand 198 mm/shuffle.c rand = get_random_u64(); rand 201 mm/shuffle.c if (rand & 1) rand 206 mm/shuffle.c rand >>= 1; rand 2394 mm/slab.c unsigned int rand; rand 2397 mm/slab.c rand = get_random_int(); rand 2401 mm/slab.c prandom_seed_state(&state->rnd_state, rand); rand 2406 mm/slab.c state->pos = rand % count; rand 2433 mm/slab.c unsigned int objfreelist = 0, i, rand, count = cachep->num; rand 2463 mm/slab.c rand = prandom_u32_state(&state.rnd_state); rand 2464 mm/slab.c rand %= (i + 1); rand 2465 mm/slab.c swap_free_obj(page, i, rand); rand 1345 mm/slab_common.c unsigned int rand; rand 1353 mm/slab_common.c rand = prandom_u32_state(state); rand 1354 mm/slab_common.c rand %= (i + 1); rand 1355 mm/slab_common.c swap(list[i], list[rand]); rand 357 net/bluetooth/hci_conn.c void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand, rand 368 net/bluetooth/hci_conn.c cp.rand = rand; rand 2493 net/bluetooth/hci_core.c u8 tk[16], u8 enc_size, __le16 ediv, __le64 rand) rand 2513 net/bluetooth/hci_core.c key->rand = rand; rand 771 net/bluetooth/hci_debugfs.c __le64_to_cpu(ltk->rand), 16, ltk->val); rand 4750 net/bluetooth/hci_event.c memcpy(cp.rand, data->rand192, sizeof(cp.rand)); rand 5590 net/bluetooth/hci_event.c if (ev->ediv || ev->rand) rand 5594 net/bluetooth/hci_event.c if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) rand 3566 net/bluetooth/mgmt.c memcpy(mgmt_rp.rand192, rp->rand, sizeof(rp->rand)); rand 3674 net/bluetooth/mgmt.c cp->rand, NULL, NULL); rand 5164 net/bluetooth/mgmt.c key->val, key->enc_size, key->ediv, key->rand); rand 6054 net/bluetooth/mgmt.c r192 = rp->rand; rand 6162 net/bluetooth/mgmt.c u8 status, flags, role, addr[7], hash[16], rand[16]; rand 6222 net/bluetooth/mgmt.c smp_generate_oob(hdev, hash, rand) < 0) { rand 6273 net/bluetooth/mgmt.c rand, sizeof(rand)); rand 7151 net/bluetooth/mgmt.c ev.key.rand = key->rand; rand 548 net/bluetooth/smp.c int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16]) rand 592 net/bluetooth/smp.c memcpy(rand, smp->local_rand, 16); rand 996 net/bluetooth/smp.c __le64 rand = 0; rand 1004 net/bluetooth/smp.c hci_le_start_enc(hcon, ediv, rand, stk, smp->enc_key_size); rand 1009 net/bluetooth/smp.c __le64 rand = 0; rand 1027 net/bluetooth/smp.c SMP_STK, auth, stk, smp->enc_key_size, ediv, rand); rand 1277 net/bluetooth/smp.c __le64 rand; rand 1288 net/bluetooth/smp.c get_random_bytes(&rand, sizeof(rand)); rand 1295 net/bluetooth/smp.c smp->enc_key_size, ediv, rand); rand 1299 net/bluetooth/smp.c ident.rand = rand; rand 2222 net/bluetooth/smp.c hci_le_start_enc(hcon, key->ediv, key->rand, key->val, key->enc_size); rand 2499 net/bluetooth/smp.c rp->ediv, rp->rand); rand 85 net/bluetooth/smp.h __le64 rand; rand 194 net/bluetooth/smp.h int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16]); rand 324 net/ipv4/tcp_nv.c unsigned char rand; rand 328 net/ipv4/tcp_nv.c get_random_bytes(&rand, 1); rand 330 net/ipv4/tcp_nv.c now + ((nv_reset_period * (384 + rand) * HZ) >> 9); rand 236 net/ipv4/udp.c unsigned int rand; rand 243 net/ipv4/udp.c rand = prandom_u32(); rand 244 net/ipv4/udp.c first = reciprocal_scale(rand, remaining) + low; rand 248 net/ipv4/udp.c rand = (rand | 1) * (udptable->mask + 1); rand 268 net/ipv4/udp.c snum += rand; rand 683 net/mac80211/mesh_plink.c u32 rand; rand 688 net/mac80211/mesh_plink.c get_random_bytes(&rand, sizeof(u32)); rand 690 net/mac80211/mesh_plink.c rand % sta->mesh->plink_timeout; rand 126 net/rds/threads.c unsigned long rand; rand 148 net/rds/threads.c get_random_bytes(&rand, sizeof(rand)); rand 150 net/rds/threads.c rand % cp->cp_reconnect_jiffies, cp->cp_reconnect_jiffies, rand 155 net/rds/threads.c rand % cp->cp_reconnect_jiffies); rand 780 net/rose/af_rose.c rose->rand = ((long)rose & 0xFFFF) + rose->lci; rand 1032 net/rose/rose_route.c if (rose_route->rand == facilities.rand && rand 1062 net/rose/rose_route.c rose_route->rand = facilities.rand; rand 259 net/rose/rose_subr.c facilities->rand = ((p[1] << 8) & 0xFF00) + ((p[2] << 0) & 0x00FF); rand 443 net/rose/rose_subr.c if (rose->rand != 0 || rose->source_ndigis == 1 || rose->dest_ndigis == 1) { rand 447 net/rose/rose_subr.c if (rose->rand != 0) { rand 449 net/rose/rose_subr.c *p++ = (rose->rand >> 8) & 0xFF; rand 450 net/rose/rose_subr.c *p++ = (rose->rand >> 0) & 0xFF; rand 1697 net/sunrpc/xprtsock.c unsigned short rand; rand 1702 net/sunrpc/xprtsock.c rand = (unsigned short) prandom_u32() % range; rand 1703 net/sunrpc/xprtsock.c return rand + min; rand 132 samples/bpf/hbm_edt_kern.c unsigned int rand = bpf_get_prandom_u32(); rand 135 samples/bpf/hbm_edt_kern.c (rand % MARK_REGION_SIZE_NS)) { rand 149 samples/bpf/hbm_out_kern.c unsigned int rand = bpf_get_prandom_u32(); rand 152 samples/bpf/hbm_out_kern.c (rand % MARK_REGION_SIZE)) { rand 375 samples/bpf/map_perf_test_user.c key->prefixlen = rand() % 33; rand 376 samples/bpf/map_perf_test_user.c key->data[0] = rand() & 0xff; rand 377 samples/bpf/map_perf_test_user.c key->data[1] = rand() & 0xff; rand 378 samples/bpf/map_perf_test_user.c key->data[2] = rand() & 0xff; rand 379 samples/bpf/map_perf_test_user.c key->data[3] = rand() & 0xff; rand 446 samples/bpf/test_lru_dist.c rn = rand(); rand 79 samples/bpf/test_map_in_map_user.c port_key = rand() & 0x00FF; rand 1196 scripts/kconfig/confdata.c def = (rand() % cnt); rand 1310 scripts/kconfig/confdata.c cnt = rand() % 100; rand 75 tools/io_uring/io_uring-bench.c struct drand48_data rand; rand 168 tools/io_uring/io_uring-bench.c lrand48_r(&s->rand, &r); rand 286 tools/io_uring/io_uring-bench.c srand48_r(pthread_self(), &s->rand); rand 848 tools/perf/arch/arm/util/cs-etm.c return (((u64) rand() << 0) & 0x00000000FFFFFFFFull) | rand 849 tools/perf/arch/arm/util/cs-etm.c (((u64) rand() << 32) & 0xFFFFFFFF00000000ull); rand 172 tools/perf/bench/epoll-wait.c size_t j = i + rand() / (RAND_MAX / (n - i) + 1); rand 414 tools/perf/bench/numa.c long off = rand(); rand 1322 tools/perf/bench/numa.c td->val = rand(); rand 100 tools/perf/tests/mmap-basic.c expected_nr_events[i] = 1 + rand() % 127; rand 68 tools/perf/tests/wp.c unsigned long tmp, tmp1 = rand(); rand 87 tools/perf/tests/wp.c unsigned long tmp, tmp1 = rand(); rand 106 tools/perf/tests/wp.c unsigned long tmp, tmp1 = rand(); rand 126 tools/perf/tests/wp.c unsigned long tmp = rand(); rand 472 tools/testing/radix-tree/idr-test.c int i = rand(); rand 176 tools/testing/radix-tree/iteration_check.c seeds[i] = rand(); rand 58 tools/testing/radix-tree/main.c __gang_check(start, rand() % 113 + 1, rand() % 71, rand 59 tools/testing/radix-tree/main.c rand() % 157, rand() % 91 + 1); rand 61 tools/testing/radix-tree/main.c start += rand() % 1000000; rand 164 tools/testing/radix-tree/main.c start = rand(); rand 165 tools/testing/radix-tree/main.c end = rand(); rand 166 tools/testing/radix-tree/main.c if (start > end && (rand() % 10)) { rand 173 tools/testing/radix-tree/main.c cur = rand(); rand 203 tools/testing/radix-tree/main.c idx[i] = rand(); rand 207 tools/testing/radix-tree/main.c if (rand() & 1) { rand 225 tools/testing/radix-tree/main.c tmp = rand() % (count / 10 + 2); rand 180 tools/testing/radix-tree/tag_check.c index = rand() % THRASH_SIZE; rand 192 tools/testing/radix-tree/tag_check.c index = rand() % THRASH_SIZE; rand 210 tools/testing/radix-tree/tag_check.c index = rand() % THRASH_SIZE; rand 225 tools/testing/radix-tree/tag_check.c index = rand() % THRASH_SIZE; rand 11 tools/testing/selftests/bpf/bpf_rand.h return (((uint64_t)(uint32_t)rand()) | rand 12 tools/testing/selftests/bpf/bpf_rand.h ((uint64_t)(uint32_t)rand() << 32)) & mask; rand 37 tools/testing/selftests/bpf/bpf_rand.h switch (rand() % 39) { rand 20 tools/testing/selftests/bpf/prog_tests/queue_stack_map.c vals[i] = rand(); rand 183 tools/testing/selftests/bpf/test_lpm_map.c rand() % 0xff, rand 184 tools/testing/selftests/bpf/test_lpm_map.c rand() % 0xff, rand 185 tools/testing/selftests/bpf/test_lpm_map.c }, rand() % 16 + 1); rand 191 tools/testing/selftests/bpf/test_lpm_map.c uint8_t key[] = { rand() % 0xff, rand() % 0xff }; rand 245 tools/testing/selftests/bpf/test_lpm_map.c value[j] = rand() & 0xff; rand 246 tools/testing/selftests/bpf/test_lpm_map.c value[keysize] = rand() % (8 * keysize + 1); rand 258 tools/testing/selftests/bpf/test_lpm_map.c data[j] = rand() & 0xff; rand 295 tools/testing/selftests/bpf/test_lpm_map.c data[j] = rand() & 0xff; rand 534 tools/testing/selftests/bpf/test_maps.c vals[i] = rand(); rand 592 tools/testing/selftests/bpf/test_maps.c vals[i] = rand(); rand 33 tools/testing/selftests/bpf/test_tag.c prog[i] = BPF_ALU64_IMM(BPF_MOV, i % BPF_REG_10, rand()); rand 956 tools/testing/selftests/cgroup/test_memcontrol.c port = args.port = 1000 + rand() % 60000; rand 134 tools/testing/selftests/ir/ir_loopback.c unsigned int scancode = rand() & protocols[i].mask; rand 73 tools/testing/selftests/kvm/x86_64/mmio_warning_test.c usleep(rand() % 10000); rand 76 tools/testing/selftests/media_tests/media_device_test.c count = rand(); rand 70 tools/testing/selftests/media_tests/video_device_test.c count = rand(); rand 245 tools/testing/selftests/net/ip_defrag.c if (!cfg_overlap && (rand() % 100 < 15)) { rand 255 tools/testing/selftests/net/ip_defrag.c if (!cfg_overlap && (rand() % 100 < 20) && rand 280 tools/testing/selftests/net/ip_defrag.c if (rand() % 100 == 1) rand 299 tools/testing/selftests/net/ip_defrag.c offset = rand() % (payload_len / 2); rand 300 tools/testing/selftests/net/ip_defrag.c frag_len = 2 * max_frag_len + 1 + rand() % 256; rand 328 tools/testing/selftests/net/ip_defrag.c if (rand() % 100 == 1) rand 364 tools/testing/selftests/net/ip_defrag.c payload_len += (rand() % 4096)) { rand 375 tools/testing/selftests/net/ip_defrag.c rand() % (1500 - FRAG_HLEN - min_frag_len); rand 389 tools/testing/selftests/net/ip_defrag.c max_frag_len += 8 * (rand() % 8); rand 157 tools/testing/selftests/net/psock_tpacket.c ((uint8_t *) pay)[i + sizeof(*eth)] = (uint8_t) rand(); rand 124 tools/testing/selftests/net/tcp_fastopen_backup_key.c keys[i] = rand(); rand 225 tools/testing/selftests/net/tcp_fastopen_backup_key.c new_key[i] = rand(); rand 84 tools/testing/selftests/powerpc/dscr/dscr_default_test.c double ret = uniform_deviate(rand()); rand 29 tools/testing/selftests/powerpc/dscr/dscr_explicit_test.c double ret = uniform_deviate(rand()); rand 46 tools/testing/selftests/powerpc/dscr/dscr_explicit_test.c ret = uniform_deviate(rand()); rand 47 tools/testing/selftests/powerpc/math/fpu_preempt.c darray[i] = rand(); rand 68 tools/testing/selftests/powerpc/math/fpu_signal.c darray[i] = rand(); rand 48 tools/testing/selftests/powerpc/math/vmx_preempt.c varray[i][j] = rand(); rand 86 tools/testing/selftests/powerpc/math/vmx_signal.c varray[i][j] = rand(); rand 79 tools/testing/selftests/powerpc/math/vsx_preempt.c varray[i][j] = rand(); rand 86 tools/testing/selftests/powerpc/ptrace/perf-hwbreak.c int loop_num = MAX_LOOPS - (rand() % 100); /* provide some variability */ rand 135 tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c fp_load[i] = 1 + rand(); rand 136 tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c fp_load_new[i] = 1 + 2 * rand(); rand 137 tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c fp_load_ckpt[i] = 1 + 3 * rand(); rand 138 tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c fp_load_ckpt_new[i] = 1 + 4 * rand(); rand 119 tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c fp_load[i] = 1 + rand(); rand 120 tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c fp_load_ckpt[i] = 1 + 2 * rand(); rand 121 tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c fp_load_ckpt_new[i] = 1 + 3 * rand(); rand 67 tools/testing/selftests/powerpc/ptrace/ptrace-vsx.c fp_load[i] = i + rand(); rand 70 tools/testing/selftests/powerpc/ptrace/ptrace-vsx.c fp_load_new[i] = i + 2 * rand(); rand 67 tools/testing/selftests/powerpc/signal/sigfuz.c return rand() % x == 0; rand 102 tools/testing/selftests/powerpc/signal/sigfuz.c memset(ucp->uc_link, rand(), sizeof(ucontext_t)); rand 64 tools/testing/selftests/sync/sync_stress_merge.c timeline_offset = rand() % timeline_count; rand 66 tools/testing/selftests/sync/sync_stress_merge.c sync_point = rand(); rand 163 tools/testing/selftests/timers/freq-step.c usleep(rand() % 2000000 * STEP_INTERVAL / 10); rand 168 tools/testing/selftests/timers/freq-step.c usleep(rand() % 2000000 * MEAN_SAMPLE_INTERVAL); rand 251 tools/testing/selftests/timers/freq-step.c freq_base = (rand() % (1 << 24) - (1 << 23)) / 65536e6; rand 161 tools/testing/selftests/vm/mlock-random-test.c int is_mlock = !!(rand() % 2); rand 162 tools/testing/selftests/vm/mlock-random-test.c int lock_size = rand() % alloc_size; rand 163 tools/testing/selftests/vm/mlock-random-test.c int start_offset = rand() % (alloc_size - lock_size); rand 232 tools/testing/selftests/vm/mlock-random-test.c int is_mlock = !!(rand() % 2); rand 233 tools/testing/selftests/vm/mlock-random-test.c int lock_size = (rand() % (alloc_size - cur.rlim_cur)) rand 235 tools/testing/selftests/vm/mlock-random-test.c int start_offset = rand() % (alloc_size - lock_size); rand 287 tools/testing/selftests/vm/userfaultfd.c struct random_data rand; rand 299 tools/testing/selftests/vm/userfaultfd.c bzero(&rand, sizeof(rand)); rand 301 tools/testing/selftests/vm/userfaultfd.c if (initstate_r(seed, randstate, sizeof(randstate), &rand)) rand 311 tools/testing/selftests/vm/userfaultfd.c if (random_r(&rand, &rand_nr)) rand 315 tools/testing/selftests/vm/userfaultfd.c if (random_r(&rand, &rand_nr)) rand 60 tools/testing/selftests/vm/virtual_address_range.c int bits = HIGH_ADDR_SHIFT + rand() % (63 - HIGH_ADDR_SHIFT); rand 628 tools/testing/selftests/x86/protection_keys.c random_index = rand() % nr_alloced;