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 13468C636D4 for ; Mon, 13 Feb 2023 17:46:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbjBMRqO (ORCPT ); Mon, 13 Feb 2023 12:46:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjBMRqM (ORCPT ); Mon, 13 Feb 2023 12:46:12 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADA4A1CF6B; Mon, 13 Feb 2023 09:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1676310367; bh=bjIdrq7E7T3M1MvC4x5lbyHOfWJfEa4UUs+f0ZSzvLo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kVzPuTIfA2sXNFdhJk/1b1s4uKm8ICG0Z1j0EkuKl4Ak+n+7mXGMI0tGuEJpz9ykd m4Yis8VvRX5n3+GHp68aG95M/4efD4oisZWmO5zdDix6w6HfjYkF4Un0Feyh3xUoXQ GLilc1pSgwz1NLkZxrDmTVH6UGcB0xDduN3+j2hpKaBWGRrkjaovRMUaWA8TLqqDvX vUWMFLkqTk/HMmrVArZxP9mMuWp2AZiSVbMGUsvWZ8puZ28ciZOCgpGwAMQeSWCbCK 6IcjlC1j9XiM6XrJJpHJqQSEwhThnTbRUr2gV9kFAwfxKTUikdRvhGV1jmSYeBzqVw JHSbLcylDKTSw== Received: from [172.16.0.188] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4PFsFp6TdfzlHF; Mon, 13 Feb 2023 12:46:06 -0500 (EST) Message-ID: <52a9f138-45f0-ca05-b67a-d734663984df@efficios.com> Date: Mon, 13 Feb 2023 12:46:06 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v2 7/7] tools/testing/selftests/bpf: replace open-coded 16 with TASK_COMM_LEN Content-Language: en-US To: Namhyung Kim , Steven Rostedt Cc: Yafang Shao , John Stultz , Alexei Starovoitov , Andrew Morton , Network Development , bpf , "linux-perf-use." , Linux-Fsdevel , linux-mm , LKML , kernel test robot , kbuild test robot , Andrii Nakryiko , David Hildenbrand , Arnaldo Carvalho de Melo , Andrii Nakryiko , Michal Miroslaw , Peter Zijlstra , Matthew Wilcox , Al Viro , Kees Cook , Petr Mladek , Kajetan Puchalski , Lukasz Luba , Qais Yousef , Daniele Di Proietto , Linus Torvalds References: <20211120112738.45980-1-laoar.shao@gmail.com> <20211120112738.45980-8-laoar.shao@gmail.com> <20230208212858.477cd05e@gandalf.local.home> <20230208213343.40ee15a5@gandalf.local.home> <20230211140011.4f15a633@gandalf.local.home> <20230211224455.0a4b2914@gandalf.local.home> From: Mathieu Desnoyers In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-02-13 12:43, Namhyung Kim wrote: > Hi Steve, > > On Sat, Feb 11, 2023 at 8:07 PM Steven Rostedt wrote: >> >> On Sun, 12 Feb 2023 11:38:52 +0800 >> Yafang Shao wrote: >> >>>> Actually, there are cases that this needs to be a number, as b3bc8547d3be6 >>>> ("tracing: Have TRACE_DEFINE_ENUM affect trace event types as well") made >>>> it update fields as well as the printk fmt. >>>> >>> >>> It seems that TRACE_DEFINE_ENUM(TASK_COMM_LEN) in the trace events >>> header files would be a better fix. >> >> NACK! I much prefer the proper fix that adds the length. > > Can we just have both enum and macro at the same time? > I guess the enum would fill the BTF and the macro would provide > backward compatibility. This is no need to keep the define. The root cause of the issue is addressed by this fix: https://lore.kernel.org/lkml/20230212154620.4d8fe033@gandalf.local.home/ Thanks, Mathieu > > Thanks, > Namhyung -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com