Home
last modified time | relevance | path

Searched +full:- +full:seed (Results 1 – 25 of 144) sorted by relevance

123456

/openbmc/u-boot/net/
H A Dnet_rand.h2 * Copied from LiMon - BOOTP.
15 * Return a seed for the PRNG derived from the eth0 MAC address.
20 unsigned int seed; in seed_mac() local
25 seed = enetaddr[5]; in seed_mac()
26 seed ^= enetaddr[4] << 8; in seed_mac()
27 seed ^= enetaddr[3] << 16; in seed_mac()
28 seed ^= enetaddr[2] << 24; in seed_mac()
29 seed ^= enetaddr[1]; in seed_mac()
30 seed ^= enetaddr[0] << 8; in seed_mac()
32 return seed; in seed_mac()
[all …]
/openbmc/bios-settings-mgr/src/
H A Dpassword.cpp8 http:www.apache.org/licenses/LICENSE-2.0
23 #include <phosphor-logging/elog-errors.hpp>
24 #include <phosphor-logging/lg2.hpp>
38 const std::array<uint8_t, maxSeedSize>& seed, in compareDigest() argument
46 reinterpret_cast<const unsigned char*>(seed.data()), in compareDigest()
47 seed.size(), iterValue, digestFunc, hashLen, in compareDigest()
64 const std::array<uint8_t, maxSeedSize>& seed, in isMatch() argument
71 return compareDigest(EVP_sha256(), SHA256_DIGEST_LENGTH, expected, seed, in isMatch()
77 return compareDigest(EVP_sha384(), SHA384_DIGEST_LENGTH, expected, seed, in isMatch()
86 std::array<uint8_t, maxSeedSize>& seed, in getParam() argument
[all …]
/openbmc/openbmc/poky/meta/recipes-kernel/kexec/kexec-tools/
H A D0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch3 Date: Thu, 12 Nov 2020 12:56:46 -0800
4 Subject: [PATCH] arm64: kexec: disabled check if kaslr-seed dtb property was
7 Kexec when loading arm64 kernel checks if chosen/kaslr-seed dtb property is
9 if bootloader creates and fills kaslr-seed property and kernel is not
11 kaslr-seed does not run. As a result kaslr-seed property is not zero and when
14 setup_2nd_dtb: kaslr-seed is not wiped to 0.
19 qemu 5.1.0. Qemu created kaslr-seed property but kernel was not configured
22 Although check has some value, there is a use-case where it breaks kexec,
25 Note in described use-case the fact that kaslr-seed is not wiped and user
27 /sys/firmware/devicetree/base/chosen/kaslr-seed is not a security problem
[all …]
/openbmc/openbmc/poky/meta/recipes-core/initscripts/initscripts-1.0/
H A Durandom3 # SPDX-License-Identifier: GPL-2.0-only
8 # Required-Start: $local_fs mountvirtfs
9 # Required-Stop: $local_fs
10 # Default-Start: S
11 # Default-Stop: 0 6
12 # Short-Description: Save and restore the random seed
13 # Description: Save the random seed on shutdown and restore it on boot,
14 # to ensure that the seed isn't predicable on startup
18 test -c /dev/urandom || exit 0
20 RANDOM_SEED_FILE=/var/lib/urandom/random-seed
[all …]
/openbmc/qemu/util/
H A Dguest-random.c2 * QEMU guest-visible random functions
15 #include "qemu/guest-random.h"
17 #include "exec/replay-core.h"
31 /* Thread not initialized for a cpu, or main w/o -seed. */ in glib_random_bytes()
41 __builtin_memcpy(buf + i, &x, len - i); in glib_random_bytes()
56 /* Non-deterministic implementation using crypto routines. */ in qemu_guest_getrandom()
80 void qemu_guest_random_seed_thread_part2(uint64_t seed) in qemu_guest_random_seed_thread_part2() argument
85 g_rand_new_with_seed_array((const guint32 *)&seed, in qemu_guest_random_seed_thread_part2()
86 sizeof(seed) / sizeof(guint32)); in qemu_guest_random_seed_thread_part2()
92 uint64_t seed; in qemu_guest_random_seed_main() local
[all …]
/openbmc/qemu/include/qemu/
H A Dguest-random.h2 * QEMU guest-visible random functions
17 * @seedstr: a non-NULL pointer to a C string
20 * The @seedstr value is that which accompanies the -seed argument.
31 * independent seed for the new thread. Otherwise returns 0.
36 * qemu_guest_random_seed_thread_part2(uint64_t seed)
37 * @seed: a value for the new thread.
40 * independent seed for the new thread. Otherwise a no-op.
42 void qemu_guest_random_seed_thread_part2(uint64_t seed);
51 * for data presented to the guest. Host-side crypto services should
H A Dxxhash.h2 * xxHash - Fast Hash algorithm
3 * Copyright (C) 2012-2016, Yann Collet
5 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
31 * - xxHash source repository : https://github.com/Cyan4973/xxHash
57 uint32_t v4 = QEMU_XXHASH_SEED - PRIME32_1; in qemu_xxhash8()
141 * v1 = seed + XXH_PRIME64_1 + XXH_PRIME64_2;
142 * v2 = seed + XXH_PRIME64_2;
143 * v3 = seed + 0;
144 * v4 = seed - XXH_PRIME64_1;
153 * h64 = seed + XXH_PRIME64_5;
[all …]
/openbmc/qemu/tests/image-fuzzer/
H A Drunner.py40 "'--config' and '--command' options are not supported.", file=sys.stderr)
96 return -term_signal
117 The test log will include application (e.g. 'qemu-img') logs besides info
121 def __init__(self, test_id, seed, work_dir, run_log, argument
125 Path to qemu-img and qemu-io will be retrieved from 'QEMU_IMG' and
128 if seed is not None:
129 self.seed = seed
131 self.seed = str(random.randint(0, sys.maxsize))
132 random.seed(self.seed)
136 self.current_dir = os.path.join(work_dir, 'test-' + test_id)
[all …]
/openbmc/openbmc/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs/
H A D0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch3 Date: Sun, 28 May 2023 16:33:15 -0700
4 Subject: [PATCH] fs-tests/cmd/readmmap: Replace uint_t with uint32_t
8 Upstream-Status: Pending
9 Signed-off-by: Khem Raj <raj.khem@gmail.com>
10 ---
11 tests/zfs-tests/cmd/readmmap.c | 5 +++--
12 1 file changed, 3 insertions(+), 2 deletions(-)
14 diff --git a/tests/zfs-tests/cmd/readmmap.c b/tests/zfs-tests/cmd/readmmap.c
16 --- a/tests/zfs-tests/cmd/readmmap.c
17 +++ b/tests/zfs-tests/cmd/readmmap.c
[all …]
/openbmc/qemu/docs/
H A Dimage-fuzzer.txt23 -----------
25 The goal of the image fuzzer is to catch crashes of qemu-io/qemu-img
32 -----------
40 keyboard interruption. But if a test seed is specified via the '--seed' runner
41 parameter, then only one test with this seed will be executed, after its finish
54 Paths to binaries under test (SUTs) ``qemu-img`` and ``qemu-io`` are retrieved
57 ``qemu-img`` is required for creation of backing files, so it's mandatory to set
59 For details about environment variables see qemu-iotests/check.
62 '--config' argument, e.g.
71 the '--command' argument. Each command is a list containing a SUT and all its
[all …]
/openbmc/u-boot/drivers/crypto/
H A Dace_sha.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Advanced Crypto Engine - SHA Firmware
10 #include <u-boot/sha256.h>
11 #include <u-boot/sha1.h>
45 writel(ACE_FC_HRDMACFLUSH_ON, &ace_sha_reg->fc_hrdmac); in ace_sha_hash_digest()
46 writel(ACE_FC_HRDMACFLUSH_OFF, &ace_sha_reg->fc_hrdmac); in ace_sha_hash_digest()
50 &ace_sha_reg->hash_byteswap); in ace_sha_hash_digest()
53 reg = readl(&ace_sha_reg->fc_fifoctrl); in ace_sha_hash_digest()
55 writel(reg, &ace_sha_reg->fc_fifoctrl); in ace_sha_hash_digest()
61 writel(reg, &ace_sha_reg->hash_control); in ace_sha_hash_digest()
[all …]
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/
H A Duserfaultfd.patch3 Date: Fri, 13 Jul 2018 06:06:19 -0700
6 Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
7 ---
8 Upstream-Status: Pending
13 diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c
15 --- a/tools/testing/selftests/vm/userfaultfd.c
17 @@ -71,6 +71,304 @@
90 + pointer if the front one has wrapped. Returns a 31-bit random number. */
99 + state = buf->state;
101 + if (buf->rand_type == TYPE_0)
[all …]
/openbmc/openbmc/meta-google/recipes-google/systemd/files/
H A Dgbmc-psu-hardreset.target4 Wants=gbmc-psu-hardreset-pre.target
5 After=gbmc-psu-hardreset-pre.target
6 Conflicts=systemd-random-seed.service
7 After=systemd-random-seed.service
/openbmc/qemu/hw/misc/
H A Dxlnx-versal-trng.c2 * Non-crypto strength model of the True Random Number Generator
5 * Copyright (c) 2017-2020 Xilinx Inc.
29 #include "hw/misc/xlnx-versal-trng.h"
33 #include "qemu/error-report.h"
34 #include "qemu/guest-random.h"
38 #include "hw/qdev-properties.h"
140 return s->hw_version < 0x0200; in trng_older_than_v2()
145 if (ARRAY_FIELD_EX32(s->regs, RESET, VAL)) { in trng_in_reset()
148 if (ARRAY_FIELD_EX32(s->regs, CTRL, PRNGSRST)) { in trng_in_reset()
157 return ARRAY_FIELD_EX32(s->regs, CTRL, TSTMODE); in trng_test_enabled()
[all …]
H A Dexynos4210_rng.c25 #include "qemu/guest-random.h"
76 /* bits from 0 to EXYNOS4210_RNG_PRNG_NUM if given seed register was set */
88 /* Return true if all the seed-set bits are set. */ in exynos4210_rng_seed_ready()
89 return (s->seed_set & mask) == mask; in exynos4210_rng_seed_ready()
96 * We actually ignore the seed and always generate true random numbers. in exynos4210_rng_set_seed()
99 * generates random numbers regardless of the seed value. in exynos4210_rng_set_seed()
101 s->seed_set |= BIT(i); in exynos4210_rng_set_seed()
105 s->reg_status |= EXYNOS4210_RNG_STATUS_SEED_SETTING_DONE; in exynos4210_rng_set_seed()
107 s->reg_status &= ~EXYNOS4210_RNG_STATUS_SEED_SETTING_DONE; in exynos4210_rng_set_seed()
115 /* Seed set? */ in exynos4210_rng_run_engine()
[all …]
/openbmc/qemu/tests/qtest/fuzz/
H A Dfuzz.h10 * See the COPYING file in the top-level directory.
26 * with a unique @name that can be specified on the command-line to
29 * A target must implement ->fuzz() to process a random input. If QEMU
30 * crashes in ->fuzz() then libfuzzer will record a failure.
35 * .name = "my-device-fifo",
36 * .description = "Fuzz the FIFO buffer registers of my-device",
47 const char *name; /* target identifier (passed to --fuzz-target=)*/
59 * eg: set up shared-memory for communication with the child-process
65 * will run once, after QEMU has been initialized, prior to the fuzz-loop.
90 * seed: the seed that should be used to make mutations deterministic, when
[all …]
/openbmc/openbmc/meta-security/meta-integrity/recipes-core/systemd/
H A Dsystemd_%.bbappend4 file://machine-id-commit-sync.conf \
5 file://random-seed-sync.conf \
9 for i in machine-id-commit random-seed; do
10 install -d ${D}/${systemd_system_unitdir}/systemd-$i.service.d
11 … install -m 0644 ${UNPACKDIR}/$i-sync.conf ${D}/${systemd_system_unitdir}/systemd-$i.service.d
/openbmc/bios-settings-mgr/include/
H A Dpassword.hpp8 http:www.apache.org/licenses/LICENSE-2.0
59 * @param[in] objectServer - object server
60 * @param[in] systemBus - bus connection
69 * @param[in] userName - User name - user / admin.
70 * @param[in] currentPassword - Current user/ admin Password.
71 * @param[in] newPassword - New user/ admin Password.
81 const std::array<uint8_t, maxSeedSize>& seed,
84 const std::array<uint8_t, maxSeedSize>& seed,
88 std::array<uint8_t, maxSeedSize>& seed,
91 std::array<uint8_t, maxSeedSize>& seed,
/openbmc/openbmc/meta-security/recipes-ids/samhain/files/
H A D0003-fix-real-path-for-some-files-dirs.patch3 Date: Mon, 3 Mar 2014 01:50:01 -0500
6 Upstream-Status: Inappropriate [configuration]
8 Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
9 ---
10 samhainrc.linux | 13 ++++++-------
11 1 file changed, 6 insertions(+), 7 deletions(-)
13 diff --git a/samhainrc.linux b/samhainrc.linux
15 --- a/samhainrc.linux
17 @@ -93,7 +93,6 @@ dir = 99/etc
21 -file = /etc/adjtime
[all …]
/openbmc/u-boot/lib/
H A Drand.c1 // SPDX-License-Identifier: GPL-2.0+
28 void srand(unsigned int seed) in srand() argument
30 y = seed; in srand()
/openbmc/u-boot/fs/btrfs/
H A Dhash.c1 // SPDX-License-Identifier: GPL-2.0+
3 * BTRFS filesystem implementation for U-Boot
9 #include <u-boot/crc.h>
30 u32 btrfs_csum_data(char *data, u32 seed, size_t len) in btrfs_csum_data() argument
32 return btrfs_crc32c(seed, data, len); in btrfs_csum_data()
/openbmc/u-boot/arch/x86/cpu/quark/
H A Dhte.h1 /* SPDX-License-Identifier: Intel */
30 /* random seed for victim */
33 /* random seed for aggressor */
/openbmc/qemu/tests/tcg/multiarch/
H A Dvma-pthread.c4 * SPDX-License-Identifier: GPL-2.0-or-later
12 * Two mutator threads change the non-fixed protection bits randomly.
28 #define PAGE_IDX_MASK (PAGE_COUNT - 1)
34 #define PAGES_PER_REGION (1 << (PAGE_IDX_BITS - REGION_IDX_BITS))
50 for (i = 0; ctx->mutator_count; i++) { in thread_read()
54 p = &ctx->ptr[j * ctx->pagesize]; in thread_read()
64 sret = write(ctx->dev_null_fd, p, 1); in thread_read()
85 for (i = 0; ctx->mutator_count; i++) { in thread_write()
89 memcpy(&ctx->ptr[j * ctx->pagesize], nop_func, sizeof(nop_func)); in thread_write()
92 ts = (struct timespec *)(&ctx->ptr[(j + 1) * ctx->pagesize] - in thread_write()
[all …]
/openbmc/openbmc/poky/meta/recipes-core/volatile-binds/
H A Dvolatile-binds.bb1 SUMMARY = "Volatile bind mount setup and configuration for read-only-rootfs"
7 file://mount-copybind \
9 file://volatile-binds.service.in \
34 services.append("%s.service" % what[1:].replace("/", "-"))
46 if [ -z "$spec" ]; then
50 servicefile="$(echo "${spec#/}" | tr / -).service"
52 sed -e "s#@what@#$spec#g; s#@where@#$mountpoint#g" \
53 -e "s#@whatparent@#${spec%/*}#g; s#@whereparent@#${mountpoint%/*}#g" \
54 -e "s#@avoid_overlayfs@#${@d.getVar('AVOID_OVERLAYFS')}#g" \
55 volatile-binds.service.in >$servicefile
[all …]
/openbmc/qemu/tests/bench/
H A Dqht-bench.c5 * See the COPYING file in the top-level directory.
30 * Seed is in the range [1..UINT64_MAX], because the RNG requires
31 * a non-zero seed. To use, subtract 1 and compare against the
35 uint64_t seed; member
78 " -d = duration, in seconds\n"
79 " -n = number of threads\n"
81 " -o = offset at which keys start\n"
82 " -p = precompute hashes\n"
84 " -g = set -s,-k,-K,-l,-r to the same value\n"
85 " -s = initial size hint\n"
[all …]

123456