Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3662228lfo; Mon, 23 May 2022 10:40:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTCnzBStNp7iA3CbZCmLAvaFXvEVKnOqL6Ks3XibvXgmMiagVIf/tx3eUnLs0Noi3gG6kC X-Received: by 2002:a63:2cc3:0:b0:3db:5e24:67fa with SMTP id s186-20020a632cc3000000b003db5e2467famr20925901pgs.46.1653327632143; Mon, 23 May 2022 10:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653327632; cv=none; d=google.com; s=arc-20160816; b=Q5SvH7qfPsJ5fcZhccIeHm0yrkBfmYUrREHY2NqIS2pAH2Jc6CzGhLX+HPXP2iQvdn YVT5piId2UH4GlRia/D7rQhEGfpejCogJk+O3JfnTwUpCKZeZzOtzeVTAUtZ5UL2UyAf kcPM2IJDHu8Sfx7PCq2f1Q9MH7Pf6IJb65/e1DodLuR/5Kf5TssmPwE4q1exM0hIdNf/ zeV/3LItlJN1j3OsOb/0Xig4vIst/A5YQkd6xFEzRSxr16uvxIiE72V2oIVSumUNuhrW BQ3di+ZXZiZHfdlXq6xB/BtI5KJuZBWJBmQ9CRMeP/vy3EUON8cfx294BiP+LY2FizWN Zu1w== 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=QX1zZcGPnds9YZuzZ31Y/u+8tpmCv1PPiWcuqlPOzjY=; b=iGcKjtPV/7lGX+17MKivyoTWwJER/apJN2Y8AqH6Eb8qRHKP1HBEXWLAAh/XQKo+i4 ttR6DPrZzWb37aIalKnln5ylnx/aCwGFPsOg+GTBEOulXv8sdSmIwA0EMpSulROGzh+o SE8vYLPQ+fnkD1PvPfcXfwHGYXR4rTAKz7XgCjOmFGd3fY6ddynHdk6X5vZKnzwMKKtS aAIjpcGHSGN5zFrbHLrmjew8tAXwP6huSo+vt1fSFJDj4MVVvxmfLVomMeMzGOaKH3MC 8pt0xsbXAHJTJ5008CNBufTJ3fl9ca9XfCHZpLyD9FPVc4vFBp8ptvkWhcyhzKLJ2mP0 RWmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b06IUBeC; 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 bi7-20020a170902bf0700b00153b2d16403si10509875plb.11.2022.05.23.10.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:40:32 -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=b06IUBeC; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1FA5A98084; Mon, 23 May 2022 10:40:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242678AbiEWRho (ORCPT + 99 others); Mon, 23 May 2022 13:37:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241514AbiEWR0u (ORCPT ); Mon, 23 May 2022 13:26:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D30F737A9; Mon, 23 May 2022 10:21:56 -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 ams.source.kernel.org (Postfix) with ESMTPS id E1E19B81214; Mon, 23 May 2022 17:14:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24D32C385AA; Mon, 23 May 2022 17:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653326082; bh=S4saDqSBPAHF5po1ATrYvKaytjDDNFnmsPkryfjOuyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b06IUBeCnoHKVDgsEPMqzpONaLCoQW35Zad1wwnvIaRW4Eai2NyOT7kInRqIheDXN NaUkrHpMOPM6J7sJ8/M2X0+fwQMUZv/mBFGKoKbpLiw2Q9DWDLUoAHVIvqrtljWMZJ xrHVLY+KVZg+kiXwtCGsk7Qd+HOv4J1r2IKPf8MY= 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 5.4 52/68] perf bench numa: Address compiler error on s390 Date: Mon, 23 May 2022 19:05:19 +0200 Message-Id: <20220523165811.111295465@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165802.500642349@linuxfoundation.org> References: <20220523165802.500642349@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 5797253b9700..69d62e57a0c3 100644 --- a/tools/perf/bench/numa.c +++ b/tools/perf/bench/numa.c @@ -1630,7 +1630,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