Skip to content

x/net/bpf: support jump conditions on x #27814

@arthurfabre

Description

@arthurfabre

Currently conditionals / jumps are represented by JumpIf. This doesn't support conditionals / jumps that use register x instead of the constant k encoded in the instruction.

I have added preliminary support for this in the form of a new JumpIfX instruction.

Questions:

  • Should JumpIf be renamed JumpIfConstant for consistency with ALUOpConstant & ALUOpX?
  • Do I need to add support for this to the vm or is adding it to disassembler enough?

cc @danderson & @mdlayher as you seem to be the maintainers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions