Skip to content

RFC 9669: LDDW (LD | IMM | DW) subtypes via src_reg not supported (map/var/code addr) #699

@Alan-Jowett

Description

@Alan-Jowett

RFC 9669 Section 5.4 defines {IMM, DW, LD} (LDDW) as a family of wide-immediate instructions where src_reg selects a subtype.

In addition to the plain 64-bit immediate (src_reg == 0), RFC 9669 defines subtypes such as:

  • src_reg == 0x1: dst = map_by_fd(imm)
  • src_reg == 0x2: dst = map_val(map_by_fd(imm)) + next_imm
  • src_reg == 0x3: dst = var_addr(imm)
  • src_reg == 0x4: dst = code_addr(imm)
  • src_reg == 0x5: dst = map_by_idx(imm)
  • src_reg == 0x6: dst = map_val(map_by_idx(imm)) + next_imm

Current uBPF behavior:

  • Appears to only accept/execute the plain 64-bit immediate form (src_reg == 0).
  • RFC 9669 LDDW subtypes with src_reg != 0 are rejected and/or not executed.

Expected behavior:

  • Either implement the RFC 9669 LDDW subtypes, or document uBPF’s conformance claims/limitations clearly (since these are in RFC 9669 base64).

RFC reference:

  • RFC 9669 Section 5.4 and Appendix A opcode registry entries for opcode 0x18 subtypes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions