Re: [PATCH -next] mm: Use sysfs_emit functions not sprintf

2020-10-07 Thread Jason Gunthorpe
On Wed, Oct 07, 2020 at 11:04:42AM -0700, Joe Perches wrote: > On Wed, 2020-10-07 at 09:53 -0300, Jason Gunthorpe wrote: > > On Wed, Oct 07, 2020 at 12:16:01AM -0700, Kees Cook wrote: > > > On Tue, Oct 06, 2020 at 09:28:17AM -0700, Joe Perches wrote: > > > > Convert the various uses of sprintf/snpr

Re: [PATCH -next] mm: Use sysfs_emit functions not sprintf

2020-10-07 Thread Joe Perches
On Wed, 2020-10-07 at 09:53 -0300, Jason Gunthorpe wrote: > On Wed, Oct 07, 2020 at 12:16:01AM -0700, Kees Cook wrote: > > 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_e

Re: [PATCH -next] mm: Use sysfs_emit functions not sprintf

2020-10-07 Thread Jason Gunthorpe
On Wed, Oct 07, 2020 at 12:16:01AM -0700, Kees Cook wrote: > 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

Re: [PATCH -next] mm: Use sysfs_emit functions not sprintf

2020-10-07 Thread Kees Cook
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 wi

[PATCH -next] mm: Use sysfs_emit functions not sprintf

2020-10-06 Thread Joe Perches
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. Miscellanea: o dmapool: Renamed show_