All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
	Anthony Liguori <anthony@codemonkey.ws>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [Qemu-trivial] [PATCH] hw/9pfs: Fix errno value for xattr functions
Date: Wed, 02 Oct 2013 20:36:45 +0400	[thread overview]
Message-ID: <524C4B9D.5000100@msgid.tls.msk.ru> (raw)
In-Reply-To: <1380626897-500-1-git-send-email-berrange@redhat.com>

01.10.2013 15:28, Daniel P. Berrange пишет:
> From: "Daniel P. Berrange" <berrange@redhat.com>
>
> If there is no operation driver for the xattr type the
> functions return '-1' and set errno to '-EOPNOTSUPP'.
> When the calling code sets 'ret = -errno' this turns
> into a large positive number.
>
> In Linux 3.11, the kernel has switched to using 9p
> version 9p2000.L, instead of 9p2000.u, which enables
> support for xattr operations. This on its own is harmless,
> but for another change which makes it request the xattr
> with a name 'security.capability'.
>
> The result is that the guest sees a succesful return
> of 95 bytes of data, instead of a failure with errno
> set to 95. Since the kernel expects a maximum of 20
> bytes for an xattr return this gets translated to the
> unexpected errno ERANGE.
>
> This all means that when running a binary off a 9p fs
> in 3.11 kernels you get a fun result of:
>
>    # ./date
>    sh: ./date: Numerical result out of range
>
> The only workaround is to pass 'version=9p2000.u' when
> mounting the 9p fs in the guest, to disable all use of
> xattrs.

Thanks, applied to the trivial patches queue.

/mjt


WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
	Anthony Liguori <anthony@codemonkey.ws>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/9pfs: Fix errno value for xattr functions
Date: Wed, 02 Oct 2013 20:36:45 +0400	[thread overview]
Message-ID: <524C4B9D.5000100@msgid.tls.msk.ru> (raw)
In-Reply-To: <1380626897-500-1-git-send-email-berrange@redhat.com>

01.10.2013 15:28, Daniel P. Berrange пишет:
> From: "Daniel P. Berrange" <berrange@redhat.com>
>
> If there is no operation driver for the xattr type the
> functions return '-1' and set errno to '-EOPNOTSUPP'.
> When the calling code sets 'ret = -errno' this turns
> into a large positive number.
>
> In Linux 3.11, the kernel has switched to using 9p
> version 9p2000.L, instead of 9p2000.u, which enables
> support for xattr operations. This on its own is harmless,
> but for another change which makes it request the xattr
> with a name 'security.capability'.
>
> The result is that the guest sees a succesful return
> of 95 bytes of data, instead of a failure with errno
> set to 95. Since the kernel expects a maximum of 20
> bytes for an xattr return this gets translated to the
> unexpected errno ERANGE.
>
> This all means that when running a binary off a 9p fs
> in 3.11 kernels you get a fun result of:
>
>    # ./date
>    sh: ./date: Numerical result out of range
>
> The only workaround is to pass 'version=9p2000.u' when
> mounting the 9p fs in the guest, to disable all use of
> xattrs.

Thanks, applied to the trivial patches queue.

/mjt

  parent reply	other threads:[~2013-10-02 16:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01 11:28 [Qemu-trivial] [PATCH] hw/9pfs: Fix errno value for xattr functions Daniel P. Berrange
2013-10-01 11:28 ` [Qemu-devel] " Daniel P. Berrange
2013-10-01 16:23 ` [Qemu-trivial] " Aneesh Kumar K.V
2013-10-01 16:23   ` [Qemu-devel] " Aneesh Kumar K.V
2013-10-02 16:36 ` Michael Tokarev [this message]
2013-10-02 16:36   ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

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=524C4B9D.5000100@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.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.