From: Matthew Wilcox <willy@infradead.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: syzbot <syzbot+96cee7d33ca3f87eee86@syzkaller.appspotmail.com>,
ntfs3@lists.linux.dev, syzkaller-bugs@googlegroups.com,
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
Hillf Danton <hdanton@sina.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
trix@redhat.com, ndesaulniers@google.com, nathan@kernel.org
Subject: Re: [PATCH] fs/ntfs3: disable page fault during ntfs_fiemap()
Date: Wed, 12 Apr 2023 15:24:12 +0100 [thread overview]
Message-ID: <ZDa/DDWtr0dTgoti@casper.infradead.org> (raw)
In-Reply-To: <60f6bb85-825c-95e2-79b8-25a2d0e9979e@I-love.SAKURA.ne.jp>
On Wed, Apr 12, 2023 at 10:29:37PM +0900, Tetsuo Handa wrote:
> On 2023/04/12 22:13, Matthew Wilcox wrote:
> >> Also, since Documentation/filesystems/fiemap.rst says that "If an error
> >> is encountered while copying the extent to user memory, -EFAULT will be
> >> returned.", I assume that ioctl(FS_IOC_FIEMAP) users can handle -EFAULT
> >> error.
> >
> > What? No, that doesn't mean "You can return -EFAULT because random luck".
> > That means "If you pass it an invalid address, you'll get -EFAULT back".
> >
> > NACK.
>
> Then, why does fiemap.rst say "If an error is encountered" rather than
> "If an invalid address is passed" ?
Because people are bad at writing.
> Does the definition of -EFAULT limited to "the caller does not have permission
> to access this address" ?
Or the address isn't mapped.
> If copy_to_user() must not fail other than "the caller does not have
> permission to access this address", what should we do for now?
> Just remove ntfs_fiemap() and return -EOPNOTSUPP ?
No, fix it properly. Or don't fix it at all and let somebody else fix it.
next prev parent reply other threads:[~2023-04-12 14:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <000000000000e2102c05eeaf9113@google.com>
[not found] ` <00000000000031b80705ef5d33d1@google.com>
2023-04-12 13:11 ` Tetsuo Handa
2023-04-12 13:13 ` Matthew Wilcox
2023-04-12 13:29 ` Tetsuo Handa
2023-04-12 14:24 ` Matthew Wilcox [this message]
2023-04-17 14:03 ` [PATCH] vfs: allow using kernel buffer during fiemap operation Tetsuo Handa
2023-04-20 21:00 ` Al Viro
2023-04-20 21:11 ` Al Viro
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=ZDa/DDWtr0dTgoti@casper.infradead.org \
--to=willy@infradead.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=hdanton@sina.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=ntfs3@lists.linux.dev \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=syzbot+96cee7d33ca3f87eee86@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=trix@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