From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D5ADCD6117 for ; Mon, 9 Oct 2023 17:28:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377920AbjJIR2j (ORCPT ); Mon, 9 Oct 2023 13:28:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377905AbjJIR2f (ORCPT ); Mon, 9 Oct 2023 13:28:35 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F043FD8 for ; Mon, 9 Oct 2023 10:28:32 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-7a24c86aae3so60186139f.0 for ; Mon, 09 Oct 2023 10:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1696872512; x=1697477312; 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=7BjVxNp/YRM5k6f5csMN7Rbql0PbCwEA0Qhwm+7n1+k=; b=bOrp4xGQwrJaWsN9JAdBG7oklwSij9849M7r9DSH53jcRI89G95hha3jv1+oHgTQTt aVyQB3L3tyuO/ZuCtKZBSIPi6tHxaDJQIjI9A7dK8n+wwFtx7d6ZP+MhKFP4rgFhhO7E 80HIR8M8J2ITd8NNj+wQ0DDDXmk8kgrPBIH6k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696872512; x=1697477312; 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=7BjVxNp/YRM5k6f5csMN7Rbql0PbCwEA0Qhwm+7n1+k=; b=s/WCM2h7tE6AdO4XTp6NcevDGdhb4yutOL6az3K3wH8ipdOHKVIOv+Bow7jDVUZmFR FpKvtmtNrdAYRqlS9XEMxO7hPnWyLYiVcTbxo1eTUaI7K9TAw+/loSHP3BcUr4asmu0Y Wfi+HXNtWk3QH5PUxaG0GIbo8T9cKHbMpP3yPqoqHTxOsli2u6iOfUDLGejWL6k5DbU4 iNiQLPN49xSMgxZlP18ozgAqiKtNMSPq6W5D9HOaoEZ9Sl82BdSE7a87w/ZYpb79ds9x +nK/e7Lz7XphGBvOtuz8xU7Z46+Pzyvtr2X+i48CfSFlMKvR9lC92zY7O9eSe8GMehrV yn5g== X-Gm-Message-State: AOJu0YwOYHgdkurVX5RbUM9fC6EJefwzWhp6xAZ5obsnHr55JAdstvrL +92bfCxEuOk1O5B2SYYoksj4kA== X-Google-Smtp-Source: AGHT+IG524RLm2iNS7rGqigma7E7MkPPDCMafw1IlVfCC2AnEpocWiOhD+/3WH5nhUw39rAm0J1f0A== X-Received: by 2002:a6b:5a0a:0:b0:790:958e:a667 with SMTP id o10-20020a6b5a0a000000b00790958ea667mr15344414iob.2.1696872512138; Mon, 09 Oct 2023 10:28:32 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id fx23-20020a0566381e1700b0042b47e8869bsm2242289jab.49.2023.10.09.10.28.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Oct 2023 10:28:31 -0700 (PDT) Message-ID: Date: Mon, 9 Oct 2023 11:28:30 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 0/8] Add printf attribute to kselftest functions Content-Language: en-US To: Maciej Wieczor-Retman , akpm@linux-foundation.org, christian@kellner.me, fenghua.yu@intel.com, keescook@chromium.org, ndesaulniers@google.com, coltonlewis@google.com, dmatlack@google.com, vipinsh@google.com, seanjc@google.com, brauner@kernel.org, pbonzini@redhat.com, shuah@kernel.org, hannes@cmpxchg.org, nphamcs@gmail.com, reinette.chatre@intel.com Cc: ilpo.jarvinen@linux.intel.com, linux-kselftest@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Shuah Khan References: From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/9/23 04:28, Maciej Wieczor-Retman wrote: > Kselftest.h declares many variadic functions that can print some > formatted message while also executing selftest logic. These > declarations don't have any compiler mechanism to verify if passed > arguments are valid in comparison with format specifiers used in > printf() calls. > > Attribute addition can make debugging easier, the code more consistent > and prevent mismatched or missing variables. > > Add a __printf() macro that validates types of variables passed to the > format string. The macro is similarly used in other tools in the kernel. > > Add __printf() attributes to function definitions inside kselftest.h that > use printing. > > Adding the __printf() macro exposes some mismatches in format strings > across different selftests. > > Fix the mismatched format specifiers in multiple tests. > > Series is based on kselftests next branch. How did you find these problems? I don't see any information how these problems are found in the commit logs. thanks, -- Shuah