From mboxrd@z Thu Jan 1 00:00:00 1970 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 A191E7E for ; Wed, 2 Aug 2023 00:44:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C2DDC433C7; Wed, 2 Aug 2023 00:44:09 +0000 (UTC) Date: Tue, 1 Aug 2023 20:44:07 -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 , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Mark Rutland , Florent Revest , Peter Zijlstra , Thomas Gleixner Subject: Re: [PATCH v4 3/9] bpf/btf: Add a function to search a member of a struct/union Message-ID: <20230801204407.7b284b00@rorschach.local.home> In-Reply-To: <20230801204054.3884688e@rorschach.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> <20230801113240.4e625020@gandalf.local.home> <20230801190920.7a1abfd5@gandalf.local.home> <20230802092146.9bda5e49528e6988ab97899c@kernel.org> <20230801204054.3884688e@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: bpf@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, 1 Aug 2023 20:40:54 -0400 Steven Rostedt wrote: > Maybe we can add a ftrace_partial_regs(fregs) that returns a > partially filled pt_regs, and the caller that uses this obviously knows > its partial (as it's in the name). But this doesn't quite help out arm64 > because unlike x86, struct ftrace_regs does not contain an address > compatibility with pt_regs fields. It would need to do a copy. > > ftrace_partial_regs(fregs, ®s) ? Well, both would be pointers so you wouldn't need the "&", but it was to stress that it would be copying one to the other. void ftrace_partial_regs(const struct ftrace_regs *fregs, struct pt_regs regs); -- Steve