40b91461838f7675fbb0dacf0f1d0b147e58d10c
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
5 * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 #ifndef _LTTNG_PROBE_USER_H
9 #define _LTTNG_PROBE_USER_H
11 #include <wrapper/uaccess.h>
14 * Calculate string length. Include final null terminating character if there is
15 * one, or ends at first fault.
17 long lttng_strlen_user_inatomic(const char *addr
);
20 * We use __copy_from_user_inatomic to copy userspace data after
21 * checking with access_ok() and disabling page faults.
23 * Return 0 if OK, nonzero on error.
26 unsigned long lttng_copy_from_user_check_nofault(void *dest
,
27 const void __user
*src
,
32 if (!lttng_access_ok(VERIFY_READ
, src
, len
))
35 ret
= __copy_from_user_inatomic(dest
, src
, len
);
40 #endif /* _LTTNG_PROBE_USER_H */
This page took 0.039699 seconds and 5 git commands to generate.