Skip to content

Commit 27d34e1

Browse files
committedMar 12, 2021
Used inclusive language
Signed-off-by: Luminita Voicu <lumivo@amazon.com>
1 parent 7a1231b commit 27d34e1

File tree

16 files changed

+30
-25
lines changed

16 files changed

+30
-25
lines changed
 

‎CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@
374374
### Fixed
375375

376376
- A `madvise` call issued by the `musl` allocator was added to the seccomp
377-
whitelist to prevent Firecracker from terminating abruptly when allocating
377+
allow list to prevent Firecracker from terminating abruptly when allocating
378378
memory in certain conditions.
379379

380380
## [0.15.0]
@@ -416,8 +416,8 @@
416416

417417
- Log the app version when the `Logger` is initialized.
418418
- Pretty print panic information.
419-
- Firecracker terminates with exit code 148 when a non-whitelisted syscall
420-
is intercepted.
419+
- Firecracker terminates with exit code 148 when a syscall which is not
420+
present in the allow list is intercepted.
421421

422422
### Fixed
423423

‎CHARTER.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ All contributions must align with this charter and follow Firecracker's
3131
[contribution process](CONTRIBUTING.md).
3232

3333
Firecracker [maintainers](MAINTAINERS.md) merge contributions into the
34-
master branch and create Firecracker releases. Maintainers are also
34+
main branch and create Firecracker releases. Maintainers are also
3535
subject to the mission and tenets outlined above. Anyone may submit
3636
and review contributions.

‎CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ you want to merge your changes to Firecracker:
2929
1. Create your contribution, meeting all
3030
[contribution quality standards](#contribution-quality-standards)
3131
1. [Create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
32-
against the master branch of the Firecracker repository.
32+
against the main branch of the Firecracker repository.
3333
1. Add two reviewers to your pull request (a maintainer will do that for you if
3434
you're new). Work with your reviewers to address any comments and obtain a
3535
minimum of 2 approvals, at least one of which must be provided by
@@ -48,7 +48,7 @@ If you just want to receive feedback for a contribution proposal, open an “RFC
4848
branch for the contribution you want feedback on. Use a meaningful name.
4949
1. Create your proposal based on the existing codebase.
5050
1. [Create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
51-
against the master branch of the Firecracker repository. Prefix your pull
51+
against the main branch of the Firecracker repository. Prefix your pull
5252
request name with `[RFC]`.
5353
1. Discuss your proposal with the community on the pull request page (or on any
5454
other channel). Add the conclusion(s) of this discussion to the pull request

‎SPECIFICATION.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The specifications below quantify Firecracker's promise to enable
44
minimal-overhead execution of container and serverless workloads. These
55
specifications are enforced by integration tests (that run for each PR and
6-
master branch merge).
6+
main branch merge).
77

88
On an [M5D.metal instance][1] (with hyperthreading disabled) and an
99
[M6G.metal instance][2] and given host system resources are available

‎docs/design.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ service is fully configured by users.
151151

152152
Seccomp filters are used by default to further limit the system calls Firecracker
153153
can use. There are 3 possible levels of seccomp filtering, configurable by passing
154-
a command line argument to Firecracker: 0 (disabled), 1 (whitelists a set of
155-
trusted system calls by their identifiers) and 2 (whitelists a set of trusted
154+
a command line argument to Firecracker: 0 (disabled), 1 (allows a set of
155+
trusted system calls by their identifiers) and 2 (allows a set of trusted
156156
system calls with trusted parameter values), the latter being the most
157157
restrictive and the recommended one. The filters are loaded in the Firecracker
158158
process, immediately before the execution of the untrusted guest code starts.

‎docs/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Get a copy of the Firecracker sources by cloning our GitHub repo:
262262
git clone https://github.com/firecracker-microvm/firecracker
263263
```
264264

265-
All development happens on the master branch and we use git tags to mark
265+
All development happens on the main branch and we use git tags to mark
266266
releases. If you are interested in a specific release (e.g. v0.10.1), you can
267267
check it out with:
268268

‎docs/jailer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jailer --id <id> \
5454
`--seccomp-level`, which specifies whether seccomp filters should be installed
5555
and how restrictive they should be. Possible values are:
5656
- 0 : disabled.
57-
- 1 : basic filtering. This prohibits syscalls not whitelisted by
57+
- 1 : basic filtering. This prohibits syscalls not allowed by
5858
Firecracker.
5959
- 2 (default): advanced filtering. This adds further checks on some of the
6060
parameters of the allowed syscalls.

‎src/arch/src/x86_64/msr.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ macro_rules! MSR_RANGE {
7474
}
7575

7676
// List of MSRs that can be serialized. List is sorted in ascending order of MSRs addresses.
77-
static WHITELISTED_MSR_RANGES: &[MsrRange] = &[
77+
static ALLOWED_MSR_RANGES: &[MsrRange] = &[
7878
SINGLE_MSR!(MSR_IA32_P5_MC_ADDR),
7979
SINGLE_MSR!(MSR_IA32_P5_MC_TYPE),
8080
SINGLE_MSR!(MSR_IA32_TSC),
@@ -173,13 +173,11 @@ static WHITELISTED_MSR_RANGES: &[MsrRange] = &[
173173
///
174174
/// * `index` - The index of the MSR that is checked whether it's needed for serialization.
175175
pub fn msr_should_serialize(index: u32) -> bool {
176-
// Blacklisted MSRs not exported by Linux: IA32_FEATURE_CONTROL and IA32_MCG_CTL
176+
// Denied MSRs not exported by Linux: IA32_FEATURE_CONTROL and IA32_MCG_CTL
177177
if index == MSR_IA32_FEATURE_CONTROL || index == MSR_IA32_MCG_CTL {
178178
return false;
179179
};
180-
WHITELISTED_MSR_RANGES
181-
.iter()
182-
.any(|range| range.contains(index))
180+
ALLOWED_MSR_RANGES.iter().any(|range| range.contains(index))
183181
}
184182

185183
// Creates and populates required MSR entries for booting Linux on X86_64.
@@ -250,8 +248,8 @@ mod tests {
250248
use kvm_ioctls::Kvm;
251249

252250
#[test]
253-
fn test_msr_whitelist() {
254-
for range in WHITELISTED_MSR_RANGES.iter() {
251+
fn test_msr_allowlist() {
252+
for range in ALLOWED_MSR_RANGES.iter() {
255253
for msr in range.base..(range.base + range.nmsrs) {
256254
let should = !matches!(msr, MSR_IA32_FEATURE_CONTROL | MSR_IA32_MCG_CTL);
257255
assert_eq!(msr_should_serialize(msr), should);

‎src/net_gen/src/iff.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,7 @@ impl Clone for fr_proto_pvc {
26232623
#[derive(Debug, Default, Copy)]
26242624
pub struct fr_proto_pvc_info {
26252625
pub dlci: ::std::os::raw::c_uint,
2626+
// TODO: rename this field to adopt inclusive language once Linux updates it, too.
26262627
pub master: [::std::os::raw::c_char; 16usize],
26272628
}
26282629
#[test]
@@ -2717,7 +2718,9 @@ pub const net_device_flags_IFF_RUNNING: net_device_flags = 64;
27172718
pub const net_device_flags_IFF_NOARP: net_device_flags = 128;
27182719
pub const net_device_flags_IFF_PROMISC: net_device_flags = 256;
27192720
pub const net_device_flags_IFF_ALLMULTI: net_device_flags = 512;
2721+
// TODO: rename this constant to adopt inclusive language once Linux updates it, too.
27202722
pub const net_device_flags_IFF_MASTER: net_device_flags = 1024;
2723+
// TODO: rename this constant to adopt inclusive language once Linux updates it, too.
27212724
pub const net_device_flags_IFF_SLAVE: net_device_flags = 2048;
27222725
pub const net_device_flags_IFF_MULTICAST: net_device_flags = 4096;
27232726
pub const net_device_flags_IFF_PORTSEL: net_device_flags = 8192;
@@ -3070,6 +3073,7 @@ pub struct ifreq__bindgen_ty_2 {
30703073
pub ifru_ivalue: __BindgenUnionField<::std::os::raw::c_int>,
30713074
pub ifru_mtu: __BindgenUnionField<::std::os::raw::c_int>,
30723075
pub ifru_map: __BindgenUnionField<ifmap>,
3076+
// TODO: rename this field to adopt inclusive language once Linux updates it, too.
30733077
pub ifru_slave: __BindgenUnionField<[::std::os::raw::c_char; 16usize]>,
30743078
pub ifru_newname: __BindgenUnionField<[::std::os::raw::c_char; 16usize]>,
30753079
pub ifru_data: __BindgenUnionField<*mut ::std::os::raw::c_void>,

‎src/vmm/src/default_syscalls/filters.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use seccomp::{
99
};
1010
use utils::signal::sigrtmin;
1111

12-
/// The default filter containing the white listed syscall rules required by `Firecracker` to
12+
/// The default filter containing the allowed syscall rules required by `Firecracker` to
1313
/// function.
1414
/// Any non-trivial modification to this allow list needs a proper comment to specify its source
1515
/// or why the sycall/condition is needed.

‎src/vmm/src/utilities/mock_seccomp/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl MockSeccomp {
292292
)
293293
}
294294

295-
/// Blacklist KVM_RUN.
295+
/// Deny KVM_RUN.
296296
pub fn without_kvm_run(mut self) -> Self {
297297
self.rules
298298
.insert(libc::SYS_ioctl, Self::ioctl_rule_without_kvm_run().1);

‎src/vmm/src/vstate/vm.rs

+2
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,9 @@ impl Vm {
320320
pub struct VmState {
321321
pitstate: kvm_pit_state2,
322322
clock: kvm_clock_data,
323+
// TODO: rename this field to adopt inclusive language once Linux updates it, too.
323324
pic_master: kvm_irqchip,
325+
// TODO: rename this field to adopt inclusive language once Linux updates it, too.
324326
pic_slave: kvm_irqchip,
325327
ioapic: kvm_irqchip,
326328
}

‎src/vmm/tests/integration_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ fn test_vmm_seccomp() {
9898
.into();
9999
let mut event_manager = EventManager::new().unwrap();
100100

101-
// The customer "forgot" to whitelist the KVM_RUN ioctl.
101+
// The customer "forgot" to allow the KVM_RUN ioctl.
102102
let filter: BpfProgram = MockSeccomp::new().without_kvm_run().into();
103103
let vmm = build_microvm_for_boot(&resources, &mut event_manager, &filter).unwrap();
104104
// Give the vCPUs a chance to attempt KVM_RUN.

‎tests/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ def bin_seccomp_paths(test_fc_session_root_path):
309309
310310
They currently consist of:
311311
312-
* a jailer with a simple syscall whitelist;
313-
* a jailer with a (syscall, arguments) advanced whitelist;
312+
* a jailer with a simple syscall allow list;
313+
* a jailer with a (syscall, arguments) advanced allow list;
314314
* a jailed binary that follows the seccomp rules;
315315
* a jailed binary that breaks the seccomp rules.
316316
"""

‎tests/integration_tests/security/test_seccomp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
3-
"""Tests that the seccomp filters don't let blacklisted syscalls through."""
3+
"""Tests that the seccomp filters don't let denied syscalls through."""
44

55
import os
66

77
import framework.utils as utils
88

99

1010
def test_seccomp_ls(bin_seccomp_paths):
11-
"""Assert that the seccomp filters deny a blacklisted syscall."""
11+
"""Assert that the seccomp filters refuse a denied syscall."""
1212
# pylint: disable=redefined-outer-name
1313
# pylint: disable=subprocess-run-check
1414
# The fixture pattern causes a pylint false positive for that rule.

‎tests/integration_tests/style/test_gitlint.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def test_gitlint():
1111
os.environ['LC_ALL'] = 'C.UTF-8'
1212
os.environ['LANG'] = 'C.UTF-8'
1313
try:
14+
# TODO: update this line once the master branch is renamed
1415
utils.run_cmd('gitlint --commits origin/master..HEAD'
1516
' -C ../.gitlint'
1617
' --extra-path framework/gitlint_rules.py')

0 commit comments

Comments
 (0)
Please sign in to comment.