Skip to content

userns: bump idmap limits, fixes & tweaks

Eric W. Biederman containers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5userns: Don't special case a count of 0kernel/user_namespace.c+3 -70 replies
2/5userns: Simplify the user and group mapping functionskernel/user_namespace.c+58 -740 replies
3/5userns: Don't read extents twice in m_startkernel/user_namespace.c+4 -218 replies
4/5userns: Make map_id_down a wrapper for map_id_range_downkernel/user_namespace.c+1 -370 replies
5/5userns: Simplify insert_extentkernel/user_namespace.c+8 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] userns: bump idmap limits, fixes & tweaks

Christian I have looked through your code and I have found one real issue and of things I want to twak

The real issue is reading nr_extents multiple times when reading a map. That can introduce races that will allow walking past the end of the array, if the first read is 0 but the second read is > 5.

I have also found a couple of tweaks that look like they are worth implementing.

As all of these are very small and very straight forward I have tested these and applied them all to my for-next branch

Eric W. Biederman (5):
userns: Don't special case a count of 0
userns: Simplify the user and group mapping functions
userns: Don't read extents twice in m_start
userns: Make map_id_down a wrapper for map_id_range_down
userns: Simplify insert_extent

 kernel/user_namespace.c | 159 ++++++++++++++++--------------------------------
 1 file changed, 51 insertions(+), 108 deletions(-)