Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1014881lqt; Tue, 19 Mar 2024 10:12:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXIJYAybLQ93e/oGfD+YIiCcaSiUqlm8tPLNBnf55uZZJ7zP9JVUYoTtzEnLH7U2zF0EnmOHIlTRVWMRZOMcvhiDJXvESEkYbMuSDYsuQ== X-Google-Smtp-Source: AGHT+IHY4kg33BGpor6woJ3JpBUOJUFMn6i703LjIOGH3unR89+mrlMTNdUygY0MOlTvLjrUiSor X-Received: by 2002:a05:6808:11cc:b0:3c3:5a57:e969 with SMTP id p12-20020a05680811cc00b003c35a57e969mr4011776oiv.54.1710868319890; Tue, 19 Mar 2024 10:11:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710868319; cv=pass; d=google.com; s=arc-20160816; b=ftGb+k5PWxEw0/nqeVMkZ3xb2ToYUrl+zAql8ID/cAJ4t8U64NT4jXY06bGncjGqIB c0PjwlPrm1h9zUwqaQToqlzINEwFjGAQC6/CJc7VCQp5d4vd2umqm+oBSKLrTc6XQEbW SbDx9jB1icHvzoaj7tdY1lQkVXn+pHnPxhwQ485fRQFRY5h4qGYKHRjCg3Wb1BBBCha1 39RP3QHWB37sjMR0cI3FR6noiEdcScWN79Iund4Hrrpg8miDAhZfcxCg4qjjawOQEu/E fJeBFCzM48P+HNTTKFtKqlsWyhpMvKEZgViWB0P2Mh5eUjPr143e3miZREj6viosISd5 Zc2w== 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=xiMJAj0Mw2MhTj2zlKAU3PrwRKuVJcdG/wGovoBuHCY=; fh=2W2CxoUWBITYWEypmpcoxwnk/wMvjYmNwyO/jWIYVUQ=; b=FsYLEazculXVFPyLxPscT/og294UdTRI4AGHK0dAxbIoNyYwuuzPDPLdTcEd8d9XYB 1c/oxRVodFxuPVUIw8EVG8CKxsRTfot59TzJptaMOmhx4XZ4fvHuAZORxcd4p+pAhcZZ FMLn493SDwG0UIG0D6S5M5b/6k4tYUX8TKg80HQeRF9aVrImGq5U6bzKAN7kNtm9qd88 MCwos6sKVeX0kDj8cZesg/2X87f4ir1wN++xn7ESborwDyligfeBt0TXiZt1i6mq1awL ovEhOUTZnmn6XyR1wsJUZl8FlKWrGnalBuOoNpvf/XSInY+f7HoxfMPTe2ifNkq0CO1U XAqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-107891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107891-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i2-20020ab04742000000b007d6a881a1d7si1582855uac.138.2024.03.19.10.11.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 10:11:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-107891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107891-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 407D21C22845 for ; Tue, 19 Mar 2024 17:11:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE8D619479; Tue, 19 Mar 2024 17:11:12 +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 492E8179A6 for ; Tue, 19 Mar 2024 17:11:11 +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=1710868272; cv=none; b=s2/3g5I5+UHpcGImlCd9ouMSDIevBTPDZVMGyFWNIrrL1kP/4rhP0Ueiu5txHbJemzJsWPN2utg3e06wKLfTlQNDk3SGNQkBo4WMeIxt5Enfj4FJUBy6QG6hghWJHodgPPN9A0M2ifJjfGmwwqsTD8XJEanY1qI/pHG909Nw7dA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710868272; c=relaxed/simple; bh=ebwOVxoBOs8lCcSplls0CzG67Wju8dHmF6pjC8vwD5U=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RBKMm7hVoLXYiDbZNBAaICwGVpqAgWCsxbn9mlW5XzixQJjqKL1eKVdJB5OgMM5RUqdRCdMBuNKaCfseZnduYpg/tna3dmU7P2K4S1z6CjoHZ0hpRRnmN+3vlPT99Uxiz7Wku3xCVDHrZzSbwDcaOjo8Zz6udPWVmKPzbVq7lUE= 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 8AD7BC433C7; Tue, 19 Mar 2024 17:11:10 +0000 (UTC) Date: Tue, 19 Mar 2024 13:13:33 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Masami Hiramatsu , Mathieu Desnoyers , Alison Schofield , Beau Belgrave , Huang Yiwei , John Garry , Randy Dunlap , Thorsten Blum , Vincent Donnefort , linke li Subject: Re: [GIT PULL v2] tracing: Updates for v6.9 Message-ID: <20240319131333.504c93fc@gandalf.local.home> In-Reply-To: <20240319130653.0cfdaf6e@gandalf.local.home> References: <20240318113053.7f87ce7f@gandalf.local.home> <20240319130653.0cfdaf6e@gandalf.local.home> 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, 19 Mar 2024 13:06:53 -0400 Steven Rostedt wrote: > This is in the fast path (where the trace event happens), but I can make it > always do strcmp(), even though it will slow down what is being recorded, > as I plan on removing the parameter in the next merge window anyway. I'll change it to this: #define __assign_str(dst, src) \ do { \ char *__str__ = __get_str(dst); \ int __len__ = __get_dynamic_array_len(dst) - 1; \ WARN_ON_ONCE(!src != !__data_offsets.dst##_ptr_); \ WARN_ON_ONCE(src && strcmp((src), __data_offsets.dst##_ptr_)); \ memcpy(__str__, __data_offsets.dst##_ptr_ ? : \ EVENT_NULL_STR, __len__); \ __str__[__len__] = '\0'; \ } while (0) The first WARN_ON() will report the bug if src is not NULL and the pointer is even though the strcmp() will likely crash in that case. But that's a bug if that happens anyway. -- Steve