exec: Remove the computation of bprm->cred
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | exec: Add a per bprm->file version of per_clearfs/ include/ include/ +1 more | +12 | 3 replies | |
| 2/2 | exec: Compute file based creds only oncefs/ fs/ include/ +5 more | +61 | 3 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Kees Cook |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] exec: Remove the computation of bprm->cred
My last chunk of cleanups was clearly too a bit too big, with too many issues going on so let's try this again with just the most important cleanup.
Recomputing the uids, gids, capabilities, and related flags each time a new bprm->file is set is error prone, and as it turns out unnecessary.
Building upon my previous exec clean up work this set of changes splits per_clear temporarily into two separate flags which is the last step in causing the code to recompute everything each time a new bprm->file is considered. Then the code is refactored to run the credential from file calculation later so that recomputation is not necessary.
Doing this in two steps should allow anyone who has problems later to bisect and tell if it was the semantic change or the refactoring that caused them problems.
Eric W. Biederman (2):
exec: Add a per bprm->file version of per_clear
exec: Compute file based creds only once
fs/binfmt_misc.c | 2 +- fs/exec.c | 57 ++++++++++++++++++------------------------- include/linux/binfmts.h | 9 ++----- include/linux/lsm_hook_defs.h | 2 +- include/linux/lsm_hooks.h | 22 +++++++++-------- include/linux/security.h | 9 ++++--- security/commoncap.c | 22 +++++++++-------- security/security.c | 4 +-- 8 files changed, 59 insertions(+), 68 deletions(-)
---
This builds upon my previous exec cleanup work at:git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git exec-next
Thank you,
Eric