Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7425514ybl; Wed, 15 Jan 2020 22:46:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzHfjCKEK580dJ3oLAYGbkABTDWpL0GuPIr6rVo97xuVNMRiaGmMHTO9bhzcbj0wr2M7SLi X-Received: by 2002:a9d:2dca:: with SMTP id g68mr821523otb.150.1579157194855; Wed, 15 Jan 2020 22:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579157194; cv=none; d=google.com; s=arc-20160816; b=VlZpWPzp7oYP5A3KjCaev8fuGjZ4OXNTf5GomMCYa5uGuwF0Jcx+hbwrV/mu3uf7lq ze1YadJuYRivFsMWcNpanql13CcBiA2ou3O7yA5GoGCtURBQtsgkAZDdE73twpQVa1F3 M6s7YL9h2oQGkpV2FDMnXd4QN/HW+luAUd1XXDyNklL1RK2LmuPoAiTUfQfkd7VjAxNw 0VMpT2qdAnh+Ec10mIkYOGxzecPawW43lBG18+/d0guhTMq4L6LXHrrorNKUP0mqZ+H3 poe5M4RArrIsol4h4KrejG3LQHpuPEobY8Ov9h85H7/XZlEpEVjhbzer6bK2X3VbWgzm O2Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UsvSHT+Frq805jA7Se9Q9c/wAlk9BYIYlR1+Hqd6k74=; b=Gt4hDYDAstrKw3aGRmll6ThZwrh56w4ru0Zgaq8d0v9O5srtiqaQ1/LumZ85my2r9c L5UDxmtEkgcFysHEOsbhnmO3Lo6dGleE6qqiqByjUxEkDrXaXwoyAJzHGD+qCMlDdNz6 4IuaUORuPxUMfKGXH85+vqmp9jY2txcM30d1E+P4CMFN/BVbeN63WD0BgWXeb/gnLbui avzTiZlJ7ZCnbJqaH0I9Y62oyzUE1zqK7dQRjnBgZ+LwwSYHJdokrEHvuYEqEmrYS5X1 nG65l0aeWoeAEFgGA7p2Wbc6m/duANSLkV2BYiwJw0KNxKE8QjGPV4bZ31W7NrT9X02O 3UgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=lwBKeC3O; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si11290040otq.144.2020.01.15.22.46.23; Wed, 15 Jan 2020 22:46:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=lwBKeC3O; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729400AbgAPGoq (ORCPT + 99 others); Thu, 16 Jan 2020 01:44:46 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.84]:19158 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbgAPGoq (ORCPT ); Thu, 16 Jan 2020 01:44:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1579157083; 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=UsvSHT+Frq805jA7Se9Q9c/wAlk9BYIYlR1+Hqd6k74=; b=lwBKeC3OK11AlDdc0lm8H7gOlHRbh9pdJfAmBJmFQ5LwOMQ+u6uJI1eIxDs6XhmpSl yVuQUNGBEjQy1cnqudk/csbZr0pgU0m0HYKLqqKAz8/ETRGG2yEoHbcXvVCD5ayVk6qH pAzLKh/pAaFgpV7XDaPNoPrVg6Li2lvxIKYOZPFWX8CZ0SEH+3LVeM8eydgzXBmzvJUU enMEp0YZN1C5oZ2vksmC1nETJdpyXpeu4RYuHZdgJNgWzeHOKqHV4ETuawNfs8h7L89X ZC86JatPqIX2uOg4+JkGTlF2Bc5tf3/MlXMSzFG0reGJICp5phTojCByFaJzLXmDwdPn A9aQ== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9xmwdNnzGHXPZJPScHivh" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 46.1.4 DYNA|AUTH) with ESMTPSA id u04585w0G6hXa7Z (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 16 Jan 2020 07:43:33 +0100 (CET) From: Stephan Mueller To: Randy Dunlap Cc: Arnd Bergmann , 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 , Matthew Garrett , Vito Caputo , Andreas Dilger , Jan Kara , Ray Strode , William Jon McCann , zhangjs , Andy Lutomirski , Florian Weimer , Lennart Poettering , Nicolai Stange , "Peter, Matthias" , Marcelo Henrique Cerri , Roman Drahtmueller , Neil Horman , Julia Lawall , Dan Carpenter Subject: Re: [PATCH v28 11/12] LRNG - add interface for gathering of raw entropy Date: Thu, 16 Jan 2020 07:43:33 +0100 Message-ID: <9116265.6Va6cPe1zF@tauon.chronox.de> In-Reply-To: References: <6157374.ptSnyUpaCn@positron.chronox.de> <2048458.ADJAtTWDj8@positron.chronox.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Am Donnerstag, 16. Januar 2020, 01:18:18 CET schrieb Randy Dunlap: Hi Randy, > On 1/15/20 2:35 AM, Stephan M=FCller wrote: > > CC: "Eric W. Biederman" > > CC: "Alexander E. Patrakov" > > CC: "Ahmed S. Darwish" > > CC: "Theodore Y. Ts'o" > > CC: Willy Tarreau > > CC: Matthew Garrett > > CC: Vito Caputo > > CC: Andreas Dilger > > CC: Jan Kara > > CC: Ray Strode > > CC: William Jon McCann > > CC: zhangjs > > CC: Andy Lutomirski > > CC: Florian Weimer > > CC: Lennart Poettering > > CC: Nicolai Stange > > Reviewed-by: Roman Drahtmueller > > Tested-by: Roman Drahtm=FCller > > Tested-by: Marcelo Henrique Cerri > > Tested-by: Neil Horman > > Signed-off-by: Stephan Mueller > > --- > >=20 > > drivers/char/lrng/Kconfig | 16 ++ > > drivers/char/lrng/Makefile | 1 + > > drivers/char/lrng/lrng_testing.c | 271 +++++++++++++++++++++++++++++++ > > 3 files changed, 288 insertions(+) > > create mode 100644 drivers/char/lrng/lrng_testing.c > >=20 > > diff --git a/drivers/char/lrng/lrng_testing.c > > b/drivers/char/lrng/lrng_testing.c new file mode 100644 > > index 000000000000..0e287eccd622 > > --- /dev/null > > +++ b/drivers/char/lrng/lrng_testing.c > > @@ -0,0 +1,271 @@ > > +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause > > +/* > > + * Linux Random Number Generator (LRNG) Raw entropy collection tool > > + * > > + * Copyright (C) 2019 - 2020, Stephan Mueller > > + */ > > + > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include "lrng_internal.h" > > + > > +#define LRNG_TESTING_RINGBUFFER_SIZE 1024 > > +#define LRNG_TESTING_RINGBUFFER_MASK (LRNG_TESTING_RINGBUFFER_SIZE - 1) > > + > > +static u32 lrng_testing_rb[LRNG_TESTING_RINGBUFFER_SIZE]; > > +static u32 lrng_rb_reader =3D 0; > > +static u32 lrng_rb_writer =3D 0; > > +static atomic_t lrng_testing_enabled =3D ATOMIC_INIT(0); > > + > > +static DECLARE_WAIT_QUEUE_HEAD(lrng_raw_read_wait); > > +static DEFINE_SPINLOCK(lrng_raw_lock); > > + > > +/* > > + * 0 =3D=3D> No boot test, gathering of runtime data allowed > > + * 1 =3D=3D> Boot test enabled and ready for collecting data, gathering > > runtime + * data is disabled > > + * 2 =3D=3D> Boot test completed and disabled, gathering of runtime da= ta is > > + * disabled > > + */ > > +static u32 boot_test =3D 0; > > +module_param(boot_test, uint, 0644); > > +MODULE_PARM_DESC(boot_test, "Enable gathering boot time entropy of the > > first" + " entropy events"); >=20 > One line for the string, please. may I ask the question whether this should be done for all lines with print= k=20 statements? As checkpatch.pl will complain if you have lines larger than 80= =20 chars and complains about line-broken printk statements, I am always unsure= =20 which way to go. All printk statements in the patch series have line-broken printk statement= s. Ciao Stephan