Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2125885ioo; Mon, 23 May 2022 10:37:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7yeYGSl5ipn75ZanMj8nrePSOmxVdmNCOUCEoiR3n6CWUsfcuwKzEeQpG8fvaeOjTYgG1 X-Received: by 2002:a65:6751:0:b0:3c6:42ca:ceb8 with SMTP id c17-20020a656751000000b003c642caceb8mr21253253pgu.565.1653327454025; Mon, 23 May 2022 10:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653327454; cv=none; d=google.com; s=arc-20160816; b=uwrbEFpdJW1HBz2aHqekZGrKuVpiexiZWZdkKBKiOPVGZdwGLKnanCpCq15IHHpBSm pTVBbdzXcyHI+c/Kx3SRebzAhDPIiuNVmHd61Y2ZRnxCsfHczvdBrj7107vBX0I9ENkV fbbiYKVy367ZLymo1ar9cKYxQRLw3c4e+TTg1mvaQ9lkOWFVEbHvXABW9RUkWOP+RHKg hlHvaFrXn7Ibta0yjYEpuWm2MmmTNOD3ZH2FbpmPzpVUvVll1DeO7foMTq9vWMfwVTio zzPCLlcTbSFXNaRHRJZ+JnkunF0IIByEjVTjXNVOXOnj2B/vyfYStChKjWI6d5Xz+dWQ 02kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WiXDvUAEcdnlbyJwolObfgFAfQZmVEOE6UNYz3DfmjI=; b=zK+O+EfavPsBfw+KX+qODeVCQVOO0uMOgUP7DVFKtyJAnOooYQ/nMhw6YKWRsTU6GA bysOmBAA1J73SWL1OaMnSsNYh4QY5QWmaULGiKUPND8XnaPebjblZ9B6MVcRpkMes+5I eRb3E2o81VCSHmAZDfPUFIk/t5/b8PLYE7CmwznHuFkD9bux0/3RmwJnqRKl7BqxJU5M 23ok58oytztAykaJyo6GkoC7IYtqHHqxyiCypxRCpmzfDYmDOA2BOf7u36zVKgPFEu6m 3Likz4zLFJb7B/7FbNrP6PfX60zRJPjS4+mfROXikB3MHaZyxDxAzAb5tbZgdidC0VOT 52fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L9ICoUOf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t21-20020a056a00139500b0050dfdded307si15808094pfg.31.2022.05.23.10.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:37:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L9ICoUOf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 950E8193E6; Mon, 23 May 2022 10:36:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240917AbiEWRer (ORCPT + 99 others); Mon, 23 May 2022 13:34:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240630AbiEWRZD (ORCPT ); Mon, 23 May 2022 13:25:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28E071CB26; Mon, 23 May 2022 10:12:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C381F614CC; Mon, 23 May 2022 17:12:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6B1FC385A9; Mon, 23 May 2022 17:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325956; bh=db0bn8cymktHvmduNfZ39OYCAVGbmotRIWLE2wPYw7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L9ICoUOfdbfXfb8xZZZUey/IBYuQlzvueITsRRz7UaR+p6A5kFj/l7ibZmanX6t28 gXg4N4NtJHPFmRqRt4pKsv2QcDrU2huR+Gg3obocLfdU98fXsDc3FH3ZWQ9wGtYFHl 24iwhqH3pHx2lmUT8vLuUiArfA0HHapLIiAOEJUc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Namhyung Kim , Thomas Richter , Heiko Carstens , Sumanth Korikkar , Sven Schnelle , Vasily Gorbik , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.19 36/44] perf bench numa: Address compiler error on s390 Date: Mon, 23 May 2022 19:05:20 +0200 Message-Id: <20220523165759.773361408@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165752.797318097@linuxfoundation.org> References: <20220523165752.797318097@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Richter [ Upstream commit f8ac1c478424a9a14669b8cef7389b1e14e5229d ] The compilation on s390 results in this error: # make DEBUG=y bench/numa.o ... bench/numa.c: In function ‘__bench_numa’: bench/numa.c:1749:81: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 10 and 20 [-Werror=format-truncation=] 1749 | snprintf(tname, sizeof(tname), "process%d:thread%d", p, t); ^~ ... bench/numa.c:1749:64: note: directive argument in the range [-2147483647, 2147483646] ... # The maximum length of the %d replacement is 11 characters because of the negative sign. Therefore extend the array by two more characters. Output after: # make DEBUG=y bench/numa.o > /dev/null 2>&1; ll bench/numa.o -rw-r--r-- 1 root root 418320 May 19 09:11 bench/numa.o # Fixes: 3aff8ba0a4c9c919 ("perf bench numa: Avoid possible truncation when using snprintf()") Suggested-by: Namhyung Kim Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20220520081158.2990006-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/bench/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index 91c0a4434da2..e7fde88a0845 100644 --- a/tools/perf/bench/numa.c +++ b/tools/perf/bench/numa.c @@ -1631,7 +1631,7 @@ static int __bench_numa(const char *name) "GB/sec,", "total-speed", "GB/sec total speed"); if (g->p.show_details >= 2) { - char tname[14 + 2 * 10 + 1]; + char tname[14 + 2 * 11 + 1]; struct thread_data *td; for (p = 0; p < g->p.nr_proc; p++) { for (t = 0; t < g->p.nr_threads; t++) { -- 2.35.1