Re: [PATCH 1/6] proc: use vmalloc for our kernel buffer

2020-09-01 Thread Christoph Hellwig
On Thu, Aug 13, 2020 at 05:04:06PM -0400, Josef Bacik wrote: > Since > > sysctl: pass kernel pointers to ->proc_handler > > we have been pre-allocating a buffer to copy the data from the proc > handlers into, and then copying that to userspace. The problem is this > just blind kmalloc()'s the

[PATCH 1/6] proc: use vmalloc for our kernel buffer

2020-08-13 Thread Josef Bacik
Since sysctl: pass kernel pointers to ->proc_handler we have been pre-allocating a buffer to copy the data from the proc handlers into, and then copying that to userspace. The problem is this just blind kmalloc()'s the buffer size passed in from the read, which in the case of our 'cat' binary