cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

access-helper.h (367B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2
      3#include <linux/uaccess.h>
      4
      5static inline int __get_inst(u32 *i, u32 *p, bool user)
      6{
      7	return user ? get_user(*i, (u32 __user *)p) : get_kernel_nofault(*i, p);
      8}
      9
     10static inline int __get_addr(unsigned long *a, unsigned long *p, bool user)
     11{
     12	return user ? get_user(*a, (unsigned long __user *)p) : get_kernel_nofault(*a, p);
     13}