From: Joe Perches <joe@perches.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
linux-kernel@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>, xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xenbus: Neaten xenbus_va_dev_error
Date: Wed, 08 Feb 2017 10:20:14 -0800 [thread overview]
Message-ID: <1486578014.27834.17.camel@perches.com> (raw)
In-Reply-To: <7a52ce1c-d570-ce1d-16a5-e4785bcef95f@oracle.com>
On Wed, 2017-02-08 at 12:14 -0500, Boris Ostrovsky wrote:
> On 02/08/2017 11:05 AM, Joe Perches wrote:
> > On Wed, 2017-02-08 at 10:33 -0500, Boris Ostrovsky wrote:
> > > On 02/08/2017 06:33 AM, Joe Perches wrote:
> > > > This function error patch can be simplified, so do so.
> > > >
> > > > Remove fail: label and somewhat obfuscating, used once "error_path"
> > > > function.
> >
> > btw: I left it alone, but likely
> >
> > #define PRINTF_BUFFER_SIZE 4096
> >
> > is probably excessive as the maximum printk
> > buffer is 1024.
> >
> > The xenbus_write might be longer though so
> > maybe it's OK to use 4096, but there is some
> > inequivalence there.
> >
>
> xenbus_write() handles writes up to 4K. However we are filling the
> buffer with sprintf() which I assume is limited to 1K too
vsnprintf is bounded only by addressable memory. ie: (void *)-1
> so it indeed
> doesn't seem useful to have PRINTF_BUFFER_SIZE set to 4.
>
> -boris
>
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
linux-kernel@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>, xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xenbus: Neaten xenbus_va_dev_error
Date: Wed, 08 Feb 2017 10:20:14 -0800 [thread overview]
Message-ID: <1486578014.27834.17.camel@perches.com> (raw)
In-Reply-To: <7a52ce1c-d570-ce1d-16a5-e4785bcef95f@oracle.com>
On Wed, 2017-02-08 at 12:14 -0500, Boris Ostrovsky wrote:
> On 02/08/2017 11:05 AM, Joe Perches wrote:
> > On Wed, 2017-02-08 at 10:33 -0500, Boris Ostrovsky wrote:
> > > On 02/08/2017 06:33 AM, Joe Perches wrote:
> > > > This function error patch can be simplified, so do so.
> > > >
> > > > Remove fail: label and somewhat obfuscating, used once "error_path"
> > > > function.
> >
> > btw: I left it alone, but likely
> >
> > #define PRINTF_BUFFER_SIZE 4096
> >
> > is probably excessive as the maximum printk
> > buffer is 1024.
> >
> > The xenbus_write might be longer though so
> > maybe it's OK to use 4096, but there is some
> > inequivalence there.
> >
>
> xenbus_write() handles writes up to 4K. However we are filling the
> buffer with sprintf() which I assume is limited to 1K too
vsnprintf is bounded only by addressable memory. ie: (void *)-1
> so it indeed
> doesn't seem useful to have PRINTF_BUFFER_SIZE set to 4.
>
> -boris
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-08 18:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 11:33 [PATCH] xenbus: Neaten xenbus_va_dev_error Joe Perches
2017-02-08 11:33 ` Joe Perches
2017-02-08 15:33 ` Boris Ostrovsky
2017-02-08 15:33 ` Boris Ostrovsky
2017-02-08 16:05 ` Joe Perches
2017-02-08 16:05 ` Joe Perches
2017-02-08 17:14 ` Boris Ostrovsky
2017-02-08 17:14 ` Boris Ostrovsky
2017-02-08 18:20 ` Joe Perches [this message]
2017-02-08 18:20 ` Joe Perches
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=1486578014.27834.17.camel@perches.com \
--to=joe@perches.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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.