Re: [PATCH 10/15] ebpf-docs: Add appendix of all opcodes in order

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

 



On Tue, Sep 27, 2022 at 06:59:53PM +0000, dthaler1968@xxxxxxxxxxxxxx wrote:
> From: Dave Thaler <dthaler@xxxxxxxxxxxxx>
> 
> Signed-off-by: Dave Thaler <dthaler@xxxxxxxxxxxxx>
> ---
>  Documentation/bpf/instruction-set.rst | 197 ++++++++++++++++++++++++++
>  1 file changed, 197 insertions(+)
> 
> diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
> index 926957830..b6f098104 100644
> --- a/Documentation/bpf/instruction-set.rst
> +++ b/Documentation/bpf/instruction-set.rst
> @@ -408,3 +408,200 @@ Legacy BPF Packet access instructions
>  eBPF previously introduced special instructions for access to packet data that were
>  carried over from classic BPF. However, these instructions are
>  deprecated and should no longer be used.
> +
> +Appendix
> +========
> +
> +For reference, the following table lists opcodes in order by value.
> +
> +======  ===  ====  ===================================================  ========================================
> +opcode  src  imm   description                                          reference
> +======  ===  ====  ===================================================  ========================================
> +0x00    0x0  any   (additional immediate value)                         `64-bit immediate instructions`_
> +0x04    0x0  any   dst = (uint32_t)(dst + imm)                          `Arithmetic instructions`_
> +0x05    0x0  0x00  goto +offset                                         `Jump instructions`_
> +0x07    0x0  any   dst += imm                                           `Arithmetic instructions`_
> +0x0c    any  0x00  dst = (uint32_t)(dst + src)                          `Arithmetic instructions`_


I guess it's useful, but how did you generate this table?
Looks very error prone if all hex numbers were done by human.



[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