Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2040733rdb; Mon, 9 Oct 2023 10:28:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE20ljpW8tNJMtnoKl6H4ZkrwgZoPYUHB/0wjrhthuEF85Ruj+dvxCdHvQNdhjLPWvXY9QL X-Received: by 2002:a05:6a20:2445:b0:14e:3ba7:2933 with SMTP id t5-20020a056a20244500b0014e3ba72933mr15820028pzc.54.1696872535629; Mon, 09 Oct 2023 10:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696872535; cv=none; d=google.com; s=arc-20160816; b=hP5y3CQc3D/96JVjyxsb9upSFwdyWd+M86XMbgFfgXH4lzHrVKzK6K44Z13o42RaKB qyDEGwqqV1ul+fKnftMuxKpnfISt/QqIe1KUG3jYBKS2Frk48AChRT+7fID06vYovfP3 IGlA0oVm8qP2W9qPZ46rj8HQaneBOv27JbD4TGYoh3MApcw+a39GtklaISwYgipZELRz RRkHmc+bWIQXo7Kk9gPztaFbdwYGICG4lI2L9+eo2Rrd4xK2nQ4kHMCWh8jc6S0f0+4n wkW22nCk51jcuMat8E5W0e3EaiDx6ecOvmqkvQrCZ0U5D+wOYSwcWXudAbQpZUwfFPRP rKhA== 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=7BjVxNp/YRM5k6f5csMN7Rbql0PbCwEA0Qhwm+7n1+k=; fh=LXcgShgXTSOf+ZX4RY522wflzgcU6RBCLPL/rlPhVxk=; b=qmDf84Jtt9hDBosEUzSiJSuJVd8nUyUxuL3JTqn3jeOdhhTbDSekRP07WsfQW4p96z uGV+mxVCJo4FStbqAjmvycfCxbtfI2COjpq6jZmb50snqcY0Sh3n56WC647xSlM6QH7G qr8pLQwH9wy1W/Dkliw6rytmRfIYy+UULKfvADbwZZPvjvbRR9oUShn068h5D3jINqPE OZoM4k/nexq3sPxtuk6Pu8J4jh7WhHzOr1zXCqdQ/k4vn/prQcER3mZftbUHRh+qjVXh CmwBRBPcEwQ8MZ4qB1ZM+bIzOpghVTwruMvup0ygFKeuX04XRokgDLB1Jw92GPyyRUoT nCWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=bOrp4xGQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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. [23.128.96.38]) by mx.google.com with ESMTPS id r29-20020a638f5d000000b0058d551255c0si933364pgn.79.2023.10.09.10.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 10:28:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=bOrp4xGQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 C198281C0CA7; Mon, 9 Oct 2023 10:28:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377909AbjJIR2i (ORCPT + 99 others); Mon, 9 Oct 2023 13:28:38 -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-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 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no 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]); Mon, 09 Oct 2023 10:28:52 -0700 (PDT) X-Spam-Level: ** 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