lkml.org 
[lkml]   [2020]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next] mm: Use sysfs_emit functions not sprintf
On Tue, Oct 06, 2020 at 09:28:17AM -0700, Joe Perches wrote:
> Convert the various uses of sprintf/snprintf/scnprintf to
> format sysfs output to sysfs_emit and sysfs_emit_at to make
> clear the output is sysfs related and to avoid any possible
> buffer overrun of the PAGE_SIZE buffer.
>
> Done with cocci scripts and some typing.

Can you include the cocci script in the commit log? It might be nicer to
split the "manual" changes from the cocci changes, as that makes review
much easier too.

Regardless, yes, I'm a fan of switching these all around to
sysfs_emit*(). :)

Thanks!

--
Kees Cook

\
 
 \ /
  Last update: 2020-10-07 09:16    [W:0.291 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site