Commit 2a21437
Suraj Jitindar Singh
kpatch-build: Add sym->has_func_profiling support for aarch64
The "has_function_profiling" support field in the symbol struct is used to show
that a function symbol is able to be patched. This is necessary to check that
functions which need to be patched are able to be.
On arm64 this means the presence of 2 NOP instructions at function entry
which are patched by ftrace to call the ftrace handling code. These 2 NOPs
are inserted by the compiler and the location of them is recorded in a
section called "__patchable_function_entries". Check whether a symbol has a
corresponding entry in the "__patchable_function_entries" section and if so
mark it as "has_func_profiling".
Additionally updated the error message in kpatch_check_func_profiling_calls()
to accurately reflect the cause of the failure.
Signed-off-by: Suraj Jitindar Singh <surajjs@amazon.com>1 parent 61fc3f1 commit 2a21437
2 files changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1632 | 1632 | | |
1633 | 1633 | | |
1634 | 1634 | | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
1635 | 1639 | | |
1636 | 1640 | | |
| 1641 | + | |
1637 | 1642 | | |
1638 | 1643 | | |
1639 | 1644 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
| |||
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
335 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
336 | 359 | | |
337 | 360 | | |
338 | 361 | | |
| |||
0 commit comments