Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp497056lqp; Mon, 10 Jun 2024 10:07:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0Mf/sdxkF+ZTnHweyNqfaJCCk0sKFksGJKDWIUgxG8207BOlMbHUOTZhsPWEjyhGVh0MLs8AYTIvCeQDN+ZxnlIih8ekerS6+xqvTXg== X-Google-Smtp-Source: AGHT+IH0H1KEjkoR7LQtsY6pJrHptYVhjNOUWOE7tsjHibJloeqX3D0rnGrFVD1e3CfhFba21nP5 X-Received: by 2002:a17:90b:4d89:b0:2c2:da3a:871b with SMTP id 98e67ed59e1d1-2c32b4b1915mr342646a91.11.1718039222346; Mon, 10 Jun 2024 10:07:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718039222; cv=pass; d=google.com; s=arc-20160816; b=XYgU8ir3nMGK+6an6yen0J740TOmmL91NzKGTdN5udger8h0r+MADKSy0YwM8Wo87c YSLh+7dAYp2ZZowTWYl9jAo8k/cbmt60V832vS7Gn8kI8qOIdOiIaj5lbyoRKmKnS6XB ZA+7rPIzet+YUh4gtNPiTHWDXJmn4HLuWohFk4uroxfAzAB77D8X6MAQPcKUzBu/W8J5 veXrgY0kVmDwXi7cCFlpkbxLnr1RMA6wRvSrKbnRpYO4S5C/IGZap/iyRdgX3oU59Cy0 1QwDYFNHQ+iamjeVSt+DHgH60tcoaZmeGqZdhFxGa6yX1xoZqIi8FjBGXbYujuVbjq0L OysA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dJ3O/D428y/ZYbWlGVf8qsoJeir0YLsNI8qBS6AMiiQ=; fh=LMKqcyE3EIAJnnkvVsMeJXPTmt+oszhjlGV8W/c/+4k=; b=glY43RZFDMEW1nFkPxMs/HoNTI6NP3Vn5rC5hpFEubA0PW6Y5+3WCyHZwzFyviJWRM vc0XJj7CjX8hgXUgxfqNj5SdFtyCYzGJY5lF97/Y9e3CIb1k4qejJT1Kw00miu17gIg1 JlsgOq2B7CGcOfFWyr29mxk05Yof+OwnkMqCgezItvYsEDRRl13quFUvYjicI+gwt+GB 2Wb5Rl/gwepaT011WA0RFoauzpGfX2zQ52rJS7TFAwA6oSa7Y1p3Jq3FK4HkVcQEM9nF Ab1p6bYG9HODMaxnBV6t2YGNcOqYhIrTvhZwX597etghzfrVe71vqcwFtbpqagUmJwzh XWOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MxLVmKdS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-208630-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208630-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2d0e2b281si5286506a91.1.2024.06.10.10.07.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 10:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208630-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MxLVmKdS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-208630-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208630-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 359B0288A78 for ; Mon, 10 Jun 2024 16:59:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3B6F14387C; Mon, 10 Jun 2024 16:59:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MxLVmKdS" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02B081EA8F; Mon, 10 Jun 2024 16:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718038749; cv=none; b=V1LRQ6utXvcvfFcBrZ5ftyvnSbwpOQZMeFvM3XfiMeTpNuerfIWCxasvgfma/n9IamC24k4tDkv3Wc7s5gEyHVaQ/QFKTeVsRqSPOE5Qdr7DKLAJR3ydhPaAvcQYXDgUuJiKZPf9hvEgikiE9FcGyJKMaqjcvYH2sWQy3UqdRQo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718038749; c=relaxed/simple; bh=9D3+hG1aRfAFePtrgS5rz7tAOYVp4aSm+73FoWh/he4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QzwINx5WIdvvfc0HaU3HTyzPweR6QmLt0LmTsHXmwG6w1SP7gOnBZOmzg9SRbd7GcRaXMZDzCe86jlZAMfFVY2efNTaKj4+wO5yyPqeQa5rI5KUWgdE9oqXwafrWKOJq24dwaCPXCW+cRmOYeSjcw1zmSBU2d1MtKFe1pe+9EiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MxLVmKdS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A0C5C32786; Mon, 10 Jun 2024 16:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718038748; bh=9D3+hG1aRfAFePtrgS5rz7tAOYVp4aSm+73FoWh/he4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MxLVmKdSgBkH6q2ubwseqrRXZQ96btSv8+fPdDoV/au92GQCR7N4oaPEy+pXxhY8v AS10HSs5e49HbTCYjrPWg8+tjXGaeflr0/QdEO1e/eGgaLI4aB3+AepDyI+8xbqZJ1 AL9afjm6ei9MwRbnmWkY7B3oC/UTdjKb0WdFdPA3qIiMElk/ikhAUdrduTh2+1RWbY 6X5A8YaAmc6IwTBjF8fS6aASNC3MARvaIRlUtzn2pL7jIJKJbLOL68XPXQ2HkWHLaf iGYb92zGA5c8Fw4IQuprDoC9LbnE7fw4gi/vwB0dNonMpwShTtpm4vtXWzVe8WyoDd r2CsodAQoKX/g== Date: Mon, 10 Jun 2024 09:59:08 -0700 From: Kees Cook To: Shuah Khan Cc: Amer Al Shanawany , Andy Lutomirski , Will Drewry , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco , kernel test robot Subject: Re: [PATCH v2] selftests: seccomp: fix format-zero-length warnings Message-ID: <202406100957.750569FFD1@keescook> References: <20240607124117.66769-2-amer.shanawany@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jun 07, 2024 at 02:58:47PM -0600, Shuah Khan wrote: > On 6/7/24 06:41, Amer Al Shanawany wrote: > > fix the following errors by removing empty print statements: > > seccomp_benchmark.c:197:24: warning: zero-length gnu_printf format > > string [-Wformat-zero-length] > > 197 | ksft_print_msg(""); > > | ^~ > > seccomp_benchmark.c:202:24: warning: zero-length gnu_printf format > > string [-Wformat-zero-length] > > 202 | ksft_print_msg(""); > > | ^~ > > seccomp_benchmark.c:204:24: warning: zero-length gnu_printf format > > string [-Wformat-zero-length] > > 204 | ksft_print_msg(""); > > | ^~ > > > > Reported-by: kernel test robot > > Closes: https://lore.kernel.org/oe-kbuild-all/202312260235.Uj5ug8K9-lkp@intel.com/ > > Signed-off-by: Amer Al Shanawany > > --- > > Changes v1 -> v2: > > removed empty print statements > > Kees, > > Is this change okay with you. I didn't see any use for > these empty ksft_print_msg(). > > I will take this patch if you are okay with the change. Dropping these means that the "#" marks go missing. Currently: # Running on: # Linux proton 6.5.0-25-generic #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux with the proposed patch: # Running on: Linux proton 6.5.0-25-generic #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux This breaks the TAP syntax for the test, so we should find a different solution. Perhaps: ksft_print_msg("%s", ""); ? -Kees > > > --- > > tools/testing/selftests/seccomp/seccomp_benchmark.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/tools/testing/selftests/seccomp/seccomp_benchmark.c b/tools/testing/selftests/seccomp/seccomp_benchmark.c > > index b83099160fbc..6fe34be6c693 100644 > > --- a/tools/testing/selftests/seccomp/seccomp_benchmark.c > > +++ b/tools/testing/selftests/seccomp/seccomp_benchmark.c > > @@ -194,14 +194,11 @@ int main(int argc, char *argv[]) > > ksft_set_plan(7); > > ksft_print_msg("Running on:\n"); > > - ksft_print_msg(""); > > system("uname -a"); > > ksft_print_msg("Current BPF sysctl settings:\n"); > > /* Avoid using "sysctl" which may not be installed. */ > > - ksft_print_msg(""); > > system("grep -H . /proc/sys/net/core/bpf_jit_enable"); > > - ksft_print_msg(""); > > system("grep -H . /proc/sys/net/core/bpf_jit_harden"); > > affinity(); > > > thanks, > -- Shuah -- Kees Cook