Public bug reported:

[ Impact ]

BPF programs that require syscalls:sys_enter_* tracepoints never get run
on CPUs that don't have a perf event due to a patch pulled into v7.1.6
without required context. Since the hunk added is already present, just
revert the patch to restore this functionality.

[ Fix ]

resolute: Revert commit 501235c883b346addc48c1bbff17d8339e539c3f.

[ Test Plan ]

The reproducer below was shared by the reporter:

```sh
run() {
  timeout 8 bpftrace -q -e 'tracepoint:syscalls:sys_enter_openat
      /comm == "touch"/ { @cpu[cpu] = count(); }' &
  sleep 3
  for i in $(seq 1 16); do touch /tmp/repro-$i; done
  wait; rm -f /tmp/repro-*
}

echo "A: BPF only"; run
echo "B: BPF while a perf counter is open on every CPU"
perf stat -a -e syscalls:sys_enter_openat -- sleep 12 >/dev/null 2>&1 &
sleep 1; run; wait
```

[ Regression potential ]

Minor change limited to code that breaks bpf functionality. 
Given that this is the only change to this file introduced in the upstream 
stable patchset, and that it is not marked as stable-dep-of, it is unlikely 
that another change added in that patchset would break as a result of this
revert.

** Affects: linux (Ubuntu)
     Importance: Medium
     Assignee: Alice C. Munduruca (cremfuelled)
         Status: Confirmed

** Affects: linux (Ubuntu Resolute)
     Importance: Medium
     Assignee: Alice C. Munduruca (cremfuelled)
         Status: Confirmed

** Also affects: linux (Ubuntu Resolute)
   Importance: Undecided
       Status: New

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

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

** Changed in: linux (Ubuntu Resolute)
     Assignee: (unassigned) => Alice C. Munduruca (cremfuelled)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175058

Title:
  REGRESSION: BPF on syscalls:sys_enter_* tracepoints only run on CPUs
  that have a perf event

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2175058/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to