From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] vsprintf: Do not break early boot with probing addresses References: <20190510081635.GA4533@jagdpanzerIV> <20190510084213.22149-1-pmladek@suse.com> <20190510122401.21a598f6@gandalf.local.home> From: christophe leroy Message-ID: Date: Fri, 10 May 2019 19:35:29 +0200 MIME-Version: 1.0 In-Reply-To: <20190510122401.21a598f6@gandalf.local.home> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-arch-owner@vger.kernel.org Message-ID: <20190510173529.XATeuZJ4qvPsIGIrHM2kfdN6CdMiyb6gddK2hUaBa-I@z> List-Archive: List-Post: To: Steven Rostedt , Petr Mladek Cc: Linus Torvalds , Andy Shevchenko , 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 , Stephen Rothwell , Heiko Carstens , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Martin Schwidefsky List-ID: Le 10/05/2019 à 18:24, Steven Rostedt a écrit : > 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 ? I guess not. Usually, < PAGE_SIZE means NULL pointer dereference (via the member of a struct) Christophe --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus