Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp48138pxv; Wed, 14 Jul 2021 22:35:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf5qiWqnbNUtivcKB/nHAD31GIv/fLAf/gk4KmJpze9sfqngnc0EazIIFJrkwK1/8NqAVB X-Received: by 2002:a05:6402:22aa:: with SMTP id cx10mr3974851edb.0.1626327312065; Wed, 14 Jul 2021 22:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626327312; cv=none; d=google.com; s=arc-20160816; b=k82KSvzhhFUFO4I3jHirGjw6Eu5099lc8yJYLRQIWmWizURlignsrTdLI/44NR0TiX hTJNYmVvF/oSEXq83mi/b+DlPtlqWou9G9rWNflvlMAyur4HLBLe+7c2k5I8Amtn83Ng g/CSCxwgTt4d8ilqQeQzIJ6gP06dx4eCp3OPTA9DhcTFW9cn5fLAGHcDbG0q19xriNP9 S9AIUihkxNMe5yiIO2puas1FH7wf3zmOWTwHm7kF1POWilxEmYaHItonNllO1OejUgRU aaBaX2Ue2w7sEh6n0iI11FiD7shwSyW4Xl/no20CFQwOdBA44t34ERM/OIlqEQfU1GGv UIYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YvOvb7F9+bANpwvucgDOlOa9eGWo3BPDkvFZuhPIXrY=; b=UVkjQev/OnLsqbyh8SpFqmG5nznZUUgAr1bcyrIlrMtB0dMVoapYlshJIwRzl3+u6w H969aC7LyM3C9ge/svSMElAGxPjHPPTJmoGgGanGZl7kETxUh30psSOQ5WR2Uli98Nsq d/FeL3MnsSkjyW+mHToRhXxI+SUWxnGmo4TImmIWLVU+vGRbQ88qoubjRRBPpOFz6jBN qAqSY2v4nhP0tpAMdlQvwE9aVcJBy+tOYF2KDJ6txu4qWbNgA5185qIbm0x32OByFNWT 0MPPdBb+F3H6WsmVvkhUherSnVD2NhyuCVIo95q5YQIst1uKKrT18aqWIkb/tsuknUdm ArcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b=jLsq06fl; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si1044098edd.297.2021.07.14.22.34.32; Wed, 14 Jul 2021 22:35:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b=jLsq06fl; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231718AbhGOF2g (ORCPT + 99 others); Thu, 15 Jul 2021 01:28:36 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([81.169.146.167]:19389 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbhGOF2g (ORCPT ); Thu, 15 Jul 2021 01:28:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1626326694; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=YvOvb7F9+bANpwvucgDOlOa9eGWo3BPDkvFZuhPIXrY=; b=jLsq06flzzaEXx/DputCqkaJwAU4avvqYoqEfIyhNkmfoLNUo1f1G0NyOEvr8/faWe odramQov7akwq71vQN9j8xfRtD6/3z+P7QuL8S0zUNiZh+pkowFdPNZ71vvusAwPqeBH Di8UTVUIHt2bpW5rpzSCHqUF1IU+t1EPUrLTdffXJFU5CtZSo9oNxKwFUvHIlmiOek/j M7TvyHVTNKFJE9EW5MhCuFe3lLdGjSuknPM6DUo4z2c4IxMNWtpPxS/moyvEyx31bpsC w+CFFX7rdzbLHmKUDFqeTfZEr58dtYAJeQKjoKo9HXYnqTl6AjenMgKp7c3lL7ZTsACN B5rQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9xmwdNnzGHXPaLvSd940=" X-RZG-CLASS-ID: mo00 Received: from positron.chronox.de by smtp.strato.de (RZmta 47.28.1 DYNA|AUTH) with ESMTPSA id 9043bbx6F5Oq1F8 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 15 Jul 2021 07:24:52 +0200 (CEST) From: Stephan =?ISO-8859-1?Q?M=FCller?= To: Tso Ted , linux-crypto@vger.kernel.org, kernel test robot Cc: kbuild-all@lists.01.org, Willy Tarreau , Nicolai Stange , LKML , Arnd Bergmann , Greg Kroah-Hartman , "Eric W. Biederman" , "Alexander E. Patrakov" , "Ahmed S. Darwish" 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> References: <1944948.TYRkL7eqjW@positron.chronox.de> <202107150632.Yy6v9Pmq-lkp@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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