* [PATCH] xsm: Error code consistency
@ 2011-04-04 14:26 Machon Gregory
0 siblings, 0 replies; only message in thread
From: Machon Gregory @ 2011-04-04 14:26 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
Changes to support consistency of error codes within XSM and Flask XSM
functions.
include/xsm/xsm.h | 6 +++++-
xsm/flask/flask_op.c | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
Signed-off-by:mbgrego@tycho.ncsc.mil
--
Machon Gregory
National Information Assurance Research Lab (NIARL)
[-- Attachment #2: xsm_error_code_consistency.patch --]
[-- Type: text/plain, Size: 770 bytes --]
diff -r 9dd91e9691a2 xen/include/xsm/xsm.h
--- a/xen/include/xsm/xsm.h Sat Apr 02 15:58:54 2011 +0100
+++ b/xen/include/xsm/xsm.h Mon Apr 04 09:19:26 2011 -0400
@@ -427,7 +427,11 @@
static inline long __do_xsm_op (XEN_GUEST_HANDLE(xsm_op_t) op)
{
- return xsm_call(__do_xsm_op(op));
+#ifdef XSM_ENABLE
+ return xsm_ops->__do_xsm_op(op);
+#else
+ return -ENOSYS;
+#endif
}
#ifdef XSM_ENABLE
diff -r 9dd91e9691a2 xen/xsm/flask/flask_op.c
--- a/xen/xsm/flask/flask_op.c Sat Apr 02 15:58:54 2011 +0100
+++ b/xen/xsm/flask/flask_op.c Mon Apr 04 09:19:26 2011 -0400
@@ -485,6 +485,9 @@
if ( length < 0 )
goto out;
+ if (len > count)
+ return -ERANGE;
+
memset(buf, 0, count);
memcpy(buf, context, len);
length = len;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-04 14:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 14:26 [PATCH] xsm: Error code consistency Machon Gregory
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).