linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruenba@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] iomap: Fix overflow in iomap_page_mkwrite
Date: Thu, 7 Nov 2019 18:54:45 +0100	[thread overview]
Message-ID: <CAHc6FU4MbJ5T+W_ku2gQzoquvMeh3Wbvus-c+tjOc6ZrOwTRiQ@mail.gmail.com> (raw)
In-Reply-To: <20191107153732.GA6211@magnolia>

On Thu, Nov 7, 2019 at 4:37 PM Darrick J. Wong <darrick.wong@oracle.com> wrote:
> I'll fix it on commit.

Thanks.

So now the one remaining issue I have with those two functions is why
we check for (offset > size) instead of (offset >= size) in

  if (page->mapping != inode->i_mapping || offset > size)

When (offset == size), we're clearly outside the page, and so we should fail?

Thanks,
Andreas


  reply	other threads:[~2019-11-07 17:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 19:04 [PATCH] iomap: Fix overflow in iomap_page_mkwrite Andreas Gruenbacher
2019-11-06 19:16 ` Darrick J. Wong
2019-11-06 19:34   ` Andreas Gruenbacher
2019-11-07 15:37     ` Darrick J. Wong
2019-11-07 17:54       ` Andreas Gruenbacher [this message]
2019-11-07  8:44 ` Christoph Hellwig

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=CAHc6FU4MbJ5T+W_ku2gQzoquvMeh3Wbvus-c+tjOc6ZrOwTRiQ@mail.gmail.com \
    --to=agruenba@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).