← Documents Documentation/ABI/testing/sysfs-secvar GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

POWER secure-variable sysfs ABI

POWER secure-boot variables의 firmware backend format, key-management mode별 variable set, data/update access와 PLPKS keystore configuration을 정의합니다.

Source pathDocumentation/ABI/testing/sysfs-secvar
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Firmware backend와 format

sysfs-secvar:1-32

POWER secure-variable tree와 OPAL·PLPKS backend별 update format, dynamic/static key-management version을 식별합니다.

Mode별 secure variables

sysfs-secvar:33-66

Unique ASCII variable directory 아래 size·read-only data·write-only update를 두고 key-management mode에 맞는 key databases만 노출합니다.

PLPKS configuration

sysfs-secvar:67-130

Optional ASCII config tree에서 version, object/keystore sizes, used space와 policy·algorithm bitmasks를 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/firmware/secvar
2 Date: August 2019
3 Contact: Nayna Jain <nayna@linux.ibm.com>
4 Description: This directory is created if the POWER firmware supports OS
5 secureboot, thereby secure variables. It exposes interface
6 for reading/writing the secure variables
7
8 What: /sys/firmware/secvar/vars
9 Date: August 2019
10 Contact: Nayna Jain <nayna@linux.ibm.com>
11 Description: This directory lists all the secure variables that are supported
12 by the firmware.
13
14 What: /sys/firmware/secvar/format
15 Date: August 2019
16 Contact: Nayna Jain <nayna@linux.ibm.com>
17 Description: A string indicating which backend is in use by the firmware.
18 This determines the format of the variable and the accepted
19 format of variable updates.
20
21 On powernv/OPAL, this value is provided by the OPAL firmware
22 and is expected to be "ibm,edk2-compat-v1".
23
24 On pseries/PLPKS, this is generated by the kernel based on the
25 version number in the SB_VERSION variable in the keystore. The
26 version numbering in the SB_VERSION variable starts from 1. The
27 format string takes the form "ibm,plpks-sb-v<version>" in the
28 case of dynamic key management mode. If the SB_VERSION variable
29 does not exist (or there is an error while reading it), it takes
30 the form "ibm,plpks-sb-v0", indicating that the key management
31 mode is static.
32
33 What: /sys/firmware/secvar/vars/<variable name>
34 Date: August 2019
35 Contact: Nayna Jain <nayna@linux.ibm.com>
36 Description: Each secure variable is represented as a directory named as
37 <variable_name>. The variable name is unique and is in ASCII
38 representation. The data and size can be determined by reading
39 their respective attribute files.
40
41 Only secvars relevant to the key management mode are exposed.
42 Only in the dynamic key management mode should the user have
43 access (read and write) to the secure boot secvars db, dbx,
44 grubdb, grubdbx, and sbat. These secvars are not consumed in the
45 static key management mode. PK, trustedcadb and moduledb are the
46 secvars common to both static and dynamic key management modes.
47
48 What: /sys/firmware/secvar/vars/<variable_name>/size
49 Date: August 2019
50 Contact: Nayna Jain <nayna@linux.ibm.com>
51 Description: An integer representation of the size of the content of the
52 variable. In other words, it represents the size of the data.
53
54 What: /sys/firmware/secvar/vars/<variable_name>/data
55 Date: August 2019
56 Contact: Nayna Jain <nayna@linux.ibm.com>
57 Description: A read-only file containing the value of the variable. The size
58 of the file represents the maximum size of the variable data.
59
60 What: /sys/firmware/secvar/vars/<variable_name>/update
61 Date: August 2019
62 Contact: Nayna Jain <nayna@linux.ibm.com>
63 Description: A write-only file that is used to submit the new value for the
64 variable. The size of the file represents the maximum size of
65 the variable data that can be written.
66
67 What: /sys/firmware/secvar/config
68 Date: February 2023
69 Contact: Nayna Jain <nayna@linux.ibm.com>
70 Description: This optional directory contains read-only config attributes as
71 defined by the secure variable implementation. All data is in
72 ASCII format. The directory is only created if the backing
73 implementation provides variables to populate it, which at
74 present is only PLPKS on the pseries platform.
75
76 What: /sys/firmware/secvar/config/version
77 Date: February 2023
78 Contact: Nayna Jain <nayna@linux.ibm.com>
79 Description: Config version as reported by the hypervisor in ASCII decimal
80 format.
81
82 Currently only provided by PLPKS on the pseries platform.
83
84 What: /sys/firmware/secvar/config/max_object_size
85 Date: February 2023
86 Contact: Nayna Jain <nayna@linux.ibm.com>
87 Description: Maximum allowed size of objects in the keystore in bytes,
88 represented in ASCII decimal format.
89
90 This is not necessarily the same as the max size that can be
91 written to an update file as writes can contain more than
92 object data, you should use the size of the update file for
93 that purpose.
94
95 Currently only provided by PLPKS on the pseries platform.
96
97 What: /sys/firmware/secvar/config/total_size
98 Date: February 2023
99 Contact: Nayna Jain <nayna@linux.ibm.com>
100 Description: Total size of the PLPKS in bytes, represented in ASCII decimal
101 format.
102
103 Currently only provided by PLPKS on the pseries platform.
104
105 What: /sys/firmware/secvar/config/used_space
106 Date: February 2023
107 Contact: Nayna Jain <nayna@linux.ibm.com>
108 Description: Current space consumed by the key store, in bytes, represented
109 in ASCII decimal format.
110
111 Currently only provided by PLPKS on the pseries platform.
112
113 What: /sys/firmware/secvar/config/supported_policies
114 Date: February 2023
115 Contact: Nayna Jain <nayna@linux.ibm.com>
116 Description: Bitmask of supported policy flags by the hypervisor,
117 represented as an 8 byte hexadecimal ASCII string. Consult the
118 hypervisor documentation for what these flags are.
119
120 Currently only provided by PLPKS on the pseries platform.
121
122 What: /sys/firmware/secvar/config/signed_update_algorithms
123 Date: February 2023
124 Contact: Nayna Jain <nayna@linux.ibm.com>
125 Description: Bitmask of flags indicating which algorithms the hypervisor
126 supports for signed update of objects, represented as a 16 byte
127 hexadecimal ASCII string. Consult the hypervisor documentation
128 for what these flags mean.
129
130 Currently only provided by PLPKS on the pseries platform.
131

3. 한국어 전문 번역

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

POWER secure-variable sysfs ABI: secvar

1-7
항목한국어 전문 번역
What/sys/firmware/secvar
Date2019년 8월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar` directory는 POWER firmware가 OS secureboot와 secure variables를 지원할 때 생성되며 secure variables를 read/write하는 interface를 노출합니다.

POWER secure-variable sysfs ABI: vars

8-13
항목한국어 전문 번역
What/sys/firmware/secvar/vars
Date2019년 8월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/vars` directory는 firmware가 지원하는 모든 secure variables를 나열합니다.

POWER secure-variable sysfs ABI: format

14-32
항목한국어 전문 번역
What/sys/firmware/secvar/format
Date2019년 8월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/format`은 firmware가 사용하는 backend를 나타내는 string이며 variable format과 accepted update format을 결정합니다. powernv/OPAL에서는 OPAL firmware가 제공하는 `ibm,edk2-compat-v1`입니다. pseries/PLPKS에서는 kernel이 keystore의 `SB_VERSION` variable version으로 생성합니다. Version numbering은 1부터 시작합니다. Dynamic key-management mode에서는 `ibm,plpks-sb-v<version>` 형식입니다. `SB_VERSION`이 없거나 read error가 있으면 static key-management mode를 나타내는 `ibm,plpks-sb-v0`입니다.
Secure-variable backend formats
Platform/backendConditionFormat
powernv / OPALFirmware-providedibm,edk2-compat-v1
pseries / PLPKSDynamic; SB_VERSION=<version>ibm,plpks-sb-v<version>
pseries / PLPKSStatic; missing or unreadable SB_VERSIONibm,plpks-sb-v0

Platform backend와 key-management mode가 format string을 결정합니다.

POWER secure-variable sysfs ABI: <variable name>

33-47
항목한국어 전문 번역
What/sys/firmware/secvar/vars/<variable name>
Date2019년 8월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/vars/<variable name>`에서 secure variable은 unique ASCII `<variable_name>` directory로 표현되고 data와 size는 각 attribute file에서 확인합니다. Key-management mode와 관련된 secvars만 노출됩니다. Dynamic mode에서만 user가 secure-boot secvars `db`, `dbx`, `grubdb`, `grubdbx`, `sbat`를 read/write할 수 있으며 static mode에서는 이 variables를 사용하지 않습니다. `PK`, `trustedcadb`, `moduledb`는 static과 dynamic mode 모두에 공통입니다.
Secure variables by key-management mode
Variable setStatic modeDynamic mode
db, dbx, grubdb, grubdbx, sbatNot consumedRead/write
PK, trustedcadb, moduledbExposedExposed

Dynamic-only databases와 common variables를 구분합니다.

POWER secure-variable sysfs ABI: size

48-53
항목한국어 전문 번역
What/sys/firmware/secvar/vars/<variable_name>/size
Date2019년 8월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/vars/<variable_name>/size`는 variable content, 즉 data size를 integer로 나타냅니다.
Secure-variable attributes
AttributeAccessMeaning
sizeReadCurrent content/data size
dataRead-onlyCurrent variable value
updateWrite-onlySubmit new variable value

Variable directory의 size, current data와 update channel을 비교합니다.

POWER secure-variable sysfs ABI: data

54-59
항목한국어 전문 번역
What/sys/firmware/secvar/vars/<variable_name>/data
Date2019년 8월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/vars/<variable_name>/data`는 variable value를 담는 read-only file입니다. File size는 variable data의 maximum size를 나타냅니다.

POWER secure-variable sysfs ABI: update

60-66
항목한국어 전문 번역
What/sys/firmware/secvar/vars/<variable_name>/update
Date2019년 8월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/vars/<variable_name>/update`는 variable의 new value를 submit하는 write-only file입니다. File size는 write할 수 있는 variable data의 maximum size를 나타냅니다.

POWER secure-variable sysfs ABI: config

67-75
항목한국어 전문 번역
What/sys/firmware/secvar/config
Date2023년 2월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/config`는 secure-variable implementation이 정의한 read-only config attributes를 담는 optional directory입니다. 모든 data는 ASCII format입니다. Backing implementation이 채울 variables를 제공할 때만 생성되며 현재는 pseries platform의 PLPKS만 제공합니다.
PLPKS config attributes
AttributeMeaningEncoding
versionHypervisor config versionASCII decimal
max_object_sizeMaximum object bytesASCII decimal
total_sizeTotal PLPKS bytesASCII decimal
used_spaceCurrently consumed bytesASCII decimal
supported_policiesPolicy flags8-byte hexadecimal ASCII
signed_update_algorithmsSigned-update algorithm flags16-byte hexadecimal ASCII

Optional pseries PLPKS config values와 encoding을 정리합니다.

POWER secure-variable sysfs ABI: version

76-83
항목한국어 전문 번역
What/sys/firmware/secvar/config/version
Date2023년 2월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/config/version`은 hypervisor가 보고한 config version을 ASCII decimal format으로 표시합니다. 현재 pseries PLPKS에서만 제공합니다.

POWER secure-variable sysfs ABI: max object size

84-96
항목한국어 전문 번역
What/sys/firmware/secvar/config/max_object_size
Date2023년 2월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/config/max_object_size`는 keystore object에 허용되는 maximum size를 bytes와 ASCII decimal format으로 표시합니다. Update write에는 object data 외의 content도 들어갈 수 있어 update file에 쓸 수 있는 maximum과 반드시 같지는 않습니다. Update limit에는 update file size를 사용해야 합니다. 현재 pseries PLPKS에서만 제공합니다.
Choosing a secure-variable update limit
Need object data limitRead max_object_size
Need update write limitUse update file sizeIncludes data and update metadata

Object size와 update payload limit는 서로 다를 수 있습니다.

POWER secure-variable sysfs ABI: total size

97-104
항목한국어 전문 번역
What/sys/firmware/secvar/config/total_size
Date2023년 2월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/config/total_size`는 PLPKS total size를 bytes와 ASCII decimal format으로 표시합니다. 현재 pseries PLPKS에서만 제공합니다.

POWER secure-variable sysfs ABI: used space

105-112
항목한국어 전문 번역
What/sys/firmware/secvar/config/used_space
Date2023년 2월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/config/used_space`는 keystore가 현재 소비한 space를 bytes와 ASCII decimal format으로 표시합니다. 현재 pseries PLPKS에서만 제공합니다.

POWER secure-variable sysfs ABI: supported policies

113-121
항목한국어 전문 번역
What/sys/firmware/secvar/config/supported_policies
Date2023년 2월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/config/supported_policies`는 hypervisor가 지원하는 policy flags bitmask를 8-byte hexadecimal ASCII string으로 표시합니다. Flag 의미는 hypervisor documentation을 참조합니다. 현재 pseries PLPKS에서만 제공합니다.

POWER secure-variable sysfs ABI: signed update algorithms

122-130
항목한국어 전문 번역
What/sys/firmware/secvar/config/signed_update_algorithms
Date2023년 2월
KernelVersion
ContactNayna Jain <nayna@linux.ibm.com>
Description`/sys/firmware/secvar/config/signed_update_algorithms`는 hypervisor가 object signed update에 지원하는 algorithms를 나타내는 flags bitmask를 16-byte hexadecimal ASCII string으로 표시합니다. Flag 의미는 hypervisor documentation을 참조합니다. 현재 pseries PLPKS에서만 제공합니다.