Bug#986905: systemd armhf: Attaching egress BPF program to cgroup failed,Re: Bug#986905: systemd armhf: Attaching egress BPF program to cgroup failed

2021-04-15 Thread Ryutaroh Matsumoto
> So you enabled "DefaultIPAccounting=yes" for the systemd --user
> instances (i.e. in user.conf) and only those systemd --user instances
> trigger that error?

Yes (on amd64, arm64 and armhf).

I do not see the error in the systemd PID 1
except on an armhf kernel with CONFIG_BPF_JIT_ALWAYS_ON=y.
But we do not need to consider the issue on the armhf kernel here.

> If you remove "DefaultIPAccounting=yes" from user.conf, are the error
> messages gone?

Yes.

This seems something like "Permission denied" or "Operation not permitted",
but the error is "Invalid argument", which seems strange.

Currently, to trigger this issue, I need task-xfce-desktop (on every arch.).
I believe that this can be reproduced without task-xfce-desktop,
and will try to find a reproduction procedure with CUI in a weekend...

Best regards, Ryutaroh



Bug#986905: systemd armhf: Attaching egress BPF program to cgroup failed, Re: Bug#986905: systemd armhf: Attaching egress BPF program to cgroup failed

2021-04-14 Thread Michael Biebl

Am 15.04.21 um 02:27 schrieb Ryutaroh Matsumoto:

Can you attach the output of
grep BPF /boot/config-$(uname -r)


root@qemu-bullseye-armhf:~# uname -a
Linux qemu-bullseye-armhf 5.10.0-5-armmp-lpae #1 SMP Debian 5.10.26-1 
(2021-03-27) armv7l GNU/Linux
root@qemu-bullseye-armhf:~# fgrep -nH BPF /boot/config-5.10.0-5-armmp-lpae
/boot/config-5.10.0-5-armmp-lpae:161:CONFIG_CGROUP_BPF=y
/boot/config-5.10.0-5-armmp-lpae:189:CONFIG_BPF=y
/boot/config-5.10.0-5-armmp-lpae:216:CONFIG_BPF_LSM=y
/boot/config-5.10.0-5-armmp-lpae:217:CONFIG_BPF_SYSCALL=y
/boot/config-5.10.0-5-armmp-lpae:218:# CONFIG_BPF_JIT_ALWAYS_ON is not set
/boot/config-5.10.0-5-armmp-lpae:219:# CONFIG_BPF_PRELOAD is not set
/boot/config-5.10.0-5-armmp-lpae:1195:CONFIG_IPV6_SEG6_BPF=y
/boot/config-5.10.0-5-armmp-lpae:1335:CONFIG_NETFILTER_XT_MATCH_BPF=m
/boot/config-5.10.0-5-armmp-lpae:1554:# CONFIG_BPFILTER is not set
/boot/config-5.10.0-5-armmp-lpae:1714:CONFIG_NET_CLS_BPF=m
/boot/config-5.10.0-5-armmp-lpae:1741:CONFIG_NET_ACT_BPF=m
/boot/config-5.10.0-5-armmp-lpae:1796:CONFIG_BPF_JIT=y
/boot/config-5.10.0-5-armmp-lpae:1797:CONFIG_BPF_STREAM_PARSER=y
/boot/config-5.10.0-5-armmp-lpae:2013:CONFIG_LWTUNNEL_BPF=y
/boot/config-5.10.0-5-armmp-lpae:2021:CONFIG_HAVE_EBPF_JIT=y
/boot/config-5.10.0-5-armmp-lpae:7784:# CONFIG_NBPFAXI_DMA is not set
/boot/config-5.10.0-5-armmp-lpae:10100:CONFIG_BPF_EVENTS=y
/boot/config-5.10.0-5-armmp-lpae:10173:CONFIG_TEST_BPF=m
root@qemu-bullseye-armhf:~#

In addition, there is little difference between arm64 and armhf
in linux kernel config as follows.
Is it related with CONFIG_BPF_JIT_DEFAULT_ON???


Hm, I don't think so. The above looks ok.
Can you raise this upstream please (maybe with a reference to #7054).
I don't have an armhf setup to easily reproduce this myself.

I'd attach an strace log to the upstream bug report as well.

Regards,
Michael



OpenPGP_signature
Description: OpenPGP digital signature


Bug#986905: systemd armhf: Attaching egress BPF program to cgroup failed,Re: Bug#986905: systemd armhf: Attaching egress BPF program to cgroup failed

2021-04-14 Thread Ryutaroh Matsumoto
> Can you attach the output of
> grep BPF /boot/config-$(uname -r)

root@qemu-bullseye-armhf:~# uname -a
Linux qemu-bullseye-armhf 5.10.0-5-armmp-lpae #1 SMP Debian 5.10.26-1 
(2021-03-27) armv7l GNU/Linux
root@qemu-bullseye-armhf:~# fgrep -nH BPF /boot/config-5.10.0-5-armmp-lpae 
/boot/config-5.10.0-5-armmp-lpae:161:CONFIG_CGROUP_BPF=y
/boot/config-5.10.0-5-armmp-lpae:189:CONFIG_BPF=y
/boot/config-5.10.0-5-armmp-lpae:216:CONFIG_BPF_LSM=y
/boot/config-5.10.0-5-armmp-lpae:217:CONFIG_BPF_SYSCALL=y
/boot/config-5.10.0-5-armmp-lpae:218:# CONFIG_BPF_JIT_ALWAYS_ON is not set
/boot/config-5.10.0-5-armmp-lpae:219:# CONFIG_BPF_PRELOAD is not set
/boot/config-5.10.0-5-armmp-lpae:1195:CONFIG_IPV6_SEG6_BPF=y
/boot/config-5.10.0-5-armmp-lpae:1335:CONFIG_NETFILTER_XT_MATCH_BPF=m
/boot/config-5.10.0-5-armmp-lpae:1554:# CONFIG_BPFILTER is not set
/boot/config-5.10.0-5-armmp-lpae:1714:CONFIG_NET_CLS_BPF=m
/boot/config-5.10.0-5-armmp-lpae:1741:CONFIG_NET_ACT_BPF=m
/boot/config-5.10.0-5-armmp-lpae:1796:CONFIG_BPF_JIT=y
/boot/config-5.10.0-5-armmp-lpae:1797:CONFIG_BPF_STREAM_PARSER=y
/boot/config-5.10.0-5-armmp-lpae:2013:CONFIG_LWTUNNEL_BPF=y
/boot/config-5.10.0-5-armmp-lpae:2021:CONFIG_HAVE_EBPF_JIT=y
/boot/config-5.10.0-5-armmp-lpae:7784:# CONFIG_NBPFAXI_DMA is not set
/boot/config-5.10.0-5-armmp-lpae:10100:CONFIG_BPF_EVENTS=y
/boot/config-5.10.0-5-armmp-lpae:10173:CONFIG_TEST_BPF=m
root@qemu-bullseye-armhf:~# 

In addition, there is little difference between arm64 and armhf
in linux kernel config as follows.
Is it related with CONFIG_BPF_JIT_DEFAULT_ON???
I have not seen the reported issue on arm64 (nor amd64).

ryutaroh@ryutaroh-CFSZ6-1L:/var/tmp/linux-config$ fgrep BPF 
usr/src/linux-config-5.10/config.armhf_none_armmp-lpae >bpf-armhf.txt
ryutaroh@ryutaroh-CFSZ6-1L:/var/tmp/linux-config$ fgrep BPF 
usr/src/linux-config-5.10/config.arm64_none_arm64 >bpf-arm64.txt
ryutaroh@ryutaroh-CFSZ6-1L:/var/tmp/linux-config$ diff -u bpf-arm64.txt 
bpf-armhf.txt 
--- bpf-arm64.txt   2021-04-15 09:24:59.596968170 +0900
+++ bpf-armhf.txt   2021-04-15 09:24:40.961010643 +0900
@@ -2,9 +2,7 @@
 CONFIG_BPF=y
 CONFIG_BPF_LSM=y
 CONFIG_BPF_SYSCALL=y
-CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
 # CONFIG_BPF_JIT_ALWAYS_ON is not set
-CONFIG_BPF_JIT_DEFAULT_ON=y
 # CONFIG_BPF_PRELOAD is not set
 CONFIG_IPV6_SEG6_BPF=y
 CONFIG_NETFILTER_XT_MATCH_BPF=m
@@ -15,6 +13,6 @@
 CONFIG_BPF_STREAM_PARSER=y
 CONFIG_LWTUNNEL_BPF=y
 CONFIG_HAVE_EBPF_JIT=y
+# CONFIG_NBPFAXI_DMA is not set
 CONFIG_BPF_EVENTS=y
-# CONFIG_BPF_KPROBE_OVERRIDE is not set
 CONFIG_TEST_BPF=m

Best regards, Ryutaroh