Skip to contentSkip to conversation

x86-use-non-set_fs-based-maccess-routines.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jun 10, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: x86: use non-set_fs based maccess routines
has been removed from the -mm tree. Its filename was
x86-use-non-set_fs-based-maccess-routines.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Christoph Hellwig <[email protected]>
Subject: x86: use non-set_fs based maccess routines

Provide arch_kernel_read and arch_kernel_write routines to implement the maccess routines without messing with set_fs and without stac/clac that opens up access to user space.

[[email protected]: coding style fixes]
Cc Alexei Starovoitov <[email protected]>
Cc Daniel Borkmann <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc Thomas Gleixner <[email protected]>

---

 arch/x86/include/asm/uaccess.h |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/x86/include/asm/uaccess.h renamed from arch/x86/include/asm/uaccess.h~x86-use-non-set_fs-based-maccess-routines +16 -0
@@ -523,5 +523,21 @@ do {									\
 	unsafe_copy_loop(__ucu_dst, __ucu_src, __ucu_len, u8, label);	\
 } while (0)
 
+#define HAVE_GET_KERNEL_NOFAULT
+
+#define __get_kernel_nofault(dst, src, type, err_label)			\
+do {									\
+	int __kr_err;							\
+									\
+	__get_user_size(*((type *)dst), (__force type __user *)src,	\
+			sizeof(type), __kr_err);			\
+	if (unlikely(__kr_err))						\
+		goto err_label;						\
+} while (0)
+
+#define __put_kernel_nofault(dst, src, type, err_label)			\
+	__put_user_size(*((type *)(src)), (__force type __user *)(dst),	\
+			sizeof(type), err_label)
+
 #endif /* _ASM_X86_UACCESS_H */
 

_

Patches currently in -mm which might be from [email protected] are

amdgpu-a-null-mm-does-not-mean-a-thread-is-a-kthread.patch kernel-move-use_mm-unuse_mm-to-kthreadc.patch kernel-move-use_mm-unuse_mm-to-kthreadc-v2.patch kernel-better-document-the-use_mm-unuse_mm-api-contract.patch kernel-better-document-the-use_mm-unuse_mm-api-contract-v2.patch kernel-set-user_ds-in-kthread_use_mm.patch