Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2600430pxk; Sun, 20 Sep 2020 09:51:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyepu4LlQBmjzzAtcLd1fzgtq7HXEyOeXU0AApuB6h0XXnLz3v1L+E1uX/PYs47Lr7Gx5Rv X-Received: by 2002:a05:6402:78b:: with SMTP id d11mr50474475edy.341.1600620685310; Sun, 20 Sep 2020 09:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600620685; cv=none; d=google.com; s=arc-20160816; b=Rd8Gsv8Copl9OZMk1NzCthsfw5oNvZLWD68zccuvXQ79WoPtdFqp6Df5CW+J+1TRWF 7Tj9wPJ8fcj7yhJZ1jqK+a7lZFISxcpxi2lQtzuEZbM/015ArFIiotJHL0tppT4uSeUd SVmPr4n+8j5MXowC9HCqQ3KLCAfu6WaclEdvH21ryldDa6jmmNo0SaPripMZPRA/Sz8c gRuDHd4uYLWKpEKd2/j6XqJ2W7sKl5JIfDtbSqPKHCTfx6L3DoRbj0oO2Z2gdTJtLo/z nHPS0xVppRASoJjxsNmWsvbnutlJlWrmvkCVghDA+AwYSjY/Wemo5x8cK4AYNml75Otn A0Bg== 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=OLR7KLlF/JzCb7U35Y0Ov3zt4ftoGTUVmg0q5c2S7X8=; b=SU4WCAYmNkkAQp8os61f4V/1xIbMbQv2TDXxOxBeT2cMQi7FDlVCdZs6+VZg53J12a vSqMXdK1MeO9WV+SIxuP8I+pQ7U/cQD6UA96I09AR5Ny6drYNiiTj7mBJ2r5Aw1ClQOe zj9MSoOKgoXyj/WemJdb/xiZUSEw15BF5OWVaqAVbgeKLfjYb3L/xZpxH0KVdc+JdAoH wIadbph2sJjS7HCS7eANlzUSv8b5PGhFtUv+gDbOaEVkka5bYSPbqtX3d+zFC6ubFq3v p6HMA/JY5haCD9Ve2RIn07whY3ymxX3qAILIxUNcopfzTktXGjR+LmZ3zW/m6fhxL4Ge uiqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b=AXFBj5iF; 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 o11si6388653ejr.667.2020.09.20.09.50.53; Sun, 20 Sep 2020 09:51:25 -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=AXFBj5iF; 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 S1726311AbgITQuv (ORCPT + 99 others); Sun, 20 Sep 2020 12:50:51 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:27719 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbgITQuv (ORCPT ); Sun, 20 Sep 2020 12:50:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1600620646; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=OLR7KLlF/JzCb7U35Y0Ov3zt4ftoGTUVmg0q5c2S7X8=; b=AXFBj5iFdqqm2RyFxhGonh9KuIog7gpzd7oaPSl1w8CkWElzaVeCsBCICZ+z+XMJeG 7hhZLAm+6EPVdJX9KWP4wZqCOtWI3wwtY6fOU+bXUu1iU/JtPtzYfG14W+49PKHPs2+u chCNqeEc0xVwmsJmUyiHFv6Ox9ap6wzNP+45tpLrPsaq/MTryqW6yrGB/qYAtBit9Xl5 S2V6Zi6z1Z2zMU8ZigqgIWgg3W8qVZbHVquuI4cwGTu0M637bJN7B0RygsU+9WCYxeDe TIDTSQhvz4WjbwbEep4lv9kp/ZQnuRs2mAYXQvujn1aOd52pOMt4ltHviU2VGrALvpnk aJ/Q== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9xmwdNnzGHXPbI/Sa6ro=" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 46.10.7 DYNA|AUTH) with ESMTPSA id 002e9aw8KGnwCmn (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 20 Sep 2020 18:49:58 +0200 (CEST) From: Stephan Mueller To: Arnd Bergmann , kernel test robot Cc: kbuild-all@lists.01.org, Greg Kroah-Hartman , linux-crypto@vger.kernel.org, LKML , linux-api@vger.kernel.org, "Eric W. Biederman" , "Alexander E. Patrakov" , "Ahmed S. Darwish" , "Theodore Y. Ts'o" , Willy Tarreau Subject: Re: [PATCH v35 01/13] Linux Random Number Generator Date: Sun, 20 Sep 2020 18:49:57 +0200 Message-ID: <4146830.tdWV9SEqCh@tauon.chronox.de> In-Reply-To: <202009182001.I8MjZZ8x%lkp@intel.com> References: <4288186.LvFx2qVVIh@positron.chronox.de> <202009182001.I8MjZZ8x%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 Freitag, 18. September 2020, 15:02:17 CEST schrieb kernel test robot: Hi, > All errors (new ones prefixed by >>): > >> drivers/char/lrng/lrng_chacha20.c:33:8: error: structure variable > >> 'chacha20' with 'latent_entropy' attribute has a non-integer field > >> 'block' > 33 | struct chacha20_state chacha20 __latent_entropy; > > | ^~~~~~~~~~~~~~ > > # > https://github.com/0day-ci/linux/commit/ecb964754fd80cca434d6d2ad6db8f28a15 > 92fa1 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/20200918-181505 git checkout > ecb964754fd80cca434d6d2ad6db8f28a1592fa1 > vim +33 drivers/char/lrng/lrng_chacha20.c > > 27 > 28 /* > 29 * Have a static memory blocks for the ChaCha20 DRNG instance to > avoid calling 30 * kmalloc too early in the boot cycle. For subsequent > allocation requests, 31 * such as per-NUMA-node DRNG instances, kmalloc > will be used. 32 */ > > > 33 struct chacha20_state chacha20 __latent_entropy; I do not think this report is valid. The following definitions apply: struct chacha20_state { struct chacha20_block block; }; struct chacha20_block { u32 constants[4]; union { #define CHACHA_KEY_SIZE_WORDS (CHACHA_KEY_SIZE / sizeof(u32)) u32 u[CHACHA_KEY_SIZE_WORDS]; u8 b[CHACHA_KEY_SIZE]; } key; u32 counter; u32 nonce[3]; }; This implies that struct chacha20_state and thus the chacha20 variable is a linear buffer with in total 4 + 8 + 1 + 3 = 16 32-bit integers which are at least aligned on a 32-bit boundary and are designated as u32 integers. Please let me know if I need to make a tweak to the definitions to convince the code analyzer it is a flat linear buffer consisting of integers and thus to understand the structure correctly. Thanks a lot. Ciao Stephan