[PATCH v7 6/7] Reimplement RLIMIT_MEMLOCK on top of ucounts

2021-02-22 Thread Alexey Gladkov
The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. Changelog v7: * Keep only ucounts for RLIMIT_MEMLOCK checks i

[PATCH v7 6/7] Reimplement RLIMIT_MEMLOCK on top of ucounts

2021-02-16 Thread Alexey Gladkov
The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. Changelog v7: * Fix hugetlb_file_setup() declaration if CONFI