Saket Kumar Bhaskar
3ca73f644d
selftests/bpf: Fix fill_link_info selftest on powerpc
...
BugLink: https://bugs.launchpad.net/bugs/2111953
[ Upstream commit 4d33dc1bc31df80356c49e40dbd3ddff19500bcb ]
With CONFIG_KPROBES_ON_FTRACE enabled on powerpc, ftrace_location_range
returns ftrace location for bpf_fentry_test1 at offset of 4 bytes from
function entry. This is because branch to _mcount function is at offset
of 4 bytes in function profile sequence.
To fix this, add entry_offset of 4 bytes while verifying the address for
kprobe entry address of bpf_fentry_test1 in verify_perf_link_info in
selftest, when CONFIG_KPROBES_ON_FTRACE is enabled.
Disassemble of bpf_fentry_test1:
c000000000e4b080 <bpf_fentry_test1>:
c000000000e4b080: a6 02 08 7c mflr r0
c000000000e4b084: b9 e2 22 4b bl c00000000007933c <_mcount>
c000000000e4b088: 01 00 63 38 addi r3,r3,1
c000000000e4b08c: b4 07 63 7c extsw r3,r3
c000000000e4b090: 20 00 80 4e blr
When CONFIG_PPC_FTRACE_OUT_OF_LINE [1] is enabled, these function profile
sequence is moved out of line with an unconditional branch at offset 0.
So, the test works without altering the offset for
'CONFIG_KPROBES_ON_FTRACE && CONFIG_PPC_FTRACE_OUT_OF_LINE' case.
Disassemble of bpf_fentry_test1:
c000000000f95190 <bpf_fentry_test1>:
c000000000f95190: 00 00 00 60 nop
c000000000f95194: 01 00 63 38 addi r3,r3,1
c000000000f95198: b4 07 63 7c extsw r3,r3
c000000000f9519c: 20 00 80 4e blr
[1] https://lore.kernel.org/all/20241030070850.1361304-13-hbathini@linux.ibm.com/
Fixes: 23cf7aa539 ("selftests/bpf: Add selftest for fill_link_info")
Signed-off-by: Saket Kumar Bhaskar <skb99@linux.ibm.com >
Signed-off-by: Andrii Nakryiko <andrii@kernel.org >
Link: https://lore.kernel.org/bpf/20241209065720.234344-1-skb99@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org >
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com >
Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com >
2025-06-15 10:37:31 +03:00
..
2023-04-19 21:29:39 -07:00
2023-11-18 11:39:59 -08:00
2023-05-01 15:30:02 -07:00
2023-07-25 14:02:47 -07:00
2023-07-05 19:14:54 -07:00
2022-02-28 16:28:40 +01:00
2023-03-06 09:38:08 -08:00
2022-08-17 09:42:07 -07:00
2023-11-21 10:43:03 -08:00
2024-07-05 10:11:50 +02:00
2023-08-21 15:51:27 -07:00
2022-01-18 15:45:06 -08:00
2025-01-17 14:43:13 +03:00
2023-11-13 18:39:38 -08:00
2022-06-20 17:40:52 -07:00
2023-05-16 22:09:23 -07:00
2023-06-30 10:35:22 +02:00
2023-11-21 10:45:24 -08:00
2023-08-30 08:45:05 +02:00
2024-11-09 18:39:52 +03:00
2023-11-17 10:30:02 -08:00
2022-11-09 20:45:21 -08:00
2022-12-28 13:57:47 -08:00
2022-09-02 15:55:37 +02:00
2024-08-13 12:12:44 +02:00
2022-11-30 22:47:43 +01:00
2021-11-11 16:54:06 -08:00
2022-03-05 18:39:51 -08:00
2022-06-07 10:20:43 -07:00
2023-12-14 17:10:32 -08:00
2022-08-24 17:54:40 -07:00
2023-04-05 14:44:07 -07:00
2024-07-05 10:12:21 +02:00
2022-03-15 17:03:10 +01:00
2022-03-15 17:03:10 +01:00
2022-03-15 17:03:10 +01:00
2023-05-13 16:55:46 -07:00
2022-09-23 13:59:08 -07:00
2023-11-01 22:49:20 -07:00
2022-09-21 10:57:13 -07:00
2023-08-08 17:01:19 -07:00
2023-11-14 08:56:56 -08:00
2023-02-23 08:33:43 -08:00
2023-12-08 17:08:18 -08:00
2023-06-06 17:08:22 +02:00
2023-03-01 10:05:19 -08:00
2022-09-02 15:55:37 +02:00
2023-10-06 20:17:28 +02:00
2022-05-13 15:15:21 +02:00
2022-07-19 09:33:18 -07:00
2022-02-04 11:29:01 -08:00
2022-02-04 11:29:01 -08:00
2025-01-17 14:43:14 +03:00
2022-05-13 15:15:21 +02:00
2023-12-09 21:37:33 -08:00
2023-03-20 21:57:49 -07:00
2022-03-05 09:38:15 -08:00
2023-08-31 17:18:53 +02:00
2025-01-17 14:43:14 +03:00
2022-08-16 17:39:59 -04:00
2024-09-27 11:14:36 +02:00
2023-05-06 16:42:58 -07:00
2023-09-11 22:29:32 +02:00
2023-02-16 15:32:46 -08:00
2023-09-19 02:07:36 -07:00
2022-02-02 22:31:18 -08:00
2023-07-13 16:04:56 -07:00
2023-12-19 18:06:47 -08:00
2024-11-09 18:40:11 +03:00
2023-01-28 12:29:41 -08:00
2023-07-13 16:04:56 -07:00
2023-10-09 16:28:37 -07:00
2025-06-15 10:37:31 +03:00
2022-03-08 17:39:29 -08:00
2022-08-23 22:48:03 +02:00
2023-02-16 15:32:46 -08:00
2025-01-17 14:43:14 +03:00
2022-05-13 15:15:21 +02:00
2023-12-12 09:51:47 -08:00
2023-04-07 15:24:43 -07:00
2023-07-13 16:04:56 -07:00
2023-08-07 16:42:58 -07:00
2022-09-02 15:55:37 +02:00
2023-04-13 14:32:05 +02:00
2022-09-02 15:55:37 +02:00
2022-09-02 15:55:37 +02:00
2022-09-02 15:55:37 +02:00
2023-12-11 19:16:32 -08:00
2023-07-12 07:57:18 -07:00
2022-11-09 20:45:14 -08:00
2022-04-19 13:48:20 -07:00
2023-02-15 15:40:06 -08:00
2022-08-31 14:10:01 -07:00
2023-06-02 17:04:22 -07:00
2023-07-28 16:52:08 -07:00
2024-02-19 12:28:15 +01:00
2022-12-22 17:19:23 -08:00
2022-12-22 00:53:58 +01:00
2025-01-17 14:43:14 +03:00
2023-08-14 18:03:00 +02:00
2023-02-13 21:42:29 -08:00
2023-12-15 22:54:55 +01:00
2023-09-08 16:22:41 -07:00
2022-04-06 10:32:12 -07:00
2022-02-08 21:17:34 +01:00
2023-03-01 10:05:19 -08:00
2021-11-25 23:05:23 +01:00
2023-02-16 15:32:46 -08:00
2023-12-19 08:23:03 -08:00
2023-12-19 08:23:03 -08:00
2022-04-26 15:41:46 -07:00
2023-10-20 09:29:39 -07:00
2022-09-02 15:55:37 +02:00
2023-12-05 15:06:47 +01:00
2023-11-18 11:39:59 -08:00
2023-12-19 18:06:46 -08:00
2022-05-13 15:15:21 +02:00
2022-09-21 17:33:42 -07:00
2022-08-09 18:46:11 -07:00
2023-02-16 15:32:46 -08:00
2025-01-17 14:43:14 +03:00
2025-01-17 14:43:14 +03:00
2025-01-17 14:43:14 +03:00
2023-12-18 18:15:49 +01:00
2023-12-04 17:50:27 -08:00
2023-03-01 10:24:33 -08:00
2022-09-02 15:55:37 +02:00
2022-05-20 15:07:41 -07:00
2023-03-22 15:11:06 -07:00
2022-02-02 22:31:18 -08:00
2023-02-16 15:32:46 -08:00
2023-02-16 16:56:17 -08:00
2023-10-16 13:49:18 +02:00
2023-02-16 15:32:46 -08:00
2023-07-13 16:04:56 -07:00
2023-05-16 22:09:23 -07:00
2023-09-14 11:16:13 -07:00
2023-08-16 11:42:33 -07:00
2023-01-25 07:57:50 -08:00
2023-05-16 20:57:16 -07:00
2023-06-30 12:34:38 -07:00
2025-01-17 14:43:13 +03:00
2022-03-15 17:03:10 +01:00
2025-01-17 14:43:14 +03:00
2023-10-16 13:49:18 +02:00
2022-03-08 17:39:28 -08:00
2023-04-13 14:32:04 +02:00
2023-02-16 15:32:46 -08:00
2023-02-16 15:32:46 -08:00
2022-09-02 15:55:37 +02:00
2022-09-02 15:55:37 +02:00
2023-09-08 08:42:19 -07:00
2022-09-02 15:55:37 +02:00
2021-11-28 22:24:57 -08:00
2023-02-16 15:32:46 -08:00
2022-04-18 21:22:13 -07:00
2023-07-13 16:24:29 -07:00
2023-10-06 20:17:28 +02:00
2022-02-02 22:31:18 -08:00
2022-02-02 22:31:18 -08:00
2023-04-15 17:36:50 -07:00
2023-03-03 17:42:20 +01:00
2022-09-02 15:55:37 +02:00
2024-02-15 19:21:39 -08:00
2023-02-16 15:32:46 -08:00
2024-01-04 20:40:49 -08:00
2023-08-25 09:23:16 -07:00
2022-09-02 15:55:37 +02:00
2023-12-19 17:18:55 -08:00
2022-09-02 15:55:37 +02:00
2023-09-25 16:22:42 -07:00
2023-09-25 16:22:43 -07:00
2023-10-11 17:27:55 -07:00
2022-09-02 15:55:37 +02:00
2024-11-09 18:44:53 +03:00
2023-01-25 15:10:34 -08:00
2022-02-02 22:31:18 -08:00
2023-01-29 19:16:28 -08:00
2025-01-17 14:43:13 +03:00
2023-09-06 11:08:47 +02:00
2022-09-02 15:55:37 +02:00
2022-09-02 15:55:37 +02:00
2022-04-20 23:48:34 +02:00
2022-10-19 16:40:45 -07:00
2022-04-11 17:18:09 +02:00
2023-10-11 17:27:55 -07:00
2023-05-19 22:44:28 -07:00
2022-06-23 10:52:12 -07:00
2024-01-13 11:01:44 -08:00
2024-01-03 16:50:22 -08:00
2023-10-06 20:17:28 +02:00
2022-09-28 17:33:21 -07:00
2024-11-09 18:46:03 +03:00
2023-05-13 16:55:46 -07:00
2023-05-13 16:55:46 -07:00
2023-05-13 16:55:46 -07:00
2023-06-06 11:07:26 -07:00
2023-10-19 16:42:04 -06:00
2023-11-18 11:39:59 -08:00
2023-04-13 14:32:04 +02:00
2023-03-31 09:40:16 -07:00
2022-09-02 15:55:37 +02:00
2022-03-20 19:16:50 -07:00
2022-09-02 15:55:37 +02:00
2023-06-13 15:13:52 -07:00
2022-03-16 15:13:36 -07:00
2022-03-17 23:12:48 -07:00
2023-12-04 17:50:27 -08:00
2023-12-06 22:40:43 +01:00
2022-09-02 15:55:37 +02:00
2023-03-13 21:51:30 -07:00
2023-08-18 18:12:59 +02:00
2023-02-16 15:32:46 -08:00
2022-08-17 22:43:58 +02:00
2023-10-17 18:31:27 +02:00
2023-08-23 09:37:29 -07:00
2023-10-24 16:07:43 -07:00
2024-09-27 11:15:00 +02:00
2023-10-24 16:07:43 -07:00
2023-11-09 18:58:38 -08:00
2025-01-17 14:43:15 +03:00
2022-09-28 17:33:59 -07:00
2023-07-07 19:36:04 +02:00
2025-01-17 14:43:14 +03:00
2022-09-28 17:34:14 -07:00
2024-01-03 21:08:26 -08:00
2023-01-23 20:53:01 +01:00
2023-11-01 22:31:41 -07:00
2022-09-01 12:16:20 -07:00
2024-01-17 20:20:05 -08:00
2023-03-08 11:15:39 -08:00
2023-07-27 18:54:17 -07:00
2023-03-25 19:52:52 -07:00
2023-01-28 12:30:08 -08:00
2022-09-02 15:55:37 +02:00
2022-02-02 22:31:18 -08:00
2022-02-02 22:31:18 -08:00
2022-04-19 13:48:20 -07:00
2023-12-14 17:12:49 -08:00
2023-12-12 15:53:34 -08:00
2022-02-11 13:13:04 -08:00
2022-05-13 15:15:21 +02:00
2024-02-19 12:26:46 +01:00
2023-03-13 21:51:30 -07:00
2022-02-02 22:31:18 -08:00
2023-03-13 21:51:30 -07:00
2023-03-13 21:51:30 -07:00
2023-07-13 16:04:56 -07:00
2023-07-13 16:04:56 -07:00
2022-11-20 15:45:48 -08:00
2022-09-28 17:34:19 -07:00
2023-02-22 12:34:50 -08:00
2023-06-19 14:04:04 +02:00
2023-03-08 16:19:51 -08:00
2024-08-13 12:12:19 +02:00
2023-09-22 14:27:41 -07:00
2023-01-28 12:30:08 -08:00
2025-01-17 14:43:13 +03:00
2022-11-11 11:44:46 -08:00
2023-02-16 15:32:46 -08:00
2023-04-13 14:17:02 +02:00
2023-12-19 18:06:47 -08:00
2023-12-04 15:59:42 +01:00
2023-11-21 10:45:26 -08:00
2023-06-21 23:48:51 +02:00
2022-09-02 15:55:37 +02:00
2024-11-09 18:39:52 +03:00
2023-08-02 14:21:12 -07:00
2024-03-05 16:19:42 -08:00
2022-02-02 22:31:18 -08:00
2023-12-11 16:09:24 +01:00
2023-02-16 15:32:46 -08:00
2023-09-11 23:18:11 -07:00
2023-02-16 15:32:46 -08:00
2024-07-05 10:12:22 +02:00
2023-02-16 15:32:46 -08:00
2023-02-16 15:32:46 -08:00
2023-12-13 16:16:41 -08:00
2022-02-02 22:31:18 -08:00
2022-09-02 15:55:37 +02:00
2023-02-24 17:34:09 -08:00
2022-09-02 15:55:37 +02:00
2023-02-24 17:34:09 -08:00