Skip to content

Reject cBPF shifts > 31 - #51

Merged
arthurfabre merged 1 commit into
masterfrom
afabre/shifts
Aug 28, 2026
Merged

Reject cBPF shifts > 31#51
arthurfabre merged 1 commit into
masterfrom
afabre/shifts

Conversation

@arthurfabre

Copy link
Copy Markdown
Collaborator

cBPF only allows right or left shifts up to 31 bits (as the registers are 32 bits). The kernel rejects programs with bigger shifts.

Reject them too: otherwise we emit eBPF code that will also fail to load.

cBPF only allows right or left shifts up to 31 bits (as the registers
are 32 bits). The kernel rejects programs with bigger shifts.

Reject them too: otherwise we emit eBPF code that will also fail to
load.
@arthurfabre arthurfabre self-assigned this Aug 27, 2026
@arthurfabre
arthurfabre merged commit eaafb3a into master Aug 28, 2026
10 checks passed
@arthurfabre
arthurfabre deleted the afabre/shifts branch August 28, 2026 08:29
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.

2 participants