Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1053423imm; Wed, 20 Jun 2018 10:46:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJdgm0ONL2Q7dsZ5I0eiu/TwKGvGeCM7WYSIRilqFqOHJzlDrWzSio3qLpywTY/bvj8ynBh X-Received: by 2002:a17:902:5602:: with SMTP id h2-v6mr25039486pli.314.1529516787925; Wed, 20 Jun 2018 10:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529516787; cv=none; d=google.com; s=arc-20160816; b=fV4chVpv3jaSFtvhT8o1B7bYXX716vJuFcYtvXEZY73W7QnovF+RlEjFHf0G0a+/9l A8YBM3uuynwAHKeFjYEtoDQroJ8Rc4XiSHsM6ua/MthhQutfjS0N87/QTK/VGkUfMVy0 BgnUmoX2CYqBKEdVlbYPHg/1m2VP7QRqRZ52GlVIc4WHXfOrTojFhJR6BCedLTkezNnQ gviiu8UGNZiQkMoa1QxVhQ0Ga0oiFm+FtoJAfcuzhkvtSY3EXYaABz6lp3NV8u+LYCr5 bOA6xVDR85OLiWBRfT/RV8sgp/5Mdr2Je8Jd35yNnBjHZP5h4f224fu8HuraCLBe81Wl YHcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=jPjzLayK2qqkVIoZweAl4wIlbeWqWt8wJ6ii3s36pnc=; b=L4yR94ZVn0X7GHXYV+OZj9FlB1eoT/BQhXTLuwCyj5ORvkP3+025UwbazTESp145ZK 8bU4QXFvlTHD8+BO8enYZCbvb7dc2o8HuYNzBQTQ0lphvNlzDmORECEZP3kxxVPA/bJj SdVtJgnZEEOZ7aiJv2zovyB0Vcf1WmHvWy33hYhONMO01X6X8kWFj4qrk5hf4bykU3bX tXplPCJmRRa5BBL3P/Uy+Tz7s07Q3l4gdSJeLTN3+hwLd26eIgUjvWuOtYtZJV21yB8n lt15MNyId7qfsE+uE4hW3Q+eX+JpdORmcR4A87KoG866R+ixvcqmOTuQCKTMO3HEsGSN qU9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T6AiO0S8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12-v6si2447709pgf.359.2018.06.20.10.46.14; Wed, 20 Jun 2018 10:46:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T6AiO0S8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932960AbeFTRpU (ORCPT + 99 others); Wed, 20 Jun 2018 13:45:20 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:37385 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932763AbeFTRpO (ORCPT ); Wed, 20 Jun 2018 13:45:14 -0400 Received: by mail-pf0-f195.google.com with SMTP id y5-v6so161269pfn.4; Wed, 20 Jun 2018 10:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jPjzLayK2qqkVIoZweAl4wIlbeWqWt8wJ6ii3s36pnc=; b=T6AiO0S8RORzpMG71B/V0t8FN8BFBiMfb7cjY3XPLvdsigHpUnQtfP6im4xhNGZ8Xg H5srn3PihF2exuDB4fF7VuyB2u0ZRHVTZiTCBpmaM9vzyiawaLcZk3RRPzpLtTph8bo8 jRxKncl/XajchkJnOD5KbVGO36/Tx5bDUFCbxhIRU1TeKYIFREEMTjIpBKowjKZzm+LL dmkNGVxbFpQDsFLg0UkgzxSrfOMGkXXWLpdpNRKTQ033lNBVCx58NC21/7GozrlVV7dz URn3UVNnpgVNIFeDIl54+uJxi9ZkPzVSrzDFOVmLx2Db4hv8vJgPIUx5A2my+Ir892SW 1VbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jPjzLayK2qqkVIoZweAl4wIlbeWqWt8wJ6ii3s36pnc=; b=GgD9hLH49RMJRJEKNOUhUSS6wiVRBYyPXnabhkuevTcfm/uIHgWkkRwOA5ccEBIUvP u0KhdByolUzWoqmnrycDC9sRD1sPRnqjpIJEHVqc2OBm1mU7ojH3t7dJCG6mrDZ/ZeVr O0jd1Gs+M7wEPkNW6L7mX3A8lXe8pEv73BdHkJ0bWk/mj1U8gHWv7l32HDd5qqnc+p+o aGyZ8aNl6lTYQ0kAZ1xdwdQebJPhRmyaaWD/aDXRual8VjR0JuvdtKhMIXmXLAPezFxm 8hirNF01QluNdp9JO0PDFk1//90uPBvLokNdiukJ8iWby+/gyWp7NCVjMUaYMsu+L/vU l1/Q== X-Gm-Message-State: APt69E0Jis/G1IFTkU9cdSaPkk7khTXX6LVAjjRNBvXcMq9S6fcvYOq8 p+3ySsyqKGo4UnoDS7qFKIYt+bYn3DcBTKvKgMYQGdRu X-Received: by 2002:a62:4715:: with SMTP id u21-v6mr23913005pfa.89.1529516713387; Wed, 20 Jun 2018 10:45:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:ac03:0:0:0:0 with HTTP; Wed, 20 Jun 2018 10:45:12 -0700 (PDT) In-Reply-To: <20180620053204.GG13316@vkoul-mobl> References: <20180618141259.23141-1-vkoul@kernel.org> <20180618141259.23141-4-vkoul@kernel.org> <20180619142853.wgi5easw4zv6ttrb@gondor.apana.org.au> <20180620053204.GG13316@vkoul-mobl> From: PrasannaKumar Muralidharan Date: Wed, 20 Jun 2018 23:15:12 +0530 Message-ID: Subject: Re: [PATCH 3/3] hwrng: msm - Add support for prng v2 To: Vinod Cc: Herbert Xu , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , open list , Matt Mackall , Arnd Bergmann , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vinod, On 20 June 2018 at 11:02, Vinod wrote: > On 19-06-18, 22:28, Herbert Xu wrote: >> On Mon, Jun 18, 2018 at 07:42:59PM +0530, Vinod Koul wrote: >> > Qcom 8996 and later chips support prng v2 where we need to only >> > implement .read callback for hwrng. >> > >> > Add a new table for v2 which supports this and get version required for >> > driver data. >> > >> > Signed-off-by: Vinod Koul >> >> Is this really a pseudo-RNG? If so it needs to be moved over to >> the algif_rng interface. >> >> hwrng is for true hardware RNGs only, because it may be directly >> fed into /dev/random. > > I am trying to find how how much random output this hardware generates. > > Meanwhile, can you please point out examples/Documentation for algif_rng > and if any test tools for this? As Herbert suggested exynos rng is a good example. It was wrongly using hwrng framework then switched to using crypto framework. I have a patch for msm rng using crypto framework, only compile tested though. You can find the patch at https://pastebin.ubuntu.com/p/44r6BJgBkN/. I am having a hard time sending patches via git send-email form a gmail account so I have put it in pastebin. Feel free to use it if that is useful. Regards, PrasannaKumar