LCOV - code coverage report
Current view: top level - arch/um/kernel - maccess.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 5 0.0 %
Date: 2023-07-19 18:55:55 Functions: 0 1 0.0 %

          Line data    Source code
       1             : // SPDX-License-Identifier: GPL-2.0-only
       2             : /*
       3             :  * Copyright (C) 2013 Richard Weinberger <richrd@nod.at>
       4             :  */
       5             : 
       6             : #include <linux/uaccess.h>
       7             : #include <linux/kernel.h>
       8             : #include <os.h>
       9             : 
      10           0 : bool copy_from_kernel_nofault_allowed(const void *src, size_t size)
      11             : {
      12           0 :         void *psrc = (void *)rounddown((unsigned long)src, PAGE_SIZE);
      13             : 
      14           0 :         if ((unsigned long)src < PAGE_SIZE || size <= 0)
      15             :                 return false;
      16           0 :         if (os_mincore(psrc, size + src - psrc) <= 0)
      17             :                 return false;
      18           0 :         return true;
      19             : }

Generated by: LCOV version 1.14