BPF_ALU | BPF_MOVSX with offset = 32?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In re-reading the instruction-set.rst changes for sign extensions, there is one ambiguity
regarding BPF_ALU | BPF_MOVSX with offset = 32.

Is it:
a) Undefined (not a permitted instruction), or
b) Defined as being synonymous with BPF_ALU | BPF_MOV?

The table implies (b) when it says:
> BPF_MOVSX  0xb0   8/16/32  dst = (s8,s16,s32)src

But the following text could be interpreted as ():
> ``BPF_ALU | BPF_MOVSX`` :term:`sign extends<Sign Extend>` 8-bit and 16-bit operands into 32
> bit operands, and zeroes the remaining upper 32 bits.

There's no reason I can think of to use it, given it's synonymous but if given a BPF program that
uses it, should it be rejected by a verifier/disassembler/etc.?  Or treated as valid?

Dave





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux