From: "Stephan Müller" <smueller@chronox.de>
To: Tso Ted <tytso@mit.edu>,
linux-crypto@vger.kernel.org, kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, Willy Tarreau <w@1wt.eu>,
Nicolai Stange <nstange@suse.de>,
LKML <linux-kernel@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
"Alexander E. Patrakov" <patrakov@gmail.com>,
"Ahmed S. Darwish" <darwish.07@gmail.com>
Subject: Re: [PATCH v41 01/13] Linux Random Number Generator
Date: Thu, 15 Jul 2021 07:24:52 +0200 [thread overview]
Message-ID: <2681052.7KKukIsK80@positron.chronox.de> (raw)
In-Reply-To: <202107150632.Yy6v9Pmq-lkp@intel.com>
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 u32.
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 structure.
Ciao
Stephan
next prev parent reply other threads:[~2021-07-15 5:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 5:43 [PATCH v41 00/13] /dev/random - a new approach Stephan Müller
2021-07-14 5:44 ` [PATCH v41 01/13] Linux Random Number Generator Stephan Müller
2021-07-14 22:55 ` kernel test robot
2021-07-15 5:24 ` Stephan Müller [this message]
2021-07-14 5:44 ` [PATCH v41 02/13] LRNG - allocate one DRNG instance per NUMA node Stephan Müller
2021-07-14 5:44 ` [PATCH v41 03/13] LRNG - sysctls and /proc interface Stephan Müller
2021-07-14 5:45 ` [PATCH v41 04/13] LRNG - add switchable DRNG support Stephan Müller
2021-07-14 5:45 ` [PATCH v41 05/13] LRNG - add common generic hash support Stephan Müller
2021-07-14 5:46 ` [PATCH v41 06/13] crypto: DRBG - externalize DRBG functions for LRNG Stephan Müller
2021-07-14 5:46 ` [PATCH v41 07/13] LRNG - add SP800-90A DRBG extension Stephan Müller
2021-07-14 5:47 ` [PATCH v41 08/13] LRNG - add kernel crypto API PRNG extension Stephan Müller
2021-07-14 5:47 ` [PATCH v41 09/13] crypto: provide access to a static Jitter RNG state Stephan Müller
2021-07-14 5:48 ` [PATCH v41 10/13] LRNG - add Jitter RNG fast noise source Stephan Müller
2021-07-14 5:49 ` [PATCH v41 11/13] LRNG - add SP800-90B compliant health tests Stephan Müller
2021-07-14 5:49 ` [PATCH v41 12/13] LRNG - add interface for gathering of raw entropy Stephan Müller
2021-07-14 5:50 ` [PATCH v41 13/13] LRNG - add power-on and runtime self-tests Stephan Müller
2021-07-14 11:54 ` [PATCH v41 00/13] /dev/random - a new approach Alexander Lobakin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2681052.7KKukIsK80@positron.chronox.de \
--to=smueller@chronox.de \
--cc=arnd@arndb.de \
--cc=darwish.07@gmail.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=nstange@suse.de \
--cc=patrakov@gmail.com \
--cc=tytso@mit.edu \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).