Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6733765yba; Tue, 14 May 2019 12:38:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeLRHGNE/wTZocRZkZ4hmECZ9P1SZ74+JwtANDVkRe+IFIZT3dXszL/b/qvmEmg/ep9c7k X-Received: by 2002:a62:7d8e:: with SMTP id y136mr20575351pfc.224.1557862718275; Tue, 14 May 2019 12:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557862718; cv=none; d=google.com; s=arc-20160816; b=oyVKP5xQNBDu07Pfh/Qfz7Bb/S09BVlEAfogtIa2ueMQQ7qNmhhKU+/ORg9M1ddZJk my62FPqQWIvM5BDhHx0l+ggTRsSB77/ZpckgB4bRDabGq5bMuMz4MZbZZwDQLm+wwr5S WSewIkz2nq8eeAAF6EGmCkt9Nf/KDk2t6EJhydpKa0BKpYgwtXgaO3DQPZz06rAyU3DY VyhJBYEevJTb5AnJaPxB7N4ZFyU27Pr6PUmDL0WUliZgLh/ZzbZn/hG0aP4Grzcixlg/ IkDgMK/doWXS1fR3ffZJZDIhZ49COvXsLkHXnGGOlfc347zvpM38LjuoUa9Li4dQNpz6 Oj4A== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=I8lmS3nJQZKP9E/gO5K/ZweL6OM1/KqF3dgNVlPRdV0=; b=HDN5qiYig9GLdzw+KlD9xeQ2TLASY6Zc9NXVhckdsE89wL2JNGznu5oD7GMs6/qiVR rAXvuz/DBlaQNXlBQ2zXbugiMH8i45VawgAUUAgKZk6pBj9rtNzsxdrOasj5Rt7amoF8 qqBY0Bd1bxt4XfYode/fSoznT8xcro1w5Rpcvaa1VwGCXsAj7h0g/0fkpUuHtXZE8FSg p9cGN2rNECDSUeq8GJRbMlbU+/bMTlxX6ymd6A9ZtAFPjdh/0hXYCBF12ssfz7Y0WyJW JF3Z8JlLSxBOJieMPLCqn6NZaqNFqaBgsU2OHw7wKehdAySOiYTQ3OcToAlcZfk0JdJf B5lQ== 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 v61si2160134plb.20.2019.05.14.12.38.22; Tue, 14 May 2019 12:38:38 -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 S1726452AbfENTfG (ORCPT + 99 others); Tue, 14 May 2019 15:35:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:44000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbfENTfG (ORCPT ); Tue, 14 May 2019 15:35:06 -0400 Received: from oasis.local.home (50-204-120-225-static.hfc.comcastbusiness.net [50.204.120.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA36E2086A; Tue, 14 May 2019 19:35:04 +0000 (UTC) Date: Tue, 14 May 2019 15:35:03 -0400 From: Steven Rostedt To: Geert Uytterhoeven Cc: David Laight , Sergey Senozhatsky , Petr Mladek , Andy Shevchenko , christophe leroy , Linus Torvalds , Rasmus Villemoes , "Tobin C . Harding" , Michal Hocko , Sergey Senozhatsky , "linux-kernel@vger.kernel.org" , Michael Ellerman , "linuxppc-dev@lists.ozlabs.org" , Russell Currey , Stephen Rothwell , Heiko Carstens , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , Martin Schwidefsky Subject: Re: [PATCH] vsprintf: Do not break early boot with probing addresses Message-ID: <20190514153503.6b7faaa7@oasis.local.home> In-Reply-To: References: <20190510081635.GA4533@jagdpanzerIV> <20190510084213.22149-1-pmladek@suse.com> <20190510122401.21a598f6@gandalf.local.home> <096d6c9c17b3484484d9d9d3f3aa3a7c@AcuMS.aculab.com> <20190513091320.GK9224@smile.fi.intel.com> <20190513124220.wty2qbnz4wo52h3x@pathway.suse.cz> <20190514020730.GA651@jagdpanzerIV> <45348cf615fe40d383c1a25688d4a88f@AcuMS.aculab.com> <20190514143751.48e81e05@oasis.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 May 2019 21:13:06 +0200 Geert Uytterhoeven wrote: > > > Do we care about the value? "(-E%u)"? > > > > That too could be confusing. What would (-E22) be considered by a user > > doing an sprintf() on some string. I know that would confuse me, or I > > would think that it was what the %pX displayed, and wonder why it > > displayed it that way. Whereas "(fault)" is quite obvious for any %p > > use case. > > I would immediately understand there's a missing IS_ERR() check in a > function that can return -EINVAL, without having to add a new printk() > to find out what kind of bogus value has been received, and without > having to reboot, and trying to reproduce... Hi Geert, I have to ask. Has there actually been a case that you used a %pX and it faulted, and you had to go back to find what the value of the failure was? IMO, sprintf() should not be a tool to do this, because then people will not add their IS_ERR() and just let sprintf() do the job for them. I don't think that would be wise to allow. -- Steve