Content-Type: multipart/mixed; boundary="===============2959455118944381845==" MIME-Version: 1.0 From: Stephan Müller To: kbuild-all@lists.01.org Subject: Re: [PATCH v41 01/13] Linux Random Number Generator Date: Thu, 15 Jul 2021 07:24:52 +0200 Message-ID: <2681052.7KKukIsK80@positron.chronox.de> In-Reply-To: <202107150632.Yy6v9Pmq-lkp@intel.com> List-Id: --===============2959455118944381845== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Am Donnerstag, 15. Juli 2021, 00:55:23 CEST schrieb kernel test robot: Hi, > All errors (new ones prefixed by >>): > >> drivers/char/lrng/lrng_chacha20.c:32:8: error: structure variable > >> 'chacha20' with 'latent_entropy' attribute has a non-integer field > >> 'block' > 32 | struct chacha20_state chacha20 __latent_entropy; > = > | ^~~~~~~~~~~~~~ > = > vim +32 drivers/char/lrng/lrng_chacha20.c > = > 26 > 27 /* > 28 * Have a static memory blocks for the ChaCha20 DRNG instance to > avoid calling 29 * kmalloc too early in the boot cycle. For subsequent > allocation requests, 30 * such as per-NUMA-node DRNG instances, kmalloc > will be used. 31 */ > = > > 32 struct chacha20_state chacha20 __latent_entropy; > = > 33 Thanks for the notification. I think this is a false-positive discussed before. __latent_entropy is = seemingly allowed for an entire linear buffer as seen in the declaration of = the variable input_pool_data in driver/char/random.c which is an array of u= 32. The struct chacha20_state is a linear buffer of u32 words. = struct chacha20_block { u32 constants[4]; union { u32 u[CHACHA_KEY_SIZE_WORDS]; u8 b[CHACHA_KEY_SIZE]; } key; u32 counter; u32 nonce[3]; }; Therefore it should be identical to the aforementioned example. The = __latent_entropy marker therefore seems to be appropriate for this structur= e. Ciao Stephan --===============2959455118944381845==--