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

c #4365

Closed
wants to merge 1 commit into from
Closed

c #4365

Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions pkg/ebpf/c/tracee.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,18 @@ int lkm_seeker_mod_tree_tail(struct pt_regs *ctx)
if (!init_tailcall_program_data(&p, ctx))
return -1;

struct module *m;
if (bpf_core_field_exists(m->mem)) {
struct bpf_iter_num it;
int *v;
bpf_iter_num_new(&it, 2, 5);
while ((v = bpf_iter_num_next(&it))) {
bpf_printk("aaa");
}
bpf_iter_num_destroy(&it);
bpf_printk("bbb");
}

u32 flags = HISTORY_SCAN_FINISHED;

// This method is efficient only when the kernel is compiled with
Expand Down
4 changes: 4 additions & 0 deletions pkg/ebpf/c/vmlinux.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ typedef __kernel_loff_t loff_t;

typedef unsigned short umode_t;

struct bpf_iter_num {
__u64 __opaque[1];
};

struct kernfs_node {
const char *name;
u64 id;
Expand Down
Loading