Namespace kernel version macros
[lttng-modules.git] / include / wrapper / uaccess.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
80bb2600
MJ
2 *
3 * wrapper/uaccess.h
4 *
5 * wrapper around linux/uaccess.h.
6 *
7 * Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
8 */
9
10#ifndef _LTTNG_WRAPPER_UACCESS_H
11#define _LTTNG_WRAPPER_UACCESS_H
12
13#include <linux/uaccess.h>
2df37e95 14#include <lttng/kernel-version.h>
80bb2600 15
5f4c791e 16#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0) || \
52cb3b84 17 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
80bb2600
MJ
18
19#define VERIFY_READ 0
20#define VERIFY_WRITE 1
21#define lttng_access_ok(type, addr, size) access_ok(addr, size)
22
5f4c791e 23#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0) */
80bb2600
MJ
24
25#define lttng_access_ok(type, addr, size) access_ok(type, addr, size)
26
5f4c791e 27#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0) */
80bb2600
MJ
28
29#endif /* _LTTNG_WRAPPER_UACCESS_H */
This page took 0.031922 seconds and 4 git commands to generate.