lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Dec 2006 11:35:50 -0800
From:	Daniel Walker <dwalker@...sta.com>
To:	mingo@...e.hu
CC:	linux-kernel@...r.kernel.org
Subject: [PATCH -rt] update kmap_atomic on !HIGHMEM

I got some scheduling while atomic on x86-64 , and since x86-64 doesn't seem
to have HIGHMEM there's no workaround for kmap_atomic() .

This patch adds the same as i386 HIGHMEM for !HIGHMEM.

Signed-Off-By: Daniel Walker <dwalker@...sta.com>

---
 include/linux/highmem.h |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletion(-)

Index: linux-2.6.19/include/linux/highmem.h
===================================================================
--- linux-2.6.19.orig/include/linux/highmem.h
+++ linux-2.6.19/include/linux/highmem.h
@@ -42,13 +42,25 @@ static inline void *kmap(struct page *pa
 
 #define kunmap(page) do { (void) (page); } while (0)
 
+#ifdef CONFIG_PREEMPT_RT
+/*
+ * kmap and kmunmap are above, and they don't really do anything
+ * interesting.
+ */
+# define kmap_atomic(page, idx)		kmap(page)
+# define kmap_atomic_pfn(pfn, idx)	kmap(pfn_to_page(pfn))
+# define kunmap_atomic(kvaddr, idx)	kunmap(kvaddr)
+#else
 #define kmap_atomic(page, idx) \
 	({ pagefault_disable(); page_address(page); })
 #define kunmap_atomic(addr, idx)	do { pagefault_enable(); } while (0)
 #define kmap_atomic_pfn(pfn, idx)	kmap_atomic(pfn_to_page(pfn), (idx))
-#define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
 #endif
 
+#define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
+
+#endif /* ARCH_HAS_KMAP */
+
 #endif /* CONFIG_HIGHMEM */
 
 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ