요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
설정과 제외
LoadPin.rst:11-31`loadpin.enforce`, sysctl과 `loadpin.exclude` 사용법을 설명합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=======
LoadPin
=======
LoadPin is a Linux Security Module that ensures all kernel-loaded files
(modules, firmware, etc) all originate from the same filesystem, with
the expectation that such a filesystem is backed by a read-only device
such as dm-verity or CDROM. This allows systems that have a verified
and/or unchangeable filesystem to enforce module and firmware loading
restrictions without needing to sign the files individually.
The LSM is selectable at build-time with ``CONFIG_SECURITY_LOADPIN``, and
can be controlled at boot-time with the kernel command line option
"``loadpin.enforce``". By default, it is enabled, but can be disabled at
boot ("``loadpin.enforce=0``").
LoadPin starts pinning when it sees the first file loaded. If the
block device backing the filesystem is not read-only, a sysctl is
created to toggle pinning: ``/proc/sys/kernel/loadpin/enabled``. (Having
a mutable filesystem means pinning is mutable too, but having the
sysctl allows for easy testing on systems with a mutable filesystem.)
It's also possible to exclude specific file types from LoadPin using kernel
command line option "``loadpin.exclude``". By default, all files are
included, but they can be excluded using kernel command line option such
as "``loadpin.exclude=kernel-module,kexec-image``". This allows to use
different mechanisms such as ``CONFIG_MODULE_SIG`` and
``CONFIG_KEXEC_VERIFY_SIG`` to verify kernel module and kernel image while
still use LoadPin to protect the integrity of other files kernel loads. The
full list of valid file types can be found in ``kernel_read_file_str``
defined in ``include/linux/kernel_read_file.h``.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
LoadPin
1-10LoadPin은 kernel이 load하는 module, firmware 등의 모든 file이 같은 filesystem에서 오도록 보장하는 Linux Security Module입니다. 이 filesystem은 dm-verity 또는 CD-ROM처럼 read-only device가 backing할 것으로 기대합니다.
따라서 검증되었거나 변경할 수 없는 filesystem을 가진 시스템은 각 file을 개별 서명하지 않고도 module과 firmware load를 제한할 수 있습니다.
Build, boot와 pinning
11-21Build 시 `CONFIG_SECURITY_LOADPIN`으로 LSM을 선택하고 boot 시 kernel command line option `loadpin.enforce`로 제어합니다. 기본값은 활성화이며 `loadpin.enforce=0`으로 boot할 때 끌 수 있습니다.
LoadPin은 첫 file load를 보았을 때 pinning을 시작합니다. Filesystem을 backing하는 block device가 read-only가 아니면 `/proc/sys/kernel/loadpin/enabled` sysctl이 생겨 pinning을 전환할 수 있습니다.
변경 가능한 filesystem에서는 pinning도 변경 가능하지만, 이 sysctl을 통해 그런 filesystem을 가진 시스템에서도 쉽게 시험할 수 있습니다.
File type 제외
22-31Kernel command line option `loadpin.exclude`로 특정 file type을 LoadPin에서 제외할 수 있습니다. 기본적으로 모든 file이 포함되지만 `loadpin.exclude=kernel-module,kexec-image`처럼 지정해 제외할 수 있습니다.
이렇게 하면 kernel module과 kernel image는 각각 `CONFIG_MODULE_SIG`와 `CONFIG_KEXEC_VERIFY_SIG` 같은 다른 메커니즘으로 검증하면서, kernel이 load하는 나머지 file의 무결성은 LoadPin으로 보호할 수 있습니다.
유효한 전체 file type 목록은 `include/linux/kernel_read_file.h`에 정의된 `kernel_read_file_str`에서 확인할 수 있습니다.
동일 filesystem 신뢰
LoadPin.rst:1-10Read-only filesystem을 신뢰 기반으로 삼는 LoadPin 모델을 설명합니다.