All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	"Naveen N . Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: bpf@vger.kernel.org, Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH bpf-next v3 01/11] arm64/bpf: Add orig_x0 to user_pt_regs
Date: Fri,  4 Feb 2022 15:50:08 +0100	[thread overview]
Message-ID: <20220204145018.1983773-2-iii@linux.ibm.com> (raw)
In-Reply-To: <20220204145018.1983773-1-iii@linux.ibm.com>

orig_x0 is needed in order to access the first syscall argument from
eBPF programs.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 arch/arm64/include/asm/ptrace.h      | 2 +-
 arch/arm64/include/uapi/asm/ptrace.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index 41b332c054ab..1be22f7870f8 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -183,9 +183,9 @@ struct pt_regs {
 			u64 sp;
 			u64 pc;
 			u64 pstate;
+			u64 orig_x0;
 		};
 	};
-	u64 orig_x0;
 #ifdef __AARCH64EB__
 	u32 unused2;
 	s32 syscallno;
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
index 758ae984ff97..3c118c5b0893 100644
--- a/arch/arm64/include/uapi/asm/ptrace.h
+++ b/arch/arm64/include/uapi/asm/ptrace.h
@@ -90,6 +90,7 @@ struct user_pt_regs {
 	__u64		sp;
 	__u64		pc;
 	__u64		pstate;
+	__u64		orig_x0;
 };
 
 struct user_fpsimd_state {
-- 
2.34.1


  reply	other threads:[~2022-02-04 14:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 14:50 [PATCH bpf-next v3 00/11] libbpf: Fix accessing syscall arguments Ilya Leoshkevich
2022-02-04 14:50 ` Ilya Leoshkevich [this message]
2022-02-04 14:50 ` [PATCH bpf-next v3 02/11] s390/bpf: Add orig_gpr2 to user_pt_regs Ilya Leoshkevich
2022-02-05  0:36   ` Heiko Carstens
2022-02-05 12:37   ` Vasily Gorbik
2022-02-04 14:50 ` [PATCH bpf-next v3 03/11] selftests/bpf: Fix an endianness issue in bpf_syscall_macro test Ilya Leoshkevich
2022-02-04 14:50 ` [PATCH bpf-next v3 04/11] libbpf: Add __PT_PARM1_REG_SYSCALL macro Ilya Leoshkevich
2022-02-04 16:15   ` Naveen N. Rao
2022-02-04 14:50 ` [PATCH bpf-next v3 05/11] libbpf: Add PT_REGS_SYSCALL_REGS macro Ilya Leoshkevich
2022-02-04 16:46   ` Naveen N. Rao
2022-02-04 18:15     ` Andrii Nakryiko
2022-02-05  7:04       ` Naveen N. Rao
2022-02-04 14:50 ` [PATCH bpf-next v3 06/11] selftests/bpf: Use PT_REGS_SYSCALL_REGS in bpf_syscall_macro Ilya Leoshkevich
2022-02-04 14:50 ` [PATCH bpf-next v3 07/11] libbpf: Fix accessing the first syscall argument on arm64 Ilya Leoshkevich
2022-02-04 14:50 ` [PATCH bpf-next v3 08/11] libbpf: Fix accessing syscall arguments on powerpc Ilya Leoshkevich
2022-02-05  7:05   ` Naveen N. Rao
2022-02-04 14:50 ` [PATCH bpf-next v3 09/11] libbpf: Fix accessing program counter on riscv Ilya Leoshkevich
2022-02-04 14:50 ` [PATCH bpf-next v3 10/11] libbpf: Fix accessing syscall arguments " Ilya Leoshkevich
2022-02-04 14:50 ` [PATCH bpf-next v3 11/11] libbpf: Fix accessing the first syscall argument on s390 Ilya Leoshkevich
2022-02-05 20:30 ` [PATCH bpf-next v3 00/11] libbpf: Fix accessing syscall arguments patchwork-bot+netdevbpf
2022-02-07 16:10   ` Andrii Nakryiko

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=20220204145018.1983773-2-iii@linux.ibm.com \
    --to=iii@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=catalin.marinas@arm.com \
    --cc=daniel@iogearbox.net \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=paul.walmsley@sifive.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.