Received: by 10.213.65.68 with SMTP id h4csp3420446imn; Tue, 3 Apr 2018 04:47:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx49J7YWlpI8LS+8s2e7DjxE61+La3Zsz1ARqjndEdYpM37/bB6utmfsDdT20JOyDgo3Y9iFA X-Received: by 10.101.90.203 with SMTP id d11mr8777597pgt.20.1522756051928; Tue, 03 Apr 2018 04:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522756051; cv=none; d=google.com; s=arc-20160816; b=rHcD2FIl3z3Zy1b4G2bdf9LJObIV1Mv7vet9uXBMKvJkpU7XsnbjZ9MNTxzo3CGFH4 kvUEbNK7D63kMdaJW1te3zqjH0FUfSewTuQaywwKdBoErEcHq9zH5ZguTfs2v+d+CFQm glUDACjwZ98wR4Vw4/iMKAMOleK09PRG2bPn2YyBwB8dYkF68DGmwuBU32Hr2Aw/BTj7 C9/heNtYobTifOqiBfBcgJgaqDYzkUGxeTDAgwrgKu4Dk6cg1Ed2lQse/zNeR7k0TwKq TQjN2VVRi9SJxB29aFYyqC0IN3ZVUmyniL8q/lUi07BuGdt3p0WEXmjcGp7WfnFz157F k4fg== 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=S12oGsUj9DTAqTPLK1M5J1v8Q0Yigd933oqDrBUSy18=; b=c7xLBjGfGgGsMIqyCV2KN0o/Lah0GUhhQZ62mNcqKqfIPEUgz6BqIHaP+P1mmtQU0h 4BdBd2JndIZg+Az+PGQSHxG6gUsb0L9z6eXXxv5BbmC7kbZsGp5UwJq3PU+kiL3lTvft epYeEYlNiqFjYtqqIld07n167pq94OIGY2nH40feTSCLu8UPwuwsibEuov+MvaUtqJfg Nut3xbRKQtV1JWh0Aa7Wrosgc2ZiOOQyM22xgOw/czUA31D0FS0HcBqSVbAv4lkBrX1l 469aGVeuujbgJwzPzi3PpMuYldTzyy11I09QwKFIpR39PTXEeUmdJYeFHvA1JpzYFbv+ OB0A== 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 a86si2050652pfc.207.2018.04.03.04.47.17; Tue, 03 Apr 2018 04:47:31 -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 S1755437AbeDCLqD (ORCPT + 99 others); Tue, 3 Apr 2018 07:46:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:58927 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755335AbeDCLqC (ORCPT ); Tue, 3 Apr 2018 07:46:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 665B8AEFA; Tue, 3 Apr 2018 11:46:01 +0000 (UTC) Date: Tue, 3 Apr 2018 13:46:00 +0200 From: Petr Mladek To: Andy Shevchenko Cc: Linus Torvalds , Rasmus Villemoes , "Tobin C . Harding" , Joe Perches , Linux Kernel Mailing List , Andrew Morton , Michal Hocko , Sergey Senozhatsky , Steven Rostedt , Sergey Senozhatsky Subject: Re: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid pointers Message-ID: <20180403114600.uc7sqeoqt7fmdd66@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522678523.21176.178.camel@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 Mon 2018-04-02 17:15:23, Andy Shevchenko wrote: > On Thu, 2018-03-29 at 16:53 +0200, Petr Mladek wrote: > > On Fri 2018-03-16 20:19:35, Andy Shevchenko wrote: > > > On Thu, 2018-03-15 at 16:26 +0100, Petr Mladek wrote: > > > > On Thu 2018-03-15 15:09:03, Andy Shevchenko wrote: > > > > > > I still think that printing a hex value of the error code is > > > > > much > > > > > better > > > > > than some odd "(efault)". > > > > > > > > Do you mean (err:0e)? Google gives rather confusing answers for > > > > this. > > > > > > More like "(0xHHHH)" (we have already more than 512 error code > > > numbers. > > > > 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 > pointer. But this will not be used instead of address value. It is used in situations where we print the information that is stored at the address, for example, string, IP address, dentry name. > > Also google gives > > rather confusing results when searching, for example for "(0x000E)". > > It's not primarily for google, though yeah, people would google for > error messages... > > Another question is what the format: decimal versus hex for errors. > Maybe just "(-DDDDD)"? This still looks confusing and google does not help. Best Regards, Petr