Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp401508imw; Tue, 12 Jul 2022 23:51:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ug8veA0SfzEMgYK12enxm9Aq3gk9UJ8M/zIPvPudy7nGYPJ6AiDY9vBsr0Flre7+bRNbrx X-Received: by 2002:a17:90b:19d2:b0:1f0:46ef:fc1b with SMTP id nm18-20020a17090b19d200b001f046effc1bmr2202321pjb.182.1657695107914; Tue, 12 Jul 2022 23:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657695107; cv=none; d=google.com; s=arc-20160816; b=dubqI5zNUL/nEFCoOzs7NUOzj0xWwFBeDEqiaaof7q0o9A/v8iOErNfA3xzSoPxe03 iGGL4JrePVBhuI62u/GyPgnSdwWOMhb0Kw1O7a1iUy4q9cfYXHkc1F9NFl3Kbz3ChF5Q i23r52WdtPsg5oY/GGOwUILlSV71us05xBOjYaUTOOKbxDZiZ6+eecLHpTuMEbL2yOXu LOAGGDFWm3qtglKd9kys7gdam/xnXa3rtZhzE9ACgqbxRiX28TxFOi+EgWenXMNPxCFg +LlK7qfTDL/W7qTQnxiyJiiNpnUQBQ1UrMW6yXfchOV5H63rKHJLsobliC6A07sHTLMZ CojA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=edLOb4Wr+qoejHKWqJQsSuBKuAIIJA4woz+ajV4n8eM=; b=G0IKQoMfFoJUb1408D6+syPvco/EaUM/FRllXJwiZNo2Gx5/JrhzjBCubztzMLOt83 szX46+lmDfi7ViE5AfWBs1WakFeiFpGHErw84Uu06Bic/jUD1PU9EBDEEJlG/cf7I0Zh 20ILABgLhPdxYWIYsjJx3U02S5OR1fcCdT8EIiiXxswNR1857Y63iE2JzSyF3ly1KmM8 b4L1X/ObdrHhXhrGQGFr8jW05fpL3RsMtOql5HecCtv6nEVxQTMR8DWab9z+T6R5c0zG HSVWYM8i+TLt2Y+iBW7aFyE5rK+WNJWxS1L0jJJr5iRIwqlJa/s3G4vXMeOcxVNebX2B 8TVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Bei3h0FE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a170902f60400b0016c786846b2si833238plg.53.2022.07.12.23.51.36; Tue, 12 Jul 2022 23:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Bei3h0FE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233997AbiGMGeT (ORCPT + 99 others); Wed, 13 Jul 2022 02:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231305AbiGMGeS (ORCPT ); Wed, 13 Jul 2022 02:34:18 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C47AD88F14; Tue, 12 Jul 2022 23:34:16 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id EF0615C00AE; Wed, 13 Jul 2022 02:34:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 13 Jul 2022 02:34:13 -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=1657694053; x=1657780453; bh=edLOb4Wr+qoejHKWqJQsSuBKuAII JA4woz+ajV4n8eM=; b=Bei3h0FEFXmn+HvqhOFlqfEx3yHwcsKqzRLdE6b0gXR2 V/sVXsRITn92miR3vMH0OZPUoyzToqazMy9IX2pxKE06qXuEwCF2TwwTs3LuE4/2 mk8EtiEhr7dS+y/NTSXc2MsvX4dJGc+iIISk0VcDF/qrJ+0bD8vk0MfBKHrLo9iq WuQse7NCoyuB0+KNxlugZkJv3cw+A6q04RZ1fyDGj6pwk3RLAyKbkMCTAVDuM5sC J1XZOlUBaf7b7vaRf7sTUsFowjVJEia6hYuJvRAJySFunwSwlO8PBUg3hyL4xTTn YbDfowrJDNZR+wpNGqACck5xGHhJqHuhXaFCGCpPXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejiedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkugho ucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrg htthgvrhhnpedvudefveekheeugeeftddvveefgfduieefudeifefgleekheegleegjeej geeghfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hiughoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Jul 2022 02:34:12 -0400 (EDT) Date: Wed, 13 Jul 2022 09:34:09 +0300 From: Ido Schimmel To: Steven Rostedt Cc: LKML , Jakub Kicinski , Jiri Pirko , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org Subject: Re: [PATCH v2] tracing: devlink: Use static array for string in devlink_trap_report even Message-ID: References: <20220712185820.002d9fb5@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220712185820.002d9fb5@gandalf.local.home> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Jul 12, 2022 at 06:58:20PM -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. > > Cc: Jakub Kicinski > Cc: Leon Romanovsky > Cc: Jiri Pirko > Cc: "David S. Miller" > Cc: Eric Dumazet > Cc: Paolo Abeni > Cc: netdev@vger.kernel.org > Signed-off-by: Steven Rostedt (Google) Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel