Commit 6eada26f authored by Christophe Leroy's avatar Christophe Leroy Committed by Linus Torvalds

mm: remove usercopy_warn()

Users of usercopy_warn() were removed by commit 53944f17 ("mm:
remove HARDENED_USERCOPY_FALLBACK")

Remove it.

Link: https://lkml.kernel.org/r/5f26643fc70b05f8455b60b99c30c17d635fa640.1644231910.git.christophe.leroy@csgroup.euSigned-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarStephen Kitt <steve@sk2.org>
Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cb325ddd
...@@ -401,8 +401,6 @@ static inline void user_access_restore(unsigned long flags) { } ...@@ -401,8 +401,6 @@ static inline void user_access_restore(unsigned long flags) { }
#endif #endif
#ifdef CONFIG_HARDENED_USERCOPY #ifdef CONFIG_HARDENED_USERCOPY
void usercopy_warn(const char *name, const char *detail, bool to_user,
unsigned long offset, unsigned long len);
void __noreturn usercopy_abort(const char *name, const char *detail, void __noreturn usercopy_abort(const char *name, const char *detail,
bool to_user, unsigned long offset, bool to_user, unsigned long offset,
unsigned long len); unsigned long len);
......
...@@ -70,17 +70,6 @@ static noinline int check_stack_object(const void *obj, unsigned long len) ...@@ -70,17 +70,6 @@ static noinline int check_stack_object(const void *obj, unsigned long len)
* kmem_cache_create_usercopy() function to create the cache (and * kmem_cache_create_usercopy() function to create the cache (and
* carefully audit the whitelist range). * carefully audit the whitelist range).
*/ */
void usercopy_warn(const char *name, const char *detail, bool to_user,
unsigned long offset, unsigned long len)
{
WARN_ONCE(1, "Bad or missing usercopy whitelist? Kernel memory %s attempt detected %s %s%s%s%s (offset %lu, size %lu)!\n",
to_user ? "exposure" : "overwrite",
to_user ? "from" : "to",
name ? : "unknown?!",
detail ? " '" : "", detail ? : "", detail ? "'" : "",
offset, len);
}
void __noreturn usercopy_abort(const char *name, const char *detail, void __noreturn usercopy_abort(const char *name, const char *detail,
bool to_user, unsigned long offset, bool to_user, unsigned long offset,
unsigned long len) unsigned long len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment