Skip to content

Commit b24d646

Browse files
Kenta TadaKenta Tada
Kenta Tada
authored and
Kenta Tada
committed
config: Add AllowSpeculation
AllowSpeculation disables spectre mitigations for container. For more information about that, please refer to: opencontainers/runc#2430 Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
1 parent 44341cd commit b24d646

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

config.md

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ For Linux-based systems, the `process` object supports the following process-spe
208208
For more information on how these two settings work together, see [the memory cgroup documentation section 10. OOM Contol][cgroup-v1-memory_2].
209209
* **`selinuxLabel`** (string, OPTIONAL) specifies the SELinux label for the process.
210210
For more information about SELinux, see [SELinux documentation][selinux].
211+
* **`allowSpeculation`** (bool, OPTIONAL) setting `allowSpeculation` to true disable spectre mitigations to improve the performance.
211212

212213
### <a name="configUser" />User
213214

schema/config-schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@
166166
}
167167
}
168168
}
169+
},
170+
"allowSpeculation": {
171+
"type": "boolean"
169172
}
170173
}
171174
},

schema/test/config/good/spec-example.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
],
5757
"apparmorProfile": "acme_secure_profile",
5858
"selinuxLabel": "system_u:system_r:svirt_lxc_net_t:s0:c124,c675",
59-
"noNewPrivileges": true
59+
"noNewPrivileges": true,
60+
"allowSpeculation": false
6061
},
6162
"root": {
6263
"path": "rootfs",

specs-go/config.go

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ type Process struct {
5858
OOMScoreAdj *int `json:"oomScoreAdj,omitempty" platform:"linux"`
5959
// SelinuxLabel specifies the selinux context that the container process is run as.
6060
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
61+
// AllowSpeculation disables spectre mitigations
62+
AllowSpeculation bool `json:"allowSpeculation,omitempty" platform:"linux"`
6163
}
6264

6365
// LinuxCapabilities specifies the whitelist of capabilities that are kept for a process.

0 commit comments

Comments
 (0)