요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=================================
Documentation for /proc/sys/user/
=================================
kernel version 4.9.0
Copyright (c) 2016 Eric Biederman <ebiederm@xmission.com>
------------------------------------------------------------------------------
This file contains the documentation for the sysctl files in
/proc/sys/user.
The files in this directory can be used to override the default
limits on the number of namespaces and other objects that have
per user per user namespace limits.
The primary purpose of these limits is to stop programs that
malfunction and attempt to create a ridiculous number of objects,
before the malfunction becomes a system wide problem. It is the
intention that the defaults of these limits are set high enough that
no program in normal operation should run into these limits.
The creation of per user per user namespace objects are charged to
the user in the user namespace who created the object and
verified to be below the per user limit in that user namespace.
The creation of objects is also charged to all of the users
who created user namespaces the creation of the object happens
in (user namespaces can be nested) and verified to be below the per user
limits in the user namespaces of those users.
This recursive counting of created objects ensures that creating a
user namespace does not allow a user to escape their current limits.
Currently, these files are in /proc/sys/user:
max_cgroup_namespaces
=====================
The maximum number of cgroup namespaces that any user in the current
user namespace may create.
max_ipc_namespaces
==================
The maximum number of ipc namespaces that any user in the current
user namespace may create.
max_mnt_namespaces
==================
The maximum number of mount namespaces that any user in the current
user namespace may create.
max_net_namespaces
==================
The maximum number of network namespaces that any user in the
current user namespace may create.
max_pid_namespaces
==================
The maximum number of pid namespaces that any user in the current
user namespace may create.
max_time_namespaces
===================
The maximum number of time namespaces that any user in the current
user namespace may create.
max_user_namespaces
===================
The maximum number of user namespaces that any user in the current
user namespace may create.
max_uts_namespaces
==================
The maximum number of user namespaces that any user in the current
user namespace may create.
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`입니다.
요약과 해설
user.rst:1-84이 한도들은 namespace 중첩을 악용한 자원 고갈을 막도록 생성 사용량을 현재 사용자뿐 아니라 상위 user namespace를 만든 사용자에게도 재귀적으로 부과합니다. 정상 program이 닿지 않을 만큼 높은 기본값을 의도하지만 multi-tenant 환경에서는 workload와 격리 정책에 맞춰 검토해야 합니다.