Commit 6ca2162
Alexei Starovoitov
Merge branch 'bpf-reject-attaching-fexit-fmod_ret-to-noreturn-functions'
Yafang Shao says:
====================
Attaching fexit probes to functions marked with __noreturn may lead to
unpredictable behavior. To avoid this, we will reject attaching probes to
such functions. Currently, there is no ideal solution, so we will hardcode
a check for all __noreturn functions.
Once a more robust solution is implemented, this workaround can be removed.
v4->v5:
- Remove unnecessary functions (Alexei)
- Use BTF_ID directly (Alexei)
v3->v4: https://lore.kernel.org/bpf/20250317121735.86515-1-laoar.shao@gmail.com/
- Reject also fmod_ret (Alexei)
- Fix build warnings and remove unnecessary functions (Alexei)
v1->v2: https://lore.kernel.org/bpf/20250223062735.3341-1-laoar.shao@gmail.com/
- keep tools/objtool/noreturns.h as is (Josh)
- Add noreturns.h to objtool/sync-check.sh (Josh)
- Add verbose for the reject and simplify the test case (Song)
v1: https://lore.kernel.org/bpf/20250211023359.1570-1-laoar.shao@gmail.com/
====================
Link: https://patch.msgid.link/20250318114447.75484-1-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>File tree
3 files changed
+56
-0
lines changed- kernel/bpf
- tools/testing/selftests/bpf
- prog_tests
- progs
3 files changed
+56
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23215 | 23215 | | |
23216 | 23216 | | |
23217 | 23217 | | |
| 23218 | + | |
| 23219 | + | |
| 23220 | + | |
| 23221 | + | |
| 23222 | + | |
| 23223 | + | |
| 23224 | + | |
| 23225 | + | |
| 23226 | + | |
| 23227 | + | |
| 23228 | + | |
| 23229 | + | |
| 23230 | + | |
| 23231 | + | |
| 23232 | + | |
| 23233 | + | |
| 23234 | + | |
| 23235 | + | |
| 23236 | + | |
| 23237 | + | |
| 23238 | + | |
| 23239 | + | |
| 23240 | + | |
| 23241 | + | |
| 23242 | + | |
| 23243 | + | |
| 23244 | + | |
23218 | 23245 | | |
23219 | 23246 | | |
23220 | 23247 | | |
| |||
23301 | 23328 | | |
23302 | 23329 | | |
23303 | 23330 | | |
| 23331 | + | |
| 23332 | + | |
| 23333 | + | |
| 23334 | + | |
| 23335 | + | |
23304 | 23336 | | |
23305 | 23337 | | |
23306 | 23338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments