meson: set -fno-ssa-phiopt when building bpf with gcc
authorLuca Boccassi <bluca@debian.org>
Thu, 4 Apr 2024 22:42:45 +0000 (23:42 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Apr 2024 03:55:53 +0000 (12:55 +0900)
There are bugs in the kernel verifier that cause legitimate code
to be rejected, disabling this optimization makes bpf programs
built with a new enough gcc work again.

Fixes https://github.com/systemd/systemd/issues/31888

meson.build

index f4b382c602391bdc5e03e946f183745d77bd9327..1c4cac82c1193d2211a3aae488ffc01c8ded75bf 100644 (file)
@@ -1701,6 +1701,7 @@ if conf.get('BPF_FRAMEWORK') == 1
         bpf_gcc_flags = [
                 '-std=gnu11',
                 '-fno-stack-protector',
+                '-fno-ssa-phiopt',
                 '-O2',
                 '-mcpu=v3',
                 '-mco-re',