Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp619285rdb; Thu, 30 Nov 2023 13:36:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGudeT5z51tczImxED0LEwg/hlRL2TFu88PUMZgVxw2NnudbWrLC5iYjnBahCMpbfnEBFvB X-Received: by 2002:a05:6a21:6d85:b0:18c:3a58:fcc5 with SMTP id wl5-20020a056a216d8500b0018c3a58fcc5mr23771845pzb.15.1701380182700; Thu, 30 Nov 2023 13:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701380182; cv=none; d=google.com; s=arc-20160816; b=j0vughmdSoFcWz4VKYWdD8vJ0LZIX1r4cRMDrKtYKN8Glks6HiotqWWW9n5oar4lPo oHy70wBlVDWG368J78NwjTmXzrutd9P7SIISvsybSC7Z5B+5bPXvLymLaabTEQummNEX zs1XMexWC3PGQrEMFQDZswR8xQtwrIl2uOVjKgQSUK8YL52X1MceX9fN8p4aWviLmcoI DwQt7SchBIcusIJ3kuQ1cU5Ng4WwPjTxpPWOyqUbT1B+5ZeiM4pZJOQlj3FneuzXsWnq EJztQNTpbY/RAp6DzxyOpuczu4GbLl7AkGsLzFgDH3iPsaXzl3bxacUFsXeyNknORc0H LEFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Fp9VwMviLQPX+3MgbIIB9b/GRHCxnV7F0fIl1aHZ/II=; fh=xf7xP+ZeYzkZpCa6l1Sf85llaxuOD5BnXjzo5cAuZkk=; b=SLGp3Xos7/7MpOoe3O7ymcFqTMViRHO266rn7JyI79tycuwiHXmC3Oj26ayVLHATLY yyMGX3/f2NVBeU43sXJzubXA3OKfJ4ciJpNviVXbRSlzfJc/fCTpfL+mJ9fU35s5vSRO iHEpEZVMfJWVUllIeXCd0K49OCt8TygYKX23W0l6O5umkSIE9+/MkrKRnX3OU7G/ZTSl eySPRcC0YEQRcEyDLcCgQoXYNxqCfH/gKRj4f9zD4yVvr/LeTadVJi9fYat98SyYo8Qf PwjYPfuslG/n+H88XR3sx8MWYnqzzpVj1dlN2tp9sYNtdaJcWFL25i8BQGDxUvskXTyb YY1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Ojgf22BK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id q20-20020a17090aa01400b002806cdeecc6si4369183pjp.35.2023.11.30.13.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 13:36:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Ojgf22BK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 37C5C809AFEC; Thu, 30 Nov 2023 13:36:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376915AbjK3VgG (ORCPT + 99 others); Thu, 30 Nov 2023 16:36:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376859AbjK3VgF (ORCPT ); Thu, 30 Nov 2023 16:36:05 -0500 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BB8510D9 for ; Thu, 30 Nov 2023 13:36:11 -0800 (PST) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7b359dad0e7so17287039f.0 for ; Thu, 30 Nov 2023 13:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1701380171; x=1701984971; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Fp9VwMviLQPX+3MgbIIB9b/GRHCxnV7F0fIl1aHZ/II=; b=Ojgf22BKf0uNQ8mI1jxosdZFX/3I3k8OAhrRpA61aZ9uxabFApYxdLm9MCbnx/neM5 b9WW9+nmijBj+emHoaAmFxo2Ot+HjmtHIhlT18QLPzvqKJcCrfY7RrOzRPIzD2De9mLB gRNIGChrJ3Zn4Evvb9ao8bjfqPGYA3Ta0wRxc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701380171; x=1701984971; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fp9VwMviLQPX+3MgbIIB9b/GRHCxnV7F0fIl1aHZ/II=; b=SICpIVL86jFgJEIp15sN8Nmkb9cLSc4+dgeUiQhhbJ88kdVAbEBvZLIlGtJ6LfIQ7Z 3cvFScAPku/oT/x3YI46NRkIu/v29fJ7lINdNajOuINp6KO3WTqArqZucta/g7xdElIm ajgJNsfM6yjGnYT5r88FeHnR8Tnv1hCfR4BeZtUzr0LVk2E8Ceich2EyTjGUWjQDn1L5 XD5UiTqUljiE4X/uhvYsKLcqHUZLXmv8THHhHTZ6izC80fecH2E7NVERN0bpYD+onRyw Ba9XuFhfNjE1ppq1e2qsUNmMX8eDtxnjU7tFGuMSs3gaQq+nCkN4McRYwuHAXWcsRR9F 1Ruw== X-Gm-Message-State: AOJu0YyZiVoe7ygcGqZLMeUMcrDiCL8oVkd3Sqeg+YcfVg9I1IFPIkoH NnKSnBMfmQfpIDiIcYSXkWw43peHHX148s/iRKo= X-Received: by 2002:a05:6e02:1b05:b0:35d:f2b:4992 with SMTP id i5-20020a056e021b0500b0035d0f2b4992mr3016222ilv.0.1701380171001; Thu, 30 Nov 2023 13:36:11 -0800 (PST) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id i9-20020a056e020ec900b0035aeaed5112sm609123ilk.84.2023.11.30.13.36.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Nov 2023 13:36:10 -0800 (PST) Message-ID: <89e0378d-f03d-42ef-9495-ada312dd5139@linuxfoundation.org> Date: Thu, 30 Nov 2023 14:36:10 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] selftests:breakpoints: Fix Format String Warning in breakpoint_test Content-Language: en-US To: angquan yu Cc: shuah@kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan References: <20231129035726.6273-1-angquan21@gmail.com> From: Shuah Khan In-Reply-To: <20231129035726.6273-1-angquan21@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 30 Nov 2023 13:36:20 -0800 (PST) On 11/28/23 20:57, angquan yu wrote: > From: angquan yu > > This commit resolves a compiler warning regardingthe > use of non-literal format strings in breakpoint_test.c. > > The functions `ksft_test_result_pass` and `ksft_test_result_fail` > were previously called with a variable `msg` directly, which could > potentially lead to format string vulnerabilities. > > Changes made: > - Modified the calls to `ksft_test_result_pass` and `ksft_test_result_fail` > by adding a "%s" format specifier. This explicitly declares `msg` as a > string argument, adhering to safer coding practices and resolving > the compiler warning. > > This change does not affect the functional behavior of the code but ensures > better code safety and compliance with recommended C programming standards. > > The previous warning is "breakpoint_test.c:287:17: > warning: format not a string literal and no format arguments > [-Wformat-security] > 287 | ksft_test_result_pass(msg); > | ^~~~~~~~~~~~~~~~~~~~~ > breakpoint_test.c:289:17: warning: format not a string literal > and no format arguments [-Wformat-security] > 289 | ksft_test_result_fail(msg); > | " > > Signed-off-by: angquan yu Thank you foe the fix. Applied to linux-kselftest next Linux 6.8-rc1 thanks, -- Shuah