Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support kCFI + BPF on arm64 #8646

Open
wants to merge 2 commits into
base: bpf-next_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: Support kCFI + BPF on arm64
version: 8
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=942483

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 157a502
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=942483
version: 8

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 233732b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=942483
version: 8

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: a68894a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=942483
version: 8

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: be741c7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=942483
version: 8

Mark Rutland and others added 2 commits March 12, 2025 16:34
Currently x86 and riscv open-code 4 instances of the same logic to
define a u32 variable with the KCFI typeid of a given function.

Replace the duplicate logic with a common macro.

Signed-off-by: Mark Rutland <[email protected]>
Co-Developed-by: Maxwell Bland <[email protected]>
Signed-off-by: Maxwell Bland <[email protected]>
Co-Developed-by: Sami Tolvanen <[email protected]>
Signed-off-by: Sami Tolvanen <[email protected]>
Currently, bpf_dispatcher_*_func() is marked with `__nocfi` therefore
calling BPF programs from this interface doesn't cause CFI warnings.

When BPF programs are called directly from C: from BPF helpers or
struct_ops, CFI warnings are generated.

Implement proper CFI prologues for the BPF programs and callbacks and
drop __nocfi for arm64. Fix the trampoline generation code to emit kCFI
prologue when a struct_ops trampoline is being prepared.

Signed-off-by: Puranjay Mohan <[email protected]>
Co-Developed-by: Maxwell Bland <[email protected]>
Signed-off-by: Maxwell Bland <[email protected]>
Co-Developed-by: Sami Tolvanen <[email protected]>
Signed-off-by: Sami Tolvanen <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 46d38f4
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=942483
version: 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant