Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6100303yba; Tue, 14 May 2019 01:30:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBdZc9Cvb/SGO3orN+2qvx7Rhqu9dsieYEBfTUL2OkjCXttwjipF0teSLUgIqsRc/kE9pb X-Received: by 2002:a62:5487:: with SMTP id i129mr39347080pfb.68.1557822622869; Tue, 14 May 2019 01:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557822622; cv=none; d=google.com; s=arc-20160816; b=Ptl5qObzVnNPQoTrEzaeuujLNQdBv7CQaLF8rIT75Aw1fckDWrRO9bn+Nk2bxbj/S2 hnAMAO3Py1A4Lur725llWk9dWadzADJMz4P6jJ+7CjZeeisoZMbc7DGa2mOt5vtMT3mZ 8RH3f0O+tYmCJIdJAiNJkmw3GreFn4IbJEvzWX/ottc+WDTbgH7ISwLWwb00Uf1i/D5k uA2Rm9PfYzwUvC97p0hYUZ5OeD7M5DTnHKhheCk7ZmWZxIZpbbQmm2AxlsVdjmSm08tC Ee1gEYJNAVEbU/CLCIMbsGSzx6EJaHxbTmTK21HFUdwpcon7djvvmIeMf0FUmeBai/gk rX9A== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=F94xP5GLEW3wNORu0RB7mK3+NRe8FQNTv6gp5eFkdYs=; b=ROp/vUulc6NEsD4n7fLgPUZCweo+ouzr1xEDHpKVJ4aaSNcS4Ib/xyut8u5A5imPZa HEnbeNeHMxXvz0sXKC5SdyJGr5eXtGTSVJjdtMaC406HusU2frGfx3dpsIfUjI2aeufQ HNhaUsWMmu2nHkeBAT7vPEAg5IRnUqF2gBfUzadAEDl4v4jzqRMwnmyefQd72dNS/K2g 0pkO6CrD5v1Qt+OK672vGelaGwIERog6Sf8tWvENBWR1ATG0htCuKjToClX73RtFN7GA bUW9L9CIR2Znc85lF0/rXfyqj/DDKKC/BPqgCYzwLNHzUXmqtjfWZH9flF08DB3eWTAs N+xA== 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 r4si295062pgv.195.2019.05.14.01.30.08; Tue, 14 May 2019 01:30:22 -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 S1726968AbfENI22 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 14 May 2019 04:28:28 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:46406 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfENI20 (ORCPT ); Tue, 14 May 2019 04:28:26 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-28-QSu0seGsPgOZSvrndg-J7w-1; Tue, 14 May 2019 09:28:22 +0100 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b::d117) by AcuMS.aculab.com (fd9f:af1c:a25b::d117) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 14 May 2019 09:28:22 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Tue, 14 May 2019 09:28:22 +0100 From: David Laight To: 'Sergey Senozhatsky' , Petr Mladek CC: Andy Shevchenko , 'christophe leroy' , Steven Rostedt , "Linus Torvalds" , Rasmus Villemoes , "Tobin C . Harding" , Michal Hocko , Sergey Senozhatsky , "linux-kernel@vger.kernel.org" , "Michael Ellerman" , "linuxppc-dev@lists.ozlabs.org" , Russell Currey , "Stephen Rothwell" , Heiko Carstens , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , Martin Schwidefsky Subject: RE: [PATCH] vsprintf: Do not break early boot with probing addresses Thread-Topic: [PATCH] vsprintf: Do not break early boot with probing addresses Thread-Index: AQHVB1bC/iTC8Q7sI0elwkZY5/gFJaZowlxwgAEika2AAGmPsA== Date: Tue, 14 May 2019 08:28:21 +0000 Message-ID: <45348cf615fe40d383c1a25688d4a88f@AcuMS.aculab.com> References: <20190510081635.GA4533@jagdpanzerIV> <20190510084213.22149-1-pmladek@suse.com> <20190510122401.21a598f6@gandalf.local.home> <096d6c9c17b3484484d9d9d3f3aa3a7c@AcuMS.aculab.com> <20190513091320.GK9224@smile.fi.intel.com> <20190513124220.wty2qbnz4wo52h3x@pathway.suse.cz> <20190514020730.GA651@jagdpanzerIV> In-Reply-To: <20190514020730.GA651@jagdpanzerIV> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: QSu0seGsPgOZSvrndg-J7w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > And I like Steven's "(fault)" idea. > How about this: > > if ptr < PAGE_SIZE -> "(null)" > if IS_ERR_VALUE(ptr) -> "(fault)" > > -ss Or: if (ptr < PAGE_SIZE) return ptr ? "(null+)" : "(null)"; if IS_ERR_VALUE(ptr) return "(errno)" David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)