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

忽略 AArch32 的 syscall,因为不支持。 #45

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ int tracepoint__sched__sched_process_fork(struct bpf_raw_tracepoint_args *ctx)

SEC("raw_tracepoint/sys_enter")
int raw_syscalls_sys_enter(struct bpf_raw_tracepoint_args* ctx) {

struct task_struct *task = NULL;
task = (struct task_struct *)bpf_get_current_task();
if (!task)
return 0;
u64 flags = BPF_CORE_READ(task, thread_info.flags);
if (flags == NULL || flags == 0)
{
return 0;
}
bool is32 = (flags >> 22) & 1 != 0;
if (is32)
return 0;

program_data_t p = {};
if (!init_program_data(&p, ctx))
return 0;
Expand Down
Loading