/Linux-v6.1/drivers/media/platform/verisilicon/ |
D | hantro_vp8.c | 52 const struct v4l2_vp8_entropy *entropy = &hdr->entropy; in hantro_vp8_prob_update() local 69 dst[0] = entropy->y_mode_probs[0]; in hantro_vp8_prob_update() 70 dst[1] = entropy->y_mode_probs[1]; in hantro_vp8_prob_update() 71 dst[2] = entropy->y_mode_probs[2]; in hantro_vp8_prob_update() 72 dst[3] = entropy->y_mode_probs[3]; in hantro_vp8_prob_update() 73 dst[4] = entropy->uv_mode_probs[0]; in hantro_vp8_prob_update() 74 dst[5] = entropy->uv_mode_probs[1]; in hantro_vp8_prob_update() 75 dst[6] = entropy->uv_mode_probs[2]; in hantro_vp8_prob_update() 80 dst[0] = entropy->mv_probs[0][0]; /* is short */ in hantro_vp8_prob_update() 81 dst[1] = entropy->mv_probs[1][0]; in hantro_vp8_prob_update() [all …]
|
/Linux-v6.1/drivers/char/ |
D | random.c | 12 * - Entropy accumulation and extraction routines. 13 * - Entropy collection routines. 19 * data is then "credited" as having a certain number of bits of entropy. 20 * When enough bits of entropy are available, the hash is finalized and 23 * entropy collectors, described below, add data to the input pool. 68 * being able to wait until the RNG has collected enough entropy and 78 CRNG_EMPTY = 0, /* Little to no entropy collected */ 116 /* Used by wait_for_random_bytes(), and considered an entropy collector, below. */ 153 * These functions expand entropy from the entropy extractor into 449 * Batched entropy returns random integers. The quality of the random [all …]
|
/Linux-v6.1/crypto/ |
D | jitterentropy.c | 62 /* The entropy pool */ 106 * entropy, saves MEMORY_SIZE RAM for 107 * entropy collector */ 121 * The output n bits can receive more than n bits of min entropy, of course, 123 * approach the output size bits of min entropy, not attain that bound. Random 125 * output entropy (that is what SP 800-90B Section 3.1.5.1.2 attempts to bound). 129 * that a string can be considered "full entropy" if you can bound the min 130 * entropy in each bit of output to at least 1-epsilon, where epsilon is 147 * @ec [in] Reference to entropy collector 158 * Insert a new entropy event into APT [all …]
|
D | algif_rng.c | 63 u8 *entropy; member 228 kfree_sensitive(pctx->entropy); in rng_release() 268 * Non NULL pctx->entropy means that CAVP test has been initiated on in rng_accept_parent() 271 if (IS_ENABLED(CONFIG_CRYPTO_USER_API_RNG_CAVP) && pctx->entropy) in rng_accept_parent() 287 static int __maybe_unused rng_setentropy(void *private, sockptr_t entropy, in rng_setentropy() argument 296 if (pctx->entropy) in rng_setentropy() 303 kentropy = memdup_sockptr(entropy, len); in rng_setentropy() 310 * Since rng doesn't perform any memory management for the entropy in rng_setentropy() 313 pctx->entropy = kentropy; in rng_setentropy()
|
D | drbg.c | 230 * Note, this function disregards the nonce trailing the entropy data during 236 * @entropy buffer of seed data to be checked 244 const unsigned char *entropy) in drbg_fips_continuous_test() argument 261 memcpy(drbg->prev, entropy, entropylen); in drbg_fips_continuous_test() 266 ret = memcmp(drbg->prev, entropy, entropylen); in drbg_fips_continuous_test() 269 memcpy(drbg->prev, entropy, entropylen); in drbg_fips_continuous_test() 1077 unsigned char *entropy, in drbg_get_random_bytes() argument 1083 get_random_bytes(entropy, entropylen); in drbg_get_random_bytes() 1084 ret = drbg_fips_continuous_test(drbg, entropy); in drbg_get_random_bytes() 1097 unsigned char entropy[32]; in drbg_seed_from_random() local [all …]
|
/Linux-v6.1/include/uapi/linux/ |
D | random.h | 17 /* Get the entropy count. */ 20 /* Add to (or subtract from) the entropy count. (Superuser only.) */ 23 /* Get the contents of the entropy pool. (Superuser only.) */ 27 * Write bytes into the entropy pool and add to the entropy count. 32 /* Clear entropy count to 0. (Superuser only.) */ 35 /* Clear the entropy pool and associated counters. (Superuser only.) */
|
/Linux-v6.1/lib/zstd/decompress/ |
D | zstd_ddict.c | 37 ZSTD_entropyDTables_t entropy; member 72 dctx->LLTptr = ddict->entropy.LLTable; in ZSTD_copyDDictParameters() 73 dctx->MLTptr = ddict->entropy.MLTable; in ZSTD_copyDDictParameters() 74 dctx->OFTptr = ddict->entropy.OFTable; in ZSTD_copyDDictParameters() 75 dctx->HUFptr = ddict->entropy.hufTable; in ZSTD_copyDDictParameters() 76 dctx->entropy.rep[0] = ddict->entropy.rep[0]; in ZSTD_copyDDictParameters() 77 dctx->entropy.rep[1] = ddict->entropy.rep[1]; in ZSTD_copyDDictParameters() 78 dctx->entropy.rep[2] = ddict->entropy.rep[2]; in ZSTD_copyDDictParameters() 108 /* load entropy tables */ in ZSTD_loadEntropy_intoDDict() 110 &ddict->entropy, ddict->dictContent, ddict->dictSize)), in ZSTD_loadEntropy_intoDDict() [all …]
|
D | zstd_decompress.c | 1220 * @return : size of entropy tables read */ 1222 ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, in ZSTD_loadDEntropy() argument 1232 …entropyDTables_t, OFTable) == offsetof(ZSTD_entropyDTables_t, LLTable) + sizeof(entropy->LLTable)); in ZSTD_loadDEntropy() 1233 …entropyDTables_t, MLTable) == offsetof(ZSTD_entropyDTables_t, OFTable) + sizeof(entropy->OFTable)); in ZSTD_loadDEntropy() 1234 …ZSTD_STATIC_ASSERT(sizeof(entropy->LLTable) + sizeof(entropy->OFTable) + sizeof(entropy->MLTable) … in ZSTD_loadDEntropy() 1235 …{ void* const workspace = &entropy->LLTable; /* use fse tables as temporary workspace; implies… in ZSTD_loadDEntropy() 1236 …size_t const workspaceSize = sizeof(entropy->LLTable) + sizeof(entropy->OFTable) + sizeof(entropy-… in ZSTD_loadDEntropy() 1239 size_t const hSize = HUF_readDTableX1_wksp(entropy->hufTable, in ZSTD_loadDEntropy() 1243 size_t const hSize = HUF_readDTableX2_wksp(entropy->hufTable, in ZSTD_loadDEntropy() 1257 ZSTD_buildFSETable( entropy->OFTable, in ZSTD_loadDEntropy() [all …]
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
D | port_tun.c | 92 /* Tunnel entropy calculation may be controlled either on port basis in mlx5_set_entropy() 106 /* Other applications may change the global FW entropy in mlx5_set_entropy() 107 * calculations settings. Check that the current entropy value in mlx5_set_entropy() 113 "Unexpected entropy calc setting - expected %d", in mlx5_set_entropy() 117 /* GRE requires disabling entropy calculation. if there are in mlx5_set_entropy() 128 /* if we turn on the entropy we don't need to force it anymore */ in mlx5_set_entropy() 141 * entropy capabilities and configuration. 152 /* in case entropy calculation is enabled for all tunneling in mlx5_tun_entropy_refcount_inc() 159 /* turn off the entropy only for the first GRE rule. in mlx5_tun_entropy_refcount_inc() 160 * for the next rules the entropy was already disabled in mlx5_tun_entropy_refcount_inc()
|
/Linux-v6.1/arch/x86/mm/ |
D | kaslr.c | 8 * Entropy is generated using the KASLR early boot functions now shared in 111 /* Calculate entropy available between regions */ in kernel_randomize_memory() 119 unsigned long entropy; in kernel_randomize_memory() local 122 * Select a random virtual address using the extra entropy in kernel_randomize_memory() 125 entropy = remain_entropy / (ARRAY_SIZE(kaslr_regions) - i); in kernel_randomize_memory() 127 entropy = (rand % (entropy + 1)) & PUD_MASK; in kernel_randomize_memory() 128 vaddr += entropy; in kernel_randomize_memory() 137 remain_entropy -= entropy; in kernel_randomize_memory()
|
/Linux-v6.1/scripts/gcc-plugins/ |
D | latent_entropy_plugin.c | 11 * This gcc plugin helps generate a little bit of entropy from program state, 86 .help = "disable\tturn off latent entropy instrumentation\n", 291 * entropy PRNG. When RHS is specified, the request is for perturbing the 292 * local latent entropy variable, otherwise it is for perturbing the global 293 * latent entropy variable where the two operands are already given by the 294 * local and global latent entropy variables themselves. 296 * The operation is one of add/xor/rol when instrumenting the local entropy 297 * variable and one of add/xor when perturbing the global entropy variable. 299 * entropy to the global variable than the other two operations. 457 /* 4. read the global entropy variable into local entropy */ in init_local_entropy() [all …]
|
D | Kconfig | 33 bool "Generate some entropy during boot and runtime" 36 extract some entropy from both original and artificially created 38 there is little 'natural' source of entropy normally. The cost 42 Note that entropy extracted this way is not cryptographically
|
/Linux-v6.1/drivers/infiniband/ulp/opa_vnic/ |
D | opa_vnic_encap.c | 74 u16 pkey, u16 entropy, u8 sc, u8 rc, in opa_vnic_make_header() argument 81 h[3] = entropy; in opa_vnic_make_header() 446 /* opa_vnic_calc_entropy - calculate the packet entropy */ 455 /* return lower 8 bits as entropy */ in opa_vnic_calc_entropy() 459 /* opa_vnic_get_def_port - get default port based on entropy */ 461 u8 entropy) in opa_vnic_get_def_port() argument 465 /* Add the upper and lower 4-bits of entropy to get the flow id */ in opa_vnic_get_def_port() 466 flow_id = ((entropy & 0xf) + (entropy >> 4)); in opa_vnic_get_def_port() 487 u8 def_port, sc, rc, entropy, *hdr; in opa_vnic_encap_skb() local 493 entropy = opa_vnic_calc_entropy(skb); in opa_vnic_encap_skb() [all …]
|
/Linux-v6.1/arch/s390/crypto/ |
D | prng.c | 119 * This function fills a given buffer with random bytes. The entropy within 121 * a 64 bytes buffer has at least 64 * 8 / 2 = 256 bits of entropy. 122 * Within the function the entropy generation is done in junks of 64 bytes. 124 * The generation of the entropy is based on the assumption that every stckf() 125 * invocation produces 0.5 bits of entropy. To accumulate 256 bits of entropy 126 * at least 512 stckf() values are needed. The entropy relevant part of the 189 __u64 entropy[4]; in prng_tdes_add_entropy() local 194 (char *) entropy, (char *) entropy, in prng_tdes_add_entropy() 195 sizeof(entropy)); in prng_tdes_add_entropy() 196 memcpy(prng_data->prngws.parm_block, entropy, sizeof(entropy)); in prng_tdes_add_entropy() [all …]
|
/Linux-v6.1/tools/testing/selftests/lkdtm/ |
D | stack-entropy.sh | 4 # Measure kernel stack entropy by sampling via LKDTM's REPORT_STACK test. 23 log=$(mktemp -t stack-entropy-XXXXXX) 42 echo "Bits of stack entropy: $bits" 47 echo "Stack entropy is low! Booted without 'randomize_kstack_offset=y'?"
|
/Linux-v6.1/lib/zstd/compress/ |
D | zstd_compress_superblock.c | 23 * Superblock entropy buffer structs 57 * Builds entropy for the super-block literals. 161 * Builds entropy for the super-block sequences. 272 * Builds entropy for the super-block. 364 DEBUGLOG(5, "Failed to write entropy tables %s", ZSTD_getErrorName(cSize)); in ZSTD_compressSubBlock_literal() 539 static size_t ZSTD_compressSubBlock(const ZSTD_entropyCTables_t* entropy, in ZSTD_compressSubBlock() argument 556 { size_t cLitSize = ZSTD_compressSubBlock_literal((const HUF_CElt*)entropy->huf.CTable, in ZSTD_compressSubBlock() 563 { size_t cSeqSize = ZSTD_compressSubBlock_sequences(&entropy->fse, in ZSTD_compressSubBlock() 672 const ZSTD_entropyCTables_t* entropy, in ZSTD_estimateSubBlockSize() argument 678 … &entropy->huf, &entropyMetadata->hufMetadata, in ZSTD_estimateSubBlockSize() [all …]
|
/Linux-v6.1/include/linux/ |
D | randomize_kstack.h | 35 * Use, at most, 10 bits of entropy. We explicitly cap this to keep the 37 * per-arch offset masks to reduce entropy (by removing higher bits, since 38 * high entropy may overly constrain usable stack space), and for 49 * the stack. For testing the resulting entropy, please see: 50 * tools/testing/selftests/lkdtm/stack-entropy.sh
|
/Linux-v6.1/arch/s390/boot/ |
D | kaslr.c | 59 __u64 entropy[4]; in get_random() local 75 /* add entropy */ in get_random() 79 (u8 *) entropy, (u8 *) entropy, in get_random() 80 sizeof(entropy)); in get_random() 81 memcpy(prng.parm_block, entropy, sizeof(entropy)); in get_random()
|
/Linux-v6.1/drivers/infiniband/hw/hfi1/ |
D | trace_ibhdrs.h | 88 u16 *entropy, u16 *len, u16 *pkey, 94 u8 rc, u8 sc, u8 sl, u16 entropy, 138 __field(u16, entropy) 166 &__entry->entropy, 236 __entry->entropy, 297 __field(u16, entropy) 326 &__entry->entropy, 400 __entry->entropy,
|
/Linux-v6.1/Documentation/powerpc/ |
D | kaslr-booke32.rst | 20 Entropy is derived from the banner and timer base, which will change every 22 pass entropy via the /chosen/kaslr-seed node in device tree. 26 bit of the entropy to decide the index of the 64M zone. Then we chose a
|
/Linux-v6.1/drivers/char/hw_random/ |
D | cavium-rng.c | 41 /* Enable the RNG hardware and entropy source */ in cavium_rng_probe() 50 /* Disable the RNG hardware and entropy source */ in cavium_rng_probe() 71 /* Disable the RNG hardware and entropy source */ in cavium_rng_remove()
|
D | core.c | 48 "current hwrng entropy estimation per 1024 bits of input -- obsolete, use rng_quality instead"); 51 "default entropy content of hwrng per 1024 bits of input"); 496 size_t entropy, entropy_credit = 0; /* in 1/1024 of a bit */ in hwrng_fillfn() local 522 /* If we cannot credit at least one bit of entropy, in hwrng_fillfn() 525 entropy = rc * quality * 8 + entropy_credit; in hwrng_fillfn() 526 if ((entropy >> 10) == 0) in hwrng_fillfn() 527 entropy_credit = entropy; in hwrng_fillfn() 531 entropy >> 10); in hwrng_fillfn() 564 * provides better entropy quality and was not in hwrng_register()
|
D | n2-drv.c | 41 * The entropy source consists of raw entropy sources, each 45 * The oscillator in each of the three raw entropy sources run at 50 * Some time is necessary for all the necessary entropy to build up 51 * such that a full 64-bits of entropy are available in the register. 53 * an interlock which blocks register reads until sufficient entropy 58 * entropy sources has an enable bit (RNG_CTL_ES{1,2,3}). Also 64 * all three entropy sources enabled, and the interlock time set 77 * values are used to setup the desired RNG_CTL_VCO for each entropy 638 * XXX of words using each entropy source combined XXX in n2rng_control_configure_units()
|
/Linux-v6.1/arch/x86/include/asm/ |
D | entry-common.h | 80 * The actual entropy will be further reduced by the compiler when in arch_exit_to_user_mode_prepare() 83 * low bits from any entropy chosen here. in arch_exit_to_user_mode_prepare() 85 * Therefore, final stack offset entropy will be 5 (x86_64) or in arch_exit_to_user_mode_prepare()
|
/Linux-v6.1/arch/arm64/include/asm/ |
D | archrandom.h | 81 * hardware backed entropy) is closer to the idea behind this in arch_get_random_seed_longs() 107 * RNDRRS is not backed by an entropy source but by a DRBG that is in arch_get_random_seed_longs() 109 * enough to implement this API if no other entropy source exists. in arch_get_random_seed_longs()
|