Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp171103rba; Tue, 26 Mar 2024 12:20:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBglSdAPPNIxy0G40e/w/MoHAtaBoZ59bDYlNe8G/u1VrM6ZrZtGsT/aEnaCn/djs6qYRRpD2rjaOSoLpxcziF6M9sm2YS7yEns7Q+YQ== X-Google-Smtp-Source: AGHT+IEtE/8vtTlVD971NNidhmeN2kQmTqEsu54wP/OfQOW35SQLzmWhdWKUwX6hHqexr2BCWegQ X-Received: by 2002:a17:902:d484:b0:1e0:a7c5:b63d with SMTP id c4-20020a170902d48400b001e0a7c5b63dmr1900602plg.47.1711480835026; Tue, 26 Mar 2024 12:20:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711480835; cv=pass; d=google.com; s=arc-20160816; b=nBsQnPE2VSeQCF2X/4eQ43fxS+MqOCbFuuYD/r6wsPN4rnqu5RDvis+CMxKHJbaiWA yd9TZe6HmRmeXTNszeq2gjcsoS4zdz7a7mjbK3Jza84ugst7kKGhsd2kBwprsT0+7v63 k7kq4S1sjhJMkeIs2IhgEMHB4AlCC1vFV7Fa/RDOf+No1aKoIh+NFUuzrfU6Q1euhgXP pSl03QrlpK2OOquEPrGv8mZ9BzndWDPurSumHMvJ5KJ9uTFzmiuBGB1fqD/fUCT+DJEH ivr5jx9jdLv/SCIRXkCSTskxNaSCtoYehe0hnB7cqUi1g0eBneA3aP/TayhszZ7iq7gM EQeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=VU5lTqfP0YtivCpYaeNB4o+YsAnIzy/QoOosEjOTyX4=; fh=zAUkigIGTTE7dxx1DJDd9oZxIPWaYZ/TEN69uW81kbs=; b=DhsRLvt6ipKVgGEBrGnQWbwRC9oNm5LXWb/nUGXwjc2CPaQbX2h4iXt6++wZJJlj/D ADNhmvy+p7BulHR1gtWnvkAK50vH88BZdThDDHSw3gvIQzay9dNrqjj7O29GRbtHoJdk 9oDArwj3b4V+l3VEeVtFmpoXEAAzp6LONgUjQVeCDp8S3sDp7Nsf9MFmIrHg8jaRMDgl 5Mwzyqw2YbH8iYDyIQSHszV/8154Mx7cY/i7mdq/HVmbl4x8CpvBj6zDidg45wuf73Bx luzwmU5oNg5pQhpvogY43xmkgyg9nGYcfWyFw1dbIGd9nnB/ESi8gxlmQ4rES0Qdvv57 QqhQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-119787-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119787-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b18-20020a170903229200b001e0b8740836si5294941plh.274.2024.03.26.12.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 12:20:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119787-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-119787-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119787-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8886E3058F2 for ; Tue, 26 Mar 2024 19:20:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58B2813D267; Tue, 26 Mar 2024 19:19:53 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0E7D13CFAF; Tue, 26 Mar 2024 19:19:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711480792; cv=none; b=QuE33mqU56UEGWxK9QTl2aRG/nZvmlpSn/Gg3NLyeFrZYFTUjaCiF4+0TlWOSNPSuDLuYrXcZsRSMBF/gK3p7815DZ8+eDb33KtahQ931Yz19GHOiXf4HpY0u7iADFTTkvtzqz9cI3fTGvtTixnmX75PMDCIh62n/hUwxceFsnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711480792; c=relaxed/simple; bh=j3QpieVYsqFQsOlMJUmIP/hY4ORtE8TOJtyH7zfzvTI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=I38VlHcuAlrAaDQerWnW4PgqW7ZHOkH4MqbjeFzBAPjd4R5GL7b4jH7ELaNFt5FeJHkWd6xQaVxzGdnpPuwmt80jjw8QxMAAIklCtmigSLz238XlWCC3xHebJmlNyPWsP1ttqjprwSXwlK6Reld4DopUF08v59ciyxu7GU6UBGs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F463C43390; Tue, 26 Mar 2024 19:19:50 +0000 (UTC) Date: Tue, 26 Mar 2024 15:22:30 -0400 From: Steven Rostedt To: Nikita Kiryushin Cc: "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Mathieu Desnoyers , Lai Jiangshan , Zqiang , rcu@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] rcu-tasks: Update show_rcu_tasks_trace_gp_kthread buffer size Message-ID: <20240326152230.3e692d83@gandalf.local.home> In-Reply-To: <20240326174839.487582-1-kiryushin@ancud.ru> References: <20240326174839.487582-1-kiryushin@ancud.ru> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 26 Mar 2024 20:48:39 +0300 Nikita Kiryushin wrote: > diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h > index 147b5945d67a..13ac514489c0 100644 > --- a/kernel/rcu/tasks.h > +++ b/kernel/rcu/tasks.h > @@ -1992,7 +1992,7 @@ static int __init rcu_spawn_tasks_trace_kthread(void) > #if !defined(CONFIG_TINY_RCU) > void show_rcu_tasks_trace_gp_kthread(void) > { > - char buf[64]; > + char buf[87]; Why 87? as it's not even word size, and this is on the stack. > > sprintf(buf, "N%lu h:%lu/%lu/%lu", Better yet, why not just use snprintf()? snprintf(buf, 64, "N%lu h:%lu/%lu/%lu", -- Steve > data_race(n_trc_holdouts), > --