Skip to content

Add -fno-stack-protector to eBPF program compile line#42

Merged
kesheldr merged 2 commits into
microsoft:mainfrom
ckane:ebpf-no-stack-protector
Nov 29, 2021
Merged

Add -fno-stack-protector to eBPF program compile line#42
kesheldr merged 2 commits into
microsoft:mainfrom
ckane:ebpf-no-stack-protector

Conversation

@ckane

@ckane ckane commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

When compiling with this feature enabled for the project, we don't want it to be enabled on the stand-alone ebpf programs, because they don't have access to the C runtime bits needed to be linked in to support this (as, ostensibly, the kernel would implement its own facilities for this). Add -fno-stack-protector to the eBPF program compilation only so that it always turns the feature off when building the eBPF programlets.

Additionally, this PR contains a stylistic change to pre-initialize empty to zeroes in NetworkTrackerSeenAccept(...), which silences a compiler warning about potential use of a value prior to initialization.

ckane added 2 commits November 4, 2021 21:43
The ebpf programs aren't getting linked against the extra run-time
helpers, so they don't have access to extended features like stack
protection. This was causing a build error that is fixed by adding
-fno-stack-protector to the compilation line.
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.

2 participants