public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
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 v40 01/13] Linux Random Number Generator
Date: Fri, 28 May 2021 08:04:45 +0200	[thread overview]
Message-ID: <2921350.VP03N2d09h@positron.chronox.de> (raw)
In-Reply-To: <202105280808.AgyBCLBL-lkp@intel.com>

Am Freitag, 28. Mai 2021, 02:41:09 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;
> 
>          |        ^~~~~~~~~~~~~~

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



  reply	other threads:[~2021-05-28  6:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 15:53 [PATCH v40 00/13] /dev/random - a new approach Stephan Müller
2021-05-27 15:55 ` [PATCH v40 01/13] Linux Random Number Generator Stephan Müller
2021-05-28  0:41   ` kernel test robot
2021-05-28  6:04     ` Stephan Müller [this message]
2021-05-27 15:56 ` [PATCH v40 02/13] LRNG - allocate one DRNG instance per NUMA node Stephan Müller
2021-05-27 15:56 ` [PATCH v40 03/13] LRNG - sysctls and /proc interface Stephan Müller
2021-05-27 15:57 ` [PATCH v40 04/13] LRNG - add switchable DRNG support Stephan Müller
2021-05-27 15:58 ` [PATCH v40 05/13] LRNG - add common generic hash support Stephan Müller
2021-05-27 15:59 ` [PATCH v40 06/13] crypto: DRBG - externalize DRBG functions for LRNG Stephan Müller
2021-05-27 16:00 ` [PATCH v40 07/13] LRNG - add SP800-90A DRBG extension Stephan Müller
2021-05-27 16:01 ` [PATCH v40 08/13] LRNG - add kernel crypto API PRNG extension Stephan Müller
2021-05-27 16:02 ` [PATCH v40 09/13] crypto: provide access to a static Jitter RNG state Stephan Müller
2021-05-27 16:02 ` [PATCH v40 10/13] LRNG - add Jitter RNG fast noise source Stephan Müller
2021-05-27 16:03 ` [PATCH v40 11/13] LRNG - add SP800-90B compliant health tests Stephan Müller
2021-05-27 16:04 ` [PATCH v40 12/13] LRNG - add interface for gathering of raw entropy Stephan Müller
2021-05-27 16:04 ` [PATCH v40 13/13] LRNG - add power-on and runtime self-tests Stephan Müller
2021-05-27 16:07 ` [PATCH v40 00/13] /dev/random - a new approach Stephan Müller

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=2921350.VP03N2d09h@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