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

src/ebpf.rs: Increase instruction limit to 1 million #108

Merged
merged 1 commit into from
May 2, 2024

Conversation

seanyoung
Copy link
Contributor

The linux kernel allows programs of 1 million instructions, see

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c04c0d2b968ac45d6ef020316808ef6c82325a82

I'm hitting the 4096 limit in some corner cases with https://github.com/seanyoung/cir, if the infrared protocol is very complex (e.g. XMP). rbpf is used for testing the generated IR decoders in the test framework.

Copy link
Owner

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Thanks!

The linux kernel allows programs of 1 million instructions, see

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c04c0d2b968ac45d6ef020316808ef6c82325a82

Not really, this is a limit for the program complexity which means that in practice, you get either less than this, or a very boring program with no branch.

I'm hitting the 4096 limit in some corner cases with https://github.com/seanyoung/cir, if the infrared protocol is very complex (e.g. XMP). rbpf is used for testing the generated IR decoders in the test framework.

OK, I'm not using the project much myself these days, but if it's helpful to you to raise the limit, I'm fine with that.

Please update test test_verifier_err_too_many_instructions in tests/ubpf_verifier.rs, though.

The linux kernel allows programs of 1 million instructions, see

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c04c0d2b968ac45d6ef020316808ef6c82325a82

I'm hitting the 4096 limit in some corner cases with
https://github.com/seanyoung/cir, if the infrared protocol is very
complex (e.g. XMP). rbpf is used for testing the generated IR decoders
in the test framework.

Signed-off-by: Sean Young <sean@mess.org>
Copy link
Owner

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Thank you!

@qmonnet qmonnet merged commit 17353e3 into qmonnet:main May 2, 2024
7 checks passed
@seanyoung seanyoung deleted the limit branch May 2, 2024 07:58
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.

None yet

2 participants