-
Notifications
You must be signed in to change notification settings - Fork 169
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
new(driver/modern_bpf): Add ppc64le support for modern-bpf #1475
new(driver/modern_bpf): Add ppc64le support for modern-bpf #1475
Conversation
Welcome @mdafsanhossain! It looks like this is your first PR to falcosecurity/libs 🎉 |
Hi! Thanks for this PR! Is there any plan to support ppc64le also for old bpf probe (and eventually kmod too)?
syscalls-bumper does not support ppc64le though; was its support added locally? Can you open a PR over there too?
|
Yes I added the support locally and built it.
I removed |
Thanks!
Yes, they are!
Just double checked! Yep because they were cleaned up by the project that syscalls-bumper uses under the hood: hrw/syscalls-table@079ef06, hrw/syscalls-table@94b4691, hrw/syscalls-table@046c3b5 |
Also, you now need a rebase since a PR with automatic bump of syscall-bumper was merged ;) |
Also, once this is fully in place, mind to also update README adding the new supported arch for modern bpf probe as EXPERIMENTAL? |
Thanks. I will do that, clean it up and after that update the README too. |
df2cba6
to
6ef477f
Compare
SYSCALL = 0, | ||
//SYSCALL definition is skipped on powerpc since SYSCALL is already defined in vmlinux.h | ||
#ifndef __TARGET_ARCH_powerpc | ||
SYSCALL = 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we just need to avoid name collision, by prefixing these ones with eg: MODERN_BPF_
.
@Andreagit97 thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdafsanhossain here !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FedeDP Do you mean something like this? MODERN_BPF_SYSCALL=0
? I am not sure if I am understanding this correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum intrumentation_type
{
MODERN_BPF_SYSCALL = 0,
MODERN_BPF_TRACEPOINT = 1,
}
and then rename their usages whereveer sampling_logic
is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I agree, probably we can rename them in INSTR_TYPE_SYSCALL
and INSTR_TYPE_TRACEPOINT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhm I didn't see new messages, if we all agree it's also okay to go with
enum intrumentation_type
{
MODERN_BPF_SYSCALL = 0,
MODERN_BPF_TRACEPOINT = 1,
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense now. Thanks :)
/milestone next-driver |
@FedeDP Is it fine that the syscalls are being removed? |
It is ;) Were you able to run |
I am running it now. |
driver/SCHEMA_VERSION
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we bumped this because new PPM_CODES could be sent from the drivers
@FedeDP I am running into an issue while trying to run the drivers_test
Steps to reproduce:
Btw there are 2 small bugs in these files which prevents drivers_test compilation.
|
Wow! Can you fix them? We only run drivers tests on x86_64 and aarch64 that haven't got |
This error is weird, the buffer dim is correct in this line
but in the below line is
It seems like someone on powerpc clears this
Just tried on my machine and it works, moreover these tests run in CI so they are working it seems something specific to powerpc |
I wonder what is resetting |
Signed-off-by: mdafsanhossain <[email protected]>
Signed-off-by: Afsan Hossain <[email protected]>
Signed-off-by: mdafsanhossain <[email protected]>
Signed-off-by: mdafsanhossain <[email protected]>
Signed-off-by: mdafsanhossain <[email protected]>
Signed-off-by: Afsan Hossain <[email protected]>
Signed-off-by: Afsan Hossain <[email protected]>
fca6fef
to
8ea66a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it's great, thank you
/approve
LGTM label has been added. Git tree hash: c2202ba3d7f45e72b107e5b3f050343da3b4f6a8
|
@mdafsanhossain can you also open the PR on syscalls-bumper please? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, mdafsanhossain The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Will do |
/unhold |
too late.... however, this looks very nice! Thanks a lot! |
Ops sorry @hbrueckner , i completely forgot... my fault 😭 sorry again! |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area driver-modern-bpf
/area libscap-engine-modern-bpf
/area libscap
What this PR does / why we need it:
This PR adds
PPC64LE
specific changes to allow compiling of modern-bpf on PowerPC architecture. This is to add modern-bpf support for Stackrox on ppc64le.Output of
make ProbeSkeleton
andmake scap
are attached below.scap-build.log
probeskeleton.log
Note: syscall_compat_* headers were generated using
./build/syscalls-bumper -repo-root /root/libs -overwrite
Does this PR introduce a user-facing change?: