Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp259689yba; Wed, 15 May 2019 00:25:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjqoPnqmW/ThMoEAJlBz4aRE6EOIDdvyNdouASXSYkVK/zqgTqVep0DSz1BoDmVgHxl+O7 X-Received: by 2002:a63:de53:: with SMTP id y19mr39208320pgi.166.1557905149303; Wed, 15 May 2019 00:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557905149; cv=none; d=google.com; s=arc-20160816; b=ax4iy+Rj7hlqGwDvAg2+2Nprukdz5SULxVtEmja9JxPYvsm9jNga19FDc+8G3Fh8Bn oU4JRKX0NibanwD7LyjPycDwzQFnJN4s3OTjZHwAKjNhldZD+r9kn6HGMqYmWytb3fBw 7etemBnIF9yDRBvpnMC822fgIpQ31nXSxedi1Ms7ImkZR3kx95CIiMl7h/OpaUqhK4Qj K8jxgH65odiEAAMwpF2nF+Wh5Xc2hA7pG4wGjKIrEjuaVW3LWow6v2xOKw+zfT5BAR+u UYGmzyn7vvMfoAJt64WoX/MtkpkbplU1oxPDW4NUcJhNog5xONeZ/M28S2WGCIVbovb5 9uiw== 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 :in-reply-to:references:mime-version; bh=D6y3Txro2Y80xJMXPF/WXXyGFbfglpcuRYylKAaykOs=; b=YnEklSUUmsgl65leQpkEABOapU9M7foXDYebCg14Ml8vIQs2extc6bfVAHgw6MU26z BLhPAzEaQ6sUF1FmF1EsBBgGaJgayU0nBgSD2FZIMp49yUS+nCYddruKR5p3+tMp3vvv 9cvMVvQsw7e6+dc02VlxtrOerVpvnNj2irlL4zi/HZFFraT4/vj3aiqNJdZBA2KAJD+c 8q34zVJYooqE7JUouLi/Rc+Ha3q0is2aLPN5egi0eoEqfa38CFGFSCJV06izU6CKDBXE 4QmbNXtaDglMkcyYUujfcoq9OMHgsAV/P21JGng1zAcEdU1esS1ft9RDbWrL0c+rgkNB fy2w== 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 w19si979803plq.55.2019.05.15.00.25.33; Wed, 15 May 2019 00:25:49 -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 S1726159AbfEOHXT (ORCPT + 99 others); Wed, 15 May 2019 03:23:19 -0400 Received: from mail-ua1-f68.google.com ([209.85.222.68]:36417 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbfEOHXS (ORCPT ); Wed, 15 May 2019 03:23:18 -0400 Received: by mail-ua1-f68.google.com with SMTP id 94so87935uam.3; Wed, 15 May 2019 00:23:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D6y3Txro2Y80xJMXPF/WXXyGFbfglpcuRYylKAaykOs=; b=G4d5TbL2zXDn5f9I+chOsiGhFl10gM57db35uOamciP3gknJPcKVAPQ91SGx5xumQ9 tvb51SUNSptNd5quVQ29U/dlzr49oSMN2kg61B+NDMqNh118Anjl577d7R4f9IV2G5Rm WWalbCsPJzu6IixyqHD8SxelZOfrxdanwBT9E1K8rJrZfzMPQXiw+QlDQLFFV5HzWztC FinsSG8D1crlV7wGLP63W3JJgBtGI+uAIwWbrYHxSxGKqbBfMRfkIW5OpXpXeEDoekkb YUbKyC3AYzdUDWVwXRtGr2bimNvLIrpD0Y9/bb6Asejx5QcuZ0cDYynoosigb4ODS4nT DJHA== X-Gm-Message-State: APjAAAWZsGZ6LjNx1HBrEMY9eAuDJxvGx3efvWJrJaCXgkWAskar6KMB fK+OLxwNDPKg36z491yliv+KRlWAlzinHoI0xyhl+w== X-Received: by 2002:ab0:6419:: with SMTP id x25mr19591138uao.86.1557904997683; Wed, 15 May 2019 00:23:17 -0700 (PDT) MIME-Version: 1.0 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> <20190514153503.6b7faaa7@oasis.local.home> In-Reply-To: <20190514153503.6b7faaa7@oasis.local.home> From: Geert Uytterhoeven Date: Wed, 15 May 2019 09:23:05 +0200 Message-ID: Subject: Re: [PATCH] vsprintf: Do not break early boot with probing addresses To: Steven Rostedt 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 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 Steve, On Tue, May 14, 2019 at 9:35 PM Steven Rostedt wrote: > 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... > > 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? If it faulted, the bad pointer value is obvious from the backtrace. If the code avoids the fault by verifying the pointer and returning "(efault)" instead, the bad pointer value is lost. Or am I missing something? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds