[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190510164134.GH9224@smile.fi.intel.com>
Date: Fri, 10 May 2019 19:41:34 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Petr Mladek <pmladek@...e.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
"Tobin C . Harding" <me@...in.cc>, Michal Hocko <mhocko@...e.cz>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
linux-kernel@...r.kernel.org,
Michael Ellerman <mpe@...erman.id.au>,
linuxppc-dev@...ts.ozlabs.org, Russell Currey <ruscur@...sell.cc>,
Christophe Leroy <christophe.leroy@....fr>,
Stephen Rothwell <sfr@...abs.org>,
Heiko Carstens <heiko.carstens@...ibm.com>,
linux-arch@...r.kernel.org, linux-s390@...r.kernel.org,
Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: [PATCH] vsprintf: Do not break early boot with probing addresses
On Fri, May 10, 2019 at 12:24:01PM -0400, Steven Rostedt wrote:
> On Fri, 10 May 2019 10:42:13 +0200
> Petr Mladek <pmladek@...e.com> 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
Powered by blists - more mailing lists