Received: by 10.213.65.68 with SMTP id h4csp1658793imn; Thu, 15 Mar 2018 06:10:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELuMNDNfY0nM7UoHzlLmzjmYq3w2ycnPT9SOWZ0rSkrCxs2j17XtNdltHj4pglq7jAGqnw7o X-Received: by 2002:a17:902:167:: with SMTP id 94-v6mr8129364plb.294.1521119413007; Thu, 15 Mar 2018 06:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521119412; cv=none; d=google.com; s=arc-20160816; b=v9q2zdWxmh/MY0DQwxdTHp/ox7L0HNY3wBzHAIVQXVXNz446ZC4v19oo5v4RRX+OnL HLJ7YXw7KRy9yWNw+guvIKH0U/XN/eXa2aP/wpRGdQuOz3ILAmOUgfMW4ocZ6hxfR/pT lsdvhV1DDZz7g5m4BL7HTsaYWs+RBK+HLB2+BxOlSAKZW9KdIvUuNMBs5flg/24Iqb9W UiNRpOBYn3CxYvr8gdXi9RnsaAY0CqcXQugMwVk7EjOM89Ox/Htto78nwumWYC0U4ZMQ NIpcSD9KMCTtjI2HmFy9qJJ5iLRu86/I9Gls9NR0/SoFfBd9qjZu7uMUYHPBWu+zXHx+ 7eNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=T8zVlVKELpmxZyBCmHVdpkwKBhNHYYUHoquYXO6pBnw=; b=OvXe6SqnJcQ88sKz6nP9eThXgHF0OJOpcK7UT7Xq6dgDqdhpnLUzYdSjulDz6bLBoK qkhB0m1Dga9fMEAuSUf1cp4Cjb9bRh/HSxKXWxozVHpShhGuf+Trn52hS6KkIIFFA1gE qqy3s0gxfHNGfd8Jt1k7e8Ue4fDDnKdZG6Q1XOYyO1RF+SmCzqctA4IlJTQ9J/sSveiQ nmgQqpAnAoNyWTE8KSWW0nIH3KWjk7+PJjoOfbI6tUaNp0YnjO98M1KAXcFRX1waWKX2 ucOBIaKmKAez1KJuDPDFMzriqo0hwbUNcyuIphLay9VxfUYoEoJlOkkltRg2cxIB6UWe T1Cg== 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 q87si3783345pfa.385.2018.03.15.06.09.57; Thu, 15 Mar 2018 06:10:12 -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 S1752045AbeCONJH (ORCPT + 99 others); Thu, 15 Mar 2018 09:09:07 -0400 Received: from mga14.intel.com ([192.55.52.115]:23950 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549AbeCONJG (ORCPT ); Thu, 15 Mar 2018 09:09:06 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2018 06:09:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,310,1517904000"; d="scan'208";a="24296830" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga007.fm.intel.com with ESMTP; 15 Mar 2018 06:09:03 -0700 Message-ID: <1521119343.10722.665.camel@linux.intel.com> Subject: Re: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid pointers From: Andy Shevchenko To: Petr Mladek , Linus Torvalds Cc: Rasmus Villemoes , "Tobin C . Harding" , Joe Perches , Linux Kernel Mailing List , Andrew Morton , Michal Hocko , Sergey Senozhatsky , Steven Rostedt , Sergey Senozhatsky Date: Thu, 15 Mar 2018 15:09:03 +0200 In-Reply-To: <20180314140947.rs3b6i5gguzzu5wi@pathway.suse.cz> References: <20180306092513.ibodfsnv4xrxdlub@pathway.suse.cz> <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> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.5-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)". -- Andy Shevchenko Intel Finland Oy