From: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
xen-devel@lists.xensource.com,
Ian Campbell <ian.campbell@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Haogang Chen <haogangchen@gmail.com>
Subject: [PATCH 1/2] xenbus: maximum buffer size is XENSTORE_PAYLOAD_MAX
Date: Wed, 4 Jan 2012 11:39:51 +0000 [thread overview]
Message-ID: <1325677192-10459-1-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1325677158.25206.244.camel@zakaz.uk.xensource.com>
Use this now that it is defined even though it happens to be == PAGE_SIZE.
The code which takes requests from userspace already validates against the size
of this buffer so no further checks are required to ensure that userspace
requests comply with the protocol in this respect.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Haogang Chen <haogangchen@gmail.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com
Cc: virtualization@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org
---
drivers/xen/xenbus/xenbus_dev_frontend.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c
index fb30cff..1fe4324 100644
--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
+++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
@@ -104,7 +104,7 @@ struct xenbus_file_priv {
unsigned int len;
union {
struct xsd_sockmsg msg;
- char buffer[PAGE_SIZE];
+ char buffer[XENSTORE_PAYLOAD_MAX];
} u;
/* Response queue. */
--
1.7.2.5
next prev parent reply other threads:[~2012-01-04 11:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 19:42 [PATCH] XEN: xenbus: integer overflow in process_msg() Haogang Chen
2012-01-04 9:24 ` Ian Campbell
2012-01-04 9:34 ` Ian Campbell
2012-01-04 11:39 ` [PATCH 0/2] xen: Miscelaneous xenbus cleanups Ian Campbell
2012-01-04 11:39 ` Ian Campbell [this message]
2012-01-04 11:39 ` [PATCH 2/2] xen/xenbus: don't reimplement kvasprintf via a fixed size buffer Ian Campbell
2012-01-04 11:58 ` [Xen-devel] " Jan Beulich
2012-01-04 15:12 ` Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1325677192-10459-1-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=haogangchen@gmail.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).