Received: by 10.213.65.68 with SMTP id h4csp3426171imn; Tue, 3 Apr 2018 04:54:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/9NWGIs8n/E97fHSgh+8HgALCYC6onM2ApBf3QEWoxo8D+H85sOe5Sx/RL8XFcJDYLgSbL X-Received: by 10.98.57.143 with SMTP id u15mr10321157pfj.79.1522756467245; Tue, 03 Apr 2018 04:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522756467; cv=none; d=google.com; s=arc-20160816; b=zZI2xzVr/EVnxnJEk3q8A3GHxvKtLjhZ/1YrRbSoQrGIrmOMI8c1EJvXyIQ/rwCkdR qVOEjPVFfTcW2l+alHPiHNFxwYL1b7qM/ilqtKR9+/grY/vpVYx0YGCWoX8Wv1B1K5P+ 9CUvbaBb+tIQewmAfSViWbBDaghri0t1NWbKVnV4YdymXhqQgSmmbQw1Vh1WBwNYYIU0 qdGvJbIucLaPLfq9PCX7rQk5BqM7zRX7OL3w4UJgQNr7UPYNBZJZQ45Hn8G6gUMOSLfu LoHbmAC1hOKOnL3UkpGjj4o0hXGtMcAR+En8xnOq7HyHYL0cM1YA/Te/SUUF0DgCRw6e rY/g== 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=9zB90v+rW+zVen9PpJdFAlBe2GvDt975z344Y6y586Q=; b=w23LX3/VWvFJMZsKf9QtmNljFNXg9WwfWlaXN/Mdmelz+pFXIxC17p4ErYSCR0S8R1 +34hKJmA13e7uQxoGvxaBTAojOSRjKcf9MkqIyf+EuHUrEvFOuuHnXxCxDR93PppkHf+ DmsbwpC83kmhC9tVADdXcrSmnhXMHD1DHFa6ZvSD0fsCiIPFCcmbVpyS9TLBEGdN3ckb jlUx1cySyfqCAD24x4q54cWDu+dOY+22Z7JW3vQ24omPRv1xtQfef+oGhJS3UUY1vOG5 WcZp1k+lFDM4JFg47H9v5hEu0Y2cJtXStl6Q9Msgw6LDmoi2NN2jS1xs0G7Vwp4otRqX 1SKA== 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 y96-v6si387730plh.676.2018.04.03.04.54.13; Tue, 03 Apr 2018 04:54:27 -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 S932120AbeDCLwT (ORCPT + 99 others); Tue, 3 Apr 2018 07:52:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:59999 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932089AbeDCLwS (ORCPT ); Tue, 3 Apr 2018 07:52:18 -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 939C9AF05; Tue, 3 Apr 2018 11:52:16 +0000 (UTC) Date: Tue, 3 Apr 2018 13:52:16 +0200 From: Petr Mladek To: Sergey Senozhatsky Cc: Andy Shevchenko , Linus Torvalds , Rasmus Villemoes , "Tobin C . Harding" , Joe Perches , Linux Kernel Mailing List , Andrew Morton , Michal Hocko , Sergey Senozhatsky , Steven Rostedt Subject: Re: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid pointers Message-ID: <20180403115216.mgq3omvl4up24uic@pathway.suse.cz> References: <20180309150153.3sxbbpd6jdn2d5yy@pathway.suse.cz> <20180314140947.rs3b6i5gguzzu5wi@pathway.suse.cz> <1521119343.10722.665.camel@linux.intel.com> <20180315152607.xgzjmj5as6lg42dy@pathway.suse.cz> <1521224375.23017.41.camel@linux.intel.com> <20180329145312.4uqygrjqy3fqyl26@pathway.suse.cz> <1522678523.21176.178.camel@linux.intel.com> <20180403011237.GA7129@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180403011237.GA7129@jagdpanzerIV> 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 Tue 2018-04-03 10:12:37, Sergey Senozhatsky wrote: > On (04/02/18 17:15), Andy Shevchenko wrote: > > > > > > Hmm, I have never seen the error code in this form. > > > > We have limited space to print it and error numbers currently can be up > > to 0xfff (4095). So, I have no better idea how to squeeze them while > > thinking that "(efault)" is much harder to parse in case of error > > 'efault' looks to me like a misspelled 'default', for some reason. I wonder if (-efault) would help a bit. Even better might be (-EFAULT). But then it would be better to use (NULL). It already was but it was explicitly changed to the lowercase variant by the commit 0f4f81dce93774a447da3c ("vsprintf: factorize "(null)" string"). Best Regards, Petr