Re: [PATCH 1/4] alpha/uapi: do not expose kernel-only stack frame structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 29, 2025 at 07:32:11PM +0100, John Paul Adrian Glaubitz wrote:
> Hi Ivan,
> 
> On Wed, 2025-01-29 at 10:43 +0100, Ivan Kokshaysky wrote:
> > Parts of asm/ptrace.h went into UAPI with commit 96433f6ee490
> > ("UAPI: (Scripted) Disintegrate arch/alpha/include/asm") back in 2012.
> > At first glance it looked correct, as many other architectures expose
> > 'struct pt_regs' for ptrace(2) PTRACE_GETREGS/PTRACE_SETREGS requests.
> > On Alpha, however, these requests have never been implemented;
> > 'struct pt_regs' describes internal kernel stack frame which has
> > nothing to do with userspace. Same applies to 'struct switch_stack',
> > as PTRACE_GETFPREG/PTRACE_SETFPREG are not implemented either.
> > 
> > Move this stuff back into internal asm, where we can ajust it
> > without causing a lot of confusion about possible UAPI breakage.
...
> This seems to break the build for the bpf tool on alpha:
> 
> In file included from libbpf.c:36:
> /build/reproducible-path/linux-6.13~rc7/tools/include/uapi/linux/bpf_perf_event.h:14:28: error: field ‘regs’ has incomplete type
>    14 |         bpf_user_pt_regs_t regs;
>       |                            ^~~~
> 

Good catch, thanks!

I wonder if bpftool ever worked properly on Alpha. Will check...

Ivan.




[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux