public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>,
	Ilya Leoshkevich <iii@linux.ibm.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	bpf@vger.kernel.org, Sven Schnelle <svens@linux.ibm.com>
Subject: Re: [PATCH bpf-next 1/3] s390/bpf: Add orig_gpr2 to user_pt_regs
Date: Thu, 3 Feb 2022 10:40:13 +0100	[thread overview]
Message-ID: <Yfui/cdknJYeiFVg@osiris> (raw)
In-Reply-To: <011a6988-39a6-66ca-fccd-6fa0852ed599@linux.ibm.com>

On Wed, Feb 02, 2022 at 06:23:46PM +0100, Christian Borntraeger wrote:
> Am 02.02.22 um 15:19 schrieb Vasily Gorbik:
> > > diff --git a/arch/s390/include/uapi/asm/ptrace.h b/arch/s390/include/uapi/asm/ptrace.h
> > > index ad64d673b5e6..b3dec603f507 100644
> > > --- a/arch/s390/include/uapi/asm/ptrace.h
> > > +++ b/arch/s390/include/uapi/asm/ptrace.h
> > > @@ -295,6 +295,7 @@ typedef struct {
> > >   	unsigned long args[1];
> > >   	psw_t psw;
> > >   	unsigned long gprs[NUM_GPRS];
> > > +	unsigned long orig_gpr2;
> > >   } user_pt_regs;
> > 
> > It could be a good opportunity to get rid of that "args[1]" which is not
> > used for syscall parameters handling since commit baa071588c3f ("[S390]
> > cleanup system call parameter setup") [v2.6.37], as well as completely
> > unused now, and shouldn't really be exported to eBPF. And luckily eBPF
> > never used it.
> > 
> > So, how about reusing "args[1]" slot for orig_gpr2 instead?
> 
> Since this is uapi we certainly have to careful. Reusing this could be ok, though.

I agree with Vasily: let's get rid of "args[1]", rename it to orig_gpr2,
and effectively move orig_gpr2 to user_pt_regs, while at the same time
reducing the size of struct pt_regs a bit.

This will also prevent future random usages of the args member; e.g. until
recently it was used to pass the last breaking event address to the
exception handler. However that usage has also been removed already.

Ilya, could you resend with this proposed change, please?

  reply	other threads:[~2022-02-03  9:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 23:41 [PATCH bpf-next 0/3] libbpf: Fix accessing the first syscall argument on s390 Ilya Leoshkevich
2022-02-01 23:41 ` [PATCH bpf-next 1/3] s390/bpf: Add orig_gpr2 to user_pt_regs Ilya Leoshkevich
2022-02-02 14:19   ` Vasily Gorbik
2022-02-02 17:23     ` Christian Borntraeger
2022-02-03  9:40       ` Heiko Carstens [this message]
2022-02-02 20:14   ` Heiko Carstens
2022-02-02 22:49     ` Andrii Nakryiko
2022-02-04  6:07     ` Naveen N. Rao
2022-02-04  8:21       ` Naveen N. Rao
2022-02-04 12:20         ` Ilya Leoshkevich
2022-02-04 13:49           ` Naveen N. Rao
2022-02-01 23:41 ` [PATCH bpf-next 2/3] selftests/bpf: Fix an endianness issue in bpf_syscall_macro test Ilya Leoshkevich
2022-02-01 23:42 ` [PATCH bpf-next 3/3] libbpf: Fix accessing the first syscall argument on s390 Ilya Leoshkevich

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=Yfui/cdknJYeiFVg@osiris \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=gor@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    /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