Skip to content
Open
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ set(CLANG_INCLUDES
function(build_ebpf ebpfsrc)
add_custom_command(TARGET sysinternalsEBPF
PRE_BUILD
COMMAND "${CLANG}" -nostdinc -isystem `gcc -print-file-name=include` ${CLANG_INCLUDES} ${CLANG_DEFINES} -O2 ${CLANG_OPTIONS} -emit-llvm -c "${CMAKE_SOURCE_DIR}/ebpfKern/${ebpfsrc}.c" -o -| "${LLC}" -march=bpf -filetype=obj -o "${ebpfsrc}.o"
COMMAND "${CLANG}" -nostdinc -isystem `gcc -print-file-name=include` ${CLANG_INCLUDES} ${CLANG_DEFINES} -O2 ${CLANG_OPTIONS} -emit-llvm -fno-stack-protector -c "${CMAKE_SOURCE_DIR}/ebpfKern/${ebpfsrc}.c" -o -| "${LLC}" -march=bpf -filetype=obj -o "${ebpfsrc}.o"
COMMENT "Building EBPF object ${ebpfsrc}.o"
DEPENDS ebpfKern/${ebpfsrc}.c ${EBPF_DEPENDS}
)
Expand Down
4 changes: 2 additions & 2 deletions discoverOffsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void memDumpCloseAll()
//--------------------------------------------------------------------
bool isPointer(uint64_t ptr)
{
if (labs(ptr - memAddrs[task]) < MAX_POINTER_DIFF) {
if (ptr < (MAX_POINTER_DIFF + memAddrs[task])) {
return true;
} else {
return false;
Expand All @@ -189,7 +189,7 @@ bool isPointer(uint64_t ptr)
//--------------------------------------------------------------------
bool near(uint64_t a, uint64_t b, uint64_t range)
{
if (labs(a - b) <= range) {
if (a <= (range + b)) {
return true;
} else {
return false;
Expand Down