lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a16fae0346d4f733fb1a67ae6420d8bf935dbd8.camel@gmail.com>
Date: Mon, 28 Apr 2025 00:01:05 -0700
From: Eduard Zingerman <eddyz87@...il.com>
To: Alexis Lothoré "(eBPF Foundation)"	
 <alexis.lothore@...tlin.com>, Alexei Starovoitov <ast@...nel.org>, Daniel
 Borkmann <daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>,
 Andrii Nakryiko	 <andrii@...nel.org>, Martin KaFai Lau
 <martin.lau@...ux.dev>, Song Liu	 <song@...nel.org>, Yonghong Song
 <yonghong.song@...ux.dev>, KP Singh	 <kpsingh@...nel.org>, Stanislav
 Fomichev <sdf@...ichev.me>, Hao Luo	 <haoluo@...gle.com>, Jiri Olsa
 <jolsa@...nel.org>, Puranjay Mohan	 <puranjay@...nel.org>, Xu Kuohai
 <xukuohai@...weicloud.com>, Catalin Marinas	 <catalin.marinas@....com>,
 Will Deacon <will@...nel.org>, Mykola Lysenko	 <mykolal@...com>, Shuah Khan
 <shuah@...nel.org>, Maxime Coquelin	 <mcoquelin.stm32@...il.com>, Alexandre
 Torgue <alexandre.torgue@...s.st.com>,  Florent Revest <revest@...omium.org>
Cc: Bastien Curutchet <bastien.curutchet@...tlin.com>, 
	ebpf@...uxfoundation.org, Thomas Petazzoni <thomas.petazzoni@...tlin.com>, 
	bpf@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kselftest@...r.kernel.org, 
	linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH RFC bpf-next 3/4] bpf/selftests: add tests to validate
 proper arguments alignment on ARM64

On Fri, 2025-04-11 at 22:32 +0200, Alexis Lothoré (eBPF Foundation) wrote:
> When dealing with large types (>8 bytes), ARM64 trampolines need to take
> extra care about the arguments alignment to respect the calling
> convention set by AAPCS64.
> 
> Add two tests ensuring that the BPF trampoline arranges arguments with
> the relevant layout. The two new tests involve almost the same
> arguments, except that the second one requires a more specific alignment
> to be set by the trampoline when preparing arguments before calling the
> the target function.
> 
> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@...tlin.com>
> ---

[...]

> +SEC("fentry/bpf_testmod_test_struct_arg_11")
> +int BPF_PROG2(test_struct_many_args_9, struct bpf_testmod_struct_arg_5, a,
> +	      struct bpf_testmod_struct_arg_5, b,
> +	      struct bpf_testmod_struct_arg_5, c,
> +	      struct bpf_testmod_struct_arg_5, d, int, e,
> +	      struct bpf_testmod_struct_arg_5, f)

Hello Alexis,

I'm trying to double check the error you've seen for x86.
I see that tracing_struct/struct_many_args fails with assertion:
"test_struct_many_args:FAIL:t11:f unexpected t11:f: actual 35 != expected 43".
Could you please help me understand this test?
The function listened to is defined as accepting 'struct bpf_testmod_struct_arg_7',
at the same time this function uses 'struct bpf_testmod_struct_arg_5'.
Nevertheless, the assertion persists even with correct types.

> +{
> +	t11_a = a.a;
> +	t11_b = b.a;
> +	t11_c = c.a;
> +	t11_d = d.a;
> +	t11_e = e;
> +	t11_f = f.a;
> +	return 0;
> +}

[...]


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ