• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

qmonnet / rbpf / 7423260285
95%

Build:
DEFAULT BRANCH: main
Ran 05 Jan 2024 02:54PM UTC
Jobs 1
Files 11
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Jan 2024 02:52PM UTC coverage: 95.544%. Remained the same
7423260285

push

github

qmonnet
src/interpreter.rs: Fix left/right shifts implementation (mask offset)

The current version of the BPF Instruction Set Specification specifies
that "Shift operations use a mask of 0x3F (63) for 64-bit operations and
0x1F (31) for 32-bit operations" [0].

The current implementation is not compliant, and Rust complains if we
overflow the number of bits we have when trying to shift. Let's fix it,
and let's complete the test suite regarding left and right shift
operations.

Note: The JITs are not updated at this stage. The standard does not
mention any difference between JIT and interpreter, but the kernel
clearly considers the masking for the interpreter only. JIT-compilers
are supposed to handle the overflow case in an implementation-defined
(architecture-dependant) fashion. Kernel also use masking for shifts
with registers only (not immediates) and handles overflows with
immediates in the verifier by rejecting the programs.

[0]: https://www.ietf.org/archive/id/draft-thaler-bpf-isa-02.html#section-3.1-18

Reported-by: HAPPY <pcy190@126.com>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>

4267 of 4466 relevant lines covered (95.54%)

233.72 hits per line

Jobs
ID Job ID Ran Files Coverage
1 7423260285.1 05 Jan 2024 02:54PM UTC 11
95.54
GitHub Action Run
Source Files on build 7423260285
  • Tree
  • List 11
  • Changed 6
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 7bebff57 on github
  • Prev Build on main (#7423240713)
  • Next Build on main (#8278974790)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc