1. Mar 04, 2023
  2. Mar 03, 2023
  3. Mar 02, 2023
  4. Mar 01, 2023
    • Jose E. Marchesi's avatar
      bpf, docs: Document BPF insn encoding in term of stored bytes · ae256f95
      Jose E. Marchesi authored
      
      
      [Changes from V4:
      - s/regs:16/regs:8 in figure.]
      
      [Changes from V3:
      - Back to src_reg and dst_reg, since they denote register numbers
        as opposed to the values stored in these registers.]
      
      [Changes from V2:
      - Use src and dst consistently in the document.
      - Use a more graphical depiction of the 128-bit instruction.
      - Remove `Where:' fragment.
      - Clarify that unused bits are reserved and shall be zeroed.]
      
      [Changes from V1:
      - Use rst literal blocks for figures.
      - Avoid using | in the basic instruction/pseudo instruction figure.
      - Rebased to today's bpf-next master branch.]
      
      This patch modifies instruction-set.rst so it documents the encoding
      of BPF instructions in terms of how the bytes are stored (be it in an
      ELF file or as bytes in a memory buffer to be loaded into the kernel
      or some other BPF consumer) as opposed to how the instruction looks
      like once loaded.
      
      This is hopefully easier to understand by implementors looking to
      generate and/or consume bytes conforming BPF instructions.
      
      The patch also clarifies that the unused bytes in a pseudo-instruction
      shall be cleared with zeros.
      
      Signed-off-by: default avatarJose E. Marchesi <jose.marchesi@oracle.com>
      Acked-by: default avatarYonghong Song <yhs@fb.com>
      Acked-by: default avatarDavid Vernet <void@manifault.com>
      Link: https://lore.kernel.org/r/87h6v6i0da.fsf_-_@oracle.com
      
      
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      ae256f95
    • David Vernet's avatar
      bpf: Fix bpf_cgroup_from_id() doxygen header · 30a2d832
      David Vernet authored
      In commit 332ea1f6 ("bpf: Add bpf_cgroup_from_id() kfunc"), a new
      bpf_cgroup_from_id() kfunc was added which allows a BPF program to
      lookup and acquire a reference to a cgroup from a cgroup id. The
      commit's doxygen comment seems to have copy-pasted fields, which causes
      BPF kfunc helper documentation to fail to render:
      
      <snip>/helpers.c:2114: warning: Excess function parameter 'cgrp'...
      <snip>/helpers.c:2114: warning: Excess function parameter 'level'...
      
      <snip>
      
      <snip>/helpers.c:2114: warning: Excess function parameter 'level'...
      
      This patch fixes the doxygen header.
      
      Fixes: 332ea1f6
      
       ("bpf: Add bpf_cgroup_from_id() kfunc")
      Signed-off-by: default avatarDavid Vernet <void@manifault.com>
      Acked-by: default avatarYonghong Song <yhs@fb.com>
      Link: https://lore.kernel.org/r/20230228152845.294695-1-void@manifault.com
      
      
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      30a2d832
  5. Feb 28, 2023