Received: by 10.192.165.156 with SMTP id m28csp507701imm; Wed, 11 Apr 2018 02:51:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/OgLhToLlfSWThQ2nWKlHMUf3gQnVui4v+3rmYC6rVZGHxVdkNpyVy9iQzK2a0TWMQU2FY X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr4362136plb.317.1523440289988; Wed, 11 Apr 2018 02:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523440289; cv=none; d=google.com; s=arc-20160816; b=oeQYZpjem+yXd9bknuMCFjz0iIUAKfyfEZAKis6H9BnogedyY/1fPkSaEX6bcz89hO LDheGl4Vb8U8Uic/l01G5UGxOaaZ6g5U3JBD8YtKkr38QC9KG2wMBWXut5vpUNAgfqhs 03j0ZpwU/sY5oCbdSqU9/OPoiLZELM4jvNQzSgsobLmtLOtIfFQAFtuFmvqcfz/Tc3UV UF/yDgKc4Bng2hj6ABbwBv+CkE92bLQUSUT9c5OviHybV7ql43KZ1rZR1ZTwjRN2AhPK MKAvT2F9WQ4UTcbcBI2pb75YWkHx/GBzaPjyGgOBZEVnWiraPMYCXGD8P4k9j154lNdt Ct7Q== 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=E6798GupfsY3Ouh84lx/Z/VILouU1Yqc0xNmm6eBDmM=; b=skMhkEsGgexroUe5F46J3WSqafHG/0TQOhdA4fTvw/9m2XDWf4uU1z+6wKrz6ueQLw ji3x7ORUSWzT622n0uxfbY3IvMzcSqeWC1VRWM/tM5aLs4J0puIizuKJColkNtXL9OCo MmykO3jdfOw2nyVA/+qL0IuW6HVb32RH5GwWcqzYtYxQMyhya7yLPOyEhl6mmpKtEhrq BdmLZNpY7RRb8z6W4DkPfXkUHf2R2lmqqty0+4rJQjY7RkSuTY/lwjlThwXrRJrS7c75 x0aiCOKI0ie9edvOYgSdg6JQHdBdAXzBIEdyRHinI77etDC49pmPsduBQ99+RyL2rasn ZpLA== 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 32-v6si785542pla.348.2018.04.11.02.50.53; Wed, 11 Apr 2018 02:51:29 -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 S1752854AbeDKJrT (ORCPT + 99 others); Wed, 11 Apr 2018 05:47:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:34379 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898AbeDKJrR (ORCPT ); Wed, 11 Apr 2018 05:47:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 73C92AC06; Wed, 11 Apr 2018 09:47:16 +0000 (UTC) Date: Wed, 11 Apr 2018 11:47:12 +0200 From: Petr Mladek To: Andy Shevchenko Cc: "Tobin C . Harding" , linux@rasmusvillemoes.dk, Joe Perches , linux-kernel@vger.kernel.org, Andrew Morton , Shunyong Yang , Joey Zheng Subject: Re: [PATCH v2 7/9] lib/vsprintf: Replace space with '_' before crng is ready Message-ID: <20180411094712.3wrptzcupkkdd6ym@pathway.suse.cz> References: <20180216210711.79901-1-andriy.shevchenko@linux.intel.com> <20180216210711.79901-7-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180216210711.79901-7-andriy.shevchenko@linux.intel.com> 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 Fri 2018-02-16 23:07:09, Andy Shevchenko wrote: > From: Shunyong Yang > > Before crng is ready, output of "%p" composes of "(ptrval)" and > left padding spaces for alignment as no random address can be > generated. This seems a little strange when default string width > is larger than strlen("(ptrval)"). > > For example, when irq domain names are built with "%p", the nodes > under /sys/kernel/debug/irq/domains like this on AArch64 system, > > [root@y irq]# ls domains/ > default irqchip@ (ptrval)-2 > irqchip@ (ptrval)-4 \_SB_.TCS0.QIC1 \_SB_.TCS0.QIC3 > irqchip@ (ptrval) irqchip@ (ptrval)-3 > \_SB_.TCS0.QIC0 \_SB_.TCS0.QIC2 > > The name "irqchip@ (ptrval)-2" is not so readable in console > output. > > This patch replaces space with readable "_" when output needs padding. > Following is the output after applying the patch, > > [root@y domains]# ls > default irqchip@(____ptrval____)-2 > irqchip@(____ptrval____)-4 \_SB_.TCS0.QIC1 \_SB_.TCS0.QIC3 > irqchip@(____ptrval____) irqchip@(____ptrval____)-3 \_SB_.TCS0.QIC0 > \_SB_.TCS0.QIC2 > > There is same problem in some subsystem's dmesg output. Moreover, > someone may call "%p" in a similar case. In addition, the timing of > crng initialization done may vary on different system. So, the change > is made in vsprintf.c. > > Cc: Joey Zheng > Suggested-by: Rasmus Villemoes > Signed-off-by: Shunyong Yang > Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek I have pushed it into printk.git, branch for-4.18-vsprintf-cleanup. Best Regards, Petr