-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
add some error hints #904
add some error hints #904
Conversation
awesome. we were thinking to add such hints to kernel verifier directly and to llvm. |
Thanks. We can keep an eye out for common beginner errors and keep adding hints. What was the way to get the kernel verifier errors again? Should they be in dmesg if I set something? |
Oh, and the bpf_log_buffer I'm parsing misses some errors, like:
Happened when trying to dereference an local pointer to an unallocated struct. Maybe there's another place I can catch it in bcc, if not, then we might need hints in LLVM too. |
bpf_log_buffer is what verifier returns. It's verification log plus all errors. |
@brendangregg Planing to add more warnings/errors.
|
pushed few more errors:
pls give it a try and suggest wording improvements. |
Hi all, @4ast, hints in bcc / llvm (/ verifier, hopefully) look great and really helpful, thanks! I'm being curious here about the errors produced by llvm backend. Will there be a pragma or another way to opt out? I'm thinking about BPF virtual machines other than the one in the kernel. As far as I remember, uBPF has its own stack size for example (which is in fact lower: 128 bytes, but it could as well be set to more than 512 instead), or allows for up to 2^16 instructions. If I ever wish to use different parameters from the ones of the kernel, will I still be able to compile my program from C code? |
it shouldn't be too difficult to add backend flags and relax these checks. |
Beginners are hitting these errors, so I tried adding some hints to the output. What do we think? More hints can be added (there's also the list in Documentation/networking/filter.txt).
Eg, sample output: