[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-09-03 Thread Frank Heimes
Based on the last recent conversation (and comment #9) I am closing this ticket 
for now as Invalid.
If the upstream work succeeded and BPF got stabilized and tested again and 
further issues occur, a new LP bug can be opened any time.

** Changed in: linux (Ubuntu Focal)
   Status: In Progress => Invalid

** Changed in: linux (Ubuntu Bionic)
   Status: Triaged => Invalid

** Changed in: linux (Ubuntu)
   Status: New => Invalid

** Changed in: ubuntu-z-systems
   Status: In Progress => Invalid

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  Invalid
Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Bionic:
  Invalid
Status in linux source package in Focal:
  Invalid

Bug description:
  [Impact]
  Some bpf programs will fail to execute on s390x, returning EFAULT when they 
should be able to read user memory.

  [Test case]
  apt-get source linux
  mkdir -p /usr/lib/perf/
  cp -a linux-5.4.0/tools/perf/include /usr/lib/perf/
  probe_read=$(grep -w probe_read /usr/lib/perf/include/bpf/bpf.h)
  probe_read_user=${probe_read//read/read_user}
  sed -i "/probe_read)/i$probe_read_user" /usr/lib/perf/include/bpf/bpf.h
  probe_read_user_str=${probe_read//read/read_user_str}
  sed -i "/probe_read)/i$probe_read_user_str" /usr/lib/perf/include/bpf/bpf.h

  ed - linux-5.4.0/tools/perf/examples/bpf/augmented_raw_syscalls.c << EOF
  100c
  int string_len = probe_read_user_str(_arg->value, arg_len, arg);
  .
  w
  EOF
  perf trace -eopenat,augmented_raw_syscalls.c cat /etc/passwd > /dev/null

  You should see:
   0.332 ( 0.002 ms): cat/3223 openat(dfd: CWD, filename: "/etc/passwd")
 = 3
  instead of
   0.334 ( 0.003 ms): cat/3739 openat(dfd: CWD, filename: "")   
 = 3

  [Potential regressions]
  One potential regression is that unprivileged code can be able to exploit the 
changes to read or write kernel memory.


  --

  
  We need to run BPF filters to analyse and monitor network traffic. The BPF 
filters are created by skydive (http://skydive.network). Currently skydive 
fails to install BPF filters on s390x (using Ubuntu 18.04 currently, soon 
moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : 

[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-08-27 Thread Stefan Bader
** Changed in: linux (Ubuntu Focal)
   Importance: Undecided => Medium

** Changed in: linux (Ubuntu Bionic)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  Triaged
Status in linux source package in Focal:
  In Progress

Bug description:
  [Impact]
  Some bpf programs will fail to execute on s390x, returning EFAULT when they 
should be able to read user memory.

  [Test case]
  apt-get source linux
  mkdir -p /usr/lib/perf/
  cp -a linux-5.4.0/tools/perf/include /usr/lib/perf/
  probe_read=$(grep -w probe_read /usr/lib/perf/include/bpf/bpf.h)
  probe_read_user=${probe_read//read/read_user}
  sed -i "/probe_read)/i$probe_read_user" /usr/lib/perf/include/bpf/bpf.h
  probe_read_user_str=${probe_read//read/read_user_str}
  sed -i "/probe_read)/i$probe_read_user_str" /usr/lib/perf/include/bpf/bpf.h

  ed - linux-5.4.0/tools/perf/examples/bpf/augmented_raw_syscalls.c << EOF
  100c
  int string_len = probe_read_user_str(_arg->value, arg_len, arg);
  .
  w
  EOF
  perf trace -eopenat,augmented_raw_syscalls.c cat /etc/passwd > /dev/null

  You should see:
   0.332 ( 0.002 ms): cat/3223 openat(dfd: CWD, filename: "/etc/passwd")
 = 3
  instead of
   0.334 ( 0.003 ms): cat/3739 openat(dfd: CWD, filename: "")   
 = 3

  [Potential regressions]
  One potential regression is that unprivileged code can be able to exploit the 
changes to read or write kernel memory.


  --

  
  We need to run BPF filters to analyse and monitor network traffic. The BPF 
filters are created by skydive (http://skydive.network). Currently skydive 
fails to install BPF filters on s390x (using Ubuntu 18.04 currently, soon 
moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-08-26 Thread Thadeu Lima de Souza Cascardo
** Description changed:

- We need to run BPF filters to analyse and monitor network traffic. The
- BPF filters are created by skydive (http://skydive.network). Currently
- skydive fails to install BPF filters on s390x (using Ubuntu 18.04
- currently, soon moving to Ubuntu 20.04).
+ [Impact]
+ Some bpf programs will fail to execute on s390x, returning EFAULT when they 
should be able to read user memory.
+ 
+ [Test case]
+ apt-get source linux
+ mkdir -p /usr/lib/perf/
+ cp -a linux-5.4.0/tools/perf/include /usr/lib/perf/
+ probe_read=$(grep -w probe_read /usr/lib/perf/include/bpf/bpf.h)
+ probe_read_user=${probe_read//read/read_user}
+ sed -i "/probe_read)/i$probe_read_user" /usr/lib/perf/include/bpf/bpf.h
+ probe_read_user_str=${probe_read//read/read_user_str}
+ sed -i "/probe_read)/i$probe_read_user_str" /usr/lib/perf/include/bpf/bpf.h
+ 
+ ed - linux-5.4.0/tools/perf/examples/bpf/augmented_raw_syscalls.c << EOF
+ 100c
+ int string_len = probe_read_user_str(_arg->value, arg_len, arg);
+ .
+ w
+ EOF
+ perf trace -eopenat,augmented_raw_syscalls.c cat /etc/passwd > /dev/null
+ 
+ You should see:
+  0.332 ( 0.002 ms): cat/3223 openat(dfd: CWD, filename: "/etc/passwd")
 = 3
+ instead of
+  0.334 ( 0.003 ms): cat/3739 openat(dfd: CWD, filename: "")   
 = 3
+ 
+ [Potential regressions]
+ One potential regression is that unprivileged code can be able to exploit the 
changes to read or write kernel memory.
+ 
+ 
+ --
+ 
+ 
+ We need to run BPF filters to analyse and monitor network traffic. The BPF 
filters are created by skydive (http://skydive.network). Currently skydive 
fails to install BPF filters on s390x (using Ubuntu 18.04 currently, soon 
moving to Ubuntu 20.04).
  
  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they work
  fine on Intel.
  
  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux
  
  Example instructions:
  
  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/
  
  Errors:
  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
- 
  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  Triaged
Status in linux source package in Focal:
  In Progress

Bug description:
  [Impact]
  Some bpf programs will fail to execute on s390x, returning EFAULT when they 
should be able to read user memory.

  [Test case]
  apt-get source linux
  mkdir -p /usr/lib/perf/
  cp -a linux-5.4.0/tools/perf/include /usr/lib/perf/
  probe_read=$(grep -w probe_read /usr/lib/perf/include/bpf/bpf.h)
  probe_read_user=${probe_read//read/read_user}
  sed -i "/probe_read)/i$probe_read_user" /usr/lib/perf/include/bpf/bpf.h
  

[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-08-20 Thread Thadeu Lima de Souza Cascardo
** Also affects: linux (Ubuntu Focal)
   Importance: Undecided
   Status: New

** Changed in: linux (Ubuntu Focal)
   Status: New => In Progress

** Changed in: linux (Ubuntu Focal)
 Assignee: (unassigned) => Thadeu Lima de Souza Cascardo (cascardo)

** Changed in: linux (Ubuntu Bionic)
   Status: In Progress => Triaged

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  Triaged
Status in linux source package in Focal:
  In Progress

Bug description:
  We need to run BPF filters to analyse and monitor network traffic. The
  BPF filters are created by skydive (http://skydive.network). Currently
  skydive fails to install BPF filters on s390x (using Ubuntu 18.04
  currently, soon moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-08-18 Thread Thadeu Lima de Souza Cascardo
Hi.

So if I understand correctly, this will be 18.04 userspace on top of a
20.04 kernel, that is, 5.4. I noticed 5.4 also lacks probe_read_user. I
will keep working on a backport of this to 5.4 kernel, then. Let me know
if there is anything else missing here.

Thanks.
Cascardo.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  In Progress

Bug description:
  We need to run BPF filters to analyse and monitor network traffic. The
  BPF filters are created by skydive (http://skydive.network). Currently
  skydive fails to install BPF filters on s390x (using Ubuntu 18.04
  currently, soon moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-08-14 Thread Thadeu Lima de Souza Cascardo
Hi.

So, we clarified that some of the problems were not caused by the kernel
at all. The only thing missing is support to probe_read_kernel and
probe_read_user on 4.15 kernels. Is that needed for the offering?

If I didn't get it right, I am sorry. So, in order for us to meet your
expectations, I'll try to understand better what are the needs here:

1) Do you want support on 4.15 kernel on Ubuntu 18.04, right? Or is the
offering based on Ubuntu 20.04?

2) Do you expect to be able to use LLVM/clang 10? Or is LLVM/clang 8
sufficient for your needs? The bug has only been open for the linux
package, so we would need to get folks behind LLVM involved, or try to
fix this on the kernel somehow, which might delay things a little. Being
able to use LLVM/clang 8, it seems, would be a best fit to a short
deadline.

3) Building and running samples/bpf/ is not something we test. And
though it might help us catch regressions, I would suppose it's not a
requirement for the offering. If I am wrong in that supposition, are you
relying on the source package for something? Or is anything shipped in
binary packages incorrect (like that s930x typo) preventing things from
building correctly?

Right now, the best course we have, in case what you need is the probe
functions on 4.15 is to get this available on a kernel in -proposed in 3
weeks, and in -updates in 6 weeks. Would that work?

Thank you.
Cascardo.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  In Progress

Bug description:
  We need to run BPF filters to analyse and monitor network traffic. The
  BPF filters are created by skydive (http://skydive.network). Currently
  skydive fails to install BPF filters on s390x (using Ubuntu 18.04
  currently, soon moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-07-28 Thread Thadeu Lima de Souza Cascardo
Yep, and the commit that first fixes up these probe_read vs
probe_read_kernel/probe_read_user problems is:

6ae08ae3dea2cfa03dd3665a3c8475c2d429ef47 "bpf: Add probe_read_{user,
kernel} and probe_read_{user, kernel}_str helpers"

So, these helpers are not available until 5.5. We may consider this a
bug, but BPF code will still need to be changed to use the new helpers,
otherwise they will keep failing on s390x.

Cascardo.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  In Progress

Bug description:
  We need to run BPF filters to analyse and monitor network traffic. The
  BPF filters are created by skydive (http://skydive.network). Currently
  skydive fails to install BPF filters on s390x (using Ubuntu 18.04
  currently, soon moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-07-27 Thread Thadeu Lima de Souza Cascardo
After some investigation, I found out that failures caused by "invalid
relo for insn[4].code 0x85" are due to a small typo in some headers.

That has caused LLVM to emit relocations (thinking those missing macro
calls were external function calls) that are not supported by the
loader. This is all in userspace, so no real kernel bugs here. We can
include the typo fixup in the bionic tree, though.

That led to a new failure, caused by faults when trying to read user
memory from the BPF program. I will investigate further.

Cascardo.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  In Progress

Bug description:
  We need to run BPF filters to analyse and monitor network traffic. The
  BPF filters are created by skydive (http://skydive.network). Currently
  skydive fails to install BPF filters on s390x (using Ubuntu 18.04
  currently, soon moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-07-22 Thread Frank Heimes
** Changed in: ubuntu-z-systems
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  In Progress

Bug description:
  We need to run BPF filters to analyse and monitor network traffic. The
  BPF filters are created by skydive (http://skydive.network). Currently
  skydive fails to install BPF filters on s390x (using Ubuntu 18.04
  currently, soon moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-07-22 Thread Thadeu Lima de Souza Cascardo
** Also affects: linux (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Changed in: linux (Ubuntu Bionic)
 Assignee: (unassigned) => Thadeu Lima de Souza Cascardo (cascardo)

** Changed in: linux (Ubuntu Bionic)
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  New
Status in linux package in Ubuntu:
  New
Status in linux source package in Bionic:
  In Progress

Bug description:
  We need to run BPF filters to analyse and monitor network traffic. The
  BPF filters are created by skydive (http://skydive.network). Currently
  skydive fails to install BPF filters on s390x (using Ubuntu 18.04
  currently, soon moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1888507] Re: [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

2020-07-22 Thread Frank Heimes
** Also affects: ubuntu-z-systems
   Importance: Undecided
   Status: New

** Changed in: ubuntu-z-systems
   Importance: Undecided => Medium

** Changed in: ubuntu-z-systems
 Assignee: (unassigned) => Skipper Bug Screeners (skipper-screen-team)

** Changed in: linux (Ubuntu)
 Assignee: Skipper Bug Screeners (skipper-screen-team) => Canonical Kernel 
Team (canonical-kernel-team)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1888507

Title:
  [UBUNTU 18.04] BPF programs fail on Ubuntu s390x

Status in Ubuntu on IBM z Systems:
  New
Status in linux package in Ubuntu:
  New

Bug description:
  We need to run BPF filters to analyse and monitor network traffic. The
  BPF filters are created by skydive (http://skydive.network). Currently
  skydive fails to install BPF filters on s390x (using Ubuntu 18.04
  currently, soon moving to Ubuntu 20.04).

  Because of these failures, we decided to try the BPF samples that come
  with the kernel first. These samples also fail on s390x while they
  work fine on Intel.

  shense@boe-build:~/bionic/samples/bpf$ uname -a
  Linux boe-build 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:40:36 UTC 
2020 s390x s390x s390x GNU/Linux

  Example instructions:

  sudo apt install -y dpkg-dev clang llvm libelf-dev
  sudo apt-get source linux-image-unsigned-$(uname -r)
  cd linux-4.15.0/
  make headers_install
  make samples/bpf/

  Errors:

  shense@boe-build:~/bionic/samples/bpf$ sudo ./test_map_in_map
  [sudo] password for shense:
  invalid relo for insn[4].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (b7) r1 = 0
  2: (63) *(u32 *)(r10 -32) = r1
  3: (bf) r1 = r7
  4: (85) call unknown#-1
  BPF_CALL uses reserved fields

  
  shense@boe-build:~/bionic/samples/bpf$ sudo ./map_perf_test
  invalid relo for insn[22].code 0x85
  bpf_load_program() err=22
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields
  0: (bf) r7 = r1
  1: (18) r1 = 0x207265743a25646e
  3: (7b) *(u64 *)(r10 -16) = r1
  4: (18) r1 = 0x705f616c6c6f632e
  6: (7b) *(u64 *)(r10 -24) = r1
  7: (18) r1 = 0x5f6c72755f686d61
  9: (7b) *(u64 *)(r10 -32) = r1
  10: (18) r1 = 0x7420737472657373
  12: (7b) *(u64 *)(r10 -40) = r1
  13: (18) r1 = 0x4661696c65642061
  15: (7b) *(u64 *)(r10 -48) = r1
  16: (b7) r1 = 0
  17: (73) *(u8 *)(r10 -8) = r1
  18: (b7) r2 = 1
  19: (7b) *(u64 *)(r10 -72) = r2
  20: (63) *(u32 *)(r10 -76) = r1
  21: (bf) r1 = r7
  22: (85) call unknown#-1
  BPF_CALL uses reserved fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1888507/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp