coredump: format_corename() fixes/cleanups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | coredump: format_corename() can leak cn->corenamefs/ | +7 | 0 replies | |
| 2/6 | coredump: introduce cn_vprintf()fs/ | +13 | 0 replies | |
| 3/6 | coredump: cn_vprintf() has no reason to call vsnprintf() twicefs/ | +12 | 0 replies | |
| 4/6 | coredump: kill cn_escape(), introduce cn_esc_printf()fs/ | +21 | 1 reply | |
| 5/6 | coredump: kill call_count, add core_name_sizefs/ | +10 | 2 replies | |
| 6/6 | coredump: '% at the end' shouldn't bypass core_uses_pid logicfs/ | +6 | 0 replies |
Reviews trailers per patch
None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Neil Horman | Lucas De Marchi |
|---|---|---|
| Series | A-b | A-b |
| 1/6 | ||
| 2/6 | ||
| 3/6 | ||
| 4/6 | ||
| 5/6 | ||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] coredump: format_corename() fixes/cleanups
Hello.
Quoted 9 lines · Oleg Nesterov
With the patch below we can trivially fix the problem,
+ char *fmt = ispipe ? "\e%s\e" : "%s";
...
- err =cn_printf(cn, "%s", current->comm);
+ err =cn_printf(cn, fmt, current->comm);Or this ESC hack is too ugly or can break something?
OK, nobody really nacked "[PATCH] teach argv_split() to ignore the spaces surrounded by \e", see http://marc.info/?l=linux-kernel&m=136845597401674
I am going to send this patch "officially" and fix format_corename/argv_split interaction.
But lets fix other format_corename() bugs first: leak and use-after-free. Plus some cleanups.
Oleg.
fs/coredump.c | 120 +++++++++++++++++++++++++++----------------------------- 1 files changed, 58 insertions(+), 62 deletions(-)