lkml.org 
[lkml]   [2020]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v34 01/12] Linux Random Number Generator
Hi "Stephan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on cryptodev/master crypto/master v5.9-rc3 next-20200828]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Stephan-M-ller/dev-random-a-new-approach-with-full-SP800-90B-compliance/20200825-153914
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git d162219c655c8cf8003128a13840d6c1e183fb80
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

In file included from drivers/char/lrng/lrng_pool.c:18:
>> drivers/char/lrng/lrng_lfsr.h:44:4: error: 'latent_entropy' attribute only applies to functions and variables
44 | atomic_t pool[LRNG_POOL_SIZE] __latent_entropy;
| ^~~~~~~~
--
In file included from drivers/char/lrng/lrng_chacha20.c:17:
>> drivers/char/lrng/lrng_chacha20.h:17:2: error: 'latent_entropy' attribute only applies to functions and variables
17 | } key __latent_entropy;
| ^
drivers/char/lrng/lrng_chacha20.h:19:2: error: 'latent_entropy' attribute only applies to functions and variables
19 | u32 nonce[3] __latent_entropy;
| ^~~

# https://github.com/0day-ci/linux/commit/b5cc1c486b8491ab0a3817a48964bfd4797484c8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Stephan-M-ller/dev-random-a-new-approach-with-full-SP800-90B-compliance/20200825-153914
git checkout b5cc1c486b8491ab0a3817a48964bfd4797484c8
vim +/latent_entropy +44 drivers/char/lrng/lrng_lfsr.h

16
17 /*
18 * This is the entropy pool used by the slow noise source. Its size should
19 * be at least as large as LRNG_DRNG_SECURITY_STRENGTH_BITS.
20 *
21 * The pool array is aligned to 8 bytes to comfort the kernel crypto API cipher
22 * implementations of the hash functions used to read the pool: for some
23 * accelerated implementations, we need an alignment to avoid a realignment
24 * which involves memcpy(). The alignment to 8 bytes should satisfy all crypto
25 * implementations.
26 *
27 * LRNG_POOL_SIZE is allowed to be changed only if the taps of the polynomial
28 * used for the LFSR are changed as well. The size must be in powers of 2 due
29 * to the mask handling in lrng_pool_lfsr_u32 which uses AND instead of modulo.
30 */
31 struct lrng_pool {
32 union {
33 struct {
34 /*
35 * hash_df implementation: counter, requested_bits and
36 * pool form a linear buffer that is used in the
37 * hash_df function specified in SP800-90A section
38 * 10.3.1
39 */
40 unsigned char counter;
41 __be32 requested_bits;
42
43 /* Pool */
> 44 atomic_t pool[LRNG_POOL_SIZE] __latent_entropy;
45 /* Ptr into pool for next IRQ word injection */
46 atomic_t pool_ptr;
47 /* rotate for LFSR */
48 atomic_t input_rotate;
49 /* All NUMA DRNGs seeded? */
50 bool all_online_numa_node_seeded;
51 /* IRQ noise source status info */
52 struct lrng_irq_info irq_info;
53 /* Serialize read of entropy pool */
54 spinlock_t lock;
55 };
56 /*
57 * Static SHA-1 implementation in lrng_cc20_hash_buffer
58 * processes data 64-byte-wise. Hence, ensure proper size
59 * of LRNG entropy pool data structure.
60 */
61 u8 hash_input_buf[LRNG_POOL_SIZE_BYTES + 64];
62 };
63 };
64

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-08-31 11:25    [W:0.135 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site