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 X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8254FC4363D for ; Fri, 2 Oct 2020 19:44:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 445FD206DD for ; Fri, 2 Oct 2020 19:44:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388392AbgJBToV (ORCPT ); Fri, 2 Oct 2020 15:44:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:45440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbgJBToT (ORCPT ); Fri, 2 Oct 2020 15:44:19 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DC466206DD; Fri, 2 Oct 2020 19:44:18 +0000 (UTC) Date: Fri, 2 Oct 2020 15:44:17 -0400 From: Steven Rostedt To: Tom Zanussi Cc: axelrasmussen@google.com, mhiramat@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/3] tracing: Change STR_VAR_MAX_LEN Message-ID: <20201002154417.320ad78b@gandalf.local.home> In-Reply-To: <34a494e502fe1364b07896ef4d76f1fbbb8d1d1a.1601588066.git.zanussi@kernel.org> References: <34a494e502fe1364b07896ef4d76f1fbbb8d1d1a.1601588066.git.zanussi@kernel.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Oct 2020 16:46:44 -0500 Tom Zanussi wrote: > 32 is too small for this value, and anyway it makes more sense to use > MAX_FILTER_STR_VAL, as this is also the value used for variable-length > __strings. > > Tested-by: Axel Rasmussen > Signed-off-by: Tom Zanussi > --- > kernel/trace/trace_synth.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/trace_synth.h b/kernel/trace/trace_synth.h > index ac35c45207c4..5166705d1556 100644 > --- a/kernel/trace/trace_synth.h > +++ b/kernel/trace/trace_synth.h > @@ -7,7 +7,7 @@ > #define SYNTH_SYSTEM "synthetic" > #define SYNTH_FIELDS_MAX 32 > > -#define STR_VAR_LEN_MAX 32 /* must be multiple of sizeof(u64) */ > +#define STR_VAR_LEN_MAX MAX_FILTER_STR_VAL /* must be multiple of sizeof(u64) */ Hmm, this requirement is now passed to MAX_FILTER_STR_VAL, but there's no mention of it there. I guess we should have a BUILD_BUG_ON(STR_VAR_LEN_MAX & (sizeof(u64) - 1)); in C code somewhere. -- Steve > > struct synth_field { > char *type;