ucounts: RLIMIT_NPROC fixes
Status from this message: has been merged into torvalds/linux.git:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 4 repliesMerged
- v18 patches 23 repliesSuperseded
Patches in v2 Merged
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | rlimit: Fix RLIMIT_NPROC enforcement failure caused by capability calls in set_userkernel/ | +1 | 1 reply | |
| 2/5 | ucounts: Enforce RLIMIT_NPROC not RLIMIT_NPROC+1kernel/ | +5 | 0 replies | |
| 3/5 | ucounts: Base set_cred_ucounts changes on the real userkernel/ | +2 | 0 replies | |
| 4/5 | ucounts: Move RLIMIT_NPROC handling after set_userkernel/ | +14 | 0 replies | |
| 5/5 | ucounts: Handle wrapping in is_ucounts_overlimitkernel/ | +2 | 1 reply |
Reviews trailers per patch
4 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Michal Koutný | Shuah Khan | Solar Designer | Kees Cook |
|---|---|---|---|---|
| Series | R-b | |||
| 1/5 | R-b | |||
| 2/5 | R-b | |||
| 3/5 | R-b | |||
| 4/5 | ||||
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v2 0/5] ucounts: RLIMIT_NPROC fixes
Michal Koutný recently found some bugs in the enforcement of RLIMIT_NPROC in the recent ucount rlimit implementation.
I saw some additional bugs and some cleaner ways to fix the problem so instead of starting with his fixes these are my own.
I have rewritten about half my fixes since the last time this was posted. There is this notion (not entirely wrong) that the code should be consistent and make sense. When I dug in I discovered that has not been the case for the last 20 years. Fixing the long standing inconsistencies is something that seems to warrent wider vetting on linux-api.
So with this set of patches I have developed a very conservative approach changing only what is necessary to fix the bugs that I can see clearly. Cleanups and anything that is making the code more consistent can follow after we have the code working as it has historically.
Anyone who can please take a look and tell me if I am doing something silly.
Eric W. Biederman (5):
rlimit: Fix RLIMIT_NPROC enforcement failure caused by capability calls in set_user
ucounts: Enforce RLIMIT_NPROC not RLIMIT_NPROC+1
ucounts: Base set_cred_ucounts changes on the real user
ucounts: Move RLIMIT_NPROC handling after set_user
ucounts: Handle wrapping in is_ucounts_overlimit
kernel/cred.c | 9 ++------- kernel/fork.c | 10 +++++----- kernel/sys.c | 20 ++++++++++++++------ kernel/ucount.c | 3 ++- 4 files changed, 23 insertions(+), 19 deletions(-)
Eric