1. 25 May, 2021 3 commits
    • Zhen Lei's avatar
      bpf: Fix spelling mistakes · 8fb33b60
      Zhen Lei authored
      Fix some spelling mistakes in comments:
      aother ==> another
      Netiher ==> Neither
      desribe ==> describe
      intializing ==> initializing
      funciton ==> function
      wont ==> won't and move the word 'the' at the end to the next line
      accross ==> across
      pathes ==> paths
      triggerred ==> triggered
      excute ==> execute
      ether ==> either
      conervative ==> conservative
      convetion ==> convention
      markes ==> marks
      interpeter ==> interpreter
      Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/20210525025659.8898-2-thunder.leizhen@huawei.com
      8fb33b60
    • Aditya Srivastava's avatar
      samples: bpf: Ix kernel-doc syntax in file header · 4ce7d68b
      Aditya Srivastava authored
      The opening comment mark '/**' is used for highlighting the beginning of
      kernel-doc comments.
      The header for samples/bpf/ibumad_kern.c follows this syntax, but
      the content inside does not comply with kernel-doc.
      
      This line was probably not meant for kernel-doc parsing, but is parsed
      due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
      causes unexpected warnings from kernel-doc:
      warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
       * ibumad BPF sample kernel side
      
      Provide a simple fix by replacing this occurrence with general comment
      format, i.e. '/*', to prevent kernel-doc from parsing it.
      Signed-off-by: default avatarAditya Srivastava <yashsri421@gmail.com>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Link: https://lore.kernel.org/bpf/20210523151408.22280-1-yashsri421@gmail.com
      4ce7d68b
    • Yonghong Song's avatar
      libbpf: Add support for new llvm bpf relocations · 9f0c317f
      Yonghong Song authored
      LLVM patch https://reviews.llvm.org/D102712
      narrowed the scope of existing R_BPF_64_64
      and R_BPF_64_32 relocations, and added three
      new relocations, R_BPF_64_ABS64, R_BPF_64_ABS32
      and R_BPF_64_NODYLD32. The main motivation is
      to make relocations linker friendly.
      
      This change, unfortunately, breaks libbpf build,
      and we will see errors like below:
        libbpf: ELF relo #0 in section #6 has unexpected type 2 in
           /home/yhs/work/bpf-next/tools/testing/selftests/bpf/bpf_tcp_nogpl.o
        Error: failed to link
           '/home/yhs/work/bpf-next/tools/testing/selftests/bpf/bpf_tcp_nogpl.o':
           Unknown error -22 (-22)
      The new relocation R_BPF_64_ABS64 is generated
      and libbpf linker sanity check doesn't understand it.
      Relocation section '.rel.struct_ops' at offset 0x1410 contains 1 entries:
          Offset             Info             Type               Symbol's Value  Symbol's Name
      0000000000000018  0000000700000002 R_BPF_64_ABS64         0000000000000000 nogpltcp_init
      
      Look at the selftests/bpf/bpf_tcp_nogpl.c,
        void BPF_STRUCT_OPS(nogpltcp_init, struct sock *sk)
        {
        }
      
        SEC(".struct_ops")
        struct tcp_congestion_ops bpf_nogpltcp = {
                .init           = (void *)nogpltcp_init,
                .name           = "bpf_nogpltcp",
        };
      The new llvm relocation scheme categorizes 'nogpltcp_init' reference
      as R_BPF_64_ABS64 instead of R_BPF_64_64 which is used to specify
      ld_imm64 relocation in the new scheme.
      
      Let us fix the linker sanity checking by including
      R_BPF_64_ABS64 and R_BPF_64_ABS32. There is no need to
      check R_BPF_64_NODYLD32 which is used for .BTF and .BTF.ext.
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
      Link: https://lore.kernel.org/bpf/20210522162341.3687617-1-yhs@fb.com
      9f0c317f
  2. 24 May, 2021 13 commits
  3. 23 May, 2021 1 commit
  4. 21 May, 2021 23 commits