lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 25 Sep 2010 12:40:48 +0200
From:	Jens Axboe <axboe@...nel.dk>
To:	Adrian Hunter <adrian.hunter@...ia.com>
CC:	linux-kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] block: prevent merges of discard and write requests

On 2010-09-25 12:36, Adrian Hunter wrote:
> Add logic to prevent two I/O requests being merged if
> only one of them is a discard.  Ditto secure discard.
> 
> Without this fix, it is possible for write requests
> to transform into discard requests.  For example:
> 
>   Submit bio 1 to discard 8 sectors from sector n
>   Submit bio 2 to write 8 sectors from sector n + 16
>   Submit bio 3 to write 8 sectors from sector n + 8
> 
> Bio 1 becomes request 1.  Bio 2 becomes request 2.
> Bio 3 is merged with request 2, and then subsequently
> request 2 is merged with request 1 resulting in just
> one I/O request which discards all 24 sectors.

Wow, that's a disaster. We can now have requests in the
same direction and of the same type (fs), but not mergeable.

I would move the check up above the position calculations.
I will apply this and upstream it right away. Thanks a lot!

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ