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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D0E4C43334 for ; Thu, 14 Jul 2022 18:40:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240107AbiGNSks (ORCPT ); Thu, 14 Jul 2022 14:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232538AbiGNSkr (ORCPT ); Thu, 14 Jul 2022 14:40:47 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C7D357E15; Thu, 14 Jul 2022 11:40:47 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 9667F320091E; Thu, 14 Jul 2022 14:40:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 14 Jul 2022 14:40:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1657824045; x=1657910445; bh=cfh5Vbt0d0CpHZj8hmg30dluCeWX m83Q5tUEhlXXfjA=; b=NIsJT87TzT6dcAX1hLo/v8joJpm9ycU1GQ7wSl/SPX2F m5PZVjpsK/l6hwc8KWiD2K5G9lnyau33Q8LGi5WPsrKgzVfz6QdLZQEbtnT9fNmY zkE6iIGyWJFIbz7qFOh+znWQ8pamekNw/c30wCISsEuhJMG4BGIL8XpwSCuD6lwj lZpQD1+s0QwaWHZJeBWCBiHkCaq/5k8Mt3n8xUfsIPFtxQ1nF8pZBUDsM2S/odt9 +1PSDSLS9Vz7YCf0e2e+gbMM1dVcPxSez4FnGzysk6Kn/dfll5IV/R7T1mYj5B/a VhLzO9jZtlCgt/gZgY/kzAZGmzprpPrGaNb9LE6hVQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejledgudeftdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkugho ucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrg htthgvrhhnpeehhfdtjedviefffeduuddvffegteeiieeguefgudffvdfftdefheeijedt hfejkeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhr gh X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Jul 2022 14:40:43 -0400 (EDT) Date: Thu, 14 Jul 2022 21:40:40 +0300 From: Ido Schimmel To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Leon Romanovsky , Jiri Pirko , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, Jakub Kicinski Subject: Re: [for-next][PATCH 03/23] tracing: devlink: Use static array for string in devlink_trap_report even Message-ID: References: <20220714164256.403842845@goodmis.org> <20220714164328.461963902@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220714164328.461963902@goodmis.org> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jul 14, 2022 at 12:42:59PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The trace event devlink_trap_report uses the __dynamic_array() macro to > determine the size of the input_dev_name field. This is because it needs > to test the dev field for NULL, and will use "NULL" if it is. But it also > has the size of the dynamic array as a fixed IFNAMSIZ bytes. This defeats > the purpose of the dynamic array, as this will reserve that amount of > bytes on the ring buffer, and to make matters worse, it will even save > that size in the event as the event expects it to be dynamic (for which it > is not). > > Since IFNAMSIZ is just 16 bytes, just make it a static array and this will > remove the meta data from the event that records the size. > > Link: https://lkml.kernel.org/r/20220712185820.002d9fb5@gandalf.local.home > > Cc: Leon Romanovsky > Cc: Jiri Pirko > Cc: "David S. Miller" > Cc: Eric Dumazet > Cc: Paolo Abeni > Cc: netdev@vger.kernel.org > Acked-by: Jakub Kicinski > Signed-off-by: Steven Rostedt (Google) On the off chance that my tags weren't omitted on purpose: Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel s/even/event/ in subject