-
Notifications
You must be signed in to change notification settings - Fork 165
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
feat(driver): Add loongarch64 kernel module support #1654
Conversation
Welcome @yzewei! It looks like this is your first PR to falcosecurity/libs 🎉 |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yzewei The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Please double check driver/SCHEMA_VERSION file. See versioning. /hold |
Hi! Thanks for this PR! For context, you can check this PR out: https://github.com/falcosecurity/libs/pull/1181/files
Also, can you expand on why In the meantime, i triggered the CI ;) EDIT: note, however, that since we don't have any CI job on |
Thank you very much for your reply!
|
751e76f
to
c6d87af
Compare
run-unit-test-libsinsp passed the test |
Can you test |
Compiling suitable kernel for testing |
The kernel is still being tested. Most of the current tests have passed, but there are still some problems. It will be submitted after all the tests are passed. |
Thank you very much for this effort! |
This comment was marked as outdated.
This comment was marked as outdated.
Are you on a 6.8-rc kernel? Anyway, you just need to rebase on master since this: #1632 was just merged yesterday. |
Thanks! |
While testing the kmo module, I found some problems with the execution of the test case that makes the splice system call, but I'm not sure if it's consistent in other architectures
error log:
I looked up PPM_SPLICE_F_MOVE macro definition as follows:
|
I found the reason... #1181 (comment) The currently problematic test case:
|
The reason has been found, since the schema should be defined as __loongarch64 instead of loongarch |
@FedeDP The current good news is that the kmod module has all passed the test |
@yzewei no problem sir! And thank for the great effort you are putting into this! |
Thanks for your understanding! There is another news, I almost forgot, the bpf and modern-bpf modules based on loongarch architecture are also on the way. |
@FedeDP We are currently migrating and adapting the ebpf module and have found a problem that may not exist in other architectures, as described below: |
Argh, not really an expert in this area. Summoning @Andreagit97 :) |
Thanks! |
In the current pr, commit loongarch's support for the driver module
|
@FedeDP Due to some problems with the bpf module, we are still communicating with the llvm community and may continue to submit relevant PR in the future. |
You are welcome (also, you did a great great job btw!) |
@@ -187,11 +189,14 @@ TEST(SyscallExit, open_by_handle_atX_success) | |||
/* Parameter 4: path (type: PT_FSPATH) */ | |||
evt_test->assert_charbuf_param(4, fspath); | |||
|
|||
#if defined(__loongarch64) | |||
#elif |
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.
Out of curiosity, can you share the errors you were having here?
We are having a very similar issue in the open
related test cases for ppc64le: #1739
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.
Also, i'd use ifndef
in this case and leave a comment explaining the issues on the arch ;)
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'm adding a judgment here because there is no fstat syscall call under the loongarch architecture. Let's take a look at the error situation without adding a judgment
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 A compile error occurred because fstat could not be found.
I found fstat in the ppc64 system call table, so this shouldn't be a problem
#ifndef __NR_fstat
#define __NR_fstat 108
#endif
Signed-off-by: yzewei <[email protected]>
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area build
/area driver-kmod
Does this PR require a change in the driver versions?
/version driver-API-version-minor
What this PR does / why we need it:
Add loongarch64 kernel module support.
Temporarily does not involve bpf.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
I'm not sure what problems are there at present. If there is a problem, I hope to point out.
Does this PR introduce a user-facing change?: