From patchwork Fri Feb 23 14:18:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 205416 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp613901dyb; Fri, 23 Feb 2024 06:19:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUHjjfVSkKDWxrhkU7zIQGjs3MOGeCdUI6PqYkRVYUZpDC2GaYJdHhx5yoaTLCEHeI9qGBnJsGRA5NJYjz7QbOKNiTHyA== X-Google-Smtp-Source: AGHT+IHE4a301xr7QV4nAsC0UgFv3sjMC4POZQv92QUZ5gpOqzAcjUKvl/QVMdm4atXgYzQSPe+c X-Received: by 2002:a05:620a:56d0:b0:787:b801:5d49 with SMTP id wh16-20020a05620a56d000b00787b8015d49mr773971qkn.7.1708697962910; Fri, 23 Feb 2024 06:19:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708697962; cv=pass; d=google.com; s=arc-20160816; b=rInOuAYorDeYcJ7jBKTxKeiIRfFElDW6K37EMer1CVTao6r/iKn2k0iGL2Net+XtZl YFi9fGthywiuDgmHUVTf/75bTBCIhaxD9RRsYzGc1qAT7GkNTTAOzbQ+/+VelV/D/cqu eLeViqd/JyY0UhOC7TcXTUpGGzNpSH6ITcXpfaVWkhrKOo1hS9d/O36IP3pYqwwDFXav GLblqiOKMYQu8Cas1ZsIOroXN50ooWpH9xSY7VQMWWJ12rnRMXFB2XE6K4NeWEKINnq8 8X0e9VnC/ub7XbZAeFqEaNbcp0uKNKMWjZ3Fw+QfK8AR6cYxRwbcoiWggv6bkZQRJboh ulcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=z9mrOt9g/Dcnpp8HehJLjeFh63XCsANEIzfIGulHJ7Y=; fh=4aHMAWoenazwtUUz77QSrbSp+uv0ZViBuOAY9m9gWWw=; b=ISB+inVpsMZ246XEpXRnGkLb1s0CEyTMJcruRVTTjt2ZzprScSK/Maj5ihzFZw+b1D 9PDGJUFOf4t4n93Isckp6BOMbK/3LycgOvbEhiYbQ5M7FLbQ87VQBi8cOqoeJb+4zL0w rXssjCXfwPUEXx5Cyt2ozgFqtrLHDWZcVm8zt4lDape0okHmD9LbKpm9XPcWJHfl4Skz jh3mXaZPBCiFXWv04lgkIT8V0jjI3I8w5dU+AhaIrPrTiE+6xj95MBjpe6Hu5qG7AjK8 o28+Yknklm6qqPqIyJlCVEjUA40V065BswkPZ7+CGkKALGVZcdcX1u+9KASVyF2zqVPL NW4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-78461-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78461-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p26-20020a05620a22ba00b00787843997e3si5698347qkh.209.2024.02.23.06.19.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 06:19:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78461-ouuuleilei=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-78461-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78461-ouuuleilei=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 AFB5F1C226E5 for ; Fri, 23 Feb 2024 14:19:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 455B48562C; Fri, 23 Feb 2024 14:17:13 +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 D9A6781ACA for ; Fri, 23 Feb 2024 14:17:09 +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=1708697829; cv=none; b=LTThyjxGmJlH3zv3ETEALeeVDGhd36XPtVk9PDHSSq79GckRQkN+mpZPsF3GCmvlmXqW2UogN16o7qyHHOqyEqsdFSv+54uyRyA4GJdGRueF+aqMJSF3G2lMOfiTP8woYW15TXEre8cPebOMTZrV6WRTg0HwZsT5Wza1Aw8qaig= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708697829; c=relaxed/simple; bh=3xrOW9URhoOAn6cXs/5dE696kcxcVdjb+ohYIPRoMYs=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=VDNtnAgtwBEs3xlawjKTx7cQ3miDTG8I3cQ5eC8EHpKydnfyBsbLNb++QRz8TL6yaZXVTZxF9O8BHzqaksW4fkbQLW6P60yo0Yw2Mx9+y1A1k3yJ8MNo1S6jpj9Ni1Orron/4FOTRrZ6Tc+oc6ibbYE9kZZSUzLdoqsJhasxB7c= 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 9D546C4166B; Fri, 23 Feb 2024 14:17:09 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rdWOE-000000077Ng-2Ezo; Fri, 23 Feb 2024 09:19:02 -0500 Message-ID: <20240223141902.394601874@goodmis.org> User-Agent: quilt/0.67 Date: Fri, 23 Feb 2024 09:18:44 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Chuck Lever Subject: [for-next][PATCH 06/13] NFSD: Fix nfsd_clid_class use of __string_len() macro References: <20240223141838.985298316@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791699675119430555 X-GMAIL-MSGID: 1791699675119430555 From: "Steven Rostedt (Google)" I'm working on restructuring the __string* macros so that it doesn't need to recalculate the string twice. That is, it will save it off when processing __string() and the __assign_str() will not need to do the work again as it currently does. Currently __string_len(item, src, len) doesn't actually use "src", but my changes will require src to be correct as that is where the __assign_str() will get its value from. The event class nfsd_clid_class has: __string_len(name, name, clp->cl_name.len) But the second "name" does not exist and causes my changes to fail to build. That second parameter should be: clp->cl_name.data. Link: https://lore.kernel.org/linux-trace-kernel/20240222122828.3d8d213c@gandalf.local.home Cc: Jeff Layton Cc: Neil Brown Cc: Olga Kornievskaia Cc: Dai Ngo Cc: Tom Talpey Fixes: d27b74a8675ca ("NFSD: Use new __string_len C macros for nfsd_clid_class") Acked-by: Chuck Lever Signed-off-by: Steven Rostedt (Google) Acked-by: Jeff Layton --- fs/nfsd/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h index d1e8cf079b0f..2cd57033791f 100644 --- a/fs/nfsd/trace.h +++ b/fs/nfsd/trace.h @@ -843,7 +843,7 @@ DECLARE_EVENT_CLASS(nfsd_clid_class, __array(unsigned char, addr, sizeof(struct sockaddr_in6)) __field(unsigned long, flavor) __array(unsigned char, verifier, NFS4_VERIFIER_SIZE) - __string_len(name, name, clp->cl_name.len) + __string_len(name, clp->cl_name.data, clp->cl_name.len) ), TP_fast_assign( __entry->cl_boot = clp->cl_clientid.cl_boot;