[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen stable-4.3] x86: (allow to) override LIST_POISON*
From: patchbot () xen ! org
Date: 2014-12-12 21:33:24
Message-ID: E1XzXq0-0001Ou-AH () xenbits ! xen ! org
[Download RAW message or body]
commit ad6007f183bafef5c8e87cf06957ba95026b1121
Author: Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Dec 10 12:34:00 2014 +0100
Commit: Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Dec 10 12:34:00 2014 +0100
x86: (allow to) override LIST_POISON*
Having these point into space not controlled by the hypervisor provides
an unnecessary attack surface. Allow architectures to override them and
utilize that override to make them non-canonical addresses (thus
causing #GP rather than #PF when dereferenced).
Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 404227138e1e49c8073e946649a8d4173b35625c
master date: 2014-11-17 15:05:53 +0100
---
xen/include/asm-x86/config.h | 4 ++++
xen/include/xen/list.h | 9 ++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index bd8f61c..9d76a04 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -96,6 +96,10 @@
/* Return value for zero-size _xmalloc(), distinguished from NULL. */
#define ZERO_BLOCK_PTR ((void *)0xBAD0BAD0BAD0BAD0UL)
+/* Override include/xen/list.h to make these non-canonical addresses. */
+#define LIST_POISON1 ((void *)0x0100100100100100UL)
+#define LIST_POISON2 ((void *)0x0200200200200200UL)
+
#ifndef __ASSEMBLY__
extern unsigned long trampoline_phys;
#define bootsym_phys(sym) \
diff --git a/xen/include/xen/list.h b/xen/include/xen/list.h
index 792eda3..9768fee 100644
--- a/xen/include/xen/list.h
+++ b/xen/include/xen/list.h
@@ -10,12 +10,15 @@
#include <xen/lib.h>
#include <asm/system.h>
-/* These are non-NULL pointers that will result in page faults
- * under normal circumstances, used to verify that nobody uses
- * non-initialized list entries.
+/*
+ * These are non-NULL pointers that will result in faults under normal
+ * circumstances, used to verify that nobody uses non-initialized list
+ * entries. Architectures can override these.
*/
+#ifndef LIST_POISON1
#define LIST_POISON1 ((void *) 0x00100100)
#define LIST_POISON2 ((void *) 0x00200200)
+#endif
/*
* Simple doubly linked list implementation.
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic