Re: [PATCH v2 1/4] alpha/uapi: do not expose kernel-only stack frame structures
From: Ivan Kokshaysky
Date: Mon Feb 03 2025 - 12:14:27 EST
On Sun, Feb 02, 2025 at 05:39:52PM +0000, Maciej W. Rozycki wrote:
> What do you think about providing arch/alpha/include/asm/bpf_perf_event.h
> instead with either a dummy definition of `bpf_user_pt_regs_t', or perhaps
> one typedef'd to `struct sigcontext' (as it seems to provide all that's
> needed), and then reverting to v1 of arch/alpha/include/uapi/asm/ptrace.h
> (and then just copying the contents of arch/alpha/include/asm/ftrace.h
> over rather than leaving all the useless CPP stuff in) so that we don't
> have useless `struct pt_regs' exported at all?
Probably that's the right thing to do. However, it implies adding
#elif defined(__alpha__)
#include "../../arch/alpha/include/uapi/asm/bpf_perf_event.h"
in tools/include/uapi/asm/bpf_perf_event.h. I'm afraid that will
result in too many loosely related changes for this patch series.
I'm starting to think that the best way for the time being is to keep
uapi/asm/ptrace.h and apply the fix there (i.e. revert to v0 patch
posted on linux-alpha). And mention the pt_regs vs uapi issue in the
commit message, of course, to deal with it later. Your opinion?
Ivan.