Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751642AbdCZSKg convert rfc822-to-8bit (ORCPT ); Sun, 26 Mar 2017 14:10:36 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33773 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbdCZSKI (ORCPT ); Sun, 26 Mar 2017 14:10:08 -0400 Date: Sun, 26 Mar 2017 21:09:59 +0300 From: Krzysztof Kozlowski To: Stephan =?utf-8?Q?M=C3=BCller?= Cc: PrasannaKumar Muralidharan , Kukjin Kim , Javier Martinez Canillas , Matt Mackall , Herbert Xu , "David S. Miller" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-crypto@vger.kernel.org, Bartlomiej Zolnierkiewicz , Arnd Bergmann , Olof Johansson Subject: Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Message-ID: <20170326180959.rmps6pj5376l45fz@kozik-lap> References: <20170325162654.3827-1-krzk@kernel.org> <20170326160126.nwboar7mwztwxtgp@kozik-lap> <1535446.zHpTqe8jba@positron.chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <1535446.zHpTqe8jba@positron.chronox.de> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 912 Lines: 26 On Sun, Mar 26, 2017 at 07:05:48PM +0200, Stephan Müller wrote: > Am Sonntag, 26. März 2017, 18:46:02 CEST schrieb PrasannaKumar Muralidharan: > > Hi Krzysztof, > > > >> > + if (slen < EXYNOS_RNG_SEED_SIZE) { > > >> > + dev_warn(rng->dev, "Seed too short (only %u bytes)\n", > > >> > slen); + return -EINVAL; > > >> > + } > > >> > > >> Will it be helpful to print the required seed size? > > > > > > It is in /proc/crypto... It is not a problem to print it but isn't that > > > redundant? > > > > Not necessary if it is already available. > > Maybe the dev_warn should be removed. Note, unprivileged user space can > trigger this warning by simply invoking the seeding operation over and over > again with an insufficient seed size. This would clutter the log. Makes sense. The generic dev_dbg() before would bring enough information. Best regards, Krzysztof