-#ifndef _LIB_RING_BUFFER_BACKEND_H
-#define _LIB_RING_BUFFER_BACKEND_H
-
-/*
+/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+ *
* lib/ringbuffer/backend.h
*
* Ring buffer backend (API).
*
* Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; only
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
* Credits to Steven Rostedt for proposing to use an extra-subbuffer owned by
* the reader in flight recorder mode.
*/
+#ifndef _LIB_RING_BUFFER_BACKEND_H
+#define _LIB_RING_BUFFER_BACKEND_H
+
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/list.h>
#include <linux/fs.h>
#include <linux/mm.h>
-#include <linux/uaccess.h>
+#include <wrapper/uaccess.h>
/* Internal helpers */
#include <wrapper/ringbuffer/backend_internal.h>
set_fs(KERNEL_DS);
pagefault_disable();
- if (unlikely(!access_ok(VERIFY_READ, src, len)))
+ if (unlikely(!lttng_access_ok(VERIFY_READ, src, len)))
goto fill_buffer;
if (likely(pagecpy == len)) {
set_fs(KERNEL_DS);
pagefault_disable();
- if (unlikely(!access_ok(VERIFY_READ, src, len)))
+ if (unlikely(!lttng_access_ok(VERIFY_READ, src, len)))
goto fill_buffer;
if (likely(pagecpy == len)) {
unsigned long ret;
mm_segment_t old_fs;
- if (!access_ok(VERIFY_READ, src, len))
+ if (!lttng_access_ok(VERIFY_READ, src, len))
return 1;
old_fs = get_fs();
set_fs(KERNEL_DS);