Documentation/driver-api/vfio-pci-device-specific-driver-acceptance.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

Acceptance criteria for vfio-pci device specific driver variants

vfio-pci-core 기반 장치별 드라이버가 지켜야 할 보안 경계, parent-driver 승인, migration data 문서화와 추가 리뷰 기준을 설명하는 한국어 전문 번역입니다.

Source pathDocumentation/driver-api/vfio-pci-device-specific-driver-acceptance.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

vfio-pci-device-specific-driver-acceptance.rst:1-35

`vfio-pci-core`를 사용하는 장치별 변형은 migration 같은 고급 기능을 구현할 수 있지만, parent device와 userspace 사이에 새 신뢰 경계를 만듭니다. 따라서 제출자는 상위 드라이버 승인, 검증되지 않은 입력의 영향 제한, 상태 형식과 safeguard 문서화, 장치별 reviewer의 추가 검토를 모두 갖춰야 합니다.

문서 구성
원문 줄핵심 내용
1-5수용 기준의 범위
6-17vfio-pci-core와 장치별 확장
18-26부모 장치 상호작용과 보안
27-35문서화, 승인, 추가 리뷰

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 Acceptance criteria for vfio-pci device specific driver variants
4 ================================================================
5
6 Overview
7 --------
8 The vfio-pci driver exists as a device agnostic driver using the
9 system IOMMU and relying on the robustness of platform fault
10 handling to provide isolated device access to userspace. While the
11 vfio-pci driver does include some device specific support, further
12 extensions for yet more advanced device specific features are not
13 sustainable. The vfio-pci driver has therefore split out
14 vfio-pci-core as a library that may be reused to implement features
15 requiring device specific knowledge, ex. saving and loading device
16 state for the purposes of supporting migration.
17
18 In support of such features, it's expected that some device specific
19 variants may interact with parent devices (ex. SR-IOV PF in support of
20 a user assigned VF) or other extensions that may not be otherwise
21 accessible via the vfio-pci base driver. Authors of such drivers
22 should be diligent not to create exploitable interfaces via these
23 interactions or allow unchecked userspace data to have an effect
24 beyond the scope of the assigned device.
25
26 New driver submissions are therefore requested to have approval via
27 sign-off/ack/review/etc for any interactions with parent drivers.
28 Additionally, drivers should make an attempt to provide sufficient
29 documentation for reviewers to understand the device specific
30 extensions, for example in the case of migration data, how is the
31 device state composed and consumed, which portions are not otherwise
32 available to the user via vfio-pci, what safeguards exist to validate
33 the data, etc. To that extent, authors should additionally expect to
34 require reviews from at least one of the listed reviewers, in addition
35 to the overall vfio maintainer.
36

3. 한국어 전문 번역

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

문서의 범위와 적용 대상

1-5

이 문서는 `vfio-pci` 장치별 드라이버 변형이 커널에 수용되기 위해 충족해야 하는 기준을 정합니다. 장치별 기능 자체뿐 아니라 보안 경계, 상위 장치와의 상호작용, 검토 책임까지 제출 단계에서 명확히 입증해야 합니다.

장치별 VFIO 드라이버 수용 범위
대상검토 초점
`vfio-pci` 기본 드라이버장치에 독립적인 격리 접근
장치별 변형장치 지식이 필요한 확장 기능
신규 드라이버 제출보안성, 문서화, 승인과 추가 리뷰

.. SPDX-License-Identifier: GPL-2.0

Acceptance criteria for vfio-pci device specific driver variants
================================================================

vfio-pci-core 분리와 장치별 기능

6-17

`vfio-pci` 드라이버는 system IOMMU를 사용하고 platform fault handling의 견고성에 의존하는 device-agnostic driver입니다. 이 조합은 userspace가 다른 장치와 격리된 상태로 할당 장치에 접근하게 합니다.

기본 드라이버에도 일부 device-specific support가 있지만, 더 고급인 장치별 기능을 계속 그 안에 추가하는 방식은 유지 가능하지 않습니다. 따라서 공통 부분을 재사용 가능한 `vfio-pci-core` library로 분리했습니다.

장치 상태를 저장하고 불러와 migration을 지원하는 기능처럼 장치 내부 지식이 필요한 경우, 별도 변형 드라이버가 `vfio-pci-core`를 재사용해 해당 기능을 구현할 수 있습니다.

vfio-pci 장치별 확장 구조
System IOMMU와 platform fault handlingDevice-agnostic `vfio-pci-core`Device-specific driver variantMigration state save/load 같은 고급 기능격리된 userspace device access

공통 격리와 접근 제어는 core가 맡고, 장치 지식이 필요한 기능만 변형 드라이버가 추가합니다.

Overview
--------
The vfio-pci driver exists as a device agnostic driver using the
system IOMMU and relying on the robustness of platform fault
handling to provide isolated device access to userspace.  While the
vfio-pci driver does include some device specific support, further
extensions for yet more advanced device specific features are not
sustainable.  The vfio-pci driver has therefore split out
vfio-pci-core as a library that may be reused to implement features
requiring device specific knowledge, ex. saving and loading device
state for the purposes of supporting migration.

부모 장치 상호작용과 보안 경계

18-26

이러한 기능을 지원하는 장치별 변형은 parent device와 상호작용할 수 있습니다. 대표적으로 userspace에 할당한 VF를 지원하려고 SR-IOV PF와 통신하거나, `vfio-pci` base driver로는 접근할 수 없는 다른 확장을 사용할 수 있습니다.

드라이버 작성자는 이런 상호작용을 통해 악용 가능한 interface가 생기지 않도록 주의해야 합니다. 또한 검증되지 않은 userspace data가 할당 장치의 범위를 넘어 parent device나 다른 장치, platform 상태에 영향을 주어서는 안 됩니다.

장치별 확장의 신뢰 경계
상호작용필수 보호 조치
Assigned VF에서 SR-IOV PF 접근상위 장치 영향과 권한 범위를 명시적으로 제한
Base driver 밖의 extension 사용노출 interface의 공격 가능성을 검토
Userspace data 수신사용 전에 형식, 크기, 상태 전이를 검증
Device-specific operation효과를 assigned device 범위 안에 한정

In support of such features, it's expected that some device specific
variants may interact with parent devices (ex. SR-IOV PF in support of
a user assigned VF) or other extensions that may not be otherwise
accessible via the vfio-pci base driver.  Authors of such drivers
should be diligent not to create exploitable interfaces via these
interactions or allow unchecked userspace data to have an effect
beyond the scope of the assigned device.

New driver submissions are therefore requested to have approval via

제출 문서화와 추가 리뷰 요구사항

27-35

새 드라이버 제출은 parent driver와의 모든 상호작용에 대해 해당 maintainer나 reviewer의 sign-off, ack, review 등의 승인을 받아야 합니다.

리뷰어가 장치별 확장을 충분히 이해할 수 있도록 문서도 제공해야 합니다. Migration data라면 device state가 어떻게 구성되고 소비되는지, 그중 일반 `vfio-pci`를 통해 userspace가 얻을 수 없는 부분은 무엇인지, 입력 data를 검증하는 safeguard는 무엇인지 설명해야 합니다.

전체 VFIO maintainer의 검토에 더해, 제출자는 목록에 기재된 reviewer 중 적어도 한 명에게 추가 리뷰를 받을 것을 예상해야 합니다. 장치별 기능의 수용은 구현 코드만이 아니라 신뢰 경계와 검증 근거까지 포함한 검토입니다.

장치별 VFIO 드라이버 수용 절차
Parent-driver interaction 식별Sign-off, ack 또는 review 확보State composition과 consumption 문서화vfio-pci 밖의 data와 safeguard 설명Listed reviewer 1명 이상 추가 리뷰Overall VFIO maintainer 검토

상위 드라이버 승인, 충분한 기술 문서, 장치별 전문 리뷰를 모두 거쳐야 합니다.

sign-off/ack/review/etc for any interactions with parent drivers.
Additionally, drivers should make an attempt to provide sufficient
documentation for reviewers to understand the device specific
extensions, for example in the case of migration data, how is the
device state composed and consumed, which portions are not otherwise
available to the user via vfio-pci, what safeguards exist to validate
the data, etc.  To that extent, authors should additionally expect to
require reviews from at least one of the listed reviewers, in addition
to the overall vfio maintainer.