forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 13
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
WIP: BPF support for ARCv2 and ARCv3 #85
Draft
geomatsi
wants to merge
11
commits into
arc64
Choose a base branch
from
bpf-arcv3-wip
base: arc64
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Define appropriate uapi for the BPF_PROG_TYPE_PERF_EVENT program type by exporting the user_regs_struct structure instead of the pt_regs structure that is in-kernel only. Signed-off-by: Sergey Matyukevich <[email protected]>
Add PT_REGS macros suitable for ARCompact and ARCv2. Signed-off-by: Vladimir Isaev <[email protected]>
Enable HAVE_REGS_AND_STACK_ACCESS_API feature for ARC architecture, including ARCcompact and ARCv2 flavors. Add supporting functions and defines. Signed-off-by: Sergey Matyukevich <[email protected]>
Function syscall_trace_exit expects pointer to pt_regs. However r0 is also used to keep syscall return value. Restore pointer to pt_regs before calling syscall_trace_exit. Signed-off-by: Sergey Matyukevich <[email protected]>
Implement all the bits required to support HAVE_SYSCALL_TRACEPOINTS according to Documentation/trace/ftrace-design.rst. Signed-off-by: Sergey Matyukevich <[email protected]>
Layout of pt_regs structure differs between ARCompact/ARCv2/ARCv3. Fix set_reg/get_reg functions to handle proper registers. Signed-off-by: Sergey Matyukevich <[email protected]>
All the supporting functions and defines are the same for all three ARC architecture flavors. Define missing regoffset_table for ARCv3. Signed-off-by: Sergey Matyukevich <[email protected]>
Signed-off-by: Sergey Matyukevich <[email protected]>
Fix typo in genregs_get that makes it store field address instead of its value. Signed-off-by: Sergey Matyukevich <[email protected]>
Properly handle kgdb and kprobes addresses in kernel translated memory. Update address check: throw bugs for user mappings and inconsistent vmalloc areas. Signed-off-by: Sergey Matyukevich <[email protected]>
ARC toolchains generate 'complex float' DIE entries in libgcc. At the moment such entries are not yet handled by pahole. So for now disable BTF floats. Signed-off-by: Vladimir Isaev <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables a couple of features required for better BPF support on ARCompact/ARCv2/ARCv3 architectures:
Known issues with BTF generation:
With quick workaround applied BTF can be generated. So far the following examples from libbpf-tools have been tried: biopattern, softirqs, vfsstat, filetop, ksnoop, tcpconnect, execsnoop, exitsnoop, mountsnoop, opensnoop, statsnoop, syscount.