lkml.org 
[lkml]   [2017]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch: Add ability to find bad uses of vsprintf %p<foo> extensions
From
Date
On Tue, 2017-02-28 at 16:06 -0800, Andrew Morton wrote:
> On Mon, 27 Feb 2017 12:54:55 -0800 Joe Perches <joe@perches.com> wrote:
>
> > %pK was at least once misused at %pk in an out-of-tree module.
> > This lead to some security concerns. Add the ability to track
> > single and multiple line statements for misuses of %p<foo>.
>
> Should we also do this?
>
> --- a/lib/vsprintf.c~checkpatch-add-ability-to-find-bad-uses-of-vsprintf-%pfoo-extensions-fix
> +++ a/lib/vsprintf.c
> @@ -1477,6 +1477,9 @@ int kptr_restrict __read_mostly;
> * by an extra set of alphanumeric characters that are extended format
> * specifiers.
> *
> + * Please update scripts/checkpatch.pl when adding new conversion characters.
> + * (search for "check for vsprintf extension").
> + *

Seems sensible, thanks.

\
 
 \ /
  Last update: 2017-03-01 01:14    [W:0.174 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site