Skip to content

on eBPF a Rust fn should handle more than 5 args #123150

Open
@workingjubilee

Description

@workingjubilee

By default, eBPF only supports a 5-argument register calling convention. This is the only "standardized" ABI. In practice, compilers support stack-passing calling conventions for further arguments, and Rust is not required to follow a standard ABI for Rust to Rust calls. Nonetheless, because 5 args is the only standard, reputedly 5 args is what LLVM implements and the rest must be implemented by the frontend. We should be supporting argument-passing on the stack for extern "Rust" on eBPF if we're going to bother supporting bpfe{l,b}-unknown-none at all.

I'm opening this in advance of assembling a full repro before I forget it. It is possible this is no longer an issue and we only need an assembly test to verify we can handle 10 args on eBPF. h/t @saleemrashid

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationC-bugCategory: This is a bug.O-eBPFTarget: I heard you liked code execution so I put some code execution in your code executionP-lowLow priorityS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions