Christophe Leroy | 5eedf9f | 2020-12-07 16:58:01 +0000 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
2 | |||||
3 | #include <linux/uaccess.h> | ||||
4 | #include <linux/kernel.h> | ||||
5 | |||||
6 | bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size) | ||||
7 | { | ||||
8 | return is_kernel_addr((unsigned long)unsafe_src); | ||||
9 | } |