From patchwork Tue Feb 2 20:58:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TAbf1CG5; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcj14p5Lz9shx for ; Wed, 3 Feb 2021 08:02:58 +1100 (AEDT) Received: from localhost ([::1]:36472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72p5-00051N-O4 for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:02:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72l0-0001u8-Fs for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:58:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72ky-0006kS-ME for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:58:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PZPBR0BclVqF/rPEj/0RS+FyJc1foHcMXsjRFpfwuw0=; b=TAbf1CG5XPkvTn5HduL1TMY02RcQsCZzS6xMZkOsXEwM5yJK+sixe0+KN7oYRx2hX/GjKV farQ9gP7bqkTzsRHplwhve5nWymRj0Esc6b0+Von/Wax2D/ORrqvUPT1lUtg/c8viTTljH DCT10nz8znwlLfD5AKs8m/4AI/l8aGY= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-511-s-brvUr7NXKxTb2CevJaYg-1; Tue, 02 Feb 2021 15:58:37 -0500 X-MC-Unique: s-brvUr7NXKxTb2CevJaYg-1 Received: by mail-ej1-f71.google.com with SMTP id hx26so4266253ejc.3 for ; Tue, 02 Feb 2021 12:58:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PZPBR0BclVqF/rPEj/0RS+FyJc1foHcMXsjRFpfwuw0=; b=uYgcsRRtmrQWyMoL/EvpLJOQ3s+sjwlmtbweV9a7k6ecIbqupkWJrmtS5LCU2UCUHX NgdlntLQILvBhjPXzomHzr6cv+3+nsJHFYbmIVyOTt90Gp4oPIGhh9EqhQyluhI3UHqZ JXDgJFQu2PiwunJGzP9SvcD5LOtxkOPEpee+19kX8W1pqDVRRCgKaU0G6CgZM5FwEjyI tefOOYSky0QwjesHMglX2NUj6HvDoAYBV0uPocw9t2ULvuC1eQLOTtHo3TOMoAN1SLfH IwNLcGdhEtguC+G3fgraBugoBoF61jEtW3hKo+dG6cV8Zk4v/HyrtFfMpS62EjfP1WoA TktA== X-Gm-Message-State: AOAM533VO9z9+q4Pqj1bqs8m08yUez1kJy+efP5CKEjuUBGiQgyWmEC+ jQgZdbE0bovBN4CR/UGwQrU2UDpdyGVbxjZ4oG7NeQ/JXCAiyWpZqL0LRjJNN718IIL8leauYpk h1bkJKm/vVdr/5WRTH4w04D5a4rLJ/V1Z1b+O2gLdgVZLpFTU4besUShvaF2ccB4j X-Received: by 2002:a17:907:1119:: with SMTP id qu25mr24016373ejb.268.1612299513691; Tue, 02 Feb 2021 12:58:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJymbmDOo6GPWGb/jU5IhVlxX6hUuAck3+KKDqahjKh8eC/XKSQkS73/g5CdNQVsl0N+em9GIw== X-Received: by 2002:a17:907:1119:: with SMTP id qu25mr24016343ejb.268.1612299513347; Tue, 02 Feb 2021 12:58:33 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id m20sm11070885edj.43.2021.02.02.12.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:58:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 01/12] ui: Replace the word 'whitelist' Date: Tue, 2 Feb 2021 21:58:13 +0100 Message-Id: <20210202205824.1085853-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann --- ui/console.c | 2 +- ui/vnc-auth-sasl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/console.c b/ui/console.c index d80ce7037c3..9e13bf9020f 100644 --- a/ui/console.c +++ b/ui/console.c @@ -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; } diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c index f67111a3662..dde4b8d4144 100644 --- a/ui/vnc-auth-sasl.c +++ b/ui/vnc-auth-sasl.c @@ -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; } From patchwork Tue Feb 2 20:58:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434949 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KbaJbkzx; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcf95Nn0z9sjJ for ; Wed, 3 Feb 2021 08:00:33 +1100 (AEDT) Received: from localhost ([::1]:58032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72ml-00022n-KO for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:00:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72l8-000226-Ts for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:58:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72l6-0006oN-VV for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:58:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Xlu9C8l46HeJfL6X9SL2SiRfjv5SEslChtTTiGjH9U=; b=KbaJbkzxrftGjdXU6UBUjwz8vsf54Ock4PMhz9UkbgQC4iV6juNin8TQTgyPvfaZmoq9sn 6INuYgaF+75995P8j33x6iGT7gdWGs4/ZRm1HvWd3DonVzWVBUZU2kk2PV2pGF/U8IWjEp 8ck4Xkvz8dwBS+WHCYgP3FOIlrcXyPs= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-537--EsC4TTDPH2Q8OYQrPPO_g-1; Tue, 02 Feb 2021 15:58:47 -0500 X-MC-Unique: -EsC4TTDPH2Q8OYQrPPO_g-1 Received: by mail-ej1-f70.google.com with SMTP id bz10so5520570ejc.20 for ; Tue, 02 Feb 2021 12:58:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8Xlu9C8l46HeJfL6X9SL2SiRfjv5SEslChtTTiGjH9U=; b=gsKijUIaZ3IihvA3h6ZANRmADOvZ+wwYkkrg9/92cbbqZnSsVsLTBqrYNUgKJr9MuB /FQ4gYWFFAg84m/3nyDdr5IJsKLU7vG/+fr6HFddxeIv6g11E+xKBqvqxxTVh0oUUNQh 07pQtMT9T8B6T7Vb/OlOUqc6RS26KeRgiCWn1so/vxwOSe9Lz7l9Rwy5lK6WGJa6YbXw tL4DIqa+2a9SrlJqHIDX8GHC9gB0z4VuRrZT7JmUnm7EaPUmLJi4gn86yeyXiL3ZyC81 dROTc1lVdbtLz4E0423tqu2kdT6wJb3B/eE71jR4Cmsn6pdIcDhU/vSWjCLr+cbF7J7g kjdQ== X-Gm-Message-State: AOAM533VM/XAbXGZqvVjXleS+7je7wfvoMUsYot8zGMY4TATae+sjMml 1DWrxq2NVI/VwaV77ALMwR3RQmERRmpWAmamw8pFmVaBY7N+xcle33eUBgIAeCngAelMt2oiK9e 8n3Puop6YWs3VfZ+f6zQE80ETTiXyAXjM3rfakoKNnPhNgkpI+SxYt4FmkmIFtGj2 X-Received: by 2002:a17:907:1629:: with SMTP id hb41mr23301315ejc.197.1612299525689; Tue, 02 Feb 2021 12:58:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJycaM0s5bvfuIyFO+Pkw6XoqVYUhO0v3msX2x1AnXKxmRoILwJHUkIOlEmXapI+Fa2EcyHSvA== X-Received: by 2002:a17:907:1629:: with SMTP id hb41mr23301298ejc.197.1612299525524; Tue, 02 Feb 2021 12:58:45 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id e19sm10317539eds.79.2021.02.02.12.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:58:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/12] qga: Rename config key 'blacklist' as 'denylist' Date: Tue, 2 Feb 2021 21:58:14 +0100 Message-Id: <20210202205824.1085853-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- 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(-) diff --git a/docs/interop/qemu-ga.rst b/docs/interop/qemu-ga.rst index 3063357bb5d..9a590bf95cb 100644 --- a/docs/interop/qemu-ga.rst +++ b/docs/interop/qemu-ga.rst @@ -125,7 +125,7 @@ pidfile string fsfreeze-hook string statedir string verbose boolean -blacklist string list +denylist string list ============= =========== See also diff --git a/qga/main.c b/qga/main.c index e7f8f3b1616..249fe06e8e5 100644 --- a/qga/main.c +++ b/qga/main.c @@ -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); diff --git a/tests/test-qga.c b/tests/test-qga.c index eb33264e8ed..c2836244b04 100644 --- a/tests/test-qga.c +++ b/tests/test-qga.c @@ -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, diff --git a/tests/data/test-qga-config b/tests/data/test-qga-config index 4bb721a4a18..d9ddc1a4d96 100644 --- a/tests/data/test-qga-config +++ b/tests/data/test-qga-config @@ -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 From patchwork Tue Feb 2 20:58:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434950 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UYZUm1Id; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcfM6Cgnz9sWD for ; Wed, 3 Feb 2021 08:00:43 +1100 (AEDT) Received: from localhost ([::1]:58788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72mv-0002RC-Ff for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:00:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72lK-00029D-9m for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:02 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72lH-0006u2-Te for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rv5my3HSU2RkuIlLbBGZUl/Fhu0zFPDOiXMImWA+5ZI=; b=UYZUm1IdOn7QkTfOTANlNI8MgI1gX60BPiG6MjgW4cqthlAyamLHIAVxbC+yMye6K68suF bMOFGY/VW8PgcRGKm3/qYGb4BuudTQdkWvSa/vIdZxbKe5ioOkldqVyZCYQ3NSHHLglvPv Qb4wrZBhha8gQT9d6yxZvHIOEOpuCBc= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-526-edoxJaRROkOABoTBQOXi-Q-1; Tue, 02 Feb 2021 15:58:57 -0500 X-MC-Unique: edoxJaRROkOABoTBQOXi-Q-1 Received: by mail-wm1-f72.google.com with SMTP id s10so1237397wme.8 for ; Tue, 02 Feb 2021 12:58:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rv5my3HSU2RkuIlLbBGZUl/Fhu0zFPDOiXMImWA+5ZI=; b=bBC1Lv2rXVb3F4Ql19lovR5obMIPNhdPCspX8DHWExtGO/BoKMfSyU9JGTKuPiZAim rzWT3AyBBxR6XyB+VRXLRjsLa59MqhXdWe/YkfmOBJKuPI8GCCdl+Ij4kKFUrFk+BEfj dpP95gCy2LZI3S3z647f4RBF6R4V8Hgkr5s/BE6P3InT9kNivlDyJqp26sMTO54APSKj k8lxWn83y9dwov/3QxyOSQ7Oc9p8clf+teFOkycWl50M3+haJJFwzjkvGISN5P/F9r67 AMbBoSYuBGb/YfixEAyRwYRYA6vyaOCBi/UGGE6+izNUCaA+zDNAyXhzaYQMJN5JcV50 Nzfg== X-Gm-Message-State: AOAM5334uq5mGlo/Gk0SC744gEKTsdwgE5qK9NtQOwblExNM4wJIKoZn n/aYzJTe8cR6shLbxzm4w4Zurndb7VGcGFjxhObA+4Q9fxD8rMaw0mxSU0kUq9g+glTya5soGKm qI8bK8JJQumqEpZc+GqDpZTUJaz1iP6AE40QmLrjrhrgtypbAE8clIXJFzWSqBqOv X-Received: by 2002:a05:600c:2281:: with SMTP id 1mr5458547wmf.150.1612299536404; Tue, 02 Feb 2021 12:58:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmQ06aMoRrIgRRrbMW/I6RMZgQD04A5Ja2YIOdLOi8cQzOd1xcgkLTgGTPUpM8KDc5bLFOww== X-Received: by 2002:a05:600c:2281:: with SMTP id 1mr5458524wmf.150.1612299536146; Tue, 02 Feb 2021 12:58:56 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id b3sm5776109wme.32.2021.02.02.12.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:58:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/12] qga: Replace '--blacklist' command line option by '--denylist' Date: Tue, 2 Feb 2021 21:58:15 +0100 Message-Id: <20210202205824.1085853-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé --- docs/interop/qemu-ga.rst | 2 +- qga/main.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/interop/qemu-ga.rst b/docs/interop/qemu-ga.rst index 9a590bf95cb..89596e646de 100644 --- a/docs/interop/qemu-ga.rst +++ b/docs/interop/qemu-ga.rst @@ -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). diff --git a/qga/main.c b/qga/main.c index 249fe06e8e5..66177b9e93d 100644 --- a/qga/main.c +++ b/qga/main.c @@ -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 From patchwork Tue Feb 2 20:58:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434953 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HY1h6TWH; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcjY5vDTz9sj1 for ; Wed, 3 Feb 2021 08:03:29 +1100 (AEDT) Received: from localhost ([::1]:38378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72pb-0005nK-QA for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:03:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72lQ-0002BV-LQ for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:09 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:35232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72lN-0006xk-S6 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KikifyMD+kQLStcGOLcsV8rDvJsrpQTJUnw3tvpYxvk=; b=HY1h6TWHiON0GsRsahwEMTvLrHEivp87XVCKnEduj9Rd3w1gqeqQpxVCDnTYj0qHQULQsS zoxp5EElCmJoTKumPCEQfJq9Cmp+4HgOMt1PO6Me0vxp4noV58vsim8JBEWrIpaVHm2Upz eTJhZGzOERLrjz3JLrajvdPGUpoFYeA= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-484-Sobwvz9zN4ONStHjL2GfrQ-1; Tue, 02 Feb 2021 15:59:03 -0500 X-MC-Unique: Sobwvz9zN4ONStHjL2GfrQ-1 Received: by mail-ej1-f69.google.com with SMTP id p1so10573674ejo.4 for ; Tue, 02 Feb 2021 12:59:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KikifyMD+kQLStcGOLcsV8rDvJsrpQTJUnw3tvpYxvk=; b=FNYeO/XBi40FfUSIgr6b3nyDKL0/Sy0HlD6q5VWAKXLb5rTVN5q2KsYQ9bGsJYEO2H 71G0616EVwrERGAQ9W9DJhS0Y0DqZqY1iwuLV+11hNkBkQORsM0rBliq0mbRmyMHaepz m2otfgIhwPrwWR2ytjPJyMEV9khKsqULxIhBxIV2J+X2A/V71V6f5rtC58taXPgmPVdx uLGx37FqX7GqKH/ob9F7xmspE6GoL3RutFqcOMyrcngYAjvyBWeoV26hnzQE5e8bdilw GhDwDqlhD6OnObpFZB05WF6R16zuJqTNpyoxzMBb/cNFS0hFVL/jNP9+++Og1aNHgerl RTBQ== X-Gm-Message-State: AOAM533iKyKVo4LFUnPLVEhhOscntohV5YC/c2uJk3G2aPmedWpRjPNP fLhQYu60StjweAzIlb4S/+PshSqPCjnB0pFCm4txiAuRsfebU6OaRxtO15YCkJSAclju2ADJK4H kMkZZqCkRKa59B2GGj5gy+ypaminIDhk1CM8nTSb67MRaQCjBpfpSQqz3YBCP0tvH X-Received: by 2002:aa7:cdc8:: with SMTP id h8mr749010edw.244.1612299542071; Tue, 02 Feb 2021 12:59:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIjaVmtpm/x/R+xleXJRRxdttHpz9X6lFS42uaEjDXUK/fg1Fxb7Ic8OsxZQC9bonU1hr1Lg== X-Received: by 2002:aa7:cdc8:: with SMTP id h8mr748984edw.244.1612299541828; Tue, 02 Feb 2021 12:59:01 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id lf26sm14021ejb.4.2021.02.02.12.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/12] qga: Replace the word 'blacklist' Date: Tue, 2 Feb 2021 21:58:16 +0100 Message-Id: <20210202205824.1085853-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- 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(-) diff --git a/qga/guest-agent-core.h b/qga/guest-agent-core.h index 9d01ea9c82a..90ce6a91a0a 100644 --- a/qga/guest-agent-core.h +++ b/qga/guest-agent-core.h @@ -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), diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 8dd94a33144..a23f11d9d20 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -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 */ diff --git a/qga/commands-win32.c b/qga/commands-win32.c index a00e6cb1655..f7a1644a423 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -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 */ diff --git a/qga/main.c b/qga/main.c index 66177b9e93d..4dbcc62ac9d 100644 --- a/qga/main.c +++ b/qga/main.c @@ -88,7 +88,7 @@ struct GAState { #endif bool delimit_response; bool frozen; - GList *blacklist; + GList *denylist; char *state_filepath_isfrozen; struct { const char *log_filepath; @@ -108,7 +108,7 @@ struct GAState *ga_state; QmpCommandList ga_commands; /* commands that are safe to issue while filesystems are frozen */ -static const char *ga_freeze_whitelist[] = { +static const char *ga_freeze_allowlist[] = { "guest-ping", "guest-info", "guest-sync", @@ -362,31 +362,31 @@ static gint ga_strcmp(gconstpointer str1, gconstpointer str2) } /* disable commands that aren't safe for fsfreeze */ -static void ga_disable_non_whitelisted(const QmpCommand *cmd, void *opaque) +static void ga_disable_not_allowed(const QmpCommand *cmd, void *opaque) { - bool whitelisted = false; + bool allowed = false; int i = 0; const char *name = qmp_command_name(cmd); - while (ga_freeze_whitelist[i] != NULL) { - if (strcmp(name, ga_freeze_whitelist[i]) == 0) { - whitelisted = true; + while (ga_freeze_allowlist[i] != NULL) { + if (strcmp(name, ga_freeze_allowlist[i]) == 0) { + allowed = true; } i++; } - if (!whitelisted) { + if (!allowed) { g_debug("disabling command: %s", name); qmp_disable_command(&ga_commands, name); } } -/* [re-]enable all commands, except those explicitly blacklisted by user */ -static void ga_enable_non_blacklisted(const QmpCommand *cmd, void *opaque) +/* [re-]enable all commands, except those explicitly denylisted by user */ +static void ga_enable_non_denylisted(const QmpCommand *cmd, void *opaque) { - GList *blacklist = opaque; + GList *denylist = opaque; const char *name = qmp_command_name(cmd); - if (g_list_find_custom(blacklist, name, ga_strcmp) == NULL && + if (g_list_find_custom(denylist, name, ga_strcmp) == NULL && !qmp_command_is_enabled(cmd)) { g_debug("enabling command: %s", name); qmp_enable_command(&ga_commands, name); @@ -425,8 +425,8 @@ void ga_set_frozen(GAState *s) if (ga_is_frozen(s)) { return; } - /* disable all non-whitelisted (for frozen state) commands */ - qmp_for_each_command(&ga_commands, ga_disable_non_whitelisted, NULL); + /* disable all commands not allowed (for frozen state) */ + qmp_for_each_command(&ga_commands, ga_disable_not_allowed, NULL); g_warning("disabling logging due to filesystem freeze"); ga_disable_logging(s); s->frozen = true; @@ -464,8 +464,8 @@ void ga_unset_frozen(GAState *s) s->deferred_options.pid_filepath = NULL; } - /* enable all disabled, non-blacklisted commands */ - qmp_for_each_command(&ga_commands, ga_enable_non_blacklisted, s->blacklist); + /* enable all disabled, non-denylisted commands */ + qmp_for_each_command(&ga_commands, ga_enable_non_denylisted, s->denylist); s->frozen = false; if (!ga_delete_file(s->state_filepath_isfrozen)) { g_warning("unable to delete %s, fsfreeze may not function properly", @@ -896,9 +896,10 @@ int64_t ga_get_fd_handle(GAState *s, Error **errp) int64_t handle; g_assert(s->pstate_filepath); - /* we blacklist commands and avoid operations that potentially require - * writing to disk when we're in a frozen state. this includes opening - * new files, so we should never get here in that situation + /* + * We have commands in a denylist and avoid operations that potentially + * require writing to disk when we're in a frozen state. this includes + * opening new files, so we should never get here in that situation */ g_assert(!ga_is_frozen(s)); @@ -950,8 +951,8 @@ struct GAConfig { #ifdef _WIN32 const char *service; #endif - gchar *bliststr; /* blacklist may point to this string */ - GList *blacklist; + gchar *bliststr; /* denylist may point to this string */ + GList *denylist; int daemonize; GLogLevelFlags log_level; int dumpconf; @@ -1171,7 +1172,7 @@ static void config_parse(GAConfig *config, int argc, char **argv) qmp_for_each_command(&ga_commands, ga_print_cmd, NULL); exit(EXIT_SUCCESS); } - config->blacklist = g_list_concat(config->blacklist, + config->denylist = g_list_concat(config->denylist, split_list(optarg, ",")); break; } @@ -1226,7 +1227,7 @@ static void config_free(GAConfig *config) #ifdef CONFIG_FSFREEZE g_free(config->fsfreeze_hook); #endif - g_list_free_full(config->blacklist, g_free); + g_list_free_full(config->denylist, g_free); g_free(config); } @@ -1308,7 +1309,7 @@ static GAState *initialize_agent(GAConfig *config, int socket_activation) s->deferred_options.log_filepath = config->log_filepath; } ga_disable_logging(s); - qmp_for_each_command(&ga_commands, ga_disable_non_whitelisted, NULL); + qmp_for_each_command(&ga_commands, ga_disable_not_allowed, NULL); } else { if (config->daemonize) { become_daemon(config->pid_filepath); @@ -1332,10 +1333,10 @@ static GAState *initialize_agent(GAConfig *config, int socket_activation) return NULL; } - config->blacklist = ga_command_blacklist_init(config->blacklist); - if (config->blacklist) { - GList *l = config->blacklist; - s->blacklist = config->blacklist; + config->denylist = ga_command_denylist_init(config->denylist); + if (config->denylist) { + GList *l = config->denylist; + s->denylist = config->denylist; do { g_debug("disabling command: %s", (char *)l->data); qmp_disable_command(&ga_commands, l->data); From patchwork Tue Feb 2 20:58:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434951 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bQNHIAY5; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcfl67DRz9sWD for ; Wed, 3 Feb 2021 08:01:03 +1100 (AEDT) Received: from localhost ([::1]:59052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72nF-0002Y5-MS for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:01:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72lX-0002El-D2 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:50921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72lV-00072c-LX for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zr5wlPqSBAErI1zYjHx4DGcwT+gbzmViuOOQn3eQ5nU=; b=bQNHIAY5g+SVomfceUj+60FKf2dUdL+P2HngmyTRjCadbQ01mJqBpeNPAQEqxVuLGSdYnO IfnBnt74+/76aOhtxf86AqDNDFCxau0L37nFBk7sUJMI+sdnJJy4Z8udBNTuOrFSeoBK5A 9AhXoag6jYbs6ZuSf8fiq0JAb0hfi/E= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-324-V3DfMWakPxixoopxD_yTpg-1; Tue, 02 Feb 2021 15:59:09 -0500 X-MC-Unique: V3DfMWakPxixoopxD_yTpg-1 Received: by mail-ej1-f71.google.com with SMTP id bx12so3321447ejc.15 for ; Tue, 02 Feb 2021 12:59:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zr5wlPqSBAErI1zYjHx4DGcwT+gbzmViuOOQn3eQ5nU=; b=FLZvOz8JIQ0EasXr+hT1vrSvQknUQ0Y5Wsyaqy2gWFz6TlyeJZ5y20J7FBtjjx8NkQ ctXwsGQ1KLHvzi5vGxgEGtS/mqDjuU+pJWptoWRcdwhVh4s8pR9StnynEKpeyYwlI9+v PfqYrOtfuFt3FUgzIkNg/xnikU1MhDqcha0H5HlPDbUSDeeai4Nf212HmHdMNPO8Q76h 03AP6Es0nsWB4SAnFsH52U7ThDhFIx5bwPUSKM+kX8PBZwHtgFnoqEKa68eMkR1tC5YA bs+TiPRxceIBHlD5qvsaLqGpnZgY9O8wAHm56zV/XI8GSeZqm/HO1UNPjUmms8ccg4nN 5q1Q== X-Gm-Message-State: AOAM532Ss940sDGckJxp3xnBdouGvJILBvzAvTHhvHPVI0kKBQVlrvG3 IuBlUD8I+sWIlnxBuZaPpGinkEDWDNUC3NHbTuDgK06GiRVKsoStwCAefb1Ge3nxKm3D4Cy8ic1 gJLiS4cJD/t+GRG4b/8Rm8B1kYk3j8+e7VFAjBo9FoKNFon+zVWGj8pb2qCRAkOds X-Received: by 2002:a05:6402:26d3:: with SMTP id x19mr3435edd.0.1612299547762; Tue, 02 Feb 2021 12:59:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzL+z53Vv/o3ibh8w3bBxjCI6htGchO9ok3XyqBAXpPxadZKvFGzM1UiGQcX6+0BX7J2BHqkg== X-Received: by 2002:a05:6402:26d3:: with SMTP id x19mr3408edd.0.1612299547532; Tue, 02 Feb 2021 12:59:07 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id b1sm12197eju.15.2021.02.02.12.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/12] tools/virtiofsd: Replace the word 'whitelist' Date: Tue, 2 Feb 2021 21:58:17 +0100 Message-Id: <20210202205824.1085853-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé --- tools/virtiofsd/passthrough_ll.c | 6 +++--- tools/virtiofsd/passthrough_seccomp.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 5fb36d94074..4bf86d44211 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b/tools/virtiofsd/passthrough_ll.c @@ -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: diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough_seccomp.c index a60d7da4b4e..c8b1ebbe830 100644 --- a/tools/virtiofsd/passthrough_seccomp.c +++ b/tools/virtiofsd/passthrough_seccomp.c @@ -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 */ From patchwork Tue Feb 2 20:58:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VMUNFS/K; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVckW2M6Gz9sjJ for ; Wed, 3 Feb 2021 08:04:19 +1100 (AEDT) Received: from localhost ([::1]:40446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72qP-0006eS-5b for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:04:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72lc-0002HY-7z for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72la-00075z-HZ for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eRNuuWWnGzS751tz77gVwZLSy3CEk47CqPxoZeCkviw=; b=VMUNFS/KoVL3GaOoou1jZJYwou5uuul2Uz0YshA8QDeq68nIiBE9GIAnspKlRQ//tcvo6X 9K67i3JrKBVINKfw/TrNae4Tw5+QwlDlx3LSdh4ezq0JaABmlfYS7k+PtdK+kqdfsxYdJa XzVG/eBTPmM40ze85xWHVZjjT3WDkJA= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-17-jHIiiasYOlu-TGE9Yrsk4A-1; Tue, 02 Feb 2021 15:59:15 -0500 X-MC-Unique: jHIiiasYOlu-TGE9Yrsk4A-1 Received: by mail-ej1-f71.google.com with SMTP id bx12so3321614ejc.15 for ; Tue, 02 Feb 2021 12:59:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eRNuuWWnGzS751tz77gVwZLSy3CEk47CqPxoZeCkviw=; b=OyczZOyaY4fGBhp8moRfgDId1NHxEmrZn/JF8j4MiujdEMMyDR5ZC3Z6rDl4MqJnOO dT7zxUW34knjQ6BcU2GDSM1jeFHTHVF9zp0emBkITJDwH9RW9aO1cpjGylkmVAQVLJGb 2+9qVhpY2W9lvBV9vJQ874JK4EjuvsA4LIuP4hl4HN464X9n9xMM4/Gfdy+DNvQJhgTb P7+cjANvfzFR6XCs8MCTDL+nDWfQHxKrM5nEWTaYq3qmYVlfzKCm1tEQvUZFIx7nR1g/ t46URCWhjWTiO/GBQwThHJD08m0BYvipTcO7HX9uw6E2B7BtC7sFCl98EI7DACBm4w+U p+CQ== X-Gm-Message-State: AOAM531yeXg4stUYQNUNLDEXU3XqfjOKppcFTfaFIexbJvBvf1RqxQko U/CLevj12g9DDw45iVn0jEOVa/7WiDDDQdFnf+oJs1HLVEuAkpEHjIbfbWCi4b5EpZ+XZ8Tvqa8 MC13lrgCWZgC1H8gHCOcCp66HrjeVqKZ0kJazdBdt4Omc10CSxg0r+fcJZXTD2sRP X-Received: by 2002:a17:906:2a8b:: with SMTP id l11mr23958953eje.1.1612299554315; Tue, 02 Feb 2021 12:59:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxE/WXY7pnoMkxWO2IgrEqk3qYmnF/l7DPVszzBT8rQjJvRYIhfJ0lW//xnXZ8l83sldEueWQ== X-Received: by 2002:a17:906:2a8b:: with SMTP id l11mr23958931eje.1.1612299554148; Tue, 02 Feb 2021 12:59:14 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id g4sm1215549edv.59.2021.02.02.12.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:13 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/12] scripts/tracetool: Replace the word 'whitelist' Date: Tue, 2 Feb 2021 21:58:18 +0100 Message-Id: <20210202205824.1085853-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Stefan Hajnoczi --- scripts/tracetool/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 96b1cd69a52..5bc94d95cfc 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -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 " From patchwork Tue Feb 2 20:58:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K2Yd95sa; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcnH1cjmz9sWw for ; Wed, 3 Feb 2021 08:06:43 +1100 (AEDT) Received: from localhost ([::1]:49010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72sj-0001qT-20 for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:06:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72lh-0002RK-S8 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:25 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72lf-00079y-M8 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ND9ZC1FHVt0d7eciPZVn1MRDtBcHT7RVOlI71H770Mo=; b=K2Yd95sa7HqiwpnDtX7hcIjdztOzTLaDQJk2ZbgS6xI2XZFJVO6LORDW4sb7lponu7k17V JsG65gKkwB8BaRDDZrWQwYvvq8isJqCfn13CVr5+sATC/MBXF3SyN5l6G2bFygKXkTC9D4 12PHekA2nIgU/DCE1l1r8H6/d+Vos2c= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-vdG8eKCNPPmgXDrohOPkTA-1; Tue, 02 Feb 2021 15:59:21 -0500 X-MC-Unique: vdG8eKCNPPmgXDrohOPkTA-1 Received: by mail-ed1-f70.google.com with SMTP id a26so10289189edx.8 for ; Tue, 02 Feb 2021 12:59:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ND9ZC1FHVt0d7eciPZVn1MRDtBcHT7RVOlI71H770Mo=; b=tsTlH9Yg0NaH0477JR3TV0vj3LkmLryHHEs0u26lylqnI6K7WAZdJ1hbI1kFDVos3M 5L7sPoV1P2xFwdq0lrbMyTfukMLCStDBi2RSvBRcqsa5nAfgCD/UaMi1T2xQxZvhgrO6 Qf27L8mvtssqwcq8dP/OkCfnUkxBM9JTIMY4DlABcnaNj8wa0h/YkvYdtc2u02IIbsbr Rcwd4hWviFKoJUEBNAAcderU1UyPKQ2fMBSXnmjlEgaNWue0+I7Z1WQo2HLs9+uN9Hs7 3xTSdDigZhmR5HiHHBTwm3ERI0P5dZ6bO3z7dy33EVbZ7ijh6EvJ/zjsdcgEruq1UNC0 82Dg== X-Gm-Message-State: AOAM5314hagWjns8li6rM7h4iGSjtGRHNuis5OtdmM0+AMvLJ+5j0eHi g9URqRVyGHjEjwGbmHZOHMciQ3XTL/ORFCi4peciSAqU7wWQkM1tt6A40pRYzbJ7UsK0kRL6KYR pclPoq/5XRMlDzDPFEIQQmoO+oq+qy6paiTXLT5aOD++i4670Gzg2ovDTGvI3DTE7 X-Received: by 2002:a17:906:1c11:: with SMTP id k17mr12127663ejg.70.1612299560117; Tue, 02 Feb 2021 12:59:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzc66eDSSH+BNcm5+dNYek0/hknrIf+zCDC3iL5UggY339OUoxodhKrOYqWwBngv8T0oBxHgg== X-Received: by 2002:a17:906:1c11:: with SMTP id k17mr12127633ejg.70.1612299559816; Tue, 02 Feb 2021 12:59:19 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id lz12sm3436ejb.71.2021.02.02.12.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/12] scripts/device-crash-test: Replace the word 'whitelist' Date: Tue, 2 Feb 2021 21:58:19 +0100 Message-Id: <20210202205824.1085853-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- scripts/device-crash-test | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 04118669ba7..6812de42f8c 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -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: From patchwork Tue Feb 2 20:58:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ivjgLjDt; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcmk4r2xz9shx for ; Wed, 3 Feb 2021 08:06:14 +1100 (AEDT) Received: from localhost ([::1]:46996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72sG-00011g-J7 for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:06:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72lo-0002jP-W1 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:33 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72ln-0007Dy-6Q for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2uRkOC0iQiO30r3cMD7qB5pIME7EIhrWLL7nKiab9bA=; b=ivjgLjDtAl8+HAQ4Rw4K11fVsNnuE5kj6nrmghW5QNFwHCyB3fg3vCQ/+IXBekJV79A0F3 XDivDSjscChrfQ6JExr6Fa8Vx1cg2sMOq3jAanwRHAbKRLeAP6JD2IxXy653FXMt1m1l7H Klh1mSLLwGNNn0wjIN2vRzjreLSJKmk= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-353-uD5lA4w4NUCV3QI8UxO1UQ-1; Tue, 02 Feb 2021 15:59:27 -0500 X-MC-Unique: uD5lA4w4NUCV3QI8UxO1UQ-1 Received: by mail-ed1-f70.google.com with SMTP id bd22so4301204edb.4 for ; Tue, 02 Feb 2021 12:59:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2uRkOC0iQiO30r3cMD7qB5pIME7EIhrWLL7nKiab9bA=; b=Yeb6x5eZyWtFTTy8MfV0WRfoj5gjFjLI/Aq6hZuwsA1vb+YS3p1L8KS0FujYEOxIxr eM6XfmwYReYTCYjlCYZp9SYkadFrqouaZz6HhlRjZe1iQepYuCJItEFIY98n13L7qSRg ffbMF+u4yqxT+vFh8b4psNQ+Di3SA3fWgyQyPamWjEaEZN7py5LntlDawDCKbPfgAplg /1MG5sX7CbL+hhEkgfuYf2Qqv/rI0NREIUvVPzXcAA1iUqKh5tG+XcTkINYLkrYFt4Ik VfjsAHulMg/l4fpPiwSfcGSf/R6pwNAPrNA05r4wKtPhR0VfrmZRh56Tx6t865lKv3cU e3Dw== X-Gm-Message-State: AOAM532znbW1P2y6oHhV21KzuSPekyPNBMRPPbE3Q11l+YQ2KMs/fYQX qz9wD912+xSV0mf2dFFLuSAhX9U3dSNLN+/9mWyLvpNFevwJqinAd3du8sfUW2iQsJtGXGPCI4K RyO6GZQb6zY61hjl2uYoptLXBURy30NXslTNZI4Vsusbl3LBAo9dAG+sGHlTrVPaM X-Received: by 2002:a50:acc1:: with SMTP id x59mr723558edc.43.1612299565610; Tue, 02 Feb 2021 12:59:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyV+hZ1g/jXNPyKi8KquZsEFJD/96hNNdP2T4tm5/D31fwggm44iPA6t+qfzwPYGDl0woV3jQ== X-Received: by 2002:a50:acc1:: with SMTP id x59mr723536edc.43.1612299565447; Tue, 02 Feb 2021 12:59:25 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id w8sm9530415edd.39.2021.02.02.12.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 08/12] seccomp: Replace the word 'blacklist' Date: Tue, 2 Feb 2021 21:58:20 +0100 Message-Id: <20210202205824.1085853-9-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Acked-by: Eduardo Otubo --- softmmu/qemu-seccomp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c index 377ef6937ca..4c684bc9e71 100644 --- a/softmmu/qemu-seccomp.c +++ b/softmmu/qemu-seccomp.c @@ -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; } } From patchwork Tue Feb 2 20:58:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fouTjSU4; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVck332Gyz9sj1 for ; Wed, 3 Feb 2021 08:03:55 +1100 (AEDT) Received: from localhost ([::1]:39492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72q1-0006HG-Bu for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:03:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72lx-0002pL-MI for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72lr-0007Fz-Mp for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fKnLbyA8FIbavjZwoLXTNCVP5/2XH47CtTSSPjQnXKc=; b=fouTjSU4aM0lpLLEArKWMiyQDrHrOSaBibZASGJ/kS/lIzyr3SVAYyvy+VtIolrcbMPt+f 1NkHea6PqLGVP2no+qTBl0bptGivXQZTnbdjfrRz+vHkklct178FoZr4OGChDx5xwH+DFx 7TeoOd5iZNSGnV2zBea8jDGYgTWDIW8= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-119-qo3xfsO9Oh6yC5PPBlZbRw-1; Tue, 02 Feb 2021 15:59:32 -0500 X-MC-Unique: qo3xfsO9Oh6yC5PPBlZbRw-1 Received: by mail-ed1-f69.google.com with SMTP id f4so10206463eds.5 for ; Tue, 02 Feb 2021 12:59:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fKnLbyA8FIbavjZwoLXTNCVP5/2XH47CtTSSPjQnXKc=; b=I6HQl8JxA9ytpWilcKfXIcM8TSq2Eu9Wgb1Z76RyovLWw951s9bfPmkNheZ1PutTXw 7wBEcGWJeO3xk4Qq5biFgPxOD5e1DTl9yazs/gouZ8IRi1TtlH1rfN/gyxGVkcvsrlf4 zQ1SaTTo0YeNfcdvy0/6/BPFnS3SrvRmEySVnzEBxFl5G+VTIbvq7Wen003xEU6DffWQ yb/vmgZbDRrBqmXZq689P9UaJN1FuiM677qEO6WwQI1+Vx22oPvuX1D3i6erVhySp2jl g0GyhT7MankLHf4wVy03h/K1K9NPLrBV9iXE9m7qeEsOB8hqYBGcQWO3kEZm4KNYax2V 70Lg== X-Gm-Message-State: AOAM530n0bDEuVHejgAfy17ybOINcaOE+UvOH1W8cEvxSF9fEszUyS1+ jdaBM0rC9urrl/4G08FiIb7gr4RYPbD432Ki21syUVCDgAFJko5xI6gLDRF9MxqnnvMt7beVFjh RNWuQwr4xviCcG4vqYHb7f/E1fFNOytC4Wl0DVZzpKbLsixVtDe24Iqe4i9WTU9jr X-Received: by 2002:a17:907:2d9e:: with SMTP id gt30mr3077706ejc.357.1612299571412; Tue, 02 Feb 2021 12:59:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5Aa9y4KjL1M4o9+I//59lOtc0x7xo8x877LQnM1OUm8TzwGhTYWYyWa9rW6YBtO4yv9EcfA== X-Received: by 2002:a17:907:2d9e:: with SMTP id gt30mr3077684ejc.357.1612299571200; Tue, 02 Feb 2021 12:59:31 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id du6sm2345ejc.78.2021.02.02.12.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 09/12] qemu-options: Replace the word 'blacklist' Date: Tue, 2 Feb 2021 21:58:21 +0100 Message-Id: <20210202205824.1085853-10-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé --- qemu-options.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index d0410f05125..75997ee2ea6 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -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 From patchwork Tue Feb 2 20:58:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434960 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WQ41MlHS; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcr91dg1z9shx for ; Wed, 3 Feb 2021 08:09:13 +1100 (AEDT) Received: from localhost ([::1]:58668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72v9-0005kV-7B for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:09:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72m1-0002q6-IK for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:59746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72lx-0007Jb-AQ for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dCfyGHzbfzBUDJy/U9zdNX3uk8PQFIhBr0LUrgPgKnQ=; b=WQ41MlHSXRiaiqJOJS90tYS8mkc5tp6nJOr3yYtN8kAsboKrGtYYdZSmUGhApEBu6UKR/O WDjp0VTMeP8C7GGmh4kYDLuDzVsITVAjhzPptWIVxxJbMCnt6J+hjjjJndA2dQXQn73qfZ BTRRRHm4r5DJJ68HA5S3OF6zcZV8Bi8= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-108-ik44NzFQOciqJrc3tcwRXQ-1; Tue, 02 Feb 2021 15:59:38 -0500 X-MC-Unique: ik44NzFQOciqJrc3tcwRXQ-1 Received: by mail-ed1-f72.google.com with SMTP id f4so10206631eds.5 for ; Tue, 02 Feb 2021 12:59:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dCfyGHzbfzBUDJy/U9zdNX3uk8PQFIhBr0LUrgPgKnQ=; b=ZYxLwkyaHKfq+36Xeg9uOBGkWHluwBHaiWyy4JNBc8aFysZA+nCzMWK1UQ9Yvc61fS Cx+b7/9G0mnuHPFPZnEcyzIINPyRpoa/KgjMmUsb5fny+LIimUR5BE4BdF4+3vG4hCGl oZHElHlirtYfLVvCUBn4+i7sblW0wdkRw4v2KrhH/PN7cj8P4SPi3qhC88XpbN2NJAao ymSloBG95iZ2gflPhOA9Dhi3u1lv0I41yoZfmbrCa71jO8qQeldK5Ysw+m/tUO4VYHi0 y3USS9GsBu9/PcRR3Z3lq0j+x4w+nhT1MFDUJ07PQYLkYJRodttsfsQwHuu2myKMVrqy H+qQ== X-Gm-Message-State: AOAM531kzjK7oZDrLdXrWNnFXzcI0idy5WzpmOkxofB9gRKRwLUcpY2H Jp1Uaxp0Qs8kvJwMUmI1rS5DFayyXlIwGGO5z2qB0meHPCtCxOhvnQHifOhfgqdrxy1R145BxKF 3hsxi+Kitwb++/lI5vD6qTLq0o7voRbDa67FcMGUtZ1jf6PB0e7mDe2+VFXfBeaUR X-Received: by 2002:a17:907:78d5:: with SMTP id kv21mr11594792ejc.461.1612299577127; Tue, 02 Feb 2021 12:59:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0uC8KACyPZfRQ8o/TZNen5kFDDAgF1ARFaqFYyBX32kGh5iUulVnTzasyloiiyZbFHyj0yw== X-Received: by 2002:a17:907:78d5:: with SMTP id kv21mr11594764ejc.461.1612299576867; Tue, 02 Feb 2021 12:59:36 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id g9sm5662ejp.55.2021.02.02.12.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:36 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/12] tests/qemu-iotests: Replace the words 'blacklist/whitelist' Date: Tue, 2 Feb 2021 21:58:22 +0100 Message-Id: <20210202205824.1085853-11-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé --- tests/qemu-iotests/149 | 14 +++++++------- tests/qemu-iotests/149.out | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149 index 328fd05a4c9..b1d3f5fad67 100755 --- a/tests/qemu-iotests/149 +++ b/tests/qemu-iotests/149 @@ -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) diff --git a/tests/qemu-iotests/149.out b/tests/qemu-iotests/149.out index 6877ab6c4a4..19ae092987b 100644 --- a/tests/qemu-iotests/149.out +++ b/tests/qemu-iotests/149.out @@ -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 From patchwork Tue Feb 2 20:58:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434957 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bWj4/Q4/; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcn51f0Kz9sWw for ; Wed, 3 Feb 2021 08:06:33 +1100 (AEDT) Received: from localhost ([::1]:48078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72sZ-0001Tb-0K for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:06:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72m9-0002sD-1I for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72m6-0007Om-Ti for qemu-devel@nongnu.org; Tue, 02 Feb 2021 15:59:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GCsDS0t3ZTS4NBHckBplUJ0frNx7d00ggon3r8WYiLc=; b=bWj4/Q4/lNBwS0tmHnhgiw069y/5rocslXBvbAilltecq8KTjQ1uRRM3ehcgd7xk2mhezR qeAEe487NxOEDglzY4FkJaF5ri4XapRfVd4ozCV5mb1CFDaNWHovSwNBfOicMCDwMLb0+u 1TiAljyHt1sdXD0GYzymJw/h06uioOI= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-263-TfSiKqDUPAG0ABTGL8LceA-1; Tue, 02 Feb 2021 15:59:45 -0500 X-MC-Unique: TfSiKqDUPAG0ABTGL8LceA-1 Received: by mail-ed1-f70.google.com with SMTP id u19so10213679edr.1 for ; Tue, 02 Feb 2021 12:59:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GCsDS0t3ZTS4NBHckBplUJ0frNx7d00ggon3r8WYiLc=; b=mWwjhO1hxm4a6W0g5PC3NN78l43rYw3CHTTkA4I7Xx4GiuvFPDhx4o7CX7P8YXf4zd 23trM9vl8oLHmCZbjWKMu0XRrJ5Fm6jxY/nOpeLFF5skJuuCeccHHZJJcGT8swNVeVA/ BthWSBKjMSidWCsEdmWiYFIBAtmbvebb4ZCWKzGpWgmmmd7CfjCY34KdswN5VkAkOMH/ TPpE2sBp+cwLwoCExmxh0rz8NahtcX0VXm75Tyg9tFTzIGGGwJqkCAmtmhgoMr7cJzjn WkxBLaU/8yM9hOcMWbXen4rgSaF4SwUr0b1EZVps1LJN1VSHAiXYFvVlCtKy0Gmw51BJ wufw== X-Gm-Message-State: AOAM530rly2BfZC4DuHEkKQ0aY6jOap3U1KnKj0tuI+uzKOANPuMDXY7 SKKdC0IdXeFCotOBrurU/OwYCgVApNl7jU4JrO51BEJKpLihywKzxq0xsqf9YvvkWwhHMxoPIuL 86QhiYTvbSiBby7mBhb6r+az/91zFQq57eD6LrxbJb5sbPTpyRGbqx/ei6ygRI5yD X-Received: by 2002:a17:906:5e5a:: with SMTP id b26mr12697575eju.327.1612299583650; Tue, 02 Feb 2021 12:59:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOQeuoj112ym+ONA8FZIjcqwUF9f63qKeGMpddE4Wk1sSoT+WivNEbYh/Xf6y/79FDpYFrXA== X-Received: by 2002:a17:906:5e5a:: with SMTP id b26mr12697549eju.327.1612299583451; Tue, 02 Feb 2021 12:59:43 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id r7sm11639ejo.20.2021.02.02.12.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/12] tests/fp/fp-test: Replace the word 'blacklist' Date: Tue, 2 Feb 2021 21:58:23 +0100 Message-Id: <20210202205824.1085853-12-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alex Bennée Reviewed-by: Daniel P. Berrangé --- tests/fp/fp-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c index 06ffebd6db1..5a4cad8c8b2 100644 --- a/tests/fp/fp-test.c +++ b/tests/fp/fp-test.c @@ -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; } From patchwork Tue Feb 2 20:58:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1434959 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TV4OUp+x; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVcqZ26Vxz9shx for ; Wed, 3 Feb 2021 08:08:41 +1100 (AEDT) Received: from localhost ([::1]:57312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72uc-0005DC-6c for incoming@patchwork.ozlabs.org; Tue, 02 Feb 2021 16:08:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72mN-0002zO-80 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 16:00:08 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l72mD-0007RY-AN for qemu-devel@nongnu.org; Tue, 02 Feb 2021 16:00:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RCwL7X+YG8I7zuVW+8dXIaUVElWXRJ89Y3C+f17wiig=; b=TV4OUp+x0phCHczao5smJjNCcc3mxI9KH7F1h3a1bf4HQEJITvIpvvNI8/1l2jhZHF+N/6 v9/uOiiVsg3xVklci5V3wn5Qzz2ivHXM6kF04dMEZTBtdM/e4qo/V/y/TAC6BMKwGPyDfM 1sShxsQtIGkraIYATYmFr0UityJgnGY= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-319-GfkTg_eDOFaKKpgJNZCGog-1; Tue, 02 Feb 2021 15:59:52 -0500 X-MC-Unique: GfkTg_eDOFaKKpgJNZCGog-1 Received: by mail-ed1-f71.google.com with SMTP id ck25so10159923edb.16 for ; Tue, 02 Feb 2021 12:59:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RCwL7X+YG8I7zuVW+8dXIaUVElWXRJ89Y3C+f17wiig=; b=iILJK/gRVwUZQRZrkYm9vvHwIqVdI70oj8o/Vui1F9HluehDhgjeKLQfOpKkDZFslw rt1sR2y2KHkJVkyaB+JNQCX0QqoQ79QUgvhWeMpdVU/j2/wC3u91jevpnZ5TaFDdtTkR 1a+3u7V/xJbigQSBcWgnmP4BvtPz2J2FvxYJ9NMvjesiAPZaHqmahe3WYsi5JS71M+Uw 2QV9YCuM9CY2oEdCXoJP2nz6rlwJ7+Xh99UPcsYw4KCkfjGEPEHow9b8la2UpPQ5M5Ij 8oyoOfVcnifRn/YCW8kInFPuIM3oe+ATplwwNdy60AiHMuLhc6rcXVcsGWs3y/ghYb4A PcaQ== X-Gm-Message-State: AOAM533eUs+FMJXlTXKYeFrotJgkkkj+OWJ9t2PmgBa8Ot/dhSLO9lJ9 PY1E46eF52ACxJo0wA4zCASIkFvedL2fPN4OC1Xa+MMdDZQ4RUdNtKsKAVur+0D1vUYaD845h+F UMtjBTADj9oEKlW0T0FrPRHZ1kCoh4a02LJUQrNl9AzceSyEEninCUfOQvpk4Vbm5 X-Received: by 2002:a17:906:25db:: with SMTP id n27mr24055307ejb.552.1612299589433; Tue, 02 Feb 2021 12:59:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwtBhkk7ZwSbIIG00pnkr4d8G9mx4OqL+199FXTzPG8YMKWoUzXyXTvbwMUAaceZWjiciitA== X-Received: by 2002:a17:906:25db:: with SMTP id n27mr24055283ejb.552.1612299589261; Tue, 02 Feb 2021 12:59:49 -0800 (PST) Received: from x1w.redhat.com (7.red-83-57-171.dynamicip.rima-tde.net. [83.57.171.7]) by smtp.gmail.com with ESMTPSA id e7sm11918ejb.19.2021.02.02.12.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 12:59:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 12/12] hw/vfio/pci-quirks: Replace the word 'blacklist' Date: Tue, 2 Feb 2021 21:58:24 +0100 Message-Id: <20210202205824.1085853-13-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210202205824.1085853-1-philmd@redhat.com> References: <20210202205824.1085853-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.386, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , Michael Roth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Max Reitz , Alex Williamson , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Williamson Acked-by: Alex Williamson Reviewed-by: Daniel P. Berrangé --- 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(-) diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index 1574ef983f8..64777516d16 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -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); diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index fc8d63c8504..81c3e30df77 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -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; } } diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index f74be782091..759a3b1abf4 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -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", diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index c0e75f24b76..079f53acf28 100644 --- a/hw/vfio/trace-events +++ b/hw/vfio/trace-events @@ -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