From: Stefan Hajnoczi <stefanha@gmail.com>
To: Jeff Cody <jcody@redhat.com>
Cc: kwolf@redhat.com, jsnow@redhat.com, famz@redhat.com,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 6/6] block: update string sizes for filename, backing_file, exact_filename
Date: Thu, 22 Jan 2015 11:46:37 +0000 [thread overview]
Message-ID: <20150122114637.GF28491@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1673c994d5fc21a711576a5fbce49c68ec71ba2a.1421768887.git.jcody@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]
On Tue, Jan 20, 2015 at 12:31:33PM -0500, Jeff Cody wrote:
> The string field entries 'filename', 'backing_file', and
> 'exact_filename' in the BlockDriverState struct are defined as 1024
> bytes.
>
> However, many places that use these values accept a maximum of PATH_MAX
> bytes, so we have a mixture of 1024 byte and PATH_MAX byte allocations.
> This patch makes the BlockDriverStruct field string sizes match usage.
>
> This patch also does a few fixes related to the size that needs to
> happen now:
>
> * the block qapi driver is updated to use PATH_MAX bytes
> * the qcow and qcow2 drivers have an additional safety check
> * the block vvfat driver is updated to use PATH_MAX bytes
> for the size of backing_file, for systems where PATH_MAX is < 1024
> bytes.
> * qemu-img uses PATH_MAX rather than 1024. These instances were not
> changed to be dynamically allocated, however, as the extra
> temporary 3K in stack usage for qemu-img does not seem worrisome.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
> block/qapi.c | 4 ++--
> block/qcow.c | 2 +-
> block/qcow2.c | 3 ++-
> block/vvfat.c | 4 ++--
> include/block/block_int.h | 8 ++++----
> qemu-img.c | 4 ++--
> 6 files changed, 13 insertions(+), 12 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-01-22 11:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 17:31 [Qemu-devel] [PATCH v2 0/6] RESEND - Update filename string sizes in block layer Jeff Cody
2015-01-20 17:31 ` [Qemu-devel] [PATCH v2 1/6] block: vmdk - make ret variable usage clear Jeff Cody
2015-01-20 18:37 ` John Snow
2015-01-22 10:56 ` Stefan Hajnoczi
2015-01-20 17:31 ` [Qemu-devel] [PATCH v2 2/6] block: vmdk - move string allocations from stack to the heap Jeff Cody
2015-01-20 18:37 ` John Snow
2015-01-22 11:17 ` Stefan Hajnoczi
2015-01-22 11:23 ` Daniel P. Berrange
2015-01-20 17:31 ` [Qemu-devel] [PATCH v2 3/6] block: qapi - move string allocation " Jeff Cody
2015-01-20 18:37 ` John Snow
2015-01-22 11:24 ` Stefan Hajnoczi
2015-01-20 17:31 ` [Qemu-devel] [PATCH v2 4/6] block: " Jeff Cody
2015-01-20 18:37 ` John Snow
2015-01-22 11:37 ` Stefan Hajnoczi
2015-01-22 12:15 ` Jeff Cody
2015-01-20 17:31 ` [Qemu-devel] [PATCH v2 5/6] block: mirror - change string allocation to 2-bytes Jeff Cody
2015-01-20 18:37 ` John Snow
2015-01-22 11:41 ` Stefan Hajnoczi
2015-01-20 17:31 ` [Qemu-devel] [PATCH v2 6/6] block: update string sizes for filename, backing_file, exact_filename Jeff Cody
2015-01-20 18:37 ` John Snow
2015-01-22 11:46 ` Stefan Hajnoczi [this message]
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=20150122114637.GF28491@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).