Skip to content
Draft
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
3 changes: 2 additions & 1 deletion fact-ebpf/process.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ __always_inline static int64_t process_fill(process_t* p) {
p->uid = uid_gid & 0xFFFFFFFF;
p->gid = (uid_gid >> 32) & 0xFFFFFFFF;
p->login_uid = BPF_CORE_READ(task, loginuid.val);
p->pid = (bpf_get_current_pid_tgid() >> 32) & 0xFFFFFFFF;
// bpf_get_current_pid_tgid() is not available for LSM programs prior to 6.8
p->pid = BPF_CORE_READ(task, tgid) & 0xFFFFFFFF;
u_int64_t err = bpf_get_current_comm(p->comm, TASK_COMM_LEN);
if (err != 0) {
bpf_printk("Failed to fill task comm");
Expand Down
Loading