1. 30 Nov, 2018 4 commits
    • Ard Biesheuvel's avatar
      arm64/bpf: use movn/movk/movk sequence to generate kernel addresses · cc2b8ed1
      Ard Biesheuvel authored
      On arm64, all executable code is guaranteed to reside in the vmalloc
      space (or the module space), and so jump targets will only use 48
      bits at most, and the remaining bits are guaranteed to be 0x1.
      
      This means we can generate an immediate jump address using a sequence
      of one MOVN (move wide negated) and two MOVK instructions, where the
      first one sets the lower 16 bits but also sets all top bits to 0x1.
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      cc2b8ed1
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · 93029d7d
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      bpf-next 2018-11-30
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      (Getting out bit earlier this time to pull in a dependency from bpf.)
      
      The main changes are:
      
      1) Add libbpf ABI versioning and document API naming conventions
         as well as ABI versioning process, from Andrey.
      
      2) Add a new sk_msg_pop_data() helper for sk_msg based BPF
         programs that is used in conjunction with sk_msg_push_data()
         for adding / removing meta data to the msg data, from John.
      
      3) Optimize convert_bpf_ld_abs() for 0 offset and fix various
         lib and testsuite build failures on 32 bit, from David.
      
      4) Make BPF prog dump for !JIT identical to how we dump subprogs
         when JIT is in use, from Yonghong.
      
      5) Rename btf_get_from_id() to make it more conform with libbpf
         API naming conventions, from Martin.
      
      6) Add a missing BPF kselftest config item, from Naresh.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      93029d7d
    • Yonghong Song's avatar
      tools/bpf: make libbpf _GNU_SOURCE friendly · b4269954
      Yonghong Song authored
      During porting libbpf to bcc, I got some warnings like below:
        ...
        [  2%] Building C object src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf.c.o
        /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf.c:12:0:
        warning: "_GNU_SOURCE" redefined [enabled by default]
         #define _GNU_SOURCE
        ...
        [  3%] Building C object src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf_errno.c.o
        /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf_errno.c: In function ‘libbpf_strerror’:
        /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf_errno.c:45:7:
        warning: assignment makes integer from pointer without a cast [enabled by default]
           ret = strerror_r(err, buf, size);
        ...
      
      bcc is built with _GNU_SOURCE defined and this caused the above warning.
      This patch intends to make libpf _GNU_SOURCE friendly by
        . define _GNU_SOURCE in libbpf.c unless it is not defined
        . undefine _GNU_SOURCE as non-gnu version of strerror_r is expected.
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      b4269954
    • David S. Miller's avatar
      3d58c9c9
  2. 29 Nov, 2018 11 commits
  3. 28 Nov, 2018 25 commits