Some buffer management fixes for proc
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | proc: use vmalloc for our kernel bufferfs/ include/ mm/ | +31 | 1 reply | |
| 2/6 | tree-wide: rename vmemdup_user to kvmemdup_userarch/ drivers/ drivers/ +4 more | +13 | 1 reply | |
| 3/6 | proc: allocate count + 1 for our read bufferfs/ | +23 | 1 reply | |
| 4/6 | sysctl: make proc_put_long() use scnprintfkernel/ | +5 | 1 reply | |
| 5/6 | parport: rework procfs handlers to take advantage of the new bufferdrivers/ | +36 | 1 reply | |
| 6/6 | sunrpc: rework proc handlers to take advantage of the new buffernet/ net/ | +4 | 1 reply |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Christoph Hellwig |
|---|---|
| 1/6 | R-b |
| 2/6 | R-b |
| 3/6 | R-b |
| 4/6 | R-b |
| 5/6 | R-b |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] Some buffer management fixes for proc
This initialy started with
[PATCH 1/6] proc: use vmalloc for our kernel buffer
Which came about because we were getting page alloc failures when cat tried to do a read with a 64kib buffer, triggering an order 4 allocation. We need to switch to kvmalloc for this buffer to avoid these high order allocations. Then Christoph suggested renaming vmemdup_user to kvmemdup_user, so then we have this
[PATCH 2/6] tree-wide: rename vmemdup_user to kvmemdup_user
And then finally Viro noticed that if we allocate an extra byte for the NULL terminator then we can use scnprintf() in a few places, and thus the next set of patches
[PATCH 3/6] proc: allocate count + 1 for our read buffer [PATCH 4/6] sysctl: make proc_put_long() use scnprintf [PATCH 5/6] parport: rework procfs handlers to take advantage of the [PATCH 6/6] sunrpc: rework proc handlers to take advantage of the new
There's one case that I didn't convert, _proc_do_string, and that's because it's one of the few places that takes into account ppos, and so we'll skip forward in the string we're provided with from the caller. In this case it makes sense to just leave it the way it is. I'm pretty sure I caught all the other people who directly mess with the buffer, but there's around 800 ->proc_handler's, and my eyes started to glaze over after a while.
Josef