From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932553AbeCOP0L (ORCPT ); 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 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 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