Closed dthaler closed 4 months ago
Yonghong Song yonghong.song@linux.dev wrote:
(Resending since a spam filter seems to have blocked the first attempt.) Is there any semantic difference between the following two instructions? {.opcode = BPF_ALU64 | BPF_MOV | BPF_K, .offset = 0, .imm = -1} This is supported. Sign extension of -1 will be put into ALU64 reg. {.opcode = BPF_ALU64 | BPF_MOVSX | BPF_K, .offset = 32, .imm = -1} This is not supported. BPF_MOVSX only supports register extension. We should make it clear in the doc.
(Resending since a spam filter seems to have blocked the first attempt.) Is there any semantic difference between the following two instructions? {.opcode = BPF_ALU64 | BPF_MOV | BPF_K, .offset = 0, .imm = -1}
(Resending since a spam filter seems to have blocked the first attempt.)
Is there any semantic difference between the following two instructions?
{.opcode = BPF_ALU64 | BPF_MOV | BPF_K, .offset = 0, .imm = -1}
This is supported. Sign extension of -1 will be put into ALU64 reg.
{.opcode = BPF_ALU64 | BPF_MOVSX | BPF_K, .offset = 32, .imm = -1}
This is not supported. BPF_MOVSX only supports register extension. We should make it clear in the doc.
Fixed in https://mailarchive.ietf.org/arch/msg/bpf/WNFgh9ynOFnFGuakBkO4TCNrXDc/
Fixed in draft -01
Yonghong Song yonghong.song@linux.dev wrote: