Skip to content

Commit

Permalink
ebpf: fix big endian issue for s390x
Browse files Browse the repository at this point in the history
Same fix as containers/crun@07bae05

Signed-off-by: Alice Frosi <[email protected]>
  • Loading branch information
Alice Frosi committed Apr 24, 2020
1 parent 9f6a2d4 commit 2e04c83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libcontainer/cgroups/ebpf/devicefilter/devicefilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ func (p *program) init() {
*/
// R2 <- type (lower 16 bit of u32 access_type at R1[0])
p.insts = append(p.insts,
asm.LoadMem(asm.R2, asm.R1, 0, asm.Half))
asm.LoadMem(asm.R2, asm.R1, 0, asm.Word),
asm.And.Imm32(asm.R2, 0xFFFF))

// R3 <- access (upper 16 bit of u32 access_type at R1[0])
p.insts = append(p.insts,
Expand Down

0 comments on commit 2e04c83

Please sign in to comment.