This is an archive of the discontinued LLVM Phabricator instance.

Revert r292204 as it introduces a stack-use-after-scope issue.
AbandonedPublic

Authored by krasin on Jan 17 2017, 1:07 PM.

Details

Reviewers
ast
Summary

Revert [bpf] error when unknown bpf helper is called

Emit error when BPF backend sees a call to a global function or to an external symbol.
The kernel verifier only allows calls to predefined helpers from bpf.h
which are defined in 'enum bpf_func_id'. Such calls in assembler must
look like 'call [1-9]+' where number matches bpf_func_id.

Example breakage:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/2170/steps/check-llvm%20asan/logs/stdio

Event Timeline

krasin created this revision.Jan 17 2017, 1:07 PM
krasin edited the summary of this revision. (Show Details)Jan 17 2017, 1:25 PM
ast requested changes to this revision.Jan 17 2017, 1:26 PM

unnecessary anymore.

This revision now requires changes to proceed.Jan 17 2017, 1:26 PM
krasin abandoned this revision.Jan 17 2017, 1:33 PM

A proper fix had been submitted.

test/CodeGen/BPF/sanity.ll