public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@unseen.parts>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Matt Turner <mattst88@gmail.com>, Oleg Nesterov <oleg@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	"Maciej W. Rozycki" <macro@orcam.me.uk>,
	Magnus Lindholm <linmag7@gmail.com>,
	linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] alpha/uapi: do not expose kernel-only stack frame structures
Date: Wed, 29 Jan 2025 20:59:36 +0100	[thread overview]
Message-ID: <Z5qIqHmpxnRpXC35@minute> (raw)
In-Reply-To: <284bc1ed837f0994114534ae7e3d4f6cc0d64f4e.camel@physik.fu-berlin.de>

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.

  reply	other threads:[~2025-01-29 19:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29  9:43 [PATCH 0/4] alpha: stack fixes Ivan Kokshaysky
2025-01-29  9:43 ` [PATCH 1/4] alpha/uapi: do not expose kernel-only stack frame structures Ivan Kokshaysky
2025-01-29 18:32   ` John Paul Adrian Glaubitz
2025-01-29 19:59     ` Ivan Kokshaysky [this message]
2025-01-29  9:43 ` [PATCH 2/4] alpha: replace hardcoded stack offsets with autogenerated ones Ivan Kokshaysky
2025-01-29  9:43 ` [PATCH 3/4] alpha: make stack 16-byte aligned (most cases) Ivan Kokshaysky
2025-01-29  9:43 ` [PATCH 4/4] alpha: align stack for page fault and user unaligned trap handlers Ivan Kokshaysky
2025-01-29 10:06 ` [PATCH 0/4] alpha: stack fixes John Paul Adrian Glaubitz
2025-01-29 16:02 ` Maciej W. Rozycki
2025-01-30 14:33   ` Ivan Kokshaysky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z5qIqHmpxnRpXC35@minute \
    --to=ink@unseen.parts \
    --cc=arnd@arndb.de \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linmag7@gmail.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=mattst88@gmail.com \
    --cc=oleg@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=richard.henderson@linaro.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox