Received: by 10.213.65.68 with SMTP id h4csp1614665imn; Thu, 29 Mar 2018 07:55:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx48+VvWNFqVQg0cI7KCIxFLQrsW4n8V6LTN4D/pVfkS69jRkCSESLoTqwj70k3r1m1VXdVYl X-Received: by 10.99.136.194 with SMTP id l185mr5828036pgd.419.1522335316597; Thu, 29 Mar 2018 07:55:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522335316; cv=none; d=google.com; s=arc-20160816; b=qtnljxJ2Aawdw41XEQZWYTnGXpCWxB4K+995Ogf8BaiRksIAX0XL29d3tmxVo42Bhn fgzx9GH4roURoOc4DecekCZv89tb9f3kXUNhxa1OA1Vep8RdvPWGlmS/qyuQSmwUrE38 oMXqhnVFyW3roP+HCgCrDJGoO/ayaGQh5ozkRcTbKKPgnJbIYstT9XW+M8cyTxmY2zaC tc/SzJb4EGbOMJnry5eduxXEAsUXxao5zaPjb+os+pC3I4LTQzs0OdvjrlH1MLqUzN6C 4EX316jsufLKJRos5jUY6fMUbutFK55FH6IxjBHHmksHlFU2QNpVXTRNw96no1VBTAy+ M+Iw== 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=LGz+AGq1hon16Ho0Zzhrzk/M3+DxmLu/sjZxRRHKLG4=; b=ilhisiF7+KuU8+ISRhryIAkleF53+I0J07DjIarzDLq2m51JIjogU2f8bZH3VLUsUV ItoF67JlhAbVCQR/GROYX5HY94d95avj6Ig7J2mMaY5/ij8B7m218jrBtWmhrLnLcljC eCLpKm7yyvV39Wvb1ROe/KUNSHH/Rgi+LPzsCKBha2MXft0g6MjBSDYVm1ZkG09Mqsvp 1mQhvnTdKQl8vD2J+F69PFqja3NW09kTpz1S4v+N1EO0wCMzCshyk8T55cM0e1mA64aG miubNgkkcPGT4zatpvP6YGpOEsXsWnCWmbS/2rJ9PA7OZYeNd8Yn/0nmzPfDF2EdPVHo PYAg== 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 t6si4526667pfb.98.2018.03.29.07.55.01; Thu, 29 Mar 2018 07:55:16 -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 S1751932AbeC2OxR (ORCPT + 99 others); Thu, 29 Mar 2018 10:53:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:56994 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbeC2OxQ (ORCPT ); Thu, 29 Mar 2018 10:53:16 -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 97B1EAFE4; Thu, 29 Mar 2018 14:53:14 +0000 (UTC) Date: Thu, 29 Mar 2018 16:53:12 +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: <20180329145312.4uqygrjqy3fqyl26@pathway.suse.cz> References: <20180308141824.bfk2pr6wmjh4ytdi@pathway.suse.cz> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521224375.23017.41.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 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: > > > On Wed, 2018-03-14 at 15:09 +0100, Petr Mladek wrote: > > > > We already prevent crash when dereferencing some obviously broken > > > > pointers. But the handling is not consistent. Sometimes we print > > > > "(null)" > > > > only for pure NULL pointer, sometimes for pointers in the first > > > > page and > > > > > > > > > > sometimes also for pointers in the last page (error codes). > > > > > > 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. Also google gives rather confusing results when searching, for example for "(0x000E)". Best Regards, Petr