Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp88813rbb; Fri, 23 Feb 2024 12:47:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVFR44fzaeGk16IwtFj2JLp8OxGoiq8+bq0Kl2lQ3ktnLAP9tc9Oi2XcnSAmQ4kyn4+g6XTR7VVu64i3ydVWiNvVGd+cZC/VtBQ3nfrEw== X-Google-Smtp-Source: AGHT+IFSuzT5u9HfHv2rt4KtuPrvm5QfoKpHtEkRs8GHaw92z1Nf9lgeX0ocvyTwI0rI4VRENMpo X-Received: by 2002:aa7:d059:0:b0:564:b822:91f4 with SMTP id n25-20020aa7d059000000b00564b82291f4mr596936edo.21.1708721253386; Fri, 23 Feb 2024 12:47:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708721253; cv=pass; d=google.com; s=arc-20160816; b=p2DZyB29zLnsncmaudN1pQ95tqRiTUcFkSGbvCx3Liy+IAKi82IDV7WzxvY6+pShAT Mrj7wyiKDLYwIh9s/Vwq5V+7g5WWV+hCIhvNUF7l1pfuoeee+iyEfkaZp1WWOtYmilXD OQuWe3K4ZD5e9Uxgc1zdv0uu4s4gs0ayLaawAIHWF7eeUBIrAqLK4WqMrAGNY8c8aFGw oEAvNieZ5SikGVj1SDKHE4wpWB4wxHvWFzC4+QYMLvtwHoSBHsrESkHyYWHw79rK4EGX 69U9eKKOlkThVNpJTL+K783AW44PZ4UaA8NZOzI2gBGFCUTpk4lMETNJoh3bXTpXOYRz OYnw== 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=DRAMtPNH4cH1OfY7wvt+OqRp3vR5K7J3ULIP+QaVcEU=; fh=uQbb+XKHpX8N7lJtnNrEJAjwor/F07QNglPq3kPMwrw=; b=ZIGabB1Te1gFHLfW8r/j6EvFnIehZ3A64s31qMYANId63PSCgH+1B5O9lUWLTDPUUp FtSO/mxOjl3zZN7vOeIjcNBqyjVczyi6Jouib9/s/dmaWPHj78tF4/0Ik9JIJNXpi+QY R2QCpAOD6HHnSGESVLCA1oBthcPu9cu1B6VVLYZBsfnLWAA0BG5p6RwSywjKkTUO736V WPBGm6l+fCHy5CrrNo/5doxuhBpjrFyUMNtUPSl3Hrne/6sg3FFN9QXeX3ZeuUz5VmWT Ckacj8tzeBfuqhZxULBQqv9duP25fNL6+Xh0cvgYVEzKbLiDOuCsc5VKG5JCZjojghox 1i6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-nfs+bounces-2069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2069-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s8-20020aa7d788000000b005648505032esi4432330edq.659.2024.02.23.12.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:47:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-nfs+bounces-2069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2069-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 284251F250BF for ; Fri, 23 Feb 2024 20:47:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 455A214CACB; Fri, 23 Feb 2024 20:43:46 +0000 (UTC) X-Original-To: linux-nfs@vger.kernel.org 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 92C27EAD2; Fri, 23 Feb 2024 20:43:45 +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=1708721026; cv=none; b=f/Wx12iSHfpF7xf7NqVy2JgaNi+1zMpqr74k9EAiQTvTG90cOikuv1K9QrFHVTkyIJmjYffky1mvG0CUJfF6mhSMsYbJlduk0w3zTvdAPSh2XM27CHGGBDyr5Ge+Q06YeH86zVWiAUNktCug5SZh+reGq0AkFHyxDodnovurm4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708721026; c=relaxed/simple; bh=PvtLspH93t1y4HSID2+UQ++sl1bnWl4rFM9++eE9Kiw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jjkj4An0NsVm9VFkk6dIH9AjZE1Eek+qJgxBeFZ5ctXoJvzPfS8XnInFF7aqDkSuPWQGn0frWL6Snv6tyi6Sj8RWOAXiWPXSwrq3dyoI/zvfcv4o9TmF2DdbRO7CQrnaEzovU79DIoqZCMd0gXOIMq2/kurKenWiqSZqyAS/iZo= 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 67DE0C43390; Fri, 23 Feb 2024 20:43:39 +0000 (UTC) Date: Fri, 23 Feb 2024 15:45:32 -0500 From: Steven Rostedt To: Jeff Johnson Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Mathieu Desnoyers , Linus Torvalds , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Julia Lawall Subject: Re: [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str() Message-ID: <20240223154532.76475d82@gandalf.local.home> In-Reply-To: <20240223134653.524a5c9e@gandalf.local.home> References: <20240223125634.2888c973@gandalf.local.home> <0aed6cf2-17ae-45aa-b7ff-03da932ea4e0@quicinc.com> <20240223134653.524a5c9e@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-nfs@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 Fri, 23 Feb 2024 13:46:53 -0500 Steven Rostedt wrote: > Now one thing I could do is to not remove the parameter, but just add: > > WARN_ON_ONCE((src) != __data_offsets->item##_ptr_); > > in the __assign_str() macro to make sure that it's still the same that is > assigned. But I'm not sure how useful that is, and still causes burden to > have it. I never really liked the passing of the string in two places to > begin with. Hmm, maybe I'll just add this patch for 6.9 and then in 6.10 do the parameter removal. -- Steve diff --git a/include/trace/stages/stage6_event_callback.h b/include/trace/stages/stage6_event_callback.h index 0c0f50bcdc56..7372e2c2a0c4 100644 --- a/include/trace/stages/stage6_event_callback.h +++ b/include/trace/stages/stage6_event_callback.h @@ -35,6 +35,7 @@ #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_); \ memcpy(__str__, __data_offsets.dst##_ptr_ ? : \ EVENT_NULL_STR, __len__); \ __str__[__len__] = '\0'; \