Commit 207612eb authored by Ilya Leoshkevich's avatar Ilya Leoshkevich Committed by Alexei Starovoitov
Browse files

selftests/bpf: Fix test_lsm on s390x



Use syscall macros to access the setdomainname() arguments; currently
the code uses gprs[2] instead of orig_gpr2 for the first argument.

Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-16-iii@linux.ibm.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent be6b5c10
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

#include "bpf_misc.h"
#include "vmlinux.h"
#include <bpf/bpf_core_read.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <errno.h>
@@ -164,8 +165,8 @@ int copy_test = 0;
SEC("fentry.s/" SYS_PREFIX "sys_setdomainname")
int BPF_PROG(test_sys_setdomainname, struct pt_regs *regs)
{
	void *ptr = (void *)PT_REGS_PARM1(regs);
	int len = PT_REGS_PARM2(regs);
	void *ptr = (void *)PT_REGS_PARM1_SYSCALL(regs);
	int len = PT_REGS_PARM2_SYSCALL(regs);
	int buf = 0;
	long ret;