Skip to contentSkip to conversation

misc: Replace the words 'blacklist/whitelist'

PATCH Superseded Philippe Mathieu-Daudé 13 participants 42 messages Feb 2, 2021 – Jul 18, 2022

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover misc: Replace the words 'blacklist/whitelist'

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "blacklist" and "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

Philippe Mathieu-Daudé (12):
ui: Replace the word 'whitelist'
qga: Rename config key 'blacklist' as 'denylist'
qga: Replace '--blacklist' command line option by '--denylist'
qga: Replace the word 'blacklist'
tools/virtiofsd: Replace the word 'whitelist' scripts/tracetool: Replace the word 'whitelist' scripts/device-crash-test: Replace the word 'whitelist'
seccomp: Replace the word 'blacklist'
qemu-options: Replace the word 'blacklist' tests/qemu-iotests: Replace the words 'blacklist/whitelist' tests/fp/fp-test: Replace the word 'blacklist' hw/vfio/pci-quirks: Replace the word 'blacklist'

 docs/interop/qemu-ga.rst              |  4 +-
 hw/vfio/pci.h                         |  2 +-
 qga/guest-agent-core.h                |  2 +-
 hw/vfio/pci-quirks.c                  | 14 ++---
 hw/vfio/pci.c                         |  4 +-
 qga/commands-posix.c                  | 14 ++---
 qga/commands-win32.c                  | 10 ++--
 qga/main.c                            | 78 +++++++++++++++------------
 softmmu/qemu-seccomp.c                | 16 +++---
 tests/fp/fp-test.c                    |  8 +--
 tests/test-qga.c                      |  8 +--
 tools/virtiofsd/passthrough_ll.c      |  6 +--
 tools/virtiofsd/passthrough_seccomp.c | 12 ++---
 ui/console.c                          |  2 +-
 ui/vnc-auth-sasl.c                    |  4 +-
 hw/vfio/trace-events                  |  2 +-
 qemu-options.hx                       |  4 +-
 scripts/device-crash-test             | 30 +++++------
 scripts/tracetool/__init__.py         |  2 +-
 tests/data/test-qga-config            |  2 +-
 tests/qemu-iotests/149                | 14 ++---
 tests/qemu-iotests/149.out            |  8 +--
 22 files changed, 128 insertions(+), 118 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/12 ui: Replace the word 'whitelist'

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 ui/console.c       | 2 +-
 ui/vnc-auth-sasl.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
ui/console.c +1 -1
index d80ce7037c3..9e13bf9020f 100644
@@ -1661,7 +1661,7 @@ bool dpy_gfx_check_format(QemuConsole *con,
                 return false;
             }
         } else {
-            /* default is to whitelist native 32 bpp only */
+            /* default is to allow native 32 bpp only */
             if (format != qemu_default_pixman_format(32, true)) {
                 return false;
             }
ui/vnc-auth-sasl.c +2 -2
index f67111a3662..dde4b8d4144 100644
@@ -288,7 +288,7 @@ static int protocol_client_auth_sasl_step(VncState *vs, uint8_t *data, size_t le
             goto authreject;
         }
 
-        /* Check username whitelist ACL */
+        /* Check username allowlist ACL */
         if (vnc_auth_sasl_check_access(vs) < 0) {
             goto authreject;
         }
@@ -409,7 +409,7 @@ static int protocol_client_auth_sasl_start(VncState *vs, uint8_t *data, size_t l
             goto authreject;
         }
 
-        /* Check username whitelist ACL */
+        /* Check username allowlist ACL */
         if (vnc_auth_sasl_check_access(vs) < 0) {
             goto authreject;
         }
Signature · 1 line
2.26.2
#3 lore raw

Re: [PATCH 01/12] ui: Replace the word 'whitelist'

In reply to Philippe Mathieu-Daudé
Quoted 30 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 ui/console.c       | 2 +-
 ui/vnc-auth-sasl.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
ui/console.c +1 -1
index d80ce7037c3..9e13bf9020f 100644
@@ -1661,7 +1661,7 @@ bool dpy_gfx_check_format(QemuConsole *con,
                 return false;
             }
         } else {
-            /* default is to whitelist native 32 bpp only */
+            /* default is to allow native 32 bpp only */
             if (format != qemu_default_pixman_format(32, true)) {
                 return false;
             }
ui/vnc-auth-sasl.c +0 -0
index f67111a3662..dde4b8d4144 100644

ui/vnc-auth-sasl.c static int protocol_client_auth_sasl_step(VncState *vs, uint8_t *data, size_t le · line 291

Quoted 5 lines
ui/vnc-auth-sasl.c +1 -1
@@ -288,7 +288,7 @@ static int protocol_client_auth_sasl_step(VncState *vs, uint8_t *data, size_t le
             goto authreject;
         }
 
-        /* Check username whitelist ACL */
+        /* Check username allowlist ACL */

ACL expands to "access control list" so this original comment was already redundant, and so is the replacement. Using acronyms is bad practice, so I'd suggest we go for

"Check the username access control list"

ui/vnc-auth-sasl.c static int protocol_client_auth_sasl_start(VncState *vs, uint8_t *data, size_t l · line 412

Quoted 9 lines
ui/vnc-auth-sasl.c +1 -1
         if (vnc_auth_sasl_check_access(vs) < 0) {
             goto authreject;
         }
@@ -409,7 +409,7 @@ static int protocol_client_auth_sasl_start(VncState *vs, uint8_t *data, size_t l
             goto authreject;
         }
 
-        /* Check username whitelist ACL */
+        /* Check username allowlist ACL */

Likewise

ui/vnc-auth-sasl.c static int protocol_client_auth_sasl_step(VncState *vs, uint8_t *data, size_t le · line 294

Quoted 3 lines
ui/vnc-auth-sasl.c +0 -0
         if (vnc_auth_sasl_check_access(vs) < 0) {
             goto authreject;
         }

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#4 lore raw

Re: [PATCH 01/12] ui: Replace the word 'whitelist'

Quoted 22 lines · Daniel P. Berrangé
Quoted 21 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 ui/console.c       | 2 +-
 ui/vnc-auth-sasl.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
ui/vnc-auth-sasl.c +0 -0
index f67111a3662..dde4b8d4144 100644
@@ -288,7 +288,7 @@ static int protocol_client_auth_sasl_step(VncState *vs, uint8_t *data, size_t le
             goto authreject;
         }
 
Quoted 8 lines

ui/vnc-auth-sasl.c static int protocol_client_auth_sasl_step(VncState *vs, uint8_t *data, size_t le · line 291

Quoted 2 lines
ui/vnc-auth-sasl.c +1 -1
-        /* Check username whitelist ACL */
+        /* Check username allowlist ACL */

ACL expands to "access control list" so this original comment was already redundant, and so is the replacement. Using acronyms is bad practice, so I'd suggest we go for

"Check the username access control list"

OK will do, thanks.

#5 lore raw

PATCH 2/12 qga: Rename config key 'blacklist' as 'denylist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 docs/interop/qemu-ga.rst   |  2 +-
 qga/main.c                 | 15 +++++++++++----
 tests/test-qga.c           |  8 ++++----
 tests/data/test-qga-config |  2 +-
 4 files changed, 17 insertions(+), 10 deletions(-)
docs/interop/qemu-ga.rst +1 -1
index 3063357bb5d..9a590bf95cb 100644
@@ -125,7 +125,7 @@ pidfile        string
 fsfreeze-hook  string
 statedir       string
 verbose        boolean
-blacklist      string list
+denylist       string list
 =============  ===========
 
 See also
qga/main.c +11 -4
index e7f8f3b1616..249fe06e8e5 100644
@@ -962,6 +962,7 @@ static void config_load(GAConfig *config)
     GError *gerr = NULL;
     GKeyFile *keyfile;
     g_autofree char *conf = g_strdup(g_getenv("QGA_CONF")) ?: get_relocated_path(QGA_CONF_DEFAULT);
+    const gchar *denylist_key = "denylist";
 
     /* read system config */
     keyfile = g_key_file_new();
@@ -1008,10 +1009,16 @@ static void config_load(GAConfig *config)
         config->retry_path =
             g_key_file_get_boolean(keyfile, "general", "retry-path", &gerr);
     }
+
     if (g_key_file_has_key(keyfile, "general", "blacklist", NULL)) {
+        g_warning("config using deprecated 'blacklist' key, now replaced"
+                  " by the 'denylist' key.");
+        denylist_key = "blacklist";
+    }
+    if (g_key_file_has_key(keyfile, "general", denylist_key, NULL)) {
         config->bliststr =
-            g_key_file_get_string(keyfile, "general", "blacklist", &gerr);
-        config->blacklist = g_list_concat(config->blacklist,
+            g_key_file_get_string(keyfile, "general", denylist_key, &gerr);
+        config->denylist = g_list_concat(config->denylist,
                                           split_list(config->bliststr, ","));
     }
 
@@ -1071,8 +1078,8 @@ static void config_dump(GAConfig *config)
                            config->log_level == G_LOG_LEVEL_MASK);
     g_key_file_set_boolean(keyfile, "general", "retry-path",
                            config->retry_path);
-    tmp = list_join(config->blacklist, ',');
-    g_key_file_set_string(keyfile, "general", "blacklist", tmp);
+    tmp = list_join(config->denylist, ',');
+    g_key_file_set_string(keyfile, "general", "denylist", tmp);
     g_free(tmp);
 
     tmp = g_key_file_to_data(keyfile, NULL, &error);
tests/test-qga.c +4 -4
index eb33264e8ed..c2836244b04 100644
@@ -655,7 +655,7 @@ static void test_qga_get_time(gconstpointer fix)
     qobject_unref(ret);
 }
 
-static void test_qga_blacklist(gconstpointer data)
+static void test_qga_denylist(gconstpointer data)
 {
     TestFixture fix;
     QDict *ret, *error;
@@ -663,7 +663,7 @@ static void test_qga_blacklist(gconstpointer data)
 
     fixture_setup(&fix, "-b guest-ping,guest-get-time", NULL);
 
-    /* check blacklist */
+    /* check denylist */
     ret = qmp_fd(fix.fd, "{'execute': 'guest-ping'}");
     g_assert_nonnull(ret);
     error = qdict_get_qdict(ret, "error");
@@ -752,7 +752,7 @@ static void test_qga_config(gconstpointer data)
     g_assert_true(g_key_file_get_boolean(kf, "general", "verbose", &error));
     g_assert_no_error(error);
 
-    strv = g_key_file_get_string_list(kf, "general", "blacklist", &n, &error);
+    strv = g_key_file_get_string_list(kf, "general", "denylist", &n, &error);
     g_assert_cmpint(n, ==, 2);
     g_assert_true(g_strv_contains((const char * const *)strv,
                                   "guest-ping"));
@@ -997,7 +997,7 @@ int main(int argc, char **argv)
     g_test_add_data_func("/qga/fsfreeze-status", &fix,
                          test_qga_fsfreeze_status);
 
-    g_test_add_data_func("/qga/blacklist", NULL, test_qga_blacklist);
+    g_test_add_data_func("/qga/denylist", NULL, test_qga_denylist);
     g_test_add_data_func("/qga/config", NULL, test_qga_config);
     g_test_add_data_func("/qga/guest-exec", &fix, test_qga_guest_exec);
     g_test_add_data_func("/qga/guest-exec-invalid", &fix,
tests/data/test-qga-config +1 -1
index 4bb721a4a18..d9ddc1a4d96 100644
@@ -5,4 +5,4 @@ path=/path/to/org.qemu.guest_agent.0
 pidfile=/var/foo/qemu-ga.pid
 statedir=/var/state
 verbose=true
-blacklist=guest-ping;guest-get-time
+denylist=guest-ping;guest-get-time
Signature · 1 line
2.26.2
Reviewed-by on v1 2/12
#6 lore raw

Re: [PATCH 02/12] qga: Rename config key 'blacklist' as 'denylist'

Quoted 6 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

Quoted 7 lines
---
 docs/interop/qemu-ga.rst   |  2 +-
 qga/main.c                 | 15 +++++++++++----
 tests/test-qga.c           |  8 ++++----
 tests/data/test-qga-config |  2 +-
 4 files changed, 17 insertions(+), 10 deletions(-)
Quoted 27 lines
docs/interop/qemu-ga.rst +1 -1
index 3063357bb5d..9a590bf95cb 100644
@@ -125,7 +125,7 @@ pidfile        string
 fsfreeze-hook  string
 statedir       string
 verbose        boolean
-blacklist      string list
+denylist       string list
 =============  ===========
 
 See also
qga/main.c +1 -0
index e7f8f3b1616..249fe06e8e5 100644
@@ -962,6 +962,7 @@ static void config_load(GAConfig *config)
     GError *gerr = NULL;
     GKeyFile *keyfile;
     g_autofree char *conf = g_strdup(g_getenv("QGA_CONF")) ?: get_relocated_path(QGA_CONF_DEFAULT);
+    const gchar *denylist_key = "denylist";
 
     /* read system config */
     keyfile = g_key_file_new();

qga/main.c static void config_load(GAConfig *config) · line 1015

Quoted 7 lines
qga/main.c +3 -0
@@ -1008,10 +1009,16 @@ static void config_load(GAConfig *config)
         config->retry_path =
             g_key_file_get_boolean(keyfile, "general", "retry-path", &gerr);
     }
+
     if (g_key_file_has_key(keyfile, "general", "blacklist", NULL)) {
+        g_warning("config using deprecated 'blacklist' key, now replaced"
+                  " by the 'denylist' key.");

We should document the config file option deprecation in the norma place for deprecations.

qga/main.c static void config_load(GAConfig *config) · line 1017

Quoted 2 lines
qga/main.c +2 -0
+        denylist_key = "blacklist";
+    }

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#7 lore raw

Re: [PATCH 02/12] qga: Rename config key 'blacklist' as 'denylist'

In reply to Philippe Mathieu-Daudé

Hello,

Quoted 19 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 docs/interop/qemu-ga.rst   |  2 +-
 qga/main.c                 | 15 +++++++++++----
 tests/test-qga.c           |  8 ++++----
 tests/data/test-qga-config |  2 +-
 4 files changed, 17 insertions(+), 10 deletions(-)
docs/interop/qemu-ga.rst +0 -0
index 3063357bb5d..9a590bf95cb 100644

docs/interop/qemu-ga.rst pidfile string · line 129

Quoted 6 lines
docs/interop/qemu-ga.rst +1 -1
@@ -125,7 +125,7 @@ pidfile        string
 fsfreeze-hook  string
 statedir       string
 verbose        boolean
-blacklist      string list
+denylist       string list
 =============  ===========

this changes the config option but not the commandline option creating disconnect between commanndline and config:

docs/interop/qemu-ga.rst:.. option:: -b, --blacklist=LIST
docs/interop/qemu-ga.rst:blacklist string list

When making these 'inclusive' changes at least make sure you don't break the software in question.

A simple grep would have told you.

Thanks

Michal

#8 lore raw

Re: [PATCH 02/12] qga: Rename config key 'blacklist' as 'denylist'

Quoted 32 lines · Michal Suchánek

Hello,

Quoted 19 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 docs/interop/qemu-ga.rst   |  2 +-
 qga/main.c                 | 15 +++++++++++----
 tests/test-qga.c           |  8 ++++----
 tests/data/test-qga-config |  2 +-
 4 files changed, 17 insertions(+), 10 deletions(-)
docs/interop/qemu-ga.rst +0 -0
index 3063357bb5d..9a590bf95cb 100644

docs/interop/qemu-ga.rst pidfile string · line 129

Quoted 6 lines
docs/interop/qemu-ga.rst +1 -1
@@ -125,7 +125,7 @@ pidfile        string
 fsfreeze-hook  string
 statedir       string
 verbose        boolean
-blacklist      string list
+denylist       string list
 =============  ===========

this changes the config option but not the commandline option creating disconnect between commanndline and config:

Quoted 2 lines

docs/interop/qemu-ga.rst:.. option:: -b, --blacklist=LIST
docs/interop/qemu-ga.rst:blacklist string list

Now I see it's addressed in patch 3 but with the patches arriving out of order I have missed that. Maybe merging these two might make more sense.

Thanks

Michal

#9 lore raw

PATCH 3/12 qga: Replace '--blacklist' command line option by '--denylist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

Keep the --blacklist available for backward compatibility.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 docs/interop/qemu-ga.rst | 2 +-
 qga/main.c               | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
docs/interop/qemu-ga.rst +1 -1
index 9a590bf95cb..89596e646de 100644
@@ -79,7 +79,7 @@ Options
 
   Daemonize after startup (detach from terminal).
 
-.. option:: -b, --blacklist=LIST
+.. option:: -b, --denylist=LIST
 
   Comma-separated list of RPCs to disable (no spaces, ``?`` to list
   available RPCs).
qga/main.c +4 -2
index 249fe06e8e5..66177b9e93d 100644
@@ -257,7 +257,8 @@ QEMU_COPYRIGHT "\n"
 #ifdef _WIN32
 "  -s, --service     service commands: install, uninstall, vss-install, vss-uninstall\n"
 #endif
-"  -b, --blacklist   comma-separated list of RPCs to disable (no spaces, \"?\"\n"
+"  --blacklist       backward compatible alias for --denylist (deprecated)\n"
+"  -b, --denylist    comma-separated list of RPCs to disable (no spaces, \"?\"\n"
 "                    to list available RPCs)\n"
 "  -D, --dump-conf   dump a qemu-ga config file based on current config\n"
 "                    options / command-line parameters to stdout\n"
@@ -1111,7 +1112,8 @@ static void config_parse(GAConfig *config, int argc, char **argv)
         { "method", 1, NULL, 'm' },
         { "path", 1, NULL, 'p' },
         { "daemonize", 0, NULL, 'd' },
-        { "blacklist", 1, NULL, 'b' },
+        { "denylist", 1, NULL, 'b' },
+        { "blacklist", 1, NULL, 'b' }, /* deprecated alias for 'denylist' */
 #ifdef _WIN32
         { "service", 1, NULL, 's' },
 #endif
Signature · 1 line
2.26.2
#10 lore raw

Re: [PATCH 03/12] qga: Replace '--blacklist' command line option by '--denylist'

Quoted 32 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

Keep the --blacklist available for backward compatibility.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 docs/interop/qemu-ga.rst | 2 +-
 qga/main.c               | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
docs/interop/qemu-ga.rst +1 -1
index 9a590bf95cb..89596e646de 100644
@@ -79,7 +79,7 @@ Options
 
   Daemonize after startup (detach from terminal).
 
-.. option:: -b, --blacklist=LIST
+.. option:: -b, --denylist=LIST
 
   Comma-separated list of RPCs to disable (no spaces, ``?`` to list
   available RPCs).
qga/main.c +0 -0
index 249fe06e8e5..66177b9e93d 100644

qga/main.c QEMU_COPYRIGHT "\n" · line 261

Quoted 6 lines
qga/main.c +2 -1
@@ -257,7 +257,8 @@ QEMU_COPYRIGHT "\n"
 #ifdef _WIN32
 "  -s, --service     service commands: install, uninstall, vss-install, vss-uninstall\n"
 #endif
-"  -b, --blacklist   comma-separated list of RPCs to disable (no spaces, \"?\"\n"
+"  --blacklist       backward compatible alias for --denylist (deprecated)\n"
+"  -b, --denylist    comma-separated list of RPCs to disable (no spaces, \"?\"\n"

"-b" is a bit odd as a short name now, but i guess that's not the end of the world.

The deprecation should be documented though. Ideally we would report a warning if the deprecated long arg was used too.

Quoted 17 lines
qga/main.c +2 -1
 "                    to list available RPCs)\n"
 "  -D, --dump-conf   dump a qemu-ga config file based on current config\n"
 "                    options / command-line parameters to stdout\n"
@@ -1111,7 +1112,8 @@ static void config_parse(GAConfig *config, int argc, char **argv)
         { "method", 1, NULL, 'm' },
         { "path", 1, NULL, 'p' },
         { "daemonize", 0, NULL, 'd' },
-        { "blacklist", 1, NULL, 'b' },
+        { "denylist", 1, NULL, 'b' },
+        { "blacklist", 1, NULL, 'b' }, /* deprecated alias for 'denylist' */
 #ifdef _WIN32
         { "service", 1, NULL, 's' },
 #endif
Signature · 1 line
2.26.2

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#11 lore raw

Re: [PATCH 03/12] qga: Replace '--blacklist' command line option by '--denylist'

Quoted 35 lines · Daniel P. Berrangé
Quoted 34 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

Keep the --blacklist available for backward compatibility.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 docs/interop/qemu-ga.rst | 2 +-
 qga/main.c               | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
docs/interop/qemu-ga.rst +1 -1
index 9a590bf95cb..89596e646de 100644
@@ -79,7 +79,7 @@ Options
 
   Daemonize after startup (detach from terminal).
 
-.. option:: -b, --blacklist=LIST
+.. option:: -b, --denylist=LIST
 
   Comma-separated list of RPCs to disable (no spaces, ``?`` to list
   available RPCs).
qga/main.c +0 -0
index 249fe06e8e5..66177b9e93d 100644
@@ -257,7 +257,8 @@ QEMU_COPYRIGHT "\n"
 #ifdef _WIN32
 "  -s, --service     service commands: install, uninstall, vss-install, vss-uninstall\n"
Quoted 8 lines

qga/main.c QEMU_COPYRIGHT "\n" · line 261

Quoted 4 lines
qga/main.c +2 -1
 #endif
-"  -b, --blacklist   comma-separated list of RPCs to disable (no spaces, \"?\"\n"
+"  --blacklist       backward compatible alias for --denylist (deprecated)\n"
+"  -b, --denylist    comma-separated list of RPCs to disable (no spaces, \"?\"\n"

"-b" is a bit odd as a short name now, but i guess that's not the end of the world.

Maybe -b, --block or --block-rpc? Not the best but at least preserves consistency with the short option.

Regards,
BALATON Zoltan

Quoted 24 lines

The deprecation should be documented though. Ideally we would report a warning if the deprecated long arg was used too.

Quoted 14 lines
qga/main.c +2 -2
 "                    to list available RPCs)\n"
 "  -D, --dump-conf   dump a qemu-ga config file based on current config\n"
 "                    options / command-line parameters to stdout\n"
@@ -1111,7 +1112,8 @@ static void config_parse(GAConfig *config, int argc, char **argv)
         { "method", 1, NULL, 'm' },
         { "path", 1, NULL, 'p' },
         { "daemonize", 0, NULL, 'd' },
-        { "blacklist", 1, NULL, 'b' },
+        { "denylist", 1, NULL, 'b' },
+        { "blacklist", 1, NULL, 'b' }, /* deprecated alias for 'denylist' */
 #ifdef _WIN32
         { "service", 1, NULL, 's' },
 #endif
--
Quoted 3 lines

2.26.2

Regards,
Daniel

#12 lore raw

Re: [PATCH 03/12] qga: Replace '--blacklist' command line option by '--denylist'

Am 03.02.2021 um 13:45 hat BALATON Zoltan geschrieben:

Quoted 45 lines · Daniel P. Berrangé
Quoted 35 lines · Philippe Mathieu-Daudé
Quoted 34 lines

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

Keep the --blacklist available for backward compatibility.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 docs/interop/qemu-ga.rst | 2 +-
 qga/main.c               | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
docs/interop/qemu-ga.rst +1 -1
index 9a590bf95cb..89596e646de 100644
@@ -79,7 +79,7 @@ Options
 
   Daemonize after startup (detach from terminal).
 
-.. option:: -b, --blacklist=LIST
+.. option:: -b, --denylist=LIST
 
   Comma-separated list of RPCs to disable (no spaces, ``?`` to list
   available RPCs).
qga/main.c +0 -0
index 249fe06e8e5..66177b9e93d 100644
@@ -257,7 +257,8 @@ QEMU_COPYRIGHT "\n"
 #ifdef _WIN32
 "  -s, --service     service commands: install, uninstall, vss-install, vss-uninstall\n"
Quoted 8 lines

qga/main.c QEMU_COPYRIGHT "\n" · line 261

Quoted 4 lines
qga/main.c +2 -1
 #endif
-"  -b, --blacklist   comma-separated list of RPCs to disable (no spaces, \"?\"\n"
+"  --blacklist       backward compatible alias for --denylist (deprecated)\n"
+"  -b, --denylist    comma-separated list of RPCs to disable (no spaces, \"?\"\n"

"-b" is a bit odd as a short name now, but i guess that's not the end of the world.

Quoted 2 lines

Maybe -b, --block or --block-rpc? Not the best but at least preserves consistency with the short option.

I was thinking about something like --blocked-rpcs, too, so +1 from me for your latter option.

If we're touching these names, let's try to actually make them good, not just different. Neither --blacklist nor --denylist actually describe well what the option does.

Kevin

#13 lore raw

Re: [PATCH 03/12] qga: Replace '--blacklist' command line option by '--denylist'

Quoted 49 lines · Kevin Wolf

Am 03.02.2021 um 13:45 hat BALATON Zoltan geschrieben:

Quoted 45 lines · Daniel P. Berrangé
Quoted 35 lines · Philippe Mathieu-Daudé
Quoted 34 lines

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

Keep the --blacklist available for backward compatibility.

[*] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fconscious-lang%2Fconscious-lang-docs%2Fblob%2Fmain%2Ffaq.md&amp;data=04%7C01%7Cmichael.roth%40amd.com%7Cd17bb9d899914df4e04108d8c85b068f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637479640585250068%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=HM%2Fg%2B79VIjp%2BR9bIVBDPkYHHbFa9C3sGMvhomxhJdgE%3D&amp;reserved=0

---
 docs/interop/qemu-ga.rst | 2 +-
 qga/main.c               | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
docs/interop/qemu-ga.rst +1 -1
index 9a590bf95cb..89596e646de 100644
@@ -79,7 +79,7 @@ Options
 
   Daemonize after startup (detach from terminal).
 
-.. option:: -b, --blacklist=LIST
+.. option:: -b, --denylist=LIST
 
   Comma-separated list of RPCs to disable (no spaces, ``?`` to list
   available RPCs).
qga/main.c +0 -0
index 249fe06e8e5..66177b9e93d 100644
@@ -257,7 +257,8 @@ QEMU_COPYRIGHT "\n"
 #ifdef _WIN32
 "  -s, --service     service commands: install, uninstall, vss-install, vss-uninstall\n"
Quoted 8 lines

qga/main.c QEMU_COPYRIGHT "\n" · line 261

Quoted 4 lines
qga/main.c +2 -1
 #endif
-"  -b, --blacklist   comma-separated list of RPCs to disable (no spaces, \"?\"\n"
+"  --blacklist       backward compatible alias for --denylist (deprecated)\n"
+"  -b, --denylist    comma-separated list of RPCs to disable (no spaces, \"?\"\n"

"-b" is a bit odd as a short name now, but i guess that's not the end of the world.

Quoted 2 lines

Maybe -b, --block or --block-rpc? Not the best but at least preserves consistency with the short option.

Quoted 6 lines

I was thinking about something like --blocked-rpcs, too, so +1 from me for your latter option.

If we're touching these names, let's try to actually make them good, not just different. Neither --blacklist nor --denylist actually describe well what the option does.

+1 on --blocked-rpcs

Quoted 3 lines

Kevin

#14 lore raw

Re: [PATCH 03/12] qga: Replace '--blacklist' command line option by '--denylist'

Quoted 50 lines · Michael Roth
Quoted 49 lines · Kevin Wolf

Am 03.02.2021 um 13:45 hat BALATON Zoltan geschrieben:

Quoted 47 lines · Daniel P. Berrangé
Quoted 35 lines · Philippe Mathieu-Daudé
Quoted 34 lines

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

Keep the --blacklist available for backward compatibility.

[*] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fconscious-lang%2Fconscious-lang-docs%2Fblob%2Fmain%2Ffaq.md&amp;data=04%7C01%7Cmichael.roth%40amd.com%7Cd17bb9d899914df4e04108d8c85b068f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637479640585250068%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=HM%2Fg%2B79VIjp%2BR9bIVBDPkYHHbFa9C3sGMvhomxhJdgE%3D&amp;reserved=0

---
  docs/interop/qemu-ga.rst | 2 +-
  qga/main.c               | 6 ++++--
  2 files changed, 5 insertions(+), 3 deletions(-)
docs/interop/qemu-ga.rst +1 -1
index 9a590bf95cb..89596e646de 100644
@@ -79,7 +79,7 @@ Options
 
    Daemonize after startup (detach from terminal).
 
-.. option:: -b, --blacklist=LIST
+.. option:: -b, --denylist=LIST
 
    Comma-separated list of RPCs to disable (no spaces, ``?`` to list
    available RPCs).
qga/main.c +0 -0
index 249fe06e8e5..66177b9e93d 100644
@@ -257,7 +257,8 @@ QEMU_COPYRIGHT "\n"
  #ifdef _WIN32
  "  -s, --service     service commands: install, uninstall, vss-install, vss-uninstall\n"
Quoted 8 lines

qga/main.c QEMU_COPYRIGHT "\n" · line 261

Quoted 4 lines
qga/main.c +2 -1
  #endif
-"  -b, --blacklist   comma-separated list of RPCs to disable (no spaces, \"?\"\n"
+"  --blacklist       backward compatible alias for --denylist (deprecated)\n"
+"  -b, --denylist    comma-separated list of RPCs to disable (no spaces, \"?\"\n"

"-b" is a bit odd as a short name now, but i guess that's not the end of the world.

Maybe -b, --block or --block-rpc? Not the best but at least preserves consistency with the short option.

Quoted 8 lines
Quoted 6 lines

I was thinking about something like --blocked-rpcs, too, so +1 from me for your latter option.

If we're touching these names, let's try to actually make them good, not just different. Neither --blacklist nor --denylist actually describe well what the option does.

+1 on --blocked-rpcs

Looks like there was never a follow up on this patch? Philippe, could you maybe respin with the suggested changes?

Thomas

#15 lore raw

PATCH 4/12 qga: Replace the word 'blacklist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 qga/guest-agent-core.h |  2 +-
 qga/commands-posix.c   | 14 +++++------
 qga/commands-win32.c   | 10 ++++----
 qga/main.c             | 57 +++++++++++++++++++++---------------------
 4 files changed, 42 insertions(+), 41 deletions(-)
qga/guest-agent-core.h +1 -1
index 9d01ea9c82a..90ce6a91a0a 100644
@@ -24,7 +24,7 @@ typedef struct GACommandState GACommandState;
 extern GAState *ga_state;
 extern QmpCommandList ga_commands;
 
-GList *ga_command_blacklist_init(GList *blacklist);
+GList *ga_command_denylist_init(GList *denylist);
 void ga_command_state_init(GAState *s, GACommandState *cs);
 void ga_command_state_add(GACommandState *cs,
                           void (*init)(void),
qga/commands-posix.c +7 -7
index 8dd94a33144..a23f11d9d20 100644
@@ -3071,8 +3071,8 @@ qmp_guest_fstrim(bool has_minimum, int64_t minimum, Error **errp)
 }
 #endif
 
-/* add unsupported commands to the blacklist */
-GList *ga_command_blacklist_init(GList *blacklist)
+/* add unsupported commands to the denylist */
+GList *ga_command_denylist_init(GList *denylist)
 {
 #if !defined(__linux__)
     {
@@ -3086,7 +3086,7 @@ GList *ga_command_blacklist_init(GList *blacklist)
         char **p = (char **)list;
 
         while (*p) {
-            blacklist = g_list_append(blacklist, g_strdup(*p++));
+            denylist = g_list_append(denylist, g_strdup(*p++));
         }
     }
 #endif
@@ -3101,18 +3101,18 @@ GList *ga_command_blacklist_init(GList *blacklist)
         char **p = (char **)list;
 
         while (*p) {
-            blacklist = g_list_append(blacklist, g_strdup(*p++));
+            denylist = g_list_append(denylist, g_strdup(*p++));
         }
     }
 #endif
 
 #if !defined(CONFIG_FSTRIM)
-    blacklist = g_list_append(blacklist, g_strdup("guest-fstrim"));
+    denylist = g_list_append(denylist, g_strdup("guest-fstrim"));
 #endif
 
-    blacklist = g_list_append(blacklist, g_strdup("guest-get-devices"));
+    denylist = g_list_append(denylist, g_strdup("guest-get-devices"));
 
-    return blacklist;
+    return denylist;
 }
 
 /* register init/cleanup routines for stateful command groups */
qga/commands-win32.c +5 -5
index a00e6cb1655..f7a1644a423 100644
@@ -2004,8 +2004,8 @@ GuestMemoryBlockInfo *qmp_guest_get_memory_block_info(Error **errp)
     return NULL;
 }
 
-/* add unsupported commands to the blacklist */
-GList *ga_command_blacklist_init(GList *blacklist)
+/* add unsupported commands to the denylist */
+GList *ga_command_denylist_init(GList *denylist)
 {
     const char *list_unsupported[] = {
         "guest-suspend-hybrid",
@@ -2016,7 +2016,7 @@ GList *ga_command_blacklist_init(GList *blacklist)
     char **p = (char **)list_unsupported;
 
     while (*p) {
-        blacklist = g_list_append(blacklist, g_strdup(*p++));
+        denylist = g_list_append(denylist, g_strdup(*p++));
     }
 
     if (!vss_init(true)) {
@@ -2027,11 +2027,11 @@ GList *ga_command_blacklist_init(GList *blacklist)
         p = (char **)list;
 
         while (*p) {
-            blacklist = g_list_append(blacklist, g_strdup(*p++));
+            denylist = g_list_append(denylist, g_strdup(*p++));
         }
     }
 
-    return blacklist;
+    return denylist;
 }
 
 /* register init/cleanup routines for stateful command groups */
qga/main.c +29 -28

138 lines not on this page · raw message

Signature · 1 line
2.26.2
Reviewed-by on v1 4/12
#16 lore raw

Re: [PATCH 04/12] qga: Replace the word 'blacklist'

Quoted 6 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

Quoted 7 lines
---
 qga/guest-agent-core.h |  2 +-
 qga/commands-posix.c   | 14 +++++------
 qga/commands-win32.c   | 10 ++++----
 qga/main.c             | 57 +++++++++++++++++++++---------------------
 4 files changed, 42 insertions(+), 41 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#17 lore raw

PATCH 5/12 tools/virtiofsd: Replace the word 'whitelist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 tools/virtiofsd/passthrough_ll.c      |  6 +++---
 tools/virtiofsd/passthrough_seccomp.c | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)
tools/virtiofsd/passthrough_ll.c +3 -3
index 5fb36d94074..4bf86d44211 100644
@@ -3132,7 +3132,7 @@ static void setup_mounts(const char *source)
 }
 
 /*
- * Only keep whitelisted capabilities that are needed for file system operation
+ * Only keep capabilities in allowlist that are needed for file system operation
  * The (possibly NULL) modcaps_in string passed in is free'd before exit.
  */
 static void setup_capabilities(char *modcaps_in)
@@ -3142,8 +3142,8 @@ static void setup_capabilities(char *modcaps_in)
     capng_restore_state(&cap.saved);
 
     /*
-     * Whitelist file system-related capabilities that are needed for a file
-     * server to act like root.  Drop everything else like networking and
+     * Add to allowlist file system-related capabilities that are needed for a
+     * file server to act like root.  Drop everything else like networking and
      * sysadmin capabilities.
      *
      * Exclusions:
tools/virtiofsd/passthrough_seccomp.c +6 -6
index a60d7da4b4e..c8b1ebbe830 100644
@@ -21,7 +21,7 @@
 #endif
 #endif
 
-static const int syscall_whitelist[] = {
+static const int syscall_allowlist[] = {
     /* TODO ireg sem*() syscalls */
     SCMP_SYS(brk),
     SCMP_SYS(capget), /* For CAP_FSETID */
@@ -115,12 +115,12 @@ static const int syscall_whitelist[] = {
 };
 
 /* Syscalls used when --syslog is enabled */
-static const int syscall_whitelist_syslog[] = {
+static const int syscall_allowlist_syslog[] = {
     SCMP_SYS(send),
     SCMP_SYS(sendto),
 };
 
-static void add_whitelist(scmp_filter_ctx ctx, const int syscalls[], size_t len)
+static void add_allowlist(scmp_filter_ctx ctx, const int syscalls[], size_t len)
 {
     size_t i;
 
@@ -151,10 +151,10 @@ void setup_seccomp(bool enable_syslog)
         exit(1);
     }
 
-    add_whitelist(ctx, syscall_whitelist, G_N_ELEMENTS(syscall_whitelist));
+    add_allowlist(ctx, syscall_allowlist, G_N_ELEMENTS(syscall_allowlist));
     if (enable_syslog) {
-        add_whitelist(ctx, syscall_whitelist_syslog,
-                      G_N_ELEMENTS(syscall_whitelist_syslog));
+        add_allowlist(ctx, syscall_allowlist_syslog,
+                      G_N_ELEMENTS(syscall_allowlist_syslog));
     }
 
     /* libvhost-user calls this for post-copy migration, we don't need it */
Signature · 1 line
2.26.2
Reviewed-by on v1 5/12
#18 lore raw

Re: [PATCH 05/12] tools/virtiofsd: Replace the word 'whitelist'

Quoted 7 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

Quoted 74 lines
---
 tools/virtiofsd/passthrough_ll.c      |  6 +++---
 tools/virtiofsd/passthrough_seccomp.c | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)
tools/virtiofsd/passthrough_ll.c +3 -3
index 5fb36d94074..4bf86d44211 100644
@@ -3132,7 +3132,7 @@ static void setup_mounts(const char *source)
 }
 
 /*
- * Only keep whitelisted capabilities that are needed for file system operation
+ * Only keep capabilities in allowlist that are needed for file system operation
  * The (possibly NULL) modcaps_in string passed in is free'd before exit.
  */
 static void setup_capabilities(char *modcaps_in)
@@ -3142,8 +3142,8 @@ static void setup_capabilities(char *modcaps_in)
     capng_restore_state(&cap.saved);
 
     /*
-     * Whitelist file system-related capabilities that are needed for a file
-     * server to act like root.  Drop everything else like networking and
+     * Add to allowlist file system-related capabilities that are needed for a
+     * file server to act like root.  Drop everything else like networking and
      * sysadmin capabilities.
      *
      * Exclusions:
tools/virtiofsd/passthrough_seccomp.c +6 -6
index a60d7da4b4e..c8b1ebbe830 100644
@@ -21,7 +21,7 @@
 #endif
 #endif
 
-static const int syscall_whitelist[] = {
+static const int syscall_allowlist[] = {
     /* TODO ireg sem*() syscalls */
     SCMP_SYS(brk),
     SCMP_SYS(capget), /* For CAP_FSETID */
@@ -115,12 +115,12 @@ static const int syscall_whitelist[] = {
 };
 
 /* Syscalls used when --syslog is enabled */
-static const int syscall_whitelist_syslog[] = {
+static const int syscall_allowlist_syslog[] = {
     SCMP_SYS(send),
     SCMP_SYS(sendto),
 };
 
-static void add_whitelist(scmp_filter_ctx ctx, const int syscalls[], size_t len)
+static void add_allowlist(scmp_filter_ctx ctx, const int syscalls[], size_t len)
 {
     size_t i;
 
@@ -151,10 +151,10 @@ void setup_seccomp(bool enable_syslog)
         exit(1);
     }
 
-    add_whitelist(ctx, syscall_whitelist, G_N_ELEMENTS(syscall_whitelist));
+    add_allowlist(ctx, syscall_allowlist, G_N_ELEMENTS(syscall_allowlist));
     if (enable_syslog) {
-        add_whitelist(ctx, syscall_whitelist_syslog,
-                      G_N_ELEMENTS(syscall_whitelist_syslog));
+        add_allowlist(ctx, syscall_allowlist_syslog,
+                      G_N_ELEMENTS(syscall_allowlist_syslog));
     }
 
     /* libvhost-user calls this for post-copy migration, we don't need it */
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Reviewed-by on v1 5/12
#19 lore raw

Re: [PATCH 05/12] tools/virtiofsd: Replace the word 'whitelist'

In reply to Philippe Mathieu-Daudé
Quoted 11 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 tools/virtiofsd/passthrough_ll.c      |  6 +++---
 tools/virtiofsd/passthrough_seccomp.c | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#20 lore raw

PATCH 6/12 scripts/tracetool: Replace the word 'whitelist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 scripts/tracetool/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/tracetool/__init__.py +1 -1
index 96b1cd69a52..5bc94d95cfc 100644
@@ -100,7 +100,7 @@ def validate_type(name):
         if bit == "const":
             continue
         if bit not in ALLOWED_TYPES:
-            raise ValueError("Argument type '%s' is not in whitelist. "
+            raise ValueError("Argument type '%s' is not allowed. "
                              "Only standard C types and fixed size integer "
                              "types should be used. struct, union, and "
                              "other complex pointer types should be "
Signature · 1 line
2.26.2
Reviewed-by on v1 6/12
#21 lore raw

Re: [PATCH 06/12] scripts/tracetool: Replace the word 'whitelist'

Quoted 10 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 scripts/tracetool/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 6/12
#22 lore raw

Re: [PATCH 06/12] scripts/tracetool: Replace the word 'whitelist'

In reply to Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 scripts/tracetool/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#23 lore raw

PATCH 7/12 scripts/device-crash-test: Replace the word 'whitelist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 scripts/device-crash-test | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
scripts/device-crash-test +15 -15
index 04118669ba7..6812de42f8c 100755
@@ -41,18 +41,18 @@ logger = logging.getLogger('device-crash-test')
 dbg = logger.debug
 
 
-# Purposes of the following whitelist:
+# Purposes of the following allowlist:
 # * Avoiding verbose log messages when we find known non-fatal
 #   (exitcode=1) errors
 # * Avoiding fatal errors when we find known crashes
 # * Skipping machines/devices that are known not to work out of
 #   the box, when running in --quick mode
 #
-# Keeping the whitelist updated is desirable, but not required,
+# Keeping the allowlist updated is desirable, but not required,
 # because unexpected cases where QEMU exits with exitcode=1 will
 # just trigger a INFO message.
 
-# Valid whitelist entry keys:
+# Valid allowlist entry keys:
 # * accel: regexp, full match only
 # * machine: regexp, full match only
 # * device: regexp, full match only
@@ -62,7 +62,7 @@ dbg = logger.debug
 # * expected: if True, QEMU is expected to always fail every time
 #   when testing the corresponding test case
 # * loglevel: log level of log output when there's a match.
-ERROR_WHITELIST = [
+ERROR_ALLOWLIST = [
     # Machines that won't work out of the box:
     #             MACHINE                         | ERROR MESSAGE
     {'machine':'niagara', 'expected':True},       # Unable to load a firmware for -M niagara
@@ -187,9 +187,9 @@ ERROR_WHITELIST = [
 
 
 def whitelistTestCaseMatch(wl, t):
-    """Check if a test case specification can match a whitelist entry
+    """Check if a test case specification can match a allowlist entry
 
-    This only checks if a whitelist entry is a candidate match
+    This only checks if a allowlist entry is a candidate match
     for a given test case, it won't check if the test case
     results/output match the entry.  See whitelistResultMatch().
     """
@@ -206,16 +206,16 @@ def whitelistTestCaseMatch(wl, t):
 
 def whitelistCandidates(t):
     """Generate the list of candidates that can match a test case"""
-    for i, wl in enumerate(ERROR_WHITELIST):
+    for i, wl in enumerate(ERROR_ALLOWLIST):
         if whitelistTestCaseMatch(wl, t):
             yield (i, wl)
 
 
 def findExpectedResult(t):
-    """Check if there's an expected=True whitelist entry for a test case
+    """Check if there's an expected=True allowlist entry for a test case
 
     Returns (i, wl) tuple, where i is the index in
-    ERROR_WHITELIST and wl is the whitelist entry itself.
+    ERROR_ALLOWLIST and wl is the allowlist entry itself.
     """
     for i, wl in whitelistCandidates(t):
         if wl.get('expected'):
@@ -223,7 +223,7 @@ def findExpectedResult(t):
 
 
 def whitelistResultMatch(wl, r):
-    """Check if test case results/output match a whitelist entry
+    """Check if test case results/output match a allowlist entry
 
     It is valid to call this function only if
     whitelistTestCaseMatch() is True for the entry (e.g. on
@@ -237,10 +237,10 @@ def whitelistResultMatch(wl, r):
 
 
 def checkResultWhitelist(r):
-    """Look up whitelist entry for a given test case result
+    """Look up allowlist entry for a given test case result
 
     Returns (i, wl) tuple, where i is the index in
-    ERROR_WHITELIST and wl is the whitelist entry itself.
+    ERROR_ALLOWLIST and wl is the allowlist entry itself.
     """
     for i, wl in whitelistCandidates(r['testcase']):
         if whitelistResultMatch(wl, r):
@@ -544,7 +544,7 @@ def main():
 
         if f:
             i, wl = checkResultWhitelist(f)
-            dbg("testcase: %r, whitelist match: %r", t, wl)
+            dbg("testcase: %r, allowlist match: %r", t, wl)
             wl_stats.setdefault(i, []).append(f)
             level = wl.get('loglevel', logging.DEBUG)
             logFailure(f, level)
@@ -561,9 +561,9 @@ def main():
 
     if args.debug:
         stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in
-                         enumerate(ERROR_WHITELIST)], key=lambda x: x[0])
+                         enumerate(ERROR_ALLOWLIST)], key=lambda x: x[0])
         for count, wl in stats:
-            dbg("whitelist entry stats: %d: %r", count, wl)
+            dbg("allowlist entry stats: %d: %r", count, wl)
 
     if fatal_failures:
         for f in fatal_failures:
Signature · 1 line
2.26.2
#24 lore raw

Re: [PATCH 07/12] scripts/device-crash-test: Replace the word 'whitelist'

Quoted 10 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 scripts/device-crash-test | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

Eduardo already sent a clever patch:
https://www.mail-archive.com/[email protected]/msg778534.html

Reviewed-by on v1 7/12
#25 lore raw

Re: [PATCH 07/12] scripts/device-crash-test: Replace the word 'whitelist'

In reply to Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 scripts/device-crash-test | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#26 lore raw

PATCH 8/12 seccomp: Replace the word 'blacklist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 softmmu/qemu-seccomp.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
softmmu/qemu-seccomp.c +8 -8
index 377ef6937ca..4c684bc9e71 100644
@@ -45,8 +45,8 @@ const struct scmp_arg_cmp sched_setscheduler_arg[] = {
     { .arg = 1, .op = SCMP_CMP_NE, .datum_a = SCHED_IDLE }
 };
 
-static const struct QemuSeccompSyscall blacklist[] = {
-    /* default set of syscalls to blacklist */
+static const struct QemuSeccompSyscall denylist[] = {
+    /* default set of syscalls to denylist */
     { SCMP_SYS(reboot),                 QEMU_SECCOMP_SET_DEFAULT },
     { SCMP_SYS(swapon),                 QEMU_SECCOMP_SET_DEFAULT },
     { SCMP_SYS(swapoff),                QEMU_SECCOMP_SET_DEFAULT },
@@ -175,18 +175,18 @@ static int seccomp_start(uint32_t seccomp_opts, Error **errp)
         goto seccomp_return;
     }
 
-    for (i = 0; i < ARRAY_SIZE(blacklist); i++) {
+    for (i = 0; i < ARRAY_SIZE(denylist); i++) {
         uint32_t action;
-        if (!(seccomp_opts & blacklist[i].set)) {
+        if (!(seccomp_opts & denylist[i].set)) {
             continue;
         }
 
-        action = qemu_seccomp_get_action(blacklist[i].set);
-        rc = seccomp_rule_add_array(ctx, action, blacklist[i].num,
-                                    blacklist[i].narg, blacklist[i].arg_cmp);
+        action = qemu_seccomp_get_action(denylist[i].set);
+        rc = seccomp_rule_add_array(ctx, action, denylist[i].num,
+                                    denylist[i].narg, denylist[i].arg_cmp);
         if (rc < 0) {
             error_setg_errno(errp, -rc,
-                             "failed to add seccomp blacklist rules");
+                             "failed to add seccomp denylist rules");
             goto seccomp_return;
         }
     }
Signature · 1 line
2.26.2
Reviewed-by on v1 8/12
#27 lore raw

Re: [PATCH 08/12] seccomp: Replace the word 'blacklist'

Quoted 10 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 softmmu/qemu-seccomp.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Acked-by
#28 lore raw

Re: [PATCH 08/12] seccomp: Replace the word 'blacklist'

Quoted 5 lines · Daniel P. Berrange
Quoted 4 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

Quoted 8 lines
Quoted 6 lines

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 softmmu/qemu-seccomp.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
#29 lore raw

PATCH 9/12 qemu-options: Replace the word 'blacklist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 qemu-options.hx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
qemu-options.hx +2 -2
index d0410f05125..75997ee2ea6 100644
@@ -4275,11 +4275,11 @@ DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \
     "                    by the kernel, but typically no longer used by modern\n" \
     "                    C library implementations.\n" \
     "                use 'elevateprivileges' to allow or deny QEMU process to elevate\n" \
-    "                    its privileges by blacklisting all set*uid|gid system calls.\n" \
+    "                    its privileges by denylisting all set*uid|gid system calls.\n" \
     "                    The value 'children' will deny set*uid|gid system calls for\n" \
     "                    main QEMU process but will allow forks and execves to run unprivileged\n" \
     "                use 'spawn' to avoid QEMU to spawn new threads or processes by\n" \
-    "                     blacklisting *fork and execve\n" \
+    "                     denylisting *fork and execve\n" \
     "                use 'resourcecontrol' to disable process affinity and schedular priority\n",
     QEMU_ARCH_ALL)
 SRST
Signature · 1 line
2.26.2
#30 lore raw

Re: [PATCH 09/12] qemu-options: Replace the word 'blacklist'

Quoted 16 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 qemu-options.hx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
qemu-options.hx +0 -0
index d0410f05125..75997ee2ea6 100644

qemu-options.hx DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \ · line 4278

Quoted 5 lines
qemu-options.hx +1 -1
@@ -4275,11 +4275,11 @@ DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \
     "                    by the kernel, but typically no longer used by modern\n" \
     "                    C library implementations.\n" \
     "                use 'elevateprivileges' to allow or deny QEMU process to elevate\n" \
-    "                    its privileges by blacklisting all set*uid|gid system calls.\n" \
+    "                    its privileges by denylisting all set*uid|gid system calls.\n" \

The original description is a bit wierd in how it reads/explains it, so I think it needs bigger changes:

" use 'elevateprivileges' to allow or deny the QEMU process ability
" to elevate privileges using set*uid|gid system calls.\n" \

qemu-options.hx DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \ · line 4282

Quoted 5 lines
qemu-options.hx +1 -1
     "                    The value 'children' will deny set*uid|gid system calls for\n" \
     "                    main QEMU process but will allow forks and execves to run unprivileged\n" \
     "                use 'spawn' to avoid QEMU to spawn new threads or processes by\n" \
-    "                     blacklisting *fork and execve\n" \
+    "                     denylisting *fork and execve\n" \

denylisting is a very strange term to use - its not really a word IMHO. Better as

    "                     preventing *fork and execve\n" \

or

    "                     blocking *fork and execve\n" \

qemu-options.hx DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \ · line 4285

Quoted 3 lines
qemu-options.hx +0 -0
     "                use 'resourcecontrol' to disable process affinity and schedular priority\n",
     QEMU_ARCH_ALL)
 SRST

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#31 lore raw

Re: [PATCH 09/12] qemu-options: Replace the word 'blacklist'

Quoted 35 lines · Daniel P. Berrangé
Quoted 16 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 qemu-options.hx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
qemu-options.hx +0 -0
index d0410f05125..75997ee2ea6 100644

qemu-options.hx DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \ · line 4278

Quoted 5 lines
qemu-options.hx +1 -1
@@ -4275,11 +4275,11 @@ DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \
     "                    by the kernel, but typically no longer used by modern\n" \
     "                    C library implementations.\n" \
     "                use 'elevateprivileges' to allow or deny QEMU process to elevate\n" \
-    "                    its privileges by blacklisting all set*uid|gid system calls.\n" \
+    "                    its privileges by denylisting all set*uid|gid system calls.\n" \

The original description is a bit wierd in how it reads/explains it, so I think it needs bigger changes:

" use 'elevateprivileges' to allow or deny the QEMU process ability
" to elevate privileges using set*uid|gid system calls.\n" \

qemu-options.hx DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \ · line 4282

Quoted 5 lines
qemu-options.hx +1 -1
     "                    The value 'children' will deny set*uid|gid system calls for\n" \
     "                    main QEMU process but will allow forks and execves to run unprivileged\n" \
     "                use 'spawn' to avoid QEMU to spawn new threads or processes by\n" \
-    "                     blacklisting *fork and execve\n" \
+    "                     denylisting *fork and execve\n" \
Quoted 8 lines

denylisting is a very strange term to use - its not really a word IMHO. Better as

    "                     preventing *fork and execve\n" \

or

    "                     blocking *fork and execve\n" \

While 'preventing' sounds nicer, 'blocking' is simpler to understand from a technical English speaker, so I took your 2nd suggestion, thanks.

#32 lore raw

PATCH 10/12 tests/qemu-iotests: Replace the words 'blacklist/whitelist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "blacklist" and "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 tests/qemu-iotests/149     | 14 +++++++-------
 tests/qemu-iotests/149.out |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)
tests/qemu-iotests/149 +7 -7
index 328fd05a4c9..b1d3f5fad67 100755
@@ -500,7 +500,7 @@ configs = [
 
 ]
 
-blacklist = [
+denylist = [
     # We don't have a cast-6 cipher impl for QEMU yet
     "cast6-256-xts-plain64-sha1",
     "cast6-128-xts-plain64-sha1",
@@ -510,17 +510,17 @@ blacklist = [
     "twofish-192-xts-plain64-sha1",
 ]
 
-whitelist = []
+allowlist = []
 if "LUKS_CONFIG" in os.environ:
-    whitelist = os.environ["LUKS_CONFIG"].split(",")
+    allowlist = os.environ["LUKS_CONFIG"].split(",")
 
 for config in configs:
-    if config.name in blacklist:
-        iotests.log("Skipping %s in blacklist" % config.name)
+    if config.name in denylist:
+        iotests.log("Skipping %s in denylist" % config.name)
         continue
 
-    if len(whitelist) > 0 and config.name not in whitelist:
-        iotests.log("Skipping %s not in whitelist" % config.name)
+    if len(allowlist) > 0 and config.name not in allowlist:
+        iotests.log("Skipping %s not in allowlist" % config.name)
         continue
 
     test_once(config, qemu_img=False)
tests/qemu-iotests/149.out +4 -4
index 6877ab6c4a4..19ae092987b 100644
@@ -478,7 +478,7 @@ sudo cryptsetup -q -v luksClose qiotest-145-cast5-128-cbc-plain64-sha1
 # Delete image
 unlink TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img
 
-Skipping cast6-256-xts-plain64-sha1 in blacklist
+Skipping cast6-256-xts-plain64-sha1 in denylist
 # ================= dm-crypt aes-256-cbc-plain-sha1 =================
 # Create image
 truncate TEST_DIR/luks-aes-256-cbc-plain-sha1.img --size 4194304MB
@@ -1319,7 +1319,7 @@ sudo cryptsetup -q -v luksClose qiotest-145-twofish-128-xts-plain64-sha1
 # Delete image
 unlink TEST_DIR/luks-twofish-128-xts-plain64-sha1.img
 
-Skipping twofish-192-xts-plain64-sha1 in blacklist
+Skipping twofish-192-xts-plain64-sha1 in denylist
 # ================= dm-crypt serpent-128-xts-plain64-sha1 =================
 # Create image
 truncate TEST_DIR/luks-serpent-128-xts-plain64-sha1.img --size 4194304MB
@@ -1560,8 +1560,8 @@ sudo cryptsetup -q -v luksClose qiotest-145-serpent-192-xts-plain64-sha1
 # Delete image
 unlink TEST_DIR/luks-serpent-192-xts-plain64-sha1.img
 
-Skipping cast6-128-xts-plain64-sha1 in blacklist
-Skipping cast6-192-xts-plain64-sha1 in blacklist
+Skipping cast6-128-xts-plain64-sha1 in denylist
+Skipping cast6-192-xts-plain64-sha1 in denylist
 # ================= dm-crypt aes-256-xts-plain64-sha224 =================
 # Create image
 truncate TEST_DIR/luks-aes-256-xts-plain64-sha224.img --size 4194304MB
Signature · 1 line
2.26.2
#33 lore raw

Re: [PATCH 10/12] tests/qemu-iotests: Replace the words 'blacklist/whitelist'

Quoted 26 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "blacklist" and "whitelist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 tests/qemu-iotests/149     | 14 +++++++-------
 tests/qemu-iotests/149.out |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)
tests/qemu-iotests/149 +1 -1
index 328fd05a4c9..b1d3f5fad67 100755
@@ -500,7 +500,7 @@ configs = [
 
 ]
 
-blacklist = [
+denylist = [
     # We don't have a cast-6 cipher impl for QEMU yet
     "cast6-256-xts-plain64-sha1",
     "cast6-128-xts-plain64-sha1",

tests/qemu-iotests/149 blacklist = [ · line 511

Quoted 2 lines
tests/qemu-iotests/149 +0 -0
@@ -510,17 +510,17 @@ blacklist = [
     "twofish-192-xts-plain64-sha1",
 ]

"skiplist" better describes the purpose of this.

tests/qemu-iotests/149 blacklist = [ · line 515

Quoted 6 lines
tests/qemu-iotests/149 +2 -2
-whitelist = []
+allowlist = []
 if "LUKS_CONFIG" in os.environ:
-    whitelist = os.environ["LUKS_CONFIG"].split(",")
+    allowlist = os.environ["LUKS_CONFIG"].split(",")

And "filterlist"

Quoted 5 lines
tests/qemu-iotests/149 +1 -2
 for config in configs:
-    if config.name in blacklist:
-        iotests.log("Skipping %s in blacklist" % config.name)
+    if config.name in denylist:

tests/qemu-iotests/149 blacklist = [ · line 526

Quoted 10 lines
tests/qemu-iotests/149 +3 -2
+        iotests.log("Skipping %s in denylist" % config.name)
         continue
 
-    if len(whitelist) > 0 and config.name not in whitelist:
-        iotests.log("Skipping %s not in whitelist" % config.name)
+    if len(allowlist) > 0 and config.name not in allowlist:
+        iotests.log("Skipping %s not in allowlist" % config.name)
         continue
 
     test_once(config, qemu_img=False)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#34 lore raw

Re: [PATCH 10/12] tests/qemu-iotests: Replace the words 'blacklist/whitelist'

Am 03.02.2021 um 11:28 hat Daniel P. Berrangé geschrieben:

Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 3 lines

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "blacklist" and "whitelist" appropriately.

We're not doing access control here, so allowlist/denylist are not the appropriate words to use here.

Quoted 16 lines
Quoted 16 lines

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 tests/qemu-iotests/149     | 14 +++++++-------
 tests/qemu-iotests/149.out |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)
tests/qemu-iotests/149 +0 -0
index 328fd05a4c9..b1d3f5fad67 100755
@@ -500,7 +500,7 @@ configs = [
 
 ]
 
Quoted 10 lines

tests/qemu-iotests/149 blacklist = [ · line 511

Quoted 8 lines
tests/qemu-iotests/149 +1 -1
-blacklist = [
+denylist = [
     # We don't have a cast-6 cipher impl for QEMU yet
     "cast6-256-xts-plain64-sha1",
     "cast6-128-xts-plain64-sha1",
@@ -510,17 +510,17 @@ blacklist = [
     "twofish-192-xts-plain64-sha1",
 ]

"skiplist" better describes the purpose of this.

That it's a list is very obvious from the code and doesn't tell anything about the content. How about skip_configs?

Quoted 8 lines

tests/qemu-iotests/149 blacklist = [ · line 515

Quoted 6 lines
tests/qemu-iotests/149 +2 -2
-whitelist = []
+allowlist = []
 if "LUKS_CONFIG" in os.environ:
-    whitelist = os.environ["LUKS_CONFIG"].split(",")
+    allowlist = os.environ["LUKS_CONFIG"].split(",")

And "filterlist"

test_configs? configs_to_test?

Quoted 8 lines
Quoted 8 lines
tests/qemu-iotests/149 +2 -2
 for config in configs:
-    if config.name in blacklist:
-        iotests.log("Skipping %s in blacklist" % config.name)
+    if config.name in denylist:
+        iotests.log("Skipping %s in denylist" % config.name)
         continue
 
Quoted 5 lines

tests/qemu-iotests/149 blacklist = [ · line 524

Quoted 5 lines
tests/qemu-iotests/149 +2 -2
-    if len(whitelist) > 0 and config.name not in whitelist:
-        iotests.log("Skipping %s not in whitelist" % config.name)
+    if len(allowlist) > 0 and config.name not in allowlist:
+        iotests.log("Skipping %s not in allowlist" % config.name)
         continue

The messages need to be updates accordingly, of course.

Kevin

#35 lore raw

Re: [PATCH 10/12] tests/qemu-iotests: Replace the words 'blacklist/whitelist'

Quoted 36 lines · Kevin Wolf

Am 03.02.2021 um 11:28 hat Daniel P. Berrangé geschrieben:

Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 3 lines

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the words "blacklist" and "whitelist" appropriately.

We're not doing access control here, so allowlist/denylist are not the appropriate words to use here.

Quoted 16 lines
Quoted 16 lines

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 tests/qemu-iotests/149     | 14 +++++++-------
 tests/qemu-iotests/149.out |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)
tests/qemu-iotests/149 +0 -0
index 328fd05a4c9..b1d3f5fad67 100755
@@ -500,7 +500,7 @@ configs = [
 
 ]
 
Quoted 10 lines

tests/qemu-iotests/149 blacklist = [ · line 511

Quoted 8 lines
tests/qemu-iotests/149 +1 -1
-blacklist = [
+denylist = [
     # We don't have a cast-6 cipher impl for QEMU yet
     "cast6-256-xts-plain64-sha1",
     "cast6-128-xts-plain64-sha1",
@@ -510,17 +510,17 @@ blacklist = [
     "twofish-192-xts-plain64-sha1",
 ]

"skiplist" better describes the purpose of this.

Quoted 2 lines

That it's a list is very obvious from the code and doesn't tell anything about the content. How about skip_configs?

Sure

Quoted 10 lines
Quoted 8 lines

tests/qemu-iotests/149 blacklist = [ · line 515

Quoted 6 lines
tests/qemu-iotests/149 +2 -2
-whitelist = []
+allowlist = []
 if "LUKS_CONFIG" in os.environ:
-    whitelist = os.environ["LUKS_CONFIG"].split(",")
+    allowlist = os.environ["LUKS_CONFIG"].split(",")

And "filterlist"

test_configs? configs_to_test?

The list of configs to test is built up by the code. This env variable is just a hack to let me filter the configs for debugging. Just "filter_configs" is ok.

Quoted 15 lines
Quoted 9 lines
Quoted 9 lines
tests/qemu-iotests/149 +2 -2
 for config in configs:
-    if config.name in blacklist:
-        iotests.log("Skipping %s in blacklist" % config.name)
+    if config.name in denylist:
+        iotests.log("Skipping %s in denylist" % config.name)
         continue
 
Quoted 5 lines

tests/qemu-iotests/149 blacklist = [ · line 524

Quoted 5 lines
tests/qemu-iotests/149 +2 -2
-    if len(whitelist) > 0 and config.name not in whitelist:
-        iotests.log("Skipping %s not in whitelist" % config.name)
+    if len(allowlist) > 0 and config.name not in allowlist:
+        iotests.log("Skipping %s not in allowlist" % config.name)
         continue
Quoted 3 lines

The messages need to be updates accordingly, of course.

Kevin

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#36 lore raw

PATCH 11/12 tests/fp/fp-test: Replace the word 'blacklist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 tests/fp/fp-test.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tests/fp/fp-test.c +4 -4
index 06ffebd6db1..5a4cad8c8b2 100644
@@ -123,7 +123,7 @@ static void not_implemented(void)
     fprintf(stderr, "Not implemented.\n");
 }
 
-static bool blacklisted(unsigned op, int rmode)
+static bool is_allowed(unsigned op, int rmode)
 {
     /* odd has not been implemented for any 80-bit ops */
     if (rmode == softfloat_round_odd) {
@@ -161,10 +161,10 @@ static bool blacklisted(unsigned op, int rmode)
         case F32_TO_EXTF80:
         case F64_TO_EXTF80:
         case F128_TO_EXTF80:
-            return true;
+            return false;
         }
     }
-    return false;
+    return true;
 }
 
 static void do_testfloat(int op, int rmode, bool exact)
@@ -194,7 +194,7 @@ static void do_testfloat(int op, int rmode, bool exact)
     verCases_writeFunctionName(stderr);
     fputs("\n", stderr);
 
-    if (blacklisted(op, rmode)) {
+    if (!is_allowed(op, rmode)) {
         not_implemented();
         return;
     }
Signature · 1 line
2.26.2
Acked-by on v1 11/12
#37 lore raw

Re: [PATCH 11/12] tests/fp/fp-test: Replace the word 'blacklist'

Quoted 7 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

Signature · 1 line
Alex Bennée
Reviewed-by on v1 11/12
#38 lore raw

Re: [PATCH 11/12] tests/fp/fp-test: Replace the word 'blacklist'

In reply to Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 tests/fp/fp-test.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#39 lore raw

PATCH 12/12 hw/vfio/pci-quirks: Replace the word 'blacklist'

In reply to Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

---
 hw/vfio/pci.h        |  2 +-
 hw/vfio/pci-quirks.c | 14 +++++++-------
 hw/vfio/pci.c        |  4 ++--
 hw/vfio/trace-events |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)
hw/vfio/pci.h +1 -1
index 1574ef983f8..64777516d16 100644
@@ -197,7 +197,7 @@ void vfio_pci_write_config(PCIDevice *pdev,
 uint64_t vfio_vga_read(void *opaque, hwaddr addr, unsigned size);
 void vfio_vga_write(void *opaque, hwaddr addr, uint64_t data, unsigned size);
 
-bool vfio_blacklist_opt_rom(VFIOPCIDevice *vdev);
+bool vfio_opt_rom_in_denylist(VFIOPCIDevice *vdev);
 void vfio_vga_quirk_setup(VFIOPCIDevice *vdev);
 void vfio_vga_quirk_exit(VFIOPCIDevice *vdev);
 void vfio_vga_quirk_finalize(VFIOPCIDevice *vdev);
hw/vfio/pci-quirks.c +7 -7
index fc8d63c8504..81c3e30df77 100644
@@ -43,19 +43,19 @@
 static const struct {
     uint32_t vendor;
     uint32_t device;
-} romblacklist[] = {
+} rom_denylist[] = {
     { 0x14e4, 0x168e }, /* Broadcom BCM 57810 */
 };
 
-bool vfio_blacklist_opt_rom(VFIOPCIDevice *vdev)
+bool vfio_opt_rom_in_denylist(VFIOPCIDevice *vdev)
 {
     int i;
 
-    for (i = 0 ; i < ARRAY_SIZE(romblacklist); i++) {
-        if (vfio_pci_is(vdev, romblacklist[i].vendor, romblacklist[i].device)) {
-            trace_vfio_quirk_rom_blacklisted(vdev->vbasedev.name,
-                                             romblacklist[i].vendor,
-                                             romblacklist[i].device);
+    for (i = 0 ; i < ARRAY_SIZE(rom_denylist); i++) {
+        if (vfio_pci_is(vdev, rom_denylist[i].vendor, rom_denylist[i].device)) {
+            trace_vfio_quirk_rom_in_denylist(vdev->vbasedev.name,
+                                             rom_denylist[i].vendor,
+                                             rom_denylist[i].device);
             return true;
         }
     }
hw/vfio/pci.c +2 -2
index f74be782091..759a3b1abf4 100644
@@ -900,7 +900,7 @@ static void vfio_pci_size_rom(VFIOPCIDevice *vdev)
 
     if (vdev->pdev.romfile || !vdev->pdev.rom_bar) {
         /* Since pci handles romfile, just print a message and return */
-        if (vfio_blacklist_opt_rom(vdev) && vdev->pdev.romfile) {
+        if (vfio_opt_rom_in_denylist(vdev) && vdev->pdev.romfile) {
             warn_report("Device at %s is known to cause system instability"
                         " issues during option rom execution",
                         vdev->vbasedev.name);
@@ -927,7 +927,7 @@ static void vfio_pci_size_rom(VFIOPCIDevice *vdev)
         return;
     }
 
-    if (vfio_blacklist_opt_rom(vdev)) {
+    if (vfio_opt_rom_in_denylist(vdev)) {
         if (dev->opts && qemu_opt_get(dev->opts, "rombar")) {
             warn_report("Device at %s is known to cause system instability"
                         " issues during option rom execution",
hw/vfio/trace-events +1 -1
index c0e75f24b76..079f53acf28 100644
@@ -49,7 +49,7 @@ vfio_pci_emulated_sub_vendor_id(const char *name, uint16_t val) "%s 0x%04x"
 vfio_pci_emulated_sub_device_id(const char *name, uint16_t val) "%s 0x%04x"
 
 # pci-quirks.c
-vfio_quirk_rom_blacklisted(const char *name, uint16_t vid, uint16_t did) "%s %04x:%04x"
+vfio_quirk_rom_in_denylist(const char *name, uint16_t vid, uint16_t did) "%s %04x:%04x"
 vfio_quirk_generic_window_address_write(const char *name, const char * region_name, uint64_t data) "%s %s 0x%"PRIx64
 vfio_quirk_generic_window_data_read(const char *name, const char * region_name, uint64_t data) "%s %s 0x%"PRIx64
 vfio_quirk_generic_window_data_write(const char *name, const char * region_name, uint64_t data) "%s %s 0x%"PRIx64
Signature · 1 line
2.26.2
Reviewed-by Acked-by on v1 12/12
#40 lore raw

Re: [PATCH 12/12] hw/vfio/pci-quirks: Replace the word 'blacklist'

Quoted 6 lines · On Tue, 2 Feb 2021 21:58:24 +0100 Philippe Mathieu-Daudé <[email protected]>…

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

Quoted 7 lines
---
 hw/vfio/pci.h        |  2 +-
 hw/vfio/pci-quirks.c | 14 +++++++-------
 hw/vfio/pci.c        |  4 ++--
 hw/vfio/trace-events |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

Thanks!

Quoted 79 lines
hw/vfio/pci.h +1 -1
index 1574ef983f8..64777516d16 100644
@@ -197,7 +197,7 @@ void vfio_pci_write_config(PCIDevice *pdev,
 uint64_t vfio_vga_read(void *opaque, hwaddr addr, unsigned size);
 void vfio_vga_write(void *opaque, hwaddr addr, uint64_t data, unsigned size);
 
-bool vfio_blacklist_opt_rom(VFIOPCIDevice *vdev);
+bool vfio_opt_rom_in_denylist(VFIOPCIDevice *vdev);
 void vfio_vga_quirk_setup(VFIOPCIDevice *vdev);
 void vfio_vga_quirk_exit(VFIOPCIDevice *vdev);
 void vfio_vga_quirk_finalize(VFIOPCIDevice *vdev);
hw/vfio/pci-quirks.c +7 -7
index fc8d63c8504..81c3e30df77 100644
@@ -43,19 +43,19 @@
 static const struct {
     uint32_t vendor;
     uint32_t device;
-} romblacklist[] = {
+} rom_denylist[] = {
     { 0x14e4, 0x168e }, /* Broadcom BCM 57810 */
 };
 
-bool vfio_blacklist_opt_rom(VFIOPCIDevice *vdev)
+bool vfio_opt_rom_in_denylist(VFIOPCIDevice *vdev)
 {
     int i;
 
-    for (i = 0 ; i < ARRAY_SIZE(romblacklist); i++) {
-        if (vfio_pci_is(vdev, romblacklist[i].vendor, romblacklist[i].device)) {
-            trace_vfio_quirk_rom_blacklisted(vdev->vbasedev.name,
-                                             romblacklist[i].vendor,
-                                             romblacklist[i].device);
+    for (i = 0 ; i < ARRAY_SIZE(rom_denylist); i++) {
+        if (vfio_pci_is(vdev, rom_denylist[i].vendor, rom_denylist[i].device)) {
+            trace_vfio_quirk_rom_in_denylist(vdev->vbasedev.name,
+                                             rom_denylist[i].vendor,
+                                             rom_denylist[i].device);
             return true;
         }
     }
hw/vfio/pci.c +2 -2
index f74be782091..759a3b1abf4 100644
@@ -900,7 +900,7 @@ static void vfio_pci_size_rom(VFIOPCIDevice *vdev)
 
     if (vdev->pdev.romfile || !vdev->pdev.rom_bar) {
         /* Since pci handles romfile, just print a message and return */
-        if (vfio_blacklist_opt_rom(vdev) && vdev->pdev.romfile) {
+        if (vfio_opt_rom_in_denylist(vdev) && vdev->pdev.romfile) {
             warn_report("Device at %s is known to cause system instability"
                         " issues during option rom execution",
                         vdev->vbasedev.name);
@@ -927,7 +927,7 @@ static void vfio_pci_size_rom(VFIOPCIDevice *vdev)
         return;
     }
 
-    if (vfio_blacklist_opt_rom(vdev)) {
+    if (vfio_opt_rom_in_denylist(vdev)) {
         if (dev->opts && qemu_opt_get(dev->opts, "rombar")) {
             warn_report("Device at %s is known to cause system instability"
                         " issues during option rom execution",
hw/vfio/trace-events +1 -1
index c0e75f24b76..079f53acf28 100644
@@ -49,7 +49,7 @@ vfio_pci_emulated_sub_vendor_id(const char *name, uint16_t val) "%s 0x%04x"
 vfio_pci_emulated_sub_device_id(const char *name, uint16_t val) "%s 0x%04x"
 
 # pci-quirks.c
-vfio_quirk_rom_blacklisted(const char *name, uint16_t vid, uint16_t did) "%s %04x:%04x"
+vfio_quirk_rom_in_denylist(const char *name, uint16_t vid, uint16_t did) "%s %04x:%04x"
 vfio_quirk_generic_window_address_write(const char *name, const char * region_name, uint64_t data) "%s %s 0x%"PRIx64
 vfio_quirk_generic_window_data_read(const char *name, const char * region_name, uint64_t data) "%s %s 0x%"PRIx64
 vfio_quirk_generic_window_data_write(const char *name, const char * region_name, uint64_t data) "%s %s 0x%"PRIx64
Reviewed-by on v1 12/12
#41 lore raw

Re: [PATCH 12/12] hw/vfio/pci-quirks: Replace the word 'blacklist'

In reply to Philippe Mathieu-Daudé
Quoted 6 lines · Philippe Mathieu-Daudé

Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

Quoted 7 lines
---
 hw/vfio/pci.h        |  2 +-
 hw/vfio/pci-quirks.c | 14 +++++++-------
 hw/vfio/pci.c        |  4 ++--
 hw/vfio/trace-events |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|