Re: [PATCH v42 01/13] Linux Random Number Generator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi "Stephan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on herbert-crypto-2.6/master]
[cannot apply to char-misc/char-misc-testing herbert-cryptodev-2.6/master v5.15-rc1 next-20210917]
[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/20210917-174624
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git master
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.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
        # https://github.com/0day-ci/linux/commit/335ce64ab466685e61b363a33a405c9c49c7a099
        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/20210917-174624
        git checkout 335ce64ab466685e61b363a33a405c9c49c7a099
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32 

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

All warnings (new ones prefixed by >>):

>> drivers/char/lrng/lrng_chacha20.c:35: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Update of the ChaCha20 state by either using an unused buffer part or by
--
>> drivers/char/lrng/lrng_es_aux.c:185: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Get auxiliary entropy pool and its entropy content for seed buffer.
--
   drivers/char/lrng/lrng_es_irq.c:316: warning: Function parameter or member 'node' not described in 'lrng_pcpu_switch_hash'
   drivers/char/lrng/lrng_es_irq.c:316: warning: Function parameter or member 'new_cb' not described in 'lrng_pcpu_switch_hash'
   drivers/char/lrng/lrng_es_irq.c:316: warning: Function parameter or member 'new_hash' not described in 'lrng_pcpu_switch_hash'
   drivers/char/lrng/lrng_es_irq.c:316: warning: Function parameter or member 'old_cb' not described in 'lrng_pcpu_switch_hash'
>> drivers/char/lrng/lrng_es_irq.c:316: warning: expecting prototype for Trigger a switch of the hash implementation for the per(). Prototype was for lrng_pcpu_switch_hash() instead
>> drivers/char/lrng/lrng_es_irq.c:444: warning: expecting prototype for Hash all per(). Prototype was for lrng_pcpu_pool_hash() instead


vim +35 drivers/char/lrng/lrng_chacha20.c

    33	
    34	/**
  > 35	 * Update of the ChaCha20 state by either using an unused buffer part or by
    36	 * generating one ChaCha20 block which is half of the state of the ChaCha20.
    37	 * The block is XORed into the key part of the state. This shall ensure
    38	 * backtracking resistance as well as a proper mix of the ChaCha20 state once
    39	 * the key is injected.
    40	 */
    41	static void lrng_chacha20_update(struct chacha20_state *chacha20_state,
    42					 __le32 *buf, u32 used_words)
    43	{
    44		struct chacha20_block *chacha20 = &chacha20_state->block;
    45		u32 i;
    46		__le32 tmp[CHACHA_BLOCK_WORDS];
    47	
    48		BUILD_BUG_ON(sizeof(struct chacha20_block) != CHACHA_BLOCK_SIZE);
    49		BUILD_BUG_ON(CHACHA_BLOCK_SIZE != 2 * CHACHA_KEY_SIZE);
    50	
    51		if (used_words > CHACHA_KEY_SIZE_WORDS) {
    52			chacha20_block(&chacha20->constants[0], (u8 *)tmp);
    53			for (i = 0; i < CHACHA_KEY_SIZE_WORDS; i++)
    54				chacha20->key.u[i] ^= le32_to_cpu(tmp[i]);
    55			memzero_explicit(tmp, sizeof(tmp));
    56		} else {
    57			for (i = 0; i < CHACHA_KEY_SIZE_WORDS; i++)
    58				chacha20->key.u[i] ^= le32_to_cpu(buf[i + used_words]);
    59		}
    60	
    61		/* Deterministic increment of nonce as required in RFC 7539 chapter 4 */
    62		chacha20->nonce[0]++;
    63		if (chacha20->nonce[0] == 0) {
    64			chacha20->nonce[1]++;
    65			if (chacha20->nonce[1] == 0)
    66				chacha20->nonce[2]++;
    67		}
    68	
    69		/* Leave counter untouched as it is start value is undefined in RFC */
    70	}
    71	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux