Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
rhel9's version of pahole doesn't properly generate VARs for percpu symbols on non-x86_64 architectures. Found this while running bpf selftests on aarch64. Looks like the following commit fixes the issue (and can be cherry-picked cleanly onto v1.22)
commit 16a7acaba446612135ba674a51cdda6bfcc34667
Author: Ilya Leoshkevich <iii.com>
Date: Tue Oct 12 04:26:37 2021 +0200
btf_encoder: Fix handling of percpu symbols on s390
pahole does not generate VARs for percpu symbols on s390. A percpu
symbol definition on a typical x86_64 kernel looks like this:
[33] .data..percpu PROGBITS 0000000000000000 01c00000
^^^^^^^^^^^^^^^^ sh_addr
LOAD 0x0000000001c00000 0x0000000000000000 0x000000000286f000
^^^^^^^^^^^^^^^^^^ p_vaddr
13559: 000000000001ba50 4 OBJECT LOCAL DEFAULT 33 cpu_profile_flip
^^^^^^^^^^^^^^^^ st_value
Most importantly, .data..percpu's sh_addr is 0, and this is what pahole
is currently assuming. However, on s390 this is different:
[37] .data..percpu PROGBITS 00000000019cd000 018ce000
^^^^^^^^^^^^^^^^ sh_addr
LOAD 0x000000000136e000 0x000000000146d000 0x000000000146d000
^^^^^^^^^^^^^^^^^^ p_vaddr
80377: 0000000001ba1440 4 OBJECT WEAK DEFAULT 37 cpu_profile_flip
^^^^^^^^^^^^^^^^ st_value
Fix by restructuring the code to always use section-relative offsets for
symbols. Change the comment to focus on this invariant.
Signed-off-by: Ilya Leoshkevich <iii.com>
Cc: Alexei Starovoitov <ast>
Cc: Andrii Nakryiko <andrii.nakryiko>
Cc: Daniel Borkmann <daniel>
Cc: Heiko Carstens <hca.com>
Cc: Vasily Gorbik <gor.com>
Cc: bpf.org
Cc: dwarves.org
Signed-off-by: Arnaldo Carvalho de Melo <acme>
Without this commit:
# ./pahole --btf_encode_detached=vml.btf /mnt/testarea/bpf/bpf-next/vmlinux; bpftool btf dump file vml.btf | grep -w VAR | wc -l
0
With commit applied:
# ./pahole --btf_encode_detached=vml.btf /mnt/testarea/bpf/bpf-next/vmlinux; bpftool btf dump file vml.btf | grep -w VAR | wc -l
586
This was fixed with the 1.24 pahole update.
The above reproducer won't work, though, as it requires a newer bpftool which will get into the buildroot with the bpf 5.19 rebase.
Comment 5Ziqian SUN (Zamir)
2023-01-03 08:33:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (dwarves bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2263
rhel9's version of pahole doesn't properly generate VARs for percpu symbols on non-x86_64 architectures. Found this while running bpf selftests on aarch64. Looks like the following commit fixes the issue (and can be cherry-picked cleanly onto v1.22) commit 16a7acaba446612135ba674a51cdda6bfcc34667 Author: Ilya Leoshkevich <iii.com> Date: Tue Oct 12 04:26:37 2021 +0200 btf_encoder: Fix handling of percpu symbols on s390 pahole does not generate VARs for percpu symbols on s390. A percpu symbol definition on a typical x86_64 kernel looks like this: [33] .data..percpu PROGBITS 0000000000000000 01c00000 ^^^^^^^^^^^^^^^^ sh_addr LOAD 0x0000000001c00000 0x0000000000000000 0x000000000286f000 ^^^^^^^^^^^^^^^^^^ p_vaddr 13559: 000000000001ba50 4 OBJECT LOCAL DEFAULT 33 cpu_profile_flip ^^^^^^^^^^^^^^^^ st_value Most importantly, .data..percpu's sh_addr is 0, and this is what pahole is currently assuming. However, on s390 this is different: [37] .data..percpu PROGBITS 00000000019cd000 018ce000 ^^^^^^^^^^^^^^^^ sh_addr LOAD 0x000000000136e000 0x000000000146d000 0x000000000146d000 ^^^^^^^^^^^^^^^^^^ p_vaddr 80377: 0000000001ba1440 4 OBJECT WEAK DEFAULT 37 cpu_profile_flip ^^^^^^^^^^^^^^^^ st_value Fix by restructuring the code to always use section-relative offsets for symbols. Change the comment to focus on this invariant. Signed-off-by: Ilya Leoshkevich <iii.com> Cc: Alexei Starovoitov <ast> Cc: Andrii Nakryiko <andrii.nakryiko> Cc: Daniel Borkmann <daniel> Cc: Heiko Carstens <hca.com> Cc: Vasily Gorbik <gor.com> Cc: bpf.org Cc: dwarves.org Signed-off-by: Arnaldo Carvalho de Melo <acme> Without this commit: # ./pahole --btf_encode_detached=vml.btf /mnt/testarea/bpf/bpf-next/vmlinux; bpftool btf dump file vml.btf | grep -w VAR | wc -l 0 With commit applied: # ./pahole --btf_encode_detached=vml.btf /mnt/testarea/bpf/bpf-next/vmlinux; bpftool btf dump file vml.btf | grep -w VAR | wc -l 586