x86: Add an inlined __copy_from_user_nmi() variant
[deliverable/linux.git] / arch / x86 / include / asm / uaccess.h
index 09b1b0ab94b7653f7ed7019eb7e35b518582f825..660458af425d795e051ad781e9a9c948b8a4ceff 100644 (file)
@@ -745,5 +745,14 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
 #undef __copy_from_user_overflow
 #undef __copy_to_user_overflow
 
+/*
+ * We rely on the nested NMI work to allow atomic faults from the NMI path; the
+ * nested NMI paths are careful to preserve CR2.
+ *
+ * Caller must use pagefault_enable/disable, or run in interrupt context,
+ * and also do a uaccess_ok() check
+ */
+#define __copy_from_user_nmi __copy_from_user_inatomic
+
 #endif /* _ASM_X86_UACCESS_H */
 
This page took 0.025711 seconds and 5 git commands to generate.