Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf: fix verifier error in dameon debug mode with newer LLVM versions #2181

Merged
merged 1 commit into from
Nov 30, 2017

Conversation

borkmann
Copy link
Member

@borkmann borkmann commented Nov 30, 2017

4.9.65 doesn't have narrow ctx access support in verifier, and
clang generates such patterns occasionally when it thinks only
up to specific size is accessed anyway. Fix the following error:

[...]
level=warning msg="72: (b7) r5 = 20"
level=warning msg="73: (85) call 25"
level=warning msg="74: (71) r1 = *(u8 *)(r10 -132)"
level=warning msg="75: (71) r3 = *(u8 *)(r6 +44)"
level=warning msg="invalid bpf_context access off=44 size=1"

Signed-off-by: Daniel Borkmann daniel@iogearbox.net

4.9.65 doesn't have narrow ctx access support in verifier, and
clang generates such patterns occasionally when it thinks only
up to specific size is accessed anyway. Fix the following error:

  [...]
  level=warning msg="72: (b7) r5 = 20"
  level=warning msg="73: (85) call 25"
  level=warning msg="74: (71) r1 = *(u8 *)(r10 -132)"
  level=warning msg="75: (71) r3 = *(u8 *)(r6 +44)"
  level=warning msg="invalid bpf_context access off=44 size=1"

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
@borkmann borkmann requested review from a team November 30, 2017 13:21
@borkmann borkmann added sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. kind/bug This is a bug in the Cilium logic. labels Nov 30, 2017
@tgraf tgraf merged commit 5d882fd into master Nov 30, 2017
@tgraf tgraf deleted the bpf-fix branch November 30, 2017 14:56
@tgraf tgraf added the release-note/bug This PR fixes an issue in a previous release of Cilium. label Nov 30, 2017
Copy link
Contributor

@jrfastab jrfastab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants