Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp399910lqp; Tue, 11 Jun 2024 07:46:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVccdsaGdQ+hJKbUdydLCaXroV6PZJz+IRfjfKX+5Nj8k7zDFfXhaudgos0+lELktDusJ0hban6AoUrBkmu2J+84biHWzhrX3+ztn7ZDw== X-Google-Smtp-Source: AGHT+IG4g65miIP5ODVBCMJ29K6JH1/NK5biAqFkCU2j660ZNe3bc0PP8BB9yNSuBYQzqb5nhMgQ X-Received: by 2002:a05:6214:5690:b0:6b0:6472:be85 with SMTP id 6a1803df08f44-6b06472c035mr111399326d6.60.1718117212142; Tue, 11 Jun 2024 07:46:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718117212; cv=pass; d=google.com; s=arc-20160816; b=GAhXxbsc9xk1b4iwaAyqQ5WLbulPX1LZ2Sl9SwUTUHAk9K0bgys7vtS4z09pnF7qSC h/Wqs91W/fWF5FXsLce66uGk+KEyDp/oPyi2d5JBIC0ZhWPRe1Px9AxqJoxdqw0Fqa5O CAYdcKRRrAoWSN6x9Le6WQEi+cZWCBrGpqdabf82Rfwtq+Wu85wiB4QF45jKZSDSKl/x Y5g5K1wCrJz403C3genXadFmOjFljhkChstYieJK6TZjTwbgRPxvWHSAlwcGPR+M/Fl9 SofVlTKyd5baZJHGq758I6C2JrHOdKAuSGpxgHPKRPq/Sg5Zw1lcn46dRsq++aiL2zrh 2QhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=y4oOmcc62KuINJgrDPpdqc07FOLSw//xTr8h1MxyG7o=; fh=pBGdrL71bhhyXOIReVYD1Z4KGg4Q42ZsjTVBI0tJZmk=; b=Z+0mSK52BxjK8BFREhX6B0uFshpriMVWtU+ioleLAqgci9PMa/njcLV5xKkdHxNLCp Xb/3JlqXMmfMCHX/ZQtQ+Sx7q9W1loWeqDd/3ZJEjUt16zXORqHkMD9KDDfFKNDnGqg9 sc9j1lCAh0oZzwcZUPVaXSm4Z+NK9EbQxoqSmKcuyeCxyThP+65PHWP6plZLnoKecPh/ 6fuo9BOVo6rW81PBKt3acwB0q0W8NAH9Ol4Xz/ldxFIh5aE49ZTraYvEiTJvMp2ppUHA piU0kfjAgGA8wmdhazQTycsX1Es4NFQqh9QPrehv0NRZyeG21y/PVz8ucQMADv8cnHeh Pf5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=avwe33f7; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-210081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210081-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b04f9d1e3fsi129120026d6.392.2024.06.11.07.46.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 07:46:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=avwe33f7; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-210081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210081-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D58DB1C231B8 for ; Tue, 11 Jun 2024 14:46:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1316B111A8; Tue, 11 Jun 2024 14:46:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="avwe33f7" Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30DB5171A5 for ; Tue, 11 Jun 2024 14:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718117207; cv=none; b=cdlLYh29eqxsqWsQQZJxA1IrI2+akGgWA8mJbYY3SFMRy0d9iHwYC9ZMVyPN9BnWsU1gvXUjpMo8ZuutkxEo07+Sl62c+S0oC2/rvMpxkjCyhIe6CCiJtw6P3hVowtL3/kgEH9GycV47ZBWWbKW2IQ3meZK6BV98KEh/cFqpQYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718117207; c=relaxed/simple; bh=YS93EmhvsNCHUzkRltXmFg/kyvtPxR/SgrHEK/06tyo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UppNW8GKGIYJnwat8kMIlgo9Nu2Ln3EtwYOKZNoxAw8TNj0PqVbLqycvE1YQZ0KOZoMKt+4B+Ao5UbOF5VVZWP/9Q9oCf1GYGbGiDoXuMx9klcv38rVfUAPplMt6kg3M9rTDv6mChw20f6kkiSGu3lVT/4LIlX+Vxc1fpML2hkw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=avwe33f7; arc=none smtp.client-ip=209.85.128.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-62a0827316dso5535807b3.1 for ; Tue, 11 Jun 2024 07:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1718117203; x=1718722003; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=y4oOmcc62KuINJgrDPpdqc07FOLSw//xTr8h1MxyG7o=; b=avwe33f7YwCNbY0wvDVUzWsz61zGu4FoZj5mEyCP1cZub3xa44ZcFU6ClBVdD1L69D gkKiGGyteHTx09aMfX5LPt7MsYVRZzhABWYhNC44EZfixjPPPdW9KJxdizB0rOt5B3TC 6OJOgrdqWGH5T3v+7tkNNcYxCKOrV7MKHyAeE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718117203; x=1718722003; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=y4oOmcc62KuINJgrDPpdqc07FOLSw//xTr8h1MxyG7o=; b=dSKDniEkh9hczZ/W977ceCKGzCOzaBJeOxrVCjRno/EI6fHDwHg7ubgJCSKYiKNjpH O5Z1UmGrG+QcGehdnO2TeEQa/HciDH0ryUjGU0VC8gqp9mUKrOCXnn8PcP8cVsr5Kzj9 0M25t3AlzqqA5pPEFYdCbeDkoeCH9VlgYtyYqAMtQOmlY9ES0w0HvtMqpjmT/ItwDalr +zlWFGZGagMOUoOoGIyCPY25c4qDDg8spLa7gfzOLZUJGTFIv5dc/7Ogtz9A/K28ue54 6dGmyahBDqARrJOjpBEcHumq33aojzMFh75c5OLxZM0jkgjq4UMLyMse670fba4oF6zg 4vhA== X-Forwarded-Encrypted: i=1; AJvYcCVX9pFIaNBegZg+ajfXQ52PLa99z6ll3zQozR/bUJyRqG5S6IRC7ZqUOqFMLZfmM2NR3rW0PWIUpJ6lc9WVvII4T6KM2cn8Th0Clzaa X-Gm-Message-State: AOJu0YyYeL+x7A5YMYSO7TwyYHnzF2EubbZ8KOceKSpa36rUu4d+o01s 9WZ4fLh0Cucrwdly8oYZ9vtdmxc1qauTM5Wmbi8wC3xwO9mT9uvMAu5M+9gx54o= X-Received: by 2002:a0d:fbc5:0:b0:622:cd7d:febd with SMTP id 00721157ae682-62cd568ebc8mr99646547b3.3.1718117201883; Tue, 11 Jun 2024 07:46:41 -0700 (PDT) Received: from ?IPV6:2607:fb91:213b:a129:544a:cc06:ea0:4045? ([2607:fb91:213b:a129:544a:cc06:ea0:4045]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62ccace8257sm20304497b3.43.2024.06.11.07.46.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jun 2024 07:46:41 -0700 (PDT) Message-ID: <43e24489-a3af-4e53-afc6-ff1dd9462ee2@linuxfoundation.org> Date: Tue, 11 Jun 2024 08:46:39 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] selftests: seccomp: fix format-zero-length warnings To: Kees Cook 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 , Shuah Khan References: <20240607124117.66769-2-amer.shanawany@gmail.com> <202406100957.750569FFD1@keescook> Content-Language: en-US From: Shuah Khan In-Reply-To: <202406100957.750569FFD1@keescook> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/10/24 10:59, Kees Cook wrote: > 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", ""); > > ? > Thank you Kees. Yes that would work. Amer, please send me v3 based on Kees's suggestions. thanks, -- Shuah