Skip to content

exec: cleanup search_binary_handler()

Oleg Nesterov lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 0 repliesNew
  2. v13 patches 8 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8exec: introduce exec_binprm() for "depth == 0" codefs/exec.c+22 -140 replies
2/8exec: kill "int depth" in search_binary_handler()fs/exec.c include/linux/binfmts.h+5 -60 replies
3/8exec: proc_exec_connector() should be called only oncefs/exec.c+1 -10 replies
4/8exec: move allow_write_access/fput to exec_binprm()fs/exec.c+6 -40 replies
5/8exec: kill ->load_binary != NULL check in search_binary_handler()fs/exec.c+3 -40 replies
6/8exec: cleanup the CONFIG_MODULES logicfs/exec.c+31 -370 replies
7/8exec: don't retry if request_module() failsfs/exec.c+2 -10 replies
8/8exec: cleanup the error handling in search_binary_handler()fs/exec.c+3 -80 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchKees Cook
1/8A-b
2/8A-b
3/8A-b
4/8A-b
5/8A-b
6/8A-b
7/8A-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/8] exec: cleanup search_binary_handler()

To remind, by discussion with Zach

fs-binfmts-add-a-name-field-to-the-binfmt-struct.patch fs-binfmts-better-handling-of-binfmt-loops.patch fs-binfmts-whitespace-fixes-with-scripts-cleanfile.patch

should be dropped. Zach is working on the new version on top of these changes.

Changes:

2/8: add the comment about recursion_depth

4/8: nullify bprm->file to catch the potential use after free

Add the acks from Kees (thanks!)

Oleg.

 fs/exec.c               |  120 +++++++++++++++++++++++------------------------
 include/linux/binfmts.h |    2 +-
 2 files changed, 60 insertions(+), 62 deletions(-)