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 | #endif | 401 | #endif |
| 402 | 402 | ||
| 403 | #ifdef CONFIG_HARDENED_USERCOPY | 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 | void __noreturn usercopy_abort(const char *name, const char *detail, | 404 | void __noreturn usercopy_abort(const char *name, const char *detail, |
| 407 | bool to_user, unsigned long offset, | 405 | bool to_user, unsigned long offset, |
| 408 | unsigned long len); | 406 | unsigned long len); |
| @@ -70,17 +70,6 @@ static noinline int check_stack_object(const void *obj, unsigned long len) · 69 unmodified lines | |||
| 70 | * kmem_cache_create_usercopy() function to create the cache (and | 70 | * kmem_cache_create_usercopy() function to create the cache (and |
| 71 | * carefully audit the whitelist range). | 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 | void __noreturn usercopy_abort(const char *name, const char *detail, | 73 | void __noreturn usercopy_abort(const char *name, const char *detail, |
| 85 | bool to_user, unsigned long offset, | 74 | bool to_user, unsigned long offset, |
| 86 | unsigned long len) | 75 | unsigned long len) |