Skip to content

RFC Inotify limits per usernamespace

Nikolay Borisov containers 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest4 patches 1 replyIn review
  2. v2 RFC4 patches 6 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4hashtable: Add __HASHTABLE_INITIALIZERinclude/linux/hashtable.h+3 -00 replies
2/4misc: Rename the HASH_SIZE macrofs/logfs/dir.c net/ipv6/ip6_gre.c net/ipv6/ip6_tunnel.c +3 more+38 -380 replies
3/4userns/inotify: Initial implementation of inotify per-usernsfs/notify/inotify/inotify.h fs/notify/inotify/inotify_user.c include/linux/fsnotify_backend.h +2 more+246 -30 replies
4/4inotify: Convert to using new userns infrastructurefs/notify/inotify/inotify_fsnotify.c fs/notify/inotify/inotify_user.c include/linux/fsnotify_backend.h +1 more+40 -220 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchDavid S. Miller
1/4
2/4A-b
3/4
4/4

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

Read the v3 thread

Cover letter [RFC PATCH 0/4 v3] Inotify limits per usernamespace

Hello Eric,

Another day, another version...

So this is version 3 of the patches initially posted at [1]. Version 2 can be fount at [2]

So I reworked the way the state for namespaces are created and the code is indeed a lot cleaner and easier to understand. I've also moved from using uid and instead always work with kuids. Finally I reworked the hashtable to be a global one and indexed by the kuid value. With this I believe I have adressed all your points in your previous review.

I still haven't tackled the issue with the semantics of the sysctls. But judging from your last reply about being content with just setting the limit at the top-level I believe the way to fix this would be make a custom proc handler that writes to the variable in the current userns. Opinions?

[1] http://thread.gmane.org/gmane.linux.kernel/2232000
[2] https://lists.linuxfoundation.org/pipermail/containers/2016-June/037019.html

Nikolay Borisov (4):
hashtable: Add __HASHTABLE_INITIALIZER
misc: Rename the HASH_SIZE macro
userns/inotify: Initial implementation of inotify per-userns
inotify: Convert to using new userns infrastructure

 fs/logfs/dir.c                           |   6 +-
 fs/notify/inotify/inotify.h              |   2 +
 fs/notify/inotify/inotify_fsnotify.c     |  14 +++-
 fs/notify/inotify/inotify_user.c         | 136 +++++++++++++++++++++++++++----
 include/linux/fsnotify_backend.h         |   4 +-
 include/linux/hashtable.h                |   3 +
 include/linux/sched.h                    |   4 -
 include/linux/user_namespace.h           |  45 ++++++++++
 kernel/user_namespace.c                  | 106 +++++++++++++++++++++++-
 net/ipv6/ip6_gre.c                       |   8 +-
 net/ipv6/ip6_tunnel.c                    |  10 +--
 net/ipv6/ip6_vti.c                       |  10 +--
 net/ipv6/sit.c                           |  10 +--
 security/keys/encrypted-keys/encrypted.c |  32 ++++----
 14 files changed, 327 insertions(+), 63 deletions(-)
Signature · 1 line
2.5.0