Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5893328rwb; Tue, 1 Aug 2023 09:15:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlF7CkhgzHXbKOFWl4F/JUIM8owPIkroZT94k3UyWHB8URyouBTd+/SzW66b8ZsbwZ5ifqLE X-Received: by 2002:a05:6a00:189c:b0:686:efda:76ac with SMTP id x28-20020a056a00189c00b00686efda76acmr15480074pfh.26.1690906557115; Tue, 01 Aug 2023 09:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690906557; cv=none; d=google.com; s=arc-20160816; b=B6C8cEjUNjAG1tbULaIvGWrTsZvtLnBG0kVD0VIfzfOaSHlHyHfj3K7beVwOQFOl2K sPP4ci483SXLYazSZIaTp9gwtxG8ehQoV/thGQCAS8rnBQ0/UGuXlaQvDD8ZbbXn6gxO H21K5D0hflfKXEGldK6tAuQfXFOsTofcqNcO7SBcILru91xZ93SNv06zOIYIdTYWlPKL cIVaQB/7He93HzPVI5Vg6NAIdcfyxUlTMzUaSZRUv03ocUR0I5mxn0cg71ATJ1FeHTp6 FRrmDGvkpsdUEe18cYF9stbKkllIQnl+UO3ICeoSxGLb8R7ainEr2mrvPTyzg7kGG+fC 1/9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=RuxXRlzYfFH5Yzno1XBIPoXboUiExRcGkiDRuadENIY=; fh=fH55glR7NuTSnfBh3e3BdB0gQnWJKhuwqaZ7CX6qEAQ=; b=C/pGQX4Wpzz/uc8ajMCQGjk1uaaGyVAo1gOuo+IdRJy5/kFrWCXu26hJhMGKL8uhXl X8oG6YBWrRIYsVmfuTk2LXMuH2rt89/8KmGPoOiEaEs5yrgaM+PWrX+bfVmaDxEWbmGF 92iA6DD03BsdRQpYd0h0vbTppRkuZOW2DTA8KnWmPYAIoz3o9Z/9c2u+3hsFLNPn2lhm tkH9C2KFS5aXT8JM1I8fh8g3/x226DqjWj/ipZV51TeILQjVU+RV4qwRhjNM3X9guqdf Tdwn+D7bHHbDdu8+8bkBmh2v5uS3Yd1Z67sYBpb7tdvbob6PQsoIYxPmMYV/telbWSq1 EUqw== ARC-Authentication-Results: i=1; mx.google.com; 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 dw14-20020a056a00368e00b0066882062113si9184158pfb.9.2023.08.01.09.15.41; Tue, 01 Aug 2023 09:15:57 -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; 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 S234171AbjHAPcu (ORCPT + 99 others); Tue, 1 Aug 2023 11:32:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234141AbjHAPcq (ORCPT ); Tue, 1 Aug 2023 11:32:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D39512139; Tue, 1 Aug 2023 08:32:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D15C615E4; Tue, 1 Aug 2023 15:32:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F159BC433C7; Tue, 1 Aug 2023 15:32:41 +0000 (UTC) Date: Tue, 1 Aug 2023 11:32:40 -0400 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: Alexei Starovoitov , linux-trace-kernel@vger.kernel.org, LKML , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov Subject: Re: [PATCH v4 3/9] bpf/btf: Add a function to search a member of a struct/union Message-ID: <20230801113240.4e625020@gandalf.local.home> In-Reply-To: <20230801112036.0d4ee60d@gandalf.local.home> References: <169078860386.173706.3091034523220945605.stgit@devnote2> <169078863449.173706.2322042687021909241.stgit@devnote2> <20230801085724.9bb07d2c82e5b6c6a6606848@kernel.org> <20230802000228.158f1bd605e497351611739e@kernel.org> <20230801112036.0d4ee60d@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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, 1 Aug 2023 11:20:36 -0400 Steven Rostedt wrote: > The solution was to come up with ftrace_regs, which just means it has all > the registers to extract the arguments of a function and nothing more. Most This isn't 100% true. The ftrace_regs may hold a fully filled pt_regs. As the FTRACE_WITH_REGS callbacks still get passed a ftrace_regs pointer. They will do: void callback(..., struct ftrace_regs *fregs) { struct pt_regs *regs = ftrace_get_regs(fregs); Where ftrace_get_regs() will return the pt_regs only if it is fully filled. If it is not, then it returns NULL. This was what the x86 maintainers agreed with. -- Steve > implementations just have a partially filled pt_regs within it, but an API > needs to be used to get to the argument values.