]> www.infradead.org Git - users/willy/linux.git/log
users/willy/linux.git
6 years agoMerge remote-tracking branch 'mtd/mtd/next'
Stephen Rothwell [Mon, 10 Dec 2018 02:32:42 +0000 (13:32 +1100)]
Merge remote-tracking branch 'mtd/mtd/next'

6 years agoMerge remote-tracking branch 'gfs2/for-next'
Stephen Rothwell [Mon, 10 Dec 2018 02:31:11 +0000 (13:31 +1100)]
Merge remote-tracking branch 'gfs2/for-next'

6 years agoMerge remote-tracking branch 'mac80211-next/master'
Stephen Rothwell [Mon, 10 Dec 2018 02:25:52 +0000 (13:25 +1100)]
Merge remote-tracking branch 'mac80211-next/master'

6 years agoMerge remote-tracking branch 'nfc-next/master'
Stephen Rothwell [Mon, 10 Dec 2018 02:24:11 +0000 (13:24 +1100)]
Merge remote-tracking branch 'nfc-next/master'

6 years agoMerge remote-tracking branch 'netfilter-next/master'
Stephen Rothwell [Mon, 10 Dec 2018 02:18:56 +0000 (13:18 +1100)]
Merge remote-tracking branch 'netfilter-next/master'

6 years agoMerge remote-tracking branch 'mlx5-next/mlx5-next'
Stephen Rothwell [Mon, 10 Dec 2018 02:17:20 +0000 (13:17 +1100)]
Merge remote-tracking branch 'mlx5-next/mlx5-next'

6 years agoMerge remote-tracking branch 'ipsec-next/master'
Stephen Rothwell [Mon, 10 Dec 2018 02:11:10 +0000 (13:11 +1100)]
Merge remote-tracking branch 'ipsec-next/master'

6 years agoMerge remote-tracking branch 'bpf-next/master'
Stephen Rothwell [Mon, 10 Dec 2018 02:03:04 +0000 (13:03 +1100)]
Merge remote-tracking branch 'bpf-next/master'

6 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Mon, 10 Dec 2018 01:36:30 +0000 (12:36 +1100)]
Merge remote-tracking branch 'net-next/master'

6 years agonext-20181203/rdma
Stephen Rothwell [Mon, 10 Dec 2018 01:19:59 +0000 (12:19 +1100)]
next-20181203/rdma

6 years agoMerge remote-tracking branch 'swiotlb/linux-next'
Stephen Rothwell [Mon, 10 Dec 2018 01:17:11 +0000 (12:17 +1100)]
Merge remote-tracking branch 'swiotlb/linux-next'

6 years agoMerge remote-tracking branch 'dlm/next'
Stephen Rothwell [Mon, 10 Dec 2018 01:15:41 +0000 (12:15 +1100)]
Merge remote-tracking branch 'dlm/next'

6 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Mon, 10 Dec 2018 01:14:11 +0000 (12:14 +1100)]
Merge remote-tracking branch 'ieee1394/for-next'

6 years agoMerge remote-tracking branch 'thermal/next'
Stephen Rothwell [Mon, 10 Dec 2018 01:12:00 +0000 (12:12 +1100)]
Merge remote-tracking branch 'thermal/next'

6 years agoMerge remote-tracking branch 'opp/opp/linux-next'
Stephen Rothwell [Mon, 10 Dec 2018 01:09:51 +0000 (12:09 +1100)]
Merge remote-tracking branch 'opp/opp/linux-next'

6 years agoMerge remote-tracking branch 'cpupower/cpupower'
Stephen Rothwell [Mon, 10 Dec 2018 01:08:21 +0000 (12:08 +1100)]
Merge remote-tracking branch 'cpupower/cpupower'

6 years agoMerge remote-tracking branch 'pm/linux-next'
Stephen Rothwell [Mon, 10 Dec 2018 01:02:07 +0000 (12:02 +1100)]
Merge remote-tracking branch 'pm/linux-next'

6 years agoMerge remote-tracking branch 'v4l-dvb-next/master'
Stephen Rothwell [Mon, 10 Dec 2018 01:00:31 +0000 (12:00 +1100)]
Merge remote-tracking branch 'v4l-dvb-next/master'

6 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Mon, 10 Dec 2018 00:57:50 +0000 (11:57 +1100)]
Merge remote-tracking branch 'v4l-dvb/master'

6 years agoMerge remote-tracking branch 'jc_docs/docs-next'
Stephen Rothwell [Mon, 10 Dec 2018 00:47:37 +0000 (11:47 +1100)]
Merge remote-tracking branch 'jc_docs/docs-next'

6 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Mon, 10 Dec 2018 00:46:01 +0000 (11:46 +1100)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

6 years agoMerge remote-tracking branch 'i3c/i3c/next'
Stephen Rothwell [Mon, 10 Dec 2018 00:38:05 +0000 (11:38 +1100)]
Merge remote-tracking branch 'i3c/i3c/next'

6 years agoMerge remote-tracking branch 'i2c/i2c/for-next'
Stephen Rothwell [Mon, 10 Dec 2018 00:36:36 +0000 (11:36 +1100)]
Merge remote-tracking branch 'i2c/i2c/for-next'

6 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Mon, 10 Dec 2018 00:33:58 +0000 (11:33 +1100)]
Merge remote-tracking branch 'hid/for-next'

6 years agoMerge remote-tracking branch 'pstore/for-next/pstore'
Stephen Rothwell [Mon, 10 Dec 2018 00:31:47 +0000 (11:31 +1100)]
Merge remote-tracking branch 'pstore/for-next/pstore'

6 years agoMerge remote-tracking branch 'pci/next'
Stephen Rothwell [Mon, 10 Dec 2018 00:29:40 +0000 (11:29 +1100)]
Merge remote-tracking branch 'pci/next'

6 years agoMerge remote-tracking branch 'printk/for-next'
Stephen Rothwell [Mon, 10 Dec 2018 00:18:06 +0000 (11:18 +1100)]
Merge remote-tracking branch 'printk/for-next'

6 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Mon, 10 Dec 2018 00:06:34 +0000 (11:06 +1100)]
Merge remote-tracking branch 'vfs/for-next'

6 years agoMerge remote-tracking branch 'file-locks/locks-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:55:21 +0000 (10:55 +1100)]
Merge remote-tracking branch 'file-locks/locks-next'

6 years agoMerge remote-tracking branch 'v9fs/9p-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:53:49 +0000 (10:53 +1100)]
Merge remote-tracking branch 'v9fs/9p-next'

6 years agoMerge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:52:20 +0000 (10:52 +1100)]
Merge remote-tracking branch 'ubifs/linux-next'

6 years agoMerge remote-tracking branch 'overlayfs/overlayfs-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:50:52 +0000 (10:50 +1100)]
Merge remote-tracking branch 'overlayfs/overlayfs-next'

6 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:49:20 +0000 (10:49 +1100)]
Merge remote-tracking branch 'nfsd/nfsd-next'

6 years agoMerge remote-tracking branch 'jfs/jfs-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:47:47 +0000 (10:47 +1100)]
Merge remote-tracking branch 'jfs/jfs-next'

6 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:46:18 +0000 (10:46 +1100)]
Merge remote-tracking branch 'fuse/for-next'

6 years agoMerge remote-tracking branch 'f2fs/dev'
Stephen Rothwell [Sun, 9 Dec 2018 23:44:49 +0000 (10:44 +1100)]
Merge remote-tracking branch 'f2fs/dev'

6 years agoMerge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Sun, 9 Dec 2018 23:43:15 +0000 (10:43 +1100)]
Merge remote-tracking branch 'ext4/dev'

6 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Sun, 9 Dec 2018 23:33:07 +0000 (10:33 +1100)]
Merge remote-tracking branch 'ext3/for_next'

6 years agoMerge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Sun, 9 Dec 2018 23:31:37 +0000 (10:31 +1100)]
Merge remote-tracking branch 'ecryptfs/next'

6 years agoMerge remote-tracking branch 'cifs/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:30:04 +0000 (10:30 +1100)]
Merge remote-tracking branch 'cifs/for-next'

6 years agoMerge remote-tracking branch 'btrfs-kdave/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:28:29 +0000 (10:28 +1100)]
Merge remote-tracking branch 'btrfs-kdave/for-next'

6 years agoMerge remote-tracking branch 'befs/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:26:43 +0000 (10:26 +1100)]
Merge remote-tracking branch 'befs/for-next'

6 years agoMerge remote-tracking branch 'fscrypt/master'
Stephen Rothwell [Sun, 9 Dec 2018 23:15:48 +0000 (10:15 +1100)]
Merge remote-tracking branch 'fscrypt/master'

6 years agoMerge remote-tracking branch 'xtensa/xtensa-for-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:14:13 +0000 (10:14 +1100)]
Merge remote-tracking branch 'xtensa/xtensa-for-next'

6 years agoMerge remote-tracking branch 'sparc-next/master'
Stephen Rothwell [Sun, 9 Dec 2018 23:08:12 +0000 (10:08 +1100)]
Merge remote-tracking branch 'sparc-next/master'

6 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Sun, 9 Dec 2018 23:06:06 +0000 (10:06 +1100)]
Merge remote-tracking branch 's390/features'

6 years agoMerge remote-tracking branch 'risc-v/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:03:43 +0000 (10:03 +1100)]
Merge remote-tracking branch 'risc-v/for-next'

6 years agoMerge remote-tracking branch 'powerpc/next'
Stephen Rothwell [Sun, 9 Dec 2018 23:01:40 +0000 (10:01 +1100)]
Merge remote-tracking branch 'powerpc/next'

6 years agoMerge remote-tracking branch 'parisc-hd/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 23:00:13 +0000 (10:00 +1100)]
Merge remote-tracking branch 'parisc-hd/for-next'

6 years agoMerge remote-tracking branch 'nios2/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:58:45 +0000 (09:58 +1100)]
Merge remote-tracking branch 'nios2/for-next'

6 years agoMerge remote-tracking branch 'nds32/next'
Stephen Rothwell [Sun, 9 Dec 2018 22:57:16 +0000 (09:57 +1100)]
Merge remote-tracking branch 'nds32/next'

6 years agoMerge remote-tracking branch 'mips/mips-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:47:08 +0000 (09:47 +1100)]
Merge remote-tracking branch 'mips/mips-next'

6 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Sun, 9 Dec 2018 22:45:40 +0000 (09:45 +1100)]
Merge remote-tracking branch 'microblaze/next'

6 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:44:13 +0000 (09:44 +1100)]
Merge remote-tracking branch 'm68k/for-next'

6 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Sun, 9 Dec 2018 22:42:46 +0000 (09:42 +1100)]
Merge remote-tracking branch 'ia64/next'

6 years agoMerge remote-tracking branch 'csky/linux-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:42:43 +0000 (09:42 +1100)]
Merge remote-tracking branch 'csky/linux-next'

6 years agoMerge remote-tracking branch 'clk/clk-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:40:22 +0000 (09:40 +1100)]
Merge remote-tracking branch 'clk/clk-next'

6 years agomedia: bpf: add bpf function to report mouse movement
Sean Young [Thu, 6 Dec 2018 13:01:03 +0000 (13:01 +0000)]
media: bpf: add bpf function to report mouse movement

Some IR remotes have a directional pad or other pointer-like thing that
can be used as a mouse. Make it possible to decode these types of IR
protocols in BPF.

Cc: netdev@vger.kernel.org
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agoMerge remote-tracking branch 'arm64/for-next/core'
Stephen Rothwell [Sun, 9 Dec 2018 22:28:17 +0000 (09:28 +1100)]
Merge remote-tracking branch 'arm64/for-next/core'

6 years agoMerge remote-tracking branch 'tegra/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:25:54 +0000 (09:25 +1100)]
Merge remote-tracking branch 'tegra/for-next'

6 years agoMerge remote-tracking branch 'sunxi/sunxi/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:23:48 +0000 (09:23 +1100)]
Merge remote-tracking branch 'sunxi/sunxi/for-next'

6 years agoMerge remote-tracking branch 'samsung-krzk/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:22:21 +0000 (09:22 +1100)]
Merge remote-tracking branch 'samsung-krzk/for-next'

6 years agoMerge remote-tracking branch 'rockchip/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:20:39 +0000 (09:20 +1100)]
Merge remote-tracking branch 'rockchip/for-next'

6 years agoMerge remote-tracking branch 'renesas/next'
Stephen Rothwell [Sun, 9 Dec 2018 22:18:23 +0000 (09:18 +1100)]
Merge remote-tracking branch 'renesas/next'

6 years agoMerge remote-tracking branch 'qcom/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:16:06 +0000 (09:16 +1100)]
Merge remote-tracking branch 'qcom/for-next'

6 years agoMerge remote-tracking branch 'reset/reset/next'
Stephen Rothwell [Sun, 9 Dec 2018 22:13:40 +0000 (09:13 +1100)]
Merge remote-tracking branch 'reset/reset/next'

6 years agoMerge remote-tracking branch 'omap/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:11:57 +0000 (09:11 +1100)]
Merge remote-tracking branch 'omap/for-next'

6 years agoMerge remote-tracking branch 'mvebu/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:10:30 +0000 (09:10 +1100)]
Merge remote-tracking branch 'mvebu/for-next'

6 years agoMerge remote-tracking branch 'mediatek/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:09:03 +0000 (09:09 +1100)]
Merge remote-tracking branch 'mediatek/for-next'

6 years agoMerge remote-tracking branch 'keystone/next'
Stephen Rothwell [Sun, 9 Dec 2018 22:09:01 +0000 (09:09 +1100)]
Merge remote-tracking branch 'keystone/next'

6 years agoMerge remote-tracking branch 'imx-mxs/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:06:51 +0000 (09:06 +1100)]
Merge remote-tracking branch 'imx-mxs/for-next'

6 years agoMerge remote-tracking branch 'bcm2835/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:05:13 +0000 (09:05 +1100)]
Merge remote-tracking branch 'bcm2835/for-next'

6 years agoMerge remote-tracking branch 'at91/at91-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:03:46 +0000 (09:03 +1100)]
Merge remote-tracking branch 'at91/at91-next'

6 years agoMerge remote-tracking branch 'aspeed/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:02:18 +0000 (09:02 +1100)]
Merge remote-tracking branch 'aspeed/for-next'

6 years agoMerge remote-tracking branch 'amlogic/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:00:39 +0000 (09:00 +1100)]
Merge remote-tracking branch 'amlogic/for-next'

6 years agoMerge remote-tracking branch 'actions/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 22:00:24 +0000 (09:00 +1100)]
Merge remote-tracking branch 'actions/for-next'

6 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 21:58:16 +0000 (08:58 +1100)]
Merge remote-tracking branch 'arm-soc/for-next'

6 years agoMerge branch 'bpf_line_info'
Alexei Starovoitov [Sun, 9 Dec 2018 21:54:39 +0000 (13:54 -0800)]
Merge branch 'bpf_line_info'

Martin Lau says:

====================
This patch series introduces the bpf_line_info.  Please see individual patch
for details.

It will be useful for introspection purpose, like:

[root@arch-fb-vm1 bpf]# ~/devshare/fb-kernel/linux/tools/bpf/bpftool/bpftool prog dump jited pinned /sys/fs/bpf/test_btf_haskv
[...]
int test_long_fname_2(struct dummy_tracepoint_args * arg):
bpf_prog_44a040bf25481309_test_long_fname_2:
; static int test_long_fname_2(struct dummy_tracepoint_args *arg)
   0:   push   %rbp
   1:   mov    %rsp,%rbp
   4:   sub    $0x30,%rsp
   b:   sub    $0x28,%rbp
   f:   mov    %rbx,0x0(%rbp)
  13:   mov    %r13,0x8(%rbp)
  17:   mov    %r14,0x10(%rbp)
  1b:   mov    %r15,0x18(%rbp)
  1f:   xor    %eax,%eax
  21:   mov    %rax,0x20(%rbp)
  25:   xor    %esi,%esi
; int key = 0;
  27:   mov    %esi,-0x4(%rbp)
; if (!arg->sock)
  2a:   mov    0x8(%rdi),%rdi
; if (!arg->sock)
  2e:   cmp    $0x0,%rdi
  32:   je     0x0000000000000070
  34:   mov    %rbp,%rsi
; counts = bpf_map_lookup_elem(&btf_map, &key);
  37:   add    $0xfffffffffffffffc,%rsi
  3b:   movabs $0xffff8881139d7480,%rdi
  45:   add    $0x110,%rdi
  4c:   mov    0x0(%rsi),%eax
  4f:   cmp    $0x4,%rax
  53:   jae    0x000000000000005e
  55:   shl    $0x3,%rax
  59:   add    %rdi,%rax
  5c:   jmp    0x0000000000000060
  5e:   xor    %eax,%eax
; if (!counts)
  60:   cmp    $0x0,%rax
  64:   je     0x0000000000000070
; counts->v6++;
  66:   mov    0x4(%rax),%edi
  69:   add    $0x1,%rdi
  6d:   mov    %edi,0x4(%rax)
  70:   mov    0x0(%rbp),%rbx
  74:   mov    0x8(%rbp),%r13
  78:   mov    0x10(%rbp),%r14
  7c:   mov    0x18(%rbp),%r15
  80:   add    $0x28,%rbp
  84:   leaveq
  85:   retq
[...]
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agobpf: libbpf: bpftool: Print bpf_line_info during prog dump
Martin KaFai Lau [Sat, 8 Dec 2018 00:42:32 +0000 (16:42 -0800)]
bpf: libbpf: bpftool: Print bpf_line_info during prog dump

This patch adds print bpf_line_info function in 'prog dump jitted'
and 'prog dump xlated':

[root@arch-fb-vm1 bpf]# ~/devshare/fb-kernel/linux/tools/bpf/bpftool/bpftool prog dump jited pinned /sys/fs/bpf/test_btf_haskv
[...]
int test_long_fname_2(struct dummy_tracepoint_args * arg):
bpf_prog_44a040bf25481309_test_long_fname_2:
; static int test_long_fname_2(struct dummy_tracepoint_args *arg)
   0: push   %rbp
   1: mov    %rsp,%rbp
   4: sub    $0x30,%rsp
   b: sub    $0x28,%rbp
   f: mov    %rbx,0x0(%rbp)
  13: mov    %r13,0x8(%rbp)
  17: mov    %r14,0x10(%rbp)
  1b: mov    %r15,0x18(%rbp)
  1f: xor    %eax,%eax
  21: mov    %rax,0x20(%rbp)
  25: xor    %esi,%esi
; int key = 0;
  27: mov    %esi,-0x4(%rbp)
; if (!arg->sock)
  2a: mov    0x8(%rdi),%rdi
; if (!arg->sock)
  2e: cmp    $0x0,%rdi
  32: je     0x0000000000000070
  34: mov    %rbp,%rsi
; counts = bpf_map_lookup_elem(&btf_map, &key);
  37: add    $0xfffffffffffffffc,%rsi
  3b: movabs $0xffff8881139d7480,%rdi
  45: add    $0x110,%rdi
  4c: mov    0x0(%rsi),%eax
  4f: cmp    $0x4,%rax
  53: jae    0x000000000000005e
  55: shl    $0x3,%rax
  59: add    %rdi,%rax
  5c: jmp    0x0000000000000060
  5e: xor    %eax,%eax
; if (!counts)
  60: cmp    $0x0,%rax
  64: je     0x0000000000000070
; counts->v6++;
  66: mov    0x4(%rax),%edi
  69: add    $0x1,%rdi
  6d: mov    %edi,0x4(%rax)
  70: mov    0x0(%rbp),%rbx
  74: mov    0x8(%rbp),%r13
  78: mov    0x10(%rbp),%r14
  7c: mov    0x18(%rbp),%r15
  80: add    $0x28,%rbp
  84: leaveq
  85: retq
[...]

With linum:
[root@arch-fb-vm1 bpf]# ~/devshare/fb-kernel/linux/tools/bpf/bpftool/bpftool prog dump jited pinned /sys/fs/bpf/test_btf_haskv linum
int _dummy_tracepoint(struct dummy_tracepoint_args * arg):
bpf_prog_b07ccb89267cf242__dummy_tracepoint:
; return test_long_fname_1(arg); [file:/data/users/kafai/fb-kernel/linux/tools/testing/selftests/bpf/test_btf_haskv.c line_num:54 line_col:9]
   0: push   %rbp
   1: mov    %rsp,%rbp
   4: sub    $0x28,%rsp
   b: sub    $0x28,%rbp
   f: mov    %rbx,0x0(%rbp)
  13: mov    %r13,0x8(%rbp)
  17: mov    %r14,0x10(%rbp)
  1b: mov    %r15,0x18(%rbp)
  1f: xor    %eax,%eax
  21: mov    %rax,0x20(%rbp)
  25: callq  0x000000000000851e
; return test_long_fname_1(arg); [file:/data/users/kafai/fb-kernel/linux/tools/testing/selftests/bpf/test_btf_haskv.c line_num:54 line_col:2]
  2a: xor    %eax,%eax
  2c: mov    0x0(%rbp),%rbx
  30: mov    0x8(%rbp),%r13
  34: mov    0x10(%rbp),%r14
  38: mov    0x18(%rbp),%r15
  3c: add    $0x28,%rbp
  40: leaveq
  41: retq
[...]

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agobpf: libbpf: Add btf_line_info support to libbpf
Martin KaFai Lau [Sat, 8 Dec 2018 00:42:31 +0000 (16:42 -0800)]
bpf: libbpf: Add btf_line_info support to libbpf

This patch adds bpf_line_info support to libbpf:
1) Parsing the line_info sec from ".BTF.ext"
2) Relocating the line_info.  If the main prog *_info relocation
   fails, it will ignore the remaining subprog line_info and continue.
   If the subprog *_info relocation fails, it will bail out.
3) BPF_PROG_LOAD a prog with line_info

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agobpf: libbpf: Refactor and bug fix on the bpf_func_info loading logic
Martin KaFai Lau [Sat, 8 Dec 2018 00:42:29 +0000 (16:42 -0800)]
bpf: libbpf: Refactor and bug fix on the bpf_func_info loading logic

This patch refactor and fix a bug in the libbpf's bpf_func_info loading
logic.  The bug fix and refactoring are targeting the same
commit 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections")
which is in the bpf-next branch.

1) In bpf_load_program_xattr(), it should retry when errno == E2BIG
   regardless of log_buf and log_buf_sz.  This patch fixes it.

2) btf_ext__reloc_init() and btf_ext__reloc() are essentially
   the same except btf_ext__reloc_init() always has insns_cnt == 0.
   Hence, btf_ext__reloc_init() is removed.

   btf_ext__reloc() is also renamed to btf_ext__reloc_func_info()
   to get ready for the line_info support in the next patch.

3) Consolidate func_info section logic from "btf_ext_parse_hdr()",
   "btf_ext_validate_func_info()" and "btf_ext__new()" to
   a new function "btf_ext_copy_func_info()" such that similar
   logic can be reused by the later libbpf's line_info patch.

4) The next line_info patch will store line_info_cnt instead of
   line_info_len in the bpf_program because the kernel is taking
   line_info_cnt also.  It will save a few "len" to "cnt" conversions
   and will also save some function args.

   Hence, this patch also makes bpf_program to store func_info_cnt
   instead of func_info_len.

5) btf_ext depends on btf.  e.g. the func_info's type_id
   in ".BTF.ext" is not useful when ".BTF" is absent.
   This patch only init the obj->btf_ext pointer after
   it has successfully init the obj->btf pointer.

   This can avoid always checking "obj->btf && obj->btf_ext"
   together for accessing ".BTF.ext".  Checking "obj->btf_ext"
   alone will do.

6) Move "struct btf_sec_func_info" from btf.h to btf.c.
   There is no external usage outside btf.c.

Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agobpf: Add unit tests for bpf_line_info
Martin KaFai Lau [Sat, 8 Dec 2018 00:42:28 +0000 (16:42 -0800)]
bpf: Add unit tests for bpf_line_info

Add unit tests for bpf_line_info for both BPF_PROG_LOAD and
BPF_OBJ_GET_INFO_BY_FD.

jit enabled:
[root@arch-fb-vm1 bpf]# ./test_btf -k 0
BTF prog info raw test[5] (line_info (No subprog)): OK
BTF prog info raw test[6] (line_info (No subprog. insn_off >= prog->len)): OK
BTF prog info raw test[7] (line_info (No subprog. zero tailing line_info): OK
BTF prog info raw test[8] (line_info (No subprog. nonzero tailing line_info)): OK
BTF prog info raw test[9] (line_info (subprog)): OK
BTF prog info raw test[10] (line_info (subprog + func_info)): OK
BTF prog info raw test[11] (line_info (subprog. missing 1st func line info)): OK
BTF prog info raw test[12] (line_info (subprog. missing 2nd func line info)): OK
BTF prog info raw test[13] (line_info (subprog. unordered insn offset)): OK

jit disabled:
BTF prog info raw test[5] (line_info (No subprog)): not jited. skipping jited_line_info check. OK
BTF prog info raw test[6] (line_info (No subprog. insn_off >= prog->len)): OK
BTF prog info raw test[7] (line_info (No subprog. zero tailing line_info): not jited. skipping jited_line_info check. OK
BTF prog info raw test[8] (line_info (No subprog. nonzero tailing line_info)): OK
BTF prog info raw test[9] (line_info (subprog)): not jited. skipping jited_line_info check. OK
BTF prog info raw test[10] (line_info (subprog + func_info)): not jited. skipping jited_line_info check. OK
BTF prog info raw test[11] (line_info (subprog. missing 1st func line info)): OK
BTF prog info raw test[12] (line_info (subprog. missing 2nd func line info)): OK
BTF prog info raw test[13] (line_info (subprog. unordered insn offset)): OK

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agobpf: Refactor and bug fix in test_func_type in test_btf.c
Martin KaFai Lau [Sat, 8 Dec 2018 00:42:27 +0000 (16:42 -0800)]
bpf: Refactor and bug fix in test_func_type in test_btf.c

1) bpf_load_program_xattr() is absorbing the EBIG error
   which makes testing this case impossible.  It is replaced
   with a direct syscall(__NR_bpf, BPF_PROG_LOAD,...).
2) The test_func_type() is renamed to test_info_raw() to
   prepare for the new line_info test in the next patch.
3) The bpf_obj_get_info_by_fd() testing for func_info
   is refactored to test_get_finfo().  A new
   test_get_linfo() will be added in the next patch
   for testing line_info purpose.
4) The test->func_info_cnt is checked instead of
   a static value "2".
5) Remove unnecessary "\n" in error message.
6) Adding back info_raw_test_num to the cmd arg such
   that a specific test case can be tested, like
   all other existing tests.

7) Fix a bug in handling expected_prog_load_failure.
   A test could pass even if prog_fd != -1 while
   expected_prog_load_failure is true.
8) The min rec_size check should be < 8 instead of < 4.

Fixes: 4798c4ba3ba9 ("tools/bpf: extends test_btf to test load/retrieve func_type info")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agobpf: tools: Sync uapi bpf.h
Martin KaFai Lau [Sat, 8 Dec 2018 00:42:26 +0000 (16:42 -0800)]
bpf: tools: Sync uapi bpf.h

Sync uapi bpf.h to tools/include/uapi/linux for
the new bpf_line_info.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agobpf: Add bpf_line_info support
Martin KaFai Lau [Sat, 8 Dec 2018 00:42:25 +0000 (16:42 -0800)]
bpf: Add bpf_line_info support

This patch adds bpf_line_info support.

It accepts an array of bpf_line_info objects during BPF_PROG_LOAD.
The "line_info", "line_info_cnt" and "line_info_rec_size" are added
to the "union bpf_attr".  The "line_info_rec_size" makes
bpf_line_info extensible in the future.

The new "check_btf_line()" ensures the userspace line_info is valid
for the kernel to use.

When the verifier is translating/patching the bpf_prog (through
"bpf_patch_insn_single()"), the line_infos' insn_off is also
adjusted by the newly added "bpf_adj_linfo()".

If the bpf_prog is jited, this patch also provides the jited addrs (in
aux->jited_linfo) for the corresponding line_info.insn_off.
"bpf_prog_fill_jited_linfo()" is added to fill the aux->jited_linfo.
It is currently called by the x86 jit.  Other jits can also use
"bpf_prog_fill_jited_linfo()" and it will be done in the followup patches.
In the future, if it deemed necessary, a particular jit could also provide
its own "bpf_prog_fill_jited_linfo()" implementation.

A few "*line_info*" fields are added to the bpf_prog_info such
that the user can get the xlated line_info back (i.e. the line_info
with its insn_off reflecting the translated prog).  The jited_line_info
is available if the prog is jited.  It is an array of __u64.
If the prog is not jited, jited_line_info_cnt is 0.

The verifier's verbose log with line_info will be done in
a follow up patch.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
6 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Sun, 9 Dec 2018 21:54:26 +0000 (08:54 +1100)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

6 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 21:52:26 +0000 (08:52 +1100)]
Merge remote-tracking branch 'arm/for-next'

6 years agoMerge remote-tracking branch 'dma-mapping/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 21:43:09 +0000 (08:43 +1100)]
Merge remote-tracking branch 'dma-mapping/for-next'

6 years agoMerge remote-tracking branch 'leaks/leaks-next'
Stephen Rothwell [Sun, 9 Dec 2018 21:42:57 +0000 (08:42 +1100)]
Merge remote-tracking branch 'leaks/leaks-next'

6 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Sun, 9 Dec 2018 21:31:23 +0000 (08:31 +1100)]
Merge remote-tracking branch 'kbuild/for-next'

6 years agoMerge remote-tracking branch 'mmc-fixes/fixes'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:44 +0000 (08:23 +1100)]
Merge remote-tracking branch 'mmc-fixes/fixes'

6 years agoMerge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:44 +0000 (08:23 +1100)]
Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'

6 years agoMerge remote-tracking branch 'scsi-fixes/fixes'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:43 +0000 (08:23 +1100)]
Merge remote-tracking branch 'scsi-fixes/fixes'

6 years agoMerge remote-tracking branch 'btrfs-fixes/next-fixes'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:39 +0000 (08:23 +1100)]
Merge remote-tracking branch 'btrfs-fixes/next-fixes'

6 years agoMerge remote-tracking branch 'nvdimm-fixes/libnvdimm-fixes'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:38 +0000 (08:23 +1100)]
Merge remote-tracking branch 'nvdimm-fixes/libnvdimm-fixes'

6 years agoMerge remote-tracking branch 'omap-fixes/fixes'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:36 +0000 (08:23 +1100)]
Merge remote-tracking branch 'omap-fixes/fixes'

6 years agoMerge remote-tracking branch 'mips-fixes/mips-fixes'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:35 +0000 (08:23 +1100)]
Merge remote-tracking branch 'mips-fixes/mips-fixes'

6 years agoMerge remote-tracking branch 'v4l-dvb-fixes/fixes'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:33 +0000 (08:23 +1100)]
Merge remote-tracking branch 'v4l-dvb-fixes/fixes'

6 years agoMerge remote-tracking branch 'ide/master'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:29 +0000 (08:23 +1100)]
Merge remote-tracking branch 'ide/master'

6 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Sun, 9 Dec 2018 21:23:24 +0000 (08:23 +1100)]
Merge remote-tracking branch 'input-current/for-linus'