From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Sanchit Garg <sancgarg@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Convert fprintf() to error_request(): virtio-9p
Date: Wed, 01 Dec 2010 10:01:38 -0800 [thread overview]
Message-ID: <4CF68D82.7070507@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTi=kZPid7QiRv+mY+3PSyOmd51dXagi66ZUHNCzq@mail.gmail.com>
On 12/1/2010 1:35 AM, Stefan Hajnoczi wrote:
> On Tue, Nov 30, 2010 at 9:52 AM, Sanchit Garg
> <sancgarg@linux.vnet.ibm.com> wrote:
>> @@ -3707,19 +3708,19 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf)
>> s->ctx.fs_sm = SM_NONE;
>> s->ctx.xops = none_xattr_ops;
>> } else {
>> - fprintf(stderr, "Default to security_model=none. You may want"
>> + error_report("Default to security_model=none. You may want"
>> " enable advanced security model using "
>> "security option:\n\t security_model=passthrough \n\t "
>> - "security_model=mapped\n");
>> + "security_model=mapped");
>> s->ctx.fs_sm = SM_NONE;
>> s->ctx.xops = none_xattr_ops;
>> }
>
> It would be safer to avoid embedded \n\t. Although I can't find
> anything prohibiting it in the source, no other place does this.
> Program output is easier to handle when constrained to one message per
> line. Security issues arise when unfiltered inputs are logged *and*
> linebreaks are allowed because malicious input can inject fake log
> lines. Let's avoid getting into the habit.
Embedded breaks were introduced to give more readable and formatted output.
Stafan do you suggest to print the entire message in one line?
- JV
>
> Looks good otherwise.
>
> Stefan
>
next prev parent reply other threads:[~2010-12-01 18:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 9:52 [Qemu-devel] [PATCH] Convert fprintf() to error_request(): virtio-9p Sanchit Garg
2010-12-01 9:35 ` Stefan Hajnoczi
2010-12-01 18:01 ` Venkateswararao Jujjuri (JV) [this message]
2010-12-01 21:17 ` Stefan Hajnoczi
2010-12-14 17:33 ` Markus Armbruster
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=4CF68D82.7070507@linux.vnet.ibm.com \
--to=jvrao@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=sancgarg@linux.vnet.ibm.com \
--cc=stefanha@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.