Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp767935imm; Wed, 13 Jun 2018 08:01:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLuFbsosSY8uuiqp0o8Uw9iSSozxdDyU9kzhWSx0ylimSTTOc3cFwMp6CclSD3VoSItmqG9 X-Received: by 2002:a62:6406:: with SMTP id y6-v6mr5315965pfb.204.1528902093860; Wed, 13 Jun 2018 08:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528902093; cv=none; d=google.com; s=arc-20160816; b=ypDbJMpZmpb2kfP3wahe2VuWzyxnfWfmOYKATReCjk0Dno4v8WMFN5o17hMnocY895 5vzMwU3Hn6ZTz4V6fbTvs2TtiVH4paLuINxU7zwAfkfwGytZHvxS10vIIXI206v0Z6U5 UlqZXO03n0r29GGh6yLSTMw2NwSLyt7ggbkIgDo0LiHaFSR/ecSVJUSNxqdGrjVshpPo RET0SAIEj8WtTr8Pm/1CpiQY2WmO5QxyQzSPhZZSe9aZYigl+Qg0FBiAtr5u9MS0ydCw 8iF/horWKXZyVP/d37JQ76s1GmAB4Vyvj8m4bSTVqpt6Zitm8uYx0TEdTpM8G9Uq4D84 gO+g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=oMZWsnRKXXeQ+5GEcooKlwlJOUPr4xBZtKePEdz06AM=; b=ZhCoK8qORtvJXKbuV3qjXJ1OncwlhlluyK873ea7BBsQ4jU3xHgQRUkKlznqpTxOlu 4ze+JIzT+rWFNZFxHpy/roStTvk5hwj4PrSi2IBZGnlLu9lqvootgNRIxa2fhttcDgg4 iS8hR7EQlts5NhwDfaiXWXz9oUg7JfzOf3/HSY9N3T0XK60KtG3Jiifu2MSEaqrWFeau jtSOvCpy79Zy63oMXwBCziAMksoh4XpftFFlhar7lCBTgUxbOGHf0v8vQZcO6LUXMTir StY4Jpk5+TZJJqqwwiMj3SSaM9hT6LyHwjuV+aDYWSw4tNGTL9BKlgkE2JBUFJkISWZo 7+6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LeVH2p5g; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si2884901pfn.16.2018.06.13.08.01.18; Wed, 13 Jun 2018 08:01:33 -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=@linaro.org header.s=google header.b=LeVH2p5g; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936032AbeFMO7e (ORCPT + 99 others); Wed, 13 Jun 2018 10:59:34 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:39733 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935190AbeFMO7b (ORCPT ); Wed, 13 Jun 2018 10:59:31 -0400 Received: by mail-wm0-f65.google.com with SMTP id p11-v6so6013003wmc.4 for ; Wed, 13 Jun 2018 07:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oMZWsnRKXXeQ+5GEcooKlwlJOUPr4xBZtKePEdz06AM=; b=LeVH2p5gLX6QR04e5gTNsR3ENtSkzuhLkyP3ByOJbjq1doYXl0XpPq9Hg7/e1U/Wrm IqU6eDXahLAuwSkxraeiKIGWqUVdFkziFRdnt+G+pflg5SqlQgxGh/KoswHK8zOvZGhZ ZJYpgQt/xEPdN77+m5bSl6bff14JIIGfupLPI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oMZWsnRKXXeQ+5GEcooKlwlJOUPr4xBZtKePEdz06AM=; b=cfhDApd+rcQpnDXBRz2GKUUhf8Q5gNp+SMy1t888Va5Jci4Qfuk5aTxTvVguS3tc+x 1i/NIVCZagi0P2Dbm7Fafj4Zxk0djlG70w1P/FBJptykYYOxQg+/R+ophUS7SuXyyZI1 5NEeftZdh0eoJFoaL7zO2GssRWZPN4iigL+GywLXR8kJfX1RkT6MZukEvWGXeJdN1DNM d/lU2vvrw7YwkwSE76tw3d0hCM35AQYaR4msLC61vmobQWQpoJscSIYCUc2GHcIIMoNM 7m9+r9PMmSKYKh9Syr6YvLiO5gJyErqq70aCY77Mb24kBOWcn/klJLk37M4gOVYqJz38 z3Jw== X-Gm-Message-State: APt69E3W1rJ8MXgcZep5uwPoHrkCtWwzqi/cxIr/jDU3eqazEAaaQoHT +OAdHV4pmhlczvH2OKIt3YBfG6Pdv/U= X-Received: by 2002:a1c:1286:: with SMTP id 128-v6mr3993527wms.9.1528901970023; Wed, 13 Jun 2018 07:59:30 -0700 (PDT) Received: from [192.168.1.100] (aig34-1-88-167-228-121.fbx.proxad.net. [88.167.228.121]) by smtp.gmail.com with ESMTPSA id u70-v6sm5027289wmd.3.2018.06.13.07.59.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 07:59:29 -0700 (PDT) Subject: Re: [PATCH v2] lib/test_printf.c: call wait_for_random_bytes() before plain %p tests To: Andy Shevchenko Cc: Andrew Morton , David Miller , Petr Mladek , Rasmus Villemoes , "Tobin C . Harding" , Linux Kernel Mailing List References: <20180613092919.24075-1-thierry.escande@linaro.org> From: Thierry Escande Message-ID: Date: Wed, 13 Jun 2018 16:59:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/06/2018 13:22, Andy Shevchenko wrote: > On Wed, Jun 13, 2018 at 12:29 PM, 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. >> Since we cannot wait for the crng to be initialized for an undefined >> time, both plain 'p' tests now accept the string "(ptrval)" as a valid >> result and print a warning message. > > There are two possibilities: > 1. (ptrval) for 32-bit case > 2. (____ptrval____) for 64-bit case. From lib/vsprintf.c, ptr_to_id() puts "(ptrval)" into the buffer, then it gets left-padded with spaces by widen_string(). Regards, Thierry