search for: privcmd_mmapbatch_v2

Displaying 7 results from an estimated 7 matches for "privcmd_mmapbatch_v2".

2012 Sep 08
3
[patch 1/3] xen/privcmd: check for integer overflow in ioctl
...+ 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 long privcmd_ioctl_mmap_batch(void __user *udata, int version) if (copy_from_user(&m, udata, sizeof(struct privcmd_mmapbatch_v2))) return -EFAULT; /* Returns per-frame error code in m.err. */ + if (m.num > SIZE_MAX / sizeof(*m.err)) + return -EINVAL; if (!access_ok(VERIFY_WRITE, m.err, m.num * (sizeof(*m.err)))) return -EFAULT; break;
2012 Sep 08
3
[patch 1/3] xen/privcmd: check for integer overflow in ioctl
...+ 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 long privcmd_ioctl_mmap_batch(void __user *udata, int version) if (copy_from_user(&m, udata, sizeof(struct privcmd_mmapbatch_v2))) return -EFAULT; /* Returns per-frame error code in m.err. */ + if (m.num > SIZE_MAX / sizeof(*m.err)) + return -EINVAL; if (!access_ok(VERIFY_WRITE, m.err, m.num * (sizeof(*m.err)))) return -EFAULT; break;
2012 Sep 08
3
[patch 3/3] xen/privcmd: remove const modifier from declaration
...the data. I think it was an accident to declare it as const. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/include/xen/privcmd.h b/include/xen/privcmd.h index a853168..58ed953 100644 --- a/include/xen/privcmd.h +++ b/include/xen/privcmd.h @@ -69,7 +69,7 @@ struct privcmd_mmapbatch_v2 { unsigned int num; /* number of pages to populate */ domid_t dom; /* target domain */ __u64 addr; /* virtual address */ - const xen_pfn_t __user *arr; /* array of mfns */ + xen_pfn_t __user *arr; /* array of mfns */ int __user *err; /* array of error codes */ }; diff --git a...
2012 Sep 08
3
[patch 3/3] xen/privcmd: remove const modifier from declaration
...the data. I think it was an accident to declare it as const. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/include/xen/privcmd.h b/include/xen/privcmd.h index a853168..58ed953 100644 --- a/include/xen/privcmd.h +++ b/include/xen/privcmd.h @@ -69,7 +69,7 @@ struct privcmd_mmapbatch_v2 { unsigned int num; /* number of pages to populate */ domid_t dom; /* target domain */ __u64 addr; /* virtual address */ - const xen_pfn_t __user *arr; /* array of mfns */ + xen_pfn_t __user *arr; /* array of mfns */ int __user *err; /* array of error codes */ }; diff --git a...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...b/include/uapi/xen/privcmd.h @@ -30,8 +30,8 @@ * IN THE SOFTWARE. */ -#ifndef __LINUX_PUBLIC_PRIVCMD_H__ -#define __LINUX_PUBLIC_PRIVCMD_H__ +#ifndef _UAPI_XEN_PRIVCMD_H +#define _UAPI_XEN_PRIVCMD_H #include <linux/types.h> #include <linux/compiler.h> @@ -95,4 +95,4 @@ struct privcmd_mmapbatch_v2 { #define IOCTL_PRIVCMD_MMAPBATCH_V2 \ _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2)) -#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ +#endif /* _UAPI_XEN_PRIVCMD_H */ -- 1.7.7.6
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...b/include/uapi/xen/privcmd.h @@ -30,8 +30,8 @@ * IN THE SOFTWARE. */ -#ifndef __LINUX_PUBLIC_PRIVCMD_H__ -#define __LINUX_PUBLIC_PRIVCMD_H__ +#ifndef _UAPI_XEN_PRIVCMD_H +#define _UAPI_XEN_PRIVCMD_H #include <linux/types.h> #include <linux/compiler.h> @@ -95,4 +95,4 @@ struct privcmd_mmapbatch_v2 { #define IOCTL_PRIVCMD_MMAPBATCH_V2 \ _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2)) -#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ +#endif /* _UAPI_XEN_PRIVCMD_H */ -- 1.7.7.6
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...b/include/uapi/xen/privcmd.h @@ -30,8 +30,8 @@ * IN THE SOFTWARE. */ -#ifndef __LINUX_PUBLIC_PRIVCMD_H__ -#define __LINUX_PUBLIC_PRIVCMD_H__ +#ifndef _UAPI_XEN_PRIVCMD_H +#define _UAPI_XEN_PRIVCMD_H #include <linux/types.h> #include <linux/compiler.h> @@ -95,4 +95,4 @@ struct privcmd_mmapbatch_v2 { #define IOCTL_PRIVCMD_MMAPBATCH_V2 \ _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2)) -#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ +#endif /* _UAPI_XEN_PRIVCMD_H */ -- 1.7.7.6