1 // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 3 * Copyright (C) 2013 Richard Weinberger <rich 4 */ 5 6 #include <linux/uaccess.h> 7 #include <linux/kernel.h> 8 #include <os.h> 9 10 bool copy_from_kernel_nofault_allowed(const vo 11 { 12 void *psrc = (void *)rounddown((unsign 13 14 if ((unsigned long)src < PAGE_SIZE || 15 return false; 16 if (os_mincore(psrc, size + src - psrc 17 return false; 18 return true; 19 } 20
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.