Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3817106imm; Mon, 25 Jun 2018 05:12:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL7cLmo354SzgRqA80JZRkA1cBn9cFkgF0+HT1LxOklceIE3P6rL8iodualmLOFLibrJ68W X-Received: by 2002:a62:10c2:: with SMTP id 63-v6mr12578444pfq.229.1529928742655; Mon, 25 Jun 2018 05:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529928742; cv=none; d=google.com; s=arc-20160816; b=pvAq52L1LbD36IRLkrjVfyzzkUo0gPZwczok29mRXSgXKaj5IBeeOfs9LfwMsHexkU Ekv/jPH2mXtfhETALN/yyevML8b+ujZGILh27E7x9g6xF3vjuoJZkcfC28pkgP+CQKxz qPWSFsufpa1Tr5AoWxWummQd9NevlGihwvpeVJFBwAYI3gd4ONcup3llFFvT7RoG4eeC oWyVryC/DSHlV6Jr6RjVjj8mNsta5l0WntvNH0xNCOsEoKPjVpFWyEeHVo4FBMqvR7b8 Bm6JEzq6P3ChwMAREZZ9pDHW0pMapfsOCzTAS0yJGdMIAo+ilaKffHLNRPzOA9Z/Qr/U 9g+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=JGCgVDWVt0fYmDaRJkTmA5vUqhdIwJj+tQU538GmfZ4=; b=qsiCGHlFhyxVnVl2a0/NIXQ5RZNiHdW5yoNFMT1eIFqZt46kAomqgyuCVI8q+uz76O M3QRC6alxWtFpreYGbpRmXXf9fRhTG7J1lXmylMJPVLH4ff/zwKCcNkNTTUY4/q64Bkl OjwNc/koMppcmcRKx7fgYFOOS9eMYyeUf0R193JztSwI4nFslQunIRNFLfXUAsjfKEFt SfZdqbGxQ9KBBKNnqvULvC2iGnvufKposOsMloS+0XTwpTHC+TcS/KCJnHQQojxEpYKz vkmIEp8ZU1GviDI5ldVVzf9jWB2Bk6cz4qL5GBBrQ2nKAVnxqN9FrqxfkKuYXTxtST1L E66A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y63-v6si4548123pgb.5.2018.06.25.05.12.08; Mon, 25 Jun 2018 05:12:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933755AbeFYMK1 (ORCPT + 99 others); Mon, 25 Jun 2018 08:10:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:42124 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932444AbeFYMFA (ORCPT ); Mon, 25 Jun 2018 08:05:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AC909ABF7; Mon, 25 Jun 2018 12:04:58 +0000 (UTC) Date: Mon, 25 Jun 2018 14:04:54 +0200 From: Petr Mladek To: Andrew Morton Cc: Steven Rostedt , Thierry Escande , David Miller , Rasmus Villemoes , "Tobin C . Harding" , linux-kernel@vger.kernel.org, Andy Shevchenko , Linus Torvalds Subject: Re: [PATCH RESEND] lib/test_printf.c: call wait_for_random_bytes() before plain %p tests Message-ID: <20180625120454.rtf7ram4euvgdc6w@pathway.suse.cz> References: <20180604113708.11554-1-thierry.escande@linaro.org> <20180607122434.i4x7b5ij4p6dpx7w@pathway.suse.cz> <20180622205346.owyjk33wplzh7nhs@home.goodmis.org> <20180625075020.xcb6jqup3dhq2agf@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180625075020.xcb6jqup3dhq2agf@pathway.suse.cz> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2018-06-25 09:50:20, Petr Mladek wrote: > On Fri 2018-06-22 23:50:20, Thierry Escande wrote: > > On 22/06/2018 22:53, Steven Rostedt wrote: > > > On Thu, Jun 07, 2018 at 02:24:34PM +0200, Petr Mladek wrote: > > > > On Mon 2018-06-04 13:37:08, Thierry Escande wrote: > > > > > If the test_printf module is loaded before the crng is initialized, the > > > > > plain 'p' tests will fail because the printed address will not be hashed > > > > > and the buffer will contain '(ptrval)' instead. > > > > > This patch adds a call to wait_for_random_bytes() before plain 'p' tests > > > > > to make sure the crng is initialized. > > > > > > > > Hmm, my system did not boot with this patch and > > > > CONFIG_TEST_PRINTF=y > > > > > > And neither does my test box. It killed my tests I was running, as one of the > > > configs I test has this set. > > > > > > It appears that Andrew pulled it in and sent it to Linus, as it is in > > > 4.18-rc1, and I need to now revert this patch to make my tests work. > > > > This patch has been superseded with a v2 and a v3 pushed into Petr > > printk.git tree (https://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git/commit/?h=for-4.19&id=ce041c43f22298485122bab15c14d062383fbc67). > > Sorry for the mess... > > Andrew, > > should I send the revert and the better fix to Linus or would you like > to do so? Below is the proposed revert-commit just in case people want to add Reviewed-by tags or so. From 043f891b70e6197bc181f3b087c2bd04c60fddd2 Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Mon, 25 Jun 2018 13:28:06 +0200 Subject: [PATCH] Revert "lib/test_printf.c: call wait_for_random_bytes() before plain %p tests" This reverts commit ee410f15b1418f2f4428e79980674c979081bcb7. It might prevent the machine from boot. It would wait for enough randomness at the very beginning of kernel_init(). But there is basically nothing running in parallel that would help to produce any randomness. Reported-by: Steven Rostedt (VMware) Signed-off-by: Petr Mladek --- lib/test_printf.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/test_printf.c b/lib/test_printf.c index b2aa8f514844..cea592f402ed 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -260,13 +260,6 @@ plain(void) { int err; - /* - * Make sure crng is ready. Otherwise we get "(ptrval)" instead - * of a hashed address when printing '%p' in plain_hash() and - * plain_format(). - */ - wait_for_random_bytes(); - err = plain_hash(); if (err) { pr_warn("plain 'p' does not appear to be hashed\n"); -- 2.13.7