|
24 | 24 | #define cfi_slowpath_handler __cfi_slowpath
|
25 | 25 | #endif /* CONFIG_CFI_PERMISSIVE */
|
26 | 26 |
|
27 |
| -static inline void handle_cfi_failure() |
| 27 | +static inline void handle_cfi_failure(void *ptr) |
28 | 28 | {
|
29 | 29 | #ifdef CONFIG_CFI_PERMISSIVE
|
30 |
| - WARN_RATELIMIT(1, "CFI failure:\n"); |
| 30 | + WARN_RATELIMIT(1, "CFI failure (target: [<%px>] %pF):\n", ptr, ptr); |
31 | 31 | #else
|
32 |
| - pr_err("CFI failure:\n"); |
| 32 | + pr_err("CFI failure (target: [<%px>] %pF):\n", ptr, ptr); |
33 | 33 | BUG();
|
34 | 34 | #endif
|
35 | 35 | }
|
@@ -283,18 +283,18 @@ void cfi_slowpath_handler(uint64_t id, void *ptr, void *diag)
|
283 | 283 | if (likely(check))
|
284 | 284 | check(id, ptr, diag);
|
285 | 285 | else /* Don't allow unchecked modules */
|
286 |
| - handle_cfi_failure(); |
| 286 | + handle_cfi_failure(ptr); |
287 | 287 | }
|
288 | 288 | EXPORT_SYMBOL(cfi_slowpath_handler);
|
289 | 289 | #endif /* CONFIG_MODULES */
|
290 | 290 |
|
291 |
| -void cfi_failure_handler(void *data, void *value, void *vtable) |
| 291 | +void cfi_failure_handler(void *data, void *ptr, void *vtable) |
292 | 292 | {
|
293 |
| - handle_cfi_failure(); |
| 293 | + handle_cfi_failure(ptr); |
294 | 294 | }
|
295 | 295 | EXPORT_SYMBOL(cfi_failure_handler);
|
296 | 296 |
|
297 |
| -void __cfi_check_fail(void *data, void *value) |
| 297 | +void __cfi_check_fail(void *data, void *ptr) |
298 | 298 | {
|
299 |
| - handle_cfi_failure(); |
| 299 | + handle_cfi_failure(ptr); |
300 | 300 | }
|
0 commit comments