Home
last modified time | relevance | path

Searched full:random (Results 1 – 25 of 223) sorted by relevance

123456789

/qemu/tests/image-fuzzer/qcow2/
H A Dfuzz.py19 import random
47 """Select a random integer number from the list of specified intervals.
53 r = random.randint(0, total - 1) + intervals[0][0]
60 """Generate random binary mask with ones in the specified bit ranges.
63 positions will be fuzzed. The limits are included. Random amount of bits
68 # Select random amount of random positions in bit_ranges
70 bit_numbers += random.sample(range(rng[0], rng[1] + 1),
71 random.randint(0, rng[1] - rng[0] + 1))
98 """Return a random value from intervals not equal to the current.
106 """Return a random bit mask not equal to the current.
[all …]
H A Dlayout.py19 import random
87 This class allows to create qcow2 images with random valid structures and
93 """Create a random valid qcow2 image with the correct header and stored
113 self.bias = random.uniform(0.2, 0.5)
122 """Generate a random valid header."""
125 ['>I', 4, random.randint(2, 3), 'version'],
151 random.getrandbits(2)
152 self.header['compatible_features'][0].value = random.getrandbits(1)
212 """Generate a random header extension for names of features used in
216 """Return random feature type and feature bit."""
[all …]
/qemu/crypto/
H A Drandom-platform.c2 * QEMU Crypto random number provider
23 #include "crypto/random.h"
31 # include <sys/random.h>
33 /* This is -1 for getrandom(), or a file handle for /dev/{u,}random. */
57 fd = open("/dev/random", O_RDONLY | O_CLOEXEC); in qcrypto_random_init()
60 error_setg_errno(errp, errno, "No /dev/urandom or /dev/random"); in qcrypto_random_init()
74 "Unable to read random bytes"); in qcrypto_random_bytes()
105 error_setg(errp, "Unexpected EOF reading random bytes"); in qcrypto_random_bytes()
108 error_setg_errno(errp, errno, "Unable to read random bytes"); in qcrypto_random_bytes()
H A Dmeson.build67 util_ss.add(gcrypt, files('random-gcrypt.c'))
69 util_ss.add(gnutls, files('random-gnutls.c'))
71 util_ss.add(files('random-none.c'))
73 util_ss.add(files('random-platform.c'))
H A Drandom-none.c2 * QEMU Crypto "none" random number provider
24 #include "crypto/random.h"
36 error_setg(errp, "Random bytes not available with \"none\" rng"); in qcrypto_random_bytes()
H A Drandom-gnutls.c2 * QEMU Crypto random number provider
23 #include "crypto/random.h"
38 error_setg(errp, "Cannot get random bytes: %s", in qcrypto_random_bytes()
H A Drandom-gcrypt.c2 * QEMU Crypto random number provider
23 #include "crypto/random.h"
/qemu/include/hw/misc/
H A Dnrf51_rng.h2 * nRF51 Random Number Generator
13 * + Named GPIO output "eep_valrdy": Event set when new random value is ready
16 * generation of random values.
18 * random values.
21 * + Stochastic properties of different configurations of the random source
23 * + Generation of unfiltered and filtered random values take at least the
/qemu/tests/qemu-iotests/
H A Dqed.py15 import random
91 err('cannot pick random item because table is empty')
92 return random.choice(vals)
100 dup_val = random.choice(list(unique_vals.difference([victim_val])))
106 table[index] = qed.filesize + random.randint(0, 100 * 1024 * 1024 * 1024 * 1024)
121 '''duplicate l1|l2 - Duplicate a random table element'''
134 '''invalidate l1|l2 - Plant an invalid table element at random'''
H A D14723 import random
107 nbd_port = random.randrange(NBD_PORT_START, NBD_PORT_END)
178 nbd_port = random.randrange(NBD_PORT_START, NBD_PORT_END)
203 nbd_port = random.randrange(NBD_PORT_START, NBD_PORT_END)
230 nbd_port = random.randrange(NBD_IPV6_PORT_START, NBD_IPV6_PORT_END)
/qemu/docs/
H A Dimage-fuzzer.txt28 elements, e.g. L1/L2 tables, having random invalid values.
110 for integers or unsafe symbols as '%s' for strings. For bitmasks random amount
115 'layout.py' creates a random valid image, fuzzes a random subset of the image
119 1. If a list contains a parent image element only, then some random portion
154 Random seed is set by the runner at every test execution for the regression
174 1. Should be able to inject random data
175 2. Should be able to select a random value from the manually pregenerated
/qemu/hw/misc/
H A Dexynos4210_rng.c2 * Exynos4210 Pseudo Random Number Generator Emulation
25 #include "qemu/guest-random.h"
96 * We actually ignore the seed and always generate true random numbers. in exynos4210_rng_set_seed()
98 * a Pseudo Random Number Generator but testing shown that it always in exynos4210_rng_set_seed()
99 * generates random numbers regardless of the seed value. in exynos4210_rng_set_seed()
166 DPRINTF("returning random @0x%" HWADDR_PRIx ": 0x%" PRIx32 "\n", in exynos4210_rng_read()
H A Dnpcm7xx_rng.c2 * Nuvoton NPCM7xx Random Number Generator.
22 #include "qemu/guest-random.h"
54 * If the RNG is enabled, but we don't have any valid random data, try in npcm7xx_rng_read()
166 dc->desc = "NPCM7xx Random Number Generator"; in npcm7xx_rng_class_init()
H A Dbcm2835_rng.c2 * BCM2835 Random Number Generator emulation
12 #include "qemu/guest-random.h"
22 * On failure we don't want to return the guest a non-random in get_random_bytes()
/qemu/tests/tcg/aarch64/system/
H A Dmte.S12 #define tagged_addr x1 /* 'addr' ptr with a random-generated tag added. */
77 * Set GCR for random tag generation. 0xA5 is just a random value to set
98 * Store a random value (0xdeadbeef) to tagged_addr address. This must
/qemu/include/exec/
H A Dreplay-core.h73 /* Processing data from random generators */
75 /* Saves the values from the random number generator */
77 /* Loads the saved values for the random number generator */
/qemu/util/
H A Dguest-random.c2 * QEMU guest-visible random functions
15 #include "qemu/guest-random.h"
16 #include "crypto/random.h"
/qemu/include/system/
H A Drng-random.h2 * QEMU Random Number Generator Backend
17 #define TYPE_RNG_RANDOM "rng-random"
/qemu/tests/image-fuzzer/
H A Drunner.py25 import random
131 self.seed = str(random.randint(0, sys.maxsize))
132 random.seed(self.seed)
179 backing_file_fmt = random.choice(['raw', 'vmdk', 'vdi', 'qcow2',
182 backing_file_size = random.randint(MIN_BACKING_FILE_SIZE,
219 start = random.randrange(0, img_size + 1, sector_size)
220 end = random.randrange(start, img_size + 1, sector_size)
322 ["header", "version"]. In the first case random portion of the element
/qemu/replay/
H A Dreplay-random.c2 * replay-random.c
40 error_report("Missing random event in the replay log"); in replay_read_random()
/qemu/backends/
H A Drng-random.c2 * QEMU Random Number Generator Backend
14 #include "system/rng-random.h"
30 * A simple and incomplete backend to request entropy from /dev/random.
H A Drng-builtin.c2 * QEMU Builtin Random Number Generator Backend
11 #include "qemu/guest-random.h"
/qemu/include/crypto/
H A Drandom.h2 * QEMU Crypto random number provider
32 * random data
H A Dpbkdf.h35 * #include "crypto/random.h"
103 * @salt: a random salt
134 * @salt: a random salt
/qemu/tests/tcg/multiarch/linux/
H A Dlinux-shmat-maps.c27 * than the target mapping. Choose an address at random. in main()
33 * we have a cross-compiler, the above random address might conflict in main()

123456789