From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: trim: Check the range passed into to prevent overflow
Date: Thu, 30 May 2019 20:05:49 +0800 [thread overview]
Message-ID: <868c3ccc-36aa-62ab-d15d-50a03ecc8b25@gmx.com> (raw)
In-Reply-To: <20190530120402.GD15290@twin.jikos.cz>
[-- Attachment #1.1: Type: text/plain, Size: 804 bytes --]
On 2019/5/30 下午8:04, David Sterba wrote:
> On Tue, May 28, 2019 at 04:21:54PM +0800, Qu Wenruo wrote:
>> Normally the range->len is set to default value (U64_MAX), but when it's
>> not default value, we should check if the range overflows.
>>
>> And if overflows, return -EINVAL before doing anything.
>>
>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>
> The range support of TRIM will be reverted so this patch won't be
> needed.
No, this patch is an independent one.
The objective is to behavior the same when @range->start + @range->len
overflows when @range->len is not default value (U64MAX).
With the trim range patch reverted, we should still detect overflow and
return -EINVAL to meet the new generic/260 check.
So please still include this patch.
Thanks,
Qu
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-05-30 12:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 8:21 [PATCH] btrfs: trim: Check the range passed into to prevent overflow Qu Wenruo
2019-05-28 12:22 ` Nikolay Borisov
2019-05-30 12:04 ` David Sterba
2019-05-30 12:05 ` Qu Wenruo [this message]
2019-05-30 12:13 ` Nikolay Borisov
2019-05-31 5:35 ` Anand Jain
2019-05-31 5:56 ` Qu Wenruo
2019-05-31 6:01 ` Qu Wenruo
2019-08-07 12:03 ` Qu Wenruo
2019-08-07 12:30 ` David Sterba
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=868c3ccc-36aa-62ab-d15d-50a03ecc8b25@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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