Skip to content

Commit

Permalink
revert: commit 9198f61759b7bf32e2aa207d8a1973b696f9875a
Browse files Browse the repository at this point in the history
This PR #1160 is no more
necessary since the issue is now fixed in libbpf library

Signed-off-by: Andrea Terzolo <[email protected]>
  • Loading branch information
Andreagit97 authored and poiana committed Dec 5, 2023
1 parent 0927ac9 commit 000d576
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions driver/modern_bpf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

option(MODERN_BPF_DEBUG_MODE "Enable BPF debug prints" OFF)
option(MODERN_BPF_EXCLUDE_PROGS "Regex to exclude tail-called programs" "")
# This is a temporary workaround to solve this regression https://github.com/falcosecurity/libs/issues/1157
# We need to find a better solution
option(MODERN_BPF_COS_WORKAROUND "Allow to correctly extract 'loginuid' from COS system, but requires at least CAP_SYS_ADMIN" OFF)

########################
# Debug mode
Expand All @@ -23,13 +20,6 @@ else()
endif()
message(STATUS "${MODERN_BPF_LOG_PREFIX} MODERN_BPF_DEBUG_MODE: ${MODERN_BPF_DEBUG_MODE}")

if(MODERN_BPF_COS_WORKAROUND)
set(COS_WORKAROUND "COS_WORKAROUND")
else()
set(COS_WORKAROUND "")
endif()
message(STATUS "${MODERN_BPF_LOG_PREFIX} MODERN_BPF_COS_WORKAROUND: ${MODERN_BPF_COS_WORKAROUND}")

########################
# Check kernel version.
########################
Expand Down Expand Up @@ -192,7 +182,6 @@ list(APPEND CLANG_FLAGS
-g -O2
-target bpf
-D__${DEBUG}__
-D__${COS_WORKAROUND}__
-D__TARGET_ARCH_${ARCH} # Match libbpf usage in `/libbpf/src/bpf_tracing.h`
-D__USE_VMLINUX__ # Used to compile without kernel headers.
-I${LIBBPF_INCLUDE}
Expand Down
2 changes: 0 additions & 2 deletions driver/modern_bpf/helpers/extract/extract_from_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,6 @@ static __always_inline void extract__loginuid(struct task_struct *task, uint32_t
{
READ_TASK_FIELD_INTO(loginuid, task, loginuid.val);
}
#ifdef __COS_WORKAROUND__
else
{
struct task_struct___cos *task_cos = (void *)task;
Expand All @@ -733,7 +732,6 @@ static __always_inline void extract__loginuid(struct task_struct *task, uint32_t
BPF_CORE_READ_INTO(loginuid, task_cos, audit, loginuid.val);
}
}
#endif
}

/////////////////////////
Expand Down

0 comments on commit 000d576

Please sign in to comment.