Skip to content

Conversation

@ckane
Copy link

@ckane ckane commented Nov 5, 2021

Modify the eBPF programlet compilation to add -fno-stack-protector similar to microsoft/SysmonForLinux#42

Additionally, the compiler warnings identified two calls to labs(...) that would always evaluate to true due to them operating on an unsigned value. I modified the less-than comparison to move the subtracted value from the left-hand side to be an added value to the right-hand side, and removed the labs(...) calls.

ckane added 2 commits November 4, 2021 22:49
The eBPF programlets cannot be built with -fno-stack-protector, as they
won't be linked to the supporting code, as it doesn't make sense in
their context. Add -fno-stack-protector to the build_ebpf line so that
they won't be built with this feature when the feature is enabled for
the userland parts of the project.
The compiler complains that the value inside the labs(...) calls in both
places in this commit is an unsigned value, and always unsigned. Move
the value being subtracted to the right-hand-side as an addition, and
remove the labs(...) calls that would always return true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant