From nobody Tue Nov 18 19:43:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612299551; cv=none; d=zohomail.com; s=zohoarc; b=BpfvcUMJiMj0Cyac+Wd3UjvOUVdwm/zck9C+K3jUTgcLmf2Ab8iEVcDqBv8Zp5qWc3vFc7kEi/hq3G33t6he5Dfho4mIxV/45vk+kLaXYDLKCYIXAjCLvZeoDPWtWuUze4BG4Y4MGEL/nHmnQ2Mez2PuFy12Dh6ZLKdmRF2Ctq4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612299551; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Zr5wlPqSBAErI1zYjHx4DGcwT+gbzmViuOOQn3eQ5nU=; b=Wu5oVF3cNLXTkEeo2g9ZmEG6JeBCgB0C9ajFvDP9qXKGOZlBpNFk6ApbaJZ9BlufcHYMwFqrrJxYVHsacz4ouzkz+zAyx/ovEYkgiKz5JvJdjDNFqNUGF8HRGKWyFD2Ly96+xjE1MnhIHfeXSIFn9u68lW50F8P48Gl/SaXQYEQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612299551539855.6023855329111; Tue, 2 Feb 2021 12:59:11 -0800 (PST) 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-142-A_m4A0m7Nz2KFo3DQ5alHw-1; Tue, 02 Feb 2021 15:59:08 -0500 Received: by mail-ed1-f70.google.com with SMTP id ay16so1341595edb.2 for ; Tue, 02 Feb 2021 12:59:08 -0800 (PST) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612299550; 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=gRzNe2DRS+M0nBDhC8DcFAbu4Xt2EzYifIp1RMufftX2YzUihcPb6aaaqIR7P7NQ0NEjPp EodKXbyIJ4b0ZgOjHvE2rgvFt6Dnp0KGFfmsyqBTJwFLKF0AGAW5X7vye1zBBYlXom0x9N Fei53ie6V42+q+PrekOmOuH1maitEGE= X-MC-Unique: A_m4A0m7Nz2KFo3DQ5alHw-1 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=LB2NeESFaMBMbziMZUM/HO7ym1aZMSkdABNc5Okm+ZxiJM9XjCAJ7G1SaBlTGYki5k wfS49xBu3ywrbKgeu2SmT890Z+gUr+7dEq/mnU003jJPP+UfQvEPdWOAXQ7XVBEgFiZu DFf0hFEg05AoKuWFOYh5ax+V0TULvnowRkWw0CSWUZAwdZsX6nRjRAqpMQvWp1hFQGD2 rE+CYM59S7y54p7c320y0I+jEdSYIZJip2DPNi2M9SKcZwjZePDcN/HEC0QBZbXwi90s amv88290A1cVcvKSF1W0AXt3nyATm2w/qbXQoMnBSdQNjCELJa8uciTGE5ZQno9z1944 PM2A== X-Gm-Message-State: AOAM530zym8ahs1KdFyEHcgwoy9/MKfrG3dNx2OVSU1kWOuZXdnekrZx tmsYvt9PXMuHuSgiir/hLUt6s9FW8QI8obrr01SaQ+PZq8ELT+9VUHUerhHxsP91IxmIT11H6Lw 4bjxRXtzhvlHcBw== X-Received: by 2002:a05:6402:26d3:: with SMTP id x19mr3427edd.0.1612299547678; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , "Dr. David Alan Gilbert" , Eduardo Otubo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Gerd Hoffmann , Aurelien Jarno , qemu-block@nongnu.org, Kevin Wolf , Michael Roth , Peter Maydell , Alex Williamson , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Dr. David Alan Gilbert --- 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) } =20 /* - * Only keep whitelisted capabilities that are needed for file system oper= ation + * Only keep capabilities in allowlist that are needed for file system ope= ration * 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); =20 /* - * Whitelist file system-related capabilities that are needed for a fi= le - * server to act like root. Drop everything else like networking and + * Add to allowlist file system-related capabilities that are needed f= or 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/passth= rough_seccomp.c index a60d7da4b4e..c8b1ebbe830 100644 --- a/tools/virtiofsd/passthrough_seccomp.c +++ b/tools/virtiofsd/passthrough_seccomp.c @@ -21,7 +21,7 @@ #endif #endif =20 -static const int syscall_whitelist[] =3D { +static const int syscall_allowlist[] =3D { /* TODO ireg sem*() syscalls */ SCMP_SYS(brk), SCMP_SYS(capget), /* For CAP_FSETID */ @@ -115,12 +115,12 @@ static const int syscall_whitelist[] =3D { }; =20 /* Syscalls used when --syslog is enabled */ -static const int syscall_whitelist_syslog[] =3D { +static const int syscall_allowlist_syslog[] =3D { SCMP_SYS(send), SCMP_SYS(sendto), }; =20 -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; =20 @@ -151,10 +151,10 @@ void setup_seccomp(bool enable_syslog) exit(1); } =20 - 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)); } =20 /* libvhost-user calls this for post-copy migration, we don't need it = */ --=20 2.26.2