[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABCJKud8u_AF6=gWvvYqMeP71kWG3k88jjozEBmXpW9r4YxGKQ@mail.gmail.com>
Date: Fri, 25 Jul 2025 09:22:33 -0700
From: Sami Tolvanen <samitolvanen@...gle.com>
To: Yonghong Song <yonghong.song@...ux.dev>
Cc: bpf@...r.kernel.org, Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,
Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>, Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next 0/4] Use correct destructor kfunc types
Hi,
On Fri, Jul 25, 2025 at 9:05 AM Yonghong Song <yonghong.song@...ux.dev> wrote:
>
> I tried your patch set on top of latest bpf-next. The problem
> still exists with the following error:
>
> [ 71.976265] CFI failure at bpf_obj_free_fields+0x298/0x620 (target: __bpf_crypto_ctx_release+0x0/0x10; expected type: 0xc1113566)
> [ 71.980134] Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
> ...
>
>
> The following is the CFI related config items:
>
> $ grep CFI .config
> CONFIG_CFI_AUTO_DEFAULT=y
> CONFIG_FUNCTION_PADDING_CFI=11
> CONFIG_ARCH_SUPPORTS_CFI_CLANG=y
> CONFIG_ARCH_USES_CFI_TRAPS=y
> CONFIG_CFI_CLANG=y
> # CONFIG_CFI_ICALL_NORMALIZE_INTEGERS is not set
> CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS_CLANG=y
> CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC=y
> # CONFIG_CFI_PERMISSIVE is not set
>
> Did I miss anything?
Interesting. I tested this on arm64 and confirmed that the issue is
fixed there, so I wonder if we need to use KCFI_REFERENCE() here to
make sure objtool / x86 runtime patching knows this function actually
indirectly called. I'll test this on x86 and see what's going on.
Thanks for taking a look!
Sami
Powered by blists - more mailing lists