[PATCH] D155894: [BPF] allow external calls

Alexei Starovoitov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 30 09:44:38 PDT 2023


ast added a comment.

In D155894#4544080 <https://reviews.llvm.org/D155894#4544080>, @alessandrod wrote:

> In D155894#4544073 <https://reviews.llvm.org/D155894#4544073>, @ast wrote:
>
>>> I may dig into that when I have some time, but for now we're just ignoring these errors in aya's linker.
>>
>> what do you mean "ignoring in aya" ?
>> If bpf prog contains a call to memset and you link it with a generic unbounded loop in aya linker the verifier will reject such code.
>> I thought aya suppose to produce valid programs.
>
> We're ignoring the error because the error is in fact not an error, the target is doing the right thing, and aya (well, rustc) always provides memory builtins so memset gets linked correctly and a valid program is produced.

Could you point to memset implementation that gets linked eventually?
Is it a global function or static ? Asking because they're verified differently by the kernel.
I have a hard time imagining a generic implementation that can pass the verifier.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155894/new/

https://reviews.llvm.org/D155894



More information about the llvm-commits mailing list