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: <69b24e21-13aa-42b6-bb42-6aad89284aee@huaweicloud.com>
Date: Tue, 27 May 2025 20:19:17 +0800
From: Xu Kuohai <xukuohai@...weicloud.com>
To: Alexis Lothoré <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>, Eduard Zingerman <eddyz87@...il.com>,
 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>,
 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, Xu Kuohai <xukuohai@...wei.com>
Subject: Re: [PATCH bpf-next v3 0/2] bpf, arm64: support up to 12 arguments

On 5/27/2025 6:06 PM, Alexis Lothoré wrote:
> Hello,
> 
> this is the v2 of the many args series for arm64, being itself a revival
> of Xu Kuhoai's work to enable larger arguments count for BPF programs on
> ARM64 ([1]).
> 
> The discussions in v1 shed some light on some issues around specific
> cases, for example with functions passing struct on stack with custom
> packing/alignment attributes: those cases can not be properly detected
> with the current BTF info. So this new revision aims to separate
> concerns with a simpler implementation, just accepting additional args
> on stack if we can make sure about the alignment constraints (and so,
> refusing attachment to functions passing structs on stacks). I then
> checked if the specific alignment constraints could be checked with
> larger scalar types rather than structs, but it appears that this use
> case is in fact rejected at the verifier level (see a9b59159d338 ("bpf:
> Do not allow btf_ctx_access with __int128 types")). So in the end the
> specific alignment corner cases raised in [1] can not really happen in
> the kernel in its current state. This new revision still brings support
> for the standard cases as a first step, it will then be possible to
> iterate on top of it to add the more specific cases like struct passed
> on stack and larger types.
> 
> [1] https://lore.kernel.org/all/20230917150752.69612-1-xukuohai@huaweicloud.com/#t
> 
> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@...tlin.com>
> ---
> Changes in v3:
> - switch back -EOPNOTSUPP to -ENOTSUPP
> - fix comment style
> - group intializations for arg_aux
> - remove some unneeded round_up
> - Link to v2: https://lore.kernel.org/r/20250522-many_args_arm64-v2-0-d6afdb9cf819@bootlin.com
> 
> Changes in v2:
> - remove alignment computation from btf.c
> - deduce alignment constraints directly in jit compiler for simple types
> - deny attachment to functions with "corner-cases" arguments (ie:
>    structs on stack)
> - remove custom tests, as the corresponding use cases are locked either
>    by the JIT comp or the verifier
> - drop RFC
> - Link to v1: https://lore.kernel.org/r/20250411-many_args_arm64-v1-0-0a32fe72339e@bootlin.com
> 
> ---
> Alexis Lothoré (eBPF Foundation) (1):
>        selftests/bpf: enable many-args tests for arm64
> 
> Xu Kuohai (1):
>        bpf, arm64: Support up to 12 function arguments
> 
>   arch/arm64/net/bpf_jit_comp.c                | 225 ++++++++++++++++++++-------
>   tools/testing/selftests/bpf/DENYLIST.aarch64 |   2 -
>   2 files changed, 171 insertions(+), 56 deletions(-)
> ---
> base-commit: 9435138c069117cd59a4912b5ea2ae44cc2c5ffa
> change-id: 20250220-many_args_arm64-8bd3747e6948
> 
> Best regards,

For the series:

Acked-by: Xu Kuohai <xukuohai@...wei.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ