Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp281613lqp; Fri, 12 Apr 2024 18:51:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWI2+ZKQguql5nY7ycmsX111zCMD3oxE8i+RpI7Efa1h8RkCWaHEjRj5sAeRpj5bjErEZ+uWVHRR5DsSOM5CLa8iB4v3wkGr7XhaOzdGg== X-Google-Smtp-Source: AGHT+IGvGXCWoJ3ke9UpZSbOvg64OcPeFcqu1Z7ZEPnsBK2jIM7zr2IS2ideBYXJLHg4BBCE7ahM X-Received: by 2002:a17:903:2409:b0:1e4:344b:734c with SMTP id e9-20020a170903240900b001e4344b734cmr6025314plo.19.1712973098259; Fri, 12 Apr 2024 18:51:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712973098; cv=pass; d=google.com; s=arc-20160816; b=jSyRf+yjzWceRzNSVlQHWiGiKOP3blRkwEuIGuW/3ziKluiORHHEQsQKNUSuUPtNOr 92PDjn8uicwbhufTD0lgY1jfIsdeA/oAQkrwIWDDnrTtN1zu73P4nHIDuQWZ52IcPIPi 5uK0XiSsvrkjomrtcEoV5Zqk2J+Ikz2D56XGRGmB7CmkG2I5KhLmesQxElC8h1PTZmSM ipvPim9nR+BaU3PEUuYhXr60CailN+xF8Qtg8mx9C5axb4pRghoKJdnjW8pCaegt5NPz 9zXhTAyJRkoYz3esVyD/d7OdxwOXqE/t54Z3sl7zRwXT7EKpkGO58yF1htIS/VQRkBvB pnew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=s/jYHLvRaUJ+lBVWUfhvMvFS8ppGNLYChc1nBTlFCR4=; fh=L5RSg7+4Ie4Wvx8zHgtVi9SB89z/6S4UN1cfju50VgM=; b=hRCxQHFFhq0g05HwxHTVf9bGoYVSCRIoEpUx42mzDyA1nePS/MpxM+UJH9km2ZJtA/ rkuehcpR6uj/n8iWSdLUus7IZptIr1pyOriYOnyzgMnezBfzJk0XkCdkezSF2lKGTFcy YySL6HPAQvD72owP+Y8kYEUY83dksADsZLrh5ZGMWEYWAWzvL/HwBvOPTezdnP4b/wm+ tvRIMnJrqAl/N7882RTWNNkssRu9SC4OKYWrSQxaPf2HkO3i0CIwwZ4e9ZWJMCVX3ajU qIJjmpskgrM1lngowh/SfeUjX9RS2FvGhSEbxBLJqoSbHmFvWzqEp7xShLeldPGl0ea7 Rasg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="jk9/sFzc"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-143502-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v11-20020a170903238b00b001e0892bb867si4357836plh.0.2024.04.12.18.51.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 18:51:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143502-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="jk9/sFzc"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-143502-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 380F5B21712 for ; Sat, 13 Apr 2024 01:51:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33BE411CBA; Sat, 13 Apr 2024 01:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jk9/sFzc" Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (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 28EBE8C1A; Sat, 13 Apr 2024 01:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712973059; cv=none; b=O2J1eMl+KPt9TvScmEfH27FO7k9uD1IkQpN+Cfj7uCs5UOwgkViLJDDbzxrYDoy7dknHChwelBFg/G1+bc1XuZQuJEyNEI6wqeJmBQQ+Kv7lz+xLTgkLBgnSvZGmXw5nrdvf+OgWmb+kGBgjzIjiF+I1va4Rsl0OFapwi0e3k2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712973059; c=relaxed/simple; bh=wA/RPdttBexHgU+bBZVYr/ZfCaV8CxDw9/T2dT+Y+HM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MA7ys4TnlRlAXfUei7MKED/8K9VtbWGMh5lSr2Gb5q9N5omIsTYRuFgaYxjEXL+QUssWHMw0T3q2jyvqQ+vcHVR+9qxr/D9lPtdzVCmGjzyYH4TChL5h4h0XfpU59oJna+OWjt1CS60OwEWBdq9M0GQHJlwuJP7F+yxtjH5xujA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jk9/sFzc; arc=none smtp.client-ip=209.85.216.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2a4df5d83c7so917358a91.0; Fri, 12 Apr 2024 18:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712973057; x=1713577857; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=s/jYHLvRaUJ+lBVWUfhvMvFS8ppGNLYChc1nBTlFCR4=; b=jk9/sFzcUoDfOMKrRupnYhasbcJ1hb4YVuksONO530sOB9AToOVWnmPSi55VuhxY6o ykFKc1XShOynkXFCH7LTOMaZmByIaZCr6TLISY8qx48Eyn3gcrU+plJIuHJrz0X8NkBB SFyFALyjHHIDZgPzwhAQjDWzLiAQrMTLRdMuUozo36h+Jy00/As+LPk3RlZBUGHsm5fV IefbuGBLuO+GjFKYSoequn56WdjOEArMpab4w9G/WWdsBrGPDvlmmzXUURQyVLqjwpOa JnxVpwtDztCg0b3EKdi2WycUGKNq4MP/ZGUq9e0zHSCcB0HcvL/nEPDDWCjyWHMTdC51 r9BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712973057; x=1713577857; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s/jYHLvRaUJ+lBVWUfhvMvFS8ppGNLYChc1nBTlFCR4=; b=hdf+snM2p6GVscayJKrxrl8Gm/uuge2kZkjebNVHbBgoUVyrsSVAuNBqQMVHV2k6oF q9K/HsAXnq8mOlVFYBgq7FyoGaHxA2yZ4xCXc4WjTufEHggcS84G76sHmunjaCyF/BMm /xi0HVudM84ILFNFQ35FwcEuLDihqokOfG7zH0OqXrM0oWrUEC0yyxyiy95Xg/lz2xUq tka8/eBWVd1Prlqj9NGwxVSKV/cygMhSxNz0MTufkXfBf7Xew2mb/WH12H7c1NNUYyVz tWDNnCxQism5Z1JUfa6LAj3PfwRQ0CFRD33vyRa5CPytLrbaAyMTOFGAFZk0casBsEAu Z51Q== X-Forwarded-Encrypted: i=1; AJvYcCUa5ofFvFEguW3SlFglYGsYlSQL6Oq10tLfdIsSM9Bg6he26T7UpyNEhSMd4nrXVeOsbbBLbCRUVYXR198WPSJdoVwB+AxLLPqjyLom8M/Humz36LKN05QcP48IdJnusvJ2n2tzLTvrxu5jn7ckOmbD4imgRxU6q3dQF7SeUioWof4sVQ+e X-Gm-Message-State: AOJu0YzZpdvzb2vMOtyYNJWoMFSsqXaRW9dZqPa1XYhW7iH+jGLuXRfx 1pwOh/Ev/C6o+VQdb8skY+WQ8pVhh7pgSVvNMCtT8mY6ikjoDK7zxulhNTkBhyXwIbVDAybcMXN 7kvtfOv7FRr0zdFweKNDnzW6xgMo= X-Received: by 2002:a17:90a:e015:b0:2a2:f35f:f13c with SMTP id u21-20020a17090ae01500b002a2f35ff13cmr4040677pjy.46.1712973057271; Fri, 12 Apr 2024 18:50:57 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240413-tcp-ao-selftests-fixes-v1-0-f9c41c96949d@gmail.com> <20240413-tcp-ao-selftests-fixes-v1-4-f9c41c96949d@gmail.com> In-Reply-To: <20240413-tcp-ao-selftests-fixes-v1-4-f9c41c96949d@gmail.com> From: Dmitry Safonov <0x7f454c46@gmail.com> Date: Sat, 13 Apr 2024 02:50:46 +0100 Message-ID: Subject: Re: [PATCH net 4/4] selftests/tcp_ao: Printing fixes to confirm with format-security To: 0x7f454c46@gmail.com Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 13 Apr 2024 at 02:43, Dmitry Safonov via B4 Relay wrote: > > From: Dmitry Safonov <0x7f454c46@gmail.com> > > On my new laptop with packages from nixos-unstable, gcc 12.3.0 produces > > lib/setup.c: In function =E2=80=98__test_msg=E2=80=99: > > lib/setup.c:20:9: error: format not a string literal and no format argu= ments [-Werror=3Dformat-security] > > 20 | ksft_print_msg(buf); > > | ^~~~~~~~~~~~~~ > > lib/setup.c: In function =E2=80=98__test_ok=E2=80=99: > > lib/setup.c:26:9: error: format not a string literal and no format argu= ments [-Werror=3Dformat-security] > > 26 | ksft_test_result_pass(buf); > > | ^~~~~~~~~~~~~~~~~~~~~ > > lib/setup.c: In function =E2=80=98__test_fail=E2=80=99: > > lib/setup.c:32:9: error: format not a string literal and no format argu= ments [-Werror=3Dformat-security] > > 32 | ksft_test_result_fail(buf); > > | ^~~~~~~~~~~~~~~~~~~~~ > > lib/setup.c: In function =E2=80=98__test_xfail=E2=80=99: > > lib/setup.c:38:9: error: format not a string literal and no format argu= ments [-Werror=3Dformat-security] > > 38 | ksft_test_result_xfail(buf); > > | ^~~~~~~~~~~~~~~~~~~~~~ > > lib/setup.c: In function =E2=80=98__test_error=E2=80=99: > > lib/setup.c:44:9: error: format not a string literal and no format argu= ments [-Werror=3Dformat-security] > > 44 | ksft_test_result_error(buf); > > | ^~~~~~~~~~~~~~~~~~~~~~ > > lib/setup.c: In function =E2=80=98__test_skip=E2=80=99: > > lib/setup.c:50:9: error: format not a string literal and no format argu= ments [-Werror=3Dformat-security] > > 50 | ksft_test_result_skip(buf); > > | ^~~~~~~~~~~~~~~~~~~~~ > > cc1: some warnings being treated as errors > > As the buffer was already pre-printed into, print it as a string > rather than a format-string. > > Fixes: cfbab37b3da0 ("selftests/net: Add TCP-AO library") > Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> And this one as well, Reported-by: Muhammad Usama Anjum Link: https://lore.kernel.org/all/0c6d4f0d-2064-4444-986b-1d1ed782135f@coll= abora.com/ --=20 Dmitry