Displaying 9 results from an estimated 9 matches for "privcmd_ioctl_mmap_batch".
2012 Sep 08
3
[patch 1/3] xen/privcmd: check for integer overflow in ioctl
...9;t test the right size.
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
Only needed in linux-next.
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 215a3c0..fdff8f9 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -325,6 +325,8 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
return -EFAULT;
/* Returns per-frame error in m.arr. */
m.err = NULL;
+ if (m.num > SIZE_MAX / sizeof(*m.arr))
+ return -EINVAL;
if (!access_ok(VERIFY_WRITE, m.arr, m.num * sizeof(*m.arr)))
return -EFAULT;
break;
@@ -332,6 +334,8 @@ static...
2012 Sep 08
3
[patch 1/3] xen/privcmd: check for integer overflow in ioctl
...9;t test the right size.
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
Only needed in linux-next.
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 215a3c0..fdff8f9 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -325,6 +325,8 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
return -EFAULT;
/* Returns per-frame error in m.arr. */
m.err = NULL;
+ if (m.num > SIZE_MAX / sizeof(*m.arr))
+ return -EINVAL;
if (!access_ok(VERIFY_WRITE, m.arr, m.num * sizeof(*m.arr)))
return -EFAULT;
break;
@@ -332,6 +334,8 @@ static...
2010 Oct 28
1
[PATCH] xen: xenfs: privcmd: check put_user() return code
put_user() may fail. In this case propagate error code from
privcmd_ioctl_mmap_batch().
Signed-off-by: Vasiliy Kulikov <segooon at gmail.com>
---
Compile tested.
drivers/xen/xenfs/privcmd.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/xenfs/privcmd.c b/drivers/xen/xenfs/privcmd.c
index f80be7f..2eb04c8 100644
--- a/drivers/xe...
2010 Oct 28
1
[PATCH] xen: xenfs: privcmd: check put_user() return code
put_user() may fail. In this case propagate error code from
privcmd_ioctl_mmap_batch().
Signed-off-by: Vasiliy Kulikov <segooon at gmail.com>
---
Compile tested.
drivers/xen/xenfs/privcmd.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/xenfs/privcmd.c b/drivers/xen/xenfs/privcmd.c
index f80be7f..2eb04c8 100644
--- a/drivers/xe...
2012 Sep 08
3
[patch 3/3] xen/privcmd: remove const modifier from declaration
...arr; /* array of mfns */
+ xen_pfn_t __user *arr; /* array of mfns */
int __user *err; /* array of error codes */
};
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 0ce006a..fceb83e 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -389,7 +389,7 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
if (state.global_error && (version == 1)) {
/* Write back errors in second pass. */
- state.user_mfn = (xen_pfn_t *)m.arr;
+ state.user_mfn = m.arr;
state.err = err_array;
ret = traverse_pages(m.num, sizeof(xen_pfn_t),
&page...
2012 Sep 08
3
[patch 3/3] xen/privcmd: remove const modifier from declaration
...arr; /* array of mfns */
+ xen_pfn_t __user *arr; /* array of mfns */
int __user *err; /* array of error codes */
};
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 0ce006a..fceb83e 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -389,7 +389,7 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
if (state.global_error && (version == 1)) {
/* Write back errors in second pass. */
- state.user_mfn = (xen_pfn_t *)m.arr;
+ state.user_mfn = m.arr;
state.err = err_array;
ret = traverse_pages(m.num, sizeof(xen_pfn_t),
&page...
2012 Sep 06
0
[PATCH] Fix mmap batch ioctl error status copy back.
...villa <andres@lagarcavilla.org>
---
drivers/xen/privcmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 5386f20..e4dfa3b 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -389,7 +389,7 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
state.err = err_array;
ret = traverse_pages(m.num, sizeof(xen_pfn_t),
&pagelist, mmap_return_errors_v1, &state);
- } else
+ } else if (version == 2)
ret = __copy_to_user(m.err, err_array, m.num * sizeof(int));
/* If we have not ha...
2012 Oct 04
49
[RFC 00/14] arm: implement ballooning and privcmd foreign mappings based on x86 PVH
This series implements ballooning for Xen on ARM and builds and Mukesh''s
PVH privcmd stuff to implement foreign page mapping on ARM, replacing
the old "HACK: initial (very hacky) XENMAPSPACE_gmfn_foreign" patch.
The baseline is a bit complex, it is basically Stefano''s xenarm-forlinus
branch (commit bbd6eb29214e) merged with Konrad''s linux-next-pvh branch
2011 Jul 21
51
Linux Stubdom Problem
2011/7/19 Stefano Stabellini <stefano.stabellini@eu.citrix.com>:
> CC''ing Tim and xen-devel
>
> On Mon, 18 Jul 2011, Jiageng Yu wrote:
>> 2011/7/16 Stefano Stabellini <stefano.stabellini@eu.citrix.com>:
>> > On Fri, 15 Jul 2011, Jiageng Yu wrote:
>> >> 2011/7/15 Jiageng Yu <yujiageng734@gmail.com>:
>> >> > 2011/7/15