From nobody Tue Nov 18 21:12:21 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=1612545517; cv=none; d=zohomail.com; s=zohoarc; b=Msj16OCSEItdQlYZBSQXBioDEH/XQT+qX6BFqawo30pqNwuDy1lP3CEKm9K+c2DpR8fWqeCO6n1kd7PHFetrH9QsIODVtSzlqzdhhLHR/zrZ2gITVc2AOPZyQHFtB/w53TJextstK6nIguJBJnBUnm3VsK3KuaWrBfCatO9tA4Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612545517; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=tvkGAS1d8gMkXdxEKA7vhiRkEZi0iEfIHD2yWVNztu0=; b=DopZXwVUjiW8QSYMQ+/tNrKjgd5hxcvY19r2DR0/GAz3ldUzjt3XcG5pHkoiocBgZbNUT7+IeWqNwiIov7rGpJSKB1Nk3eg2rsxP2FzKTvNG/trSIxAxdKQHRRS9DSMW++QG9vX2+VbKkwcWanuU3LOoT3r5EoNnqz3uZGXqAgM= 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 1612545517254891.718393425412; Fri, 5 Feb 2021 09:18:37 -0800 (PST) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-600-kJxt2p1mMhyAhgG9VN4o3w-1; Fri, 05 Feb 2021 12:18:33 -0500 Received: by mail-ej1-f72.google.com with SMTP id jl9so2741722ejc.18 for ; Fri, 05 Feb 2021 09:18:33 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id jg33sm4024895ejc.103.2021.02.05.09.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 09:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612545516; 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=tvkGAS1d8gMkXdxEKA7vhiRkEZi0iEfIHD2yWVNztu0=; b=b4yrZlc71no83TgamvsB/fuXtXcaZphAx88izTsul3kn1EyaybTf1KEigZc/wLIu2Ydsjc nlB/pa3aHIfd+bW7Fau2EzobaxhpJEwTuNw1da5BGfGi/uW3EKC/U/KIKE9M1s+nKXvxq8 VnP/M69e0Z5vXjo9NYMH5lpyMlpzI5I= X-MC-Unique: kJxt2p1mMhyAhgG9VN4o3w-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=tvkGAS1d8gMkXdxEKA7vhiRkEZi0iEfIHD2yWVNztu0=; b=ZexTYCIE71gy7p3wUQQFo3sgI30MhxhxgNyVyWyCuj3SLc4GQ3WOq9TDTPjQJEvQI9 TMVojjSXmRwXp+GLtSk8momXxz+TY2kIExngtEJ1e+oS3v/AkZzhytfzUz7a237le/4W unkNxhvJsKwQuNQS5EXTLQipiAsuWdDSO1ntJ4Ng0JnJdTL9uX/fCxLJrE0hFzlJhYix QFhKU0uJguLn1/DmR4T7TFgTnCn/z3HQ75vvJugamJ8B3gwCkypuWqA72ek49vwHoNuB Lw2RgVturUF7iFBWleVHjsH7Kw5gjurWp+1qR3PFCR7ffpinZxOTZTac1jEe/XzpqTl8 32qA== X-Gm-Message-State: AOAM533I6mn9r8fIZ/CCh6HHC8pSvQ0+BtQugVnmN/j3T5VgdbPzYM6C g6G7wituydqFGJWoeTKSJkW94Phf22qRiqz8sisadYnSVZcnLdk5xu8V+UuodRDRqHdW0Mxnz3d AAWLYqBS0CItbWg== X-Received: by 2002:a17:907:7815:: with SMTP id la21mr4782908ejc.12.1612545512614; Fri, 05 Feb 2021 09:18:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwWRnt27K2PaM65RzYXPAJK+6DktdX6kWlNRCxmyUkeYg/7mBB3xs1gZyRore0Q1tyfkN+rA== X-Received: by 2002:a17:907:7815:: with SMTP id la21mr4782893ejc.12.1612545512441; Fri, 05 Feb 2021 09:18:32 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Dr. David Alan Gilbert" , Max Reitz , Peter Maydell , Stefan Hajnoczi , Eduardo Otubo , qemu-block@nongnu.org, Gerd Hoffmann , Aurelien Jarno , Michael Roth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alex Williamson , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH v2 2/8] tools/virtiofsd: Replace the word 'whitelist' Date: Fri, 5 Feb 2021 18:18:11 +0100 Message-Id: <20210205171817.2108907-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210205171817.2108907-1-philmd@redhat.com> References: <20210205171817.2108907-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 Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 147b59338a1..5f3afe85579 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b/tools/virtiofsd/passthrough_ll.c @@ -3204,7 +3204,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) @@ -3214,8 +3214,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 ea852e2e33b..62441cfcdb9 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 */ @@ -117,12 +117,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 @@ -153,10 +153,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