X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=wrapper%2Fuaccess.h;fp=wrapper%2Fuaccess.h;h=c56427c5173ea7e3736de0a8ea2dc526141a9d91;hb=80bb26003945e96a8ade9c8788dab9b2e08cbc08;hp=0000000000000000000000000000000000000000;hpb=a2e303ccb91167b138fc8dae9b66b7b22769b2f6;p=deliverable%2Flttng-modules.git diff --git a/wrapper/uaccess.h b/wrapper/uaccess.h new file mode 100644 index 00000000..c56427c5 --- /dev/null +++ b/wrapper/uaccess.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) + * + * wrapper/uaccess.h + * + * wrapper around linux/uaccess.h. + * + * Copyright (C) 2019 Michael Jeanson + */ + +#ifndef _LTTNG_WRAPPER_UACCESS_H +#define _LTTNG_WRAPPER_UACCESS_H + +#include +#include + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) + +#define VERIFY_READ 0 +#define VERIFY_WRITE 1 +#define lttng_access_ok(type, addr, size) access_ok(addr, size) + +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) */ + +#define lttng_access_ok(type, addr, size) access_ok(type, addr, size) + +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) */ + +#endif /* _LTTNG_WRAPPER_UACCESS_H */