All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Seymour, Shane M" <shane.seymour@hpe.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
	Jeff Layton <jlayton@poochiereds.net>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: RE: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks
Date: Thu, 12 Nov 2015 00:56:02 +0000	[thread overview]
Message-ID: <DDB9C85B850785449757F9914A034FCB444D1C18@G9W0766.americas.hpqcorp.net> (raw)
In-Reply-To: <DDB9C85B850785449757F9914A034FCB444D1AFC@G9W0766.americas.hpqcorp.net>

> which would make the other checks I suggested to ensure that neither start
> or end were more than (uint64_t)LLONG_MAX unnecessary.

My apologies I was wrong about what I said above - after thinking about it for longer you still need to make sure that at least len is not greater than (uint64_t)LLONG_MAX because in the calculation:

	if (start > (uint64_t)LLONG_MAX - len)
		return -EINVAL;

if len was more than (uint64_t)LLONG_MAX it would underflow and become a very large positive number and start would never be greater than that (and I said end when I should have said len).

  reply	other threads:[~2015-11-12  0:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  5:15 [PATCH] block: create ioctl to discard-or-zeroout a range of blocks Darrick J. Wong
2015-11-10  5:15 ` Darrick J. Wong
2015-11-11  5:30 ` Seymour, Shane M
2015-11-11  6:14   ` Darrick J. Wong
2015-11-11  6:14     ` Darrick J. Wong
2015-11-11 23:30     ` Seymour, Shane M
2015-11-12  0:56       ` Seymour, Shane M [this message]
2015-11-13  3:36     ` Seymour, Shane M
2015-11-13 15:47     ` Jens Axboe
2015-11-13 15:47       ` Jens Axboe
2015-11-13 21:36       ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2015-01-21  1:06 [PATCH] block: Add discard flag to blkdev_issue_zeroout() function Martin K. Petersen
2015-01-21 10:10 ` [PATCH] block: create ioctl to discard-or-zeroout a range of blocks Darrick J. Wong
2014-11-07  5:08 [RFC] Discard update for 3.19 Martin K. Petersen
2014-11-07  5:08 ` [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function Martin K. Petersen
2014-11-11  0:04   ` Darrick J. Wong
2014-11-17 19:28     ` [PATCH] block: create ioctl to discard-or-zeroout a range of blocks Darrick J. Wong

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=DDB9C85B850785449757F9914A034FCB444D1C18@G9W0766.americas.hpqcorp.net \
    --to=shane.seymour@hpe.com \
    --cc=axboe@kernel.dk \
    --cc=bfields@fieldses.org \
    --cc=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --cc=jlayton@poochiereds.net \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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.