Received: by 10.213.65.68 with SMTP id h4csp23901imn; Thu, 15 Mar 2018 08:27:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELsbkusEff/wwqhFLGEYda1JTafDUMe+JBt/tc9VOw7yEZgZdeFBZmCYZ98AcTg8tm3xAtco X-Received: by 10.98.7.68 with SMTP id b65mr7999190pfd.39.1521127678519; Thu, 15 Mar 2018 08:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521127678; cv=none; d=google.com; s=arc-20160816; b=Dbic7SSZgC7we/p2MH4xeozz9j7nqoSuEyAgSUEYEYn9PtS8vNOjh+eSOc+WuOvXtj s6mtadao9b5SFOfqFLg1PQx0ijQBIj+fBn3rCrR2kIXrmeGBnwsO2WeJKVJZbITTQ7Zl 5Re2hVsKs5ymXLLNYqiNCZPmQSn0xmZqqLXDy2GMOFOAzOY+XKofNQFGmb9o0x8SlGQR ELHcUMfarIp9y7+1yygYgBZU+0CLp4BIMkLJ+uBEWmMS89pvE6dv7nUqvjtf9G/0o6nq +r080P5WyAcioJPirUhhdKs/CUV32SGGNCIYUPoGXceLIVoIA8akRIiH1RCBlwzT7Ke4 /HSg== 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=vt9pS60BFsKZbNJeH2qhOxxWZFcwZLL9ryMlVJd8bPg=; b=RWAbnVt/b3aYbURA6jtmQjBLHzUpK7AJ4TWDOuGXrN5SqCShealDA7UP/BMFxAN9Mz p1HLBl9UnEtqH+D0wYbdpauR09wHecPGTSwmg8uCTQfmqk6fH4PhSuGW5ORa2a2iK1n/ UczNzWFtbI8qvQ8U/CWgbWX1cXoZ2BS0SweihwyFlopqwU+1dJvGw7FviL0A8pwDGAb6 +VSOoqZ5VxJrFhAnadR4IhaXVAduYIjM0eRj4tso5LYW/jQK4Ks6Sx651dJpZPuQjCap W32t4TH0YXOGq7wO+dtAsBHpJ9GItMAuWQAhjP/ftV59hVCToNxEVFI10FaCZUvgFjaj ruew== 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 r5-v6si4183779plo.664.2018.03.15.08.27.43; Thu, 15 Mar 2018 08:27:58 -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 S932549AbeCOP0L (ORCPT + 99 others); Thu, 15 Mar 2018 11:26:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:54252 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752216AbeCOP0K (ORCPT ); Thu, 15 Mar 2018 11:26:10 -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 F0BF0AE09; Thu, 15 Mar 2018 15:26:08 +0000 (UTC) Date: Thu, 15 Mar 2018 16:26:07 +0100 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: <20180315152607.xgzjmj5as6lg42dy@pathway.suse.cz> References: <1520330185.10722.401.camel@linux.intel.com> <20180307155244.b45c3fb5vcxb4q2l@pathway.suse.cz> <20180308141824.bfk2pr6wmjh4ytdi@pathway.suse.cz> <20180309150153.3sxbbpd6jdn2d5yy@pathway.suse.cz> <20180314140947.rs3b6i5gguzzu5wi@pathway.suse.cz> <1521119343.10722.665.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521119343.10722.665.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 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. I am not super excited about (efault). But it seems to be less cryptic and the style is more similar to (null). Best Regards, Petr