← Documents Documentation/admin-guide/sysctl/user.rst GitHub 원문 ↗

Linux 6.18.37 · Administration

Documentation for /proc/sys/user/

사용자별·user namespace별 cgroup, IPC, mount, network, PID, time, user, UTS namespace 생성 한도를 설명합니다.

Source pathDocumentation/admin-guide/sysctl/user.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

user.rst:1-84

이 한도들은 namespace 중첩을 악용한 자원 고갈을 막도록 생성 사용량을 현재 사용자뿐 아니라 상위 user namespace를 만든 사용자에게도 재귀적으로 부과합니다. 정상 program이 닿지 않을 만큼 높은 기본값을 의도하지만 multi-tenant 환경에서는 workload와 격리 정책에 맞춰 검토해야 합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 =================================
2 Documentation for /proc/sys/user/
3 =================================
4
5 kernel version 4.9.0
6
7 Copyright (c) 2016 Eric Biederman <[email protected]>
8
9 ------------------------------------------------------------------------------
10
11 This file contains the documentation for the sysctl files in
12 /proc/sys/user.
13
14 The files in this directory can be used to override the default
15 limits on the number of namespaces and other objects that have
16 per user per user namespace limits.
17
18 The primary purpose of these limits is to stop programs that
19 malfunction and attempt to create a ridiculous number of objects,
20 before the malfunction becomes a system wide problem. It is the
21 intention that the defaults of these limits are set high enough that
22 no program in normal operation should run into these limits.
23
24 The creation of per user per user namespace objects are charged to
25 the user in the user namespace who created the object and
26 verified to be below the per user limit in that user namespace.
27
28 The creation of objects is also charged to all of the users
29 who created user namespaces the creation of the object happens
30 in (user namespaces can be nested) and verified to be below the per user
31 limits in the user namespaces of those users.
32
33 This recursive counting of created objects ensures that creating a
34 user namespace does not allow a user to escape their current limits.
35
36 Currently, these files are in /proc/sys/user:
37
38 max_cgroup_namespaces
39 =====================
40
41 The maximum number of cgroup namespaces that any user in the current
42 user namespace may create.
43
44 max_ipc_namespaces
45 ==================
46
47 The maximum number of ipc namespaces that any user in the current
48 user namespace may create.
49
50 max_mnt_namespaces
51 ==================
52
53 The maximum number of mount namespaces that any user in the current
54 user namespace may create.
55
56 max_net_namespaces
57 ==================
58
59 The maximum number of network namespaces that any user in the
60 current user namespace may create.
61
62 max_pid_namespaces
63 ==================
64
65 The maximum number of pid namespaces that any user in the current
66 user namespace may create.
67
68 max_time_namespaces
69 ===================
70
71 The maximum number of time namespaces that any user in the current
72 user namespace may create.
73
74 max_user_namespaces
75 ===================
76
77 The maximum number of user namespaces that any user in the current
78 user namespace may create.
79
80 max_uts_namespaces
81 ==================
82
83 The maximum number of user namespaces that any user in the current
84 user namespace may create.
85

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

문서 범위와 재귀적 한도 계산

1-37

이 문서는 Eric Biederman이 작성한 `/proc/sys/user` sysctl 설명서이며 원문은 kernel version 4.9.0을 기준으로 합니다.

이 디렉터리의 파일은 사용자별·user namespace별 namespace와 기타 객체 수의 기본 한도를 덮어씁니다. 잘못 동작하는 program이 터무니없이 많은 객체를 만들어 시스템 전체 문제가 되기 전에 막는 것이 주목적입니다. 정상 동작하는 program은 기본 한도에 닿지 않도록 충분히 높게 설정하려는 의도입니다.

사용자별·user namespace별 객체를 만들면 그 객체를 만든 user namespace의 사용자에게 사용량을 부과하고, 해당 namespace의 사용자별 한도보다 낮은지 확인합니다.

객체가 생성되는 user namespace는 중첩될 수 있으므로, 그 namespace들을 만든 모든 사용자에게도 사용량을 부과하고 각 사용자의 user namespace 한도를 확인합니다. 이 재귀 계산은 새 user namespace를 만들어 기존 한도를 회피하지 못하게 합니다.

max_cgroup_namespaces

38-43

현재 user namespace의 사용자 한 명이 만들 수 있는 cgroup namespace의 최대 개수입니다.

max_ipc_namespaces

44-49

현재 user namespace의 사용자 한 명이 만들 수 있는 IPC namespace의 최대 개수입니다.

max_mnt_namespaces

50-55

현재 user namespace의 사용자 한 명이 만들 수 있는 mount namespace의 최대 개수입니다.

max_net_namespaces

56-61

현재 user namespace의 사용자 한 명이 만들 수 있는 network namespace의 최대 개수입니다.

max_pid_namespaces

62-67

현재 user namespace의 사용자 한 명이 만들 수 있는 PID namespace의 최대 개수입니다.

max_time_namespaces

68-73

현재 user namespace의 사용자 한 명이 만들 수 있는 time namespace의 최대 개수입니다.

max_user_namespaces

74-79

현재 user namespace의 사용자 한 명이 만들 수 있는 user namespace의 최대 개수입니다.

max_uts_namespaces

80-84

원문 설명에 따르면 현재 user namespace의 사용자 한 명이 만들 수 있는 user namespace의 최대 개수입니다. 항목 이름은 `max_uts_namespaces`입니다.