Home
last modified time | relevance | path

Searched refs:rand (Results 1 – 43 of 43) sorted by relevance

/linux-4.4.14/arch/x86/kernel/
Despfix_64.c105 unsigned long rand; in init_espfix_random() local
111 if (!arch_get_random_long(&rand)) { in init_espfix_random()
113 rand = rdtsc(); in init_espfix_random()
114 rand *= 0xc345c6b72fd16123UL; in init_espfix_random()
117 slot_random = rand % ESPFIX_STACKS_PER_PAGE; in init_espfix_random()
118 page_random = (rand / ESPFIX_STACKS_PER_PAGE) in init_espfix_random()
/linux-4.4.14/net/rds/
Dthreads.c115 unsigned long rand; in rds_queue_reconnect() local
128 get_random_bytes(&rand, sizeof(rand)); in rds_queue_reconnect()
130 rand % conn->c_reconnect_jiffies, conn->c_reconnect_jiffies, in rds_queue_reconnect()
133 rand % conn->c_reconnect_jiffies); in rds_queue_reconnect()
/linux-4.4.14/tools/testing/selftests/powerpc/dscr/
Ddscr_explicit_test.c32 double ret = uniform_deviate(rand()); in dscr_explicit()
49 ret = uniform_deviate(rand()); in dscr_explicit()
Ddscr_default_test.c87 double ret = uniform_deviate(rand()); in dscr_default()
/linux-4.4.14/kernel/rcu/
Drcutorture.c908 static DEFINE_TORTURE_RANDOM(rand); in rcu_torture_writer()
959 udelay(torture_random(&rand) & 0x3ff); in rcu_torture_writer()
972 switch (synctype[torture_random(&rand) % nsynctypes]) { in rcu_torture_writer()
985 i = torture_random(&rand) % 16; in rcu_torture_writer()
988 udelay(torture_random(&rand) % 1000); in rcu_torture_writer()
1006 !(torture_random(&rand) & 0xff & (!!expediting - 1))) { in rcu_torture_writer()
1036 DEFINE_TORTURE_RANDOM(rand); in rcu_torture_fakewriter()
1042 schedule_timeout_uninterruptible(1 + torture_random(&rand)%10); in rcu_torture_fakewriter()
1043 udelay(torture_random(&rand) & 0x3ff); in rcu_torture_fakewriter()
1045 torture_random(&rand) % (nfakewriters * 8) == 0) { in rcu_torture_fakewriter()
[all …]
/linux-4.4.14/tools/testing/selftests/vm/
Duserfaultfd.c112 struct random_data rand; in locking_thread() local
124 bzero(&rand, sizeof(rand)); in locking_thread()
126 if (initstate_r(seed, randstate, sizeof(randstate), &rand)) in locking_thread()
136 if (random_r(&rand, &rand_nr)) in locking_thread()
140 if (random_r(&rand, &rand_nr)) in locking_thread()
/linux-4.4.14/kernel/locking/
Dlocktorture.c579 static DEFINE_TORTURE_RANDOM(rand); in lock_torture_writer()
585 if ((torture_random(&rand) & 0xfffff) == 0) in lock_torture_writer()
588 cxt.cur_ops->task_boost(&rand); in lock_torture_writer()
597 cxt.cur_ops->write_delay(&rand); in lock_torture_writer()
616 static DEFINE_TORTURE_RANDOM(rand); in lock_torture_reader()
622 if ((torture_random(&rand) & 0xfffff) == 0) in lock_torture_reader()
631 cxt.cur_ops->read_delay(&rand); in lock_torture_reader()
/linux-4.4.14/net/netfilter/
Dxt_connlimit.c370 u_int32_t rand; in connlimit_mt_check() local
373 get_random_bytes(&rand, sizeof(rand)); in connlimit_mt_check()
374 } while (!rand); in connlimit_mt_check()
375 cmpxchg(&connlimit_rnd, 0, rand); in connlimit_mt_check()
Dnf_conntrack_core.c801 unsigned int rand; in init_nf_conntrack_hash_rnd() local
809 get_random_bytes(&rand, sizeof(rand)); in init_nf_conntrack_hash_rnd()
810 } while (!rand); in init_nf_conntrack_hash_rnd()
811 cmpxchg(&nf_conntrack_hash_rnd, 0, rand); in init_nf_conntrack_hash_rnd()
/linux-4.4.14/net/rose/
Drose_subr.c259 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()
Drose_route.c1028 if (rose_route->rand == facilities.rand && in rose_route_frame()
1058 rose_route->rand = facilities.rand; in rose_route_frame()
Daf_rose.c802 rose->rand = ((long)rose & 0xFFFF) + rose->lci; in rose_connect()
/linux-4.4.14/lib/
Dtest_printf.c91 int rand; in __test() local
105 rand = 1 + prandom_u32_max(elen+1); in __test()
107 failed_tests += do_test(rand, expect, elen, fmt, ap); in __test()
/linux-4.4.14/net/bluetooth/
Dsmp.h84 __le64 rand; member
192 int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16]);
Dsmp.c555 int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16]) in smp_generate_oob()
597 memcpy(rand, smp->local_rand, 16); in smp_generate_oob()
1001 __le64 rand = 0; in smp_random() local
1009 hci_le_start_enc(hcon, ediv, rand, stk, smp->enc_key_size); in smp_random()
1014 __le64 rand = 0; in smp_random() local
1032 SMP_STK, auth, stk, smp->enc_key_size, ediv, rand); in smp_random()
1263 __le64 rand; in smp_distribute_keys() local
1274 get_random_bytes(&rand, sizeof(rand)); in smp_distribute_keys()
1281 smp->enc_key_size, ediv, rand); in smp_distribute_keys()
1285 ident.rand = rand; in smp_distribute_keys()
[all …]
Decc.c802 u64 rand[NUM_ECC_DIGITS]; in ecdh_shared_secret() local
805 get_random_bytes(rand, ECC_BYTES); in ecdh_shared_secret()
811 ecc_point_mult(&product, &pk, priv, rand, vli_num_bits(priv)); in ecdh_shared_secret()
Dhci_conn.c353 void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand, in hci_le_start_enc() argument
364 cp.rand = rand; in hci_le_start_enc()
Dmgmt.c3945 memcpy(mgmt_rp.rand192, rp->rand, sizeof(rp->rand)); in read_local_oob_data_complete()
4053 cp->rand, NULL, NULL); in add_remote_oob_data()
5705 key->val, key->enc_size, key->ediv, key->rand); in load_long_term_keys()
6679 r192 = rp->rand; in read_local_oob_ext_data_complete()
6787 u8 status, flags, role, addr[7], hash[16], rand[16]; in read_local_oob_ext_data() local
6847 smp_generate_oob(hdev, hash, rand) < 0) { in read_local_oob_ext_data()
6898 rand, sizeof(rand)); in read_local_oob_ext_data()
7841 ev.key.rand = key->rand; in mgmt_new_ltk()
Dhci_event.c4295 memcpy(cp.rand, data->rand192, sizeof(cp.rand)); in hci_remote_oob_data_request_evt()
4985 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
4989 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
Dhci_debugfs.c860 __le64_to_cpu(ltk->rand), 16, ltk->val); in long_term_keys_show()
Dhci_core.c2476 u8 tk[16], u8 enc_size, __le16 ediv, __le64 rand) in hci_add_ltk() argument
2496 key->rand = rand; in hci_add_ltk()
/linux-4.4.14/net/irda/
Dirlap.c649 static int rand; in irlap_generate_rand_time_slot() local
654 rand += jiffies; in irlap_generate_rand_time_slot()
655 rand ^= (rand << 12); in irlap_generate_rand_time_slot()
656 rand ^= (rand >> 20); in irlap_generate_rand_time_slot()
658 slot = s + rand % (S-s); in irlap_generate_rand_time_slot()
/linux-4.4.14/include/net/
Drose.h122 unsigned int rand; member
134 unsigned int lci, rand; member
/linux-4.4.14/include/uapi/linux/
Drose.h85 unsigned int rand; member
/linux-4.4.14/kernel/
Dtorture.c94 DEFINE_TORTURE_RANDOM(rand); in torture_onoff()
108 cpu = (torture_random(&rand) >> 4) % (maxcpu + 1); in torture_onoff()
/linux-4.4.14/tools/perf/tests/
Dmmap-basic.c87 expected_nr_events[i] = 1 + rand() % 127; in test__basic_mmap()
/linux-4.4.14/lib/raid6/test/
Dtest.c37 data[i][j] = rand(); in makedata()
/linux-4.4.14/drivers/net/hamradio/
Ddmascc.c272 static unsigned long rand; variable
318 rand = jiffies; in dmascc_init()
1090 rand = rand * 1664525L + 1013904223L; in random()
1091 return (unsigned char) (rand >> 24); in random()
/linux-4.4.14/include/net/bluetooth/
Dmgmt.h200 __le64 rand; member
317 __u8 rand[16]; member
Dhci.h700 __u8 rand[16]; member
1016 __u8 rand[16]; member
1412 __le64 rand; member
1911 __le64 rand; member
Dhci_core.h125 __le64 rand; member
1055 u8 tk[16], u8 enc_size, __le16 ediv, __le64 rand);
1495 void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand,
/linux-4.4.14/net/mac80211/
Dmesh_plink.c634 u32 rand; in mesh_plink_timer() local
639 get_random_bytes(&rand, sizeof(u32)); in mesh_plink_timer()
641 rand % sta->mesh->plink_timeout; in mesh_plink_timer()
/linux-4.4.14/net/ipv4/
Dudp.c220 unsigned int rand; in udp_lib_get_port() local
227 rand = prandom_u32(); in udp_lib_get_port()
228 first = reciprocal_scale(rand, remaining) + low; in udp_lib_get_port()
232 rand = (rand | 1) * (udptable->mask + 1); in udp_lib_get_port()
252 snum += rand; in udp_lib_get_port()
/linux-4.4.14/drivers/md/bcache/
Drequest.c333 long rand; in bch_get_congested() local
352 rand = get_random_int(); in bch_get_congested()
353 i -= bitmap_weight(&rand, BITS_PER_LONG); in bch_get_congested()
/linux-4.4.14/scripts/kconfig/
Dconfdata.c1079 def = (rand() % cnt); in randomize_choice_values()
1193 cnt = rand() % 100; in conf_set_all_new_symbols()
/linux-4.4.14/drivers/net/wireless/iwlwifi/mvm/
Dmac-ctxt.c1121 u32 rand = (prandom_u32() % (64 - 36)) + 36; in iwl_mvm_mac_ctxt_cmd_fill_ap() local
1123 ieee80211_tu_to_usec(data.beacon_int * rand / in iwl_mvm_mac_ctxt_cmd_fill_ap()
/linux-4.4.14/Documentation/kbuild/
Dkconfig.txt49 Environment variables for '{allyes/allmod/allno/rand}config'
/linux-4.4.14/drivers/staging/lustre/lustre/mgc/
Dmgc_request.c518 int rand = cfs_rand() & MGC_TIMEOUT_RAND_CENTISEC; in mgc_requeue_thread() local
535 to += rand * HZ / 100; /* rand is centi-seconds */ in mgc_requeue_thread()
/linux-4.4.14/drivers/leds/
Dleds-blinkm.c81 u8 rand:1; /* rand fade mode on = 1 */ member
/linux-4.4.14/tools/testing/selftests/net/
Dpsock_tpacket.c169 ((uint8_t *) pay)[i + sizeof(*eth)] = (uint8_t) rand(); in create_payload()
/linux-4.4.14/tools/perf/bench/
Dnuma.c360 long off = rand(); in alloc_data()
1262 td->val = rand(); in worker_process()
/linux-4.4.14/net/sunrpc/
Dxprtsock.c1714 unsigned short rand = (unsigned short) prandom_u32() % range; in xs_get_random_port() local
1715 return rand + xprt_min_resvport; in xs_get_random_port()
/linux-4.4.14/Documentation/networking/
Dfilter.txt285 rand prandom_u32()
319 ld rand