lkml.org 
[lkml]   [2018]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 04/11] vsprintf: Do not check address of well-known strings
From
Date
On Wed, 2018-04-25 at 13:12 +0200, Petr Mladek wrote:
> We are going to check the address using probe_kernel_address(). It
> will
> be more expensive and it does not make sense for well known address.
>
> This patch splits the string() function. The variant without the check
> is then used on locations that handle string constants or strings
> defined
> as local variables.
>
> This patch does not change the existing behavior.

> - buf = string(buf, end, ",",
> str_spec);

> + buf = valid_string(buf, end,
> ",",
> + str_spec);

> - return string(buf, end, "(invalid
> address)", spec);
> + return valid_string(buf, end,
> + "(invalid
> address)", spec);
>

I wouldn't give a crap about over 80 in above two cases.

--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2018-04-25 13:45    [W:0.162 / U:22.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site