Users of usercopy_warn() were removed by commit 53944f171a89 ("mm: remove HARDENED_USERCOPY_FALLBACK") Remove it.
Unified · Split
| @@ -401,8 +401,6 @@ static inline void user_access_restore(unsigned long flags) { } · 400 unmodified lines | ||
| 401 | 401 | #endif |
| 402 | 402 | |
| 403 | 403 | #ifdef CONFIG_HARDENED_USERCOPY |
| 404 | −void usercopy_warn(const char *name, const char *detail, bool to_user, | |
| 405 | − unsigned long offset, unsigned long len); | |
| 406 | 404 | void __noreturn usercopy_abort(const char *name, const char *detail, |
| 407 | 405 | bool to_user, unsigned long offset, |
| 408 | 406 | unsigned long len); |
| @@ -70,17 +70,6 @@ static noinline int check_stack_object(const void *obj, unsigned long len) · 69 unmodified lines | ||
| 70 | 70 | * kmem_cache_create_usercopy() function to create the cache (and |
| 71 | 71 | * carefully audit the whitelist range). |
| 72 | 72 | */ |
| 73 | −void usercopy_warn(const char *name, const char *detail, bool to_user, | |
| 74 | − unsigned long offset, unsigned long len) | |
| 75 | −{ | |
| 76 | − WARN_ONCE(1, "Bad or missing usercopy whitelist? Kernel memory %s attempt detected %s %s%s%s%s (offset %lu, size %lu)!\n", | |
| 77 | − to_user ? "exposure" : "overwrite", | |
| 78 | − to_user ? "from" : "to", | |
| 79 | − name ? : "unknown?!", | |
| 80 | − detail ? " '" : "", detail ? : "", detail ? "'" : "", | |
| 81 | − offset, len); | |
| 82 | −} | |
| 83 | − | |
| 84 | 73 | void __noreturn usercopy_abort(const char *name, const char *detail, |
| 85 | 74 | bool to_user, unsigned long offset, |
| 86 | 75 | unsigned long len) |