Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2333149yba; Fri, 10 May 2019 09:44:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4+wOOxICFimyPyBcIFh1coY/Nu0BjL2ZFuBnrP/5J+Z7KURi/J7T6HdB9P05eFzHZwuej X-Received: by 2002:a63:931c:: with SMTP id b28mr15245159pge.182.1557506681169; Fri, 10 May 2019 09:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557506681; cv=none; d=google.com; s=arc-20160816; b=iYeOgWl9pnso/wzwhpYHQ1DoeC5hwru2eBJCKWo4gy3d44c1vcEMgjccxYiMZ1kx2b tWF/wfpdTCHHDumjVnLh7JDA1zOIm5r4NHKzns8u0Urr4vvbQAmDaIGGAckHykm5E9Cw 4ZFuEmR34gNZ8TkpC+lIBbYBit9Wg2QDe26oUXYysasjp4WAMmqamVPTimo6SKWODp07 KIVx+Gy5Z8FjNCthzZf2f8qfKGtDT1ofAazP9K6mqq49z2AKpg3M6bZaqAXrliadFUHc 1Y9tTfXI7j8qfKwqDMdXlOISYdnfBahgNQTn8J8ZnGLtMB9aRG/nLdbd50Cro4q5vp5Y qUPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/1DKDG7o+FBnKy0K+p5z9xMNh66oGFU45iV/mMCnxp8=; b=0Gt8RGk2Vhh3pbowYViRpt8ZuhDn8LUIREhtqApYiQCM0wXakZm7B2RqYmckBSke8V yZ81Gw5wb2181frRieeJBwRVTY8aeLd7EGdp7zYtktSHkeHjxEYFzGzKPKJwjLJoLggU reMUzLiM9V3/g4cp741gPYZJWwGJa3+ruCZCkriCgLX4zNXgfhpZgyX+EwnMhWIGYSpU xs7MJblW9OX0Pqb5T55BenkWH1niPjv0TYNvxnE1uj6D7tFjQYIv2AN0KFUeMRKs+e2z Rd5O4eqEKbf3OmNSAy1rcZOggTEkmS/vSHQ1ii2DO0/XN7p3lLCrNA0OM+u2AUp5u6qv S0NA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si7999828pgj.413.2019.05.10.09.44.24; Fri, 10 May 2019 09:44:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727868AbfEJQll (ORCPT + 99 others); Fri, 10 May 2019 12:41:41 -0400 Received: from mga12.intel.com ([192.55.52.136]:13840 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727496AbfEJQlk (ORCPT ); Fri, 10 May 2019 12:41:40 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2019 09:41:40 -0700 X-ExtLoop1: 1 Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga004.fm.intel.com with ESMTP; 10 May 2019 09:41:35 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1hP8aU-0005ve-6P; Fri, 10 May 2019 19:41:34 +0300 Date: Fri, 10 May 2019 19:41:34 +0300 From: Andy Shevchenko To: Steven Rostedt Cc: Petr Mladek , Linus Torvalds , Rasmus Villemoes , "Tobin C . Harding" , Michal Hocko , Sergey Senozhatsky , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Russell Currey , Christophe Leroy , 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 Message-ID: <20190510164134.GH9224@smile.fi.intel.com> References: <20190510081635.GA4533@jagdpanzerIV> <20190510084213.22149-1-pmladek@suse.com> <20190510122401.21a598f6@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190510122401.21a598f6@gandalf.local.home> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 10, 2019 at 12:24:01PM -0400, Steven Rostedt wrote: > On Fri, 10 May 2019 10:42:13 +0200 > Petr Mladek wrote: > > > static const char *check_pointer_msg(const void *ptr) > > { > > - char byte; > > - > > if (!ptr) > > return "(null)"; > > > > - if (probe_kernel_address(ptr, byte)) > > + if ((unsigned long)ptr < PAGE_SIZE || IS_ERR_VALUE(ptr)) > > return "(efault)"; > > > > > < PAGE_SIZE ? > > do you mean: < TASK_SIZE ? Original code used PAGE_SIZE. If it needs to be changed, that it might be a separate explanation / patch. -- With Best Regards, Andy Shevchenko