From: Jon Derrick <jonathan.derrick@intel.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
GNU C Library <libc-alpha@sourceware.org>,
Christoph Hellwig <hch@infradead.org>
Cc: Stephen Bates <sbates@raithlin.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@fb.com>
Subject: Re: RFC: pwritev2 regression test for invalid flags
Date: Thu, 1 Jun 2017 11:52:25 -0600 [thread overview]
Message-ID: <43631a74-8934-6940-3eaa-e562e49c5cb2@intel.com> (raw)
In-Reply-To: <a5987ece-5351-346b-21fd-5a3e0092229e@linaro.org>
Hi Zanella,
On 06/15/2017 04:10 PM, Adhemerval Zanella wrote:
> After the issue with LO_HI_LONG definition on x86_64-linux-gnu, I planed to add
> this patch to check the above patch for correct check for invalid flags (which
> would also have show this issue with LO_HI_LONG being used on p{read,write}v2).
>
> However it seems to trigger what I think it is a kernel bug on version that
> provides p{read,write}v, where preadv2 does fails with EOPNOTSUPP but
> pwritev2 does not. For instance, on x86_64-linux-gnu-x32 and i686-linux-gnu
> (4.10.0-21-generic/x86_64):
It looks like the issue is that you are going through the compat_writev
path, which for some reason discards the flags parameter.
Can you apply the patch below to your kernel?
diff --git a/fs/read_write.c b/fs/read_write.c
index c4f88af..f77eb22 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -1210,7 +1210,7 @@ static size_t compat_writev(struct file *file,
if (!(file->f_mode & FMODE_CAN_WRITE))
goto out;
- ret = compat_do_readv_writev(WRITE, file, vec, vlen, pos, 0);
+ ret = compat_do_readv_writev(WRITE, file, vec, vlen, pos, flags);
out:
if (ret > 0)
next prev parent reply other threads:[~2017-06-15 22:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 22:10 RFC: pwritev2 regression test for invalid flags Adhemerval Zanella
2017-06-01 17:52 ` Jon Derrick [this message]
2017-06-16 6:04 ` Christoph Hellwig
2017-06-16 13:01 ` Adhemerval Zanella
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=43631a74-8934-6940-3eaa-e562e49c5cb2@intel.com \
--to=jonathan.derrick@intel.com \
--cc=adhemerval.zanella@linaro.org \
--cc=axboe@fb.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=libc-alpha@sourceware.org \
--cc=linux-block@vger.kernel.org \
--cc=sbates@raithlin.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