Skip to content

Support kCFI + BPF on arm64 #8894

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

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: 9
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 62e23f1
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 9fd0606
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 43745d1
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: b69d441
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 32c563d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0f2d39f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: cf15cdc
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: cb4a119
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 5a8cb23
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: c8ce7db
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

Mark Rutland and others added 2 commits May 9, 2025 22:51
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]>
Tested-by: Dao Huang <[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]>
Tested-by: Dao Huang <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 7220eab
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=959802
version: 9

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the series/830310=>bpf-next branch from 8d2ac56 to d35c8a1 Compare May 10, 2025 05:51
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