Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/asm Safe unsafe uaccess stubs.
details: https://anonhg.NetBSD.org/src/rev/9f9ef0d526f9
branches: trunk
changeset: 1028018:9f9ef0d526f9
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:39:41 2021 +0000
description:
Safe unsafe uaccess stubs.
diffstat:
sys/external/bsd/drm2/include/asm/uaccess.h | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 232723e8c65a -r 9f9ef0d526f9 sys/external/bsd/drm2/include/asm/uaccess.h
--- a/sys/external/bsd/drm2/include/asm/uaccess.h Sun Dec 19 01:39:34 2021 +0000
+++ b/sys/external/bsd/drm2/include/asm/uaccess.h Sun Dec 19 01:39:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uaccess.h,v 1.5 2021/12/19 00:55:01 riastradh Exp $ */
+/* $NetBSD: uaccess.h,v 1.6 2021/12/19 01:39:41 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -72,6 +72,17 @@
copy_to_user((USER_PTR), &__put_user_tmp, sizeof(__put_user_tmp)); \
})
+#define __get_user get_user
+#define __put_user put_user
+
+#define user_access_begin() __nothing
+#define user_access_end() __nothing
+
+#define unsafe_put_user(KERNEL_RVAL, USER_PTR, LABEL) do { \
+ if (__put_user(KERNEL_RVAL, USER_PTR)) \
+ goto LABEL; \
+} while (0)
+
static inline size_t
clear_user(void __user *user_ptr, size_t size)
{
Home |
Main Index |
Thread Index |
Old Index